[
  {
    "path": ".gitignore",
    "content": ".idea/\nconfig/config.php\nreports/\ncache/\nclasses/local/*.php\ntemplates/local\nvendor/\n"
  },
  {
    "path": ".htaccess",
    "content": "RewriteEngine On\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule ^(.*)$ index.php [QSA,L]\n\nDirectoryIndex index.php\n"
  },
  {
    "path": "LICENSE",
    "content": "                   GNU LESSER GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\n  This version of the GNU Lesser General Public License incorporates\nthe terms and conditions of version 3 of the GNU General Public\nLicense, supplemented by the additional permissions listed below.\n\n  0. Additional Definitions.\n\n  As used herein, \"this License\" refers to version 3 of the GNU Lesser\nGeneral Public License, and the \"GNU GPL\" refers to version 3 of the GNU\nGeneral Public License.\n\n  \"The Library\" refers to a covered work governed by this License,\nother than an Application or a Combined Work as defined below.\n\n  An \"Application\" is any work that makes use of an interface provided\nby the Library, but which is not otherwise based on the Library.\nDefining a subclass of a class defined by the Library is deemed a mode\nof using an interface provided by the Library.\n\n  A \"Combined Work\" is a work produced by combining or linking an\nApplication with the Library.  The particular version of the Library\nwith which the Combined Work was made is also called the \"Linked\nVersion\".\n\n  The \"Minimal Corresponding Source\" for a Combined Work means the\nCorresponding Source for the Combined Work, excluding any source code\nfor portions of the Combined Work that, considered in isolation, are\nbased on the Application, and not on the Linked Version.\n\n  The \"Corresponding Application Code\" for a Combined Work means the\nobject code and/or source code for the Application, including any data\nand utility programs needed for reproducing the Combined Work from the\nApplication, but excluding the System Libraries of the Combined Work.\n\n  1. Exception to Section 3 of the GNU GPL.\n\n  You may convey a covered work under sections 3 and 4 of this License\nwithout being bound by section 3 of the GNU GPL.\n\n  2. Conveying Modified Versions.\n\n  If you modify a copy of the Library, and, in your modifications, a\nfacility refers to a function or data to be supplied by an Application\nthat uses the facility (other than as an argument passed when the\nfacility is invoked), then you may convey a copy of the modified\nversion:\n\n   a) under this License, provided that you make a good faith effort to\n   ensure that, in the event an Application does not supply the\n   function or data, the facility still operates, and performs\n   whatever part of its purpose remains meaningful, or\n\n   b) under the GNU GPL, with none of the additional permissions of\n   this License applicable to that copy.\n\n  3. Object Code Incorporating Material from Library Header Files.\n\n  The object code form of an Application may incorporate material from\na header file that is part of the Library.  You may convey such object\ncode under terms of your choice, provided that, if the incorporated\nmaterial is not limited to numerical parameters, data structure\nlayouts and accessors, or small macros, inline functions and templates\n(ten or fewer lines in length), you do both of the following:\n\n   a) Give prominent notice with each copy of the object code that the\n   Library is used in it and that the Library and its use are\n   covered by this License.\n\n   b) Accompany the object code with a copy of the GNU GPL and this license\n   document.\n\n  4. Combined Works.\n\n  You may convey a Combined Work under terms of your choice that,\ntaken together, effectively do not restrict modification of the\nportions of the Library contained in the Combined Work and reverse\nengineering for debugging such modifications, if you also do each of\nthe following:\n\n   a) Give prominent notice with each copy of the Combined Work that\n   the Library is used in it and that the Library and its use are\n   covered by this License.\n\n   b) Accompany the Combined Work with a copy of the GNU GPL and this license\n   document.\n\n   c) For a Combined Work that displays copyright notices during\n   execution, include the copyright notice for the Library among\n   these notices, as well as a reference directing the user to the\n   copies of the GNU GPL and this license document.\n\n   d) Do one of the following:\n\n       0) Convey the Minimal Corresponding Source under the terms of this\n       License, and the Corresponding Application Code in a form\n       suitable for, and under terms that permit, the user to\n       recombine or relink the Application with a modified version of\n       the Linked Version to produce a modified Combined Work, in the\n       manner specified by section 6 of the GNU GPL for conveying\n       Corresponding Source.\n\n       1) Use a suitable shared library mechanism for linking with the\n       Library.  A suitable mechanism is one that (a) uses at run time\n       a copy of the Library already present on the user's computer\n       system, and (b) will operate properly with a modified version\n       of the Library that is interface-compatible with the Linked\n       Version.\n\n   e) Provide Installation Information, but only if you would otherwise\n   be required to provide such information under section 6 of the\n   GNU GPL, and only to the extent that such information is\n   necessary to install and execute a modified version of the\n   Combined Work produced by recombining or relinking the\n   Application with a modified version of the Linked Version. (If\n   you use option 4d0, the Installation Information must accompany\n   the Minimal Corresponding Source and Corresponding Application\n   Code. If you use option 4d1, you must provide the Installation\n   Information in the manner specified by section 6 of the GNU GPL\n   for conveying Corresponding Source.)\n\n  5. Combined Libraries.\n\n  You may place library facilities that are a work based on the\nLibrary side by side in a single library together with other library\nfacilities that are not Applications and are not covered by this\nLicense, and convey such a combined library under terms of your\nchoice, if you do both of the following:\n\n   a) Accompany the combined library with a copy of the same work based\n   on the Library, uncombined with any other library facilities,\n   conveyed under the terms of this License.\n\n   b) Give prominent notice with the combined library that part of it\n   is a work based on the Library, and explaining where to find the\n   accompanying uncombined form of the same work.\n\n  6. Revised Versions of the GNU Lesser General Public License.\n\n  The Free Software Foundation may publish revised and/or new versions\nof the GNU Lesser General Public License from time to time. Such new\nversions will be similar in spirit to the present version, but may\ndiffer in detail to address new problems or concerns.\n\n  Each version is given a distinguishing version number. If the\nLibrary as you received it specifies that a certain numbered version\nof the GNU Lesser General Public License \"or any later version\"\napplies to it, you have the option of following the terms and\nconditions either of that published version or of any later version\npublished by the Free Software Foundation. If the Library as you\nreceived it does not specify a version number of the GNU Lesser\nGeneral Public License, you may choose any version of the GNU Lesser\nGeneral Public License ever published by the Free Software Foundation.\n\n  If the Library as you received it specifies that a proxy can decide\nwhether future versions of the GNU Lesser General Public License shall\napply, that proxy's public statement of acceptance of any version is\npermanent authorization for you to choose that version for the\nLibrary.\n"
  },
  {
    "path": "README.md",
    "content": "Php Reports\n===========\n\nA reporting framework for managing and displaying nice looking, exportable reports from any data source, including SQL and MongoDB.\n\nMajor features include:\n\n*   Display a report from any data source that can output tabular data (SQL, MongoDB, PHP, etc.)\n*   Output reports in HTML, XML, CSV, JSON, or your own custom format\n*   Add customizable parameters to a report (e.g. start date and end date)\n*   Add graphs and charts with the Google Data Visualization API\n*   Supports multiple database environments (e.g. Production, Staging, and Dev)\n*   Fully extendable and customizable\n\nFor installation instructions and documentation, check out http://jdorn.github.io/php-reports/\n\nIf you have a question, post on the official forum - http://ost.io/@jdorn/php-reports\n\n\nBasic Introduction\n============\n\nReports are organized and grouped in directories.  Each report is it's own file.\n\nA report consists of headers containing meta-data (e.g. name and description)\nand the actual report (SQL queries, javascript, or PHP code).\n\nAll reports return rows of data which are then displayed in a sortable/searchable HTML table.\n\nReports can be exported to a number of formats including CSV, XLS, JSON, and XML.\n\nThe Php Reports framework ties together all these different report types, output formats, and meta-data into\na consistent interface.\n\nExample Reports\n==============\n\nHere's an example SQL report:\n\n```sql\n-- Products That Cost At Least $X\n-- VARIABLE: {\"name\": \"min_price\"}\n\nSELECT Name, Price FROM Products WHERE Price > \"{{min_price}}\"\n```\n\nThe set of SQL comments at the top are the report headers.  The first row is always the report name.\n\nThe `VARIABLE` header tells the report framework to prompt the user for a value before running the report.  Once provided\nit will be passed into the report body (\"{{min_price}}\" in this example) and executed.\n\n\nHere's a MongoDB report:\n\n```js\n// List of All Foods\n// OPTIONS: {\"mongodatabase\": \"MyDatabase\"}\n// VARIABLE: {\n//   \"name\": \"include_inactive\",\n//   \"display\": \"Include Inactive?\",\n//   \"type\": \"select\",\n//   \"options\": [\"yes\",\"no\"]\n// }\n\nvar query = {'type': 'food'};\n\nif(include_inactive == 'no') {\n    query.status = 'active';\n}\n\nvar result = db.Products.find(query);\n\nprintjson(result);\n```\n\nAs you can see, the structure is very similar.  MongoDB reports use javascript style comments for the headers, but everything else remains the same.\n\nYou can populate the 'db' variable by specifying the \"mongodatabase\" option.\n\n\nHere's a PHP Report:\n\n```php\n<?php\n//List of Payment Charges\n//This connects to the Stripe Payments api and shows a list of charges\n//INCLUDE: /stripe.php\n//VARIABLE: {\"name\": \"count\", \"display\": \"Number to Display\"}\n\nif($count > 100 || $count < 1) throw new Exception(\"Count must be between 1 and 100\");\n\n$charges = Stripe_Charge::all(array(\"count\" => $count));\n\n$rows = array();\nforeach($charges as $charge) {\n    $rows[] = array(\n        'Charge Id'=>$charge->id,\n        'Amount'=>number_format($charge->amount/100,2),\n        'Date'=>date('Y-m-d',$charge->created)\n    );\n}\n\necho json_encode($rows);\n?>\n```\nAgain, the header format is very similar.  \n\nThe INCLUDE header includes another report within the running one.  Below is example content of /stripe.php:\n\n```php\n<?php\n//Stripe PHP Included Report\n//You can have headers here too; even nested INCLUDE headers!\n//Some headers will even bubble up to the parent, such as the VARIABLE header\n\n//include the Stripe API client\nrequire_once('lib/Stripe/Stripe.php');\n\n//set the Stripe api key\nStripe::setApiKey(\"123456\");\n?>\n```\n\nHopefully, you can begin to see the power of Php Reports.\n\nFor full documentation and information on getting started, check out http://jdorn.github.io/php-reports/\n"
  },
  {
    "path": "classes/filters/barFilter.php",
    "content": "<?php\nclass barFilter extends FilterBase {\t\n\tpublic static function filter($value, $options = array(), &$report, &$row) {\n\t\tif(isset($options['width'])) $max = $options['width'];\n\t\telse $max = 200;\n\t\t\n\t\t$width = round($max*($value->getValue()/max($report->options['Values'][$value->key])));\n\t\t\n\t\t$value->setValue(\"<div style='width: \".$width.\"px;' class='bar'></div>\".\"<span style='color:#999; font-size:.8em; vertical-align:middle;'>\".$value->getValue(true).\"</span>\",true);\n\t\t\n\t\treturn $value;\n\t}\n}\n"
  },
  {
    "path": "classes/filters/classFilter.php",
    "content": "<?php\nclass classFilter extends FilterBase {\t\n\tpublic static function filter($value, $options = array(), &$report, &$row) {\n\t\t$value->addClass($options['class']);\n\t\t\n\t\treturn $value;\n\t}\n}\n"
  },
  {
    "path": "classes/filters/dateFilter.php",
    "content": "<?php\nclass dateFilter extends FilterBase {\t\n\tpublic static function filter($value, $options = array(), &$report, &$row) {\n\t\tif(!isset($options['format'])) $options['format'] = (isset(PhpReports::$config['default_date_format'])? PhpReports::$config['default_date_format'] : 'Y-m-d H:i:s');\n\t\tif(!isset($options['database'])) $options['database'] = $report->options['Database'];\n\t\t\n\t\t$time = strtotime($value->getValue());\n\t\t\n\t\t//if the time couldn't be parsed, just return the original value\n\t\tif(!$time) {\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\t//if a timezone correction is needed for the database being selected from\n\t\t$environment = $report->getEnvironment();\n\t\tif(isset($environment[$options['database']]['time_offset'])) {\n\t\t\t$time_offset = -1*$environment[$options['database']]['time_offset'];\n\t\t\t\n\t\t\t$time = strtotime((($time_offset > 0)? '+' : '-').abs($time_offset).' hours',$time);\n\t\t}\n\t\t\n\t\t$value->setValue(date($options['format'],$time));\n\t\t\n\t\treturn $value;\n\t}\n}\n"
  },
  {
    "path": "classes/filters/drilldownFilter.php",
    "content": "<?php\nclass drilldownFilter extends linkFilter {\t\n\tpublic static function filter($value, $options = array(), &$report, &$row) {\n\t\tif(!isset($options['macros'])) $options['macros'] = array();\n\t\t\n\t\t//determine report\n\t\t//list of reports to try\n\t\t$try = array();\n\t\t\n\t\t//relative to reportDir\n\t\tif($options['report']{0} === '/') {\n\t\t\t$try[] = substr($options['report'],1);\n\t\t}\n\t\t//relative to parent report\n\t\telse {\n\t\t\t$temp = explode('/',$report->report);\n\t\t\tarray_pop($temp);\n\t\t\t$try[] = implode('/',$temp).'/'.$options['report'];\n\t\t\t$try[] = $options['report'];\n\t\t}\n\t\t\n\t\t//see if the file exists directly\n\t\t$found = false;\n\t\t$path = '';\n\t\tforeach($try as $report_name) {\t\t\t\n\t\t\tif(file_exists(PhpReports::$config['reportDir'].'/'.$report_name)) {\n\t\t\t\t$path = $report_name;\n\t\t\t\t$found = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//see if the report is missing a file extension\n\t\tif(!$found) {\n\t\t\tforeach($try as $report_name) {\n\t\t\t\t$possible_reports = glob(PhpReports::$config['reportDir'].'/'.$report_name.'.*');\n\t\t\t\n\t\t\t\tif($possible_reports) {\n\t\t\t\t\t$path = substr($possible_reports[0],strlen(PhpReports::$config['reportDir'].'/'));\n\t\t\t\t\t$found = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!$found) {\n\t\t\treturn $value;\n\t\t}\n\t\t\t\t\n\t\t$url = PhpReports::$request->base.'/report/html/?report='.$path;\n\n\t\t$macros = array();\n\t\tforeach($options['macros'] as $k=>$v) {\n\t\t\t//if the macro needs to be replaced with the value of another column\n\t\t\tif(isset($v['column'])) {\n\t\t\t\tif(isset($row[$v['column']])) {\n\t\t\t\t\t$v = $row[$v['column']];\n\t\t\t\t}\n\t\t\t\telse $v = \"\";\n\t\t\t}\n\t\t\t//if the macro is just a constant\n\t\t\telseif(isset($v['constant'])) {\n\t\t\t\t$v = $v['constant'];\n\t\t\t}\n\t\t\t\n\t\t\t$macros[$k] = $v;\n\t\t}\n\t\t\n\t\t$macros = array_merge($report->macros,$macros);\n\t\tunset($macros['host']);\n\t\t\n\t\tforeach($macros as $k=>$v) {\t\t\t\t\t\t\t\t\t\n\t\t\tif(is_array($v)) {\n\t\t\t\tforeach($v as $v2) {\n\t\t\t\t\t$url .= '&macros['.$k.'][]='.$v2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$url.='&macros['.$k.']='.$v;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$options = array(\n\t\t\t'url'=>$url\n\t\t);\n\t\t\n\t\treturn parent::filter($value, $options, $report, $row);\n\t}\n}\n"
  },
  {
    "path": "classes/filters/geoipFilter.php",
    "content": "<?php\nclass geoipFilter extends FilterBase {\t\n\tpublic static function filter($value, $options = array(), &$report, &$row) {\n\t\t$record = geoip_record_by_name($value->getValue());\n\t\t\n\t\tif($record) {\n\t\t\t$display = '';\n\t\t\t\n\t\t\t$display = $record['city'];\n\t\t\tif($record['country_code'] !== 'US') {\n\t\t\t\t$display .= ' '.$record['country_name'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$display .= ', '.$record['region'];\n\t\t\t}\n\t\t\t\n\t\t\t$value->setValue($display);\n\t\t\t\n\t\t\t$value->chart_value = array('Latitude'=>$record['latitude'],'Longitude'=>$record['longitude'],'Location'=>$display);\n\t\t}\n\t\telse {\n\t\t\t$value->chart_value = array('Latitude'=>0, 'Longitude'=>0, 'Location'=>'Unknown');\n\t\t}\n\t\t\n\t\treturn $value;\n\t}\n}\n"
  },
  {
    "path": "classes/filters/hideFilter.php",
    "content": "<?php\nclass hideFilter extends FilterBase {\t\n\tpublic static function filter($value, $options = array(), &$report, &$row) {\n\t\treturn false;\n\t}\n}\n"
  },
  {
    "path": "classes/filters/htmlFilter.php",
    "content": "<?php\nclass htmlFilter extends FilterBase {\t\n\tpublic static function filter($value, $options = array(), &$report, &$row) {\n\t\t$value->is_html = true;\n\t\treturn $value;\n\t}\n}\n"
  },
  {
    "path": "classes/filters/imgsizeFilter.php",
    "content": "<?php\nclass imgsizeFilter extends FilterBase {\t\n\tstatic $default_format = '{{ geometry.width }}x{{ geometry.height }} {{ compression }}, {{ fileSize }}';\n\t\n\tpublic static function filter($value, $options = array(), &$report, &$row) {\n\t\t$handle = fopen($value->getValue(), 'rb');\n\t\t$img = new Imagick();\n\t\t$img->readImageFile($handle);\n\t\t$data = $img->identifyImage();\n\t\t\n\t\tif(!isset($options['format'])) $options['format'] = self::$default_format;\n\t\t\n\t\t$value->setValue(PhpReports::renderString($options['format'], $data));\n\t\t\n\t\treturn $value;\n\t}\n}\n"
  },
  {
    "path": "classes/filters/linkFilter.php",
    "content": "<?php\nclass linkFilter extends FilterBase {\t\n\tpublic static function filter($value, $options = array(), &$report, &$row) {\n\t\tif(!$value->getValue()) return $value;\n\t\t\n\t\t$url = isset($options['url'])? $options['url'] : $value->getValue();\n\t\t$attr = (isset($options['blank']) && $options['blank'])? ' target=\"_blank\"' : '';\n\t\t$display = isset($options['display'])? $options['display'] : $value->getValue();\n\n\t\t$html = '<a href=\"'.$url.'\"'.$attr.'>'.$display.'</a>';\n\t\t\n\t\t$value->setValue($html, true);\n\t\t\n\t\treturn $value;\n\t}\n}\n"
  },
  {
    "path": "classes/filters/numberFilter.php",
    "content": "<?php\n/**\n * Created by JetBrains PhpStorm.\n * User: lrzanek\n * Date: 30.08.13\n * Time: 15:37\n * To change this template use File | Settings | File Templates.\n */\nclass numberFilter extends FilterBase {\n    public static function filter($value, $options = array(), &$report, &$row) {\n        $decimals = $options['decimals'] ? $options['decimals'] : 0;\n        $dec_sepr = $options['decimal_sep'] ? $options['decimal_sep'] : ',';\n        $thousand = $options['thousands_sep'] ? $options['thousands_sep'] : ' ';\n        if (is_numeric($value->getValue())) {\n            $value->setValue(number_format($value->getValue(), $decimals, $dec_sepr, $thousand), true);\n        }\n\n        return $value;\n    }\n}\n"
  },
  {
    "path": "classes/filters/paddingFilter.php",
    "content": "<?php\nclass paddingFilter extends FilterBase {\t\n\tpublic static function filter($value, $options = array(), &$report, &$row) {\n\t\t\n\t\tif($options['direction'] === 'r') {\n\t\t\t$value->addClass('right');\n\t\t}\n\t\telseif($options['direction'] === 'l') {\n\t\t\t$value->addClass('left');\n\t\t}\n\t\t\n\t\treturn $value;\n\t}\n}\n"
  },
  {
    "path": "classes/filters/preFilter.php",
    "content": "<?php\nclass preFilter extends FilterBase {\t\n\tpublic static function filter($value, $options = array(), &$report, &$row) {\n\t\t$value->setValue(\"<pre>\".$value->getValue(true).\"</pre>\",true);\n\t\t\n\t\treturn $value;\n\t}\n}\n"
  },
  {
    "path": "classes/filters/twigFilter.php",
    "content": "<?php\nclass twigFilter extends FilterBase {\t\n\tpublic static function filter($value, $options = array(), &$report, &$row) {\n\t\t// If this is html\n\t\t$html = isset($options['html'])? $options['html'] : false;\n\t\t\n\t\t$template = isset($options['template'])? $options['template'] : $value->getValue();\n\t\t\n\t\t$result = PhpReports::renderString($template,array(\n\t\t\t\"value\"=>$value->getValue(),\n\t\t\t\"row\"=>$row\n\t\t));\n\t\t\n\t\t$value->setValue($result, $html);\n\t\t\n\t\treturn $value;\n\t}\n}\n"
  },
  {
    "path": "classes/headers/ChartHeader.php",
    "content": "<?php\nclass ChartHeader extends HeaderBase {\n\tstatic $validation = array(\n\t\t'columns'=>array(\n\t\t\t'type'=>'array',\n\t\t\t'default'=>array()\n\t\t),\n\t\t'dataset'=>array(\n\t\t\t'default'=>0\n\t\t),\n\t\t'type'=>array(\n\t\t\t'type'=>'enum',\n\t\t\t'values'=>array(\n\t\t\t\t'LineChart',\n\t\t\t\t'GeoChart',\n\t\t\t\t'AnnotatedTimeLine',\n\t\t\t\t'BarChart',\n\t\t\t\t'ColumnChart',\n\t\t\t\t'Timeline',\n\t\t\t\t'AreaChart',\n\t\t\t\t'Histogram',\n\t\t\t\t'ComboChart',\n\t\t\t\t'BubbleChart',\n\t\t\t\t'CandlestickChart',\n\t\t\t\t'Gauge',\n\t\t\t\t'Map',\n\t\t\t\t'PieChart',\n\t\t\t\t'Sankey',\n\t\t\t\t'ScatterChart',\n\t\t\t\t'SteppedAreaChart',\n\t\t\t\t'WordTree',\n\t\t\t\t'Gauge',\n\t\t\t\t'Gantt',\n\t\t\t\t// Material charts\n\t\t\t\t'Bar',\n\t\t\t\t'Line',\n\t\t\t),\n\t\t\t'default'=>'LineChart'\n\t\t),\n\t\t'title'=>array(\n\t\t\t'type'=>'string',\n\t\t\t'default'=>''\n\t\t),\n\t\t'width'=>array(\n\t\t\t'type'=>'string',\n\t\t\t'default'=>'100%'\n\t\t),\n\t\t'height'=>array(\n\t\t\t'type'=>'string',\n\t\t\t'default'=>'400px'\n\t\t),\n\t\t'xhistogram'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'buckets'=>array(\n\t\t\t'type'=>'number',\n\t\t\t'default'=>0\n\t\t),\n\t\t'omit-totals'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'omit-total'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'rotate-x-labels'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'grid'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'timefmt'=>array(\n\t\t\t'type'=>'string',\n\t\t\t'default'=>''\n\t\t),\n\t\t'xformat'=>array(\n\t\t\t'type'=>'string',\n\t\t\t'default'=>''\n\t\t),\n\t\t'yrange'=>array(\n\t\t\t'type'=>'string',\n\t\t\t'default'=>''\n\t\t),\n\t\t'all'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'colors'=>array(\n\t\t\t'type'=>'array',\n\t\t\t'default'=>array()\n\t\t),\n\t\t'roles'=>array(\n\t\t\t'type'=>'object',\n\t\t\t'default'=>array()\n\t\t),\n\t\t'markers'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n    'omit-columns'=>array(\n        'type'=>'array',\n        'default'=>array()\n    ),\n\t\t'options'=>array(\n\t\t\t'type'=>'object',\n\t\t\t'default'=>array()\n\t\t)\n\t);\n\t\n\tpublic static function init($params, &$report) {\n\t\t$report->exportHeader('Chart',$params);\n\n\t\tif(!isset($params['type'])) {\n\t\t\t$params['type'] = 'LineChart';\n\t\t}\n\t\t\n\t\tif(isset($params['omit-total'])) {\n\t\t\t$params['omit-totals'] = $params['omit-total'];\n\t\t\tunset($params['omit-total']);\n\t\t}\n\t\t\n\t\tif(!isset($report->options['Charts'])) $report->options['Charts'] = array();\n\t\t\n\t\tif(isset($params['width'])) $params['width'] = self::fixDimension($params['width']);\n\t\tif(isset($params['height'])) $params['height'] = self::fixDimension($params['height']);\n\t\t\n\t\t$params['num'] = count($report->options['Charts'])+1;\n\t\t$params['Rows'] = array();\n\t\t\n\t\t$report->options['Charts'][] = $params;\n\t\t\n\t\t$report->options['has_charts'] = true;\n\n\t}\n\tprotected static function fixDimension($dim) {\t\t\n\t\tif(preg_match('/^[0-9]+$/',$dim)) $dim .= \"px\";\n\t\treturn $dim;\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\t$params = explode(',',$value);\n\t\t$value = array();\n\t\tforeach($params as $param) {\n\t\t\t$param = trim($param);\n\t\t\tif(strpos($param,'=') !== false) {\t\t\t\t\t\t\t\n\t\t\t\tlist($key,$val) = explode('=',$param,2);\n\t\t\t\t$key = trim($key);\n\t\t\t\t$val = trim($val);\n\t\t\t\t\n\t\t\t\t//some parameters can have multiple values separated by \":\"\n\t\t\t\tif(in_array($key,array('x','y','colors'),true)) {\n\t\t\t\t\t$val = explode(':',$val);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$key = $param;\n\t\t\t\t$val = true;\n\t\t\t}\n\t\t\t\n\t\t\t$value[$key] = $val;\n\t\t}\n\t\t\n\t\tif(isset($value['x'])) $value['columns'] = $value['x'];\n\t\telse $value['columns'] = array(1);\n\t\t\n\t\tif(isset($value['y'])) $value['columns'] = array_merge($value['columns'],$value['y']);\n\t\telse $value['all'] = true;\n\t\t\n\t\tunset($value['x']);\n\t\tunset($value['y']);\n\t\t\n\t\treturn $value;\n\t}\n\t\n\tprotected static function getRowInfo(&$rows, $params, $num, &$report) {\n\t\t$cols = array();\n\t\t\n\t\t//expand columns\n\t\t$chart_rows = array();\n\t\tforeach($rows as $k=>$row) {\t\t\t\n\t\t\t$vals = array();\n\t\t\t\n\t\t\tif($k===0) {\n\t\t\t\t$i=1;\n\t\t\t\t$unsorted = 1000;\n\t\t\t\tforeach($row['values'] as $key=>$value) {\n\t\t\t\t\tif (($temp = array_search($row['values'][$key]->i, $report->options['Charts'][$num]['columns']))!==false) {\n\t\t\t\t\t\t$cols[$temp] = $key;\n\t\t\t\t\t} elseif (($temp = array_search($row['values'][$key]->key, $report->options['Charts'][$num]['columns']))!==false) {\n\t\t\t\t\t\t$cols[$temp] = $key;\n\t\t\t\t\t}\n\t\t\t\t\t//if all columns are included, add after any specifically defined ones\n\t\t\t\t\telseif($report->options['Charts'][$num]['all']) {\n\t\t\t\t\t\t$cols[$unsorted] = $key;\n\t\t\t\t\t\t$unsorted ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tksort($cols);\n\t\t\t}\n\t\t\t\n\t\t\tforeach($cols as $key) {\n\t\t\t\tif(isset($row['values'][$key]->chart_value) && is_array($row['values'][$key]->chart_value)) {\n\t\t\t\t\tforeach($row['values'][$key]->chart_value as $ckey=>$cval) {\n\t\t\t\t\t\t$temp = new ReportValue($row['values'][$key]->i, $ckey, trim($cval,'%$ '));\n\t\t\t\t\t\t$temp->setValue($cval);\n\t\t\t\t\t\t$vals[] = $temp;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$temp = new ReportValue($row['values'][$key]->i, $row['values'][$key]->key, $row['values'][$key]->original_value);\n\t\t\t\t\t$temp->setValue(trim($row['values'][$key]->getValue(),'%$ '));\n\t\t\t\t\t$vals[] = $temp;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$chart_rows[] = $vals;\n\t\t}\n\t\t\n\t\t//determine column types\n\t\t$types = array();\n\t\tforeach($chart_rows as $i=>$row) {\n\t\t\tforeach($row as $k=>$v) {\n\t\t\t\t$type = self::determineDataType($v->original_value);\n\t\t\t\t//if the value is null, it doesn't influence the column type\n\t\t\t\tif(!$type) {\n\t\t\t\t\t$chart_rows[$i][$k]->setValue(null);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t//if we don't know the column type yet, set it to this row's value\n\t\t\t\telseif(!isset($types[$k])) $types[$k] = $type;\n\t\t\t\t//if any row has a string value for the column, the whole column is a string type\n\t\t\t\telseif($type === 'string') $types[$k] = 'string';\n\t\t\t\t//if the column is currently a date and this row is a time/datetime, set the column to datetime type\n\t\t\t\telseif($types[$k] === 'date' && in_array($type,array('timeofday','datetime'))) $types[$k] = 'datetime';\n\t\t\t\t//if the column is currently a time and this row is a date/datetime, set the column to datetime type\n\t\t\t\telseif($types[$k] === 'timeofday' && in_array($type,array('date','datetime'))) $types[$k] = 'datetime';\n\t\t\t\t//if the column is currently a date and this row is a number set the column type to number\n\t\t\t\telseif($types[$k] === 'date' && $type === 'number') $types[$k] = 'number';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$report->options['Charts'][$num]['datatypes'] = $types;\n\t\t\n\t\t//build chart rows\n\t\t$report->options['Charts'][$num]['Rows'] = array();\n\t\t\n\t\tforeach($chart_rows as $i=>&$row) {\n\t\t\t$vals = array();\n\t\t\tforeach($row as $key=>$val) {\t\t\t\n\t\t\t\tif(is_null($val->getValue())) {\n\t\t\t\t\t$val->datatype = 'null';\n\t\t\t\t}\n\t\t\t\telseif($types[$key] === 'datetime') {\n\t\t\t\t\t$val->setValue(date('m/d/Y H:i:s',strtotime($val->getValue())));\n\t\t\t\t\t$val->datatype = 'datetime';\n\t\t\t\t}\n\t\t\t\telseif($types[$key] === 'timeofday') {\n\t\t\t\t\t$val->setValue(date('H:i:s',strtotime($val->getValue())));\n\t\t\t\t\t$val->datatype = 'timeofday';\n\t\t\t\t}\n\t\t\t\telseif($types[$key] === 'date') {\n\t\t\t\t\t$val->setValue(date('m/d/Y',strtotime($val->getValue())));\n\t\t\t\t\t$val->datatype = 'date';\n\t\t\t\t}\n\t\t\t\telseif($types[$key] === 'number') {\n\t\t\t\t\t$val->setValue(round(floatval(preg_replace('/[^-0-9\\.]*/','',$val->getValue())),6));\n\t\t\t\t\t$val->datatype = 'number';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$val->datatype = 'string';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$vals[] = $val;\n\t\t\t}\n\t\t\t\n\t\t\t$report->options['Charts'][$num]['Rows'][] = array(\n\t\t\t\t'values'=>$vals,\n\t\t\t\t'first'=>!$report->options['Charts'][$num]['Rows']\n\t\t\t);\n\t\t}\n\t}\n\t\n\tprotected static function generateHistogramRows($rows, $column, $num_buckets) {\n\t\t$column_key = null;\n\t\t\n\t\t//if a name is given as the column, determine the column index\n\t\tif(!is_numeric($column)) {\n\t\t\tforeach($rows[0]['values'] as $k=>$v) {\n\t\t\t\tif($v->key == $column) {\n\t\t\t\t\t$column = $k;\n\t\t\t\t\t$column_key = $v->key;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//if an index is given, convert to 0-based\n\t\telse {\n\t\t\t$column --;\n\t\t\t$column_key = $rows[0]['values'][$column]->key;\n\t\t}\n\t\t\n\t\t//get a list of values for the histogram\n\t\t$vals = array();\n\t\tforeach($rows as &$row) {\n\t\t\t$vals[] = floatval(preg_replace('/[^0-9.]*/','',$row['values'][$column]->getValue()));\n\t\t}\n\t\tsort($vals);\n\t\t\n\t\t//determine buckets\n\t\t$count = count($vals);\n\t\t$buckets = array();\n\t\t$min = $vals[0];\n\t\t$max = $vals[$count-1];\n\t\t$step = ($max-$min)/$num_buckets;\n\t\t$old_limit = $min;\n\t\t\n\t\tfor($i=1;$i<$num_buckets+1;$i++) {\n\t\t\t$limit = $old_limit + $step;\n\t\t\t\n\t\t\t$buckets[round($old_limit,2).\" - \".round($limit,2)] = count(array_filter($vals,function($val) use($old_limit,$limit) {\n\t\t\t\treturn $val >= $old_limit && $val < $limit;\n\t\t\t}));\n\t\t\t$old_limit = $limit;\n\t\t}\n\t\t\n\t\t//build chart rows\n\t\t$chart_rows = array();\n\t\tforeach($buckets as $name=>$count) {\n\t\t\t$chart_rows[] = array(\n\t\t\t\t'values'=>array(\n\t\t\t\t\tnew ReportValue(1,$name,$name),\n\t\t\t\t\tnew ReportValue(2,'value',$count)\n\t\t\t\t),\n\t\t\t\t'first'=>!$chart_rows\n\t\t\t);\n\t\t}\n\t\treturn $chart_rows;\n\t}\n\t\n\tprotected static function determineDataType($value) {\n\t\tif(is_null($value)) return null;\n\t\telseif($value === '') return null;\n\t\telseif(preg_match('/^([$%(\\-+\\s])*([0-9,]+(\\.[0-9]+)?|\\.[0-9]+)([$%(\\-+\\s])*$/',$value)) return 'number';\n\t\telseif(preg_match('/^[0-2][0-9]:[0-5][0-9]:[0-5][0-9]$/',$value)) return 'timeofday';\n\t\telseif(preg_match('/^[0-9]+(\\/|-)[0-9]+/',$value) && strtotime($value)) {\n\t\t\tif(date('H:i:s',strtotime($value))==='00:00:00') return 'date';\n\t\t\telse return 'datetime';\n\t\t}\n\t\telse return 'string';\n\t}\n\n\tpublic static function beforeRender(&$report) {\t\n\t\t// Expand out multiple datasets into their own charts\n\t\t$new_charts = array();\n\t\tforeach($report->options['Charts'] as $num=>$params) {\n\t\t\t$copy = $params;\n\t\t\t\n\t\t\t// If chart is for multiple datasets\n\t\t\tif(is_array($params['dataset'])) {\n\t\t\t\tforeach($params['dataset'] as $dataset) {\n\t\t\t\t\t$copy['dataset'] = $dataset;\n\t\t\t\t\t$copy['num'] = count($new_charts)+1;\n\t\t\t\t\t$new_charts[] = $copy;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If chart is for all datasets\n\t\t\telseif($params['dataset']===true) {\n\t\t\t\tforeach($report->options['DataSets'] as $j=>$dataset) {\n\t\t\t\t\t$copy['dataset'] = $j;\n\t\t\t\t\t$copy['num'] = count($new_charts)+1;\n\t\t\t\t\t$new_charts[] = $copy;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If chart is for one dataset\n\t\t\telse {\n\t\t\t\t$copy['num'] = count($new_charts)+1;\n\t\t\t\t$new_charts[] = $copy;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$report->options['Charts'] = $new_charts;\n\t\t\n\t\tforeach($report->options['Charts'] as $num=>&$params) {\n\t\t\tself::_processChart($num,$params,$params['dataset'],$report);\n\t\t}\n\t}\n\tprotected static function _processChart($num, &$params, $dataset, &$report) {\n\t\tif(isset($params['xhistogram']) && $params['xhistogram']) {\n\t\t\t$rows = self::generateHistogramRows($report->options['DataSets'][$dataset]['rows'],$params['columns'][0],$params['buckets']);\n\t\t\t$params['columns'] = array(1,2);\n\t\t}\n\t\telse {\n\t\t\t$rows = array();\n\t\t\tif(isset($report->options['DataSets'])) {\n\t\t\t\t$rows = $report->options['DataSets'][$dataset]['rows'];\n\t\t\t}\n\n\t\t\tif(count($rows)) {\n\t\t\t\tif(!$params['columns']) $params['columns'] = range(1,count($rows[0]['values']));\n\t\t\t}\n\t\t}\n\t\t\n\t\tself::getRowInfo($rows, $params, $num, $report);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/ColumnsHeader.php",
    "content": "<?php\nclass ColumnsHeader extends HeaderBase {\n\tpublic static function init($params, &$report) {\n\t\tforeach($params['columns'] as $column=>$options) {\n\t\t\tif(!isset($options['type'])) throw new Exception(\"Must specify column type for column $column\");\n\t\t\t$type = $options['type'];\n\t\t\tunset($options['type']);\n\t\t\t$report->addFilter($params['dataset'],$column,$type,$options);\n\t\t}\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\tif(preg_match('/^[0-9]+\\:/',$value)) {\n\t\t\t$dataset = substr($value,0,strpos($value,':'));\n\t\t\t$value = substr($value,strlen($dataset)+1);\n\t\t}\n\t\telse {\n\t\t\t$dataset = 0;\n\t\t}\n\t\t\n\t\t$parts = explode(',',$value);\n\t\t$params = array();\n\t\t$i = 1;\n\t\tforeach($parts as $part) {\n\t\t\t$type = null;\n\t\t\t$options = null;\n\t\t\t\n\t\t\t$part = trim($part);\n\t\t\t//special cases\n\t\t\t//'rpadN' or 'lpadN' where N is number of spaces to pad\n\t\t\tif(substr($part,1,3)==='pad') {\n\t\t\t\t$type = 'padding';\n\t\t\t\t\n\t\t\t\t$options = array(\n\t\t\t\t\t'direction'=>$part[0],\n\t\t\t\t\t'spaces'=>intval(substr($part,4))\n\t\t\t\t);\n\t\t\t}\n\t\t\t//link or link(display) or link_blank or link_blank(display)\n\t\t\telseif(substr($part,0,4)==='link') {\n\t\t\t\t//link(display) or link_blank(display)\n\t\t\t\tif(strpos($part,'(') !== false) {\n\t\t\t\t\tlist($type,$display) = explode('(',substr($part,0,-1),2);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$type = $part;\n\t\t\t\t\t$display = 'link';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$blank = ($type == 'link_blank');\n\t\t\t\t$type = 'link';\n\t\t\t\t\n\t\t\t\t$options = array(\n\t\t\t\t\t'display'=>$display,\n\t\t\t\t\t'blank'=>$blank\n\t\t\t\t);\n\t\t\t}\n\t\t\t//synonyms for 'html'\n\t\t\telseif(in_array($part,array('html','raw'))) {\n\t\t\t\t$type = 'html';\n\t\t\t}\n\t\t\t//url synonym for link\n\t\t\telseif($part === 'url') {\n\t\t\t\t$type = 'link';\n\t\t\t\t$options = array(\n\t\t\t\t\t'blank'=>false\n\t\t\t\t);\n\t\t\t}\n\t\t\telseif($part === 'bar') {\n\t\t\t\t$type = 'bar';\n\t\t\t\t$options = array();\n\t\t\t}\n\t\t\telseif($part === 'pre') {\n\t\t\t\t$type = 'pre';\n\t\t\t}\n\t\t\t//normal case\n\t\t\telse {\n\t\t\t\t$type = 'class';\n\t\t\t\t$options = array(\n\t\t\t\t\t'class'=>$part\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\t$options['type'] = $type;\n\t\t\t\n\t\t\t$params[$i] = $options;\n\t\t\t\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn array(\n\t\t\t'dataset'=>$dataset,\n\t\t\t'columns'=>$params\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/FilterHeader.php",
    "content": "<?php\nclass FilterHeader extends HeaderBase {\n\tstatic $validation = array(\n\t\t'column'=>array(\n\t\t\t'required'=>true,\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'filter'=>array(\n\t\t\t'required'=>true,\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'params'=>array(\n\t\t\t'type'=>'object',\n\t\t\t'default'=>array()\n\t\t),\n\t\t'dataset'=>array(\n\t\t\t'default'=>0\n\t\t)\n\t);\n\t\n\tpublic static function init($params, &$report) {\n\t\t$report->addFilter($params['dataset'],$params['column'],$params['filter'],$params['params']);\n\t}\n\t\n\t//in format: column, params\n\t//params can be a JSON object or \"filter\"\n\t//filter classes are defined in class/filters/\n\t//examples:\n\t//\t\"4,geoip\" - apply a geoip filter to the 4th column\n\t//\t'Ip,{\"filter\":\"geoip\"}' - apply a geoip filter to the \"Ip\" column\n\tpublic static function parseShortcut($value) {\n\t\tif(strpos($value,',') === false) {\n\t\t\t$col = \"1\";\n\t\t\t$filter = $value;\n\t\t}\n\t\telse {\n\t\t\tlist($col,$filter) = explode(',',$value,2);\n\t\t\t$col = trim($col);\n\t\t}\n\t\t$filter = trim($filter);\n\t\t\n\t\treturn array(\n\t\t\t'column'=>$col,\n\t\t\t'filter'=>$filter,\n\t\t\t'params'=>array()\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/FormattingHeader.php",
    "content": "<?php\nclass FormattingHeader extends HeaderBase {\n\tstatic $validation = array(\n\t\t'limit'=>array(\n\t\t\t'type'=>'number',\n\t\t\t'default'=>null\n\t\t),\n\t\t'noborder'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'vertical'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'table'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'showcount'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'font'=>array(\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'nodata'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'selectable'=>array(\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'dataset'=>array(\n\t\t\t'required'=>true,\n\t\t\t'default'=>true\n\t\t)\n\t);\n\t\n\tpublic static function init($params, &$report) {\n\t\tif(!isset($report->options['Formatting'])) $report->options['Formatting'] = array();\n\t\t$report->options['Formatting'][] = $params;\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\t$options = explode(',',$value);\n\t\t\n\t\t$params = array();\n\t\t\n\t\tforeach($options as $v) {\n\t\t\tif(strpos($v,'=')!==false) {\n\t\t\t\tlist($k,$v) = explode('=',$v,2);\n\t\t\t\t$v = trim($v);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$k = $v;\n\t\t\t\t$v=true;\n\t\t\t}\n\t\t\t\n\t\t\t$k = trim($k);\n\t\t\t\n\t\t\t$params[$k] = $v;\n\t\t}\n\t\t\n\t\treturn $params;\n\t}\n\t\n\tpublic static function beforeRender(&$report) {\n\t\t$formatting = array();\n\t\t// Expand out by dataset\n\t\tforeach($report->options['Formatting'] as $params) {\n\t\t\t$copy = $params;\n\t\t\tunset($copy['dataset']);\n\n\t\t\tif(isset($report->options['DataSets'])) {\n\t\t\t\t// Multiple datasets defined\n\t\t\t\tif(is_array($params['dataset'])) {\n\t\t\t\t\tforeach($params['dataset'] as $i) {\n\t\t\t\t\t\tif(isset($report->options['DataSets'][$i])) {\n\t\t\t\t\t\t\tif(!isset($formatting[$i])) $formatting[$i] = array();\n\t\t\t\t\t\t\tforeach($copy as $k=>$v) {\n\t\t\t\t\t\t\t\t$formatting[$i][$k] = $v;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// All datasets\n\t\t\t\telseif($params['dataset']===true) {\n\t\t\t\t\tforeach($report->options['DataSets'] as $i=>$dataset) {\n\t\t\t\t\t\tif(!isset($formatting[$i])) $formatting[$i] = array();\n\t\t\t\t\t\tforeach($copy as $k=>$v) {\n\t\t\t\t\t\t\t$formatting[$i][$k] = $v;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Single dataset\n\t\t\t\telse {\n\t\t\t\t\tif(!isset($report->options['DataSets'][$params['dataset']])) continue;\n\t\t\t\t\tif(!isset($formatting[$params['dataset']])) $formatting[$params['dataset']] = array();\n\t\t\t\t\tforeach($copy as $k=>$v) {\n\t\t\t\t\t\t$formatting[$params['dataset']][$k] = $v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$report->options['Formatting'] = $formatting;\n\t\t\n\t\t// Apply formatting options for each dataset\n\t\tforeach($formatting as $i=>$params) {\n\t\t\tif(isset($params['limit']) && $params['limit']) {\n\t\t\t\t$report->options['DataSets'][$i]['rows'] = array_slice($report->options['DataSets'][$i]['rows'],0,intval($params['limit']));\n\t\t\t}\n\t\t\tif(isset($params['selectable']) && $params['selectable']) {\n\t\t\t\t$selected = array();\n\t\t\t\t\n\t\t\t\t// New style \"selected_{{DATASET}}\" querystring\n\t\t\t\tif(isset($_GET['selected_'.$i])) {\n\t\t\t\t\t$selected = $_GET['selected_'.$i];\n\t\t\t\t}\n\t\t\t\t// Old style \"selected\" querystring\n\t\t\t\telseif(isset($_GET['selected'])) {\t\n\t\t\t\t\t$selected = $_GET['selected'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($selected) {\n\t\t\t\t\t$selected_key = null;\n\t\t\t\t\tforeach($report->options['DataSets'][$i]['rows'][0]['values'] as $key=>$value) {\n\t\t\t\t\t\tif($value->key == $params['selectable']) {\n\t\t\t\t\t\t\t$selected_key = $key;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\tif($selected_key !== null) {\n\t\t\t\t\t\tforeach($report->options['DataSets'][$i]['rows'] as $key=>$row) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!in_array($row['values'][$selected_key]->getValue(),$selected)) {\n\t\t\t\t\t\t\t\tunset($report->options['DataSets'][$i]['rows'][$key]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$report->options['DataSets'][$i]['rows'] = array_values($report->options['DataSets'][$i]['rows']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($params['vertical']) && $params['vertical']) {\n\t\t\t\t$rows = array();\n\t\t\t\tforeach($report->options['DataSets'][$i]['rows'] as $row) {\n\t\t\t\t\tforeach($row['values'] as $value) {\n\t\t\t\t\t\tif(!isset($rows[$value->key])) {\n\t\t\t\t\t\t\t$header = new ReportValue(1, 'key', $value->key);\n\t\t\t\t\t\t\t$header->class = 'left lpad';\n\t\t\t\t\t\t\t$header->is_header = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$rows[$value->key] = array(\n\t\t\t\t\t\t\t\t'values'=>array(\n\t\t\t\t\t\t\t\t\t$header\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'first'=>!$rows\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$rows[$value->key]['values'][] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$rows = array_values($rows);\n\t\t\t\t\n\t\t\t\t$report->options['DataSets'][$i]['vertical'] = $rows;\n\t\t\t}\n\t\t\t\n\t\t\tunset($params['vertical']);\n\t\t\tforeach($params as $k=>$v) {\n\t\t\t\t$report->options['DataSets'][$i][$k] = $v;\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "classes/headers/IncludeHeader.php",
    "content": "<?php\nclass IncludeHeader extends HeaderBase {\n\tstatic $validation = array(\n\t\t'report'=>array(\n\t\t\t'required'=>true,\n\t\t\t'type'=>'string'\n\t\t)\n\t);\n\t\n\tpublic static function init($params, &$report) {\n\t\tif($params['report'][0] === '/') {\n\t\t\t$report_path = substr($params['report'],1);\n\t\t}\n\t\telse {\n\t\t\t$report_path = dirname($report->report).'/'.$params['report'];\n\t\t}\n\t\t\n\t\t\n\t\tif(!file_exists(PhpReports::$config['reportDir'].'/'.$report_path)) {\n\t\t\t$possible_reports = glob(PhpReports::$config['reportDir'].'/'.$report_path.'.*');\n\t\t\t\n\t\t\tif($possible_reports) {\n\t\t\t\t$report_path = substr($possible_reports[0],strlen(PhpReports::$config['reportDir'].'/'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Exception(\"Unknown report in INCLUDE header '$report_path'\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t$included_report = new Report($report_path);\n\t\t\n\t\t//parse any exported headers from the included report\n\t\tforeach($included_report->exported_headers as $header) {\n\t\t\t$report->parseHeader($header['name'],$header['params']);\n\t\t}\n\t\t\n\t\tif(!isset($report->options['Includes'])) $report->options['Includes'] = array();\n\t\t\n\t\t$report->options['Includes'][] = $included_report;\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\treturn array(\n\t\t\t'report'=>$value\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/InfoHeader.php",
    "content": "<?php\nclass InfoHeader extends HeaderBase {\n\tstatic $validation = array(\n\t\t'name'=>array(\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'description'=>array(\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'created'=>array(\n\t\t\t'type'=>'string',\n\t\t\t'pattern'=>'/^[0-9]{4}-[0-9]{2}-[0-9]{2}/'\n\t\t),\n\t\t'note'=>array(\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'type'=>array(\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'status'=>array(\n\t\t\t'type'=>'string'\n\t\t)\n\t);\n\t\n\tpublic static function init($params, &$report) {\n\t\tforeach($params as $key=>$value) {\n\t\t\t$report->options[ucfirst($key)] = $value;\n\t\t}\n\t}\n\t\n\t// Accepts shortcut format:\n\t// name=My Report,description=This is My Report\n\tpublic static function parseShortcut($value) {\n\t\t$parts = explode(',',$value);\n\t\t\n\t\t$params = array();\n\t\t\n\t\tforeach($parts as $v) {\n\t\t\tif(strpos($v,'=')!==false) {\n\t\t\t\tlist($k,$v) = explode('=',$v,2);\n\t\t\t\t$v = trim($v);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$k = $v;\n\t\t\t\t$v=true;\n\t\t\t}\n\t\t\t\n\t\t\t$k = trim($k);\n\t\t\t\n\t\t\t$params[$k] = $v;\n\t\t}\n\t\t\n\t\treturn $params;\n\t}\n}\n"
  },
  {
    "path": "classes/headers/OptionsHeader.php",
    "content": "<?php\nclass OptionsHeader extends HeaderBase {\n\tstatic $validation = array(\n\t\t'limit'=>array(\n\t\t\t'type'=>'number',\n\t\t\t'default'=>null\n\t\t),\n\t\t'access'=>array(\n\t\t\t'type'=>'enum',\n\t\t\t'values'=>array('rw','readonly'),\n\t\t\t'default'=>'readonly'\n\t\t),\n\t\t'noborder'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'noreport'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'vertical'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'ignore'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'table'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'showcount'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'font'=>array(\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'stop'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'nodata'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'version'=>array(\n\t\t\t'type'=>'number',\n\t\t\t'default'=>1\n\t\t),\n\t\t'selectable'=>array(\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'mongodatabase'=>array(\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'database'=>array(\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'cache'=>array(\n\t\t\t'min'=>0,\n\t\t\t'type'=>'number'\n\t\t),\n\t\t'ttl'=>array(\n\t\t\t'min'=>0,\n\t\t\t'type'=>'number'\n\t\t),\n\t\t'default_dataset'=>array(\n\t\t\t'type'=>'number',\n\t\t\t'default'=>0\n\t\t),\n\t\t'has_charts'=>array(\n\t\t\t'type'=>'boolean'\n\t\t)\n\t);\n\t\n\tpublic static function init($params, &$report) {\n\t\t//legacy support for the 'ttl' cache parameter\n\t\tif(isset($params['ttl'])) {\n\t\t\t$params['cache'] = $params['ttl'];\n\t\t\tunset($params['ttl']);\n\t\t}\n\n\t\tif(isset($params['has_charts']) && $params['has_charts']) {\n\t\t\tif(!isset($report->options['Charts'])) $report->options['Charts'] = array();\n\t\t}\n\t\t\n\t\t// Some parameters were moved to a 'FORMATTING' header\n\t\t// We need to catch those and add the header to the report\n\t\t$formatting_header = array();\n\t\t\n\t\tforeach($params as $key=>$value) {\n\t\t\t// This is a FORMATTING parameter\n\t\t\tif(in_array($key,array('limit','noborder','vertical','table','showcount','font','nodata','selectable'))) {\n\t\t\t\t$formatting_header[$key] = $value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//some of the keys need to be uppercase (for legacy reasons)\n\t\t\tif(in_array($key,array('database','mongodatabase','cache'))) $key = ucfirst($key);\n\t\t\t\n\t\t\t$report->options[$key] = $value;\n\t\t\t\n\t\t\t//if the value is different from the default, it can be exported\n\t\t\tif(!isset(self::$validation[$key]['default']) || ($value && $value !== self::$validation[$key]['default'])) {\n\t\t\t\t//only export some of the options\n\t\t\t\tif(in_array($key,array('access','Cache'),true)) {\n\t\t\t\t\t$report->exportHeader('Options',array($key=>$value));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($formatting_header) {\n\t\t\t$formatting_header['dataset'] = true;\n\t\t\t$report->parseHeader('Formatting',$formatting_header);\n\t\t}\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\t$options = explode(',',$value);\n\t\t\n\t\t$params = array();\n\t\t\n\t\tforeach($options as $v) {\n\t\t\tif(strpos($v,'=')!==false) {\n\t\t\t\tlist($k,$v) = explode('=',$v,2);\n\t\t\t\t$v = trim($v);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$k = $v;\n\t\t\t\t$v=true;\n\t\t\t}\n\t\t\t\n\t\t\t$k = trim($k);\n\t\t\t\n\t\t\t$params[$k] = $v;\n\t\t}\n\t\t\n\t\treturn $params;\n\t}\n}\n"
  },
  {
    "path": "classes/headers/RollupHeader.php",
    "content": "<?php\nclass RollupHeader extends HeaderBase {\n\tstatic $validation = array(\n\t\t'columns'=>array(\n\t\t\t'required'=>true,\n\t\t\t'type'=>'object',\n\t\t\t'default'=>array()\n\t\t),\n\t\t'dataset'=>array(\n\t\t\t'required'=>false,\n\t\t\t'default'=>0\n\t\t)\n\t);\n\t\n\tpublic static function init($params, &$report) {\n\t\t//make sure at least 1 column is defined\n\t\tif(empty($params['columns'])) throw new Exception(\"Rollup header needs at least 1 column defined\");\n\t\t\n\t\tif(!isset($report->options['Rollup'])) $report->options['Rollup'] = array();\n\t\t\n\t\t// If more than one dataset is defined, add the rollup header multiple times\n\t\tif(is_array($params['dataset'])) {\n\t\t\t$new_params = $params;\n\t\t\tforeach($params['dataset'] as $dataset) {\n\t\t\t\t$new_params['dataset'] = $dataset;\n\t\t\t\t$report->options['Rollup'][] = $new_params;\n\t\t\t}\n\t\t}\n\t\t// Otherwise, just add one rollup header\n\t\telse {\n\t\t\t$report->options['Rollup'][] = $params;\n\t\t}\n\t}\n\t\n\tpublic static function beforeRender(&$report) {\t\t\t\n\t\t//cache for Twig parameters for each dataset/column\n\t\t$twig_params = array();\n\t\t\n\t\t// Now that we know how many datasets we have, expand out Rollup headers with dataset->true\n\t\t$new_rollups = array();\n\t\tforeach($report->options['Rollup'] as $i=>$rollup) {\n\t\t\tif($rollup['dataset']===true && isset($report->options['DataSets'])) {\n\t\t\t\t$copy = $rollup;\n\t\t\t\tforeach($report->options['DataSets'] as $i=>$dataset) {\n\t\t\t\t\t$copy['dataset'] = $i;\n\t\t\t\t\t$new_rollups[] = $copy;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$new_rollups[] = $rollup;\n\t\t\t}\n\t\t}\n\t\t$report->options['Rollup'] = $new_rollups;\n\t\t\n\t\t// First get all the values\n\t\tforeach($report->options['Rollup'] as $rollup) {\t\t\t\n\t\t\t// If we already got twig parameters for this dataset, skip it\n\t\t\tif(isset($twig_params[$rollup['dataset']])) continue;\n\t\t\t$twig_params[$rollup['dataset']] = array();\n\t\t\tif(isset($report->options['DataSets'])) {\n\t\t\t\tif(isset($report->options['DataSets'][$rollup['dataset']])) {\n\t\t\t\t\tforeach($report->options['DataSets'][$rollup['dataset']]['rows'] as $row) {\n\t\t\t\t\t\tforeach($row['values'] as $value) {\n\t\t\t\t\t\t\tif(!isset($twig_params[$rollup['dataset']][$value->key])) $twig_params[$rollup['dataset']][$value->key] = array('values'=>array());\n\t\t\t\t\t\t\t$twig_params[$rollup['dataset']][$value->key]['values'][] = $value->getValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Then, calculate other statistical properties\n\t\tforeach($twig_params as $dataset=>&$tp) {\n\t\t\tforeach($tp as $column=>&$params) {\n\t\t\t\t//get non-null values and sort them\n\t\t\t\t$real_values = array_filter($params['values'],function($a) {if($a === null || $a==='') return false; return true; });\n\t\t\t\tsort($real_values);\n\t\t\t\t\n\t\t\t\t$params['sum'] = array_sum($real_values);\n\t\t\t\t$params['count'] = count($real_values);\n\t\t\t\tif($params['count']) {\n\t\t\t\t\t$params['mean'] = $params['average'] = $params['sum'] / $params['count'];\n\n\t\t\t\t\t// Median for odd number of rows\n\t\t\t\t\tif($params['count']%2) {\n\t\t\t\t\t\t$params['median'] = $real_values[floor($params['count']/2)];\n\t\t\t\t\t}\n\t\t\t\t\t// Median for even number of rows\n\t\t\t\t\telse {\n\t\t\t\t\t\t// If the 2 middle entries are numeric, average them\n\t\t\t\t\t\tif(is_numeric($real_values[$params['count']/2-1]) && is_numeric($real_values[$params['count']/2])) {\n\t\t\t\t\t\t\t$params['median'] = ($real_values[$params['count']/2-1] + $real_values[$params['count']/2])/2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If they are not numeric, pick one of the middle entries\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$params['median'] = $real_values[$params['count']/2-1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$params['min'] = $real_values[0];\n\t\t\t\t\t$params['max'] = $real_values[$params['count']-1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$params['mean'] = $params['average'] = $params['median'] = $params['min'] = $params['max'] = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$devs = array();\n\t\t\t\tif (empty($real_values)) {\n\t\t\t\t\t$params['stdev'] = 0;\n\t\t\t\t} else \tif (function_exists('stats_standard_deviation')) {\n\t\t\t\t\t$params['stdev'] = stats_standard_deviation($real_values);\n\t\t\t\t} else {\n\t\t\t\t\tforeach($real_values as $v) $devs[] = pow($v - $params['mean'], 2);\n\t\t\t\t\t$params['stdev'] = sqrt(array_sum($devs) / (count($devs)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//render each rollup row\n\t\tforeach($report->options['Rollup'] as $rollup) {\n\t\t\tif(!isset($report->options['DataSets'][$rollup['dataset']]['footer'])) $report->options['DataSets'][$rollup['dataset']]['footer'] = array();\n\t\t\t$columns = $rollup['columns'];\n\t\t\t$row = array(\n\t\t\t\t'values'=>array(),\n\t\t\t\t'rollup'=>true\n\t\t\t);\n\t\t\t\n\t\t\tforeach($twig_params[$rollup['dataset']] as $column=>$p) {\n\t\t\t\tif(isset($columns[$column])) {\n\t\t\t\t\t$p = array_merge($p,array('row'=>$twig_params[$rollup['dataset']]));\n\n\t\t\t\t\t$row['values'][] = new ReportValue(-1,$column,PhpReports::renderString($columns[$column],$p));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$row['values'][] = new ReportValue(-1,$column,null);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$report->options['DataSets'][$rollup['dataset']]['footer'][] = $row;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "classes/headers/VariableHeader.php",
    "content": "<?php\nclass VariableHeader extends HeaderBase {\n\t\n\tstatic $validation = array(\n\t\t'name'=>array(\n\t\t\t'required'=>true,\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'display'=>array(\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'type'=>array(\n\t\t\t'type'=>'enum',\n\t\t\t'values'=>array('text','select','textarea','date','daterange'),\n\t\t\t'default'=>'text'\n\t\t),\n\t\t'options'=>array(\n\t\t\t'type'=>'array'\n\t\t),\n\t\t'default'=>array(\n\t\t\n\t\t),\n\t\t'empty'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'multiple'=>array(\n\t\t\t'type'=>'boolean',\n\t\t\t'default'=>false\n\t\t),\n\t\t'database_options'=>array(\n\t\t\t'type'=>'object'\n\t\t),\n\t\t'description'=>array(\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'format'=>array(\n\t\t\t'type'=>'string',\n\t\t\t'default'=>'Y-m-d H:i:s'\n\t\t),\n\t\t'modifier_options'=>array(\n\t\t\t'type'=>'array'\n\t\t),\n\t\t'time_offset'=>array(\n\t\t\t'type'=>'number'\n\t\t),\n\t);\n\t\n\tpublic static function init($params, &$report) {\t\t\n\t\tif(!isset($params['display']) || !$params['display']) $params['display'] = $params['name'];\n\t\t\n\t\tif(!preg_match('/^[a-zA-Z][a-zA-Z0-9_\\-]*$/',$params['name'])) throw new Exception(\"Invalid variable name: $params[name]\");\n\t\t\n\t\t//add to options\n\t\tif(!isset($report->options['Variables'])) $report->options['Variables'] = array();\n\t\t$report->options['Variables'][$params['name']] = $params;\n\t\t\n\t\t//add to macros\n\t\tif(!isset($report->macros[$params['name']]) && isset($params['default'])) {\n\t\t\t$report->addMacro($params['name'],$params['default']);\n\t\t\t\n\t\t\t$report->macros[$params['name']] = $params['default'];\n\t\t\t\n\t\t\tif(!isset($params['empty']) || !$params['empty']) {\n\t\t\t\t$report->is_ready = false;\n\t\t\t}\n\t\t}\n\t\telseif(!isset($report->macros[$params['name']])) {\n\t\t\t$report->addMacro($params['name'],'');\n\t\t\t\n\t\t\tif(!isset($params['empty']) || !$params['empty']) {\n\t\t\t\t$report->is_ready = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//convert newline separated strings to array for vars that support multiple values\n\t\tif($params['multiple'] && !is_array($report->macros[$params['name']])) $report->addMacro($params['name'],explode(\"\\n\",$report->macros[$params['name']]));\n\t\t\n\t\t$report->exportHeader('Variable',$params);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\tlist($var,$params) = explode(',',$value,2);\n\t\t$var = trim($var);\n\t\t$params = trim($params);\n\t\t\n\t\t$parts = explode(',',$params);\n\t\t$params = array(\n\t\t\t'name'=>$var,\n\t\t\t'display'=>trim($parts[0])\n\t\t);\n\t\t\n\t\tunset($parts[0]);\n\t\t\n\t\t$extra = implode(',',$parts);\n\t\t\n\t\t//just \"name, label\"\n\t\tif(!$extra) return $params;\n\t\t\n\t\t//if the 3rd item is \"LIST\", use multi-select\n\t\tif(preg_match('/^\\s*LIST\\s*\\b/',$extra)) {\n\t\t\t$params['multiple'] = true;\n\t\t\t$extra = array_pop(explode(',',$extra,2));\n\t\t}\n\t\t\n\t\t//table.column, where clause, ALL\n\t\tif(preg_match('/^\\s*[a-zA-Z0-9_\\-]+\\.[a-zA-Z0-9_\\-]+\\s*,[^,]+,\\s*ALL\\s*$/', $extra)) {\n\t\t\tlist($table_column, $where, $all) = explode(',',$extra, 3);\n\t\t\tlist($table,$column) = explode('.',$table_column,2);\n\t\t\t\n\t\t\t$params['type'] = 'select';\n\t\t\t\n\t\t\t$var_params = array(\n\t\t\t\t'table'=>$table,\n\t\t\t\t'column'=>$column,\n\t\t\t\t'all'=>true,\n\t\t\t\t'where'=>$where\n\t\t\t);\n\t\t\t\n\t\t\t$params['database_options'] = $var_params;\n\t\t}\n\t\t\n\t\t//table.column, ALL\n\t\telseif(preg_match('/^\\s*[a-zA-Z0-9_\\-]+\\.[a-zA-Z0-9_\\-]+\\s*,\\s*ALL\\s*$/', $extra)) {\n\t\t\tlist($table_column, $all) = explode(',',$extra, 2);\n\t\t\tlist($table,$column) = explode('.',$table_column,2);\n\t\t\t\n\t\t\t$params['type'] = 'select';\n\t\t\t\n\t\t\t$var_params = array(\n\t\t\t\t'table'=>$table,\n\t\t\t\t'column'=>$column,\n\t\t\t\t'all'=>true\n\t\t\t);\n\t\t\t\n\t\t\t$params['database_options'] = $var_params;\n\t\t}\n\t\t\n\t\t//table.column, where clause\n\t\telseif(preg_match('/^\\s*[a-zA-Z0-9_\\-]+\\.[a-zA-Z0-9_\\-]+\\s*,[^,]+$/', $extra)) {\n\t\t\tlist($table_column, $where) = explode(',',$extra, 2);\n\t\t\tlist($table,$column) = explode('.',$table_column,2);\n\t\t\t\n\t\t\t$params['type'] = 'select';\n\t\t\t\n\t\t\t$var_params = array(\n\t\t\t\t'table'=>$table,\n\t\t\t\t'column'=>$column,\n\t\t\t\t'where'=>$where\n\t\t\t);\n\t\t\t\n\t\t\t$params['database_options'] = $var_params;\n\t\t}\n\t\t\n\t\t//table.column\n\t\telseif(preg_match('/^\\s*[a-zA-Z0-9_\\-]+\\.[a-zA-Z0-9_\\-]+\\s*$/', $extra)) {\n\t\t\tlist($table,$column) = explode('.',$extra,2);\n\t\t\t\n\t\t\t$params['type'] = 'select';\n\t\t\t\n\t\t\t$var_params = array(\n\t\t\t\t'table'=>$table,\n\t\t\t\t'column'=>$column\n\t\t\t);\n\t\t\t\n\t\t\t$params['database_options'] = $var_params;\n\t\t}\n\t\t\n\t\t//option1|option2\n\t\telseif(preg_match('/^\\s*([a-zA-Z0-9_\\- ]+\\|)+[a-zA-Z0-9_\\- ]+$/',$extra)) {\n\t\t\t$options = explode('|',$extra);\n\t\t\t\n\t\t\t$params['type'] = 'select';\t\t\t\t\n\t\t\t$params['options'] = $options;\n\t\t}\n\t\t\n\t\treturn $params;\n\t}\n\t\n\tpublic static function afterParse(&$report) {\n\t\t$classname = $report->options['Type'].'ReportType';\n\t\t\n\t\tforeach($report->options['Variables'] as $var=>$params) {\n\t\t\t//if it's a select variable and the options are pulled from a database\n\t\t\tif(isset($params['database_options'])) {\n\t\t\t\t$classname::openConnection($report);\n\t\t\t\t$params['options'] = $classname::getVariableOptions($params['database_options'],$report);\n\t\t\t\t\n\t\t\t\t$report->options['Variables'][$var] = $params;\n\t\t\t}\n\n\t\t\t//if the type is daterange, parse start and end with strtotime\n\t\t\tif($params['type'] === 'daterange' && !empty($report->macros[$params['name']][0]) && !empty($report->macros[$params['name']][1])) {\n\t\t\t\t$start = date_create($report->macros[$params['name']][0]);\n\t\t\t\tif(!$start) throw new Exception($params['display'].\" must have a valid start date.\");\n\t\t\t\tdate_time_set($start,0,0,0);\n\t\t\t\t$report->macros[$params['name']]['start'] = date_format($start,$params['format']);\n\n\t\t\t\t$end = date_create($report->macros[$params['name']][1]);\n\t\t\t\tif(!$end) throw new Exception($params['display'].\" must have a valid end date.\");\n\t\t\t\tdate_time_set($end,23,59,59);\n\t\t\t\t$report->macros[$params['name']]['end'] = date_format($end,$params['format']);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tpublic static function beforeRun(&$report) {\n\t\tforeach($report->options['Variables'] as $var=>$params) {\t\t\t\n\t\t\t//if the type is date, parse with strtotime\n\t\t\tif($params['type'] === 'date' && $report->macros[$params['name']]) {\n\t\t\t\t\n\t\t\t\t$time = strtotime($report->macros[$params['name']]);\n\t\t\t\tif(!$time) throw new Exception($params['display'].\" must be a valid datetime value.\");\n\t\t\t\t\n\t\t\t\t$report->macros[$params['name']] = date($params['format'],$time);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/CacheHeader.php",
    "content": "<?php\nclass CacheHeader extends OptionsHeader {\t\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"CACHE header is deprecated.  Use the OPTIONS header with the 'cache' parameter instead.\",E_USER_DEPRECATED);\n\t\t\n\t\treturn parent::init($params, $report);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\t//if a cache ttl is being set\n\t\tif(is_numeric($value)) {\n\t\t\treturn array(\n\t\t\t\t'cache'=>intval($value)\n\t\t\t);\n\t\t}\n\t\t//if cache is being turned off\n\t\telse {\n\t\t\treturn array(\n\t\t\t\t'cache'=>0\n\t\t\t);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/CautionHeader.php",
    "content": "<?php\nclass CautionHeader extends HeaderBase {\n\tstatic $validation = array(\n\t\t'value'=>array(\n\t\t\t'required'=>true,\n\t\t\t'type'=>'string'\n\t\t)\n\t);\n\t\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"CAUTION header is deprecated.\",E_USER_DEPRECATED);\n\t\t\n\t\t$report->options['Caution'] = $params['value'];\n\t\t\t\n\t\t$report->exportHeader('Caution',$params);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\treturn array(\n\t\t\t'value'=>$value\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/ColumnHeader.php",
    "content": "<?php\nclass ColumnHeader extends ColumnsHeader {\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"COLUMN header is deprecated.  Use the COLUMNS header instead.\",E_USER_DEPRECATED);\n\t\t\n\t\treturn parent::init($params, $report);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/CreatedHeader.php",
    "content": "<?php\nclass CreatedHeader extends InfoHeader {\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"CREATED header is deprecated.  Use the INFO header with the 'created' parameter instead.\",E_USER_DEPRECATED);\n\t\t\n\t\treturn parent::init($params, $report);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\treturn array(\n\t\t\t'created'=>$value\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/DatabaseHeader.php",
    "content": "<?php\nclass DatabaseHeader extends OptionsHeader {\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"DATABASE header is deprecated.  Use the OPTIONS header with the 'database' parameter instead. (\".$report->report.\")\",E_USER_DEPRECATED);\n\t\t\n\t\treturn parent::init($params, $report);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\treturn array(\n\t\t\t'database'=>trim($value)\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/DescriptionHeader.php",
    "content": "<?php\nclass DescriptionHeader extends InfoHeader {\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"DESCRIPTION header is deprecated.  Use the INFO header with the 'description' parameter instead.\",E_USER_DEPRECATED);\n\t\t\n\t\treturn parent::init($params, $report);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\treturn array(\n\t\t\t'description'=>$value\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/DetailHeader.php",
    "content": "<?php\nclass DetailHeader extends HeaderBase {\n\tstatic $validation = array(\n\t\t'report'=>array(\n\t\t\t'required'=>true,\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'column'=>array(\n\t\t\t'required'=>true,\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'macros'=>array(\n\t\t\t'type'=>'object'\n\t\t)\n\t);\n\t\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"DETAIL header is deprecated.  Use the FILTER header with the 'drilldown' filter instead.\",E_USER_DEPRECATED);\n\t\t\n\t\t$report->addFilter($params['column'],'drilldown',$params);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\t$parts = explode(',',$value,3);\n\t\t\n\t\tif(count($parts) < 2) {\n\t\t\tthrow new Exception(\"Cannot parse DETAIL header '$value'\");\n\t\t}\n\t\t\n\t\t$col = trim($parts[0]);\n\t\t$report_name = trim($parts[1]);\n\t\t\n\t\tif(isset($parts[2])) {\n\t\t\t$parts[2] = trim($parts[2]);\n\t\t\t$macros = array();\n\t\t\t$temp = explode(',',$parts[2]);\n\t\t\tforeach($temp as $macro) {\n\t\t\t\t$macro = trim($macro);\n\t\t\t\tif(strpos($macro,'=') !== false) {\n\t\t\t\t\tlist($key,$val) = explode('=',$macro,2);\n\t\t\t\t\t$key = trim($key);\n\t\t\t\t\t$val = trim($val);\n\t\t\t\t\t\n\t\t\t\t\tif(in_array($val[0],array('\"',\"'\"))) {\n\t\t\t\t\t\t$val = array(\n\t\t\t\t\t\t\t'constant'=>trim($val,'\\'\"')\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$val = array(\n\t\t\t\t\t\t\t'column'=>$val\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$macros[$key] = $val;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$macros[$macro] = $macro;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\t$macros = array();\n\t\t}\n\t\t\n\t\treturn array(\n\t\t\t'report'=>$report_name,\n\t\t\t'column'=>$col,\n\t\t\t'macros'=>$macros\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/MongodatabaseHeader.php",
    "content": "<?php\nclass MongodatabaseHeader extends OptionsHeader {\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"MONGODATABASE header is deprecated.  Use the OPTIONS header with the 'mongodatabase' parameter instead. (\".$report->report.\")\",E_USER_DEPRECATED);\n\t\t\n\t\treturn parent::init($params, $report);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\treturn array(\n\t\t\t'mongodatabase'=>$value\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/NameHeader.php",
    "content": "<?php\nclass NameHeader extends InfoHeader {\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"NAME header is deprecated.  Use the INFO header with the 'name' parameter instead.\",E_USER_DEPRECATED);\n\t\t\n\t\treturn parent::init($params, $report);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\t\t\n\t\treturn array(\n\t\t\t'name'=>$value\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/NoteHeader.php",
    "content": "<?php\nclass NoteHeader extends InfoHeader {\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"NOTE header is deprecated.  Use the INFO header with the 'note' parameter instead.\",E_USER_DEPRECATED);\n\t\t\n\t\treturn parent::init($params, $report);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\treturn array(\n\t\t\t'note'=>$value\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/OptionHeader.php",
    "content": "<?php\nclass OptionHeader extends OptionsHeader {\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"OPTION header is deprecated.  Use the OPTIONS header instead.\",E_USER_DEPRECATED);\n\t\t\n\t\treturn parent::init($params, $report);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/PlotHeader.php",
    "content": "<?php\n//This is for backwards compatibility\n//The Chart header used to be called Plot\nclass PlotHeader extends ChartHeader {\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"PLOT header is deprecated.  Use the CHART header instead.\",E_USER_DEPRECATED);\n\t\t\n\t\treturn parent::init($params, $report);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/StatusHeader.php",
    "content": "<?php\nclass StatusHeader extends InfoHeader {\t\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"STATUS header is deprecated.  Use the INFO header with the 'status' parameter instead.\",E_USER_DEPRECATED);\n\t\t\n\t\treturn parent::init($params, $report);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\treturn array(\n\t\t\t'status'=>$value\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/TotalHeader.php",
    "content": "<?php\nclass TotalHeader extends TotalsHeader {\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"TOTAL header is deprecated.  Use the ROLLUP header instead.\",E_USER_DEPRECATED);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/TotalsHeader.php",
    "content": "<?php\nclass TotalsHeader extends HeaderBase {\n\tstatic $validation = array(\n\t\t'value'=>array(\n\t\t\t'required'=>true,\n\t\t\t'type'=>'string'\n\t\t)\n\t);\n\t\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"TOTALS header is deprecated.  Use the ROLLUP header instead.\",E_USER_DEPRECATED);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\treturn array(\n\t\t\t'value'=>$value\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/TypeHeader.php",
    "content": "<?php\nclass TypeHeader extends InfoHeader {\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"TYPE header is deprecated.  Use the INFO header with the 'type' parameter instead.\",E_USER_DEPRECATED);\n\t\t\n\t\treturn parent::init($params, $report);\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\treturn array(\n\t\t\t'type'=>$value\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/headers/deprecated/ValueHeader.php",
    "content": "<?php\nclass ValueHeader extends HeaderBase {\n\tstatic $validation = array(\n\t\t'name'=>array(\n\t\t\t'required'=>true,\n\t\t\t'type'=>'string'\n\t\t),\n\t\t'value'=>array(\n\t\t\t'required'=>true\n\t\t)\n\t);\n\t\n\tpublic static function init($params, &$report) {\n\t\ttrigger_error(\"VALUE header is deprecated.  Use the VARIABLE header with a 'default' parameter instead.\",E_USER_DEPRECATED);\n\t\t\n\t\tif(isset($report->options['Variables'][$params['name']])) {\n\t\t\tif($report->macros[$params['name']]) return;\n\t\t\t\n\t\t\t$report->options['Variables'][$params['name']]['default'] = $params['value'];\n\t\t\t$report->macros[$params['name']] = $params['value'];\n\t\t\t\n\t\t\t$report->exportHeader('Value',$params);\n\t\t}\n\t\telse {\n\t\t\tthrow new Exception(\"Providing value for unknown variable $params[name]\");\n\t\t}\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\tif(strpos($value,',') === false) {\n\t\t\tthrow new Exception(\"Invalid value '$value'\");\n\t\t}\n\t\tlist($name,$value) = explode(',',$value);\n\t\t$var = trim($name);\n\t\t$default = trim($value);\n\t\t\n\t\treturn array(\n\t\t\t'name'=>$var,\n\t\t\t'value'=>$default\n\t\t);\n\t}\n}\n"
  },
  {
    "path": "classes/report_formats/ChartReportFormat.php",
    "content": "<?php\nclass ChartReportFormat extends ReportFormatBase {\n\tpublic static function display(&$report, &$request) {\n\t\tif(!$report->options['has_charts']) return;\n\t\t\n\t\t//always use cache for chart reports\n\t\t//$report->use_cache = true;\n\t\t\n\t\t$result = $report->renderReportPage('html/chart_report');\n\t\t\n\t\techo $result;\n\t}\n}\n"
  },
  {
    "path": "classes/report_formats/CsvReportFormat.php",
    "content": "<?php\nclass CsvReportFormat extends ReportFormatBase {\n\tpublic static function display(&$report, &$request) {\n\t\t//always use cache for CSV reports\n\t\t$report->use_cache = true;\n\t\t\n\t\t$file_name = preg_replace(array('/[\\s]+/','/[^0-9a-zA-Z\\-_\\.]/'),array('_',''),$report->options['Name']);\n\t\t\n\t\theader(\"Content-type: application/csv\");\n\t\theader(\"Content-Disposition: attachment; filename=\".$file_name.\".csv\");\n\t\theader(\"Pragma: no-cache\");\n\t\theader(\"Expires: 0\");\n\t\t\n\t\t$i=0;\n\t\tif(isset($_GET['dataset'])) $i = $_GET['dataset'];\n\t\telseif(isset($report->options['default_dataset'])) $i = $report->options['default_dataset'];\n\t\t$i = intval($i);\n\t\t\n\t\t$data = $report->renderReportPage('csv/report',array(\n\t\t\t'dataset'=>$i\n\t\t));\n\t\t\n\t\tif(trim($data)) echo $data;\n\t}\n}\n"
  },
  {
    "path": "classes/report_formats/DebugReportFormat.php",
    "content": "<?php\nclass DebugReportFormat extends ReportFormatBase {\n\tpublic static function display(&$report, &$request) {\n\t\theader(\"Content-type: text/plain\");\n\t\theader(\"Pragma: no-cache\");\n\t\theader(\"Expires: 0\");\n\t\t\n\t\t$content = \"****************** Raw Report File ******************\\n\\n\".$report->getRaw().\"\\n\\n\\n\";\n\t\t$content .= \"****************** Macros ******************\\n\\n\".print_r($report->macros,true).\"\\n\\n\\n\";\n\t\t$content .= \"****************** All Report Options ******************\\n\\n\".print_r($report->options,true).\"\\n\\n\\n\";\n\t\t\n\t\tif($report->is_ready) {\n\t\t\t$report->run();\n\t\t\n\t\t\t$content .= \"****************** Generated Query ******************\\n\\n\".print_r($report->options['Query'],true).\"\\n\\n\\n\";\n\t\t\t\n\t\t\t$content .= \"****************** Report Rows ******************\\n\\n\".print_r($report->options['DataSets'],true).\"\\n\\n\\n\";\n\t\t}\n\t\t\n\t\techo $content;\n\t}\n}\n"
  },
  {
    "path": "classes/report_formats/HtmlReportFormat.php",
    "content": "<?php\nclass HtmlReportFormat extends ReportFormatBase {\n\tpublic static function display(&$report, &$request) {\n\t\t\n\t\t//determine if this is an asyncronous report or not\t\t\n\t\t$report->async = !isset($request->query['content_only']);\n\t\tif(isset($request->query['no_async'])) $report->async = false;\n\t\t\n\t\t//if we're only getting the report content\n\t\tif(isset($request->query['content_only'])) {\n\t\t\t$template = 'html/content_only';\n\t\t}\n\t\telse {\n\t\t\t$template = 'html/report';\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$additional_vars = array();\n\t\t\tif(isset($request->query['no_charts'])) $additional_vars['no_charts'] = true;\n\t\t\t\n\t\t\t$html = $report->renderReportPage($template,$additional_vars);\n\t\t\techo $html;\n\t\t}\n\t\tcatch(Exception $e) {\t\t\t\n\t\t\tif(isset($request->query['content_only'])) {\n\t\t\t\t$template = 'html/blank_page';\n\t\t\t}\n\t\t\t\n\t\t\t$vars = array(\n\t\t\t\t'title'=>$report->report,\n\t\t\t\t'header'=>'<h2>There was an error running your report</h2>',\n\t\t\t\t'error'=>$e->getMessage(),\n\t\t\t\t'content'=>\"<h2>Report Query</h2>\".$report->options['Query_Formatted'],\n\t\t\t);\n\t\t\t\n\t\t\techo PhpReports::render($template, $vars);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "classes/report_formats/JsonReportFormat.php",
    "content": "<?php\nclass JsonReportFormat extends ReportFormatBase {\n\tpublic static function display(&$report, &$request) {\t\t\n\t\theader(\"Content-type: application/json\");\n\t\theader(\"Pragma: no-cache\");\n\t\theader(\"Expires: 0\");\n\t\t\n\t\t//run the report\n\t\t$report->run();\n\t\t\n\t\tif(!$report->options['DataSets']) return;\n\n\t\t$result = array();\n\t\tif(isset($_GET['datasets'])) {\n\t\t\t$datasets = $_GET['datasets'];\n\t\t\t// If all the datasets should be included\n\t\t\tif($datasets === 'all') {\n\t\t\t\t$datasets = array_keys($report->options['DataSets']);\n\t\t\t}\n\t\t\t// If just a single dataset was specified, make it an array\n\t\t\telse if(!is_array($datasets)) {\n\t\t\t\t$datasets = explode(',',$datasets);\n\t\t\t}\n\t\t\t\n\t\t\tforeach($datasets as $i) {\n\t\t\t\t$result[] = self::getDataSet($i, $report);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$i=0;\n\t\t\tif(isset($_GET['dataset'])) $i = $_GET['dataset'];\n\t\t\telseif(isset($report->options['default_dataset'])) $i = $report->options['default_dataset'];\n\t\t\t$i = intval($i);\n\t\t\t\n\t\t\t$dataset = self::getDataSet($i, $report);\n\t\t\t$result = $dataset['rows'];\n\t\t}\n\n\t\tif(defined('JSON_PRETTY_PRINT')) {\n\t\t\techo json_encode($result,JSON_PRETTY_PRINT);\n\t\t}\n\t\telse {\n\t\t\techo json_encode($result);\n\t\t}\n\t}\n\t\n\tpublic static function getDataSet($i, &$report) {\n\t\t$dataset = array();\n\t\tforeach($report->options['DataSets'][$i] as $k=>$v) {\n\t\t\t$dataset[$k] = $v;\n\t\t}\n\n\t\t$rows = array();\n\t\tforeach($dataset['rows'] as $i=>$row) {\n\t\t\t$tmp = array();\n\t\t\tforeach($row['values'] as $key=>$value){\n\t\t\t\t$tmp[$value->key] = $value->getValue();\n\t\t\t}\n\t\t\t$rows[] = $tmp;\n\t\t}\n\t\t$dataset['rows'] = $rows;\n\n\t\treturn $dataset;\n\t}\n}\n"
  },
  {
    "path": "classes/report_formats/RawReportFormat.php",
    "content": "<?php\nclass RawReportFormat extends ReportFormatBase {\n\tpublic static function display(&$report, &$request) {\t\t\n\t\theader(\"Content-type: text/plain\");\n\t\theader(\"Pragma: no-cache\");\n\t\theader(\"Expires: 0\");\n\t\t\n\t\techo $report;\n\t}\n\t\n\t//no need to instantiate a report object, just return the source\n\tpublic static function prepareReport($report) {\n\t\t$contents = Report::getReportFileContents($report);\n\t\t\n\t\treturn $contents;\n\t}\n}\n"
  },
  {
    "path": "classes/report_formats/SqlReportFormat.php",
    "content": "<?php\nclass SqlReportFormat extends ReportFormatBase {\n\tpublic static function display(&$report, &$request) {\n\t\theader(\"Content-type: text/plain\");\n\t\theader(\"Pragma: no-cache\");\n\t\theader(\"Expires: 0\");\n\t\t\n\t\techo $report->renderReportPage('sql/report');\n\t}\n}\n"
  },
  {
    "path": "classes/report_formats/TableReportFormat.php",
    "content": "<?php\nclass TableReportFormat extends ReportFormatBase {\n\tpublic static function display(&$report, &$request) {\n\t\t\n\t\t$report->options['inline_email'] = true;\n\t\t$report->use_cache = true;\n\t\t\n\t\ttry {\n\t\t\t$html = $report->renderReportPage('html/table');\n\t\t\techo $html;\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\t\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "classes/report_formats/TextReportFormat.php",
    "content": "<?php\nclass TextReportFormat extends ReportFormatBase {\n\tpublic static function display(&$report, &$request) {\n\t\theader(\"Content-type: text/plain\");\n\t\theader(\"Pragma: no-cache\");\n\t\theader(\"Expires: 0\");\n\t\t\n\t\t$report->use_cache = true;\n\t\t\n\t\t//run the report\n\t\t$report->run();\n\t\t\n        if(!$report->options['DataSets']) return;\n        \n        foreach($report->options['DataSets'] as $i=>$dataset) {\n\t\t\tif(isset($dataset['title'])) echo $dataset['title'].\"\\n\";\n\t\t\tTextReportFormat::displayDataSet($dataset);\n\t\t\t\n\t\t\t// If this isn't the last dataset, add some spacing\n\t\t\tif($i < count($report->options['DataSets'])-1) {\n\t\t\t\techo \"\\n\\n\";\n\t\t\t}\n\t\t}\n    }\n    \n    protected static function displayDataSet($dataset) {\n\t\t/**\n\t\t * This code taken from Stack Overflow answer by ehudokai\n\t\t * http://stackoverflow.com/a/4597190\n\t\t */\n\n\t\t//first get your sizes\n\t\t$sizes = array();\n\t\t$first_row = $dataset['rows'][0];\n\t\tforeach($first_row['values'] as $key=>$value){\n\t\t\t$key = $value->key;\n\t\t\t$value = $value->getValue();\n\t\t\t\n\t\t\t//initialize to the size of the column name\n\t\t\t$sizes[$key] = strlen($key);\n\t\t}\n\t\tforeach($dataset['rows'] as $row) {\n\t\t\tforeach($row['values'] as $key=>$value){\n\t\t\t\t$key = $value->key;\n\t\t\t\t$value = $value->getValue();\n\t\t\t\t\n\t\t\t\t$length = strlen($value);\n\t\t\t\tif($length > $sizes[$key]) $sizes[$key] = $length; // get largest result size\n\t\t\t}\n\t\t}\n\n\t\t//top of output\n\t\tforeach($sizes as $length){\n\t\t\techo \"+\".str_pad(\"\",$length+2,\"-\");\n\t\t}\n\t\techo \"+\\n\";\n\n\t\t// column names\n\t\tforeach($first_row['values'] as $key=>$value){\n\t\t\t$key = $value->key;\n\t\t\t$value = $value->getValue();\n\t\t\t\n\t\t\techo \"| \";\n\t\t\techo str_pad($key,$sizes[$key]+1);\n\t\t}\n\t\techo \"|\\n\";\n\n\t\t//line under column names\n\t\tforeach($sizes as $length){\n\t\t\techo \"+\".str_pad(\"\",$length+2,\"-\");\n\t\t}\n\t\techo \"+\\n\";\n\n\t\t//output data\n\t\tforeach($dataset['rows'] as $row) {\n\t\t\tforeach($row['values'] as $key=>$value){\n\t\t\t\t$key = $value->key;\n\t\t\t\t$value = $value->getValue();\n\t\t\t\t\n\t\t\t\techo \"| \";\n\t\t\t\techo str_pad($value,$sizes[$key]+1);\n\t\t\t}\n\t\t\techo \"|\\n\";\n\t\t}\n\n\t\t//bottom of output\n\t\tforeach($sizes as $length){\n\t\t\techo \"+\".str_pad(\"\",$length+2,\"-\");\n\t\t}\n\t\techo \"+\\n\";\n\t}\n}\n"
  },
  {
    "path": "classes/report_formats/XlsReportBase.php",
    "content": "<?php\r\nabstract class XlsReportBase extends ReportFormatBase {\r\n\tprivate static function columnLetter($c){\r\n\t\t$c = intval($c);\r\n\t\tif ($c <= 0) return '';\r\n\t\t$letter = '';\r\n\t\t\r\n\t\twhile($c != 0){\r\n\t\t\t$p = ($c - 1) % 26;\r\n\t\t\t$c = intval(($c - $p) / 26);\r\n\t\t\t$letter = chr(65 + $p) . $letter;\r\n\t\t}\r\n\r\n\t\treturn $letter;\r\n\t}\r\n\t\r\n\tpublic static function getExcelRepresantation(&$report) {\r\n\t\t// Create new PHPExcel object\r\n\t\t$objPHPExcel = new PHPExcel();\r\n\r\n\t\t// Set document properties\r\n\t\t$objPHPExcel->getProperties()->setCreator(\"PHP-Reports\")\r\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy(\"PHP-Reports\")\r\n\t\t\t\t\t\t\t\t\t ->setTitle(\"\")\r\n\t\t\t\t\t\t\t\t\t ->setSubject(\"\")\r\n\t\t\t\t\t\t\t\t\t ->setDescription(\"\");\r\n\r\n\t\t$i = 0;\r\n\t\tforeach($report->options['DataSets'] as $dataset) {\r\n\t\t\t$objPHPExcel->createSheet($i);\r\n\t\t\tself::addSheet($objPHPExcel,$dataset,$i);\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t\r\n\t\t// Set the active sheet to the first one\r\n\t\t$objPHPExcel->setActiveSheetIndex(0);\r\n\t\t\r\n\t\treturn $objPHPExcel;\r\n\t}\r\n\tpublic static function addSheet($objPHPExcel,$dataset, $i) {\r\n\t\t$rows = array();\r\n\t\t$row = array();\r\n\t\t$cols = 0;\r\n\t\t$first_row = $dataset['rows'][0];\r\n\t\tforeach($first_row['values'] as $key=>$value){\r\n\t\t\tarray_push($row, $value->key);\r\n\t\t\t$cols++;\r\n\t\t}\r\n\t\tarray_push($rows, $row);\r\n\t\t$row = array();\r\n\r\n\t\tforeach($dataset['rows'] as $r) {\r\n\t\t\tforeach($r['values'] as $key=>$value){\r\n\t\t\t\tarray_push($row, $value->getValue());\r\n\t\t\t}\r\n\t\t\tarray_push($rows, $row);\r\n\t\t\t$row = array();\r\n\t\t}\r\n\r\n\t\t$objPHPExcel->setActiveSheetIndex($i)->fromArray($rows, NULL, 'A1');\r\n\t\t$objPHPExcel->getActiveSheet()->setAutoFilter('A1:'.self::columnLetter($cols).count($rows));\r\n\t\tfor ($a = 1; $a <= $cols; $a++) {\r\n\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension(self::columnLetter($a))->setAutoSize(true);\r\n\t\t}\r\n\r\n\t\tif(isset($dataset['title'])) {\r\n\t\t\t// Some characters are not allowed in Excel sheet titles\r\n\t\t\t$title = preg_replace('#[\\\\/*[\\]:?]#','',$dataset['title']);\r\n\r\n\t\t\t// Max title length is 31 characters\r\n\t\t\t$title = substr($title, 0, 31);\r\n\r\n\t\t\t$objPHPExcel->getActiveSheet()->setTitle($title);\r\n\t\t}\r\n\r\n\t\treturn $objPHPExcel;\r\n\t}\r\n}\r\n"
  },
  {
    "path": "classes/report_formats/XlsReportFormat.php",
    "content": "<?php\nclass XlsReportFormat extends XlsReportBase {\n\tpublic static function display(&$report, &$request) {\n\t\t// First let set up some headers\n\t\t$file_name = preg_replace(array('/[\\s]+/','/[^0-9a-zA-Z\\-_\\.]/'),array('_',''),$report->options['Name']);\n\n\t\t//always use cache for Excel reports\n\t\t$report->use_cache = true;\n\n\t\t//run the report\n\t\t$report->run();\n\n\t\tif(!$report->options['DataSets']) return;\n\n\t\t$objPHPExcel = parent::getExcelRepresantation($report);\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n\t\t\n\t\theader('Content-Type: application/vnd.ms-excel');\n\t\theader('Content-Disposition: attachment;filename=\"'.$file_name.'.xls\"');\n\t\theader('Pragma: no-cache');\n\t\theader('Expires: 0');\n\t\t\n\t\t$objWriter->save('php://output');\n\t}\n}\n"
  },
  {
    "path": "classes/report_formats/XlsxReportFormat.php",
    "content": "<?php\nclass XlsxReportFormat extends XlsReportBase {\n\tpublic static function display(&$report, &$request) {\n\t\t// First let set up some headers\n\t\t$file_name = preg_replace(array('/[\\s]+/','/[^0-9a-zA-Z\\-_\\.]/'),array('_',''),$report->options['Name']);\n\n\t\t//always use cache for Excel reports\n\t\t$report->use_cache = true;\n\n\t\t//run the report\n\t\t$report->run();\n\n\t\tif(!$report->options['DataSets']) return;\n\n\t\t$objPHPExcel = parent::getExcelRepresantation($report);\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"'.$file_name.'.xlsx\"');\n\t\theader('Pragma: no-cache');\n\t\theader('Expires: 0');\n\t\t\n\t\t$objWriter->save('php://output');\n\t}\n}\n"
  },
  {
    "path": "classes/report_formats/XmlReportFormat.php",
    "content": "<?php\nclass XmlReportFormat extends ReportFormatBase {\n\tpublic static function display(&$report, &$request) {\n\t\theader(\"Content-type: application/xml\");\n\t\theader(\"Pragma: no-cache\");\n\t\theader(\"Expires: 0\");\n\n\t\t$datasets = array();\n\t\t$dataset_format = false;\n\t\t\n\t\tif(isset($_GET['datasets'])) {\n\t\t\t$dataset_format = true;\n\t\t\t$datasets = $_GET['datasets'];\n\t\t\t// If all the datasets should be included\n\t\t\tif($datasets === 'all') {\n\t\t\t\t$datasets = array_keys($report->options['DataSets']);\n\t\t\t}\n\t\t\t// If just a single dataset was specified, make it an array\n\t\t\telse if(!is_array($datasets)) {\n\t\t\t\t$datasets = explode(',',$datasets);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$i=0;\n\t\t\tif(isset($_GET['dataset'])) $i = $_GET['dataset'];\n\t\t\telseif(isset($report->options['default_dataset'])) $i = $report->options['default_dataset'];\n\t\t\t$i = intval($i);\n\t\t\t\n\t\t\t$datasets = array($i);\n\t\t}\n\n\t\techo $report->renderReportPage('xml/report',array(\n\t\t\t'datasets'=>$datasets,\n\t\t\t'dataset_format'=>$dataset_format\n\t\t));\n\t}\n}\n"
  },
  {
    "path": "classes/report_types/AdoPivotReportType.php",
    "content": "<?php\nclass AdoPivotReportType extends ReportTypeBase {\n\tpublic static function init(&$report) {\n\t\t$environments = PhpReports::$config['environments'];\n\t\t\n\t\tif(!isset($environments[$report->options['Environment']][$report->options['Database']])) {\n\t\t\tthrow new Exception(\"No \".$report->options['Database'].\" database defined for environment '\".$report->options['Environment'].\"'\");\n\t\t}\n\n\t\t//make sure the syntax highlighting is using the proper class\n\t\tSqlFormatter::$pre_attributes = \"class='prettyprint linenums lang-sql'\";\n\n        //set a formatted query here for debugging.  It will be overwritten below after macros are substituted.\n        $report->options['Query_Formatted'] = \"<pre class='prettyprint linenums lang-yaml'>\".$report->raw_query.\"</pre>\";\n\n        $object = spyc_load($report->raw_query);\n\n        $report->raw_query = array();\n\t\t//if there are any included reports, add the report sql to the top\n\t\tif(isset($report->options['Includes'])) {\n\t\t\t$included_sql = '';\n\t\t\tforeach($report->options['Includes'] as &$included_report) {\n\t\t\t\t$included_sql .= trim($included_report->raw_query).\"\\n\";\n\t\t\t}\n            if (strlen($included_sql) > 0) {\n\t\t\t    $report->raw_query[] = $included_sql;\n            }\n\t\t}\n\n        $report->raw_query[] = $object;\n\t}\n\t\n\tpublic static function openConnection(&$report) {\n\t\tif(isset($report->conn)) return;\n\t\t\n\t\t$environments = PhpReports::$config['environments'];\n\t\t$config = $environments[$report->options['Environment']][$report->options['Database']];\n\t\t\n\t\tif(!($report->conn = ADONewConnection($config['uri']))) {\n\t\t\tthrow new Exception('Could not connect to the database');\n\t\t}\n\t}\n\t\n\tpublic static function closeConnection(&$report) {\n\t\tif (!isset($report->conn)) return;\n\t\tif ($report->conn->IsConnected()) {\n\t\t\t$report->conn->Close();\n\t\t}\n\t\tunset($report->conn);\n\t}\n\t\n\tpublic static function getVariableOptions($params, &$report) {\n        $report->conn->SetFetchMode(ADODB_FETCH_NUM);\n        $query = 'SELECT DISTINCT '.$params['column'].' FROM '.$params['table'];\n\t\t\n\t\tif(isset($params['where'])) {\n\t\t\t$query .= ' WHERE '.$params['where'];\n\t\t}\n\n        $macros = $report->macros;\n        foreach($macros as $key=>$value) {\n            if(is_array($value)) {\n                foreach($value as $key2=>$value2) {\n                    $value[$key2] = mysql_real_escape_string(trim($value2));\n                }\n                $macros[$key] = $value;\n            }\n            else {\n                $macros[$key] = mysql_real_escape_string($value);\n            }\n\n            if($value === 'ALL') $macros[$key.'_all'] = true;\n        }\n\n        //add the config and environment settings as macros\n        $macros['config'] = PhpReports::$config;\n        $macros['environment'] = PhpReports::$config['environments'][$report->options['Environment']];\n\n\t\t$result = $report->conn->Execute(PhpReports::renderString($query, $macros));\n\t\t\n\t\tif (!$result) {\n\t\t\tthrow new Exception(\"Unable to get variable options: \".$report->conn->ErrorMsg());\n\t\t}\n\n\t\t$options = array();\n\t\t\n\t\tif(isset($params['all']) && $params['all']) {\n            $options[] = 'ALL';\n        }\n\n        while ($row = $result->FetchRow()) {\n            if ($result->FieldCount() > 1) {\n                $options[] = array('display'=>$row[0], 'value'=>$row[1]);\n            } else {\n                $options[] = $row[0];\n            }\n        }\n\n        return $options;\n\t}\n\t\n\tpublic static function run(&$report) {\n        $report->conn->SetFetchMode(ADODB_FETCH_ASSOC);\n        $rows = array();\n\n\t\t$macros = $report->macros;\n\t\tforeach($macros as $key=>$value) {\n\t\t\tif(is_array($value)) {\n\t\t\t\t$first = true;\n\t\t\t\tforeach($value as $key2=>$value2) {\n\t\t\t\t\t$value[$key2] = mysql_real_escape_string(trim($value2));\n\t\t\t\t\t$first = false;\n\t\t\t\t}\n\t\t\t\t$macros[$key] = $value;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$macros[$key] = mysql_real_escape_string($value);\n\t\t\t}\n\t\t\t\n\t\t\tif($value === 'ALL') $macros[$key.'_all'] = true;\n\t\t}\n\t\t\n\t\t//add the config and environment settings as macros\n\t\t$macros['config'] = PhpReports::$config;\n\t\t$macros['environment'] = PhpReports::$config['environments'][$report->options['Environment']];\n\n        $raw_sql = \"\";\n        foreach ($report->raw_query as $qry) {\n            if (is_array($qry)) {\n                foreach ($qry as $key=>$value) {\n                    // TODO handle arrays better\n                    if (!is_bool($value) && !is_array($value)) {\n                        $qry[$key] = PhpReports::renderString($value, $macros);\n                    }\n                }\n                //TODO This sux - need a class or something :-)\n                $raw_sql .= PivotTableSQL($report->conn, $qry['tables'], $qry['rows'], $qry['columns'], $qry['where'], $qry['orderBy'], $qry['limit'], $qry['agg_field'], $qry['agg_label'], $qry['agg_fun'], $qry['include_agg_field'], $qry['show_count']);\n            } else {\n                $raw_sql .= $qry;\n            }\n        }\n\n        //expand macros in query\n        $sql = PhpReports::render($raw_sql, $macros);\n\n        $report->options['Query'] = $sql;\n\n        $report->options['Query_Formatted'] = SqlFormatter::format($sql);\n\n        //split into individual queries and run each one, saving the last result\n        $queries = SqlFormatter::splitQuery($sql);\n\n        foreach($queries as $query) {\n            if (!is_array($query)) {\n                //skip empty queries\n                $query = trim($query);\n                if(!$query) continue;\n\n                $result = $report->conn->Execute($query);\n                if(!$result) {\n                    throw new Exception(\"Query failed: \".$report->conn->ErrorMsg());\n                }\n\n                //if this query had an assert=empty flag and returned results, throw error\n                if(preg_match('/^--[\\s+]assert[\\s]*=[\\s]*empty[\\s]*\\n/',$query)) {\n                    if($result->GetAssoc()) {\n                        throw new Exception(\"Assert failed.  Query did not return empty results.\");\n                    }\n                }\n            }\n        }\n\n        return $result->GetArray();\n\t}\n}\n"
  },
  {
    "path": "classes/report_types/AdoReportType.php",
    "content": "<?php\nclass AdoReportType extends ReportTypeBase {\n\tpublic static function init(&$report) {\n\t\t$environments = PhpReports::$config['environments'];\n\t\t\n\t\tif(!isset($environments[$report->options['Environment']][$report->options['Database']])) {\n\t\t\tthrow new Exception(\"No \".$report->options['Database'].\" database defined for environment '\".$report->options['Environment'].\"'\");\n\t\t}\n\n\t\t//make sure the syntax highlighting is using the proper class\n\t\tSqlFormatter::$pre_attributes = \"class='prettyprint linenums lang-sql'\";\n\t\t\n\t\t//default host macro to mysql's host if it isn't defined elsewhere\n\t\t//if(!isset($report->macros['host'])) $report->macros['host'] = $mysql['host'];\n\t\t\n\t\t//replace legacy shorthand macro format\n\t\tforeach($report->macros as $key=>$value) {\n\t\t\t$params = array();\n\t\t\tif(isset($report->options['Variables'][$key])) {\n\t\t\t\t$params = $report->options['Variables'][$key];\n\t\t\t}\n\n\t\t\t//macros shortcuts for arrays\n\t\t\tif(isset($params['multiple']) && $params['multiple']) {\n\t\t\t\t//allow {macro} instead of {% for item in macro %}{% if not item.first %},{% endif %}{{ item.value }}{% endfor %}\n\t\t\t\t//this is shorthand for comma separated list\n\t\t\t\t$report->raw_query = preg_replace('/([^\\{])\\{'.$key.'\\}([^\\}])/','$1{% for item in '.$key.' %}{% if not loop.first %},{% endif %}\\'{{ item }}\\'{% endfor %}$2',$report->raw_query);\n\t\t\t\n\t\t\t\t//allow {(macro)} instead of {% for item in macro %}{% if not item.first %},{% endif %}{{ item.value }}{% endfor %}\n\t\t\t\t//this is shorthand for quoted, comma separated list\n\t\t\t\t$report->raw_query = preg_replace('/([^\\{])\\{\\('.$key.'\\)\\}([^\\}])/','$1{% for item in '.$key.' %}{% if not loop.first %},{% endif %}(\\'{{ item }}\\'){% endfor %}$2',$report->raw_query);\n\t\t\t}\n\t\t\t//macros sortcuts for non-arrays\n\t\t\telse {\n\t\t\t\t//allow {macro} instead of {{macro}} for legacy support\n\t\t\t\t$report->raw_query = preg_replace('/([^\\{])(\\{'.$key.'+\\})([^\\}])/','$1{$2}$3',$report->raw_query);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//if there are any included reports, add the report sql to the top\n\t\tif(isset($report->options['Includes'])) {\n\t\t\t$included_sql = '';\n\t\t\tforeach($report->options['Includes'] as &$included_report) {\n\t\t\t\t$included_sql .= trim($included_report->raw_query).\"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t$report->raw_query = $included_sql . $report->raw_query;\n\t\t}\n\t\t\n\t\t//set a formatted query here for debugging.  It will be overwritten below after macros are substituted.\n\t\t$report->options['Query_Formatted'] = SqlFormatter::format($report->raw_query);\n\t}\n\t\n\tpublic static function openConnection(&$report) {\n\t\tif(isset($report->conn)) return;\n\t\t\n\t\t$environments = PhpReports::$config['environments'];\n\t\t$config = $environments[$report->options['Environment']][$report->options['Database']];\n\t\t\n\t\tif(!($report->conn = ADONewConnection($config['uri']))) {\n\t\t\tthrow new Exception('Could not connect to the database');\n\t\t}\n\t}\n\t\n\tpublic static function closeConnection(&$report) {\n\t\tif (!isset($report->conn)) return;\n\t\tif ($report->conn->IsConnected()) {\n\t\t\t$report->conn->Close();\n\t\t}\n\t\tunset($report->conn);\n\t}\n\t\n\tpublic static function getVariableOptions($params, &$report) {\n        $report->conn->SetFetchMode(ADODB_FETCH_NUM);\n        $query = 'SELECT DISTINCT '.$params['column'].' FROM '.$params['table'];\n\t\t\n\t\tif(isset($params['where'])) {\n\t\t\t$query .= ' WHERE '.$params['where'];\n\t\t}\n\t\t\n\t\t$result = $report->conn->Execute($query);\n\t\t\n\t\tif (!$result) {\n\t\t\tthrow new Exception(\"Unable to get variable options: \".$report->conn->ErrorMsg());\n\t\t}\n\n\t\t$options = array();\n\t\t\n\t\tif(isset($params['all']) && $params['all']) {\n            $options[] = 'ALL';\n        }\n\n        while ($row = $result->FetchRow()) {\n            if ($result->FieldCount() > 1) {\n                $options[] = array('display'=>$row[0], 'value'=>$row[1]);\n            } else {\n                $options[] = $row[0];\n            }\n        }\n\n        return $options;\n\t}\n\t\n\tpublic static function run(&$report) {\n        $report->conn->SetFetchMode(ADODB_FETCH_ASSOC);\n        $rows = array();\n\t\t\n\t\t$macros = $report->macros;\n\t\tforeach($macros as $key=>$value) {\n\t\t\tif(is_array($value)) {\n\t\t\t\t$first = true;\n\t\t\t\tforeach($value as $key2=>$value2) {\n\t\t\t\t\t$value[$key2] = mysql_real_escape_string(trim($value2));\n\t\t\t\t\t$first = false;\n\t\t\t\t}\n\t\t\t\t$macros[$key] = $value;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$macros[$key] = mysql_real_escape_string($value);\n\t\t\t}\n\t\t\t\n\t\t\tif($value === 'ALL') $macros[$key.'_all'] = true;\n\t\t}\n\t\t\n\t\t//add the config and environment settings as macros\n\t\t$macros['config'] = PhpReports::$config;\n\t\t$macros['environment'] = PhpReports::$config['environments'][$report->options['Environment']];\n\t\t\n\t\t//expand macros in query\n\t\t$sql = PhpReports::render($report->raw_query,$macros);\n\t\t\n\t\t$report->options['Query'] = $sql;\n\n\t\t$report->options['Query_Formatted'] = SqlFormatter::format($sql);\n\t\t\n\t\t//split into individual queries and run each one, saving the last result\n\t\t$queries = SqlFormatter::splitQuery($sql);\n\t\t\n\t\tforeach($queries as $query) {\n\t\t\t//skip empty queries\n\t\t\t$query = trim($query);\n\t\t\tif(!$query) continue;\n\t\t\t\n\t\t\t$result = $report->conn->Execute($query);\n\t\t\tif(!$result) {\n\t\t\t\tthrow new Exception(\"Query failed: \".$report->conn->ErrorMsg());\n\t\t\t}\n\t\t\t\n\t\t\t//if this query had an assert=empty flag and returned results, throw error\n\t\t\tif(preg_match('/^--[\\s+]assert[\\s]*=[\\s]*empty[\\s]*\\n/',$query)) {\n\t\t\t\tif($result->GetAssoc()) {\n\t\t\t\t\tthrow new Exception(\"Assert failed.  Query did not return empty results.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result->GetArray();\n\t}\n}"
  },
  {
    "path": "classes/report_types/MongoReportType.php",
    "content": "<?php\nclass MongoReportType extends ReportTypeBase {\n\tpublic static function init(&$report) {\n\t\t$environments = PhpReports::$config['environments'];\n\t\t\n\t\tif(!isset($environments[$report->options['Environment']][$report->options['Database']])) {\n\t\t\tthrow new Exception(\"No \".$report->options['Database'].\" database defined for environment '\".$report->options['Environment'].\"'\");\n\t\t}\n\t\t\n\t\t$mongo = $environments[$report->options['Environment']][$report->options['Database']];\n\t\t\n\t\t//default host macro to mysql's host if it isn't defined elsewhere\n\t\tif(!isset($report->macros['host']) && isset($mongo['host'])) $report->macros['host'] = $mongo['host'];\n\t\t\n\t\t//if there are any included reports, add it to the top of the raw query\n\t\tif(isset($report->options['Includes'])) {\n\t\t\t$included_code = '';\n\t\t\tforeach($report->options['Includes'] as &$included_report) {\n\t\t\t\t$included_code .= trim($included_report->raw_query).\"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t$report->raw_query = $included_code . $report->raw_query;\n\t\t}\n\t}\n\t\n\tpublic static function openConnection(&$report) {\n\t\t\n\t}\n\t\n\tpublic static function closeConnection(&$report) {\n\t\t\n\t}\n\t\n\tpublic static function run(&$report) {\t\t\n\t\t$eval = '';\n\t\tforeach($report->macros as $key=>$value) {\n\t\t\tif(is_array($value)) {\n\t\t\t\t$value = json_encode($value);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$value = '\"'.addslashes($value).'\"';\n\t\t\t}\n\t\t\t\n\t\t\t$eval .= 'var '.$key.' = '.$value.';'.\"\\n\";\n\t\t}\n\t\t$eval .= $report->raw_query;\n\n\t\t$environments = PhpReports::$config['environments'];\n\t\t$config = $environments[$report->options['Environment']][$report->options['Database']];\n\t\t\n\t\t$mongo_database = isset($report->options['Mongodatabase'])? $report->options['Mongodatabase'] : '';\n\n\t\t// Get connection string\n        $connectionString = '';\n        if(isset($config['dsn'])) {\n            // Replace any existing mongo database name with the one for the report\n            $connectionString = preg_replace(\n                '/(mongodb[a-zA-Z+]*:\\/\\/)?([^\\/?]+)(\\/[^\\.,:?]*)?($|\\?)/',\n                '$1$2/'.$mongo_database.'$4',\n                $config['dsn'],\n                1\n            );\n        }\n        elseif(isset($config['host'])) {\n            $connectionString = $config['host'].':'.(isset($config['port'])?$config['port']:27017).'/'.$mongo_database;\n        }\n\n        //command without eval string\n\t\t$command = 'mongo '.escapeshellarg($connectionString).' --quiet --eval ';\n\n        // Remove password from command for debug info\n        $commandSanitized = preg_replace('/\\/\\/([^@:]+)(:[^:@]+)@/','//$1:*******@',$command);\n\n\t\t//easy to read formatted query\n\t\t$report->options['Query_Formatted'] = '<div>\n\t\t\t<pre style=\"background-color: black; color: white; padding: 10px 5px;\">$ '.$commandSanitized.'\"...\"</pre>'.\n\t\t\t'Eval String:'.\n\t\t\t'<pre class=\"prettyprint linenums lang-js\">'.htmlentities($eval).'</pre>\n\t\t</div>';\n\n\t\t//escape the eval string and add it to the command\n\t\t$command .= escapeshellarg($eval);\n\t\t$report->options['Query'] = '$ '.$commandSanitized.escapeshellarg($eval);\n\n        $process = proc_open($command, [\n            0 => [\"pipe\",\"r\"],\n            1 => [\"pipe\",\"w\"],\n            2 => [\"pipe\",\"w\"]\n        ], $pipes);\n\n        $result = trim(stream_get_contents($pipes[1]));\n        fclose($pipes[1]);\n\n        $err = stream_get_contents($pipes[2]);\n        fclose($pipes[2]);\n\n        $exitCode = proc_close($process);\n\n        // Annoying bug in MongoDB causes some debug messages to be output to stdout and also ignore \"--quiet\"\n        // Filter out anything that matches the debug pattern and move to $err\n        $debugInfoRegex = '/^[0-9]{4}-[0-9]{2}-[0-9]{2}T.*/m';\n        if(preg_match_all($debugInfoRegex, $result, $matches)) {\n            $result = trim(preg_replace($debugInfoRegex, '', $result));\n            $err .= \"\\n\".implode(\"\\n\",$matches[0]);\n        }\n\n        if($exitCode > 0) {\n            throw new Exception('Exit code: '.$exitCode.\"\\n\\n\".$result.\"\\n\".$err);\n        }\n\t\t\n\t\t$json = json_decode($result, true);\n\t\tif($json === NULL) throw new Exception('Exit code: '.$exitCode.\"\\n\\n\".$result.\"\\n\".$err);\n\t\t\n\t\treturn $json;\n\t}\n}\n"
  },
  {
    "path": "classes/report_types/MysqlReportType.php",
    "content": "<?php\nclass MysqlReportType extends PdoReportType {\n\tpublic static $default_driver = 'mysql';\n}\n"
  },
  {
    "path": "classes/report_types/PdoReportType.php",
    "content": "<?php\nclass PdoReportType extends ReportTypeBase {\n\tpublic static $default_driver = null;\n\n\tpublic static function init(&$report) {\n\t\t$environments = PhpReports::$config['environments'];\n\n\t\tif(!isset($environments[$report->options['Environment']][$report->options['Database']])) {\n\t\t\tthrow new Exception(\"No \".$report->options['Database'].\" info defined for environment '\".$report->options['Environment'].\"'\");\n\t\t}\n\n\t\t//make sure the syntax highlighting is using the proper class\n\t\tSqlFormatter::$pre_attributes = \"class='prettyprint linenums lang-sql'\";\n\n\t\t//replace legacy shorthand macro format\n\t\tforeach($report->macros as $key=>$value) {\n\t\t\tif(isset($report->options['Variables'][$key])) {\n\t\t\t\t$params = $report->options['Variables'][$key];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$params = array();\n\t\t\t}\n\n\t\t\t//macros shortcuts for arrays\n\t\t\tif(isset($params['multiple']) && $params['multiple']) {\n\t\t\t\t//allow {macro} instead of {% for item in macro %}{% if not item.first %},{% endif %}{{ item.value }}{% endfor %}\n\t\t\t\t//this is shorthand for comma separated list\n\t\t\t\t$report->raw_query = preg_replace('/([^\\{])\\{'.$key.'\\}([^\\}])/','$1{% for item in '.$key.' %}{% if not loop.first %},{% endif %}\\'{{ item }}\\'{% endfor %}$2',$report->raw_query);\n\n\t\t\t\t//allow {(macro)} instead of {% for item in macro %}{% if not item.first %},{% endif %}{{ item.value }}{% endfor %}\n\t\t\t\t//this is shorthand for quoted, comma separated list\n\t\t\t\t$report->raw_query = preg_replace('/([^\\{])\\{\\('.$key.'\\)\\}([^\\}])/','$1{% for item in '.$key.' %}{% if not loop.first %},{% endif %}(\\'{{ item }}\\'){% endfor %}$2',$report->raw_query);\n\t\t\t}\n\t\t\t//macros sortcuts for non-arrays\n\t\t\telse {\n\t\t\t\t//allow {macro} instead of {{macro}} for legacy support\n\t\t\t\t$report->raw_query = preg_replace('/([^\\{])(\\{'.$key.'+\\})([^\\}])/','$1{$2}$3',$report->raw_query);\n\t\t\t}\n\t\t}\n\n\t\t//if there are any included reports, add the report sql to the top\n\t\tif(isset($report->options['Includes'])) {\n\t\t\t$included_sql = '';\n\t\t\tforeach($report->options['Includes'] as &$included_report) {\n\t\t\t\t$included_sql .= trim($included_report->raw_query).\"\\n\";\n\t\t\t}\n\n\t\t\t$report->raw_query = $included_sql . $report->raw_query;\n\t\t}\n\n\t\t//set a formatted query here for debugging.  It will be overwritten below after macros are substituted.\n\t\t$report->options['Query_Formatted'] = SqlFormatter::format($report->raw_query);\n\t}\n\n\tpublic static function openConnection(&$report) {\n\t\tif(isset($report->conn)) return;\n\n\n\t\t$environments = PhpReports::$config['environments'];\n\t\t$config = $environments[$report->options['Environment']][$report->options['Database']];\n\n\t\tif(isset($config['dsn'])) {\n\t\t\t$dsn = $config['dsn'];\n\t\t}\n\t\telse {\n\t\t\t$host = $config['host'];\n\t\t\tif(isset($report->options['access']) && $report->options['access']==='rw') {\n\t\t\t\tif(isset($config['host_rw'])) $host = $config['host_rw'];\n\t\t\t}\n\n\t\t\t$driver = isset($config['driver'])? $config['driver'] : static::$default_driver;\n\n\t\t\tif(!$driver) {\n\t\t\t\tthrow new Exception(\"Must specify database `driver` (e.g. 'mysql')\");\n\t\t\t}\n\n\t\t\t$dsn = $driver.':host='.$host;\n\n\t\t\tif(isset($config['database'])) {\n\t\t\t\t$dsn .= ';dbname='.$config['database'];\n\t\t\t}\n\t\t}\n\n\t\t//the default is to use a user with read only privileges\n\t\t$username = $config['user'];\n\t\t$password = $config['pass'];\n\n\t\t//if the report requires read/write privileges\n\t\tif(isset($report->options['access']) && $report->options['access']==='rw') {\n\t\t\tif(isset($config['user_rw'])) $username = $config['user_rw'];\n\t\t\tif(isset($config['pass_rw'])) $password = $config['pass_rw'];\n\t\t}\n\n\t\t$report->conn = new PDO($dsn,$username,$password);\n\n\t\t$report->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t}\n\n\tpublic static function closeConnection(&$report) {\n\t\tif(!isset($report->conn)) return;\n\t\t$report->conn = null;\n\t\tunset($report->conn);\n\t}\n\n\tpublic static function getVariableOptions($params, &$report) {\n\t\t$displayColumn = $params['column'];\n\t\tif(isset($params['display'])) $displayColumn = $params['display'];\n\n\t\t$query = 'SELECT DISTINCT `'.$params['column'].'` as val, `'.$displayColumn.'` as disp FROM '.$params['table'];\n\n\t\tif(isset($params['where'])) {\n\t\t\t$query .= ' WHERE '.$params['where'];\n\t\t}\n\n\t\tif(isset($params['order']) && in_array($params['order'], array('ASC', 'DESC')) ) {\n\t\t\t$query .= ' ORDER BY '.$params['column'].' '.$params['order'];\n\t\t}\n\n\t\t$result = $report->conn->query($query);\n\n\t\t$options = array();\n\n\t\tif(isset($params['all'])) $options[] = 'ALL';\n\n\t\twhile($row = $result->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$options[] = array(\n\t\t\t\t'value'=>$row['val'],\n\t\t\t\t'display'=>$row['disp']\n\t\t\t);\n\t\t}\n\n\t\treturn $options;\n\t}\n\n\tpublic static function run(&$report) {\n\t\t$macros = $report->macros;\n\t\tforeach($macros as $key=>$value) {\n\t\t\tif(is_array($value)) {\n\t\t\t\t$first = true;\n\t\t\t\tforeach($value as $key2=>$value2) {\n\t\t\t\t\t$value[$key2] = $report->conn->quote(trim($value2));\n\t\t\t\t\t$value[$key2] = preg_replace(\"/(^'|'$)/\",'',$value[$key2]);\n\t\t\t\t\t$first = false;\n\t\t\t\t}\n\t\t\t\t$macros[$key] = $value;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$macros[$key] = $report->conn->quote($value);\n\t\t\t\t$macros[$key] = preg_replace(\"/(^'|'$)/\",'',$macros[$key]);\n\t\t\t}\n\n\t\t\tif($value === 'ALL') $macros[$key.'_all'] = true;\n\t\t}\n\n\t\t//add the config and environment settings as macros\n\t\t$macros['config'] = PhpReports::$config;\n\t\t$macros['environment'] = PhpReports::$config['environments'][$report->options['Environment']];\n\n\t\t//expand macros in query\n\t\t$sql = PhpReports::render($report->raw_query,$macros);\n\n\t\t$report->options['Query'] = $sql;\n\n\t\t$report->options['Query_Formatted'] = SqlFormatter::format($sql);\n\n\t\t//split into individual queries and run each one, saving the last result\n\t\t$queries = SqlFormatter::splitQuery($sql);\n\n\t\t$datasets = array();\n\n\t\t$explicit_datasets = preg_match('/--\\s+@dataset(\\s*=\\s*|\\s+)true/',$sql);\n\n\t\tforeach($queries as $i=>$query) {\n\t\t\t$is_last = $i === count($queries)-1;\n\n\t\t\t//skip empty queries\n\t\t\t$query = trim($query);\n\t\t\tif(!$query) continue;\n\n\t\t\t$result = $report->conn->query($query);\n\n\t\t\t//if this query had an assert=empty flag and returned results, throw error\n\t\t\tif(preg_match('/^--[\\s+]assert[\\s]*=[\\s]*empty[\\s]*\\n/',$query)) {\n\t\t\t\tif($result->fetch(PDO::FETCH_ASSOC))  throw new Exception(\"Assert failed.  Query did not return empty results.\");\n\t\t\t}\n\n\t\t\t// If this query should be included as a dataset\n\t\t\tif((!$explicit_datasets && $is_last) || preg_match('/--\\s+@dataset(\\s*=\\s*|\\s+)true/',$query)) {\n\t\t\t\t$dataset = array('rows'=>array());\n\n\t\t\t\twhile($row = $result->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t\t$dataset['rows'][] = $row;\n\t\t\t\t}\n\n\t\t\t\t// Get dataset title if it has one\n\t\t\t\tif(preg_match('/--\\s+@title(\\s*=\\s*|\\s+)(.*)/',$query,$matches)) {\n\t\t\t\t\t$dataset['title'] = $matches[2];\n\t\t\t\t}\n\n\t\t\t\t$datasets[] = $dataset;\n\t\t\t}\n\t\t}\n\n\t\treturn $datasets;\n\t}\n}\n"
  },
  {
    "path": "classes/report_types/PhpReportType.php",
    "content": "<?php\nclass PhpReportType extends ReportTypeBase {\n\tpublic static function init(&$report) {\n\t\t$report->raw_query = \"<?php\\n//REPORT: \".$report->report.\"\\n\".trim($report->raw_query);\n\t\t\n\t\t//if there are any included reports, add it to the top of the raw query\n\t\tif(isset($report->options['Includes'])) {\n\t\t\t$included_code = '';\n\t\t\tforeach($report->options['Includes'] as &$included_report) {\n\t\t\t\t$included_code .= \"\\n<?php /*BEGIN INCLUDED REPORT*/ ?>\".trim($included_report->raw_query).\"<?php /*END INCLUDED REPORT*/ ?>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($included_code) $included_code.= \"\\n\";\n\t\t\t\n\t\t\t$report->raw_query = $included_code . $report->raw_query;\n\t\t\t\n\t\t\t//make sure the raw query has a closing PHP tag at the end\n\t\t\t//this makes sure it will play nice as an included report\n\t\t\tif(!preg_match('/\\?>\\s*$/',$report->raw_query)) $report->raw_query .= \"\\n?>\";\n\t\t}\n\t}\n\t\n\tpublic static function openConnection(&$report) {\n\t\t\n\t}\n\t\n\tpublic static function closeConnection(&$report) {\n\t\t\n\t}\n\t\n\tpublic static function run(&$report) {\t\t\n\t\t$eval = \"<?php /*BEGIN REPORT MACROS*/ ?><?php \";\n\t\tforeach($report->macros as $key=>$value) {\n\t\t\t$value = var_export($value,true);\n\t\t\t\n\t\t\t$eval .= \"\\n\".'$'.$key.' = '.$value.';';\n\t\t}\n\t\t$eval .= \"\\n?><?php /*END REPORT MACROS*/ ?>\".$report->raw_query;\n\t\t\n\t\t$config = PhpReports::$config;\n\t\t\n\t\t//store in both $database and $environment for backwards compatibility\n\t\t$database = PhpReports::$config['environments'][$report->options['Environment']];\n\t\t$environment = $database;\n\t\t\n\t\t$report->options['Query'] = $report->raw_query;\n\t\t\n\t\t$parts = preg_split('/<\\?php \\/\\*(BEGIN|END) (INCLUDED REPORT|REPORT MACROS)\\*\\/ \\?>/',$eval);\n\t\t$report->options['Query_Formatted'] = '';\n\t\t$code = htmlentities(trim(array_pop($parts)));\n\t\t$linenum = 1;\n\t\tforeach($parts as $part) {\n\t\t\tif(!trim($part)) continue;\n\n\t\t\t//get name of report\n\t\t\t$name = preg_match(\"|//REPORT: ([^\\n]+)\\n|\",$part,$matches);\n\n\t\t\tif(!$matches) {\n\t\t\t\t$name = \"Variables\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$name = $matches[1];\n\t\t\t}\n\n\t\t\t$report->options['Query_Formatted'] .= '<div class=\"included_report\" data-name=\"'.htmlentities($name).'\">';\n\t\t\t$report->options['Query_Formatted'] .= \"<pre class='prettyprint lang-php linenums:\".$linenum.\"'>\".htmlentities(trim($part)).\"</pre>\";\n\t\t\t$report->options['Query_Formatted'] .= \"</div>\";\n\t\t\t$linenum += count(explode(\"\\n\",trim($part)));\n\t\t}\n\t\t\n\t\t$report->options['Query_Formatted'] .= '<pre class=\"prettyprint lang-php linenums:'.$linenum.'\">'.$code.'</pre>';\n\n\t\tob_start();\n\t\tini_set('display_errors','Off');\n\t\teval('?>'.$eval);\n\t\t$result = ob_get_contents();\n\t\tob_end_clean();\n\t\tini_set('display_errors','On');\n\n\t\t$result = trim($result);\n\t\t\n\t\t$json = json_decode($result, true);\n\t\tif($json === NULL) throw new Exception($result);\n\t\t\n\t\treturn $json;\n\t}\n}\n"
  },
  {
    "path": "composer.json",
    "content": "{\n    \"name\": \"jdorn/php-reports\",\n    \"description\": \"A PHP framework for displaying reports from any data source, including SQL and MongoDB\",\n    \"homepage\": \"http://jdorn.github.com/php-reports/\",\n    \"keywords\": [\"reports\", \"mongodb\", \"sql\", \"reporting\", \"csv\", \"database\"],\n    \"license\": \"LGPL-3.0+\",\n    \"authors\": [\n        {\n            \"name\": \"Jeremy Dorn\",\n            \"email\": \"jeremy@jeremydorn.com\"\n        }\n    ],\n    \"require\": {\n        \"php\": \">=5.3\",\n        \"ext-pdo\": \"*\",\n        \"twig/twig\": \"1.*\",\n        \"swiftmailer/swiftmailer\": \"5.*\",\n        \"mikecao/flight\": \"dev-master\",\n        \"jdorn/sql-formatter\": \"dev-master\",\n        \"jdorn/file-system-cache\": \"dev-master\",\n        \"phpoffice/phpexcel\": \"dev-develop\",\n        \"adodb/adodb-php\": \"dev-master\",\n        \"lespoilus/spyc\": \"dev-master\",\n        \"google/apiclient\": \"1.0.*@beta\",\n        \"alcaeus/mongo-php-adapter\": \"^1.1@dev\"\n    },\n    \"autoload\": {\n        \"files\": [\n            \"lib/adodb/pivottable.inc.php\"\n        ],\n        \"classmap\": [\n            \"vendor/jdorn/file-system-cache/\"\n        ]\n    },\n    \"minimum-stability\": \"dev\"\n}\n"
  },
  {
    "path": "config/config.php.sample",
    "content": "<?php\nreturn array(\n\t//the root directory of all your reports\n\t//reports can be organized in subdirectories\n\t'reportDir' => 'sample_reports',\n\n\t//the root directory of all dashboards\n\t'dashboardDir' => 'sample_dashboards',\n\n\t//the directory where things will be cached\n\t//this is relative to the project root by default, but can be set to an absolute path too\n\t//the cache has some relatively long lived data so don't use /tmp if you can avoid it\n\t//(for example historical report timing data is stored here)\n\t'cacheDir' => 'cache',\n\n\t//this maps file extensions to report types\n\t//to override this for a specific report, simply add a TYPE header\n\t//any file extension not in this array will be ignored when pulling the report list\n\t'default_file_extension_mapping' => array(\n\t\t'sql'=>'Pdo',\n\t\t'php'=>'Php',\n\t\t'js'=>'Mongo',\n\t\t'ado'=>'Ado',\n\t\t'pivot'=>'AdoPivot',\n\t),\n\n\t//this enables listing different types of download formats on the report page\n\t//to change that one can add or remove any format from the list below\n\t//in order to create a divider a list entry have to be added with any key name and\n\t//a value of 'divider'\n\t'report_formats' => array(\n\t\t'csv'=>'CSV',\n\t\t'xlsx'=>'Download Excel 2007',\n\t\t'xls'=>'Download Excel 97-2003',\n\t\t'text'=>'Text',\n\t\t'table'=>'Simple table',\n\t\t'raw data'=>'divider',\n\t\t'json'=>'JSON',\n\t\t'xml'=>'XML',\n\t\t'sql'=>'SQL INSERT command',\n\t\t'technical'=>'divider',\n\t\t'debug'=>'Debug information',\n\t\t'raw'=>'Raw report dump',\n\t),\n\n\t//this enebales one to change the default bootstrap theme\n\t'bootstrap_theme' => 'default',\n\n\t//this list all the available themes for a user to switch and use the one he or she likes\n\t//once removed the theme will not appear in the dropdown\n\t//if all to be removed - no dropdown will be visible for the user and the default (above) will be used\n\t'bootstrap_themelist' => array(\n\t    'default',\n\t    'amelia', 'cerulean', 'cosmo', 'cyborg', 'flatly', 'journal', 'readable', 'simplex', 'slate', 'spacelab', 'united'\n\t),\n\n\t//email settings\n\t'mail_settings' => array(\n\t\t//set 'enabled' to true to enable the 'email this report' functionality\n\t\t'enabled'=>false,\n\n\t\t'from'=>'reports@yourdomain.com',\n\n\t\t//php's mail function\n\t\t'method'=>'mail'\n\n\t\t//sendmail\n\t\t/*\n\t\t'method'=>'sendmail',\n\t\t'command'=>'/usr/sbin/sendmail -bs' //optional\n\t\t*/\n\n\t\t//smtp\n\t\t/*\n\t\t'method'=>'smtp',\n\t\t'server'=>'smtp.yourdomain.com',\n\t\t'port'=>'25', \t\t\t\t\t\t//optional (default 25)\n\t\t'username'=>'youremailusername', \t//optional\n\t\t'password'=>'yoursmtppassword', \t//optional\n\t\t'encryption'=>'ssl' \t\t\t\t//optional (either 'ssl' or 'tls')\n\t\t*/\n\t),\n\n\t// Google Analytics API Integration\n\t/*\n\t'ga_api'=>array(\n\t\t'applicationName'=>'PHP Reports',\n\t\t'clientId'=>'abcdef123456',\n\t\t'clientSecret'=>'1234abcd',\n\t\t'redirectUri'=>'http://example.com/'\n\t),\n\t*/\n\n\t//this defines the database environments\n\t//the keys are the environment names (e.g. \"dev\", \"production\")\n\t//the values are arrays that contain connection info\n\t'environments' => array(\n\t\t'main'=>array(\n\t\t\t// Supports AdoDB connections\n\t\t\t'ado'=>array(\n\t\t\t\t'uri'=>'mysql://username:password@localhost/database'\n\t\t\t),\n\n\t\t\t// Supports and PDO database\n\t\t\t'pdo'=>array(\n\t\t\t\t'dsn'=>'mysql:host=localhost;dbname=test',\n\t\t\t\t'user'=>'readonly',\n\t\t\t\t'pass'=>'password',\n\t\t\t),\n\n\t\t\t// Supports MongoDB\n\t\t\t'mongo'=>array(\n\t\t\t\t'host'=>'localhost',\n\t\t\t\t'port'=>'27017'\n\t\t\t),\n\t\t),\n\t),\n\t// This is called twice, once for each Twig_Environment that is used\n\t'twig_init_function' => function (Twig_Environment $twig) {\n\n\t}\n);\n?>\n"
  },
  {
    "path": "index.php",
    "content": "<?php\n// for build-in php server serve the requested resource as-is.\nif (php_sapi_name() == 'cli-server' && preg_match('/\\.(?:png|jpg|jpeg|gif|css|js)$/', $_SERVER[\"REQUEST_URI\"])) {\n    return false;\n}\n\nsession_start();\n\n//set php ini so the page doesn't time out for long requests\nini_set('max_execution_time', 300);\n\n//sets up autoloading of composer dependencies\ninclude 'vendor/autoload.php';\n\n//sets up autoload (looks in classes/local/, classes/, and lib/ in that order)\nrequire 'lib/PhpReports/PhpReports.php';\n\nheader(\"Access-Control-Allow-Origin: *\");\n\n// Google Analytics API\nif(isset(PhpReports::$config['ga_api'])) {\n  $ga_client = new Google_Client();\n  $ga_client->setApplicationName(PhpReports::$config['ga_api']['applicationName']);\n  $ga_client->setClientId(PhpReports::$config['ga_api']['clientId']);\n  $ga_client->setAccessType('offline');\n  $ga_client->setClientSecret(PhpReports::$config['ga_api']['clientSecret']);\n  $ga_client->setRedirectUri(PhpReports::$config['ga_api']['redirectUri']);\n  $ga_service = new Google_Service_Analytics($ga_client);\n  $ga_client->addScope(Google_Service_Analytics::ANALYTICS);\n  if(isset($_GET['code'])) {\n    $ga_client->authenticate($_GET['code']);\n    $_SESSION['ga_token'] = $ga_client->getAccessToken();\n    \n    if(isset($_SESSION['ga_authenticate_redirect'])) {\n      $url = $_SESSION['ga_authenticate_redirect'];\n      unset($_SESSION['ga_authenticate_redirect']);\n      header(\"Location: $url\");\n      exit;\n    }\n  }\n  if(isset($_SESSION['ga_token'])) {    \n    $ga_client->setAccessToken($_SESSION['ga_token']);\n  }\n  elseif(isset(PhpReports::$config['ga_api']['accessToken'])) {    \n    $ga_client->setAccessToken(PhpReports::$config['ga_api']['accessToken']);\n    $_SESSION['ga_token'] = $ga_client->getAccessToken();\n  }\n  \n  Flight::route('/ga_authenticate',function() use($ga_client) {\n    $authUrl = $ga_client->createAuthUrl();\n    if(isset($_GET['redirect'])) {\n      $_SESSION['ga_authenticate_redirect'] = $_GET['redirect'];\n    }\n    header(\"Location: $authUrl\");\n    exit;\n  });\n}\n\nFlight::route('/',function() {\n\tPhpReports::listReports();\n});\n\nFlight::route('/dashboards',function() {\n\tPhpReports::listDashboards();\n});\n\nFlight::route('/dashboard/@name',function($name) {\n\tPhpReports::displayDashboard($name);\n});\n\n//JSON list of reports (used for typeahead search)\nFlight::route('/report-list-json',function() {\n\theader(\"Content-Type: application/json\");\n\theader(\"Cache-Control: max-age=3600\");\n\n\techo PhpReports::getReportListJSON();\n});\n\n//if no report format is specified, default to html\nFlight::route('/report',function() {\n\tPhpReports::displayReport($_REQUEST['report'],'html');\n});\n\n//reports in a specific format (e.g. 'html','csv','json','xml', etc.)\nFlight::route('/report/@format',function($format) {\n\tPhpReports::displayReport($_REQUEST['report'],$format);\n});\n\nFlight::route('/edit',function() {\n\tPhpReports::editReport($_REQUEST['report']);\n});\n\nFlight::route('/set-environment',function() {\n    header(\"Content-Type: application/json\");\n\t$_SESSION['environment'] = $_REQUEST['environment'];\n\n    echo '{ \"status\": \"OK\" }';\n});\n\n//email report\nFlight::route('/email',function() {\n\tPhpReports::emailReport();\t\n});\n\nFlight::set('flight.handle_errors', false);\nFlight::set('flight.log_errors', true);\n\nFlight::start();\n"
  },
  {
    "path": "lib/PhpReports/FilterBase.php",
    "content": "<?php\nabstract class FilterBase {\t\n\t/**\n\t * Filter a datapoint in the report\n\t * @param String $value - The current value\n\t * @param array $options - An array of filter options\n\t * @param Report $report - The report object\n\t * @param array $row - The report row the value is in\n\t * @return String The filtered value or false if the column should not be shown\n\t */\n\tabstract public static function filter($value, $options=array(), &$report, &$row);\n}\n"
  },
  {
    "path": "lib/PhpReports/HeaderBase.php",
    "content": "<?php\nclass HeaderBase {\n\tstatic $validation = array();\n\t\n\tpublic static function parse($key, $value, &$report) {\t\t\t\t\n\t\t$params = null;\n\t\t\n\t\tif(is_array($value)) {\n\t\t\t$params = $value;\n\t\t}\n\t\t//try to json_decode value\n\t\t//this is a wrapper json_decode function that supports non-strict JSON\n\t\t//for example, {key:\"value\",'key2':'value2',}\n\t\telseif($value[0] === '{') {\n\t\t\t$params = PhpReports::json_decode($value, true);\n\t\t}\n\t\t\n\t\t//if it couldn't be parsed as json, try parsing it as a shortcut form\n\t\tif(!$params) $params = static::parseShortcut($value);\n\t\t\n\t\tif(!$params) throw new Exception(\"Could not parse header '$key'\");\n\t\t\n\t\t//run defined validation rules and fill in default params\n\t\ttry {\n\t\t\t$params = static::validate($params);\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\tthrow new Exception($key.\" Header: \".$e->getMessage());\n\t\t}\n\t\t\n\t\tstatic::init($params, $report);\n\t}\n\t\n\tpublic static function init($params, &$report) {\n\t\t\n\t}\n\t\n\tpublic static function parseShortcut($value) {\n\t\treturn array();\n\t}\n\t\n\tpublic static function beforeRender(&$report) {\n\t\t\n\t}\n\t\n\tpublic static function afterParse(&$report) {\n\t\t\n\t}\n\t\n\tpublic static function beforeRun(&$report) {\n\t\t\n\t}\n\t\n\tprotected static function validate($params) {\n\t\tif(!static::$validation) return $params;\n\t\t\n\t\t$errors = array();\n\t\t\n\t\tforeach(static::$validation as $key=>$rules) {\n\t\t\t//fill in default params\n\t\t\tif(isset($rules['default']) && !isset($params[$key])) {\n\t\t\t\t$params[$key] = $rules['default'];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//if the param isn't required and it's defined, we can skip validation\n\t\t\tif((!isset($rules['required']) || !$rules['required']) && !isset($params[$key])) continue;\n\t\t\t\n\t\t\t//if the param must be a specific datatype\n\t\t\tif(isset($rules['type'])) {\n\t\t\t\tif($rules['type'] === 'number' && !is_numeric($params[$key])) $errors[] = \"$key must be a number (\".gettype($params[$key]).\" given)\";\n\t\t\t\telseif($rules['type'] === 'array' && !is_array($params[$key])) $errors[] = \"$key must be an array (\".gettype($params[$key]).\" given)\";\n\t\t\t\telseif($rules['type'] === 'boolean' && !is_bool($params[$key])) $errors[] = \"$key must be true or false (\".gettype($params[$key]).\" given)\";\n\t\t\t\telseif($rules['type'] === 'string' && !is_string($params[$key])) $errors[] = \"$key must be a string (\".gettype($params[$key]).\" given)\";\n\t\t\t\telseif($rules['type'] === 'enum' && !in_array($params[$key],$rules['values'])) $errors[] = \"$key must be one of: [\".implode(', ',$rules['values']).\"]\";\n\t\t\t\telseif($rules['type'] === 'object' && !is_array($params[$key])) $errors[] = \"$key must be an object (\".gettype($params[$key]).\" given)\";\n\t\t\t}\n\t\t\t\n\t\t\t//other validation rules\n\t\t\tif(isset($rules['min']) && $params[$key] < $rules['min']) $errors[] = \"$key must be at least $rules[min]\";\n\t\t\tif(isset($rules['max']) && $params[$key] > $rules['max']) $errors[] = \"$key must be at most $rules[min]\";\n\t\t\t\n\t\t\tif(isset($rules['pattern']) && !preg_match($rules['pattern'],$params[$key])) $errors[] = \"$key does not match required pattern\";\n\t\t}\n\t\t\n\t\t//every possible param must be defined in the validation rules\n\t\tforeach($params as $k=>$v) {\n\t\t\tif(!isset(static::$validation[$k])) $errors[] = \"Unknown parameter '$k'\";\n\t\t}\n\t\t\n\t\tif($errors) {\n\t\t\tthrow new Exception(implode(\". \",$errors));\n\t\t}\n\t\telse return $params;\n\t}\n}\n"
  },
  {
    "path": "lib/PhpReports/PhpReports.php",
    "content": "<?php\nclass PhpReports {\n\tpublic static $config;\n\tpublic static $request;\n\tpublic static $twig;\n\tpublic static $twig_string;\n\n\tpublic static $vars;\n\n\tprivate static $loader_cache;\n\n\tpublic static function init($config = 'config/config.php') {\n\t\t//set up our autoloader\n\t\tspl_autoload_register(array('PhpReports','loader'),true,true);\n\n\t\tif(!file_exists($config)) {\n\t\t\tthrow new Exception(\"Cannot find config file\");\n\t\t}\n\n\t\t// The config.php.sample is used to populate default values should the config.php be incomplete.\n\t\t// As a result, we require it be there.\n\t\tif(!file_exists('config/config.php.sample')) {\n\t\t\tthrow new Exception(\"Cannot find sample config. Please leave config/config.php.sample in place for default values.\");\n\t\t}\n\n\t\t$default_config = include('config/config.php.sample');\n\t\t$config = include($config);\n\n\t\tself::$config = array_merge($default_config, $config);\n\n\t\tself::$request = Flight::request();\n\n\t\t$path = self::$request->base;\n\n\t\tif (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {\n\t\t\t$protocol = 'https://';\n\t\t} else {\n\t\t\t$protocol = 'http://';\n\t\t}\n\t\tself::$request->base = $protocol.rtrim($_SERVER['HTTP_HOST'].self::$request->base,'/');\n\n\t\t//the load order for templates is: \"templates/local\", \"templates/default\", \"templates\"\n\t\t//this means loading the template \"html/report.twig\" will load the local first and then the default\n\t\t//if you want to extend a default template from within a local template, you can do {% extends \"default/html/report.twig\" %} and it will fall back to the last loader\n\t\t$template_dirs = array('templates/default','templates');\n\t\tif(file_exists('templates/local')) array_unshift($template_dirs, 'templates/local');\n\n\t\t$loader = new Twig_Loader_Chain(array(\n\t\t\tnew Twig_Loader_Filesystem($template_dirs),\n\t\t\tnew Twig_Loader_String()\n\t\t));\n\t\tself::$twig = new Twig_Environment($loader);\n\t\tself::$twig->addFunction(new Twig_SimpleFunction('dbdate', 'PhpReports::dbdate'));\n\t\tself::$twig->addFunction(new Twig_SimpleFunction('sqlin', 'PhpReports::generateSqlIN'));\n\n\t\tif(isset($_COOKIE['reports-theme']) && $_COOKIE['reports-theme']) {\n\t\t\t$theme = $_COOKIE['reports-theme'];\n\t\t}\n\t\telse {\n\t\t\t$theme = self::$config['bootstrap_theme'];\n\t\t}\n\t\tself::$twig->addGlobal('theme', $theme);\n\t\tself::$twig->addGlobal('path', $path);\n\n\t\tself::$twig->addFilter('var_dump', new Twig_Filter_Function('var_dump'));\n\n\t\tself::$twig_string = new Twig_Environment(new Twig_Loader_String(), array('autoescape'=>false));\n\t\tself::$twig_string->addFunction(new Twig_SimpleFunction('sqlin', 'PhpReports::generateSqlIN'));\n\n\t\tFileSystemCache::$cacheDir = self::$config['cacheDir'];\n\n\t\tif(!isset($_SESSION['environment']) || !isset(self::$config['environments'][$_SESSION['environment']])) {\n\t\t    $tmp = array_keys(self::$config['environments']);\n\t\t\t$_SESSION['environment'] = array_shift($tmp);\n\t\t}\n\n\t\t// Extend twig.\n\t\tif (isset($config['twig_init_function']) && is_callable($config['twig_init_function'])) {\n\t\t\t$config['twig_init_function'](self::$twig);\n\t\t\t$config['twig_init_function'](self::$twig_string);\n\t\t}\n\t}\n\n\tpublic static function setVar($key,$value) {\n\t\tif(!self::$vars) self::$vars = array();\n\n\t\tself::$vars[$key] = $value;\n\t}\n\tpublic static function getVar($key, $default=null) {\n\t\tif(isset(self::$vars[$key])) return self::$vars[$key];\n\t\telse return $default;\n\t}\n\n\tpublic static function dbdate($time, $database=null, $format=null) {\n\t\t$report = self::getVar('Report',null);\n\t\tif(!$report) return strtotime('Y-m-d H:i:s',strtotime($time));\n\n\t\t//if a variable name was passed in\n\t\t$var = null;\n\t\tif(isset($report->options['Variables'][$time])) {\n\t\t\t$var = $report->options['Variables'][$time];\n\t\t\t$time = $report->macros[$time];\n\t\t}\n\n\t\t$time = strtotime($time);\n\n\t\t$environment = $report->getEnvironment();\n\n\t\t//determine time offset\n\t\t$offset = 0;\n\n\t\tif($database) {\n\t\t\tif(isset($environment[$database]['time_offset'])) $offset = $environment[$database]['time_offset'];\n\t\t}\n\t\telse {\n\t\t\t$database = $report->getDatabase();\n\t\t\tif(isset($database['time_offset'])) $offset = $database['time_offset'];\n\t\t}\n\n\t\t//if the time needs to be adjusted\n\t\tif($offset) {\n\t\t\t$time = strtotime((($offset > 0)? '+' : '-').abs($offset).' hours',$time);\n\t\t}\n\n\t\t//determine output format\n\t\tif($format) {\n\t\t\t$time = date($format,$time);\n\t\t}\n\t\telseif($var && isset($var['format'])) {\n\t\t\t$time = date($var['format'],$time);\n\t\t}\n\t\t//default to Y-m-d H:i:s\n\t\telse {\n\t\t\t$time = date('Y-m-d H:i:s',$time);\n\t\t}\n\n\t\treturn $time;\n\t}\n\n\tpublic static function generateSqlIN($column, $values, $or_null = false) {\n\t\t$sql = \"$column IN (\";\n\t\tforeach ($values as $value) {\n\t\t\t$sql .= is_numeric($value) ? $value : \"'$value'\";\n\t\t\tif ($value !== end($values)) {\n\t\t\t\t$sql .= ', ';\n\t\t\t}\n\t\t}\n\t\t$sql .= \")\";\n\t\tif ($or_null) {\n\t\t\t$sql.= \" OR $column IS NULL\";\n\t\t}\n\t\treturn $sql;\n\t}\n\n\tpublic static function render($template, $macros) {\n\t\t$default = array(\n\t\t\t'base'=>self::$request->base,\n\t\t\t'report_list_url'=>self::$request->base.'/',\n\t\t\t'request'=>self::$request,\n\t\t\t'querystring'=>$_SERVER['QUERY_STRING'],\n\t\t\t'config'=>self::$config,\n\t\t\t'environment'=>$_SESSION['environment'],\n\t\t\t'recent_reports'=>self::getRecentReports(),\n\t\t\t'session'=>$_SESSION\n\t\t);\n\t\t$macros = array_merge($default,$macros);\n\n\t\t//if a template path like 'html/report' is given, add the twig file extension\n\t\tif(preg_match('/^[a-zA-Z_\\-0-9\\/]+$/',$template)) $template .= '.twig';\n\t\treturn self::$twig->render($template,$macros);\n\t}\n\n\tpublic static function renderString($template, $macros) {\n\t\t\treturn self::$twig_string->render($template,$macros);\n\t}\n\n\tpublic static function displayReport($report,$type) {\n\t\t$classname = ucfirst(strtolower($type)).'ReportFormat';\n\n\t\t$error_header = 'An error occurred while running your report';\n\t\t$content = '';\n\n\t\ttry {\n\t\t\tif(!class_exists($classname)) {\n\t\t\t\t$error_header = 'Unknown report format';\n\t\t\t\tthrow new Exception(\"Unknown report format '$type'\");\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t$report = $classname::prepareReport($report);\n\t\t\t}\n\t\t\tcatch(Exception $e) {\n\t\t\t\t$error_header = 'An error occurred while preparing your report';\n\t\t\t\tthrow $e;\n\t\t\t}\n\n\t\t\t$classname::display($report,self::$request);\n\n\t\t\tif(isset($report->options['Query_Formatted'])) {\n\t\t\t\t$content = $report->options['Query_Formatted'];\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\techo self::render('html/page',array(\n\t\t\t\t'title'=>'Report',\n\t\t\t\t'header'=>'<h2>'.$error_header.'</h2>',\n\t\t\t\t'error'=>$e->getMessage(),\n\t\t\t\t'content'=>$content,\n\t\t\t\t'breadcrumb'=>array('Report List'=>'')\n\t\t\t));\n\t\t}\n\t}\n\n\tpublic static function editReport($report) {\n\t\t$template_vars = array();\n\n\t\ttry {\n\t\t\t$report = ReportFormatBase::prepareReport($report);\n\n\t\t\t$template_vars = array(\n\t\t\t\t'report'=>$report->report,\n\t\t\t\t'options'=>$report->options,\n\t\t\t\t'contents'=>$report->getRaw(),\n\t\t\t\t'extension'=>array_pop(explode('.',$report->report))\n\t\t\t);\n\t\t}\n\t\t//if there is an error parsing the report\n\t\tcatch(Exception $e) {\n\t\t\t$template_vars = array(\n\t\t\t\t'report'=>$report,\n\t\t\t\t'contents'=>Report::getReportFileContents($report),\n\t\t\t\t'options'=>array(),\n\t\t\t\t'extension'=>array_pop(explode('.',$report)),\n\t\t\t\t'error'=>$e\n\t\t\t);\n\t\t}\n\n\t\tif(isset($_POST['preview'])) {\n\t\t\techo \"<pre>\".SimpleDiff::htmlDiffSummary($template_vars['contents'],$_POST['contents']).\"</pre>\";\n\t\t}\n\t\telseif(isset($_POST['save'])) {\n\t\t\tReport::setReportFileContents($template_vars['report'],$_POST['contents']);\n\t\t}\n\t\telse {\n\t\t\techo self::render('html/report_editor',$template_vars);\n\t\t}\n\t}\n\n\tpublic static function listReports() {\n\t\t$errors = array();\n\n\t\t$reports = self::getReports(self::$config['reportDir'].'/',$errors);\n\n\t\t$template_vars['reports'] = $reports;\n\t\t$template_vars['report_errors'] = $errors;\n\n\t\t$start = microtime(true);\n\t\techo self::render('html/report_list',$template_vars);\n\t}\n\n\tpublic static function listDashboards() {\n\t\t$dashboards = self::getDashboards();\n\n\t\tuasort($dashboards,function($a,$b) {\n\t\t\treturn strcmp($a['title'],$b['title']);\n\t\t});\n\n\t\techo self::render('html/dashboard_list',array(\n\t\t\t'dashboards'=>$dashboards\n\t\t));\n\t}\n\n\tpublic static function displayDashboard($dashboard) {\n\t\t$content = self::getDashboard($dashboard);\n\n\t\techo self::render('html/dashboard',array(\n\t\t\t'dashboard'=>$content\n\t\t));\n\t}\n\n\tpublic static function getDashboards() {\n\t\t$dashboards = glob(PhpReports::$config['dashboardDir'].'/*.json');\n\n\t\t$ret = array();\n\t\tforeach($dashboards as $key=>$value) {\n\t\t\t$name = basename($value,'.json');\n\t\t\t$ret[$name] = self::getDashboard($name);\n\t\t}\n\n\t\treturn $ret;\n\t}\n\n\tpublic static function getDashboard($dashboard) {\n\t\t$file = PhpReports::$config['dashboardDir'].'/'.$dashboard.'.json';\n\t\tif(!file_exists($file)) {\n\t\t\tthrow new Exception(\"Unknown dashboard - \".$dashboard);\n\t\t}\n\n\t\treturn json_decode(file_get_contents($file),true);\n\t}\n\n\tpublic static function getRecentReports() {\n\t\t$recently_run = FileSystemCache::retrieve(FileSystemCache::generateCacheKey('recently_run'));\n\t\t$recent = array();\n\t\tif($recently_run !== false) {\n\t\t\t$i = 0;\n\t\t\tforeach($recently_run as $report) {\n\t\t\t\tif($i > 10) break;\n\n\t\t\t\t$headers = self::getReportHeaders($report);\n\n\t\t\t\tif(!$headers) continue;\n\t\t\t\tif(isset($recent[$headers['url']])) continue;\n\n\t\t\t\t$recent[$headers['url']] = $headers;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\t\treturn array_values($recent);\n\t}\n\tpublic static function getReportListJSON($reports=null) {\n\t\tif($reports === null) {\n\t\t\t$errors = array();\n\t\t\t$reports = self::getReports(self::$config['reportDir'].'/',$errors);\n\t\t}\n\n\t\t//weight by popular reports\n\t\t$recently_run = FileSystemCache::retrieve(FileSystemCache::generateCacheKey('recently_run'));\n\t\t$popular = array();\n\t\tif($recently_run !== false) {\n\t\t\tforeach($recently_run as $report) {\n\t\t\t\tif(!isset($popular[$report])) $popular[$report] = 1;\n\t\t\t\telse $popular[$report]++;\n\t\t\t}\n\t\t}\n\t\t$parts = array();\n\n\t\tforeach($reports as $report) {\n\t\t\tif($report['is_dir'] && $report['children']) {\n\t\t\t\t//skip if the directory doesn't have a title\n\t\t\t\tif(!isset($report['Title']) || !$report['Title']) continue;\n\n\t\t\t\t$part = trim(self::getReportListJSON($report['children']),'[],');\n\t\t\t\tif($part) $parts[] = $part;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//skip if report is marked as dangerous\n\t\t\t\tif((isset($report['stop'])&&$report['stop']) || isset($report['Caution']) || isset($report['warning'])) continue;\n\t\t\t\tif(!isset($report['url'])) continue;\n\t\t\t\tif(!isset($report['report'])) continue;\n\n\t\t\t\t//skip if report is marked as ignore\n\t\t\t\tif(isset($report['ignore']) && $report['ignore']) continue;\n\n\t\t\t\tif(isset($popular[$report['report']])) {\n\t\t\t\t\t$popularity = $popular[$report['report']];\n\t\t\t\t}\n\t\t\t\telse $popularity = 0;\n\n\t\t\t\t$parts[] = json_encode(array(\n\t\t\t\t\t'name'=>$report['Name'],\n\t\t\t\t\t'url'=>$report['url'],\n\t\t\t\t\t'popularity'=>$popularity\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\treturn '['.trim(implode(',',$parts),',').']';\n\t}\n\n\tprotected static function getReportHeaders($report) {\n\t\t$cacheKey = FileSystemCache::generateCacheKey(array(self::$request->base, $report),'report_headers');\n\n\t\t//check if report data is cached and newer than when the report file was created\n\t\t//the url parameter ?nocache will bypass this and not use cache\n\t\t$data =false;\n\n\t\t$loc = Report::getFileLocation($report);\n\t\tif(!file_exists($loc)) {\n\t\t\treturn false;\n\t\t}\n\t\tif(!isset($_REQUEST['nocache'])) {\n\t\t\t$data = FileSystemCache::retrieve($cacheKey, filemtime($loc));\n\t\t}\n\n\t\t//report data not cached, need to parse it\n\t\tif($data === false) {\n\t\t\t$temp = new Report($report);\n\n\t\t\t$data = $temp->options;\n\n\t\t\t$data['report'] = $report;\n\t\t\t$data['url'] = self::$request->base.'/report/html/?report='.$report;\n\t\t\t$data['is_dir'] = false;\n\t\t\t$data['Id'] = str_replace(array('_','-','/',' ','.'),array('','','_','-','_'),trim($report,'/'));\n\t\t\tif(!isset($data['Name'])) $data['Name'] = ucwords(str_replace(array('_','-'),' ',basename($report)));\n\n\t\t\t//store parsed report in cache\n\t\t\tFileSystemCache::store($cacheKey, $data);\n\t\t}\n\n\t\treturn $data;\n\t}\n\n\tprotected static function getReports($dir, &$errors = null) {\n\t\t$base = self::$config['reportDir'].'/';\n\n\t\t$reports = glob($dir.'*',GLOB_NOSORT);\n\t\t$return = array();\n\t\tforeach($reports as $key=>$report) {\n\t\t\t$title = $description = false;\n\n\t\t\tif(is_dir($report)) {\n\t\t\t\tif(file_exists($report.'/TITLE.txt')) $title = file_get_contents($report.'/TITLE.txt');\n\t\t\t\tif(file_exists($report.'/README.txt')) $description = file_get_contents($report.'/README.txt');\n\n\t\t\t\t$id = str_replace(array('_','-','/',' '),array('','','_','-'),trim(substr($report,strlen($base)),'/'));\n\n\t\t\t\t$children = self::getReports($report.'/', $errors);\n\n\t\t\t\t$count = 0;\n\t\t\t\tforeach($children as $child) {\n\t\t\t\t\tif(isset($child['count'])) $count += $child['count'];\n\t\t\t\t\telse $count++;\n\t\t\t\t}\n\n\t\t\t\t$return[] = array(\n\t\t\t\t\t'Name'=>ucwords(str_replace(array('_','-'),' ',basename($report))),\n\t\t\t\t\t'Title'=>$title,\n\t\t\t\t\t'Id'=> $id,\n\t\t\t\t\t'Description'=>$description,\n\t\t\t\t\t'is_dir'=>true,\n\t\t\t\t\t'children'=>$children,\n\t\t\t\t\t'count'=>$count\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//files to skip\n\t\t\t\tif(strpos(basename($report),'.') === false) continue;\n\t\t\t\t$ext = explode('.',$report);\n\t\t\t\t$ext = array_pop($ext);\n\t\t\t\tif(!isset(self::$config['default_file_extension_mapping'][$ext])) continue;\n\n\t\t\t\t$name = substr($report,strlen($base));\n\n\t\t\t\ttry {\n\t\t\t\t\t$data = self::getReportHeaders($name,$base);\n\t\t\t\t\t$return[] = $data;\n\t\t\t\t}\n\t\t\t\tcatch(Exception $e) {\n\t\t\t\t\tif(!$errors) $errors = array();\n\t\t\t\t\t$errors[] = array(\n\t\t\t\t\t\t'report'=>$name,\n\t\t\t\t\t\t'exception'=>$e\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tusort($return,function(&$a,&$b) {\n\t\t\tif($a['is_dir'] && !$b['is_dir']) return 1;\n\t\t\telseif($b['is_dir'] && !$a['is_dir']) return -1;\n\n\t\t\tif(empty($a['Title']) && empty($b['Title'])) return strcmp($a['Name'],$b['Name']);\n\t\t\telseif(empty($a['Title'])) return 1;\n\t\t\telseif(empty($b['Title'])) return -1;\n\n\t\t\treturn strcmp($a['Title'], $b['Title']);\n\t\t});\n\n\t\treturn $return;\n\t}\n\n\t/**\n\t * Emails a report given a TO address, a subject, and a message\n\t */\n\tpublic static function emailReport() {\n\t\tif(!isset($_REQUEST['email']) || !filter_var($_REQUEST['email'], FILTER_VALIDATE_EMAIL)) {\n\t\t\techo json_encode(array('error'=>'Valid email address required'));\n\t\t\treturn;\n\t\t}\n\t\tif(!isset($_REQUEST['url'])) {\n\t\t\techo json_encode(array('error'=>'Report url required'));\n\t\t\treturn;\n\t\t}\n\t\tif(!isset(PhpReports::$config['mail_settings']['enabled']) || !PhpReports::$config['mail_settings']['enabled']) {\n\t\t\techo json_encode(array('error'=>'Email is disabled on this server'));\n\t\t\treturn;\n\t\t}\n\t\tif(!isset(PhpReports::$config['mail_settings']['from'])) {\n\t\t\techo json_encode(array('error'=>'Email settings have not been properly configured on this server'));\n\t\t\treturn;\n\t\t}\n\n\t\t$from = PhpReports::$config['mail_settings']['from'];\n\t\t$subject = $_REQUEST['subject']? $_REQUEST['subject'] : 'Database Report';\n\t\t$body = $_REQUEST['message']? $_REQUEST['message'] : \"You've been sent a database report!\";\n\t\t$email = $_REQUEST['email'];\n\t\t$link = $_REQUEST['url'];\n\t\t$csv_link = str_replace('report/html/?','report/csv/?',$link);\n\t\t$table_link = str_replace('report/html/?','report/table/?',$link);\n\t\t$text_link = str_replace('report/html/?','report/text/?',$link);\n\n\t\t// Get the CSV file attachment and the inline HTML table\n\t\t$csv = self::urlDownload($csv_link);\n\t\t$table = self::urlDownload($table_link);\n\t\t$text = self::urlDownload($text_link);\n\n\t\t$email_text = $body.\"\\n\\n\".$text.\"\\n\\nView the report online at $link\";\n\t\t$email_html = \"<p>$body</p>$table<p>View the report online at <a href=\\\"\".htmlentities($link).\"\\\">\".htmlentities($link).\"</a></p>\";\n\n\t\t// Create the message\n\t\t$message = Swift_Message::newInstance()\n\t\t  ->setSubject($subject)\n\t\t  ->setFrom($from)\n\t\t  ->setTo($email)\n\t\t  //text body\n\t\t  ->setBody($email_text)\n\t\t  //html body\n\t\t  ->addPart($email_html, 'text/html')\n\t\t;\n\n\t\t$attachment = Swift_Attachment::newInstance()\n\t\t\t->setFilename('report.csv')\n\t\t\t->setContentType('text/csv')\n\t\t\t->setBody($csv)\n\t\t;\n\n\t\t$message->attach($attachment);\n\n\t\t// Create the Transport\n\t\t$transport = self::getMailTransport();\n\t\t$mailer = Swift_Mailer::newInstance($transport);\n\n\t\ttry {\n\t\t\t// Send the message\n\t\t\t$result = $mailer->send($message);\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\techo json_encode(array(\n\t\t\t\t'error'=>$e->getMessage()\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\n\t\tif($result) {\n\t\t\techo json_encode(array(\n\t\t\t\t'success'=>true\n\t\t\t));\n\t\t}\n\t\telse {\n\t\t\techo json_encode(array(\n\t\t\t\t'error'=>'Failed to send email to requested recipient'\n\t\t\t));\n\t\t}\n\t}\n\n\t/**\n\t * Determines the email transport to use based on the configuration settings\n\t */\n\tprotected static function getMailTransport() {\n\t\tif(!isset(PhpReports::$config['mail_settings'])) PhpReports::$config['mail_settings'] = array();\n\t\tif(!isset(PhpReports::$config['mail_settings']['method'])) PhpReports::$config['mail_settings']['method'] = 'mail';\n\n\t\tswitch(PhpReports::$config['mail_settings']['method']) {\n\t\t\tcase 'mail':\n\t\t\t\treturn Swift_MailTransport::newInstance();\n\t\t\tcase 'sendmail':\n\t\t\t\treturn Swift_MailTransport::newInstance(\n\t\t\t\t\tisset(PhpReports::$config['mail_settings']['command'])? PhpReports::$config['mail_settings']['command'] : '/usr/sbin/sendmail -bs'\n\t\t\t\t);\n\t\t\tcase 'smtp':\n\t\t\t\tif(!isset(PhpReports::$config['mail_settings']['server'])) throw new Exception(\"SMTP server must be configured\");\n\t\t\t\t$transport = Swift_SmtpTransport::newInstance(\n\t\t\t\t\tPhpReports::$config['mail_settings']['server'],\n\t\t\t\t\tisset(PhpReports::$config['mail_settings']['port'])? PhpReports::$config['mail_settings']['port'] : 25\n\t\t\t\t);\n\n\t\t\t\t//if username/password\n\t\t\t\tif(isset(PhpReports::$config['mail_settings']['username'])) {\n\t\t\t\t\t$transport->setUsername(PhpReports::$config['mail_settings']['username']);\n\t\t\t\t\t$transport->setPassword(PhpReports::$config['mail_settings']['password']);\n\t\t\t\t}\n\n\t\t\t\t//if using encryption\n\t\t\t\tif(isset(PhpReports::$config['mail_settings']['encryption'])) {\n\t\t\t\t\t$transport->setEncryption(PhpReports::$config['mail_settings']['encryption']);\n\t\t\t\t}\n\n\t\t\t\treturn $transport;\n\t\t\tdefault:\n\t\t\t\tthrow new Exception(\"Mail method must be either 'mail', 'sendmail', or 'smtp'\");\n\t\t}\n\t}\n\n\t/**\n\t * Autoloader methods\n\t */\n\tpublic static function loader($className) {\n\t\tif(!isset(self::$loader_cache)) {\n\t\t\tself::buildLoaderCache();\n\t\t}\n\n\t\tif(isset(self::$loader_cache[$className])) {\n\t\t\trequire_once(self::$loader_cache[$className]);\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\tpublic static function buildLoaderCache() {\n\t\tself::load('classes/local');\n\t\tself::load('classes',array('classes/local'));\n\t\tself::load('lib');\n\t}\n\tpublic static function load($dir, $skip=array()) {\n\t\t$files = glob($dir.'/*.php');\n\t\t$dirs = glob($dir.'/*',GLOB_ONLYDIR);\n\n\n\t\tforeach($files as $file) {\n\t\t\t//for file names same as class name\n\t\t\t$className = basename($file,'.php');\n\t\t\tif(!isset(self::$loader_cache[$className])) self::$loader_cache[$className] = $file;\n\n\t\t\t//for PEAR style: Path_To_Class.php\n\t\t\t$parts = explode('/',substr($file,0,-4));\n\t\t\tarray_shift($parts);\n\t\t\t$className = implode('_',$parts);\n\t\t\t//if any of the directories in the path are lowercase, it isn't in PEAR format\n\t\t\tif(preg_match('/(^|_)[a-z]/',$className)) continue;\n\t\t\tif(!isset(self::$loader_cache[$className])) self::$loader_cache[$className] = $file;\n\t\t}\n\n\t\tforeach($dirs as $dir2) {\n\t\t\t//directories to skip\n\t\t\tif($dir2[0]==='.') continue;\n\t\t\tif(in_array($dir2,$skip)) continue;\n\t\t\tif(in_array(basename($dir2),array('tests','test','example','examples','bin'))) continue;\n\n\t\t\tself::load($dir2,$skip);\n\t\t}\n\t}\n\n\t/**\n\t * A more lenient json_decode than the built-in PHP one.\n\t * It supports strict JSON as well as javascript syntax (i.e. unquoted/single quoted keys, single quoted values, trailing commmas)\n\t */\n\tpublic static function json_decode($json, $assoc=false) {\n\t\t//replace single quoted values\n\t\t$json = preg_replace_callback('/:\\s*\\'(([^\\']|\\\\\\\\\\')*)\\'\\s*([},])/', function($matches) { return ':'.json_encode(stripslashes($matches[1])).$matches[3]; }, $json);\n\n\t\t//replace single quoted keys\n\t\t$json = preg_replace_callback('/\\'(([^\\']|\\\\\\\\\\')*)\\'\\s*:/', function($matches) {return json_encode(stripslashes($matches[1])).':';}, $json);\n\n\t\t//remove any line breaks in the code\n\t\t$json = str_replace(array(\"\\n\",\"\\r\"),\"\",$json);\n\n\t\t//replace non-quoted keys with double quoted keys\n\t\t$json = preg_replace('#(?<pre>\\{|\\[|,)\\s*(?<key>(?:\\w|_)+)\\s*:#im', '$1\"$2\":', $json);\n\n\t\t//remove trailing comma\n\t\t$json = preg_replace('/,\\s*\\}/','}',$json);\n\n\t\treturn json_decode($json, $assoc);\n\t}\n\n\tprotected static function urlDownload($url) {\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\t\t$output = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\treturn $output;\n\t}\n}\nPhpReports::init();\n"
  },
  {
    "path": "lib/PhpReports/Report.php",
    "content": "<?php\nclass Report {\n\tpublic $report;\n\tpublic $macros = array();\n\tpublic $exported_headers = array();\n\tpublic $options = array();\n\tpublic $is_ready = false;\n\tpublic $async = false;\n\tpublic $headers = array();\n\tpublic $header_lines = array();\n\tpublic $raw_query;\n\tpublic $use_cache;\n\t\n\tprotected $raw;\n\tprotected $raw_headers;\n\tprotected $filters = array();\n\tprotected $filemtime;\n\tprotected $has_run = false;\n\t\n\tpublic function __construct($report,$macros = array(), $environment = null, $use_cache = null) {\t\t\t\n\t\t$this->report = $report;\n\t\t\n\t\tif(!file_exists(self::getFileLocation($report))) {\n\t\t\tthrow new Exception('Report not found - '.$report);\n\t\t}\n\t\t\n\t\t$this->filemtime = filemtime(self::getFileLocation($report));\n\t\t\n\t\t$this->use_cache = $use_cache;\n\t\t\n\t\t//get the raw report file\n\t\t$this->raw = self::getReportFileContents($report);\n\t\t\n\t\t//if there are no headers in this report\n\t\tif(strpos($this->raw,\"\\n\\n\") === false) {\n\t\t\tthrow new Exception('Report missing headers - '.$report);\n\t\t}\n\t\t\n\t\t//split the raw report into headers and code\n\t\tlist($this->raw_headers, $this->raw_query) = explode(\"\\n\\n\",$this->raw,2);\n\t\t\n\t\t$this->macros = array();\n\t\tforeach($macros as $key=>$value) {\n\t\t\t$this->addMacro($key,$value);\n\t\t}\n\t\t\n\t\t$this->parseHeaders();\n\t\t\n\t\t$this->options['Environment'] = $environment;\n\t\t\n\t\t$this->initDb();\n\t\t\n\t\t$this->getTimeEstimate();\n\t}\n\t\n\tpublic static function getFileLocation($report) {\n\t\t//make sure the report path doesn't go up a level for security reasons\n\t\tif(strpos($report,\"..\")!==false) {\n\t\t\t$reportdir = realpath(PhpReports::$config['reportDir']).'/';\n\t\t\t$reportpath = substr(realpath(PhpReports::$config['reportDir'].'/'.$report),0,strlen($reportdir));\n\t\t\t\n\t\t\tif($reportpath !== $reportdir) throw new Exception('Invalid report - '.$report);\n\t\t}\n\t\t\n\t\t$reportDir = PhpReports::$config['reportDir'];\n\t\treturn $reportDir.'/'.$report;\n\t}\n\t\n\tpublic static function setReportFileContents($report, $new_contents) {\n\t\techo \"SAVING CONTENTS TO \".self::getFileLocation($report);\n\t\t\n\t\tif(!file_put_contents(self::getFileLocation($report),$new_contents)) {\n\t\t\tthrow new Exception(\"Failed to set report contents\");\n\t\t}\n\t\t\n\t\techo \"\\n\".$new_contents;\n\t}\n\tpublic static function getReportFileContents($report) {\n\t\t$contents = file_get_contents(self::getFileLocation($report));\n\t\t\n\t\t//convert EOL to unix format\n\t\treturn str_replace(array(\"\\r\\n\",\"\\r\"),\"\\n\",$contents);\n\t}\n\t\n\tpublic function getDatabase() {\n\t\tif(isset($this->options['Database']) && $this->options['Database']) {\n\t\t\t$environment = $this->getEnvironment();\n\t\t\t\n\t\t\tif(isset($environment[$this->options['Database']])) {\n\t\t\t\treturn $environment[$this->options['Database']];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn array();\n\t}\n\tpublic function getEnvironment() {\n\t\treturn PhpReports::$config['environments'][$this->options['Environment']];\n\t}\n\t\n\tpublic function addMacro($name, $value) {\n\t\t$this->macros[$name] = $value;\n\t}\n\tpublic function exportHeader($name,$params) {\n\t\t$this->exported_headers[] = array('name'=>$name,'params'=>$params);\n\t}\n\t\n\tpublic function getCacheKey() {\n\t\treturn FileSystemCache::generateCacheKey(array(\n\t\t\t'report'=>$this->report,\n\t\t\t'macros'=>$this->macros,\n\t\t\t'database'=>$this->options['Environment']\n\t\t),'report_results');\n\t}\n\tpublic function getReportTimesCacheKey() {\n\t\treturn FileSystemCache::generateCacheKey($this->report,'report_times');\n\t}\n\n\tprotected function retrieveFromCache() {\n\t\tif(!$this->use_cache || isset($_GET['nocache'])) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn FileSystemCache::retrieve($this->getCacheKey(),$this->filemtime);\n\t}\n\t\n\tprotected function storeInCache() {\n\t\tif(isset($this->options['Cache']) && is_numeric($this->options['Cache'])) {\n\t\t\t$ttl = intval($this->options['Cache']);\n\t\t}\n\t\telse {\n\t\t\t//default to caching things for 10 minutes\n\t\t\t$ttl = 600;\n\t\t}\n\t\t\n\t\tFileSystemCache::store($this->getCacheKey(), $this->options, $ttl);\n\t}\n\t\n\tprotected function parseHeaders() {\n\t\t//default the report to being ready\n\t\t//if undefined variables are found in the headers, set to false\n\t\t$this->is_ready = true;\n\t\t\n\t\t$this->options = array(\n\t\t\t'Filters'=>array(),\n\t\t\t'Variables'=>array(),\n\t\t\t'Includes'=>array(),\n\t\t);\n\t\t$this->headers = array();\n\t\t\n\t\t$lines = explode(\"\\n\",$this->raw_headers);\n\t\t\n\t\t//remove empty headers and remove comment characters\n\t\t$fixed_lines = array();\n\t\tforeach($lines as $line) {\n\t\t\tif(empty($line)) continue;\n\t\t\t\n\t\t\t//if the line doesn't start with a comment character, skip\n\t\t\tif(!in_array(substr($line,0,2),array('--','/*','//',' *')) && $line[0] !== '#') continue;\n\t\t\t\n\t\t\t//remove comment from start of line and skip if empty\n\t\t\t$line = trim(ltrim($line,\"-*/# \\t\"));\n\t\t\tif(!$line) continue;\n\t\t\t\n\t\t\t$fixed_lines[] = $line;\n\t\t}\n\t\t$lines = $fixed_lines;\n\t\t\n\t\t$name = null;\n\t\t$value = '';\n\t\tforeach($lines as $line) {\n\t\t\t$has_name_value = preg_match('/^\\s*[A-Z0-9_\\-]+\\s*\\:/',$line);\n\t\t\n\t\t\t//if this is the first header and not in the format name:value, assume it is the report name\n\t\t\tif(!$has_name_value && $name === null && (!isset($this->options['Name']) || !$this->options['Name'])) {\n\t\t\t\t$this->parseHeader('Info',array('name'=>$line));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//if this is a continuation of another header\n\t\t\t\tif(!$has_name_value) {\n\t\t\t\t\t$value .= \"\\n\".trim($line);\n\t\t\t\t}\n\t\t\t\t//if this is a new header\n\t\t\t\telse {\n\t\t\t\t\t//if the previous header didn't have a name, assume it is the description\n\t\t\t\t\tif($value && $name === null) {\n\t\t\t\t\t\t$this->parseHeader('Info',array('description'=>$value));\n\t\t\t\t\t}\n\t\t\t\t\t//otherwise, parse the previous header\n\t\t\t\t\telseif($value) {\n\t\t\t\t\t\t$this->parseHeader($name,$value);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlist($name,$value) = explode(':',$line,2);\n\t\t\t\t\t$name = trim($name);\n\t\t\t\t\t$value = trim($value);\n\t\t\t\t\n\t\t\t\t\tif(strtoupper($name) === $name) $name = ucfirst(strtolower($name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//parse the last header\n\t\tif($value && $name) {\n\t\t\t$this->parseHeader($name,$value);\n\t\t}\n\t\t\n\t\t//try to infer report type from file extension\n\t\tif(!isset($this->options['Type'])) {\n\t\t\t$tmp = explode('.',$this->report);\n\t\t\t$file_type = array_pop($tmp);\n\t\t\t\n\t\t\tif(!isset(PhpReports::$config['default_file_extension_mapping'][$file_type])) {\n\t\t\t\tthrow new Exception(\"Unknown report type - \".$this->report);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->options['Type'] = PhpReports::$config['default_file_extension_mapping'][$file_type];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!isset($this->options['Database'])) $this->options['Database'] = strtolower($this->options['Type']);\n\t\t\n\t\tif(!isset($this->options['Name'])) $this->options['Name'] = $this->report;\n\t}\n\t\n\tpublic function parseHeader($name,$value,$dataset=null) {\n\t\t$classname = $name.'Header';\n\t\tif(class_exists($classname)) {\n\t\t\tif($dataset !== null && isset($classname::$validation) && isset($classname::$validation['dataset'])) $value['dataset'] = $dataset;\n\t\t\t$classname::parse($name,$value,$this);\n\t\t\tif(!in_array($name,$this->headers)) $this->headers[] = $name;\n\t\t}\n\t\telse {\n\t\t\tthrow new Exception(\"Unknown header '$name' - \".$this->report);\n\t\t}\n\t}\n\t\n\tpublic function addFilter($dataset, $column, $type, $options) {\n\t\t// If adding for multiple datasets\n\t\tif(is_array($dataset)) {\n\t\t\tforeach($dataset as $d) {\n\t\t\t\t$this->addFilter($d,$column,$type,$options);\n\t\t\t}\n\t\t}\n\t\t// If adding for all datasets\n\t\telse if($dataset === true) {\n\t\t\t$this->addFilter('all',$column,$type,$options);\n\t\t}\n\t\t// If adding for a single dataset\n\t\telse {\n\t\t\tif(!isset($this->filters[$dataset])) $this->filters[$dataset] = array();\n\t\t\tif(!isset($this->filters[$dataset][$column])) $this->filters[$dataset][$column] = array();\n\t\t\t\n\t\t\t$this->filters[$dataset][$column][$type] = $options;\n\t\t}\n\t\t\n\t}\n\tprotected function applyFilters($dataset, $column, $value, $row) {\n\t\t// First, apply filters for all datasets\n\t\tif(isset($this->filters['all']) && isset($this->filters['all'][$column])) {\n\t\t\tforeach($this->filters['all'][$column] as $type=>$options) {\n\t\t\t\t$classname = $type.'Filter';\n\t\t\t\t$value = $classname::filter($value, $options, $this, $row);\n\t\t\t\t\n\t\t\t\t//if the column should not be displayed\n\t\t\t\tif($value === false) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Then apply filters for this specific dataset\n\t\tif(isset($this->filters[$dataset]) && isset($this->filters[$dataset][$column])) { \n\t\t\tforeach($this->filters[$dataset][$column] as $type=>$options) {\n\t\t\t\t$classname = $type.'Filter';\n\t\t\t\t$value = $classname::filter($value, $options, $this, $row);\n\t\t\t\t\n\t\t\t\t//if the column should not be displayed\n\t\t\t\tif($value === false) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $value;\n\t}\n\t\n\tprotected function initDb() {\n\t\t//if the database isn't set, use the first defined one from config\n\t\t$environments = PhpReports::$config['environments'];\n\t\tif(!$this->options['Environment']) {\n\t\t\t$this->options['Environment'] = current(array_keys($environments));\n\t\t}\n\t\t\n\t\t//set database options\n\t\t$environment_options = array();\n\t\tforeach($environments as $key=>$params) {\n\t\t\t$environment_options[] = array(\n\t\t\t\t'name'=>$key,\n\t\t\t\t'selected'=>$key===$this->options['Environment']\n\t\t\t);\n\t\t}\n\t\t$this->options['Environments'] = $environment_options;\n\t\t\n\t\t//add a host macro\n\t\tif(isset($environments[$this->options['Environment']]['host'])) {\n\t\t\t$this->macros['host'] = $environments[$this->options['Environment']]['host'];\n\t\t}\n\t\t\n\t\t$classname = $this->options['Type'].'ReportType';\n\t\t\n\t\tif(!class_exists($classname)) {\n\t\t\tthrow new exception(\"Unknown report type '\".$this->options['Type'].\"'\");\n\t\t}\n\t\t\n\t\t$classname::init($this);\n\t}\n\t\n\tpublic function getRaw() {\n\t\treturn $this->raw;\n\t}\n\tpublic function getUrl() {\n\t\treturn 'report/html/?report='.urlencode($this->report);\n\t}\n\t\n\tpublic function prepareVariableForm() {\n\t\t$vars = array();\n\t\t\n\t\tif($this->options['Variables']) {\n\t\t\tforeach($this->options['Variables'] as $var => $params) {\n\t\t\t\tif(!isset($params['name'])) $params['name'] = ucwords(str_replace(array('_','-'),' ',$var));\n\t\t\t\tif(!isset($params['type'])) $params['type'] = 'string';\n\t\t\t\tif(!isset($params['options'])) $params['options'] = false;\n\t\t\t\t$params['value'] = $this->macros[$var];\n\t\t\t\t$params['key'] = $var;\n\t\t\t\t\n\t\t\t\tif($params['type'] === 'select') {\n\t\t\t\t\t$params['is_select'] = true;\n\t\t\t\t\t\n\t\t\t\t\tforeach($params['options'] as $key=>$option) {\n\t\t\t\t\t\tif(!is_array($option)) {\n\t\t\t\t\t\t\t$params['options'][$key] = array(\n\t\t\t\t\t\t\t\t'display'=>$option,\n\t\t\t\t\t\t\t\t'value'=>$option\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($params['options'][$key]['value'] == $params['value']) $params['options'][$key]['selected'] = true;\n\t\t\t\t\t\telseif(is_array($params['value']) && in_array($params['options'][$key]['value'],$params['value'])) $params['options'][$key]['selected'] = true;\n\t\t\t\t\t\telse $params['options'][$key]['selected'] = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($params['multiple']) {\n\t\t\t\t\t\t\t$params['is_multiselect'] = true;\n\t\t\t\t\t\t\t$params['choices'] = count($params['options']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif($params['multiple']) {\n\t\t\t\t\t\t$params['is_textarea'] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(isset($params['modifier_options'])) {\n\t\t\t\t\t$modifier_value = isset($this->macros[$var.'_modifier'])? $this->macros[$var.'_modifier'] : null;\n\t\t\t\t\t\n\t\t\t\t\tforeach($params['modifier_options'] as $key=>$option) {\n\t\t\t\t\t\tif(!is_array($option)) {\n\t\t\t\t\t\t\t$params['modifier_options'][$key] = array(\n\t\t\t\t\t\t\t\t'display'=>$option,\n\t\t\t\t\t\t\t\t'value'=>$option\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($params['modifier_options'][$key]['value'] == $modifier_value) $params['modifier_options'][$key]['selected'] = true;\n\t\t\t\t\t\telse $params['modifier_options'][$key]['selected'] = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$vars[] = $params;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\treturn $vars;\n\t}\n\t\n\tprotected function _runReport() {\n\t\tif(!$this->is_ready) {\n\t\t\tthrow new Exception(\"Report is not ready.  Missing variables\");\n\t\t}\n\t\t\n\t\tPhpReports::setVar('Report',$this);\n\t\t\n\t\t//release the write lock on the session file\n\t\t//so the session isn't locked while the report is running\n\t\tsession_write_close();\n\t\t\n\t\t$classname = $this->options['Type'].'ReportType';\n\t\t\n\t\tif(!class_exists($classname)) {\n\t\t\tthrow new exception(\"Unknown report type '\".$this->options['Type'].\"'\");\n\t\t}\n\t\t\n\t\tforeach($this->headers as $header) {\n\t\t\t$headerclass = $header.'Header';\n\t\t\t$headerclass::beforeRun($this);\n\t\t}\n\t\t\n\t\t$classname::openConnection($this);\n\t\t$datasets = $classname::run($this);\t\t\n\t\t$classname::closeConnection($this);\n\t\t\n\t\t// Convert old single dataset format to multi-dataset format\n\t\tif(!isset($datasets[0]['rows']) || !is_array($datasets[0]['rows'])) {\n\t\t\t$datasets = array(\n\t\t\t\tarray(\n\t\t\t\t\t'rows'=>$datasets\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t// Only include a subset of datasets\n\t\t$include = array_keys($datasets);\n\t\tif(isset($_GET['dataset'])) {\n\t\t\t$include = array($_GET['dataset']);\n\t\t}\n\t\telseif(isset($_GET['datasets'])) {\n\t\t\t// If just a single dataset was specified, make it an array\n\t\t\tif(!is_array($_GET['datasets'])) {\n\t\t\t\t$include = explode(',',$_GET['datasets']);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$include = $_GET['datasets'];\n\t\t\t}\n\t\t}\n\n\t\t$this->options['DataSets'] = array();\n\t\tforeach($include as $i) {\n\t\t\tif(!isset($datasets[$i])) continue;\n\t\t\t$this->options['DataSets'][$i] = $datasets[$i];\n\t\t}\n\n\t\t$this->parseDynamicHeaders();\n\t}\n\n\tprotected function parseDynamicHeaders() {\n\t\tforeach($this->options['DataSets'] as $i=>&$dataset) {\n\t\t\tif(isset($dataset['headers'])) {\n\t\t\t\tforeach($dataset['headers'] as $j=>$header) {\n\t\t\t\t\tif(isset($header['header']) && isset($header['value'])) {\n\t\t\t\t\t\t$this->parseHeader($header['header'],$header['value'],$i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tprotected function getTimeEstimate() {\n\t\t$report_times = FileSystemCache::retrieve($this->getReportTimesCacheKey());\n\t\tif(!$report_times) return;\n\t\t\n\t\tsort($report_times);\n\t\t\n\t\t$sum = array_sum($report_times);\n\t\t$count = count($report_times);\n\t\t$average = $sum/$count;\n\t\t$quartile1 = $report_times[round(($count-1)/4)];\n\t\t$median = $report_times[round(($count-1)/2)];\n\t\t$quartile3 = $report_times[round(($count-1)*3/4)];\n\t\t$min = min($report_times);\n\t\t$max = max($report_times);\n\t\t$iqr = $quartile3-$quartile1;\n\t\t$range = (1.5)*$iqr;\n\t\t\n\t\t$sample_square = 0;\n\t\tfor($i = 0; $i < $count; $i++) {\n\t\t\t$sample_square += pow($report_times[$i], 2);\n\t\t}\n\t\t$standard_deviation = sqrt($sample_square / $count - pow(($average), 2));\n\t\t\n\t\t$this->options['time_estimate'] = array(\n\t\t\t'times'=>$report_times,\n\t\t\t'count'=>$count,\n\t\t\t'min'=>round($min,2),\n\t\t\t'max'=>round($max,2),\n\t\t\t'median'=>round($median,2),\n\t\t\t'average'=>round($average,2),\n\t\t\t'q1'=>round($quartile1,2),\n\t\t\t'q3'=>round($quartile3,2),\n\t\t\t'iqr'=>round($range,2),\n\t\t\t'sum'=>round($sum,2),\n\t\t\t'stdev'=>round($standard_deviation,2)\n\t\t);\n\t}\n\tprotected function prepareDataSets() {\n\t\tforeach($this->options['DataSets'] as $i=>$dataset) {\n\t\t\t$this->prepareRows($i);\n\t\t}\n\t\tif(isset($this->options['DataSets'][0])) {\n\t\t\t$this->options['Rows'] = $this->options['DataSets'][0]['rows'];\n\t\t\t$this->options['Count'] = $this->options['DataSets'][0]['count'];\n\t\t}\n\t}\n\tprotected function prepareRows($dataset) {\n\t\t$rows = array();\n\t\t\n\t\t//generate list of all values for each numeric column\n\t\t//this is used to calculate percentiles/averages/etc.\n\t\t$vals = array();\n\t\tforeach($this->options['DataSets'][$dataset]['rows'] as $row) {\n\t\t\tforeach($row as $key=>$value) {\n\t\t\t\tif(!isset($vals[$key])) $vals[$key] = array();\n\t\t\t\t\n\t\t\t\tif(is_numeric($value)) $vals[$key][] = $value;\n\t\t\t}\n\t\t}\n\t\t$this->options['DataSets'][$dataset]['values'] = $vals;\n\t\t\n\t\tforeach($this->options['DataSets'][$dataset]['rows'] as $row) {\n\t\t\t$rowval = array();\n\t\t\t\n\t\t\t$i=1;\n\t\t\tforeach($row as $key=>$value) {\n\t\t\t\t$val = new ReportValue($i, $key, $value);\n\t\t\t\t\n\t\t\t\t//apply filters for the column key\n\t\t\t\t$val = $this->applyFilters($dataset,$key,$val,$row);\n\t\t\t\t//apply filters for the column position\n\t\t\t\tif($val) $val = $this->applyFilters($dataset,$i,$val,$row);\n\t\t\t\t\n\t\t\t\tif($val) {\n\t\t\t\t\t$rowval[] = $val;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\t$first = !$rows;\n\t\t\t\n\t\t\t$rows[] = array(\n\t\t\t\t'values'=>$rowval,\n\t\t\t\t'first'=>$first\n\t\t\t);\n\t\t}\n\t\t\n\t\t$this->options['DataSets'][$dataset]['rows'] = $rows;\n\t\t$this->options['DataSets'][$dataset]['count'] = count($rows);\n\t}\n\t\n\tpublic function run() {\n\t\tif($this->has_run) return true;\n\t\t\n\t\t//at this point, all the headers are parsed and we haven't run the report yet\n\t\tforeach($this->headers as $header) {\n\t\t\t$classname = $header.'Header';\n\t\t\t$classname::afterParse($this);\n\t\t}\n\t\t\n\t\t//record how long it takes to run the report\n\t\t$start = microtime(true);\n\t\t\n\t\tif($this->is_ready && !$this->async) {\n\t\t\t//if the report is cached\n\t\t\tif($options = $this->retrieveFromCache()) {\t\t\t\t\n\t\t\t\t$this->options = $options;\n\t\t\t\t$this->options['FromCache'] = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_runReport();\n\t\t\t\t$this->prepareDataSets();\n\t\t\t\t$this->storeInCache();\n\t\t\t}\n\n\t\t\t//add this to the list of recently run reports\n\t\t\t$recently_run_key = FileSystemCache::generateCacheKey('recently_run');\n\t\t\t$recently_run = FileSystemCache::retrieve($recently_run_key);\n\t\t\tif($recently_run === false) {\n\t\t\t\t$recently_run = array();\n\t\t\t}\n\t\t\tarray_unshift($recently_run,$this->report);\n\t\t\tif(count($recently_run) > 200) $recently_run = array_slice($recently_run,0,200);\n\t\t\tFileSystemCache::store($recently_run_key,$recently_run);\n\t\t}\n\t\t\n\t\t//call the beforeRender callback for each header\n\t\tforeach($this->headers as $header) {\n\t\t\t$classname = $header.'Header';\n\t\t\t$classname::beforeRender($this);\n\t\t}\n\t\t\n\t\t$this->options['Time'] = round(microtime(true) - $start,5);\n\t\t\n\t\tif($this->is_ready && !$this->async && !isset($this->options['FromCache'])) {\n\t\t\t//get current report times for this report\n\t\t\t$report_times = FileSystemCache::retrieve($this->getReportTimesCacheKey());\n\t\t\tif(!$report_times) $report_times = array();\n\t\t\t//only keep the last 10 times for each report\n\t\t\t//this keeps the timing data up to date and relevant\n\t\t\tif(count($report_times) > 10) array_shift($report_times);\n\t\t\t\n\t\t\t//store report times\n\t\t\t$report_times[] = $this->options['Time'];\n\t\t\tFileSystemCache::store($this->getReportTimesCacheKey(), $report_times);\n\t\t}\n\t\t\n\t\t$this->has_run = true;\n\t}\n\t\n\tpublic function renderReportPage($template='html/report', $additional_vars = array()) {\n\t\t$this->run();\n\t\t\n\t\t$template_vars = array(\n\t\t\t'is_ready'=>$this->is_ready,\n\t\t\t'async'=>$this->async,\n\t\t\t'report_url'=>PhpReports::$request->base.'/report/?'.$_SERVER['QUERY_STRING'],\n\t\t\t'report_querystring'=>$_SERVER['QUERY_STRING'],\n\t\t\t'base'=>PhpReports::$request->base,\n\t\t\t'report'=>$this->report,\n\t\t\t'vars'=>$this->prepareVariableForm(),\n\t\t\t'macros'=>$this->macros,\n\t\t);\n\t\t\n\t\t$template_vars = array_merge($template_vars,$additional_vars);\n\t\t\n\t\t$template_vars = array_merge($template_vars,$this->options);\n\t\t\n\t\treturn PhpReports::render($template, $template_vars);\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/PhpReports/ReportFormatBase.php",
    "content": "<?php\nabstract class ReportFormatBase {\n\tabstract public static function display(&$report, &$request);\n\t\n\tpublic static function prepareReport($report) {\n\t\t$environment = $_SESSION['environment'];\n\n\t\t$macros = array();\n\t\tif(isset($_GET['macros'])) $macros = $_GET['macros'];\n\n\t\t$report = new Report($report,$macros,$environment);\n\n\t\treturn $report;\n\t}\n}\n"
  },
  {
    "path": "lib/PhpReports/ReportTypeBase.php",
    "content": "<?php\nabstract class ReportTypeBase {\n\tpublic static function init(&$report) {\n\t\t\n\t}\n\t\n\tpublic static function openConnection(&$report) {\n\t\t\n\t}\n\t\n\tpublic static function closeConnection(&$report) {\n\t\t\n\t}\n\t\n\tpublic static function getVariableOptions($params, &$report) {\n\t\treturn array();\n\t}\n\t\n\tabstract public static function run(&$report);\n}\n"
  },
  {
    "path": "lib/PhpReports/ReportValue.php",
    "content": "<?php\nclass ReportValue {\n\tpublic $key;\n\tpublic $i;\n\t\n\tpublic $original_value;\n\tpublic $filtered_value;\n\tpublic $html_value;\n\tpublic $chart_value;\n\t\n\tpublic $is_html;\n\tpublic $type;\n\t\n\tpublic $class;\n\t\n\tpublic function __construct($i, $key, $value) {\n\t\t$this->i = $i;\n\t\t$this->key = $key;\n\t\t$this->original_value = $value;\n\t\t$this->filtered_value = is_string($value)? strip_tags($value) : $value;\n\t\t$this->html_value = $value;\n\t\t$this->chart_value = $value;\n\t\t\n\t\t$this->is_html = false;\n\t\t$this->class = '';\n\t\t\n\t\t$this->type = $this->_getType();\n\t}\n\t\n\tpublic function addClass($class) {\n\t\t$this->class = trim($this->class . ' ' .$class);\n\t}\n\t\n\tpublic function setValue($value, $html = false) {\t\t\n\t\tif(is_string($value)) $value = trim($value);\n\t\t\n\t\tif($html) {\n\t\t\t$this->is_html = true;\n\t\t\t$this->html_value = $value;\n\t\t}\n\t\telse {\n\t\t\t$this->is_html = false;\n\t\t\t$this->filtered_value = is_string($value)? htmlentities($value) : $value;\n\t\t\t$this->html_value = $value;\n\t\t}\n\t\t\n\t\t$this->type = $this->_getType();\n\t}\n\t\n\tprotected function _getType($value=null) {\n\t\tif(is_null($value)) return null;\n\t\telseif(trim($value) === '') return null;\n\t\telseif(preg_match('/^([$%(\\-+\\s])*([0-9,]+(\\.[0-9]+)?|\\.[0-9]+)([$%(\\-+\\s])*$/',$value)) return 'number';\n\t\telseif(strtotime($value)) return 'date';\n\t\telse return 'string';\n\t}\n\tprotected function _getDisplayValue($value, $html=false, $date=false) {\n\t\t$type = $this->_getType($value);\n\t\t\n\t\tif($type === null) {\n\t\t\tif($html && $this->is_html) return '&nbsp;';\n\t\t\telse return null;\n\t\t}\n\t\telseif($type === 'number') {\n\t\t\treturn $value;\n\t\t}\n\t\telseif($type === 'date') {\n\t\t\tif($date) return date($date,strtotime($value));\n\t\t\telse return $value;\n\t\t}\n\t\telseif($type === 'string') {\n\t\t\treturn utf8_encode($value);\n\t\t}\n\t}\n\t\n\tpublic function getValue($html = false, $date = false) {\n\t\tif($html) {\n\t\t\t$return = $this->_getDisplayValue($this->html_value, true, $date);\n\n\t\t\tif($this->is_html) {\n\t\t\t\treturn $return;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn htmlentities($return);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn $this->_getDisplayValue($this->filtered_value, false, $date);\n\t\t}\n\t}\n\t\n\tpublic function getKeyCollapsed() {\n\t\treturn trim(preg_replace(array('/\\s+/','/[^a-zA-Z0-9_]*/'),array('_',''),$this->key),'_');\n\t}\n}\n"
  },
  {
    "path": "lib/adodb/pivottable.inc.php",
    "content": "<?php\n/** \n * @version V4.93 10 Oct 2006 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.\n * Released under both BSD license and Lesser GPL library license. \n * Whenever there is any discrepancy between the two licenses, \n * the BSD license will take precedence. \n *\n * Set tabs to 4 for best viewing.\n * \n*/\n\n/*\n * Concept from daniel.lucazeau@ajornet.com. \n *\n * @param db\t\tAdodb database connection\n * @param tables\tList of tables to join\n * @rowfields\t\tList of fields to display on each row\n * @colfield\t\tPivot field to slice and display in columns, if we want to calculate ranges, we pass in an array\n * @where\t\t\tWhere clause. Optional.\n * @aggfield\t\tThis is the field to sum. Optional. \n * @sumlabel\t\tPrefix to display in sum columns. Optional.\n * @aggfn\t\t\tAggregate function to use (could be AVG, SUM, COUNT)\n * @showcount\t\tShow count of records\n *\n * @returns\t\t\tSql generated\n */\n\nfunction PivotTableSQL(&$db, $tables, $rowfields, $colfield, $where = false, $orderBy = false, $limit = false,\n                        $aggfield = false, $sumlabel = \"Sum {}\", $aggfn = \"SUM\", $includeaggfield = true, $showcount = true) {\n\tif ($aggfield) {\n        $hidecnt = true;\n    } else {\n        $hidecnt = false;\n    }\n\n    $sumlabel = is_null($sumlabel) ? \"Sum {}\" : $sumlabel;\n    $aggfn = is_null($aggfn) ? \"SUM\" : $aggfn;\n\t\n\t$iif = strpos($db->databaseType,'access') !== false; \n\t// note - vfp 6 still doesn' work even with IIF enabled || $db->databaseType == 'vfp';\n\t\n \tif ($where) $where = \"\\nWHERE $where\";\n\tif (!is_array($colfield)) $colarr = $db->GetCol(\"select distinct $colfield from $tables $where order by 1\");\n\t$hidecnt = $aggfield ? true : false;\n\t\n\t$sel = \"$rowfields, \";\n\tif (is_array($colfield)) {\n\t\tforeach ($colfield as $k => $v) {\n\t\t\t$k = trim($k);\n\t\t\tif (!$hidecnt) {\n\t\t\t\t$sel .= $iif ? \n\t\t\t\t\t\"\\n\\t$aggfn(IIF($v,1,0)) AS \\\"$k\\\", \"\n\t\t\t\t\t:\n\t\t\t\t\t\"\\n\\t$aggfn(CASE WHEN $v THEN 1 ELSE 0 END) AS \\\"$k\\\", \";\n\t\t\t}\n\t\t\tif ($aggfield) {\n\t\t\t\t$sel .= $iif ?\n\t\t\t\t\t\"\\n\\t$aggfn(IIF($v,$aggfield,0)) AS \\\"$sumlabel$k\\\", \"\n\t\t\t\t\t:\n\t\t\t\t\t\"\\n\\t$aggfn(CASE WHEN $v THEN $aggfield ELSE 0 END) AS \\\"$sumlabel$k\\\", \";\n\t\t\t}\n\t\t} \n\t} else {\n\t\tforeach ($colarr as $v) {\n\t\t\tif (!is_numeric($v)) $vq = $db->qstr($v);\n\t\t\telse $vq = $v;\n\t\t\t$v = trim($v);\n\t\t\tif (strlen($v) == 0\t) $v = 'null';\n\t\t\tif (!$hidecnt) {\n\t\t\t\t$sel .= $iif ?\n\t\t\t\t\t\"\\n\\t$aggfn(IIF($colfield=$vq,1,0)) AS \\\"$v\\\", \"\n\t\t\t\t\t:\n\t\t\t\t\t\"\\n\\t$aggfn(CASE WHEN $colfield=$vq THEN 1 ELSE 0 END) AS \\\"$v\\\", \";\n\t\t\t}\n\t\t\tif ($aggfield) {\n\t\t\t\tif ($hidecnt) $label = $v;\n\t\t\t\telse $label = \"{$v}_$aggfield\";\n\t\t\t\t$sel .= $iif ?\n\t\t\t\t\t\"\\n\\t$aggfn(IIF($colfield=$vq,$aggfield,0)) AS \\\"$label\\\", \"\n\t\t\t\t\t:\n\t\t\t\t\t\"\\n\\t$aggfn(CASE WHEN $colfield=$vq THEN $aggfield ELSE 0 END) AS \\\"$label\\\", \";\n\t\t\t}\n\t\t}\n\t}\n\tif ($includeaggfield && ($aggfield && $aggfield != '1')) {\n\t\t$agg = \"$aggfn($aggfield)\";\n        if (strstr($sumlabel, '{}')) {\n            $sumlabel = trim($sumlabel, ' \\t\\n\\r\\0\\x0B{}').' '.trim($aggfield);\n        }\n        $sel .= \"\\n\\t$agg AS \\\"$sumlabel\\\", \";\n\t}\n\t\n\tif ($showcount) {\n\t\t$sel .= \"\\n\\tSUM(1) as Total\";\n    } else {\n\t\t$sel = substr($sel,0,strlen($sel)-2);\n    }\n\n    if ($orderBy) {\n        $orderSql = \"\\nORDER BY $orderBy\";\n    }\n    if ($limit) {\n        if (is_numeric($limit)) {\n            $limitSql = \"\\nLIMIT $limit\";\n        } else {\n            $limitSql = \"\\n-- LIMIT was declared as non-numeric value\\n\";\n        }\n    }\n\n\t// Strip aliases\n\t$rowfields = preg_replace('/\\s+AS\\s+[\\'\\\"]?[\\w\\s]+[\\'\\\"]?/i', '', $rowfields);\n\t\n\t$sql = \"SELECT $sel \\nFROM $tables $where \\nGROUP BY $rowfields $orderSql $limitSql\";\n\t\n\treturn $sql;\n}\n"
  },
  {
    "path": "lib/simplediff/SimpleDiff.php",
    "content": "<?php\n\n/*\n\tPaul's Simple Diff Algorithm v 0.1\n\t(C) Paul Butler 2007 <http://www.paulbutler.org/>\n\tMay be used and distributed under the zlib/libpng license.\n\t\n\tThis code is intended for learning purposes; it was written with short\n\tcode taking priority over performance. It could be used in a practical\n\tapplication, but there are a few ways it could be optimized.\n\t\n\tGiven two arrays, the function diff will return an array of the changes.\n\tI won't describe the format of the array, but it will be obvious\n\tif you use print_r() on the result of a diff on some test data.\n\t\n\thtmlDiff is a wrapper for the diff command, it takes two strings and\n\treturns the differences in HTML. The tags used are <ins> and <del>,\n\twhich can easily be styled with CSS.  \n*/\n\nclass SimpleDiff {\n\tfunction diff($old, $new){\n\t\t$maxlen = 0;\n\t\tforeach($old as $oindex => $ovalue){\n\t\t\t$nkeys = array_keys($new, $ovalue);\n\t\t\tforeach($nkeys as $nindex){\n\t\t\t\t$matrix[$oindex][$nindex] = isset($matrix[$oindex - 1][$nindex - 1]) ?\n\t\t\t\t\t$matrix[$oindex - 1][$nindex - 1] + 1 : 1;\n\t\t\t\tif($matrix[$oindex][$nindex] > $maxlen){\n\t\t\t\t\t$maxlen = $matrix[$oindex][$nindex];\n\t\t\t\t\t$omax = $oindex + 1 - $maxlen;\n\t\t\t\t\t$nmax = $nindex + 1 - $maxlen;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\tif($maxlen == 0) return array(array('d'=>$old, 'i'=>$new));\n\t\treturn array_merge(\n\t\t\tself::diff(array_slice($old, 0, $omax), array_slice($new, 0, $nmax)),\n\t\t\tarray_slice($new, $nmax, $maxlen),\n\t\t\tself::diff(array_slice($old, $omax + $maxlen), array_slice($new, $nmax + $maxlen))\n\t\t);\n\t}\n\n\tfunction htmlDiff($old, $new){\n\t\t$ret = '';\n\t\t$diff = self::diff(explode(\" \", $old), explode(\" \", $new));\n\t\tforeach($diff as $k){\n\t\t\tif(is_array($k))\n\t\t\t\t$ret .= (!empty($k['d'])?\"<del>\".implode(\" \",array_map('htmlentities',$k['d'])).\"</del> \":'').\n\t\t\t\t\t(!empty($k['i'])?\"<ins>\".implode(\" \",array_map('htmlentities',$k['i'])).\"</ins> \":'');\n\t\t\telse $ret .= htmlentities($k) . \" \";\n\t\t}\n\t\treturn $ret;\n\t}\n\t\n\tprotected function hasChange($diff, $i, $before=0, $after=0) {\n\t\tif($before) if(self::hasChange($diff, $i-1, $before -1, 0)) return true;\n\t\tif($after) if(self::hasChange($diff, $i+1, 0, $after -1)) return true;\n\t\t\n\t\tif(!isset($diff[$i])) return false;\n\t\tif(!is_array($diff[$i])) return false;\n\t\tif($diff[$i]['i'] || $diff[$i]['d']) return true;\n\t\telse return false;\n\t}\n\t\n\tfunction htmlDiffSummary($old, $new){\n\t\t$ret = '';\n\t\t$diff = self::diff(explode(\"\\n\", $old), explode(\"\\n\", $new));\n\t\t\n\t\t$diff_section = false;\n\t\t\n\t\tforeach($diff as $i=>$k){\n\t\t\t//if we are within 1 lines of a change\n\t\t\tif(self::hasChange($diff,$i,1,1)) {\n\t\t\t\t//if we aren't already in a diff section, start it\n\t\t\t\tif(!$diff_section) {\n\t\t\t\t\t$diff_section = true;\n\t\t\t\t\t$ret .= \"<div class='section'><div class='line_number'>Line $i</div>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//close the diff section\n\t\t\t\t$diff_section = false;\n\t\t\t\t$ret .= \"</div>\";\n\t\t\t}\n\t\t\t\n\t\t\tif(is_array($k))\n\t\t\t\t$ret .= (!empty($k['d'])?\"<del>\".implode(\"\\n\",array_map('htmlentities',$k['d'])).\"</del>\\n\":'').\n\t\t\t\t\t(!empty($k['i'])?\"<ins>\".implode(\"\\n\",array_map('htmlentities',$k['i'])).\"</ins>\\n\":'');\n\t\t\telseif($diff_section) {\n\t\t\t\t$ret .= htmlentities($k) . \"\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($diff_section) $ret .= \"</div>\";\n\t\t\n\t\treturn $ret;\n\t}\n}\n?>\n"
  },
  {
    "path": "public/css/bootstrap-multiselect.css",
    "content": ".multiselect-container{position:absolute;list-style-type:none;margin:0;padding:0}.multiselect-container input[type=\"text\"]{width:70%}.multiselect-container .input-prepend{padding:3px}.multiselect-container>li{padding:0}.multiselect-container>li>label{margin:0;padding:3px 20px 3px 20px;height:100%;cursor:pointer}.multiselect-container>li>label.multiselect-header{margin:0;padding:3px 20px 3px 20px;height:100%}.multiselect-container>li>label>input[type=\"checkbox\"]{margin-bottom:5px}"
  },
  {
    "path": "public/css/datepicker.css",
    "content": " /*\n\tDatepicker for Bootstrap\n\tCopyright 2012 Stefan Petre\n\tLicensed under the Apache License v2.0\n\thttp://www.apache.org/licenses/LICENSE-2.0\n*/\n .datepicker { top: 0; left: 0; padding: 4px; margin-top: 1px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; /*.dow { border-top: 1px solid #ddd !important; }*/ } .datepicker:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #ccc; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; top: -7px; left: 6px; } .datepicker:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #ffffff; position: absolute; top: -6px; left: 7px; } .datepicker > div { display: none; } .datepicker table { width: 100%; margin: 0; } .datepicker td, .datepicker th { text-align: center; width: 20px; height: 20px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .datepicker td.day:hover { background: #eeeeee; cursor: pointer; } .datepicker td.old, .datepicker td.new { color: #999999; } .datepicker td.active, .datepicker td.active:hover { background-color: #006dcc; background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-image: -ms-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); background-image: linear-gradient(top, #0088cc, #0044cc); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker td.active:hover, .datepicker td.active:hover:hover, .datepicker td.active:active, .datepicker td.active:hover:active, .datepicker td.active.active, .datepicker td.active:hover.active, .datepicker td.active.disabled, .datepicker td.active:hover.disabled, .datepicker td.active[disabled], .datepicker td.active:hover[disabled] { background-color: #0044cc; } .datepicker td.active:active, .datepicker td.active:hover:active, .datepicker td.active.active, .datepicker td.active:hover.active { background-color: #003399 \\9; } .datepicker td span { display: block; width: 47px; height: 54px; line-height: 54px; float: left; margin: 2px; cursor: pointer; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .datepicker td span:hover { background: #eeeeee; } .datepicker td span.active { background-color: #006dcc; background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-image: -ms-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); background-image: linear-gradient(top, #0088cc, #0044cc); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker td span.active:hover, .datepicker td span.active:active, .datepicker td span.active.active, .datepicker td span.active.disabled, .datepicker td span.active[disabled] { background-color: #0044cc; } .datepicker td span.active:active, .datepicker td span.active.active { background-color: #003399 \\9; } .datepicker td span.old { color: #999999; } .datepicker th.switch { width: 145px; } .datepicker th.next, .datepicker th.prev { font-size: 19.5px; } .datepicker thead tr:first-child th { cursor: pointer; } .datepicker thead tr:first-child th:hover { background: #eeeeee; } .input-append.date .add-on i, .input-prepend.date .add-on i { display: block; cursor: pointer; width: 16px; height: 16px; }"
  },
  {
    "path": "public/css/daterangepicker-bs3.css",
    "content": "/*!\n * Stylesheet for the Date Range Picker, for use with Bootstrap 3.x\n *\n * Copyright 2013 Dan Grossman ( http://www.dangrossman.info )\n * Licensed under the Apache License v2.0\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Built for http://www.improvely.com\n */\n\n.daterangepicker.dropdown-menu {\n    max-width: none;\n    z-index: 3000;\n}\n\n.daterangepicker.opensleft .ranges, .daterangepicker.opensleft .calendar {\n    float: left;\n    margin: 4px;\n}\n\n.daterangepicker.opensright .ranges, .daterangepicker.opensright .calendar {\n    float: right;\n    margin: 4px;\n}\n\n.daterangepicker .ranges {\n    width: 160px;\n    text-align: left;\n}\n\n.daterangepicker .ranges .range_inputs>div {\n    float: left;\n}\n\n.daterangepicker .ranges .range_inputs>div:nth-child(2) {\n    padding-left: 11px;\n}\n\n.daterangepicker .calendar {\n    display: none;\n    max-width: 270px;\n}\n\n.daterangepicker .calendar.single .calendar-date {\n    border: none;\n}\n\n.daterangepicker .calendar th, .daterangepicker .calendar td {\n    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n    white-space: nowrap;\n    text-align: center;\n    min-width: 32px;\n}\n\n.daterangepicker .ranges label {\n    color: #333;\n    display: block;\n    font-size: 11px;\n    font-weight: normal;\n    height: 20px;\n    line-height: 20px;\n    margin-bottom: 2px;\n    text-shadow: #fff 1px 1px 0px;\n    text-transform: uppercase;\n    width: 74px;\n}\n\n.daterangepicker .ranges input {\n    font-size: 11px;\n}\n\n.daterangepicker .ranges .input-mini {\n    background-color: #eee;\n    border: 1px solid #ccc;\n    border-radius: 4px;\n    color: #555;\n    display: block;\n    font-size: 11px;\n    height: 30px;\n    line-height: 30px;\n    vertical-align: middle;\n    margin: 0 0 10px 0;\n    padding: 0 6px;\n    width: 74px;\n}\n\n.daterangepicker .ranges ul {\n    list-style: none;\n    margin: 0;\n    padding: 0;\n}\n\n.daterangepicker .ranges li {\n    font-size: 13px;\n    background: #f5f5f5;\n    border: 1px solid #f5f5f5;\n    color: #08c;\n    padding: 3px 12px;\n    margin-bottom: 8px;\n    -webkit-border-radius: 5px;\n    -moz-border-radius: 5px;\n    border-radius: 5px;\n    cursor: pointer;\n}\n\n.daterangepicker .ranges li.active, .daterangepicker .ranges li:hover {\n    background: #08c;\n    border: 1px solid #08c;\n    color: #fff;\n}\n\n.daterangepicker .calendar-date {\n    border: 1px solid #ddd;\n    padding: 4px;\n    border-radius: 4px;\n    background: #fff;\n}\n\n.daterangepicker .calendar-time {\n    text-align: center;\n    margin: 8px auto 0 auto;\n    line-height: 30px;\n}\n\n.daterangepicker {\n    position: absolute;\n    background: #fff;\n    top: 100px;\n    left: 20px;\n    padding: 4px;\n    margin-top: 1px;\n    -webkit-border-radius: 4px;\n    -moz-border-radius: 4px;\n    border-radius: 4px;\n}\n\n.daterangepicker.opensleft:before {\n    position: absolute;\n    top: -7px;\n    right: 9px;\n    display: inline-block;\n    border-right: 7px solid transparent;\n    border-bottom: 7px solid #ccc;\n    border-left: 7px solid transparent;\n    border-bottom-color: rgba(0, 0, 0, 0.2);\n    content: '';\n}\n\n.daterangepicker.opensleft:after {\n    position: absolute;\n    top: -6px;\n    right: 10px;\n    display: inline-block;\n    border-right: 6px solid transparent;\n    border-bottom: 6px solid #fff;\n    border-left: 6px solid transparent;\n    content: '';\n}\n\n.daterangepicker.opensright:before {\n    position: absolute;\n    top: -7px;\n    left: 9px;\n    display: inline-block;\n    border-right: 7px solid transparent;\n    border-bottom: 7px solid #ccc;\n    border-left: 7px solid transparent;\n    border-bottom-color: rgba(0, 0, 0, 0.2);\n    content: '';\n}\n\n.daterangepicker.opensright:after {\n    position: absolute;\n    top: -6px;\n    left: 10px;\n    display: inline-block;\n    border-right: 6px solid transparent;\n    border-bottom: 6px solid #fff;\n    border-left: 6px solid transparent;\n    content: '';\n}\n\n.daterangepicker table {\n    width: 100%;\n    margin: 0;\n}\n\n.daterangepicker td, .daterangepicker th {\n    text-align: center;\n    width: 20px;\n    height: 20px;\n    -webkit-border-radius: 4px;\n    -moz-border-radius: 4px;\n    border-radius: 4px;\n    cursor: pointer;\n    white-space: nowrap;\n}\n\n.daterangepicker td.off {\n    color: #999;\n}\n\n.daterangepicker td.disabled {\n    color: #999;\n}\n\n.daterangepicker td.available:hover, .daterangepicker th.available:hover {\n    background: #eee;\n}\n\n.daterangepicker td.in-range {\n    background: #ebf4f8;\n    -webkit-border-radius: 0;\n    -moz-border-radius: 0;\n    border-radius: 0;\n}\n\n.daterangepicker td.active, .daterangepicker td.active:hover {\n    background-color: #357ebd;\n    border-color: #3071a9;\n    color: #fff;\n}\n\n.daterangepicker td.week, .daterangepicker th.week {\n    font-size: 80%;\n    color: #ccc;\n}\n\n.daterangepicker select.monthselect, .daterangepicker select.yearselect {\n    font-size: 12px;\n    padding: 1px;\n    height: auto;\n    margin: 0;\n    cursor: default;\n}\n\n.daterangepicker select.monthselect {\n    margin-right: 2%;\n    width: 56%;\n}\n\n.daterangepicker select.yearselect {\n    width: 40%;\n}\n\n.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.ampmselect {\n    width: 50px;\n    margin-bottom: 0;\n}\n\n.daterangepicker_start_input {\n    float: left;\n}\n\n.daterangepicker_end_input {\n    float: left;\n    padding-left: 11px\n}\n\n.daterangepicker th.month {\n    width: auto;\n}\n"
  },
  {
    "path": "public/css/jquery.dataTables.css",
    "content": "/*\n * Table styles\n */\ntable.dataTable {\n  width: auto;\n  clear: both;\n  border-collapse: separate;\n  border-spacing: 0;\n  /*\n   * Header and footer styles\n   */\n  /*\n   * Body styles\n   */\n}\n\ntable.dataTable thead {\n\tbackground-color: white;\n\tbox-shadow: 0 3px 15px rgba(0,0,0,.3);\n}\n\ntable.dataTable thead th,\ntable.dataTable tfoot th {\n  font-weight: bold;\n}\ntable.dataTable thead th,\ntable.dataTable thead td {\n  padding: 10px 18px;\n  border-bottom: 1px solid #111111;\n}\ntable.dataTable thead th:active,\ntable.dataTable thead td:active {\n  outline: none;\n}\ntable.dataTable tfoot th,\ntable.dataTable tfoot td {\n  padding: 10px 18px 6px 18px;\n  border-top: 1px solid #111111;\n}\ntable.dataTable thead .sorting_asc,\ntable.dataTable thead .sorting_desc,\ntable.dataTable thead .sorting {\n  cursor: pointer;\n  *cursor: hand;\n}\ntable.dataTable thead .sorting {\n  background: url(\"../images/sort_both.png\") no-repeat center right;\n}\ntable.dataTable thead .sorting_asc {\n  background: url(\"../images/sort_asc.png\") no-repeat center right;\n}\ntable.dataTable thead .sorting_desc {\n  background: url(\"../images/sort_desc.png\") no-repeat center right;\n}\ntable.dataTable thead .sorting_asc_disabled {\n  background: url(\"../images/sort_asc_disabled.png\") no-repeat center right;\n}\ntable.dataTable thead .sorting_desc_disabled {\n  background: url(\"../images/sort_desc_disabled.png\") no-repeat center right;\n}\ntable.dataTable tbody tr {\n  background-color: white;\n}\ntable.dataTable tbody tr.selected {\n  background-color: #b0bed9;\n}\ntable.dataTable tbody th,\ntable.dataTable tbody td {\n  padding: 8px 10px;\n}\ntable.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {\n  border-top: 1px solid #dddddd;\n}\ntable.dataTable.row-border tbody tr:first-child th,\ntable.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,\ntable.dataTable.display tbody tr:first-child td {\n  border-top: none;\n}\ntable.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td {\n  border-top: 1px solid #dddddd;\n  border-right: 1px solid #dddddd;\n}\ntable.dataTable.cell-border tbody tr th:first-child,\ntable.dataTable.cell-border tbody tr td:first-child {\n  border-left: 1px solid #dddddd;\n}\ntable.dataTable.cell-border tbody tr:first-child th,\ntable.dataTable.cell-border tbody tr:first-child td {\n  border-top: none;\n}\ntable.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {\n  background-color: #f9f9f9;\n}\ntable.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected {\n  background-color: #abb9d3;\n}\ntable.dataTable.hover tbody tr:hover,\ntable.dataTable.hover tbody tr.odd:hover,\ntable.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr:hover,\ntable.dataTable.display tbody tr.odd:hover,\ntable.dataTable.display tbody tr.even:hover {\n  background-color: whitesmoke;\n}\ntable.dataTable.hover tbody tr:hover.selected,\ntable.dataTable.hover tbody tr.odd:hover.selected,\ntable.dataTable.hover tbody tr.even:hover.selected, table.dataTable.display tbody tr:hover.selected,\ntable.dataTable.display tbody tr.odd:hover.selected,\ntable.dataTable.display tbody tr.even:hover.selected {\n  background-color: #a9b7d1;\n}\ntable.dataTable.order-column tbody tr > .sorting_1,\ntable.dataTable.order-column tbody tr > .sorting_2,\ntable.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,\ntable.dataTable.display tbody tr > .sorting_2,\ntable.dataTable.display tbody tr > .sorting_3 {\n  background-color: #f9f9f9;\n}\ntable.dataTable.order-column tbody tr.selected > .sorting_1,\ntable.dataTable.order-column tbody tr.selected > .sorting_2,\ntable.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,\ntable.dataTable.display tbody tr.selected > .sorting_2,\ntable.dataTable.display tbody tr.selected > .sorting_3 {\n  background-color: #acbad4;\n}\ntable.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 {\n  background-color: #f1f1f1;\n}\ntable.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {\n  background-color: #f3f3f3;\n}\ntable.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {\n  background-color: whitesmoke;\n}\ntable.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {\n  background-color: #a6b3cd;\n}\ntable.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {\n  background-color: #a7b5ce;\n}\ntable.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {\n  background-color: #a9b6d0;\n}\ntable.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {\n  background-color: #f9f9f9;\n}\ntable.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {\n  background-color: #fbfbfb;\n}\ntable.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {\n  background-color: #fdfdfd;\n}\ntable.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {\n  background-color: #acbad4;\n}\ntable.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {\n  background-color: #adbbd6;\n}\ntable.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {\n  background-color: #afbdd8;\n}\ntable.dataTable.display tbody tr:hover > .sorting_1,\ntable.dataTable.display tbody tr.odd:hover > .sorting_1,\ntable.dataTable.display tbody tr.even:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1,\ntable.dataTable.order-column.hover tbody tr.odd:hover > .sorting_1,\ntable.dataTable.order-column.hover tbody tr.even:hover > .sorting_1 {\n  background-color: #eaeaea;\n}\ntable.dataTable.display tbody tr:hover > .sorting_2,\ntable.dataTable.display tbody tr.odd:hover > .sorting_2,\ntable.dataTable.display tbody tr.even:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2,\ntable.dataTable.order-column.hover tbody tr.odd:hover > .sorting_2,\ntable.dataTable.order-column.hover tbody tr.even:hover > .sorting_2 {\n  background-color: #ebebeb;\n}\ntable.dataTable.display tbody tr:hover > .sorting_3,\ntable.dataTable.display tbody tr.odd:hover > .sorting_3,\ntable.dataTable.display tbody tr.even:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3,\ntable.dataTable.order-column.hover tbody tr.odd:hover > .sorting_3,\ntable.dataTable.order-column.hover tbody tr.even:hover > .sorting_3 {\n  background-color: #eeeeee;\n}\ntable.dataTable.display tbody tr:hover.selected > .sorting_1,\ntable.dataTable.display tbody tr.odd:hover.selected > .sorting_1,\ntable.dataTable.display tbody tr.even:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1,\ntable.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_1,\ntable.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_1 {\n  background-color: #a1aec7;\n}\ntable.dataTable.display tbody tr:hover.selected > .sorting_2,\ntable.dataTable.display tbody tr.odd:hover.selected > .sorting_2,\ntable.dataTable.display tbody tr.even:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2,\ntable.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_2,\ntable.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_2 {\n  background-color: #a2afc8;\n}\ntable.dataTable.display tbody tr:hover.selected > .sorting_3,\ntable.dataTable.display tbody tr.odd:hover.selected > .sorting_3,\ntable.dataTable.display tbody tr.even:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3,\ntable.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_3,\ntable.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_3 {\n  background-color: #a4b2cb;\n}\ntable.dataTable.no-footer {\n  border-bottom: 1px solid #111111;\n}\ntable.dataTable.nowrap th, table.dataTable.nowrap td {\n  white-space: nowrap;\n}\ntable.dataTable.compact thead th,\ntable.dataTable.compact thead td {\n  padding: 5px 9px;\n}\ntable.dataTable.compact tfoot th,\ntable.dataTable.compact tfoot td {\n  padding: 5px 9px 3px 9px;\n}\ntable.dataTable.compact tbody th,\ntable.dataTable.compact tbody td {\n  padding: 4px 5px;\n}\ntable.dataTable th.dt-left,\ntable.dataTable td.dt-left {\n  text-align: left;\n}\ntable.dataTable th.dt-center,\ntable.dataTable td.dt-center,\ntable.dataTable td.dataTables_empty {\n  text-align: center;\n}\ntable.dataTable th.dt-right,\ntable.dataTable td.dt-right {\n  text-align: right;\n}\ntable.dataTable th.dt-justify,\ntable.dataTable td.dt-justify {\n  text-align: justify;\n}\ntable.dataTable th.dt-nowrap,\ntable.dataTable td.dt-nowrap {\n  white-space: nowrap;\n}\ntable.dataTable thead th.dt-head-left,\ntable.dataTable thead td.dt-head-left,\ntable.dataTable tfoot th.dt-head-left,\ntable.dataTable tfoot td.dt-head-left {\n  text-align: left;\n}\ntable.dataTable thead th.dt-head-center,\ntable.dataTable thead td.dt-head-center,\ntable.dataTable tfoot th.dt-head-center,\ntable.dataTable tfoot td.dt-head-center {\n  text-align: center;\n}\ntable.dataTable thead th.dt-head-right,\ntable.dataTable thead td.dt-head-right,\ntable.dataTable tfoot th.dt-head-right,\ntable.dataTable tfoot td.dt-head-right {\n  text-align: right;\n}\ntable.dataTable thead th.dt-head-justify,\ntable.dataTable thead td.dt-head-justify,\ntable.dataTable tfoot th.dt-head-justify,\ntable.dataTable tfoot td.dt-head-justify {\n  text-align: justify;\n}\ntable.dataTable thead th.dt-head-nowrap,\ntable.dataTable thead td.dt-head-nowrap,\ntable.dataTable tfoot th.dt-head-nowrap,\ntable.dataTable tfoot td.dt-head-nowrap {\n  white-space: nowrap;\n}\ntable.dataTable tbody th.dt-body-left,\ntable.dataTable tbody td.dt-body-left {\n  text-align: left;\n}\ntable.dataTable tbody th.dt-body-center,\ntable.dataTable tbody td.dt-body-center {\n  text-align: center;\n}\ntable.dataTable tbody th.dt-body-right,\ntable.dataTable tbody td.dt-body-right {\n  text-align: right;\n}\ntable.dataTable tbody th.dt-body-justify,\ntable.dataTable tbody td.dt-body-justify {\n  text-align: justify;\n}\ntable.dataTable tbody th.dt-body-nowrap,\ntable.dataTable tbody td.dt-body-nowrap {\n  white-space: nowrap;\n}\n\ntable.dataTable,\ntable.dataTable th,\ntable.dataTable td {\n  -webkit-box-sizing: content-box;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}\n\n/*\n * Control feature layout\n */\n.dataTables_wrapper {\n  position: relative;\n  clear: both;\n  *zoom: 1;\n  zoom: 1;\n}\n.dataTables_wrapper .dataTables_length {\n  float: left;\n}\n.dataTables_wrapper .dataTables_filter {\n\tdisplay: inline-block;\n\n}\n.dataTables_wrapper .dataTables_filter input {\n  margin-left: 0.5em;\n}\n.dataTables_wrapper .dataTables_info {\n  clear: both;\n  padding-top: 0.755em;\n  display:inline-block;\n  margin-left: 20px;\n}\n.dataTables_wrapper .dataTables_paginate {\n  padding-top: 0.25em;\n}\n.dataTables_wrapper .dataTables_paginate .paginate_button {\n  box-sizing: border-box;\n  display: inline-block;\n  min-width: 1.5em;\n  padding: 0.5em 1em;\n  margin-left: 2px;\n  text-align: center;\n  text-decoration: none !important;\n  cursor: pointer;\n  *cursor: hand;\n  color: #333333 !important;\n  border: 1px solid transparent;\n}\n.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {\n  color: #333333 !important;\n  border: 1px solid #cacaca;\n  background-color: white;\n  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, gainsboro));\n  /* Chrome,Safari4+ */\n  background: -webkit-linear-gradient(top, white 0%, gainsboro 100%);\n  /* Chrome10+,Safari5.1+ */\n  background: -moz-linear-gradient(top, white 0%, gainsboro 100%);\n  /* FF3.6+ */\n  background: -ms-linear-gradient(top, white 0%, gainsboro 100%);\n  /* IE10+ */\n  background: -o-linear-gradient(top, white 0%, gainsboro 100%);\n  /* Opera 11.10+ */\n  background: linear-gradient(to bottom, white 0%, gainsboro 100%);\n  /* W3C */\n}\n.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {\n  cursor: default;\n  color: #666 !important;\n  border: 1px solid transparent;\n  background: transparent;\n  box-shadow: none;\n}\n.dataTables_wrapper .dataTables_paginate .paginate_button:hover {\n  color: white !important;\n  border: 1px solid #111111;\n  background-color: #585858;\n  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111111));\n  /* Chrome,Safari4+ */\n  background: -webkit-linear-gradient(top, #585858 0%, #111111 100%);\n  /* Chrome10+,Safari5.1+ */\n  background: -moz-linear-gradient(top, #585858 0%, #111111 100%);\n  /* FF3.6+ */\n  background: -ms-linear-gradient(top, #585858 0%, #111111 100%);\n  /* IE10+ */\n  background: -o-linear-gradient(top, #585858 0%, #111111 100%);\n  /* Opera 11.10+ */\n  background: linear-gradient(to bottom, #585858 0%, #111111 100%);\n  /* W3C */\n}\n.dataTables_wrapper .dataTables_paginate .paginate_button:active {\n  outline: none;\n  background-color: #2b2b2b;\n  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));\n  /* Chrome,Safari4+ */\n  background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);\n  /* Chrome10+,Safari5.1+ */\n  background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);\n  /* FF3.6+ */\n  background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);\n  /* IE10+ */\n  background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);\n  /* Opera 11.10+ */\n  background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);\n  /* W3C */\n  box-shadow: inset 0 0 3px #111;\n}\n.dataTables_wrapper .dataTables_processing {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  width: 100%;\n  height: 40px;\n  margin-left: -50%;\n  margin-top: -25px;\n  padding-top: 20px;\n  text-align: center;\n  font-size: 1.2em;\n  background-color: white;\n  background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));\n  /* Chrome,Safari4+ */\n  background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);\n  /* Chrome10+,Safari5.1+ */\n  background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);\n  /* FF3.6+ */\n  background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);\n  /* IE10+ */\n  background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);\n  /* Opera 11.10+ */\n  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);\n  /* W3C */\n}\n.dataTables_wrapper .dataTables_length,\n.dataTables_wrapper .dataTables_filter,\n.dataTables_wrapper .dataTables_info,\n.dataTables_wrapper .dataTables_processing,\n.dataTables_wrapper .dataTables_paginate {\n  color: #333333;\n}\n.dataTables_wrapper .dataTables_scroll {\n  clear: both;\n}\n.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {\n  *margin-top: -1px;\n  -webkit-overflow-scrolling: touch;\n}\n.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th > div.dataTables_sizing,\n.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td > div.dataTables_sizing {\n  height: 0;\n  overflow: hidden;\n  margin: 0 !important;\n  padding: 0 !important;\n}\n.dataTables_wrapper.no-footer .dataTables_scrollBody {\n  border-bottom: 1px solid #111111;\n}\n.dataTables_wrapper.no-footer div.dataTables_scrollHead table,\n.dataTables_wrapper.no-footer div.dataTables_scrollBody table {\n  border-bottom: none;\n}\n.dataTables_wrapper:after {\n  visibility: hidden;\n  display: block;\n  content: \"\";\n  clear: both;\n  height: 0;\n}\n\n@media screen and (max-width: 767px) {\n  .dataTables_wrapper .dataTables_info,\n  .dataTables_wrapper .dataTables_paginate {\n    float: none;\n    text-align: center;\n  }\n  .dataTables_wrapper .dataTables_paginate {\n    margin-top: 0.5em;\n  }\n}\n@media screen and (max-width: 640px) {\n  .dataTables_wrapper .dataTables_length,\n  .dataTables_wrapper .dataTables_filter {\n    float: none;\n    text-align: center;\n  }\n  .dataTables_wrapper .dataTables_filter {\n    margin-top: 0.5em;\n  }\n}\n\n\n\n"
  },
  {
    "path": "public/css/prettify.css",
    "content": ".com { color: #93a1a1; }\n.lit { color: #195f91; }\n.pun, .opn, .clo { color: #93a1a1; }\n.fun { color: #dc322f; }\n.str, .atv { color: #D14; }\n.kwd, .prettyprint .tag { color: #1e347b; }\n.typ, .atn, .dec, .var { color: teal; }\n.pln { color: #48484c; }\n\n.prettyprint {\n  padding: 8px;\n  background-color: #f7f7f9;\n  border: 1px solid #e1e1e8;\n}\n.prettyprint.linenums {\n  -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;\n     -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;\n          box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;\n}\n\n/* Specify class=linenums on a pre to get line numbering */\nol.linenums {\n  margin: 0 0 0 33px; /* IE indents via margin-left */\n}\nol.linenums li {\n  padding-left: 12px;\n  color: #bebec5;\n  line-height: 20px;\n  text-shadow: 0 1px 0 #fff;\n}"
  },
  {
    "path": "public/css/report.css",
    "content": "body {\n\tpadding-bottom: 200px;\n}\n.database_message {\n\tcolor: #999;\n}\n.result_table td .bar{\n\theight: 18px; \n\tdisplay:inline-block; \n\tmargin-right: 5px; \n\tvertical-align:middle;\n\tbackground: #6bba70; /* Old browsers */\n\tbackground: -moz-linear-gradient(top, #6bba70 0%, #255e2b 100%); /* FF3.6+ */\n\tbackground: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6bba70), color-stop(100%,#255e2b)); /* Chrome,Safari4+ */\n\tbackground: -webkit-linear-gradient(top, #6bba70 0%,#255e2b 100%); /* Chrome10+,Safari5.1+ */\n\tbackground: -o-linear-gradient(top, #6bba70 0%,#255e2b 100%); /* Opera 11.10+ */\n\tbackground: -ms-linear-gradient(top, #6bba70 0%,#255e2b 100%); /* IE10+ */\n\tbackground: linear-gradient(top, #6bba70 0%,#255e2b 100%); /* W3C */\n\tfilter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6bba70', endColorstr='#255e2b',GradientType=0 ); /* IE6-9 */\n}\n.result_table thead th {\n\tbackground-color: white;\n}\n\n.currency {\n\ttext-align:right;\n}\n\n.right {\n\ttext-align:right !important;\n}\n.left {\n\ttext-align:left !important;\n}\n.center {\n\ttext-align:center !important;\n}\n.show_query, #show_time_estimate, #query_holder {\n\tfont-size: .8em;\n}\n.waiting div {\n\ttext-align: center;\n\tpadding-bottom: 25px;\n\tbackground: url(\"../images/ajax-loader.gif\") no-repeat bottom center;\n}\npre {\n\twhite-space: pre-wrap;\t\t\t/* css-3 */\n\twhite-space: -moz-pre-wrap;\t\t/* Mozilla, since 1999 */\n\twhite-space: -pre-wrap;\t\t\t/* Opera 4-6 */\n\twhite-space: -o-pre-wrap;\t\t/* Opera 7 */\n\tword-wrap: break-word;\t\t\t/* Internet Explorer 5.5+ */\n}\n#variable_form label {\n\tvertical-align:top;\n}\n\n@media print {\n\tbody {\n\t\tpadding-top: 0 !important;\n\t}\n\t.navbar-fixed-top ,\n    #variable_form .btn-primary,\n    #content .export_links,\n    #report_content a[data-role=\"button\"],\n    a[data-role=\"button\"][data-target=\"#time_estimate_holder\"],\n    #report_content .dataTables_filter {\n\t\tdisplay: none !important;\n\t}\n}\n"
  },
  {
    "path": "public/css/report_list.css",
    "content": "#report_list a[name] {\n\tpadding: 0;\n\tmargin: 0;\n\theight: 5px;\n    visibility: hidden;\n}\n#report_list h2.no_title {\n\tfont-weight: normal;\n\tcolor: #999;\n}\n#report_list .nav-list h2 {\n\tfont-size: 1.6em;\n}\n#report_list .nav-list .nav-list h2 {\n\tfont-size: 1.3em;\n}\n#table_of_contents {\n    bottom: 0;\n    top: 50px;\n    position: fixed;\n    overflow-y: auto;\n}\n#report_list {\n    padding-bottom: 400px;\n}\n\n\n/*\n * Side navigation\n */\n\n/* All levels of nav */\n.bs-sidebar .nav > li > a {\n\tdisplay: block;\n\tcolor: #716b7a;\n\tpadding: 5px 20px;\n}\n.bs-sidebar .nav > li > a:hover,\n.bs-sidebar .nav > li > a:focus {\n\ttext-decoration: none;\n\tbackground-color: #e5e3e9;\n\tborder-right: 1px solid #dbd8e0;\n}\n.bs-sidebar .nav > .active > a,\n.bs-sidebar .nav > .active:hover > a,\n.bs-sidebar .nav > .active:focus > a {\n\tfont-weight: bold;\n\tcolor: #563d7c;\n\tbackground-color: transparent;\n\tborder-right: 1px solid #563d7c;\n}\n\n.bs-sidebar .nav .nav .nav {\n\tdisplay: none;\n\tmargin-bottom: 8px;\n}\n\n.bs-sidebar .nav .nav > li > a {\n\tpadding-top:    3px;\n\tpadding-bottom: 3px;\n\tpadding-left: 30px;\n\tfont-size: 90%;\n}\n\n/* Show and affix the side nav when space allows it */\n@media screen and (min-width: 992px) {\n\t.bs-sidebar .nav > .active > ul {\n\t\tdisplay: block;\n\t}\n\t/* Widen the fixed sidebar */\n\t.bs-sidebar.affix,\n\t.bs-sidebar.affix-bottom {\n\t\twidth: 213px;\n\t}\n\t.bs-sidebar.affix {\n\t\tposition: fixed; /* Undo the static from mobile first approach */\n\t\ttop: 80px;\n\t}\n\t.bs-sidebar.affix-bottom {\n\t\tposition: absolute; /* Undo the static from mobile first approach */\n\t}\n\t.bs-sidebar.affix-bottom .bs-sidenav,\n\t.bs-sidebar.affix .bs-sidenav {\n\t\tmargin-top: 0;\n\t\tmargin-bottom: 0;\n\t}\n}\n@media screen and (min-width: 1200px) {\n\t/* Widen the fixed sidebar again */\n\t.bs-sidebar.affix-bottom,\n\t.bs-sidebar.affix {\n\t\twidth: 263px;\n\t}\n}\n"
  },
  {
    "path": "public/css/timeline.css",
    "content": "body div.chart_color_10 {\r\n\tbackground-color: red;\r\n\tcolor: #1A1A1A;\r\n\tborder-color: darkred;\r\n}\r\nbody div.chart_color_2 {\r\n\tbackground-color: green;\r\n\tcolor: white;\r\n\tborder-color: darkgreen;\r\n}\r\nbody div.chart_color_3 {\r\n\tbackground-color: orange;\r\n\tcolor: #1A1A1A;\r\n\tborder-color: darkorange;\r\n}\r\nbody div.chart_color_4 {\r\n\tbackground-color: mediumpurple;\r\n\tcolor: #1A1A1A;\r\n\tborder-color: purple;\r\n}\r\nbody div.chart_color_5 {\r\n\tbackground-color: lightblue;\r\n\tcolor: #1A1A1A;\r\n\tborder-color: cornflowerblue;\r\n}\r\nbody div.chart_color_6 {\r\n\tbackground-color: #ffff00;\r\n\tcolor: #1A1A1A;\r\n\tborder-color: yellow;\r\n}\r\nbody div.chart_color_7 {\r\n\tbackground-color: violet;\r\n\tcolor: #1A1A1A;\r\n\tborder-color: darkviolet;\r\n}\r\nbody div.chart_color_8 {\r\n\tbackground-color: darkgreen;\r\n\tcolor: white;\r\n\tborder-color: green;\r\n}\r\nbody div.chart_color_9 {\r\n\tbackground-color: darkred;\r\n\tcolor: white;\r\n\tborder-color: red;\r\n}\r\n\r\ndiv.timeline-frame {\r\n    border: 1px solid #BEBEBE;\r\n    overflow: hidden;\r\n}\r\n\r\ndiv.timeline-axis {\r\n    border-color: #BEBEBE;\r\n    border-width: 1px;\r\n    border-top-style: solid;\r\n}\r\ndiv.timeline-axis-grid {\r\n    border-left-style: solid;\r\n    border-width: 1px;\r\n}\r\ndiv.timeline-axis-grid-minor {\r\n    border-color: #e5e5e5;\r\n}\r\ndiv.timeline-axis-grid-major {\r\n    border-color: #bfbfbf;\r\n}\r\ndiv.timeline-axis-text {\r\n    color: #4D4D4D;\r\n    padding: 3px;\r\n    white-space: nowrap;\r\n}\r\n\r\ndiv.timeline-axis-text-minor {\r\n}\r\n\r\ndiv.timeline-axis-text-major {\r\n}\r\n\r\ndiv.timeline-event {\r\n    color: #1A1A1A;\r\n    border-color: #97B0F8;\r\n    background-color: #D5DDF6;\r\n    display: inline-block;\r\n}\r\n\r\ndiv.timeline-event-selected {\r\n    border-color: #FFC200;\r\n    background-color: #FFF785;\r\n    z-index: 999;\r\n}\r\n\r\ndiv.timeline-event-cluster {\r\n    /* TODO: use another color or pattern? */\r\n    background: #97B0F8 url('img/cluster_bg.png');\r\n    color: white;\r\n}\r\ndiv.timeline-event-cluster div.timeline-event-dot {\r\n    border-color: #D5DDF6;\r\n}\r\n\r\ndiv.timeline-event-box {\r\n    text-align: center;\r\n    border-style: solid;\r\n    border-width: 1px;\r\n    border-radius: 5px;\r\n    -moz-border-radius: 5px; /* For Firefox 3.6 and older */\r\n}\r\n\r\ndiv.timeline-event-dot {\r\n    border-style: solid;\r\n    border-width: 5px;\r\n    border-radius: 5px;\r\n    -moz-border-radius: 5px;  /* For Firefox 3.6 and older */\r\n}\r\n\r\ndiv.timeline-event-range {\r\n    border-style: solid;\r\n    border-width: 1px;\r\n    border-radius: 2px;\r\n    -moz-border-radius: 2px;  /* For Firefox 3.6 and older */\r\n}\r\n\r\ndiv.timeline-event-range-drag-left {\r\n    cursor: w-resize;\r\n    z-index: 1000;\r\n}\r\n\r\ndiv.timeline-event-range-drag-right {\r\n    cursor: e-resize;\r\n    z-index: 1000;\r\n}\r\n\r\ndiv.timeline-event-line {\r\n    border-left-width: 1px;\r\n    border-left-style: solid;\r\n}\r\n\r\ndiv.timeline-event-content {\r\n    margin: 5px;\r\n    white-space: nowrap;\r\n    overflow: hidden;\r\n}\r\n\r\ndiv.timeline-groups-axis {\r\n    border-color: #BEBEBE;\r\n    border-width: 1px;\r\n}\r\n\r\ndiv.timeline-groups-axis-onleft {\r\n    border-style: none solid none none;\r\n}\r\n\r\ndiv.timeline-groups-axis-onright {\r\n    border-style: none none none solid;\r\n}\r\n\r\ndiv.timeline-groups-text {\r\n    color: #4D4D4D;\r\n    padding-left: 10px;\r\n    padding-right: 10px;\r\n}\r\n\r\ndiv.timeline-currenttime {\r\n    background-color: #FF7F6E;\r\n    width: 2px;\r\n}\r\n\r\ndiv.timeline-customtime {\r\n    background-color: #6E94FF;\r\n    width: 2px;\r\n    cursor: move;\r\n}\r\n\r\ndiv.timeline-navigation {\r\n    font-family: arial;\r\n    font-size: 20px;\r\n    font-weight: bold;\r\n    color: gray;\r\n\r\n    border: 1px solid #BEBEBE;\r\n    background-color: #F5F5F5;\r\n    border-radius: 2px;\r\n    -moz-border-radius: 2px;  /* For Firefox 3.6 and older */\r\n}\r\n\r\ndiv.timeline-navigation-new, div.timeline-navigation-delete,\r\ndiv.timeline-navigation-zoom-in,  div.timeline-navigation-zoom-out,\r\ndiv.timeline-navigation-move-left, div.timeline-navigation-move-right {\r\n    cursor: pointer;\r\n    padding: 10px 10px;\r\n    float: left;\r\n    text-decoration: none;\r\n    border-color: #BEBEBE; /* border is used for the separator between new and navigation buttons */\r\n\r\n    width: 16px;\r\n    height: 16px;\r\n}\r\n\r\ndiv.timeline-navigation-new {\r\n    background: url('img/16/new.png') no-repeat center;\r\n}\r\n\r\ndiv.timeline-navigation-new-line {\r\n    border-right: solid 1px;\r\n}\r\n\r\ndiv.timeline-navigation-delete {\r\n    padding: 0px;\r\n    padding-left: 5px;\r\n    background: url('img/16/delete.png') no-repeat center;\r\n}\r\n\r\ndiv.timeline-navigation-zoom-in {\r\n    background: url('img/16/zoomin.png') no-repeat center;\r\n}\r\n\r\ndiv.timeline-navigation-zoom-out {\r\n    background: url('img/16/zoomout.png') no-repeat center;\r\n}\r\n\r\ndiv.timeline-navigation-move-left {\r\n    background: url('img/16/moveleft.png') no-repeat center;\r\n}\r\n\r\ndiv.timeline-navigation-move-right {\r\n    background: url('img/16/moveright.png') no-repeat center;\r\n}\r\n"
  },
  {
    "path": "public/css/typeahead.js-bootstrap.css",
    "content": ".navbar-form[role=\"search\"] > .form-group {\n\twidth: 240px;\n}\n\n.twitter-typeahead {\n    width: 100%;\n    position: relative;\n}\n\n.twitter-typeahead .tt-query,\n.twitter-typeahead .tt-hint {\n    margin-bottom: 0;\n    width: 100%;\n    height: 100%;\n    position: absolute;\n    top: 0;\n    left: 0;\n}\n\n.twitter-typeahead .tt-hint {\n    color: #a1a1a1;\n    z-index: 1;\n    padding: 6px 12px;\n    border: 1px solid transparent;\n}\n\n.twitter-typeahead .tt-query {\n    z-index: 2;\n    border-radius: 4px !important;\n}\n\n.input-group-addon + .twitter-typeahead > .tt-query {\n    border-top-left-radius: 0!important;\n    border-bottom-left-radius: 0!important;\n}\n\n.input-group-appended > .twitter-typeahead > .tt-query {\n    border-top-right-radius: 0!important;\n    border-bottom-right-radius: 0!important;\n}\n\n.tt-input {\n\tz-index:999;\n}\n\n.tt-dropdown-menu {\n    min-width: 160px;\n    margin-top: 2px;\n    padding: 5px 0;\n    background-color: #fff;\n    border: 1px solid #ccc;\n    border: 1px solid rgba(0, 0, 0, .2);\n    *border-right-width: 2px;\n    *border-bottom-width: 2px;\n    -webkit-border-radius: 6px;\n    -moz-border-radius: 6px;\n    border-radius: 6px;\n    -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n    -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n    box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n    -webkit-background-clip: padding-box;\n    -moz-background-clip: padding;\n    background-clip: padding-box;\n}\n\n.tt-suggestion {\n    display: block;\n    padding: 3px 20px;\n}\n\n.tt-suggestion.tt-cursor {\n    color: #fff;\n    background-color: #0081c2;\n    background-image: -moz-linear-gradient(top, #0088cc, #0077b3);\n    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));\n    background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);\n    background-image: -o-linear-gradient(top, #0088cc, #0077b3);\n    background-image: linear-gradient(to bottom, #0088cc, #0077b3);\n    background-repeat: repeat-x;\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0)\n}\n\n.tt-suggestion.tt-cursor a {\n    color: #fff;\n}\n\n.tt-suggestion p {\n    margin: 0;\n}\n"
  },
  {
    "path": "public/js/ace/ace.js",
    "content": "(function(){function o(e){var i=function(e,t){return r(\"\",e,t)},s=t;e&&(t[e]||(t[e]={}),s=t[e]);if(!s.define||!s.define.packaged)n.original=s.define,s.define=n,s.define.packaged=!0;if(!s.require||!s.require.packaged)r.original=s.require,s.require=i,s.require.packaged=!0}var e=\"\",t=function(){return this}();if(!e&&typeof requirejs!=\"undefined\")return;var n=function(e,t,r){if(typeof e!=\"string\"){n.original?n.original.apply(window,arguments):(console.error(\"dropping module because define wasn't a string.\"),console.trace());return}arguments.length==2&&(r=t),n.modules||(n.modules={}),n.modules[e]=r},r=function(e,t,n){if(Object.prototype.toString.call(t)===\"[object Array]\"){var i=[];for(var o=0,u=t.length;o<u;++o){var a=s(e,t[o]);if(!a&&r.original)return r.original.apply(window,arguments);i.push(a)}n&&n.apply(null,i)}else{if(typeof t==\"string\"){var f=s(e,t);return!f&&r.original?r.original.apply(window,arguments):(n&&n(),f)}if(r.original)return r.original.apply(window,arguments)}},i=function(e,t){if(t.indexOf(\"!\")!==-1){var n=t.split(\"!\");return i(e,n[0])+\"!\"+i(e,n[1])}if(t.charAt(0)==\".\"){var r=e.split(\"/\").slice(0,-1).join(\"/\");t=r+\"/\"+t;while(t.indexOf(\".\")!==-1&&s!=t){var s=t;t=t.replace(/\\/\\.\\//,\"/\").replace(/[^\\/]+\\/\\.\\.\\//,\"\")}}return t},s=function(e,t){t=i(e,t);var s=n.modules[t];if(!s)return null;if(typeof s==\"function\"){var o={},u={id:t,uri:\"\",exports:o,packaged:!0},a=function(e,n){return r(t,e,n)},f=s(a,o,u);return o=f||u.exports,n.modules[t]=o,o}return s};o(e)})(),define(\"ace/ace\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/editor\",\"ace/edit_session\",\"ace/undomanager\",\"ace/virtual_renderer\",\"ace/multi_select\",\"ace/worker/worker_client\",\"ace/keyboard/hash_handler\",\"ace/placeholder\",\"ace/mode/folding/fold_mode\",\"ace/config\"],function(e,t,n){e(\"./lib/fixoldbrowsers\");var r=e(\"./lib/dom\"),i=e(\"./lib/event\"),s=e(\"./editor\").Editor,o=e(\"./edit_session\").EditSession,u=e(\"./undomanager\").UndoManager,a=e(\"./virtual_renderer\").VirtualRenderer,f=e(\"./multi_select\").MultiSelect;e(\"./worker/worker_client\"),e(\"./keyboard/hash_handler\"),e(\"./placeholder\"),e(\"./mode/folding/fold_mode\"),t.config=e(\"./config\"),t.require=e,t.edit=function(e){if(typeof e==\"string\"){var n=e,e=document.getElementById(n);if(!e)throw\"ace.edit can't find div #\"+n}if(e.env&&e.env.editor instanceof s)return e.env.editor;var o=t.createEditSession(r.getInnerText(e));e.innerHTML=\"\";var u=new s(new a(e));new f(u),u.setSession(o);var l={document:o,editor:u,onResize:u.resize.bind(u)};return i.addListener(window,\"resize\",l.onResize),e.env=u.env=l,u},t.createEditSession=function(e,t){var n=new o(e,n);return n.setUndoManager(new u),n},t.EditSession=o,t.UndoManager=u}),define(\"ace/lib/fixoldbrowsers\",[\"require\",\"exports\",\"module\",\"ace/lib/regexp\",\"ace/lib/es5-shim\"],function(e,t,n){e(\"./regexp\"),e(\"./es5-shim\")}),define(\"ace/lib/regexp\",[\"require\",\"exports\",\"module\"],function(e,t,n){function o(e){return(e.global?\"g\":\"\")+(e.ignoreCase?\"i\":\"\")+(e.multiline?\"m\":\"\")+(e.extended?\"x\":\"\")+(e.sticky?\"y\":\"\")}function u(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r<e.length;r++)if(e[r]===t)return r;return-1}var r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=r.exec.call(/()??/,\"\")[1]===undefined,s=function(){var e=/^/g;return r.test.call(e,\"\"),!e.lastIndex}();if(s&&i)return;RegExp.prototype.exec=function(e){var t=r.exec.apply(this,arguments),n,a;if(typeof e==\"string\"&&t){!i&&t.length>1&&u(t,\"\")>-1&&(a=RegExp(this.source,r.replace.call(o(this),\"g\",\"\")),r.replace.call(e.slice(t.index),a,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===undefined&&(t[e]=undefined)}));if(this._xregexp&&this._xregexp.captureNames)for(var f=1;f<t.length;f++)n=this._xregexp.captureNames[f-1],n&&(t[n]=t[f]);!s&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--}return t},s||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t})}),define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"],function(e,t,n){function m(e){try{return Object.defineProperty(e,\"sentinel\",{}),\"sentinel\"in e}catch(t){}}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!=\"function\")throw new TypeError;var r=o.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,u=n.apply(s,r.concat(o.call(arguments)));return u!==null&&Object(u)===u?u:s}return n.apply(t,r.concat(o.call(arguments)))};return i});var r=Function.prototype.call,i=Array.prototype,s=Object.prototype,o=i.slice,u=r.bind(s.toString),a=r.bind(s.hasOwnProperty),f,l,c,h,p;if(p=a(s,\"__defineGetter__\"))f=r.bind(s.__defineGetter__),l=r.bind(s.__defineSetter__),c=r.bind(s.__lookupGetter__),h=r.bind(s.__lookupSetter__);Array.isArray||(Array.isArray=function(t){return u(t)==\"[object Array]\"}),Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=D(this),r=arguments[1],i=0,s=n.length>>>0;if(u(t)!=\"[object Function]\")throw new TypeError;while(i<s)i in n&&t.call(r,n[i],i,n),i++}),Array.prototype.map||(Array.prototype.map=function(t){var n=D(this),r=n.length>>>0,i=Array(r),s=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var o=0;o<r;o++)o in n&&(i[o]=t.call(s,n[o],o,n));return i}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=D(this),r=n.length>>>0,i=[],s=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var o=0;o<r;o++)o in n&&t.call(s,n[o],o,n)&&i.push(n[o]);return i}),Array.prototype.every||(Array.prototype.every=function(t){var n=D(this),r=n.length>>>0,i=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var s=0;s<r;s++)if(s in n&&!t.call(i,n[s],s,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=D(this),r=n.length>>>0,i=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var s=0;s<r;s++)if(s in n&&t.call(i,n[s],s,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=D(this),r=n.length>>>0;if(u(t)!=\"[object Function]\")throw new TypeError;if(!r&&arguments.length==1)throw new TypeError;var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError}while(!0);for(;i<r;i++)i in n&&(s=t.call(void 0,s,n[i],i,n));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=D(this),r=n.length>>>0;if(u(t)!=\"[object Function]\")throw new TypeError;if(!r&&arguments.length==1)throw new TypeError;var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError}while(!0);do s in this&&(i=t.call(void 0,i,n[s],s,n));while(s--);return i}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var n=D(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=M(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(t){var n=D(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,M(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:s)});if(!Object.getOwnPropertyDescriptor){var d=\"Object.getOwnPropertyDescriptor called on a non-object: \";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!=\"object\"&&typeof t!=\"function\"||t===null)throw new TypeError(d+t);if(!a(t,n))return;var r,i,o;r={enumerable:!0,configurable:!0};if(p){var u=t.__proto__;t.__proto__=s;var i=c(t,n),o=h(t,n);t.__proto__=u;if(i||o)return i&&(r.get=i),o&&(r.set=o),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var v;Object.prototype.__proto__===null?v=function(){return{__proto__:null}}:v=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=v();else{if(typeof t!=\"object\")throw new TypeError(\"typeof prototype[\"+typeof t+\"] != 'object'\");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var g=m({}),y=typeof document==\"undefined\"||m(document.createElement(\"div\"));if(!g||!y)var b=Object.defineProperty}if(!Object.defineProperty||b){var w=\"Property description must be an object: \",E=\"Object.defineProperty called on non-object: \",S=\"getters & setters can not be defined on this javascript engine\";Object.defineProperty=function(t,n,r){if(typeof t!=\"object\"&&typeof t!=\"function\"||t===null)throw new TypeError(E+t);if(typeof r!=\"object\"&&typeof r!=\"function\"||r===null)throw new TypeError(w+r);if(b)try{return b.call(Object,t,n,r)}catch(i){}if(a(r,\"value\"))if(p&&(c(t,n)||h(t,n))){var o=t.__proto__;t.__proto__=s,delete t[n],t[n]=r.value,t.__proto__=o}else t[n]=r.value;else{if(!p)throw new TypeError(S);a(r,\"get\")&&f(t,n,r.get),a(r,\"set\")&&l(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)a(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(x){Object.freeze=function(t){return function(n){return typeof n==\"function\"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n=\"\";while(a(t,n))n+=\"?\";t[n]=!0;var r=a(t,n);return delete t[n],r});if(!Object.keys){var T=!0,N=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],C=N.length;for(var k in{toString:null})T=!1;Object.keys=function P(e){if(typeof e!=\"object\"&&typeof e!=\"function\"||e===null)throw new TypeError(\"Object.keys called on a non-object\");var P=[];for(var t in e)a(e,t)&&P.push(t);if(T)for(var n=0,r=C;n<r;n++){var i=N[n];a(e,i)&&P.push(i)}return P}}if(!Date.prototype.toISOString||(new Date(-621987552e5)).toISOString().indexOf(\"-000001\")===-1)Date.prototype.toISOString=function(){var t,n,r,i;if(!isFinite(this))throw new RangeError;t=[this.getUTCMonth()+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],i=this.getUTCFullYear(),i=(i<0?\"-\":i>9999?\"+\":\"\")+(\"00000\"+Math.abs(i)).slice(0<=i&&i<=9999?-4:-6),n=t.length;while(n--)r=t[n],r<10&&(t[n]=\"0\"+r);return i+\"-\"+t.slice(0,2).join(\"-\")+\"T\"+t.slice(2).join(\":\")+\".\"+(\"000\"+this.getUTCMilliseconds()).slice(-3)+\"Z\"};Date.now||(Date.now=function(){return(new Date).getTime()}),Date.prototype.toJSON||(Date.prototype.toJSON=function(t){if(typeof this.toISOString!=\"function\")throw new TypeError;return this.toISOString()}),Date.parse(\"+275760-09-13T00:00:00.000Z\")!==864e13&&(Date=function(e){var t=function i(t,n,r,s,o,u,a){var f=arguments.length;if(this instanceof e){var l=f==1&&String(t)===t?new e(i.parse(t)):f>=7?new e(t,n,r,s,o,u,a):f>=6?new e(t,n,r,s,o,u):f>=5?new e(t,n,r,s,o):f>=4?new e(t,n,r,s):f>=3?new e(t,n,r):f>=2?new e(t,n):f>=1?new e(t):new e;return l.constructor=i,l}return e.apply(this,arguments)},n=new RegExp(\"^(\\\\d{4}|[+-]\\\\d{6})(?:-(\\\\d{2})(?:-(\\\\d{2})(?:T(\\\\d{2}):(\\\\d{2})(?::(\\\\d{2})(?:\\\\.(\\\\d{3}))?)?(?:Z|(?:([-+])(\\\\d{2}):(\\\\d{2})))?)?)?)?$\");for(var r in e)t[r]=e[r];return t.now=e.now,t.UTC=e.UTC,t.prototype=e.prototype,t.prototype.constructor=t,t.parse=function(r){var i=n.exec(r);if(i){i.shift();for(var s=1;s<7;s++)i[s]=+(i[s]||(s<3?1:0)),s==1&&i[s]--;var o=+i.pop(),u=+i.pop(),a=i.pop(),f=0;if(a){if(u>23||o>59)return NaN;f=(u*60+o)*6e4*(a==\"+\"?-1:1)}var l=+i[0];return 0<=l&&l<=99?(i[0]=l+400,e.UTC.apply(this,i)+f-126227808e5):e.UTC.apply(this,i)+f}return e.parse.apply(this,arguments)},t}(Date));var L=\"\t\\n\u000b\\f\\r   ᠎             　\\u2028\\u2029﻿\";if(!String.prototype.trim||L.trim()){L=\"[\"+L+\"]\";var A=new RegExp(\"^\"+L+L+\"*\"),O=new RegExp(L+L+\"*$\");String.prototype.trim=function(){return String(this).replace(A,\"\").replace(O,\"\")}}var M=function(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e},_=\"a\"[0]!=\"a\",D=function(e){if(e==null)throw new TypeError;return _&&typeof e==\"string\"&&e?e.split(\"\"):Object(e)}}),define(\"ace/lib/dom\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r=\"http://www.w3.org/1999/xhtml\";t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||r,e):document.createElement(e)},t.setText=function(e,t){e.innerText!==undefined&&(e.innerText=t),e.textContent!==undefined&&(e.textContent=t)},t.hasCssClass=function(e,t){var n=e.className.split(/\\s+/g);return n.indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=\" \"+n)},t.removeCssClass=function(e,t){var n=e.className.split(/\\s+/g);for(;;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(\" \")},t.toggleCssClass=function(e,t){var n=e.className.split(/\\s+/g),r=!0;for(;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(\" \"),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;t=t||document;if(t.createStyleSheet&&(r=t.styleSheets)){while(n<r.length)if(r[n++].owningElement.id===e)return!0}else if(r=t.getElementsByTagName(\"style\"))while(n<r.length)if(r[n++].id===e)return!0;return!1},t.importCssString=function(n,i,s){s=s||document;if(i&&t.hasCssString(i,s))return null;var o;if(s.createStyleSheet)o=s.createStyleSheet(),o.cssText=n,i&&(o.owningElement.id=i);else{o=s.createElementNS?s.createElementNS(r,\"style\"):s.createElement(\"style\"),o.appendChild(s.createTextNode(n)),i&&(o.id=i);var u=s.getElementsByTagName(\"head\")[0]||s.documentElement;u.appendChild(o)}},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var r=t.createElement(\"link\");r.rel=\"stylesheet\",r.href=e;var i=n.getElementsByTagName(\"head\")[0]||n.documentElement;i.appendChild(r)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,\"paddingLeft\"),10)+parseInt(t.computedStyle(e,\"paddingRight\"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,\"paddingTop\"),10)+parseInt(t.computedStyle(e,\"paddingBottom\"),10)+e.clientHeight},window.pageYOffset!==undefined?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,\"\")||{})[t]||\"\":window.getComputedStyle(e,\"\")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.scrollbarWidth=function(e){var n=t.createElement(\"ace_inner\");n.style.width=\"100%\",n.style.minWidth=\"0px\",n.style.height=\"200px\",n.style.display=\"block\";var r=t.createElement(\"ace_outer\"),i=r.style;i.position=\"absolute\",i.left=\"-10000px\",i.overflow=\"hidden\",i.width=\"200px\",i.minWidth=\"0px\",i.height=\"150px\",i.display=\"block\",r.appendChild(n);var s=e.documentElement;s.appendChild(r);var o=n.offsetWidth;i.overflow=\"scroll\";var u=n.offsetWidth;return o==u&&(u=r.clientWidth),s.removeChild(r),o-u},t.setInnerHtml=function(e,t){var n=e.cloneNode(!1);return n.innerHTML=t,e.parentNode.replaceChild(n,e),n},t.setInnerText=function(e,t){var n=e.ownerDocument;n.body&&\"textContent\"in n.body?e.textContent=t:e.innerText=t},t.getInnerText=function(e){var t=e.ownerDocument;return t.body&&\"textContent\"in t.body?e.textContent:e.innerText||e.textContent||\"\"},t.getParentWindow=function(e){return e.defaultView||e.parentWindow}}),define(\"ace/lib/event\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\",\"ace/lib/dom\"],function(e,t,n){function o(e,t,n){var s=0;!i.isOpera||\"KeyboardEvent\"in window||!i.isMac?s=0|(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0):s=0|(t.metaKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.ctrlKey?8:0);if(n in r.MODIFIER_KEYS){switch(r.MODIFIER_KEYS[n]){case\"Alt\":s=2;break;case\"Shift\":s=4;break;case\"Ctrl\":s=1;break;default:s=8}n=0}return s&8&&(n==91||n==93)&&(n=0),!!s||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS?e(t,s,n):!1}var r=e(\"./keys\"),i=e(\"./useragent\"),s=e(\"./dom\");t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var r=function(){n(window.event)};n._wrapper=r,e.attachEvent(\"on\"+t,r)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent(\"on\"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return e.type==\"dblclick\"?0:e.type==\"contextmenu\"||e.ctrlKey&&i.isMac?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},document.documentElement.setCapture?t.capture=function(e,n,r){function s(o){n(o),i||(i=!0,r(o)),t.removeListener(e,\"mousemove\",n),t.removeListener(e,\"mouseup\",s),t.removeListener(e,\"losecapture\",s),e.releaseCapture()}var i=!1;t.addListener(e,\"mousemove\",n),t.addListener(e,\"mouseup\",s),t.addListener(e,\"losecapture\",s),e.setCapture()}:t.capture=function(e,t,n){function r(e){t&&t(e),n&&n(e),document.removeEventListener(\"mousemove\",t,!0),document.removeEventListener(\"mouseup\",r,!0),e.stopPropagation()}document.addEventListener(\"mousemove\",t,!0),document.addEventListener(\"mouseup\",r,!0)},t.addMouseWheelListener=function(e,n){var r=8,i=function(e){e.wheelDelta!==undefined?e.wheelDeltaX!==undefined?(e.wheelX=-e.wheelDeltaX/r,e.wheelY=-e.wheelDeltaY/r):(e.wheelX=0,e.wheelY=-e.wheelDelta/r):e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=(e.detail||0)*5,e.wheelY=0):(e.wheelX=0,e.wheelY=(e.detail||0)*5),n(e)};t.addListener(e,\"DOMMouseScroll\",i),t.addListener(e,\"mousewheel\",i)},t.addMultiMouseDownListener=function(e,n,r,s){var o=0,u,a,f,l={2:\"dblclick\",3:\"tripleclick\",4:\"quadclick\"};t.addListener(e,\"mousedown\",function(e){if(t.getButton(e)!=0)o=0;else{var i=Math.abs(e.clientX-u)>5||Math.abs(e.clientY-a)>5;if(!f||i)o=0;o+=1,f&&clearTimeout(f),f=setTimeout(function(){f=null},n[o-1]||600)}o==1&&(u=e.clientX,a=e.clientY),r[s](\"mousedown\",e);if(o>4)o=0;else if(o>1)return r[s](l[o],e)}),i.isOldIE&&t.addListener(e,\"dblclick\",function(e){o=2,f&&clearTimeout(f),f=setTimeout(function(){f=null},n[o-1]||600),r[s](\"mousedown\",e),r[s](l[o],e)})},t.addCommandKeyListener=function(e,n){var r=t.addListener;if(i.isOldGecko||i.isOpera&&!(\"KeyboardEvent\"in window)){var s=null;r(e,\"keydown\",function(e){s=e.keyCode}),r(e,\"keypress\",function(e){return o(n,e,s)})}else{var u=null;r(e,\"keydown\",function(e){return u=e.keyIdentifier||e.keyCode,o(n,e,e.keyCode)})}};if(window.postMessage&&!i.isOldIE){var u=1;t.nextTick=function(e,n){n=n||window;var r=\"zero-timeout-message-\"+u;t.addListener(n,\"message\",function i(s){s.data==r&&(t.stopPropagation(s),t.removeListener(n,\"message\",i),e())}),n.postMessage(r,\"*\")}}t.nextFrame=window.requestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame,t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),define(\"ace/lib/keys\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\"],function(e,t,n){var r=e(\"./oop\"),i=function(){var e={MODIFIER_KEYS:{16:\"Shift\",17:\"Ctrl\",18:\"Alt\",224:\"Meta\"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,meta:8,command:8},FUNCTION_KEYS:{8:\"Backspace\",9:\"Tab\",13:\"Return\",19:\"Pause\",27:\"Esc\",32:\"Space\",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"Left\",38:\"Up\",39:\"Right\",40:\"Down\",44:\"Print\",45:\"Insert\",46:\"Delete\",96:\"Numpad0\",97:\"Numpad1\",98:\"Numpad2\",99:\"Numpad3\",100:\"Numpad4\",101:\"Numpad5\",102:\"Numpad6\",103:\"Numpad7\",104:\"Numpad8\",105:\"Numpad9\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"Numlock\",145:\"Scrolllock\"},PRINTABLE_KEYS:{32:\" \",48:\"0\",49:\"1\",50:\"2\",51:\"3\",52:\"4\",53:\"5\",54:\"6\",55:\"7\",56:\"8\",57:\"9\",59:\";\",61:\"=\",65:\"a\",66:\"b\",67:\"c\",68:\"d\",69:\"e\",70:\"f\",71:\"g\",72:\"h\",73:\"i\",74:\"j\",75:\"k\",76:\"l\",77:\"m\",78:\"n\",79:\"o\",80:\"p\",81:\"q\",82:\"r\",83:\"s\",84:\"t\",85:\"u\",86:\"v\",87:\"w\",88:\"x\",89:\"y\",90:\"z\",107:\"+\",109:\"-\",110:\".\",188:\",\",190:\".\",191:\"/\",192:\"`\",219:\"[\",220:\"\\\\\",221:\"]\",222:\"'\"}};for(var t in e.FUNCTION_KEYS){var n=e.FUNCTION_KEYS[t].toLowerCase();e[n]=parseInt(t,10)}return r.mixin(e,e.MODIFIER_KEYS),r.mixin(e,e.PRINTABLE_KEYS),r.mixin(e,e.FUNCTION_KEYS),e.enter=e[\"return\"],e.escape=e.esc,e.del=e[\"delete\"],e[173]=\"-\",e}();r.mixin(t,i),t.keyCodeToString=function(e){return(i[e]||String.fromCharCode(e)).toLowerCase()}}),define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"],function(e,t,n){t.inherits=function(){var e=function(){};return function(t,n){e.prototype=n.prototype,t.super_=n.prototype,t.prototype=new e,t.prototype.constructor=t}}(),t.mixin=function(e,t){for(var n in t)e[n]=t[n]},t.implement=function(e,n){t.mixin(e,n)}}),define(\"ace/lib/useragent\",[\"require\",\"exports\",\"module\"],function(e,t,n){t.OS={LINUX:\"LINUX\",MAC:\"MAC\",WINDOWS:\"WINDOWS\"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};if(typeof navigator!=\"object\")return;var r=(navigator.platform.match(/mac|win|linux/i)||[\"other\"])[0].toLowerCase(),i=navigator.userAgent;t.isWin=r==\"win\",t.isMac=r==\"mac\",t.isLinux=r==\"linux\",t.isIE=(navigator.appName==\"Microsoft Internet Explorer\"||navigator.appName.indexOf(\"MSAppHost\")>=0)&&parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\\.0-9]+)/)[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=window.controllers&&window.navigator.product===\"Gecko\",t.isOldGecko=t.isGecko&&parseInt((navigator.userAgent.match(/rv\\:(\\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&Object.prototype.toString.call(window.opera)==\"[object Opera]\",t.isWebKit=parseFloat(i.split(\"WebKit/\")[1])||undefined,t.isChrome=parseFloat(i.split(\" Chrome/\")[1])||undefined,t.isAIR=i.indexOf(\"AdobeAIR\")>=0,t.isIPad=i.indexOf(\"iPad\")>=0,t.isTouchPad=i.indexOf(\"TouchPad\")>=0}),define(\"ace/editor\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/useragent\",\"ace/keyboard/textinput\",\"ace/mouse/mouse_handler\",\"ace/mouse/fold_handler\",\"ace/keyboard/keybinding\",\"ace/edit_session\",\"ace/search\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/commands/command_manager\",\"ace/commands/default_commands\",\"ace/config\"],function(e,t,n){e(\"./lib/fixoldbrowsers\");var r=e(\"./lib/oop\"),i=e(\"./lib/lang\"),s=e(\"./lib/useragent\"),o=e(\"./keyboard/textinput\").TextInput,u=e(\"./mouse/mouse_handler\").MouseHandler,a=e(\"./mouse/fold_handler\").FoldHandler,f=e(\"./keyboard/keybinding\").KeyBinding,l=e(\"./edit_session\").EditSession,c=e(\"./search\").Search,h=e(\"./range\").Range,p=e(\"./lib/event_emitter\").EventEmitter,d=e(\"./commands/command_manager\").CommandManager,v=e(\"./commands/default_commands\").commands,m=e(\"./config\"),g=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.commands=new d(s.isMac?\"mac\":\"win\",v),this.textInput=new o(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new f(this),this.$mouseHandler=new u(this),new a(this),this.$blockScrolling=0,this.$search=(new c).set({wrap:!0}),this.setSession(t||new l(\"\"))};(function(){r.implement(this,p),this.setKeyboardHandler=function(e){if(typeof e==\"string\"&&e){this.$keybindingId=e;var t=this;m.loadModule([\"keybinding\",e],function(n){t.$keybindingId==e&&t.keyBinding.setKeyboardHandler(n&&n.handler)})}else delete this.$keybindingId,this.keyBinding.setKeyboardHandler(e)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session==e)return;if(this.session){var t=this.session;this.session.removeEventListener(\"change\",this.$onDocumentChange),this.session.removeEventListener(\"changeMode\",this.$onChangeMode),this.session.removeEventListener(\"tokenizerUpdate\",this.$onTokenizerUpdate),this.session.removeEventListener(\"changeTabSize\",this.$onChangeTabSize),this.session.removeEventListener(\"changeWrapLimit\",this.$onChangeWrapLimit),this.session.removeEventListener(\"changeWrapMode\",this.$onChangeWrapMode),this.session.removeEventListener(\"onChangeFold\",this.$onChangeFold),this.session.removeEventListener(\"changeFrontMarker\",this.$onChangeFrontMarker),this.session.removeEventListener(\"changeBackMarker\",this.$onChangeBackMarker),this.session.removeEventListener(\"changeBreakpoint\",this.$onChangeBreakpoint),this.session.removeEventListener(\"changeAnnotation\",this.$onChangeAnnotation),this.session.removeEventListener(\"changeOverwrite\",this.$onCursorChange),this.session.removeEventListener(\"changeScrollTop\",this.$onScrollTopChange),this.session.removeEventListener(\"changeLeftTop\",this.$onScrollLeftChange);var n=this.session.getSelection();n.removeEventListener(\"changeCursor\",this.$onCursorChange),n.removeEventListener(\"changeSelection\",this.$onSelectionChange)}this.session=e,this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener(\"change\",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener(\"changeMode\",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener(\"tokenizerUpdate\",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener(\"changeTabSize\",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener(\"changeWrapLimit\",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener(\"changeWrapMode\",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener(\"changeFold\",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener(\"changeFrontMarker\",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener(\"changeBackMarker\",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener(\"changeBreakpoint\",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener(\"changeAnnotation\",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener(\"changeOverwrite\",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener(\"changeScrollTop\",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener(\"changeScrollLeft\",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener(\"changeCursor\",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener(\"changeSelection\",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull(),this._emit(\"changeSession\",{session:e,oldSession:t})},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?t==1?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e){this.renderer.setTheme(e)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.setFontSize=function(e){this.container.style.fontSize=e,this.renderer.updateFontSize()},this.$highlightBrackets=function(){this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null);if(this.$highlightPending)return;var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session.findMatchingBracket(e.getCursorPosition());if(t){var n=new h(t.row,t.column,t.row,t.column+1);e.session.$bracketHighlight=e.session.addMarker(n,\"ace_bracket\",\"text\")}},50)},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){if(this.$isFocused)return;this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit(\"focus\")},this.onBlur=function(){if(!this.$isFocused)return;this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit(\"blur\")},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=e.data,n=t.range,r;n.start.row==n.end.row&&t.action!=\"insertLines\"&&t.action!=\"removeLines\"?r=n.end.row:r=Infinity,this.renderer.updateLines(n.start.row,r),this._emit(\"change\",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$updateHighlightActiveLine(),this._emit(\"changeSelection\")},this.$updateHighlightActiveLine=function(){var e=this.getSession(),t;this.$highlightActiveLine&&(this.$selectionStyle!=\"line\"||!this.selection.isMultiLine())&&(t=this.getCursorPosition()),e.$highlightLineMarker&&!t?(e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null):!e.$highlightLineMarker&&t?e.$highlightLineMarker=e.highlightLines(t.row,t.row,\"ace_active-line\"):t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e._emit(\"changeBackMarker\"))},this.onSelectionChange=function(e){var t=this.session;t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null;if(!this.selection.isEmpty()){var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,\"ace_selection\",r)}else this.$updateHighlightActiveLine();var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._emit(\"changeSelection\")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(t.isEmpty()||t.isMultiLine())return;var n=t.start.column-1,r=t.end.column+1,i=e.getLine(t.start.row),s=i.length,o=i.substring(Math.max(n,0),Math.min(r,s));if(n>=0&&/^[\\w\\d]/.test(o)||r<=s&&/[\\w\\d]$/.test(o))return;o=i.substring(t.start.column,t.end.column);if(!/^[\\w\\d]+$/.test(o))return;var u=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o});return u},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(){this.renderer.updateText()},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getCopyText=function(){var e=\"\";return this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange())),this._emit(\"copy\",e),e},this.onCopy=function(){this.commands.exec(\"copy\",this)},this.onCut=function(){this.commands.exec(\"cut\",this)},this.onPaste=function(e){if(this.$readOnly)return;this._emit(\"paste\",e),this.insert(e)},this.execCommand=function(e,t){this.commands.exec(e,this,t)},this.insert=function(e){var t=this.session,n=t.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()){var i=n.transformAction(t.getState(r.row),\"insertion\",this,t,e);i&&(e=i.text)}e=e.replace(\"\t\",this.session.getTabString());if(!this.selection.isEmpty())r=this.session.remove(this.getSelectionRange()),this.clearSelection();else if(this.session.getOverwrite()){var s=new h.fromPoints(r,r);s.end.column+=e.length,this.session.remove(s)}this.clearSelection();var o=r.column,u=t.getState(r.row),a=t.getLine(r.row),f=n.checkOutdent(u,a,e),l=t.insert(r,e);i&&i.selection&&(i.selection.length==2?this.selection.setSelectionRange(new h(r.row,o+i.selection[0],r.row,o+i.selection[1])):this.selection.setSelectionRange(new h(r.row+i.selection[0],i.selection[1],r.row+i.selection[2],i.selection[3])));if(t.getDocument().isNewLine(e)){var c=n.getNextLineIndent(u,a.slice(0,r.column),t.getTabString());this.moveCursorTo(r.row+1,0);var p=t.getTabSize(),d=Number.MAX_VALUE;for(var v=r.row+1;v<=l.row;++v){var m=0;a=t.getLine(v);for(var g=0;g<a.length;++g)if(a.charAt(g)==\"\t\")m+=p;else{if(a.charAt(g)!=\" \")break;m+=1}/[^\\s]/.test(a)&&(d=Math.min(m,d))}for(var v=r.row+1;v<=l.row;++v){var y=d;a=t.getLine(v);for(var g=0;g<a.length&&y>0;++g)a.charAt(g)==\"\t\"?y-=p:a.charAt(g)==\" \"&&(y-=1);t.remove(new h(v,0,v,g))}t.indentRows(r.row+1,l.row,c)}f&&n.autoOutdent(u,t,r.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.$mouseHandler.setScrollSpeed(e)},this.getScrollSpeed=function(){return this.$mouseHandler.getScrollSpeed()},this.setDragDelay=function(e){this.$mouseHandler.setDragDelay(e)},this.getDragDelay=function(){return this.$mouseHandler.getDragDelay()},this.$selectionStyle=\"line\",this.setSelectionStyle=function(e){if(this.$selectionStyle==e)return;this.$selectionStyle=e,this.onSelectionChange(),this._emit(\"changeSelectionStyle\",{data:e})},this.getSelectionStyle=function(){return this.$selectionStyle},this.$highlightActiveLine=!0,this.setHighlightActiveLine=function(e){if(this.$highlightActiveLine==e)return;this.$highlightActiveLine=e,this.$updateHighlightActiveLine()},this.getHighlightActiveLine=function(){return this.$highlightActiveLine},this.$highlightGutterLine=!0,this.setHighlightGutterLine=function(e){if(this.$highlightGutterLine==e)return;this.renderer.setHighlightGutterLine(e),this.$highlightGutterLine=e},this.getHighlightGutterLine=function(){return this.$highlightGutterLine},this.$highlightSelectedWord=!0,this.setHighlightSelectedWord=function(e){if(this.$highlightSelectedWord==e)return;this.$highlightSelectedWord=e,this.$onSelectionChange()},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.$readOnly=!1,this.setReadOnly=function(e){this.$readOnly=e,this.textInput.setReadOnly(e),this.renderer.$cursorLayer.setBlinking(!e)},this.getReadOnly=function(){return this.$readOnly},this.$modeBehaviours=!0,this.setBehavioursEnabled=function(e){this.$modeBehaviours=e},this.getBehavioursEnabled=function(){return this.$modeBehaviours},this.$modeWrapBehaviours=!0,this.setWrapBehavioursEnabled=function(e){this.$modeWrapBehaviours=e},this.getWrapBehavioursEnabled=function(){return this.$modeWrapBehaviours},this.setShowFoldWidgets=function(e){var t=this.renderer.$gutterLayer;if(t.getShowFoldWidgets()==e)return;this.renderer.$gutterLayer.setShowFoldWidgets(e),this.$showFoldWidgets=e,this.renderer.updateFull()},this.getShowFoldWidgets=function(){return this.renderer.$gutterLayer.getShowFoldWidgets()},this.setFadeFoldWidgets=function(e){this.renderer.setFadeFoldWidgets(e)},this.getFadeFoldWidgets=function(){return this.renderer.getFadeFoldWidgets()},this.remove=function(e){this.selection.isEmpty()&&(e==\"left\"?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,\"deletion\",this,n,t);i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert(\"\\n\"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(!this.selection.isEmpty())return;var e=this.getCursorPosition(),t=e.column;if(t===0)return;var n=this.session.getLine(e.row),r,i;t<n.length?(r=n.charAt(t)+n.charAt(t-1),i=new h(e.row,t-1,e.row,t+1)):(r=n.charAt(t-1)+n.charAt(t-2),i=new h(e.row,t-2,e.row,t)),this.session.replace(i,r)},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row||t.start.column<t.end.column)){var r;if(this.session.getUseSoftTabs()){var s=e.getTabSize(),o=this.getCursorPosition(),u=e.documentToScreenColumn(o.row,o.column),a=s-u%s;r=i.stringRepeat(\" \",a)}else r=\"\t\";return this.insert(r)}var n=this.$getSelectedRows();e.indentRows(n.first,n.last,\"\t\")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,\"\t\")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){var e=this.$getSelectedRows(),t=this.session,n=[];for(i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var r=new h(0,0,0,0);for(var i=e.first;i<=e.last;i++){var s=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=s.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.getNumberAt=function(e,t){var n=/[\\-]?[0-9]+(?:\\.[0-9]+)?/g;n.lastIndex=0;var r=this.session.getLine(e);while(n.lastIndex<t-1){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t){var s={value:i[0],start:i.index,end:i.index+i[0].length};return s}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new h(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var s=this.getNumberAt(t,n);if(s){var o=s.value.indexOf(\".\")>=0?s.start+s.value.indexOf(\".\")+1:s.end,u=s.start+s.value.length-o,a=parseFloat(s.value);a*=Math.pow(10,u),o!==s.end&&n<o?e*=Math.pow(10,s.end-n-1):e*=Math.pow(10,s.end-n),a+=e,a/=Math.pow(10,u);var f=a.toFixed(u),l=new h(t,s.start,t,s.end);this.session.replace(l,f),this.moveCursorTo(t,Math.max(s.start+1,n+f.length-s.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows(),t;e.first===0||e.last+1<this.session.getLength()?t=new h(e.first,0,e.last+1,0):t=new h(e.first-1,this.session.getLine(e.first-1).length,e.last,this.session.getLine(e.last).length),this.session.remove(t),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var i=e.isBackwards(),s=e.isBackwards()?n.start:n.end,o=t.insert(s,t.getTextRange(n),!1);n.start=s,n.end=o,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(function(e,t){return this.session.moveLinesDown(e,t)})},this.moveLinesUp=function(){this.$moveLines(function(e,t){return this.session.moveLinesUp(e,t)})},this.moveText=function(e,t){return this.$readOnly?null:this.session.moveText(e,t)},this.copyLinesUp=function(){this.$moveLines(function(e,t){return this.session.duplicateLines(e,t),0})},this.copyLinesDown=function(){this.$moveLines(function(e,t){return this.session.duplicateLines(e,t)})},this.$moveLines=function(e){var t=this.$getSelectedRows(),n=this.selection;if(!n.isMultiLine())var r=n.getRange(),i=n.isBackwards();var s=e.call(this,t.first,t.last);r?(r.start.row+=s,r.end.row+=s,n.setSelectionRange(r,i)):(n.setSelectionAnchor(t.last+s+1,0),n.$moveSelection(function(){n.moveCursorTo(t.first+s,0)}))},this.$getSelectedRows=function(){var e=this.getSelectionRange().collapseRows();return{first:e.start.row,last:e.end.row}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);this.$blockScrolling++,t==1?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t==0&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection()),this.$blockScrolling--;var s=n.scrollTop;n.scrollBy(0,i*r.lineHeight),t!=null&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e){var t=this.getCursorPosition(),n=this.session.getBracketRange(t);if(!n){n=this.find({needle:/[{}()\\[\\]]/g,preventScroll:!0,start:{row:t.row,column:t.column-1}});if(!n)return;var r=n.start;r.row==t.row&&Math.abs(r.column-t.column)<2&&(n=this.session.getBracketRange(r))}r=n&&n.cursor||r,r&&(e?n&&n.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(r.row,r.column):(this.clearSelection(),this.moveCursorTo(r.row,r.column)))},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.navigateUp=function(e){this.selection.clearSelection(),e=e||1,this.selection.moveCursorBy(-e,0)},this.navigateDown=function(e){this.selection.clearSelection(),e=e||1,this.selection.moveCursorBy(e,0)},this.navigateLeft=function(e){if(!this.selection.isEmpty()){var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}else{e=e||1;while(e--)this.selection.moveCursorLeft()}this.clearSelection()},this.navigateRight=function(e){if(!this.selection.isEmpty()){var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}else{e=e||1;while(e--)this.selection.moveCursorRight()}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){var e=this.renderer.scrollTop;this.selection.moveCursorFileEnd(),this.clearSelection(),this.renderer.animateScrolling(e)},this.navigateFileStart=function(){var e=this.renderer.scrollTop;this.selection.moveCursorFileStart(),this.clearSelection(),this.renderer.animateScrolling(e)},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),n!==null&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),r):r},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;this.$blockScrolling+=1;var i=this.getSelectionRange();this.clearSelection(),this.selection.moveCursorTo(0,0);for(var s=n.length-1;s>=0;--s)this.$tryReplace(n[s],e)&&r++;return this.selection.setSelectionRange(i),this.$blockScrolling-=1,r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),t!==null?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),typeof e==\"string\"||e instanceof RegExp?t.needle=e:typeof e==\"object\"&&r.mixin(t,e);var i=this.selection.getRange();t.needle==null&&(e=this.session.getTextRange(i)||this.$search.$options.needle,e||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var s=this.$search.find(this.session);if(t.preventScroll)return s;if(s)return this.revealRange(s,n),s;t.backwards?i.start=i.end:i.end=i.start,this.selection.setRange(i)},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!=0&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy()}}).call(g.prototype),t.Editor=g}),define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"],function(e,t,n){t.stringReverse=function(e){return e.split(\"\").reverse().join(\"\")},t.stringRepeat=function(e,t){var n=\"\";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\\s\\s*/,i=/\\s\\s*$/;t.stringTrimLeft=function(e){return e.replace(r,\"\")},t.stringTrimRight=function(e){return e.replace(i,\"\")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]==\"object\"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!=\"object\")return e;var t=e.constructor();for(var n in e)typeof e[n]==\"object\"?t[n]=this.deepCopy(e[n]):t[n]=e[n];return t},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,\"\\\\$1\")},t.escapeHTML=function(e){return e.replace(/&/g,\"&#38;\").replace(/\"/g,\"&#34;\").replace(/'/g,\"&#39;\").replace(/</g,\"&#60;\")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)};return i.delay=i,i.schedule=function(e){n==null&&(n=setTimeout(r,e||0))},i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),define(\"ace/keyboard/textinput\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/lib/dom\",\"ace/lib/lang\"],function(e,t,n){var r=e(\"../lib/event\"),i=e(\"../lib/useragent\"),s=e(\"../lib/dom\"),o=e(\"../lib/lang\"),u=i.isChrome<18,a=function(e,t){function b(e){if(h)return;var t=e?2:1,r=2;try{n.setSelectionRange(t,r)}catch(i){}}function w(){if(h)return;n.value=a,i.isWebKit&&y.schedule()}function B(){setTimeout(function(){p&&(n.style.cssText=p,p=\"\"),t.renderer.$keepTextAreaAtCursor==null&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}var n=s.createElement(\"textarea\");n.className=\"ace_text-input\",i.isTouchPad&&n.setAttribute(\"x-palm-disable-auto-cap\",!0),n.wrap=\"off\",n.autocorrect=\"off\",n.autocapitalize=\"off\",n.spellcheck=!1,n.style.bottom=\"-2em\",e.insertBefore(n,e.firstChild);var a=\"\u0001\u0001\",f=!1,l=!1,c=!1,h=!1,p=\"\",d=!0;try{var v=document.activeElement===n}catch(m){}r.addListener(n,\"blur\",function(){t.onBlur(),v=!1}),r.addListener(n,\"focus\",function(){v=!0,t.onFocus(),b()}),this.focus=function(){n.focus()},this.blur=function(){n.blur()},this.isFocused=function(){return v};var g=o.delayedCall(function(){v&&b(d)}),y=o.delayedCall(function(){h||(n.value=a,v&&b())});i.isWebKit||t.addEventListener(\"changeSelection\",function(){t.selection.isEmpty()!=d&&(d=!d,g.schedule())}),w(),v&&t.onFocus();var E=function(e){return e.selectionStart===0&&e.selectionEnd===e.value.length};!n.setSelectionRange&&n.createTextRange&&(n.setSelectionRange=function(e,t){var n=this.createTextRange();n.collapse(!0),n.moveStart(\"character\",e),n.moveEnd(\"character\",t),n.select()},E=function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.text==e.value});if(i.isOldIE){var S=!1,x=function(e){if(S)return;var t=n.value;if(h||!t||t==a)return;if(e&&t==a[0])return T.schedule();k(t),S=!0,w(),S=!1},T=o.delayedCall(x);r.addListener(n,\"propertychange\",x);var N={13:1,27:1};r.addListener(n,\"keyup\",function(e){h&&(!n.value||N[e.keyCode])&&setTimeout(P,0);if((n.value.charCodeAt(0)||0)<129)return;h?D():_()})}var C=function(e){if(f){f=!1;return}if(l){l=!1;return}E(n)&&(t.selectAll(),b())},k=function(e){c?(b(),e&&t.onPaste(e),c=!1):e==a[0]?t.execCommand(\"del\",{source:\"ace\"}):(e.substring(0,2)==a?e=e.substr(2):e[0]==a[0]?e=e.substr(1):e[e.length-1]==a[0]&&(e=e.slice(0,-1)),e[e.length-1]==a[0]&&(e=e.slice(0,-1)),e&&t.onTextInput(e))},L=function(e){if(h)return;var t=n.value;w(),k(t)},A=function(e){var i=t.getCopyText();if(!i){r.preventDefault(e);return}var s=e.clipboardData||window.clipboardData;if(s&&!u){var o=s.setData(\"Text\",i);o&&(t.onCut(),r.preventDefault(e))}o||(f=!0,n.value=i,n.select(),setTimeout(function(){f=!1,w(),b(),t.onCut()}))},O=function(e){var i=t.getCopyText();if(!i){r.preventDefault(e);return}var s=e.clipboardData||window.clipboardData;if(s&&!u){var o=s.setData(\"Text\",i);o&&(t.onCopy(),r.preventDefault(e))}o||(l=!0,n.value=i,n.select(),setTimeout(function(){l=!1,w(),b(),t.onCopy()}))},M=function(e){var s=e.clipboardData||window.clipboardData;if(s){var o=s.getData(\"Text\");o&&t.onPaste(o),i.isIE&&setTimeout(b),r.preventDefault(e)}else n.value=\"\",c=!0};r.addCommandKeyListener(n,t.onCommandKey.bind(t)),r.addListener(n,\"select\",C),r.addListener(n,\"input\",L),r.addListener(n,\"cut\",A),r.addListener(n,\"copy\",O),r.addListener(n,\"paste\",M),(!(\"oncut\"in n)||!(\"oncopy\"in n)||!(\"onpaste\"in n))&&r.addListener(e,\"keydown\",function(e){if(i.isMac&&!e.metaKey||!e.ctrlKey)return;switch(e.keyCode){case 67:O(e);break;case 86:M(e);break;case 88:A(e)}});var _=function(e){h=!0,t.onCompositionStart(),setTimeout(D,0)},D=function(){if(!h)return;t.onCompositionUpdate(n.value)},P=function(e){h=!1,t.onCompositionEnd()},H=o.delayedCall(D,50);r.addListener(n,\"compositionstart\",_),r.addListener(n,i.isGecko?\"text\":\"keyup\",function(){H.schedule()}),r.addListener(n,\"compositionend\",P),this.getElement=function(){return n},this.setReadOnly=function(e){n.readOnly=e},this.onContextMenu=function(e){p||(p=n.style.cssText),n.style.cssText=\"z-index:100000;\"+(i.isIE?\"opacity:0.1;\":\"\"),b(t.selection.isEmpty()),t._emit(\"nativecontextmenu\",{target:t});var s=t.container.getBoundingClientRect(),o=function(e){n.style.left=e.clientX-s.left-2+\"px\",n.style.top=e.clientY-s.top-2+\"px\"};o(e);if(e.type!=\"mousedown\")return;t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),i.isWin&&r.capture(t.container,o,B)},this.onContextMenuClose=B,i.isGecko||r.addListener(n,\"contextmenu\",function(e){t.textInput.onContextMenu(e),B()})};t.TextInput=a}),define(\"ace/mouse/mouse_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/mouse/default_handlers\",\"ace/mouse/default_gutter_handler\",\"ace/mouse/mouse_event\",\"ace/mouse/dragdrop\"],function(e,t,n){var r=e(\"../lib/event\"),i=e(\"../lib/useragent\"),s=e(\"./default_handlers\").DefaultHandlers,o=e(\"./default_gutter_handler\").GutterHandler,u=e(\"./mouse_event\").MouseEvent,a=e(\"./dragdrop\").DragdropHandler,f=function(e){this.editor=e,new s(this),new o(this),new a(this),r.addListener(e.container,\"mousedown\",function(t){return e.focus(),r.preventDefault(t)});var t=e.renderer.getMouseEventTarget();r.addListener(t,\"click\",this.onMouseEvent.bind(this,\"click\")),r.addListener(t,\"mousemove\",this.onMouseMove.bind(this,\"mousemove\")),r.addMultiMouseDownListener(t,[300,300,250],this,\"onMouseEvent\"),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,\"mousewheel\"));var n=e.renderer.$gutter;r.addListener(n,\"mousedown\",this.onMouseEvent.bind(this,\"guttermousedown\")),r.addListener(n,\"click\",this.onMouseEvent.bind(this,\"gutterclick\")),r.addListener(n,\"dblclick\",this.onMouseEvent.bind(this,\"gutterdblclick\")),r.addListener(n,\"mousemove\",this.onMouseEvent.bind(this,\"guttermousemove\"))};(function(){this.$scrollSpeed=1,this.setScrollSpeed=function(e){this.$scrollSpeed=e},this.getScrollSpeed=function(){return this.$scrollSpeed},this.onMouseEvent=function(e,t){this.editor._emit(e,new u(t,this.editor))},this.$dragDelay=250,this.setDragDelay=function(e){this.$dragDelay=e},this.getDragDelay=function(){return this.$dragDelay},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;if(!n||!n.length)return;this.editor._emit(e,new u(t,this.editor))},this.onMouseWheel=function(e,t){var n=new u(t,this.editor);n.speed=this.$scrollSpeed*2,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){t&&this.setState(t),this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var s=this,o=function(e){s.x=e.clientX,s.y=e.clientY},u=function(e){clearInterval(f),s[s.state+\"End\"]&&s[s.state+\"End\"](e),s.$clickSelection=null,n.$keepTextAreaAtCursor==null&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),s.isMousePressed=!1},a=function(){s[s.state]&&s[s.state]()};if(i.isOldIE&&e.domEvent.type==\"dblclick\"){setTimeout(function(){a(),u(e.domEvent)});return}r.capture(this.editor.container,o,u);var f=setInterval(a,20)}}).call(f.prototype),t.MouseHandler=f}),define(\"ace/mouse/default_handlers\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/useragent\"],function(e,t,n){function o(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler(\"mousedown\",this.onMouseDown.bind(e)),t.setDefaultHandler(\"dblclick\",this.onDoubleClick.bind(e)),t.setDefaultHandler(\"tripleclick\",this.onTripleClick.bind(e)),t.setDefaultHandler(\"quadclick\",this.onQuadClick.bind(e)),t.setDefaultHandler(\"mousewheel\",this.onMouseWheel.bind(e));var n=[\"select\",\"startSelect\",\"drag\",\"dragEnd\",\"dragWait\",\"dragWaitEnd\",\"startDrag\",\"focusWait\"];n.forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,\"getLineRange\"),e.selectByWords=this.extendSelectionBy.bind(e,\"getWordRange\"),e.$focusWaitTimout=250}function u(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}function a(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else var n=2*t.row-e.start.row-e.end.row;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e(\"../lib/dom\"),i=e(\"../lib/useragent\"),s=5;(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,i=e.getButton();if(i!==0){var s=r.getSelectionRange(),o=s.isEmpty();o&&(r.moveCursorToPosition(n),r.selection.clearSelection()),r.textInput.onContextMenu(e.domEvent);return}if(t&&!r.isFocused()){r.focus();if(this.$focusWaitTimout&&!this.$clickSelection)return this.setState(\"focusWait\"),this.captureMouse(e),e.preventDefault()}return!t||this.$clickSelection||e.getShiftKey()?this.startSelect(n):t&&(this.mousedownEvent.time=(new Date).getTime(),this.setState(\"dragWait\")),this.captureMouse(e),e.preventDefault()},this.startSelect=function(e){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y),this.mousedownEvent.getShiftKey()?this.editor.selection.selectToPosition(e):this.$clickSelection||(this.editor.moveCursorToPosition(e),this.editor.selection.clearSelection()),this.setState(\"select\")},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(r==-1)e=this.$clickSelection.end;else if(r==1)e=this.$clickSelection.start;else{var i=a(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i.start),o=this.$clickSelection.comparePoint(i.end);if(s==-1&&o<=0){t=this.$clickSelection.end;if(i.end.row!=r.row||i.end.column!=r.column)r=i.start}else if(o==1&&s>=0){t=this.$clickSelection.start;if(i.start.row!=r.row||i.start.column!=r.column)r=i.end}else if(s==-1&&o==1)r=i.end,t=i.start;else{var u=a(this.$clickSelection,r);r=u.cursor,t=u.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.startDrag=function(){var e=this.editor;this.setState(\"drag\"),this.dragRange=e.getSelectionRange();var t=e.getSelectionStyle();this.dragSelectionMarker=e.session.addMarker(this.dragRange,\"ace_selection\",t),e.clearSelection(),r.addCssClass(e.container,\"ace_dragging\"),this.$dragKeybinding||(this.$dragKeybinding={handleKeyboard:function(e,t,n,r){if(n==\"esc\")return{command:this.command}},command:{exec:function(e){var t=e.$mouseHandler;t.dragCursor=null,t.dragEnd(),t.startSelect()}}}),e.keyBinding.addKeyboardHandler(this.$dragKeybinding)},this.focusWait=function(){var e=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=(new Date).getTime();(e>s||t-this.mousedownEvent.time>this.$focusWaitTimout)&&this.startSelect()},this.dragWait=function(e){var t=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),n=(new Date).getTime(),r=this.editor;t>s?this.startSelect(this.mousedownEvent.getDocumentPosition()):n-this.mousedownEvent.time>r.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(e){this.mousedownEvent.domEvent=e,this.startSelect()},this.drag=function(){var e=this.editor;this.dragCursor=e.renderer.screenToTextCoordinates(this.x,this.y),e.moveCursorToPosition(this.dragCursor),e.renderer.scrollCursorIntoView()},this.dragEnd=function(e){var t=this.editor,n=this.dragCursor,i=this.dragRange;r.removeCssClass(t.container,\"ace_dragging\"),t.session.removeMarker(this.dragSelectionMarker),t.keyBinding.removeKeyboardHandler(this.$dragKeybinding);if(!n)return;t.clearSelection();if(e&&(e.ctrlKey||e.altKey)){var s=t.session,o=i;o.end=s.insert(n,s.getTextRange(i)),o.start=n}else{if(i.contains(n.row,n.column))return;var o=t.moveText(i,n)}if(!o)return;t.selection.setSelectionRange(o)},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);if(i){i.isEmpty()&&(i.start.column--,i.end.column++),this.$clickSelection=i,this.setState(\"select\");return}this.$clickSelection=n.selection.getWordRange(t.row,t.column),this.setState(\"selectByWords\")},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState(\"selectByLines\"),this.$clickSelection=n.selection.getLineRange(t.row)},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState(\"null\")},this.onMouseWheel=function(e){if(e.getShiftKey()||e.getAccelKey())return;var t=this.editor,n=t.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);if(n)this.$passScrollEvent=!1;else{if(this.$passScrollEvent)return;if(!this.$scrollStopTimeout){var r=this;this.$scrollStopTimeout=setTimeout(function(){r.$passScrollEvent=!0,r.$scrollStopTimeout=null},200)}}return t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.preventDefault()}}).call(o.prototype),t.DefaultHandlers=o}),define(\"ace/mouse/default_gutter_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\"],function(e,t,n){function s(e){function f(){u=r.createElement(\"div\"),u.className=\"ace_gutter-tooltip\",u.style.display=\"none\",t.container.appendChild(u)}function l(){u||f();var e=o.getDocumentPosition().row,r=n.$annotations[e];if(!r)return c();var i=t.session.getLength();if(e==i){var s=t.renderer.pixelToScreenCoordinates(0,o.y).row,l=o.$pos;if(s>t.session.documentToScreenRow(l.row,l.column))return c()}if(a==r)return;a=r.text.join(\"<br/>\"),u.style.display=\"block\",u.innerHTML=a,t.on(\"mousewheel\",c),h(o)}function c(){s&&(s=clearTimeout(s)),a&&(u.style.display=\"none\",a=null,t.removeEventListener(\"mousewheel\",c))}function h(e){var n=t.renderer.$gutter.getBoundingClientRect();u.style.left=e.x+15+\"px\",e.y+3*t.renderer.lineHeight+15<n.bottom?(u.style.bottom=\"\",u.style.top=e.y+15+\"px\"):(u.style.top=\"\",u.style.bottom=n.bottom-e.y+5+\"px\")}var t=e.editor,n=t.renderer.$gutterLayer;e.editor.setDefaultHandler(\"guttermousedown\",function(r){if(!t.isFocused())return;var i=n.getRegion(r);if(i)return;var s=r.getDocumentPosition().row,o=t.session.selection;if(r.getShiftKey())o.selectTo(s,0);else{if(r.domEvent.detail==2)return t.selectAll(),r.preventDefault();e.$clickSelection=t.selection.getLineRange(s)}return e.captureMouse(r,\"selectByLines\"),r.preventDefault()});var s,o,u,a;e.editor.setDefaultHandler(\"guttermousemove\",function(t){var n=t.domEvent.target||t.domEvent.srcElement;if(r.hasCssClass(n,\"ace_fold-widget\"))return c();a&&h(t),o=t;if(s)return;s=setTimeout(function(){s=null,o&&!e.isMousePressed?l():c()},50)}),i.addListener(t.renderer.$gutter,\"mouseout\",function(e){o=null;if(!a||s)return;s=setTimeout(function(){s=null,c()},50)})}var r=e(\"../lib/dom\"),i=e(\"../lib/event\");t.GutterHandler=s}),define(\"ace/mouse/mouse_event\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"],function(e,t,n){var r=e(\"../lib/event\"),i=e(\"../lib/useragent\"),s=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var e=this.editor;if(e.getReadOnly())this.$inSelection=!1;else{var t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(s.prototype)}),define(\"ace/mouse/dragdrop\",[\"require\",\"exports\",\"module\",\"ace/lib/event\"],function(e,t,n){var r=e(\"../lib/event\"),i=function(e){var t=e.editor,n,i,s,o,u,a,f,l=0,c=t.container;r.addListener(c,\"dragenter\",function(e){if(t.getReadOnly())return;l++;if(!n){u=t.getSelectionRange(),a=t.selection.isBackwards();var i=t.getSelectionStyle();n=t.session.addMarker(u,\"ace_selection\",i),t.clearSelection(),clearInterval(o),o=setInterval(h,20)}return r.preventDefault(e)}),r.addListener(c,\"dragover\",function(e){if(t.getReadOnly())return;return i=e.clientX,s=e.clientY,r.preventDefault(e)});var h=function(){f=t.renderer.screenToTextCoordinates(i,s),t.moveCursorToPosition(f),t.renderer.scrollCursorIntoView()};r.addListener(c,\"dragleave\",function(e){if(t.getReadOnly())return;l--;if(l>0)return;return clearInterval(o),t.session.removeMarker(n),n=null,t.selection.setSelectionRange(u,a),r.preventDefault(e)}),r.addListener(c,\"drop\",function(e){if(t.getReadOnly())return;return l=0,clearInterval(o),t.session.removeMarker(n),n=null,u.end=t.session.insert(f,e.dataTransfer.getData(\"Text\")),u.start=f,t.focus(),t.selection.setSelectionRange(u),r.preventDefault(e)})};t.DragdropHandler=i}),define(\"ace/mouse/fold_handler\",[\"require\",\"exports\",\"module\"],function(e,t,n){function r(e){e.on(\"click\",function(t){var n=t.getDocumentPosition(),r=e.session,i=r.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?r.removeFold(i):r.expandFold(i),t.stop())}),e.on(\"guttermousedown\",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n==\"foldWidgets\"){var r=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[r]&&e.session.onFoldWidgetClick(r,t),t.stop()}}),e.on(\"gutterdblclick\",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n==\"foldWidgets\"){var r=t.getDocumentPosition().row,i=e.session,s=i.foldWidgets;if(!s||s[r])return;var o=r-1,u;while(o>=0){var a=s[o];a==null&&(a=s[o]=i.getFoldWidget());if(a==\"start\"){var f=i.getFoldWidgetRange(o);u||(u=f);if(f&&f.end.row>=r)break}o--}o==-1&&(f=u);if(f){var r=f.start.row,l=i.getFoldAt(r,i.getLine(r).length,1);l?i.removeFold(l):(i.addFold(\"...\",f),e.renderer.scrollCursorIntoView({row:f.start.row,column:0}))}t.stop()}})}t.FoldHandler=r}),define(\"ace/keyboard/keybinding\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/event\"],function(e,t,n){var r=e(\"../lib/keys\"),i=e(\"../lib/event\"),s=function(e){this.$editor=e,this.$data={},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0),this.$data={editor:this.$editor}},this.setKeyboardHandler=function(e){if(this.$handlers[this.$handlers.length-1]==e)return;while(this.$handlers[1])this.removeKeyboardHandler(this.$handlers[1]);this.addKeyboardHandler(e,1)},this.addKeyboardHandler=function(e,t){if(!e)return;var n=this.$handlers.indexOf(e);n!=-1&&this.$handlers.splice(n,1),t==undefined?this.$handlers.push(e):this.$handlers.splice(t,0,e),n==-1&&e.attach&&e.attach(this.$editor)},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return t==-1?!1:(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.$callKeyboardHandlers=function(e,t,n,r){var s,o=!1,u=this.$editor.commands;for(var a=this.$handlers.length;a--;){s=this.$handlers[a].handleKeyboard(this.$data,e,t,n,r);if(!s||!s.command)continue;s.command==\"null\"?o=s.passEvent!=1:o=u.exec(s.command,this.$editor,s.args,r),o&&r&&e!=-1&&i.stopEvent(r);if(o)break}return o},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){var t=this.$callKeyboardHandlers(-1,e);t||this.$editor.commands.exec(\"insertstring\",this.$editor,e)}}).call(s.prototype),t.KeyBinding=s}),define(\"ace/edit_session\",[\"require\",\"exports\",\"module\",\"ace/config\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/net\",\"ace/lib/event_emitter\",\"ace/selection\",\"ace/mode/text\",\"ace/range\",\"ace/document\",\"ace/background_tokenizer\",\"ace/search_highlight\",\"ace/edit_session/folding\",\"ace/edit_session/bracket_match\"],function(e,t,n){var r=e(\"./config\"),i=e(\"./lib/oop\"),s=e(\"./lib/lang\"),o=e(\"./lib/net\"),u=e(\"./lib/event_emitter\").EventEmitter,a=e(\"./selection\").Selection,f=e(\"./mode/text\").Mode,l=e(\"./range\").Range,c=e(\"./document\").Document,h=e(\"./background_tokenizer\").BackgroundTokenizer,p=e(\"./search_highlight\").SearchHighlight,d=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){var e=\"\";return this.forEach(function(t){e+=\"\\n\"+t.toString()}),e},this.on(\"changeFold\",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this);if(typeof e!=\"object\"||!e.getLine)e=new c(e);this.setDocument(e),this.selection=new a(this),this.setMode(t)};(function(){function g(e){return e<4352?!1:e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510}i.implement(this,u),this.setDocument=function(e){this.doc&&this.doc.removeListener(\"change\",this.$onChange),this.doc=e,e.on(\"change\",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e){this.$docRowCache=[],this.$screenRowCache=[];return}var t=this.$getRowCacheIndex(this.$docRowCache,e)+1,n=this.$docRowCache.length;this.$docRowCache.splice(t,n),this.$screenRowCache.splice(t,n)},this.$getRowCacheIndex=function(e,t){var n=0,r=e.length-1;while(n<=r){var i=n+r>>1,s=e[i];if(t>s)n=i+1;else{if(!(t<s))return i;r=i-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){var t=e.data;this.$modified=!0,this.$resetRowCache(t.range.start.row);var n=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&!t.ignore&&(this.$deltasDoc.push(t),n&&n.length!=0&&this.$deltasFold.push({action:\"removeFolds\",folds:n}),this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(t),this._emit(\"change\",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveCursorTo(0,0),this.selection.clearSelection(),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n=this.bgTokenizer.getTokens(e),r,i=0;if(t==null)s=n.length-1,i=this.getLine(e).length;else for(var s=0;s<n.length;s++){i+=n[s].value.length;if(i>=t)break}return r=n[s],r?(r.index=s,r.start=i-r.value.length,r):null},this.setUndoManager=function(e){this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel();if(e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:\"fold\",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:\"doc\",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:\"aceupdate\",args:[t.$deltas,t]}),t.$deltas=[]},this.$informUndoManager=s.deferredCall(this.$syncInformUndoManager)}},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(\" \",this.getTabSize()):\"\t\"},this.$useSoftTabs=!0,this.setUseSoftTabs=function(e){if(this.$useSoftTabs===e)return;this.$useSoftTabs=e},this.getUseSoftTabs=function(){return this.$useSoftTabs},this.$tabSize=4,this.setTabSize=function(e){if(isNaN(e)||this.$tabSize===e)return;this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._emit(\"changeTabSize\")},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(e){if(this.$overwrite==e)return;this.$overwrite=e,this._emit(\"changeOverwrite\")},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=\"\"),this.$decorations[e]+=\" \"+t,this._emit(\"changeBreakpoint\",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||\"\").replace(\" \"+t,\"\"),this._emit(\"changeBreakpoint\",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]=\"ace_breakpoint\";this._emit(\"changeBreakpoint\",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._emit(\"changeBreakpoint\",{})},this.setBreakpoint=function(e,t){t===undefined&&(t=\"ace_breakpoint\"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._emit(\"changeBreakpoint\",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._emit(\"changeBreakpoint\",{})},this.addMarker=function(e,t,n,r){var i=this.$markerId++,s={range:e,type:n||\"line\",renderer:typeof n==\"function\"?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=s,this._emit(\"changeFrontMarker\")):(this.$backMarkers[i]=s,this._emit(\"changeBackMarker\")),i},this.addDynamicMarker=function(e,t){if(!e.update)return;var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._emit(\"changeFrontMarker\")):(this.$backMarkers[n]=e,this._emit(\"changeBackMarker\")),e},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(!t)return;var n=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete n[e],this._emit(t.inFront?\"changeFrontMarker\":\"changeBackMarker\"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new p(null,\"ace_selected-word\",\"text\");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,r){typeof t!=\"number\"&&(n=t,t=e),n||(n=\"ace_step\");var i=new l(e,0,t,Infinity),s=this.addMarker(i,n,\"fullLine\",r);return i.id=s,i},this.setAnnotations=function(e){this.$annotations=e,this._emit(\"changeAnnotation\",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.$annotations={},this._emit(\"changeAnnotation\",{})},this.$detectNewLine=function(e){var t=e.match(/^.*?(\\r?\\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine=\"\\n\"},this.getWordRange=function(e,t){var n=this.getLine(e),r=!1;t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe));if(r)var i=this.tokenRe;else if(/^\\s+$/.test(n.slice(t-1,t+1)))var i=/\\s/;else var i=this.nonTokenRe;var s=t;if(s>0){do s--;while(s>=0&&n.charAt(s).match(i));s++}var o=t;while(o<n.length&&n.charAt(o).match(i))o++;return new l(e,s,e,o)},this.getAWordRange=function(e,t){var n=this.getWordRange(e,t),r=this.getLine(n.end.row);while(r.charAt(n.end.column).match(/[ \\t]/))n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.$useWorker=!0,this.setUseWorker=function(e){if(this.$useWorker==e)return;this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._emit(\"tokenizerUpdate\",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e){if(e&&typeof e==\"object\"){if(e.getTokenizer)return this.$onChangeMode(e);var t=e,n=t.path}else n=e||\"ace/mode/text\";this.$modes[\"ace/mode/text\"]||(this.$modes[\"ace/mode/text\"]=new f);if(this.$modes[n]&&!t)return this.$onChangeMode(this.$modes[n]);this.$modeId=n,r.loadModule([\"mode\",n],function(e){if(this.$modeId!==n)return;if(this.$modes[n]&&!t)return this.$onChangeMode(this.$modes[n]);e&&e.Mode&&(e=new e.Mode(t),t||(this.$modes[n]=e,e.$id=n),this.$onChangeMode(e))}.bind(this)),this.$mode||this.$onChangeMode(this.$modes[\"ace/mode/text\"],!0)},this.$onChangeMode=function(e,t){if(this.$mode===e)return;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var n=e.getTokenizer();if(n.addEventListener!==undefined){var r=this.onReloadTokenizer.bind(this);n.addEventListener(\"update\",r)}if(!this.bgTokenizer){this.bgTokenizer=new h(n);var i=this;this.bgTokenizer.addEventListener(\"update\",function(e){i._emit(\"tokenizerUpdate\",e)})}else this.bgTokenizer.setTokenizer(n);this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(this.$modeId=e.$id,this.$setFolding(e.foldingRules),this._emit(\"changeMode\"),this.bgTokenizer.start(0))},this.$stopWorker=function(){this.$worker&&this.$worker.terminate(),this.$worker=null},this.$startWorker=function(){if(typeof Worker!=\"undefined\"&&!e.noWorker)try{this.$worker=this.$mode.createWorker(this)}catch(t){console.log(\"Could not load worker\"),console.log(t),this.$worker=null}else this.$worker=null},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){e=Math.round(Math.max(0,e));if(this.$scrollTop===e)return;this.$scrollTop=e,this._emit(\"changeScrollTop\",e)},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){e=Math.round(Math.max(0,e));if(this.$scrollLeft===e)return;this.$scrollLeft=e,this._emit(\"changeScrollLeft\",e)},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.screenWidth},this.$computeWidth=function(e){if(this.$modified||e){this.$modified=!1;if(this.$useWrapMode)return this.screenWidth=this.$wrapLimit;var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,s=this.$foldData[i],o=s?s.start.row:Infinity,u=t.length;for(var a=0;a<u;a++){if(a>o){a=s.end.row+1;if(a>=u)break;s=this.$foldData[i++],o=s?s.start.row:Infinity}n[a]==null&&(n[a]=this.$getStringScreenWidth(t[a])[0]),n[a]>r&&(r=n[a])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.undoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;var n=null;for(var r=e.length-1;r!=-1;r--){var i=e[r];i.group==\"doc\"?(this.doc.revertDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!0,n)):i.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n},this.redoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;var n=null;for(var r=0;r<e.length;r++){var i=e[r];i.group==\"doc\"&&(this.doc.applyDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!1,n))}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,n){function r(e){var n=e.action==\"insertText\"||e.action==\"insertLines\";return t?!n:n}var i=e[0],s,o,u=!1;r(i)?(s=i.range.clone(),u=!0):(s=l.fromPoints(i.range.start,i.range.start),u=!1);for(var a=1;a<e.length;a++)i=e[a],r(i)?(o=i.range.start,s.compare(o.row,o.column)==-1&&s.setStart(i.range.start),o=i.range.end,s.compare(o.row,o.column)==1&&s.setEnd(i.range.end),u=!0):(o=i.range.start,s.compare(o.row,o.column)==-1&&(s=l.fromPoints(i.range.start,i.range.start)),u=!1);if(n!=null){var f=n.compareRange(s);f==1?s.setStart(n.start):f==-1&&s.setEnd(n.end)}return s},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t){var n=this.getTextRange(e);this.remove(e);var r=t.row,i=t.column;!e.isMultiLine()&&e.start.row==r&&e.end.column<i&&(i-=n.length);if(e.isMultiLine()&&e.end.row<r){var s=this.doc.$split(n);r-=s.length-1}var o=r+e.end.row-e.start.row,u=e.isMultiLine()?e.end.column:i+e.end.column-e.start.column,a=new l(r,i,o,u);return this.insert(a.start,n),a},this.indentRows=function(e,t,n){n=n.replace(/\\t/g,this.getTabString());for(var r=e;r<=t;r++)this.insert({row:r,column:0},n)},this.outdentRows=function(e){var t=e.collapseRows(),n=new l(0,0,0,0),r=this.getTabSize();for(var i=t.start.row;i<=t.end.row;++i){var s=this.getLine(i);n.start.row=i,n.end.row=i;for(var o=0;o<r;++o)if(s.charAt(o)!=\" \")break;o<r&&s.charAt(o)==\"\t\"?(n.start.column=o,n.end.column=o+1):(n.start.column=0,n.end.column=o),this.remove(n)}},this.moveLinesUp=function(e,t){if(e<=0)return 0;var n=this.doc.removeLines(e,t);return this.doc.insertLines(e-1,n),-1},this.moveLinesDown=function(e,t){if(t>=this.doc.getLength()-1)return 0;var n=this.doc.removeLines(e,t);return this.doc.insertLines(e+1,n),1},this.duplicateLines=function(e,t){var e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t),n=this.getLines(e,t);this.doc.insertLines(e,n);var r=t-e+1;return r},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){t=Math.max(0,t);if(e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0);if(e){var t=this.getLength();this.$wrapData=[];for(var n=0;n<t;n++)this.$wrapData.push([]);this.$updateWrapData(0,t-1)}this._emit(\"changeWrapMode\")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){if(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)this.$wrapLimitRange.min=e,this.$wrapLimitRange.max=t,this.$modified=!0,this._emit(\"changeWrapMode\")},this.adjustWrapLimit=function(e){var t=this.$constrainWrapLimit(e);return t!=this.$wrapLimit&&t>0?(this.$wrapLimit=t,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._emit(\"changeWrapLimit\")),!0):!1},this.$constrainWrapLimit=function(e){var t=this.$wrapLimitRange.min;t&&(e=Math.max(t,e));var n=this.$wrapLimitRange.max;return n&&(e=Math.min(n,e)),Math.max(1,e)},this.getWrapLimit=function(){return this.$wrapLimit},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n,r=e.data.action,i=e.data.range.start.row,s=e.data.range.end.row,o=e.data.range.start,u=e.data.range.end,a=null;r.indexOf(\"Lines\")!=-1?(r==\"insertLines\"?s=i+e.data.lines.length:s=i,n=e.data.lines?e.data.lines.length:s-i):n=s-i;if(n!=0)if(r.indexOf(\"remove\")!=-1){this[t?\"$wrapData\":\"$rowLengthCache\"].splice(i,n);var f=this.$foldData;a=this.getFoldsInRange(e.data.range),this.removeFolds(a);var l=this.getFoldLine(u.row),c=0;if(l){l.addRemoveChars(u.row,u.column,o.column-u.column),l.shiftRow(-n);var h=this.getFoldLine(i);h&&h!==l&&(h.merge(l),l=h),c=f.indexOf(l)+1}for(c;c<f.length;c++){var l=f[c];l.start.row>=u.row&&l.shiftRow(-n)}s=i}else{var p;if(t){p=[i,0];for(var d=0;d<n;d++)p.push([]);this.$wrapData.splice.apply(this.$wrapData,p)}else p=Array(n),p.unshift(i,0),this.$rowLengthCache.splice.apply(this.$rowLengthCache,p);var f=this.$foldData,l=this.getFoldLine(i),c=0;if(l){var v=l.range.compareInside(o.row,o.column);v==0?(l=l.split(o.row,o.column),l.shiftRow(n),l.addRemoveChars(s,0,u.column-o.column)):v==-1&&(l.addRemoveChars(i,0,u.column-o.column),l.shiftRow(n)),c=f.indexOf(l)+1}for(c;c<f.length;c++){var l=f[c];l.start.row>=i&&l.shiftRow(n)}}else{n=Math.abs(e.data.range.start.column-e.data.range.end.column),r.indexOf(\"remove\")!=-1&&(a=this.getFoldsInRange(e.data.range),this.removeFolds(a),n=-n);var l=this.getFoldLine(i);l&&l.addRemoveChars(i,o.column,n)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error(\"doc.getLength() and $wrapData.length have to be the same!\"),t?this.$updateWrapData(i,s):this.$updateRowLengthCache(i,s),a},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var n=this.doc.getAllLines(),r=this.getTabSize(),i=this.$wrapData,u=this.$wrapLimit,f,l,c=e;t=Math.min(t,n.length-1);while(c<=t){l=this.getFoldLine(c,l);if(!l)f=this.$getDisplayTokens(s.stringTrimRight(n[c])),i[c]=this.$computeWrapSplits(f,u,r),c++;else{f=[],l.walk(function(e,t,r,i){var s;if(e!=null){s=this.$getDisplayTokens(e,f.length),s[0]=o;for(var u=1;u<s.length;u++)s[u]=a}else s=this.$getDisplayTokens(n[t].substring(i,r),f.length);f=f.concat(s)}.bind(this),l.end.row,n[l.end.row].length+1);while(f.length!=0&&f[f.length-1]>=d)f.pop();i[l.start.row]=this.$computeWrapSplits(f,u,r),c=l.end.row+1}}};var t=1,n=2,o=3,a=4,c=9,d=10,v=11,m=12;this.$computeWrapSplits=function(e,t){function u(t){var r=e.slice(i,t),o=r.length;r.join(\"\").replace(/12/g,function(){o-=1}).replace(/2/g,function(){o-=1}),s+=o,n.push(s),i=t}if(e.length==0)return[];var n=[],r=e.length,i=0,s=0;while(r-i>t){var f=i+t;if(e[f]>=d){while(e[f]>=d)f++;u(f);continue}if(e[f]==o||e[f]==a){for(f;f!=i-1;f--)if(e[f]==o)break;if(f>i){u(f);continue}f=i+t;for(f;f<e.length;f++)if(e[f]!=a)break;if(f==e.length)break;u(f);continue}var l=Math.max(f-10,i-1);while(f>l&&e[f]<o)f--;while(f>l&&e[f]==c)f--;if(f>l){u(++f);continue}f=i+t,u(f)}return n},this.$getDisplayTokens=function(e,r){var i=[],s;r=r||0;for(var o=0;o<e.length;o++){var u=e.charCodeAt(o);if(u==9){s=this.getScreenTabSize(i.length+r),i.push(v);for(var a=1;a<s;a++)i.push(m)}else u==32?i.push(d):u>39&&u<48||u>57&&u<64?i.push(c):u>=4352&&g(u)?i.push(t,n):i.push(t)}return i},this.$getStringScreenWidth=function(e,t,n){if(t==0)return[0,0];t==null&&(t=Infinity),n=n||0;var r,i;for(i=0;i<e.length;i++){r=e.charCodeAt(i),r==9?n+=this.getScreenTabSize(n):r>=4352&&g(r)?n+=2:n+=1;if(n>t)break}return[n,i]},this.getRowLength=function(e){return!this.$useWrapMode||!this.$wrapData[e]?1:this.$wrapData[e].length+1},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:undefined},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(e<0)return{row:0,column:0};var n,r=0,i=0,s,o=0,u=0,a=this.$screenRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var o=a[f],r=this.$docRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getLength()-1,p=this.getNextFoldLine(r),d=p?p.start.row:Infinity;while(o<=e){u=this.getRowLength(r);if(o+u-1>=e||r>=h)break;o+=u,r++,r>d&&(r=p.end.row+1,p=this.getNextFoldLine(r,p),d=p?p.start.row:Infinity),c&&(this.$docRowCache.push(r),this.$screenRowCache.push(o))}if(p&&p.start.row<=r)n=this.getFoldDisplayLine(p),r=p.start.row;else{if(o+u<=e||r>h)return{row:h,column:this.getLine(h).length};n=this.getLine(r),p=null}if(this.$useWrapMode){var v=this.$wrapData[r];v&&(s=v[e-o],e>o&&v.length&&(i=v[e-o-1]||v[v.length-1],n=n.substring(i)))}return i+=this.$getStringScreenWidth(n,t)[1],this.$useWrapMode&&i>=s&&(i=s-1),p?p.idxToPosition(i):{row:r,column:i}},this.documentToScreenPosition=function(e,t){if(typeof t==\"undefined\")var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,s=null;s=this.getFoldAt(e,t,1),s&&(e=s.start.row,t=s.start.column);var o,u=0,a=this.$docRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var u=a[f],r=this.$screenRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getNextFoldLine(u),p=h?h.start.row:Infinity;while(u<e){if(u>=p){o=h.end.row+1;if(o>e)break;h=this.getNextFoldLine(o,h),p=h?h.start.row:Infinity}else o=u+1;r+=this.getRowLength(u),u=o,c&&(this.$docRowCache.push(u),this.$screenRowCache.push(r))}var d=\"\";h&&u>=p?(d=this.getFoldDisplayLine(h,e,t),i=h.start.row):(d=this.getLine(e).substring(0,t),i=e);if(this.$useWrapMode){var v=this.$wrapData[i],m=0;while(d.length>=v[m])r++,m++;d=d.substring(v[m-1]||0,d.length)}return{row:r,column:this.$getStringScreenWidth(d)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(!this.$useWrapMode){e=this.getLength();var n=this.$foldData;for(var r=0;r<n.length;r++)t=n[r],e-=t.end.row-t.start.row}else{var i=this.$wrapData.length,s=0,r=0,t=this.$foldData[r++],o=t?t.start.row:Infinity;while(s<i)e+=this.$wrapData[s].length+1,s++,s>o&&(s=t.end.row+1,t=this.$foldData[r++],o=t?t.start.row:Infinity)}return e}}).call(d.prototype),e(\"./edit_session/folding\").Folding.call(d.prototype),e(\"./edit_session/bracket_match\").BracketMatch.call(d.prototype),t.EditSession=d}),define(\"ace/config\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/lib/net\",\"ace/lib/event_emitter\"],function(e,t,n){\"no use strict\";function f(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}var r=e(\"./lib/lang\"),i=e(\"./lib/oop\"),s=e(\"./lib/net\"),o=e(\"./lib/event_emitter\").EventEmitter,u=function(){return this}(),a={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:\"\",suffix:\".js\",$moduleUrls:{}};t.get=function(e){if(!a.hasOwnProperty(e))throw new Error(\"Unknown config key: \"+e);return a[e]},t.set=function(e,t){if(!a.hasOwnProperty(e))throw new Error(\"Unknown config key: \"+e);a[e]=t},t.all=function(){return r.copyObject(a)},i.implement(t,o),t.moduleUrl=function(e,t){if(a.$moduleUrls[e])return a.$moduleUrls[e];var n=e.split(\"/\");t=t||n[n.length-2]||\"\";var r=n[n.length-1].replace(t,\"\").replace(/(^[\\-_])|([\\-_]$)/,\"\");!r&&n.length>1&&(r=n[n.length-2]);var i=a[t+\"Path\"];return i==null&&(i=a.basePath),i&&i.slice(-1)!=\"/\"&&(i+=\"/\"),i+t+\"-\"+r+this.get(\"suffix\")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t},t.loadModule=function(n,r){var i,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{i=e(n)}catch(u){}if(i)return r(i);var a=function(){e([n],function(e){t._emit(\"load.module\",{name:n,module:e}),r(e)})};if(!t.get(\"packaged\"))return a();s.loadScript(t.moduleUrl(n,o),a)},t.init=function(){a.packaged=e.packaged||n.packaged||u.define&&define.packaged;if(!u.document)return\"\";var r={},i=\"\",s=document.getElementsByTagName(\"script\");for(var o=0;o<s.length;o++){var l=s[o],c=l.src||l.getAttribute(\"src\");if(!c)continue;var h=l.attributes;for(var p=0,d=h.length;p<d;p++){var v=h[p];v.name.indexOf(\"data-ace-\")===0&&(r[f(v.name.replace(/^data-ace-/,\"\"))]=v.value)}var m=c.match(/^(.*)\\/ace(\\-\\w+)?\\.js(\\?|$)/);m&&(i=m[1])}i&&(r.base=r.base||i,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var g in r)typeof r[g]!=\"undefined\"&&t.set(g,r[g])}}),define(\"ace/lib/net\",[\"require\",\"exports\",\"module\",\"ace/lib/useragent\"],function(e,t,n){var r=e(\"./useragent\");t.get=function(e,n){var r=t.createXhr();r.open(\"GET\",e,!0),r.onreadystatechange=function(e){r.readyState===4&&n(r.responseText)},r.send(null)};var i=[\"Msxml2.XMLHTTP\",\"Microsoft.XMLHTTP\",\"Msxml2.XMLHTTP.4.0\"];t.createXhr=function(){var e,t,n;if(typeof XMLHttpRequest!=\"undefined\")return new XMLHttpRequest;for(t=0;t<3;t++){n=i[t];try{e=new ActiveXObject(n)}catch(r){}if(e){i=[n];break}}if(!e)throw new Error(\"createXhr(): XMLHttpRequest not available\");return e},t.loadScript=function(e,t){var n=document.getElementsByTagName(\"head\")[0],i=document.createElement(\"script\");i.src=e,n.appendChild(i),r.isOldIE?i.onreadystatechange=function(){this.readyState==\"loaded\"&&t()}:i.onload=t}}),define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r={};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry=this._eventRegistry||{},this._defaultHandlers=this._defaultHandlers||{};var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!=\"object\"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=function(){this.propagationStopped=!0}),t.preventDefault||(t.preventDefault=function(){this.defaultPrevented=!0});for(var i=0;i<n.length;i++){n[i](t);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t)},r.setDefaultHandler=function(e,t){this._defaultHandlers=this._defaultHandlers||{};if(this._defaultHandlers[e])throw new Error(\"The default handler for '\"+e+\"' is already set\");this._defaultHandlers[e]=t},r.on=r.addEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];n||(n=this._eventRegistry[e]=[]),n.indexOf(t)==-1&&n.push(t)},r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),define(\"ace/selection\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/range\"],function(e,t,n){var r=e(\"./lib/oop\"),i=e(\"./lib/lang\"),s=e(\"./lib/event_emitter\").EventEmitter,o=e(\"./range\").Range,u=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on(\"change\",function(e){t._emit(\"changeCursor\"),t.$isEmpty||t._emit(\"changeSelection\"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)}),this.selectionAnchor.on(\"change\",function(){t.$isEmpty||t._emit(\"changeSelection\")})};(function(){r.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit(\"changeSelection\"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty){this.moveCursorTo(this.lead.row,this.lead.column+e);return}var t=this.getSelectionAnchor(),n=this.getSelectionLead(),r=this.isBackwards();(!r||t.column!==0)&&this.setSelectionAnchor(t.row,t.column+e),(r||n.column!==0)&&this.$moveSelection(function(){this.moveCursorTo(n.row,n.column+e)})},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit(\"changeSelection\"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(typeof t==\"undefined\"){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n=typeof e==\"number\"?e:this.lead.row,r,i=this.session.getFoldLine(n);return i?(n=i.start.row,r=i.end.row):r=n,t?new o(n,0,r,this.session.getLine(r).length):new o(n,0,r+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(e.column==0)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column-n,e.column).split(\" \").length-1==n?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize(),e=this.lead;this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column,e.column+n).split(\" \").length-1==n?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column),s=i.match(/^\\s*/);s[0].length==t?this.moveCursorTo(r.row,r.column):this.moveCursorTo(r.row,r.column+s[0].length)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\\s+$/);r>0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(i=this.session.nonTokenRe.exec(r))t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t);if(t>=n.length){this.moveCursorTo(e,n.length),this.moveCursorRight(),e<this.doc.getLength()-1&&this.moveCursorWordRight();return}if(i=this.session.tokenRe.exec(r))t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(e,t)},this.moveCursorLongWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1)){this.moveCursorTo(n.start.row,n.start.column);return}var r=this.session.getFoldStringAt(e,t,-1);r==null&&(r=this.doc.getLine(e).substring(0,t));var s=i.stringReverse(r),o;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;if(o=this.session.nonTokenRe.exec(s))t-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0;if(t<=0){this.moveCursorTo(e,0),this.moveCursorLeft(),e>0&&this.moveCursorWordLeft();return}if(o=this.session.tokenRe.exec(s))t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(e,t)},this.$shortWordEndIndex=function(e){var t,n=0,r,i=/\\s/,s=this.session.tokenRe;s.lastIndex=0;if(t=this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{while((r=e[n])&&i.test(r))n++;if(n<=1){s.lastIndex=0;while((r=e[n])&&!s.test(r)){s.lastIndex=0,n++;if(i.test(r)){if(n>2){n--;break}while((r=e[n])&&i.test(r))n++;if(n>2)break}}}}return s.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var s=this.doc.getLength();do e++,r=this.doc.getLine(e);while(e<s&&/^\\s*$/.test(r));/^\\s+/.test(r)||(r=\"\"),t=0}var o=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+o)},this.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(n.start.row,n.start.column);var r=this.session.getLine(e).substring(0,t);if(t==0){do e--,r=this.doc.getLine(e);while(e>0&&/^\\s*$/.test(r));t=r.length,/\\s+$/.test(r)||(r=\"\")}var s=i.stringReverse(r),o=this.$shortWordEndIndex(s);return this.moveCursorTo(e,t-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);t===0&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var r=this.session.screenToDocumentPosition(n.row+e,n.column);this.moveCursorTo(r.row,r.column+t,t===0)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e}}).call(u.prototype),t.Selection=u}),define(\"ace/range\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row==e.start.row&&this.end.row==e.end.row&&this.start.column==e.start.column&&this.end.column==e.end.column},this.toString=function(){return\"Range: [\"+this.start.row+\"/\"+this.start.column+\"] -> [\"+this.end.row+\"/\"+this.end.column+\"]\"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e==\"object\"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e==\"object\"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};if(this.start.row>t)var i={row:t+1,column:0};if(this.start.row<e)var i={row:e,column:0};if(this.end.row<e)var n={row:e,column:0};return r.fromPoints(i||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var i={row:e,column:t};else var s={row:e,column:t};return r.fromPoints(i||this.start,s||this.end)},this.isEmpty=function(){return this.start.row==this.end.row&&this.start.column==this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return r.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new r(t.row,t.column,n.row,n.column)}}).call(r.prototype),r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},t.Range=r}),define(\"ace/mode/text\",[\"require\",\"exports\",\"module\",\"ace/tokenizer\",\"ace/mode/text_highlight_rules\",\"ace/mode/behaviour\",\"ace/unicode\"],function(e,t,n){var r=e(\"../tokenizer\").Tokenizer,i=e(\"./text_highlight_rules\").TextHighlightRules,s=e(\"./behaviour\").Behaviour,o=e(\"../unicode\"),u=function(){this.$tokenizer=new r((new i).getRules()),this.$behaviour=new s};(function(){this.tokenRe=new RegExp(\"^[\"+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+\"\\\\$_]+\",\"g\"),this.nonTokenRe=new RegExp(\"^(?:[^\"+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+\"\\\\$_]|s])+\",\"g\"),this.getTokenizer=function(){return this.$tokenizer},this.toggleCommentLines=function(e,t,n,r){},this.getNextLineIndent=function(e,t,n){return\"\"},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){var t=e.match(/^(\\s+)/);return t?t[1]:\"\"},this.createWorker=function(e){return null},this.createModeDelegates=function(e){if(!this.$embeds)return;this.$modes={};for(var t=0;t<this.$embeds.length;t++)e[this.$embeds[t]]&&(this.$modes[this.$embeds[t]]=new e[this.$embeds[t]]);var n=[\"toggleCommentLines\",\"getNextLineIndent\",\"checkOutdent\",\"autoOutdent\",\"transformAction\"];for(var t=0;t<n.length;t++)(function(e){var r=n[t],i=e[r];e[n[t]]=function(){return this.$delegator(r,arguments,i)}})(this)},this.$delegator=function(e,t,n){var r=t[0];for(var i=0;i<this.$embeds.length;i++){if(!this.$modes[this.$embeds[i]])continue;var s=r.split(this.$embeds[i]);if(!s[0]&&s[1]){t[0]=s[1];var o=this.$modes[this.$embeds[i]];return o[e].apply(o,t)}}var u=n.apply(this,t);return n?u:undefined},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var s=this.$behaviour.getBehaviours();for(var o in s)if(s[o][t]){var u=s[o][t].apply(this,arguments);if(u)return u}}}}).call(u.prototype),t.Mode=u}),define(\"ace/tokenizer\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r=function(e,t){t=t?\"g\"+t:\"g\",this.rules=e,this.regExps={},this.matchMappings={};for(var n in this.rules){var r=this.rules[n],i=r,s=[],o=0,u=this.matchMappings[n]={};for(var a=0;a<i.length;a++){i[a].regex instanceof RegExp&&(i[a].regex=i[a].regex.toString().slice(1,-1));var f=(new RegExp(\"(?:(\"+i[a].regex+\")|(.))\")).exec(\"a\").length-2,l=i[a].regex.replace(/\\\\([0-9]+)/g,function(e,t){return\"\\\\\"+(parseInt(t,10)+o+1)});if(f>1&&i[a].token.length!==f-1)throw new Error(\"For \"+i[a].regex+\" the matching groups (\"+(f-1)+\") and length of the token array (\"+i[a].token.length+\") don't match (rule #\"+a+\" of state \"+n+\")\");u[o]={rule:a,len:f},o+=f,s.push(l)}this.regExps[n]=new RegExp(\"(?:(\"+s.join(\")|(\")+\")|(.))\",t)}};(function(){this.getLineTokens=function(e,t){var n=t||\"start\",r=this.rules[n],i=this.matchMappings[n],s=this.regExps[n];s.lastIndex=0;var o,u=[],a=0,f={type:null,value:\"\"};while(o=s.exec(e)){var l=\"text\",c=null,h=[o[0]];for(var p=0;p<o.length-2;p++){if(o[p+1]===undefined)continue;c=r[i[p].rule],i[p].len>1&&(h=o.slice(p+2,p+1+i[p].len)),typeof c.token==\"function\"?l=c.token.apply(this,h):l=c.token;if(c.next){n=c.next,r=this.rules[n],i=this.matchMappings[n],a=s.lastIndex,s=this.regExps[n];if(s===undefined)throw new Error(\"You indicated a state of \"+c.next+\" to go to, but it doesn't exist!\");s.lastIndex=a}break}if(h[0]){typeof l==\"string\"&&(h=[h.join(\"\")],l=[l]);for(var p=0;p<h.length;p++){if(!h[p])continue;!!c&&c.merge===!1||f.type!==l[p]?(f.type&&u.push(f),f={type:l[p],value:h[p]}):f.value+=h[p]}}if(a==e.length)break;a=s.lastIndex}return f.type&&u.push(f),{tokens:u,state:n}}}).call(r.prototype),t.Tokenizer=r}),define(\"ace/mode/text_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\"],function(e,t,n){var r=e(\"../lib/lang\"),i=function(){this.$rules={start:[{token:\"empty_line\",regex:\"^$\"},{token:\"text\",regex:\".+\"}]}};(function(){this.addRules=function(e,t){for(var n in e){var r=e[n];for(var i=0;i<r.length;i++){var s=r[i];s.next&&(s.next=t+s.next)}this.$rules[t+n]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,s){var o=(new e).getRules();if(i)for(var u=0;u<i.length;u++)i[u]=t+i[u];else{i=[];for(var a in o)i.push(t+a)}this.addRules(o,t);if(n){var f=Array.prototype[s?\"push\":\"unshift\"];for(var u=0;u<i.length;u++)f.apply(this.$rules[i[u]],r.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds},this.createKeywordMapper=function(e,t,n,r){var i=Object.create(null);return Object.keys(e).forEach(function(t){var s=e[t];n&&(s=s.toLowerCase());var o=s.split(r||\"|\");for(var u=o.length;u--;)i[o[u]]=t}),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i}),define(\"ace/mode/behaviour\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(undefined){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if(typeof e==\"function\")var n=(new e).getBehaviours(t);else var n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(!e)return this.$behaviours;var t={};for(var n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}}).call(r.prototype),t.Behaviour=r}),define(\"ace/unicode\",[\"require\",\"exports\",\"module\"],function(e,t,n){function r(e){var n=/\\w{4}/g;for(var r in e)t.packages[r]=e[r].replace(n,\"\\\\u$&\")}t.packages={},r({L:\"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC\",Ll:\"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A\",Lu:\"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A\",Lt:\"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC\",Lm:\"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F\",Lo:\"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC\",M:\"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26\",Mn:\"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26\",Mc:\"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC\",Me:\"0488048906DE20DD-20E020E2-20E4A670-A672\",N:\"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19\",Nd:\"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19\",Nl:\"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF\",No:\"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835\",P:\"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65\",Pd:\"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D\",Ps:\"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62\",Pe:\"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63\",Pi:\"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20\",Pf:\"00BB2019201D203A2E032E052E0A2E0D2E1D2E21\",Pc:\"005F203F20402054FE33FE34FE4D-FE4FFF3F\",Po:\"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65\",S:\"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD\",Sm:\"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC\",Sc:\"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6\",Sk:\"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3\",So:\"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD\",Z:\"002000A01680180E2000-200A20282029202F205F3000\",Zs:\"002000A01680180E2000-200A202F205F3000\",Zl:\"2028\",Zp:\"2029\",C:\"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF\",Cc:\"0000-001F007F-009F\",Cf:\"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB\",Co:\"E000-F8FF\",Cs:\"D800-DFFF\",Cn:\"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF\"})}),define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"],function(e,t,n){var r=e(\"./lib/oop\"),i=e(\"./lib/event_emitter\").EventEmitter,s=e(\"./range\").Range,o=e(\"./anchor\").Anchor,u=function(e){this.$lines=[],e.length==0?this.$lines=[\"\"]:Array.isArray(e)?this.insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},\"aaa\".split(/a/).length==0?this.$split=function(e){return e.replace(/\\r\\n|\\r/g,\"\\n\").split(\"\\n\")}:this.$split=function(e){return e.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\\r\\n|\\r|\\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine=\"\\n\"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\"windows\":return\"\\r\\n\";case\"unix\":return\"\\n\";default:return this.$autoNewLine}},this.$autoNewLine=\"\\n\",this.$newLineMode=\"auto\",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e==\"\\r\\n\"||e==\"\\r\"||e==\"\\n\"},this.getLine=function(e){return this.$lines[e]||\"\"},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.$lines[e.start.row].substring(e.start.column,e.end.column);var t=this.getLines(e.start.row+1,e.end.row-1);return t.unshift((this.$lines[e.start.row]||\"\").substring(e.start.column)),t.push((this.$lines[e.end.row]||\"\").substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t&&(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this.insertLines(e.row,n),e=this.insertInLine(e,i||\"\")),e},this.insertLines=function(e,t){if(t.length==0)return{row:e,column:0};if(t.length>65535){var n=this.insertLines(e,t.slice(65535));t=t.slice(0,65535)}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:\"insertLines\",range:i,lines:t};return this._emit(\"change\",{data:o}),n||i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||\"\";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:\"insertText\",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._emit(\"change\",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||\"\";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:\"insertText\",range:s.fromPoints(e,r),text:t};return this._emit(\"change\",{data:i}),r},this.remove=function(e){e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this.removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:\"removeText\",range:r,text:o};return this._emit(\"change\",{data:a}),r.start},this.removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:\"removeLines\",range:n,nl:this.getNewLineCharacter(),lines:r};return this._emit(\"change\",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:\"removeText\",range:r,text:this.getNewLineCharacter()};this._emit(\"change\",{data:o})},this.replace=function(e,t){if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action==\"insertLines\"?this.insertLines(r.start.row,n.lines):n.action==\"insertText\"?this.insert(r.start,n.text):n.action==\"removeLines\"?this.removeLines(r.start.row,r.end.row-1):n.action==\"removeText\"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action==\"insertLines\"?this.removeLines(r.start.row,r.end.row-1):n.action==\"insertText\"?this.remove(r):n.action==\"removeLines\"?this.insertLines(r.start.row,n.lines):n.action==\"removeText\"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length;return i+r*o+e.column}}).call(u.prototype),t.Document=u}),define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(e,t,n){var r=e(\"./lib/oop\"),i=e(\"./lib/event_emitter\").EventEmitter,s=t.Anchor=function(e,t,n){this.document=e,typeof n==\"undefined\"?this.setPosition(t.row,t.column):this.setPosition(t,n),this.$onChange=this.onChange.bind(this),e.on(\"change\",this.$onChange)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column;t.action===\"insertText\"?n.start.row===r&&n.start.column<=i?n.start.row===n.end.row?i+=n.end.column-n.start.column:(i-=n.start.column,r+=n.end.row-n.start.row):n.start.row!==n.end.row&&n.start.row<r&&(r+=n.end.row-n.start.row):t.action===\"insertLines\"?n.start.row<=r&&(r+=n.end.row-n.start.row):t.action==\"removeText\"?n.start.row==r&&n.start.column<i?n.end.column>=i?i=n.start.column:i=Math.max(0,i-(n.end.column-n.start.column)):n.start.row!==n.end.row&&n.start.row<r?(n.end.row==r&&(i=Math.max(0,i-n.end.column)+n.start.column),r-=n.end.row-n.start.row):n.end.row==r&&(r-=n.end.row-n.start.row,i=Math.max(0,i-n.end.column)+n.start.column):t.action==\"removeLines\"&&n.start.row<=r&&(n.end.row<=r?r-=n.end.row-n.start.row:(r=n.start.row,i=0)),this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._emit(\"change\",{old:i,value:r})},this.detach=function(){this.document.removeEventListener(\"change\",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),define(\"ace/background_tokenizer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(e,t,n){var r=e(\"./lib/oop\"),i=e(\"./lib/event_emitter\").EventEmitter,s=5e3,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(!n.running)return;var e=new Date,t=n.currentLine,r=n.doc,i=0,s=r.getLength();while(n.currentLine<s){n.$tokenizeRow(n.currentLine);while(n.lines[n.currentLine])n.currentLine++;i++;if(i%5==0&&new Date-e>20){n.fireUpdateEvent(t,n.currentLine-1),n.running=setTimeout(n.$worker,20);return}}n.running=!1,n.fireUpdateEvent(t,s-1)}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._emit(\"update\",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.$updateOnChange=function(e){var t=e.range,n=t.start.row,r=t.end.row-n;if(r===0)this.lines[n]=null;else if(e.action==\"removeText\"||e.action==\"removeLines\")this.lines.splice(n,r+1,null),this.states.splice(n,r+1,null);else{var i=Array(r+1);i.unshift(n,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop(),this.running=setTimeout(this.$worker,700)},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||\"start\"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1];if(t.length>s){var r={value:t.substr(s),type:\"text\"};t=t.slice(0,s)}var i=this.tokenizer.getLineTokens(t,n);return r&&(i.tokens.push(r),i.state=\"start\"),this.states[e]!==i.state?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),define(\"ace/search_highlight\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"],function(e,t,n){var r=e(\"./lib/lang\"),i=e(\"./lib/oop\"),s=e(\"./range\").Range,o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||\"text\"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){if(this.regExp+\"\"==e+\"\")return;this.regExp=e,this.cache=[]},this.update=function(e,t,n,i){if(!this.regExp)return;var o=i.firstRow,u=i.lastRow;for(var a=o;a<=u;a++){var f=this.cache[a];f==null&&(f=r.getMatchOffsets(n.getLine(a),this.regExp),f.length>this.MAX_RANGES&&(f=f.slice(0,this.MAX_RANGES)),f=f.map(function(e){return new s(a,e.offset,a,e.offset+e.length)}),this.cache[a]=f.length?f:\"\");for(var l=f.length;l--;)t.drawSingleLineMarker(e,f[l].toScreenRange(n),this.clazz,i,null,this.type)}}}).call(o.prototype),t.SearchHighlight=o}),define(\"ace/edit_session/folding\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/edit_session/fold_line\",\"ace/edit_session/fold\",\"ace/token_iterator\"],function(e,t,n){function u(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;var i=r.folds;for(var s=0;s<i.length;s++){var o=i[s];if(o.range.contains(e,t)){if(n==1&&o.range.isEnd(e,t))continue;if(n==-1&&o.range.isStart(e,t))continue;return o}}},this.getFoldsInRange=function(e){e=e.clone();var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,n.column-=1;for(var s=0;s<r.length;s++){var o=r[s].range.compareRange(e);if(o==2)continue;if(o==-2)break;var u=r[s].folds;for(var a=0;a<u.length;a++){var f=u[a];o=f.range.compareRange(e);if(o==-2)break;if(o==2)continue;if(o==42)break;i.push(f)}}return i},this.getAllFolds=function(){function n(t){e.push(t);if(!t.subFolds)return;for(var r=0;r<t.subFolds.length;r++)n(t.subFolds[r])}var e=[],t=this.$foldData;for(var r=0;r<t.length;r++)for(var i=0;i<t[r].folds.length;i++)n(t[r].folds[i]);return e},this.getFoldStringAt=function(e,t,n,r){r=r||this.getFoldLine(e);if(!r)return null;var i={end:{column:0}},s,o;for(var u=0;u<r.folds.length;u++){o=r.folds[u];var a=o.range.compareEnd(e,t);if(a==-1){s=this.getLine(o.start.row).substring(i.end.column,o.start.column);break}if(a===0)return null;i=o}return s||(s=this.getLine(o.start.row).substring(i.end.column)),n==-1?s.substring(0,t-i.end.column):n==1?s.substring(t-i.end.column):s},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){var n=this.$foldData,r=t-e+1;for(var i=0;i<n.length;i++){var s=n[i],o=s.end.row,u=s.start.row;if(o>=t){u<t&&(u>=e?r-=t-u:r=0);break}o>=e&&(u>=e?r-=o-u:r-=o-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n=this.$foldData,r=!1,o;e instanceof s?o=e:o=new s(t,e),this.$clipRangeToDocument(o.range);var u=o.start.row,a=o.start.column,f=o.end.row,l=o.end.column;if(u==f&&l-a<2)throw\"The range has to be at least 2 characters width\";var c=this.getFoldAt(u,a,1),h=this.getFoldAt(f,l,-1);if(c&&h==c)return c.addSubFold(o);if(c&&!c.range.isStart(u,a)||h&&!h.range.isEnd(f,l))throw\"A fold can't intersect already existing fold\"+o.range+c.range;var p=this.getFoldsInRange(o.range);p.length>0&&(this.removeFolds(p),o.subFolds=p);for(var d=0;d<n.length;d++){var v=n[d];if(f==v.start.row){v.addFold(o),r=!0;break}if(u==v.end.row){v.addFold(o),r=!0;if(!o.sameRow){var m=n[d+1];if(m&&m.start.row==f){v.merge(m);break}}break}if(f<=v.start.row)break}return r||(v=this.$addFoldLine(new i(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(v.start.row,v.start.row):this.$updateRowLengthCache(v.start.row,v.start.row),this.$modified=!0,this._emit(\"changeFold\",{data:o}),o},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,s=t.folds;if(s.length==1)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))s.pop(),t.end.row=s[s.length-1].end.row,t.end.column=s[s.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))s.shift(),t.start.row=s[0].start.row,t.start.column=s[0].start.column;else if(e.sameRow)s.splice(s.indexOf(e),1);else{var o=t.split(e.start.row,e.start.column);s=o.folds,s.shift(),o.start.row=s[0].start.row,o.start.column=s[0].start.column}this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r),this.$modified=!0,this._emit(\"changeFold\",{data:e})},this.removeFolds=function(e){var t=[];for(var n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(e){this.addFold(e)},this),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;e==null?n=new r(0,0,this.getLength(),0):typeof e==\"number\"?n=new r(e,0,e,this.getLine(e).length):\"row\"in e?n=r.fromPoints(e,e):n=e,i=this.getFoldsInRange(n);if(t)this.removeFolds(i);else while(i.length)this.expandFolds(i),i=this.getFoldsInRange(n)},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){r==null&&(r=e.start.row,i=0),t==null&&(t=e.end.row,n=this.getLine(t).length);var s=this.doc,o=\"\";return e.walk(function(e,t,n,u){if(t<r)return;if(t==r){if(n<i)return;u=Math.max(i,u)}e!=null?o+=e:o+=s.getLine(t).substring(u,n)}.bind(this),t,n),o},this.getDisplayLine=function(e,t,n,r){var i=this.getFoldLine(e);if(!i){var s;return s=this.doc.getLine(e),s.substring(r||0,t||s.length)}return this.getFoldDisplayLine(i,e,t,n,r)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new i(e,n)}),e},this.toggleFold=function(e){var t=this.selection,n=t.getRange(),r,i;if(n.isEmpty()){var s=n.start;r=this.getFoldAt(s.row,s.column);if(r){this.expandFold(r);return}(i=this.findMatchingBracket(s))?n.comparePoint(i)==1?n.end=i:(n.start=i,n.start.column++,n.end.column--):(i=this.findMatchingBracket({row:s.row,column:s.column+1}))?(n.comparePoint(i)==1?n.end=i:n.start=i,n.start.column++):n=this.getCommentFoldRange(s.row,s.column)||n}else{var o=this.getFoldsInRange(n);if(e&&o.length){this.expandFolds(o);return}o.length==1&&(r=o[0])}r||(r=this.getFoldAt(n.start.row,n.start.column));if(r&&r.range.toString()==n.toString()){this.expandFold(r);return}var u=\"...\";if(!n.isMultiLine()){u=this.getTextRange(n);if(u.length<4)return;u=u.trim().substring(0,2)+\"..\"}this.addFold(u,n)},this.getCommentFoldRange=function(e,t,n){var i=new o(this,e,t),s=i.getCurrentToken();if(s&&/^comment|string/.test(s.type)){var u=new r,a=new RegExp(s.type.replace(/\\..*/,\"\\\\.\"));if(n!=1){do s=i.stepBackward();while(s&&a.test(s.type));i.stepForward()}u.start.row=i.getCurrentTokenRow(),u.start.column=i.getCurrentTokenColumn()+2,i=new o(this,e,t);if(n!=-1){do s=i.stepForward();while(s&&a.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();return u.end.row=i.getCurrentTokenRow(),u.end.column=i.getCurrentTokenColumn()+s.value.length-2,u}},this.foldAll=function(e,t){var n=this.foldWidgets;t=t||this.getLength();for(var r=e||0;r<t;r++){n[r]==null&&(n[r]=this.getFoldWidget(r));if(n[r]!=\"start\")continue;var i=this.getFoldWidgetRange(r);if(i&&i.end.row<=t)try{this.addFold(\"...\",i)}catch(s){}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle=\"markbegin\",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error(\"invalid fold style: \"+e+\"[\"+Object.keys(this.$foldStyles).join(\", \")+\"]\");if(this.$foldStyle==e)return;this.$foldStyle=e,e==\"manual\"&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)},this.$setFolding=function(e){if(this.$foldMode==e)return;this.$foldMode=e,this.removeListener(\"change\",this.$updateFoldWidgets),this._emit(\"changeAnnotation\");if(!e||this.$foldStyle==\"manual\"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on(\"change\",this.$updateFoldWidgets)},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n=this.getFoldWidget(e),r=this.getLine(e),i=t.shiftKey,s=i||t.ctrlKey||t.altKey||t.metaKey,o;n==\"end\"?o=this.getFoldAt(e,0,-1):o=this.getFoldAt(e,r.length,1);if(o){s?this.removeFold(o):this.expandFold(o);return}var u=this.getFoldWidgetRange(e);if(u){if(!u.isMultiLine()){o=this.getFoldAt(u.start.row,u.start.column,1);if(o&&u.isEqual(o.range)){this.removeFold(o);return}}i||this.addFold(\"...\",u),s&&this.foldAll(u.start.row+1,u.end.row)}else s&&this.foldAll(e+1,this.getLength()),(t.target||t.srcElement).className+=\" ace_invalid\"},this.updateFoldWidgets=function(e){var t=e.data,n=t.range,r=n.start.row,i=n.end.row-r;if(i===0)this.foldWidgets[r]=null;else if(t.action==\"removeText\"||t.action==\"removeLines\")this.foldWidgets.splice(r,i+1,null);else{var s=Array(i+1);s.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}}}var r=e(\"../range\").Range,i=e(\"./fold_line\").FoldLine,s=e(\"./fold\").Fold,o=e(\"../token_iterator\").TokenIterator;t.Folding=u}),define(\"ace/edit_session/fold_line\",[\"require\",\"exports\",\"module\",\"ace/range\"],function(e,t,n){function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var r=e(\"../range\").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw\"Can't add a fold to this FoldLine as it has no connection\";this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw\"Trying to add fold to FoldRow that doesn't have a matching row\";this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r=0,i=this.folds,s,o,u,a=!0;t==null&&(t=this.end.row,n=this.end.column);for(var f=0;f<i.length;f++){s=i[f],o=s.range.compareStart(t,n);if(o==-1){e(null,t,n,r,a);return}u=e(null,s.start.row,s.start.column,r,a),u=!u&&e(s.placeholder,s.start.row,s.start.column,r);if(u||o==0)return;a=!s.sameRow,r=s.end.column}e(null,t,n,r,a)},this.getNextFoldTo=function(e,t){var n,r;for(var i=0;i<this.folds.length;i++){n=this.folds[i],r=n.range.compareEnd(e,t);if(r==-1)return{fold:n,kind:\"after\"};if(r==0)return{fold:n,kind:\"inside\"}}return null},this.addRemoveChars=function(e,t,n){var r=this.getNextFoldTo(e,t),i,s;if(r){i=r.fold;if(r.kind==\"inside\"&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){s=this.folds;var o=s.indexOf(i);o==0&&(this.start.column+=n);for(o;o<s.length;o++){i=s[o],i.start.column+=n;if(!i.sameRow)return;i.end.column+=n}this.end.column+=n}}},this.split=function(e,t){var n=this.getNextFoldTo(e,t).fold,r=this.folds,s=this.foldData;if(!n)return null;var o=r.indexOf(n),u=r[o-1];this.end.row=u.end.row,this.end.column=u.end.column,r=r.splice(o,r.length-o);var a=new i(s,r);return s.splice(s.indexOf(this)+1,0,a),a},this.merge=function(e){var t=e.folds;for(var n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+\": [\"];return this.folds.forEach(function(t){e.push(\"  \"+t.toString())}),e.push(\"]\"),e.join(\"\\n\")},this.idxToPosition=function(e){var t=0,n;for(var r=0;r<this.folds.length;r++){var n=this.folds[r];e-=n.start.column-t;if(e<0)return{row:n.start.row,column:n.start.column+e};e-=n.placeholder.length;if(e<0)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(i.prototype),t.FoldLine=i}),define(\"ace/edit_session/fold\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=[]};(function(){this.toString=function(){return'\"'+this.placeholder+'\" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new r(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t},this.addSubFold=function(e){if(this.range.isEqual(e))return this;if(!this.range.containsRange(e))throw\"A fold can't intersect already existing fold\"+e.range+this.range;var t=e.range.start.row,n=e.range.start.column;for(var r=0,i=-1;r<this.subFolds.length;r++){i=this.subFolds[r].range.compare(t,n);if(i!=1)break}var s=this.subFolds[r];if(i==0)return s.addSubFold(e);var t=e.range.end.row,n=e.range.end.column;for(var o=r,i=-1;o<this.subFolds.length;o++){i=this.subFolds[o].range.compare(t,n);if(i!=1)break}var u=this.subFolds[o];if(i==0)throw\"A fold can't intersect already existing fold\"+e.range+this.range;var a=this.subFolds.splice(r,o-r,e);return e.setFoldLine(this.foldLine),e}}).call(r.prototype)}),define(\"ace/token_iterator\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1};(function(){this.stepBackward=function(){this.$tokenIndex-=1;while(this.$tokenIndex<0){this.$row-=1;if(this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e=this.$session.getLength();this.$tokenIndex+=1;while(this.$tokenIndex>=this.$rowTokens.length){this.$row+=1;if(this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(n!==undefined)return n;n=0;while(t>0)t-=1,n+=e[t].value.length;return n}}).call(r.prototype),t.TokenIterator=r}),define(\"ace/edit_session/bracket_match\",[\"require\",\"exports\",\"module\",\"ace/token_iterator\",\"ace/range\"],function(e,t,n){function s(){this.findMatchingBracket=function(e,t){if(e.column==0)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(n==\"\")return null;var r=n.match(/([\\(\\[\\{])|([\\)\\]\\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),n=!0,r,s=t.charAt(e.column-1),o=s&&s.match(/([\\(\\[\\{])|([\\)\\]\\}])/);o||(s=t.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\\(\\[\\{])|([\\)\\]\\}])/),n=!1);if(!o)return null;if(o[1]){var u=this.$findClosingBracket(o[1],e);if(!u)return null;r=i.fromPoints(e,u),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var u=this.$findOpeningBracket(o[2],e);if(!u)return null;r=i.fromPoints(u,e),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.$brackets={\")\":\"(\",\"(\":\")\",\"]\":\"[\",\"[\":\"]\",\"{\":\"}\",\"}\":\"{\"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp(\"(\\\\.?\"+u.type.replace(\".\",\"\\\\.\").replace(\"rparen\",\".paren\")+\")+\"));var a=t.column-o.getCurrentTokenColumn()-2,f=u.value;for(;;){while(a>=0){var l=f.charAt(a);if(l==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else l==e&&(s+=1);a-=1}do u=o.stepBackward();while(u&&!n.test(u.type));if(u==null)break;f=u.value,a=f.length-1}return null},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp(\"(\\\\.?\"+u.type.replace(\".\",\"\\\\.\").replace(\"lparen\",\".paren\")+\")+\"));var a=t.column-o.getCurrentTokenColumn();for(;;){var f=u.value,l=f.length;while(a<l){var c=f.charAt(a);if(c==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else c==e&&(s+=1);a+=1}do u=o.stepForward();while(u&&!n.test(u.type));if(u==null)break;a=0}return null}}var r=e(\"../token_iterator\").TokenIterator,i=e(\"../range\").Range;t.BracketMatch=s}),define(\"ace/search\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"],function(e,t,n){var r=e(\"./lib/lang\"),i=e(\"./lib/oop\"),s=e(\"./range\").Range,o=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$matchIterator(e,this.$options);if(!t)return!1;var n=null;return t.forEach(function(e,t,r){if(!e.start){var i=e.offset+(r||0);n=new s(t,i,t,i+e.length)}else n=e;return!0}),n},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],u=t.re;if(t.$isMultiLine){var a=u.length,f=i.length-a;for(var l=u.offset||0;l<=f;l++){for(var c=0;c<a;c++)if(i[l+c].search(u[c])==-1)break;var h=i[l],p=i[l+a-1],d=h.match(u[0])[0].length,v=p.match(u[a-1])[0].length;o.push(new s(l,h.length-d,l+a-1,v))}}else for(var m=0;m<i.length;m++){var g=r.getMatchOffsets(i[m],u);for(var c=0;c<g.length;c++){var y=g[c];o.push(new s(m,y.offset,m,y.offset+y.length))}}if(n){var b=n.start.column,w=n.start.column,m=0,c=o.length-1;while(m<c&&o[m].start.column<b&&o[m].start.row==n.start.row)m++;while(m<c&&o[c].end.column>w&&o[c].end.row==n.end.row)c--;return o.slice(m,c+1)}return o},this.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(!r)return;var i=r.exec(e);if(!i||i[0].length!=e.length)return null;t=e.replace(r,t);if(n.preserveCase){t=t.split(\"\");for(var s=Math.min(e.length,e.length);s--;){var o=e[s];o&&o.toLowerCase()!=o?t[s]=t[s].toUpperCase():t[s]=t[s].toLowerCase()}t=t.join(\"\")}return t},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=this,o,u=t.backwards;if(t.$isMultiLine)var a=n.length,f=function(t,r,i){var u=t.search(n[0]);if(u==-1)return;for(var f=1;f<a;f++){t=e.getLine(r+f);if(t.search(n[f])==-1)return}var l=t.match(n[a-1])[0].length,c=new s(r,u,r+a-1,l);n.offset==1?(c.start.row--,c.start.column=Number.MAX_VALUE):i&&(c.start.column+=i);if(o(c))return!0};else if(u)var f=function(e,t,i){var s=r.getMatchOffsets(e,n);for(var u=s.length-1;u>=0;u--)if(o(s[u],t,i))return!0};else var f=function(e,t,i){var s=r.getMatchOffsets(e,n);for(var u=0;u<s.length;u++)if(o(s[u],t,i))return!0};return{forEach:function(n){o=n,i.$lineIterator(e,t).forEach(f)}}},this.$assembleRegExp=function(e){if(e.needle instanceof RegExp)return e.re=e.needle;var t=e.needle;if(!e.needle)return e.re=!1;e.regExp||(t=r.escapeRegExp(t)),e.wholeWord&&(t=\"\\\\b\"+t+\"\\\\b\");var n=e.caseSensitive?\"g\":\"gi\";e.$isMultiLine=/[\\n\\r]/.test(t);if(e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(t,n);try{var i=new RegExp(t,n)}catch(s){i=!1}return e.re=i},this.$assembleMultilineRegExp=function(e,t){var n=e.replace(/\\r\\n|\\r|\\n/g,\"$\\n^\").split(\"\\n\"),r=[];for(var i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch(s){return!1}return n[0]==\"\"?(r.shift(),r.offset=1):r.offset=0,r},this.$lineIterator=function(e,t){var n=t.backwards==1,r=t.skipCurrent!=0,i=t.range,s=t.start;s||(s=i?i[n?\"end\":\"start\"]:e.selection.getRange()),s.start&&(s=s[r!=n?\"end\":\"start\"]);var o=i?i.start.row:0,u=i?i.end.row:e.getLength()-1,a=n?function(n){var r=s.row,i=e.getLine(r).substring(0,s.column);if(n(i,r))return;for(r--;r>=o;r--)if(n(e.getLine(r),r))return;if(t.wrap==0)return;for(r=u,o=s.row;r>=o;r--)if(n(e.getLine(r),r))return}:function(n){var r=s.row,i=e.getLine(r).substr(s.column);if(n(i,r,s.column))return;for(r+=1;r<=u;r++)if(n(e.getLine(r),r))return;if(t.wrap==0)return;for(r=o,u=s.row;r<=u;r++)if(n(e.getLine(r),r))return};return{forEach:a}}}).call(o.prototype),t.Search=o}),define(\"ace/commands/command_manager\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/keyboard/hash_handler\",\"ace/lib/event_emitter\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"../keyboard/hash_handler\").HashHandler,s=e(\"../lib/event_emitter\").EventEmitter,o=function(e,t){this.platform=e,this.commands=this.byName={},this.commmandKeyBinding={},this.addCommands(t),this.setDefaultHandler(\"exec\",function(e){return e.command.exec(e.editor,e.args||{})})};r.inherits(o,i),function(){r.implement(this,s),this.exec=function(e,t,n){typeof e==\"string\"&&(e=this.commands[e]);if(!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var r=this._emit(\"exec\",{editor:t,command:e,args:n});return r===!1?!1:!0},this.toggleRecording=function(e){if(this.$inReplay)return;return e&&e._emit(\"changeStatus\"),this.recording?(this.macro.pop(),this.removeEventListener(\"exec\",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on(\"exec\",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(this.$inReplay||!this.macro)return;if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t==\"string\"?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}},this.trimMacro=function(e){return e.map(function(e){return typeof e[0]!=\"string\"&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(o.prototype),t.CommandManager=o}),define(\"ace/keyboard/hash_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\"],function(e,t,n){function i(e,t){this.platform=t,this.commands={},this.commmandKeyBinding={},this.addCommands(e)}var r=e(\"../lib/keys\");(function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e){var t=typeof e==\"string\"?e:e.name;e=this.commands[t],delete this.commands[t];var n=this.commmandKeyBinding;for(var r in n)for(var i in n[r])n[r][i]==e&&delete n[r][i]},this.bindKey=function(e,t){if(!e)return;if(typeof t==\"function\"){this.addCommand({exec:t,bindKey:e,name:e});return}var n=this.commmandKeyBinding;e.split(\"|\").forEach(function(e){var r=this.parseKeys(e,t),i=r.hashId;(n[i]||(n[i]={}))[r.key]=t},this)},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(typeof n==\"string\")return this.bindKey(n,t);typeof n==\"function\"&&(n={exec:n}),n.name||(n.name=t),this.addCommand(n)},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){var t=e.bindKey;if(!t)return;var n=typeof t==\"string\"?t:t[this.platform];this.bindKey(n,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\\-\\+]([\\-\\+])?/).filter(function(e){return e}),n=t.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(t.length==1&&t[0]==\"shift\")return{key:n.toUpperCase(),hashId:-1}}var s=0;for(var o=t.length;o--;){var u=r.KEY_MODS[t[o]];if(u==null)throw\"invalid modifier \"+t[o]+\" in \"+e;s|=u}return{key:n,hashId:s}},this.findKeyCommand=function(t,n){var r=this.commmandKeyBinding;return r[t]&&r[t][n]},this.handleKeyboard=function(e,t,n,r){return{command:this.findKeyCommand(t,n)}}}).call(i.prototype),t.HashHandler=i}),define(\"ace/commands/default_commands\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/config\"],function(e,t,n){function s(e,t){return{win:e,mac:t}}var r=e(\"../lib/lang\"),i=e(\"../config\");t.commands=[{name:\"selectall\",bindKey:s(\"Ctrl-A\",\"Command-A\"),exec:function(e){e.selectAll()},readOnly:!0},{name:\"centerselection\",bindKey:s(null,\"Ctrl-L\"),exec:function(e){e.centerSelection()},readOnly:!0},{name:\"gotoline\",bindKey:s(\"Ctrl-L\",\"Command-L\"),exec:function(e){var t=parseInt(prompt(\"Enter line number:\"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:\"fold\",bindKey:s(\"Alt-L|Ctrl-F1\",\"Command-Alt-L|Command-F1\"),exec:function(e){e.session.toggleFold(!1)},readOnly:!0},{name:\"unfold\",bindKey:s(\"Alt-Shift-L|Ctrl-Shift-F1\",\"Command-Alt-Shift-L|Command-Shift-F1\"),exec:function(e){e.session.toggleFold(!0)},readOnly:!0},{name:\"foldall\",bindKey:s(\"Alt-0\",\"Command-Option-0\"),exec:function(e){e.session.foldAll()},readOnly:!0},{name:\"unfoldall\",bindKey:s(\"Alt-Shift-0\",\"Command-Option-Shift-0\"),exec:function(e){e.session.unfold()},readOnly:!0},{name:\"findnext\",bindKey:s(\"Ctrl-K\",\"Command-G\"),exec:function(e){e.findNext()},readOnly:!0},{name:\"findprevious\",bindKey:s(\"Ctrl-Shift-K\",\"Command-Shift-G\"),exec:function(e){e.findPrevious()},readOnly:!0},{name:\"find\",bindKey:s(\"Ctrl-F\",\"Command-F\"),exec:function(e){i.loadModule(\"ace/ext/searchbox\",function(t){t.Search(e)})},readOnly:!0},{name:\"overwrite\",bindKey:\"Insert\",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:\"selecttostart\",bindKey:s(\"Ctrl-Shift-Home\",\"Command-Shift-Up\"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotostart\",bindKey:s(\"Ctrl-Home\",\"Command-Home|Command-Up\"),exec:function(e){e.navigateFileStart()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectup\",bindKey:s(\"Shift-Up\",\"Shift-Up\"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"golineup\",bindKey:s(\"Up\",\"Up|Ctrl-P\"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selecttoend\",bindKey:s(\"Ctrl-Shift-End\",\"Command-Shift-Down\"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotoend\",bindKey:s(\"Ctrl-End\",\"Command-End|Command-Down\"),exec:function(e){e.navigateFileEnd()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectdown\",bindKey:s(\"Shift-Down\",\"Shift-Down\"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"golinedown\",bindKey:s(\"Down\",\"Down|Ctrl-N\"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectwordleft\",bindKey:s(\"Ctrl-Shift-Left\",\"Option-Shift-Left\"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotowordleft\",bindKey:s(\"Ctrl-Left\",\"Option-Left\"),exec:function(e){e.navigateWordLeft()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selecttolinestart\",bindKey:s(\"Alt-Shift-Left\",\"Command-Shift-Left\"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotolinestart\",bindKey:s(\"Alt-Left|Home\",\"Command-Left|Home|Ctrl-A\"),exec:function(e){e.navigateLineStart()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectleft\",bindKey:s(\"Shift-Left\",\"Shift-Left\"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotoleft\",bindKey:s(\"Left\",\"Left|Ctrl-B\"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectwordright\",bindKey:s(\"Ctrl-Shift-Right\",\"Option-Shift-Right\"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotowordright\",bindKey:s(\"Ctrl-Right\",\"Option-Right\"),exec:function(e){e.navigateWordRight()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selecttolineend\",bindKey:s(\"Alt-Shift-Right\",\"Command-Shift-Right\"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotolineend\",bindKey:s(\"Alt-Right|End\",\"Command-Right|End|Ctrl-E\"),exec:function(e){e.navigateLineEnd()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectright\",bindKey:s(\"Shift-Right\",\"Shift-Right\"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotoright\",bindKey:s(\"Right\",\"Right|Ctrl-F\"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectpagedown\",bindKey:\"Shift-PageDown\",exec:function(e){e.selectPageDown()},readOnly:!0},{name:\"pagedown\",bindKey:s(null,\"Option-PageDown\"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:\"gotopagedown\",bindKey:s(\"PageDown\",\"PageDown|Ctrl-V\"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:\"selectpageup\",bindKey:\"Shift-PageUp\",exec:function(e){e.selectPageUp()},readOnly:!0},{name:\"pageup\",bindKey:s(null,\"Option-PageUp\"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:\"gotopageup\",bindKey:\"PageUp\",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:\"scrollup\",bindKey:s(\"Ctrl-Up\",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:\"scrolldown\",bindKey:s(\"Ctrl-Down\",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:\"selectlinestart\",bindKey:\"Shift-Home\",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectlineend\",bindKey:\"Shift-End\",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"togglerecording\",bindKey:s(\"Ctrl-Alt-E\",\"Command-Option-E\"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:\"replaymacro\",bindKey:s(\"Ctrl-Shift-E\",\"Command-Shift-E\"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:\"jumptomatching\",bindKey:s(\"Ctrl-P\",\"Ctrl-Shift-P\"),exec:function(e){e.jumpToMatching()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selecttomatching\",bindKey:s(\"Ctrl-Shift-P\",null),exec:function(e){e.jumpToMatching(!0)},readOnly:!0},{name:\"cut\",exec:function(e){var t=e.getSelectionRange();e._emit(\"cut\",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},multiSelectAction:\"forEach\"},{name:\"removeline\",bindKey:s(\"Ctrl-D\",\"Command-D\"),exec:function(e){e.removeLines()},multiSelectAction:\"forEach\"},{name:\"duplicateSelection\",bindKey:s(\"Ctrl-Shift-D\",\"Command-Shift-D\"),exec:function(e){e.duplicateSelection()},multiSelectAction:\"forEach\"},{name:\"sortlines\",bindKey:s(\"Ctrl-Alt-S\",\"Command-Alt-S\"),exec:function(e){e.sortLines()},multiSelectAction:\"forEach\"},{name:\"togglecomment\",bindKey:s(\"Ctrl-/\",\"Command-/\"),exec:function(e){e.toggleCommentLines()},multiSelectAction:\"forEach\"},{name:\"modifyNumberUp\",bindKey:s(\"Ctrl-Shift-Up\",\"Alt-Shift-Up\"),exec:function(e){e.modifyNumber(1)},multiSelectAction:\"forEach\"},{name:\"modifyNumberDown\",bindKey:s(\"Ctrl-Shift-Down\",\"Alt-Shift-Down\"),exec:function(e){e.modifyNumber(-1)},multiSelectAction:\"forEach\"},{name:\"replace\",bindKey:s(\"Ctrl-H\",\"Command-Option-F\"),exec:function(e){i.loadModule(\"ace/ext/searchbox\",function(t){t.Search(e,!0)})}},{name:\"undo\",bindKey:s(\"Ctrl-Z\",\"Command-Z\"),exec:function(e){e.undo()}},{name:\"redo\",bindKey:s(\"Ctrl-Shift-Z|Ctrl-Y\",\"Command-Shift-Z|Command-Y\"),exec:function(e){e.redo()}},{name:\"copylinesup\",bindKey:s(\"Alt-Shift-Up\",\"Command-Option-Up\"),exec:function(e){e.copyLinesUp()}},{name:\"movelinesup\",bindKey:s(\"Alt-Up\",\"Option-Up\"),exec:function(e){e.moveLinesUp()}},{name:\"copylinesdown\",bindKey:s(\"Alt-Shift-Down\",\"Command-Option-Down\"),exec:function(e){e.copyLinesDown()}},{name:\"movelinesdown\",bindKey:s(\"Alt-Down\",\"Option-Down\"),exec:function(e){e.moveLinesDown()}},{name:\"del\",bindKey:s(\"Delete\",\"Delete|Ctrl-D\"),exec:function(e){e.remove(\"right\")},multiSelectAction:\"forEach\"},{name:\"backspace\",bindKey:s(\"Command-Backspace|Option-Backspace|Shift-Backspace|Backspace\",\"Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H\"),exec:function(e){e.remove(\"left\")},multiSelectAction:\"forEach\"},{name:\"removetolinestart\",bindKey:s(\"Alt-Backspace\",\"Command-Backspace\"),exec:function(e){e.removeToLineStart()},multiSelectAction:\"forEach\"},{name:\"removetolineend\",bindKey:s(\"Alt-Delete\",\"Ctrl-K\"),exec:function(e){e.removeToLineEnd()},multiSelectAction:\"forEach\"},{name:\"removewordleft\",bindKey:s(\"Ctrl-Backspace\",\"Alt-Backspace|Ctrl-Alt-Backspace\"),exec:function(e){e.removeWordLeft()},multiSelectAction:\"forEach\"},{name:\"removewordright\",bindKey:s(\"Ctrl-Delete\",\"Alt-Delete\"),exec:function(e){e.removeWordRight()},multiSelectAction:\"forEach\"},{name:\"outdent\",bindKey:s(\"Shift-Tab\",\"Shift-Tab\"),exec:function(e){e.blockOutdent()},multiSelectAction:\"forEach\"},{name:\"indent\",bindKey:s(\"Tab\",\"Tab\"),exec:function(e){e.indent()},multiSelectAction:\"forEach\"},{name:\"blockoutdent\",bindKey:s(\"Ctrl-[\",\"Ctrl-[\"),exec:function(e){e.blockOutdent()},multiSelectAction:\"forEach\"},{name:\"blockindent\",bindKey:s(\"Ctrl-]\",\"Ctrl-]\"),exec:function(e){e.blockIndent()},multiSelectAction:\"forEach\"},{name:\"insertstring\",exec:function(e,t){e.insert(t)},multiSelectAction:\"forEach\"},{name:\"inserttext\",exec:function(e,t){e.insert(r.stringRepeat(t.text||\"\",t.times||1))},multiSelectAction:\"forEach\"},{name:\"splitline\",bindKey:s(null,\"Ctrl-O\"),exec:function(e){e.splitLine()},multiSelectAction:\"forEach\"},{name:\"transposeletters\",bindKey:s(\"Ctrl-T\",\"Ctrl-T\"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)}},{name:\"touppercase\",bindKey:s(\"Ctrl-U\",\"Ctrl-U\"),exec:function(e){e.toUpperCase()},multiSelectAction:\"forEach\"},{name:\"tolowercase\",bindKey:s(\"Ctrl-Shift-U\",\"Ctrl-Shift-U\"),exec:function(e){e.toLowerCase()},multiSelectAction:\"forEach\"}]}),define(\"ace/undomanager\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r=function(){this.reset()};(function(){this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],this.$undoStack.push(t),this.$redoStack=[]},this.undo=function(e){var t=this.$undoStack.pop(),n=null;return t&&(n=this.$doc.undoChanges(t,e),this.$redoStack.push(t)),n},this.redo=function(e){var t=this.$redoStack.pop(),n=null;return t&&(n=this.$doc.redoChanges(t,e),this.$undoStack.push(t)),n},this.reset=function(){this.$undoStack=[],this.$redoStack=[]},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0}}).call(r.prototype),t.UndoManager=r}),define(\"ace/virtual_renderer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/config\",\"ace/lib/net\",\"ace/layer/gutter\",\"ace/layer/marker\",\"ace/layer/text\",\"ace/layer/cursor\",\"ace/scrollbar\",\"ace/renderloop\",\"ace/lib/event_emitter\"],function(e,t,n){var r=e(\"./lib/oop\"),i=e(\"./lib/dom\"),s=e(\"./lib/event\"),o=e(\"./lib/useragent\"),u=e(\"./config\"),a=e(\"./lib/net\"),f=e(\"./layer/gutter\").Gutter,l=e(\"./layer/marker\").Marker,c=e(\"./layer/text\").Text,h=e(\"./layer/cursor\").Cursor,p=e(\"./scrollbar\").ScrollBar,d=e(\"./renderloop\").RenderLoop,v=e(\"./lib/event_emitter\").EventEmitter,m=\".ace_editor {position: relative;overflow: hidden;font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: text;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTQ4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTU4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBMjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBMzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkgXxbAAAAJbSURBVHjapFNNaBNBFH4zs5vdZLP5sQmNpT82QY209heh1ioWisaDRcSKF0WKJ0GQnrzrxasHsR6EnlrwD0TagxJabaVEpFYxLWlLSS822tr87m66ccfd2GKyVhA6MMybgfe97/vmPUQphd0sZjto9XIn9OOsvlu2nkqRzVU+6vvlzPf8W6bk8dxQ0NPbxAALgCgg2JkaQuhzQau/El0zbmUA7U0Es8v2CiYmKQJHGO1QICCLoqilMhkmurDAyapKgqItezi/USRdJqEYY4D5jCy03ht2yMkkvL91jTTX10qzyyu2hruPRN7jgbH+EOsXcMLgYiThEgAMhABW85oqy1DXdRIdvP1AHJ2acQXvDIrVHcdQNrEKNYSVMSZGMjEzIIAwDXIo+6G/FxcGnzkC3T2oMhLjre49sBB+RRcHLqdafK6sYdE/GGBwU1VpFNj0aN8pJbe+BkZyevUrvLl6Xmm0W9IuTc0DxrDNAJd5oEvI/KRsNC3bQyNjPO9yQ1YHcfj2QvfQc/5TUhJTBc2iM0U7AWDQtc1nJHvD/cfO2s7jaGkiTEfa/Ep8coLu7zmNmh8+dc5lZDuUeFAGUNA/OY6JVaypQ0vjr7XYjUvJM37vt+j1vuTK5DgVfVUoTjVe+y3/LxMxY2GgU+CSLy4cpfsYorRXuXIOi0Vt40h67uZFTdIo6nLaZcwUJWAzwNS0tBnqqKzQDnjdG/iPyZxo46HaKUpbvYkj8qYRTZsBhge+JHhZyh0x9b95JqjVJkT084kZIPwu/mPWqPgfQ5jXh2+92Ay7HedfAgwA6KDWafb4w3cAAAAASUVORK5CYII=\\\");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTg4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTk4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBNjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBNzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pgd7PfIAAAGmSURBVHjaYvr//z8DJZiJgUIANoCRkREb9gLiSVAaQx4OQM7AAkwd7XU2/v++/rOttdYGEB9dASEvOMydGKfH8Gv/p4XTkvRBfLxeQAP+1cUhXopyvzhP7P/IoSj7g7Mw09cNKO6J1QQ0L4gICPIv/veg/8W+JdFvQNLHVsW9/nmn9zk7B+cCkDwhL7gt6knSZnx9/LuCEOcvkIAMP+cvto9nfqyZmmUAksfnBUtbM60gX/3/kgyv3/xSFOL5DZT+L8vP+Yfh5cvfPvp/xUHyQHXGyAYwgpwBjZYFT3Y1OEl/OfCH4ffv3wzc4iwMvNIsDJ+f/mH4+vIPAxsb631WW0Yln6ZpQLXdMK/DXGDflh+sIv37EivD5x//Gb7+YWT4y86sl7BCCkSD+Z++/1dkvsFRl+HnD1Rvje4F8whjMXmGj58YGf5zsDMwcnAwfPvKcml62DsQDeaDxN+/Y0qwlpEHqrdB94IRNIDUgfgfKJChGK4OikEW3gTiXUB950ASLFAF54AC94A0G9QAfOnmF9DCDzABFqS08IHYDIScdijOjQABBgC+/9awBH96jwAAAABJRU5ErkJggg==\\\");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url(\\\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\\\");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGRTk5MTVGREIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRTk5MTVGRUIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZFOTkxNUZCQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFOTkxNUZDQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+SIDkjAAAAJ1JREFUeNpi/P//PwMlgImBQkB7A6qrq/+DMC55FkIGKCoq4pVnpFkgTp069f/+/fv/r1u37r+tre1/kg0A+ptn9uzZYLaRkRHpLvjw4cNXWVlZhufPnzOcO3eOdAO0tbVPAjHDmzdvGA4fPsxIsgGSkpJmv379Ynj37h2DjIyMCMkG3LhxQ/T27dsMampqDHZ2dq/pH41DxwCAAAMAFdc68dUsFZgAAAAASUVORK5CYII=\\\");}.ace_scrollbar {position: absolute;overflow-x: hidden;overflow-y: scroll;right: 0;top: 0;bottom: 0;}.ace_scrollbar-inner {position: absolute;width: 1px;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;}.ace_text-input.ace_composition {background: #f8f8f8;color: #111;z-index: 1000;opacity: 1;border: solid lightgray 1px;margin: -1px;padding: 0 1px;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: nowrap;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;/* setting pointer-events: auto; on node under the mouse, which changesduring scroll, will break mouse wheel scrolling in Safari */pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {color: black;font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-moz-transition: opacity 0.18s;-webkit-transition: opacity 0.18s;-o-transition: opacity 0.18s;-ms-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_cursor[style*=\\\"opacity: 0\\\"]{-ms-filter: \\\"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\\\";}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_line {white-space: nowrap;}.ace_marker-layer .ace_step {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\\\"),url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\\\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;-moz-border-radius: 2px;-webkit-border-radius: 2px;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\\\"),url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\\\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;}.ace_editor.ace_dragging .ace_content {cursor: move;}.ace_gutter-tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;display: inline-block;max-width: 500px;padding: 4px;position: fixed;z-index: 300;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre-line;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: inline-block;width: 11px;vertical-align: top;background-image: url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\\\");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;}.ace_fold-widget.ace_end {background-image: url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\\\");}.ace_fold-widget.ace_closed {background-image: url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\\\");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}/*** Dark version for fold widgets*/.ace_dark .ace_fold-widget {background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\\\");}.ace_dark .ace_fold-widget.ace_end {background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\\\");}.ace_dark .ace_fold-widget.ace_closed {background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\\\");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-moz-transition: opacity 0.4s ease 0.05s;-webkit-transition: opacity 0.4s ease 0.05s;-o-transition: opacity 0.4s ease 0.05s;-ms-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-moz-transition: opacity 0.05s ease 0.05s;-webkit-transition: opacity 0.05s ease 0.05s;-o-transition: opacity 0.05s ease 0.05s;-ms-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}\";i.importCssString(m,\"ace_editor\");var g=function(e,t){var n=this;this.container=e||i.createElement(\"div\"),this.$keepTextAreaAtCursor=!o.isIE,i.addCssClass(this.container,\"ace_editor\"),this.setTheme(t),this.$gutter=i.createElement(\"div\"),this.$gutter.className=\"ace_gutter\",this.container.appendChild(this.$gutter),this.scroller=i.createElement(\"div\"),this.scroller.className=\"ace_scroller\",this.container.appendChild(this.scroller),this.content=i.createElement(\"div\"),this.content.className=\"ace_content\",this.scroller.appendChild(this.content),this.setHighlightGutterLine(!0),this.$gutterLayer=new f(this.$gutter),this.$gutterLayer.on(\"changeGutterWidth\",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var r=this.$textLayer=new c(this.content);this.canvas=r.element,this.$markerFront=new l(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$horizScrollAlwaysVisible=!1,this.$animatedScroll=!1,this.scrollBar=new p(this.container),this.scrollBar.addEventListener(\"scroll\",function(e){n.$inScrollAnimation||n.session.setScrollTop(e.data)}),this.scrollTop=0,this.scrollLeft=0,s.addListener(this.scroller,\"scroll\",function(){var e=n.scroller.scrollLeft;n.scrollLeft=e,n.session.setScrollLeft(e)}),this.cursorPos={row:0,column:0},this.$textLayer.addEventListener(\"changeCharacterSize\",function(){n.updateCharacterSize(),n.onResize(!0)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:1,characterWidth:1,minHeight:1,maxHeight:1,offset:0,height:1},this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4)};(function(){this.showGutter=!0,this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,v),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle(\"ace_nobold\",!this.$allowBoldFonts)),this.characterWidth=this.$textLayer.getCharacterWidth(),this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session=e,this.scroller.className=\"ace_scroller\",this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(e,t){t===undefined&&(t=Infinity),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t};if(this.$changedLines.firstRow>this.layerConfig.lastRow||this.$changedLines.lastRow<this.layerConfig.firstRow)return;this.$loop.schedule(this.CHANGE_LINES)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.onResize=function(e,t,n,r){var s=this.CHANGE_SIZE,o=this.$size;if(this.resizing>2)return;this.resizing>1?this.resizing++:this.resizing=e?1:0,r||(r=i.getInnerHeight(this.container)),r&&(e||o.height!=r)&&(o.height=r,o.scrollerHeight=this.scroller.clientHeight,this.scrollBar.setHeight(o.scrollerHeight),this.session&&(this.session.setScrollTop(this.getScrollTop()),s|=this.CHANGE_FULL)),n||(n=i.getInnerWidth(this.container));if(n&&(e||this.resizing>1||o.width!=n)){o.width=n;var t=this.showGutter?this.$gutter.offsetWidth:0;this.scroller.style.left=t+\"px\",o.scrollerWidth=Math.max(0,n-t-this.scrollBar.getWidth()),this.scroller.style.right=this.scrollBar.getWidth()+\"px\";if(this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)s|=this.CHANGE_FULL}e?this.$renderChanges(s,!0):this.$loop.schedule(s),e&&delete this.resizing},this.onGutterResize=function(){var e=this.$size.width,t=this.showGutter?this.$gutter.offsetWidth:0;this.scroller.style.left=t+\"px\",this.$size.scrollerWidth=Math.max(0,e-t-this.scrollBar.getWidth()),this.session.getUseWrapMode()&&this.adjustWrapLimit()&&this.$loop.schedule(this.CHANGE_FULL)},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-this.$padding*2,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t)},this.setAnimatedScroll=function(e){this.$animatedScroll=e},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},this.getShowInvisibles=function(){return this.$textLayer.showInvisibles},this.getDisplayIndentGuides=function(){return this.$textLayer.displayIndentGuides},this.setDisplayIndentGuides=function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},this.$showPrintMargin=!0,this.setShowPrintMargin=function(e){this.$showPrintMargin=e,this.$updatePrintMargin()},this.getShowPrintMargin=function(){return this.$showPrintMargin},this.$printMarginColumn=80,this.setPrintMarginColumn=function(e){this.$printMarginColumn=e,this.$updatePrintMargin()},this.getPrintMarginColumn=function(){return this.$printMarginColumn},this.getShowGutter=function(){return this.showGutter},this.setShowGutter=function(e){if(this.showGutter===e)return;this.$gutter.style.display=e?\"block\":\"none\",this.showGutter=e,this.onResize(!0)},this.getFadeFoldWidgets=function(){return i.hasCssClass(this.$gutter,\"ace_fade-fold-widgets\")},this.setFadeFoldWidgets=function(e){e?i.addCssClass(this.$gutter,\"ace_fade-fold-widgets\"):i.removeCssClass(this.$gutter,\"ace_fade-fold-widgets\")},this.$highlightGutterLine=!1,this.setHighlightGutterLine=function(e){if(this.$highlightGutterLine==e)return;this.$highlightGutterLine=e;if(!this.$gutterLineHighlight){this.$gutterLineHighlight=i.createElement(\"div\"),this.$gutterLineHighlight.className=\"ace_gutter-active-line\",this.$gutter.appendChild(this.$gutterLineHighlight);return}this.$gutterLineHighlight.style.display=e?\"\":\"none\",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},this.getHighlightGutterLine=function(){return this.$highlightGutterLine},this.$updateGutterLineHighlight=function(){this.$gutterLineHighlight.style.top=this.$cursorLayer.$pixelPos.top-this.layerConfig.offset+\"px\",this.$gutterLineHighlight.style.height=this.layerConfig.lineHeight+\"px\"},this.$updatePrintMargin=function(){if(!this.$showPrintMargin&&!this.$printMarginEl)return;if(!this.$printMarginEl){var e=i.createElement(\"div\");e.className=\"ace_layer ace_print-margin-layer\",this.$printMarginEl=i.createElement(\"div\"),this.$printMarginEl.className=\"ace_print-margin\",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+\"px\",t.visibility=this.$showPrintMargin?\"visible\":\"hidden\"},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$keepTextAreaAtCursor)return;var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;if(t<0||t>e.height-this.lineHeight)return;var r=this.characterWidth;if(this.$composition){var i=this.textarea.value.replace(/^\\x01+/,\"\");r*=this.session.$getStringScreenWidth(i)[0]}n-=this.scrollLeft,n>this.$size.scrollerWidth-r&&(n=this.$size.scrollerWidth-r),n-=this.scrollBar.width,this.textarea.style.height=this.lineHeight+\"px\",this.textarea.style.width=r+\"px\",this.textarea.style.right=this.$size.scrollerWidth-n-r+\"px\",this.textarea.style.bottom=this.$size.height-t-this.lineHeight+\"px\"},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.getHScrollBarAlwaysVisible=function(){return this.$horizScrollAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.$horizScrollAlwaysVisible!=e&&(this.$horizScrollAlwaysVisible=e,(!this.$horizScrollAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL))},this.$updateScrollBar=function(){this.scrollBar.setInnerHeight(this.layerConfig.maxHeight),this.scrollBar.setScrollTop(this.scrollTop)},this.$renderChanges=function(e,t){if(!t&&(!e||!this.session||!this.container.offsetWidth))return;(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL)&&this.$computeLayerConfig();if(e&this.CHANGE_H_SCROLL){this.scroller.scrollLeft=this.scrollLeft;var n=this.scroller.scrollLeft;this.scrollLeft=n,this.session.setScrollLeft(n),this.scroller.className=this.scrollLeft==0?\"ace_scroller\":\"ace_scroller ace_scroll-left\"}if(e&this.CHANGE_FULL){this.$textLayer.checkForSizeChanges(),this.$updateScrollBar(),this.$textLayer.update(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight();return}if(e&this.CHANGE_SCROLL){this.$updateScrollBar(),e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(this.layerConfig):this.$textLayer.scrollLines(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight();return}e&this.CHANGE_TEXT?(this.$textLayer.update(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.showGutter)&&this.$gutterLayer.update(this.layerConfig):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.showGutter&&this.$gutterLayer.update(this.layerConfig),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(this.layerConfig),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(this.layerConfig),e&this.CHANGE_SIZE&&this.$updateScrollBar()},this.$computeLayerConfig=function(){var e=this.session,t=this.scrollTop%this.lineHeight,n=this.$size.scrollerHeight+this.lineHeight,r=this.$getLongestLine(),i=this.$horizScrollAlwaysVisible||this.$size.scrollerWidth-r<0,s=this.$horizScroll!==i;this.$horizScroll=i,s&&(this.scroller.style.overflowX=i?\"scroll\":\"hidden\",i||this.session.setScrollLeft(0));var o=this.session.getScreenLength()*this.lineHeight;this.session.setScrollTop(Math.max(0,Math.min(this.scrollTop,o-this.$size.scrollerHeight)));var u=Math.ceil(n/this.lineHeight)-1,a=Math.max(0,Math.round((this.scrollTop-t)/this.lineHeight)),f=a+u,l,c,h=this.lineHeight;a=e.screenToDocumentRow(a,0);var p=e.getFoldLine(a);p&&(a=p.start.row),l=e.documentToScreenRow(a,0),c=e.getRowLength(a)*h,f=Math.min(e.screenToDocumentRow(f,0),e.getLength()-1),n=this.$size.scrollerHeight+e.getRowLength(f)*h+c,t=this.scrollTop-l*h,this.layerConfig={width:r,padding:this.$padding,firstRow:a,firstRowScreen:l,lastRow:f,lineHeight:h,characterWidth:this.characterWidth,minHeight:n,maxHeight:o,offset:t,height:this.$size.scrollerHeight},this.$gutterLayer.element.style.marginTop=-t+\"px\",this.content.style.marginTop=-t+\"px\",this.content.style.width=r+2*this.$padding+\"px\",this.content.style.height=n+\"px\",s&&this.onResize(!0)},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(e>n.lastRow+1)return;if(t<n.firstRow)return;if(t===Infinity){this.showGutter&&this.$gutterLayer.update(n),this.$textLayer.update(n);return}return this.$textLayer.updateLines(n,e,t),!0},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.$textLayer.showInvisibles&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t){if(this.$size.scrollerHeight===0)return;var n=this.$cursorLayer.getPixelPosition(e),r=n.left,i=n.top;this.scrollTop>i?(t&&(i-=t*this.$size.scrollerHeight),this.session.setScrollTop(i)):this.scrollTop+this.$size.scrollerHeight<i+this.lineHeight&&(t&&(i+=t*this.$size.scrollerHeight),this.session.setScrollTop(i+this.lineHeight-this.$size.scrollerHeight));var s=this.scrollLeft;s>r?(r<this.$padding+2*this.layerConfig.characterWidth&&(r=0),this.session.setScrollLeft(r)):s+this.$size.scrollerWidth<r+this.characterWidth&&this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth))},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){typeof e==\"number\"&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},this.STEPS=8,this.$calcSteps=function(e,t){var n=0,r=this.STEPS,i=[],s=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<r;++n)i.push(s(n/this.STEPS,e,t-e));return i},this.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}),s=i.top;t&&(s-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(s),n!==!1&&this.animateScrolling(o,r)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll&&Math.abs(e-n)<1e5){var r=this,i=r.$calcSteps(e,n);this.$inScrollAnimation=!0,clearInterval(this.$timer),r.session.setScrollTop(i.shift()),this.$timer=setInterval(function(){i.length?(r.session.setScrollTop(i.shift()),r.session.$scrollTop=n):n!=null?(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null):(r.$timer=clearInterval(r.$timer),r.$inScrollAnimation=!1,t&&t())},10)}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){e<0&&(e=0),this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){if(t<0&&this.session.getScrollTop()>0)return!0;if(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight<this.layerConfig.maxHeight)return!0},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=(e+this.scrollLeft-n.left-this.$padding)/this.characterWidth,i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=Math.round(r);return{row:i,column:s,side:r-s>0?1:-1}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=Math.round((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(i,Math.max(r,0))},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+Math.round(r.column*this.characterWidth),s=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+s-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,\"ace_focus\")},this.visualizeBlur=function(){i.removeCssClass(this.container,\"ace_focus\")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,i.addCssClass(this.textarea,\"ace_composition\"),this.textarea.style.cssText=\"\",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){if(!this.$composition)return;i.removeCssClass(this.textarea,\"ace_composition\"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null},this._loadTheme=function(e,t){},this.setTheme=function(e){function r(e){i.importCssString(e.cssText,e.cssClass,t.container.ownerDocument),t.theme&&i.removeCssClass(t.container,t.theme.cssClass),t.$theme=e.cssClass,t.theme=e,i.addCssClass(t.container,e.cssClass),i.setCssClass(t.container,\"ace_dark\",e.isDark);var n=e.padding||4;t.$padding&&n!=t.$padding&&t.setPadding(n),t.$size&&(t.$size.width=0,t.onResize()),t._dispatchEvent(\"themeLoaded\",{theme:e})}var t=this;this.$themeValue=e,t._dispatchEvent(\"themeChange\",{theme:e});if(!e||typeof e==\"string\"){var n=e||\"ace/theme/textmate\";u.loadModule([\"theme\",n],r)}else r(e)},this.getTheme=function(){return this.$themeValue},this.setStyle=function(t,n){i.setCssClass(this.container,t,n!=0)},this.unsetStyle=function(t){i.removeCssClass(this.container,t)},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(g.prototype),t.VirtualRenderer=g}),define(\"ace/layer/gutter\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\"],function(e,t,n){var r=e(\"../lib/dom\"),i=e(\"../lib/oop\"),s=e(\"../lib/lang\"),o=e(\"../lib/event_emitter\").EventEmitter,u=function(e){this.element=r.createElement(\"div\"),this.element.className=\"ace_layer ace_gutter-layer\",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this)};(function(){i.implement(this,o),this.setSession=function(e){this.session&&this.session.removeEventListener(\"change\",this.$updateAnnotations),this.session=e,e.on(\"change\",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn(\"deprecated use session.addGutterDecoration\"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn(\"deprecated use session.removeGutterDecoration\"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];var t,n;for(var r=0;r<e.length;r++){var i=e[r],n=i.row,t=this.$annotations[n];t||(t=this.$annotations[n]={text:[]});var o=i.text;o=o?s.escapeHTML(o):i.html||\"\",t.text.indexOf(o)===-1&&t.text.push(o);var u=i.type;u==\"error\"?t.className=\" ace_error\":u==\"warning\"&&t.className!=\" ace_error\"?t.className=\" ace_warning\":u==\"info\"&&!t.className&&(t.className=\" ace_info\")}},this.$updateAnnotations=function(e){if(!this.$annotations.length)return;var t=e.data,n=t.range,r=n.start.row,i=n.end.row-r;if(i!==0)if(t.action==\"removeText\"||t.action==\"removeLines\")this.$annotations.splice(r,i+1,null);else{var s=Array(i+1);s.unshift(r,1),this.$annotations.splice.apply(this.$annotations,s)}},this.update=function(e){var t={className:\"\"},n=[],i=e.firstRow,s=e.lastRow,o=this.session.getNextFoldLine(i),u=o?o.start.row:Infinity,a=this.$showFoldWidgets&&this.session.foldWidgets,f=this.session.$breakpoints,l=this.session.$decorations,c=0;for(;;){i>u&&(i=o.end.row+1,o=this.session.getNextFoldLine(i,o),u=o?o.start.row:Infinity);if(i>s)break;var h=this.$annotations[i]||t;n.push(\"<div class='ace_gutter-cell \",f[i]||\"\",l[i]||\"\",h.className,\"' style='height:\",this.session.getRowLength(i)*e.lineHeight,\"px;'>\",c=i+1);if(a){var p=a[i];p==null&&(p=a[i]=this.session.getFoldWidget(i)),p&&n.push(\"<span class='ace_fold-widget ace_\",p,p==\"start\"&&i==u&&i<o.end.row?\" ace_closed\":\" ace_open\",\"' style='height:\",e.lineHeight,\"px\",\"'></span>\")}n.push(\"</div>\"),i++}this.element=r.setInnerHtml(this.element,n.join(\"\")),this.element.style.height=e.minHeight+\"px\",this.session.$useWrapMode&&(c=this.session.getLength());var d=(\"\"+c).length*e.characterWidth,v=this.$padding||this.$computePadding();d+=v.left+v.right,d!==this.gutterWidth&&(this.gutterWidth=d,this.element.style.width=Math.ceil(this.gutterWidth)+\"px\",this._emit(\"changeGutterWidth\",d))},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,\"ace_folding-enabled\"):r.removeCssClass(this.element,\"ace_folding-enabled\"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1,this.$padding.right=parseInt(e.paddingRight),this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();if(e.x<t.left+n.left)return\"markers\";if(this.$showFoldWidgets&&e.x>n.right-t.right)return\"foldWidgets\"}}).call(u.prototype),t.Gutter=u}),define(\"ace/layer/marker\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/dom\"],function(e,t,n){var r=e(\"../range\").Range,i=e(\"../lib/dom\"),s=function(e){this.element=i.createElement(\"div\"),this.element.className=\"ace_layer ace_marker-layer\",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(!e)return;this.config=e;var t=[];for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(t,this,this.session,e);continue}var s=r.range.clipRows(e.firstRow,e.lastRow);if(s.isEmpty())continue;s=s.toScreenRange(this.session);if(r.renderer){var o=this.$getTop(s.start.row,e),u=this.$padding+s.start.column*e.characterWidth;r.renderer(t,s,u,o,e)}else r.type==\"fullLine\"?this.drawFullLineMarker(t,s,r.clazz,e):s.isMultiLine()?r.type==\"text\"?this.drawTextMarker(t,s,r.clazz,e):this.drawMultiLineMarker(t,s,r.clazz,e):this.drawSingleLineMarker(t,s,r.clazz+\" ace_start\",e)}this.element=i.setInnerHtml(this.element,t.join(\"\"))},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,n,i){var s=t.start.row,o=new r(s,t.start.column,s,this.session.getScreenLastRowColumn(s));this.drawSingleLineMarker(e,o,n+\" ace_start\",i,1,\"text\"),s=t.end.row,o=new r(s,0,s,t.end.column),this.drawSingleLineMarker(e,o,n,i,0,\"text\");for(s=t.start.row+1;s<t.end.row;s++)o.start.row=s,o.end.row=s,o.end.column=this.session.getScreenLastRowColumn(s),this.drawSingleLineMarker(e,o,n,i,1,\"text\")},this.drawMultiLineMarker=function(e,t,n,r,i){var s=this.$padding,o=r.lineHeight,u=this.$getTop(t.start.row,r),a=s+t.start.column*r.characterWidth;e.push(\"<div class='\",n,\" ace_start' style='\",\"height:\",o,\"px;\",\"right:0;\",\"top:\",u,\"px;\",\"left:\",a,\"px;'></div>\"),u=this.$getTop(t.end.row,r);var f=t.end.column*r.characterWidth;e.push(\"<div class='\",n,\"' style='\",\"height:\",o,\"px;\",\"width:\",f,\"px;\",\"top:\",u,\"px;\",\"left:\",s,\"px;'></div>\"),o=(t.end.row-t.start.row-1)*r.lineHeight;if(o<0)return;u=this.$getTop(t.start.row+1,r),e.push(\"<div class='\",n,\"' style='\",\"height:\",o,\"px;\",\"right:0;\",\"top:\",u,\"px;\",\"left:\",s,\"px;'></div>\")},this.drawSingleLineMarker=function(e,t,n,r,i){var s=r.lineHeight,o=(t.end.column+(i||0)-t.start.column)*r.characterWidth,u=this.$getTop(t.start.row,r),a=this.$padding+t.start.column*r.characterWidth;e.push(\"<div class='\",n,\"' style='\",\"height:\",s,\"px;\",\"width:\",o,\"px;\",\"top:\",u,\"px;\",\"left:\",a,\"px;'></div>\")},this.drawFullLineMarker=function(e,t,n,r){var i=this.$getTop(t.start.row,r),s=r.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,r)-i),e.push(\"<div class='\",n,\"' style='\",\"height:\",s,\"px;\",\"top:\",i,\"px;\",\"left:0;right:0;'></div>\")}}).call(s.prototype),t.Marker=s}),define(\"ace/layer/text\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/useragent\",\"ace/lib/event_emitter\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"../lib/dom\"),s=e(\"../lib/lang\"),o=e(\"../lib/useragent\"),u=e(\"../lib/event_emitter\").EventEmitter,a=function(e){this.element=i.createElement(\"div\"),this.element.className=\"ace_layer ace_text-layer\",e.appendChild(this.element),this.$characterSize={width:0,height:0},this.checkForSizeChanges(),this.$pollSizeChanges()};(function(){r.implement(this,u),this.EOF_CHAR=\"¶\",this.EOL_CHAR=\"¬\",this.TAB_CHAR=\"→\",this.SPACE_CHAR=\"·\",this.$padding=0,this.setPadding=function(e){this.$padding=e,this.element.style.padding=\"0 \"+e+\"px\"},this.getLineHeight=function(){return this.$characterSize.height||1},this.getCharacterWidth=function(){return this.$characterSize.width||1},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight=\"bold\";var t=this.$measureSizes();this.$measureNode.style.fontWeight=\"\",this.$characterSize=e,this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit(\"changeCharacterSize\",{data:e})}},this.$pollSizeChanges=function(){var e=this;this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=o.isIE||o.isOldGecko?function(){var e=1e3;if(!this.$measureNode){var t=this.$measureNode=i.createElement(\"div\"),n=t.style;n.width=n.height=\"auto\",n.left=n.top=-e*40+\"px\",n.visibility=\"hidden\",n.position=\"fixed\",n.overflow=\"visible\",n.whiteSpace=\"nowrap\",t.innerHTML=s.stringRepeat(\"Xy\",e);if(this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(t);else{var r=this.element.parentNode;while(!i.hasCssClass(r,\"ace_editor\"))r=r.parentNode;r.appendChild(t)}}if(!this.element.offsetWidth)return null;var n=this.$measureNode.style,o=i.computedStyle(this.element);for(var u in this.$fontStyles)n[u]=o[u];var a={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(e*2)};return a.width==0||a.height==0?null:a}:function(){if(!this.$measureNode){var e=this.$measureNode=i.createElement(\"div\"),t=e.style;t.width=t.height=\"auto\",t.left=t.top=\"-100px\",t.visibility=\"hidden\",t.position=\"fixed\",t.overflow=\"visible\",t.whiteSpace=\"nowrap\",e.innerHTML=\"X\";var n=this.element.parentNode;while(n&&!i.hasCssClass(n,\"ace_editor\"))n=n.parentNode;if(!n)return this.$measureNode=null;n.appendChild(e)}var r=this.$measureNode.getBoundingClientRect(),s={height:r.height,width:r.width};return s.width==0||s.height==0?null:s},this.setSession=function(e){this.session=e,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;var t=this.$tabStrings=[0];for(var n=1;n<e+1;n++)this.showInvisibles?t.push(\"<span class='ace_invisible'>\"+this.TAB_CHAR+s.stringRepeat(\" \",n-1)+\"</span>\"):t.push(s.stringRepeat(\" \",n));if(this.displayIndentGuides){this.$indentGuideRe=/\\s\\S| \\t|\\t |\\s$/;var r=\"ace_indent-guide\";if(this.showInvisibles){r+=\" ace_invisible\";var i=s.stringRepeat(this.SPACE_CHAR,this.tabSize),o=this.TAB_CHAR+s.stringRepeat(\" \",this.tabSize-1)}else var i=s.stringRepeat(\" \",this.tabSize),o=i;this.$tabStrings[\" \"]=\"<span class='\"+r+\"'>\"+i+\"</span>\",this.$tabStrings[\"\t\"]=\"<span class='\"+r+\"'>\"+o+\"</span>\"}},this.updateLines=function(e,t,n){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;var r=Math.max(t,e.firstRow),s=Math.min(n,e.lastRow),o=this.element.childNodes,u=0;for(var a=e.firstRow;a<r;a++){var f=this.session.getFoldLine(a);if(f){if(f.containsRow(r)){r=f.start.row;break}a=f.end.row}u++}var a=r,f=this.session.getNextFoldLine(a),l=f?f.start.row:Infinity;for(;;){a>l&&(a=f.end.row+1,f=this.session.getNextFoldLine(a,f),l=f?f.start.row:Infinity);if(a>s)break;var c=o[u++];if(c){var h=[];this.$renderLine(h,a,!this.$useLineGroups(),a==l?f:!1),i.setInnerHtml(c,h.join(\"\"))}a++}},this.scrollLines=function(e){var t=this.config;this.config=e;if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var n=this.element;if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);r>0;r--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(var r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)n.removeChild(n.lastChild);if(e.firstRow<t.firstRow){var i=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}if(e.lastRow>t.lastRow){var i=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(i)}},this.$renderLinesFragment=function(e,t,n){var r=this.element.ownerDocument.createDocumentFragment(),s=t,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>n)break;var a=i.createElement(\"div\"),f=[];this.$renderLine(f,s,!1,s==u?o:!1),a.innerHTML=f.join(\"\");if(this.$useLineGroups())a.className=\"ace_line_group\",r.appendChild(a);else{var l=a.childNodes;while(l.length)r.appendChild(l[0])}s++}return r},this.update=function(e){this.config=e;var t=[],n=e.firstRow,r=e.lastRow,s=n,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>r)break;this.$useLineGroups()&&t.push(\"<div class='ace_line_group'>\"),this.$renderLine(t,s,!1,s==u?o:!1),this.$useLineGroups()&&t.push(\"</div>\"),s++}this.element=i.setInnerHtml(this.element,t.join(\"\"))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){var i=this,o=/\\t|&|<|( +)|([\\x00-\\x1f\\x80-\\xa0\\u1680\\u180E\\u2000-\\u200f\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF])|[\\u1100-\\u115F\\u11A3-\\u11A7\\u11FA-\\u11FF\\u2329-\\u232A\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3000-\\u303E\\u3041-\\u3096\\u3099-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u3190-\\u31BA\\u31C0-\\u31E3\\u31F0-\\u321E\\u3220-\\u3247\\u3250-\\u32FE\\u3300-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uA960-\\uA97C\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFAFF\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE66\\uFE68-\\uFE6B\\uFF01-\\uFF60\\uFFE0-\\uFFE6]/g,u=function(e,n,r,o,u){if(n)return i.showInvisibles?\"<span class='ace_invisible'>\"+s.stringRepeat(i.SPACE_CHAR,e.length)+\"</span>\":s.stringRepeat(\" \",e.length);if(e==\"&\")return\"&#38;\";if(e==\"<\")return\"&#60;\";if(e==\"\t\"){var a=i.session.getScreenTabSize(t+o);return t+=a-1,i.$tabStrings[a]}if(e==\"　\"){var f=i.showInvisibles?\"ace_cjk ace_invisible\":\"ace_cjk\",l=i.showInvisibles?i.SPACE_CHAR:\"\";return t+=1,\"<span class='\"+f+\"' style='width:\"+i.config.characterWidth*2+\"px'>\"+l+\"</span>\"}return r?\"<span class='ace_invisible ace_invalid'>\"+i.SPACE_CHAR+\"</span>\":(t+=1,\"<span class='ace_cjk' style='width:\"+i.config.characterWidth*2+\"px'>\"+e+\"</span>\")},a=r.replace(o,u);if(!this.$textToken[n.type]){var f=\"ace_\"+n.type.replace(/\\./g,\" ace_\"),l=\"\";n.type==\"fold\"&&(l=\" style='width:\"+n.value.length*this.config.characterWidth+\"px;' \"),e.push(\"<span class='\",f,\"'\",l,\">\",a,\"</span>\")}else e.push(a);return t+r.length},this.renderIndentGuide=function(e,t){var n=t.search(this.$indentGuideRe);return n<=0?t:t[0]==\" \"?(n-=n%this.tabSize,e.push(s.stringRepeat(this.$tabStrings[\" \"],n/this.tabSize)),t.substr(n)):t[0]==\"\t\"?(e.push(s.stringRepeat(this.$tabStrings[\"\t\"],n)),t.substr(n)):t},this.$renderWrappedLine=function(e,t,n,r){var i=0,s=0,o=n[0],u=0;for(var a=0;a<t.length;a++){var f=t[a],l=f.value;if(a==0&&this.displayIndentGuides){i=l.length,l=this.renderIndentGuide(e,l);if(!l)continue;i-=l.length}if(i+l.length<o)u=this.$renderToken(e,u,f,l),i+=l.length;else{while(i+l.length>=o)u=this.$renderToken(e,u,f,l.substring(0,o-i)),l=l.substring(o-i),i=o,r||e.push(\"</div>\",\"<div class='ace_line' style='height:\",this.config.lineHeight,\"px'>\"),s++,u=0,o=n[s]||Number.MAX_VALUE;l.length!=0&&(i+=l.length,u=this.$renderToken(e,u,f,l))}}},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var s=1;s<t.length;s++)r=t[s],i=r.value,n=this.$renderToken(e,n,r,i)},this.$renderLine=function(e,t,n,r){!r&&r!=0&&(r=this.session.getFoldLine(t));if(r)var i=this.$getFoldLineTokens(t,r);else var i=this.session.getTokens(t);n||e.push(\"<div class='ace_line' style='height:\",this.config.lineHeight,\"px'>\");if(i.length){var s=this.session.getRowSplitData(t);s&&s.length?this.$renderWrappedLine(e,i,s,n):this.$renderSimpleLine(e,i)}this.showInvisibles&&(r&&(t=r.end.row),e.push(\"<span class='ace_invisible'>\",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,\"</span>\")),n||e.push(\"</div>\")},this.$getFoldLineTokens=function(e,t){function i(e,t,n){var i=0,s=0;while(s+e[i].value.length<t){s+=e[i].value.length,i++;if(i==e.length)return}if(s!=t){var o=e[i].value.substring(t-s);o.length>n-t&&(o=o.substring(0,n-t)),r.push({type:e[i].type,value:o}),s=t+o.length,i+=1}while(s<n&&i<e.length){var o=e[i].value;o.length+s>n?r.push({type:e[i].type,value:o.substring(0,n-s)}):r.push(e[i]),s+=o.length,i+=1}}var n=this.session,r=[],s=n.getTokens(e);return t.walk(function(e,t,o,u,a){e!=null?r.push({type:\"fold\",value:e}):(a&&(s=n.getTokens(t)),s.length&&i(s,u,o))},t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),define(\"ace/layer/cursor\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"],function(e,t,n){var r=e(\"../lib/dom\"),i=function(e){this.element=r.createElement(\"div\"),this.element.className=\"ace_layer ace_cursor-layer\",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,\"ace_hidden-cursors\")};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,e?r.addCssClass(this.element,\"ace_smooth-blinking\"):r.removeCssClass(this.element,\"ace_smooth-blinking\"),this.restartTimer())},this.addCursor=function(){var e=r.createElement(\"div\");return e.className=\"ace_cursor\",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,\"ace_hidden-cursors\"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,\"ace_hidden-cursors\"),this.restartTimer()},this.restartTimer=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,\"ace_smooth-blinking\");for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity=\"\";if(!this.isBlinking||!this.blinkInterval||!this.isVisible)return;this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,\"ace_smooth-blinking\")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity=0}.bind(this),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity=\"\";t()}.bind(this),this.blinkInterval),t()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),r=this.$padding+n.column*this.config.characterWidth,i=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:i}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;if(t===undefined||t.length===0)t=[{cursor:null}];for(var n=t.length;n--;){var i=this.getPixelPosition(t[n].cursor,!0);if((i.top>e.height+e.offset||i.top<-e.offset)&&n>1)continue;var s=(this.cursors[r++]||this.addCursor()).style;s.left=i.left+\"px\",s.top=i.top+\"px\",s.width=e.characterWidth+\"px\",s.height=e.lineHeight+\"px\"}while(this.cursors.length>r)this.removeCursor();var o=this.session.getOverwrite();this.$setOverwrite(o),this.$pixelPos=i,this.restartTimer()},this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,\"ace_overwrite-cursors\"):r.removeCssClass(this.element,\"ace_overwrite-cursors\"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i}),define(\"ace/scrollbar\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/event_emitter\"],function(e,t,n){var r=e(\"./lib/oop\"),i=e(\"./lib/dom\"),s=e(\"./lib/event\"),o=e(\"./lib/event_emitter\").EventEmitter,u=function(e){this.element=i.createElement(\"div\"),this.element.className=\"ace_scrollbar\",this.inner=i.createElement(\"div\"),this.inner.className=\"ace_scrollbar-inner\",this.element.appendChild(this.inner),e.appendChild(this.element),this.width=i.scrollbarWidth(e.ownerDocument),this.element.style.width=(this.width||15)+5+\"px\",s.addListener(this.element,\"scroll\",this.onScroll.bind(this))};(function(){r.implement(this,o),this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit(\"scroll\",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.width},this.setHeight=function(e){this.element.style.height=e+\"px\"},this.setInnerHeight=function(e){this.inner.style.height=e+\"px\"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}).call(u.prototype),t.ScrollBar=u}),define(\"ace/renderloop\",[\"require\",\"exports\",\"module\",\"ace/lib/event\"],function(e,t,n){var r=e(\"./lib/event\"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){this.changes=this.changes|e;if(!this.pending){this.pending=!0;var t=this;r.nextFrame(function(){t.pending=!1;var e;while(e=t.changes)t.changes=0,t.onRender(e)},this.window)}}}).call(i.prototype),t.RenderLoop=i}),define(\"ace/multi_select\",[\"require\",\"exports\",\"module\",\"ace/range_list\",\"ace/range\",\"ace/selection\",\"ace/mouse/multi_select_handler\",\"ace/lib/event\",\"ace/lib/lang\",\"ace/commands/multi_select_commands\",\"ace/search\",\"ace/edit_session\",\"ace/editor\"],function(e,t,n){function h(e,t,n){return c.$options.wrap=!0,c.$options.needle=t,c.$options.backwards=n==-1,c.find(e)}function v(e,t){return e.row==t.row&&e.column==t.column}function m(e){e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),t.onSessionChange.call(e,e),e.on(\"changeSession\",t.onSessionChange.bind(e)),e.on(\"mousedown\",o),e.commands.addCommands(f.defaultCommands),g(e)}function g(e){function i(){n&&(r.style.cursor=\"\",n=!1)}var t=e.textInput.getElement(),n=!1,r=e.renderer.content;u.addListener(t,\"keydown\",function(e){e.keyCode==18&&!(e.ctrlKey||e.shiftKey||e.metaKey)?n||(r.style.cursor=\"crosshair\",n=!0):n&&(r.style.cursor=\"\")}),u.addListener(t,\"keyup\",i),u.addListener(t,\"blur\",i)}var r=e(\"./range_list\").RangeList,i=e(\"./range\").Range,s=e(\"./selection\").Selection,o=e(\"./mouse/multi_select_handler\").onMouseDown,u=e(\"./lib/event\"),a=e(\"./lib/lang\"),f=e(\"./commands/multi_select_commands\");t.commands=f.defaultCommands.concat(f.multiSelectCommands);var l=e(\"./search\").Search,c=new l,p=e(\"./edit_session\").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(!e)return;if(!this.inMultiSelectMode&&this.rangeCount==0){var n=this.toOrientedRange();if(e.intersects(n))return t||this.fromOrientedRange(e);this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._emit(\"multiSelect\"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._emit(\"addRange\",{range:e})},this.$onRemoveRange=function(e){this.rangeCount=this.rangeList.ranges.length;if(this.rangeCount==1&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._emit(\"removeRange\",{ranges:e}),this.rangeCount==0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._emit(\"singleSelect\"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){if(this.rangeList)return;this.rangeList=new r,this.ranges=[],this.rangeCount=0},this.getAllRanges=function(){return this.rangeList.ranges.concat()},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),r=this.isBackwards(),s=n.start.row,o=n.end.row;if(s==o){if(r)var u=n.end,a=n.start;else var u=n.start,a=n.end;this.addRange(i.fromPoints(a,a)),this.addRange(i.fromPoints(u,u));return}var f=[],l=this.getLineRange(s,!0);l.start.column=n.start.column,f.push(l);for(var c=s+1;c<o;c++)f.push(this.getLineRange(c,!0));l=this.getLineRange(o,!0),l.end.column=n.end.column,f.push(l),f.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.selectionLead),s=this.session.documentToScreenPosition(this.selectionAnchor),o=this.rectangularRangeBlock(r,s);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],s=e.column<t.column;if(s)var o=e.column,u=t.column;else var o=t.column,u=e.column;var a=e.row<t.row;if(a)var f=e.row,l=t.row;else var f=t.row,l=e.row;o<0&&(o=0),f<0&&(f=0),f==l&&(n=!0);for(var c=f;c<=l;c++){var h=i.fromPoints(this.session.screenToDocumentPosition(c,o),this.session.screenToDocumentPosition(c,u));if(h.isEmpty()){if(p&&v(h.end,p))break;var p=h.end}h.cursor=s?h.start:h.end,r.push(h)}a&&r.reverse();if(!n){var d=r.length-1;while(r[d].isEmpty()&&d>0)d--;if(d>0){var m=0;while(r[m].isEmpty())m++}for(var g=d;g>=m;g--)r[g].isEmpty()&&r.splice(g,1)}return r}}.call(s.prototype);var d=e(\"./editor\").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,\"ace_selection\",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(!e.marker)return;this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);t!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length},this.removeSelectionMarkers=function(e){var t=this.session.$selectionMarkers;for(var n=e.length;n--;){var r=e[n];if(!r.marker)continue;this.session.removeMarker(r.marker);var i=t.indexOf(r);i!=-1&&t.splice(i,1)}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){if(this.inMultiSelectMode)return;this.inMultiSelectMode=!0,this.setStyle(\"ace_multiselect\"),this.keyBinding.addKeyboardHandler(f.keyboardHandler),this.commands.on(\"exec\",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onSingleSelect=function(e){if(this.session.multiSelect.inVirtualMode)return;this.inMultiSelectMode=!1,this.unsetStyle(\"ace_multiselect\"),this.keyBinding.removeKeyboardHandler(f.keyboardHandler),this.commands.removeEventListener(\"exec\",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(!n.multiSelect)return;t.multiSelectAction?t.multiSelectAction==\"forEach\"?n.forEachSelection(t,e.args):t.multiSelectAction==\"single\"?(n.exitMultiSelectMode(),t.exec(n,e.args||{})):t.multiSelectAction(n,e.args||{}):(t.exec(n,e.args||{}),n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()),e.preventDefault()},this.forEachSelection=function(e,t){if(this.inVirtualSelectionMode)return;var n=this.session,r=this.selection,i=r.rangeList,o=r._eventRegistry;r._eventRegistry={};var u=new s(n);this.inVirtualSelectionMode=!0;for(var a=i.ranges.length;a--;)u.fromOrientedRange(i.ranges[a]),this.selection=n.selection=u,e.exec(this,t||{}),u.toOrientedRange(i.ranges[a]);u.detach(),this.selection=n.selection=r,this.inVirtualSelectionMode=!1,r._eventRegistry=o,r.mergeOverlappingRanges(),this.onCursorChange(),this.onSelectionChange()},this.exitMultiSelectMode=function(){if(this.inVirtualSelectionMode)return;this.multiSelect.toSingleRange()},this.getCopyText=function(){var e=\"\";if(this.inMultiSelectMode){var t=this.multiSelect.rangeList.ranges;e=[];for(var n=0;n<t.length;n++)e.push(this.session.getTextRange(t[n]));e=e.join(this.session.getDocument().getNewLineCharacter())}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.onPaste=function(e){if(this.$readOnly)return;this._emit(\"paste\",e);if(!this.inMultiSelectMode)return this.insert(e);var t=e.split(/\\r\\n|\\r|\\n/),n=this.selection.rangeList.ranges;if(t.length>n.length||t.length<=2||!t[1])return this.commands.exec(\"insertstring\",this,e);for(var r=n.length;r--;){var i=n[r];i.isEmpty()||this.session.remove(i),this.session.insert(i.start,t[r])}},this.findAll=function(e,t,n){t=t||{},t.needle=e||t.needle,this.$search.set(t);var r=this.$search.findAll(this.session);if(!r.length)return 0;this.$blockScrolling+=1;var i=this.multiSelect;n||i.toSingleRange(r[0]);for(var s=r.length;s--;)i.addRange(r[s],!0);return this.$blockScrolling-=1,r.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,s=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(s.column=this.selection.$desiredColumn);var o=this.session.screenToDocumentPosition(s.row+e,s.column);if(!n.isEmpty())var u=this.session.documentToScreenPosition(r?n.end:n.start),a=this.session.screenToDocumentPosition(u.row+e,u.column);else var a=o;if(r){var f=i.fromPoints(o,a);f.cursor=f.start}else{var f=i.fromPoints(a,o);f.cursor=f.end}f.desiredColumn=s.column;if(!this.selection.inMultiSelectMode)this.selection.addRange(n);else if(t)var l=n.cursor;this.selection.addRange(f),l&&this.selection.substractPoint(l)},this.transposeSelections=function(e){var t=this.session,n=t.multiSelect,r=n.ranges;for(var i=r.length;i--;){var s=r[i];if(s.isEmpty()){var o=t.getWordRange(s.start.row,s.start.column);s.start.row=o.start.row,s.start.column=o.start.column,s.end.row=o.end.row,s.end.column=o.end.column}}n.mergeOverlappingRanges();var u=[];for(var i=r.length;i--;){var s=r[i];u.unshift(t.getTextRange(s))}e<0?u.unshift(u.pop()):u.push(u.shift());for(var i=r.length;i--;){var s=r[i],o=s.clone();t.replace(s,u[i]),s.start.row=o.start.row,s.start.column=o.start.column}},this.selectMore=function(e,t){var n=this.session,r=n.multiSelect,i=r.toOrientedRange();if(i.isEmpty()){var i=n.getWordRange(i.start.row,i.start.column);i.cursor=i.end,this.multiSelect.addRange(i)}var s=n.getTextRange(i),o=h(n,s,e);o&&(o.cursor=e==-1?o.start:o.end,this.multiSelect.addRange(o)),t&&this.multiSelect.substractPoint(i.cursor)},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges;if(!n.length){var r=this.selection.getRange(),s=r.start.row,o=r.end.row,u=this.session.doc.removeLines(s,o);u=this.$reAlignText(u),this.session.doc.insertLines(s,u),r.start.column=0,r.end.column=u[u.length-1].length,this.selection.setRange(r)}else{var f=-1,l=n.filter(function(e){if(e.cursor.row==f)return!0;f=e.cursor.row});t.$onRemoveRange(l);var c=0,h=Infinity,p=n.map(function(t){var n=t.cursor,r=e.getLine(n.row),i=r.substr(n.column).search(/\\S/g);return i==-1&&(i=0),n.column>c&&(c=n.column),i<h&&(h=i),i});n.forEach(function(t,n){var r=t.cursor,s=c-r.column,o=p[n]-h;s>o?e.insert(r,a.stringRepeat(\" \",s-o)):e.remove(new i(r.row,r.column,r.row,r.column-s+o)),t.start.column=t.end.column=c,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(e){function o(e){return a.stringRepeat(\" \",e)}function u(e){return e[2]?o(r)+e[2]+o(i-e[2].length+s)+e[4].replace(/^([=:])\\s+/,\"$1 \"):e[0]}function f(e){return e[2]?o(r+i-e[2].length)+e[2]+o(s,\" \")+e[4].replace(/^([=:])\\s+/,\"$1 \"):e[0]}function l(e){return e[2]?o(r)+e[2]+o(s)+e[4].replace(/^([=:])\\s+/,\"$1 \"):e[0]}var t=!0,n=!0,r,i,s;return e.map(function(e){var o=e.match(/(\\s*)(.*?)(\\s*)([=:].*)/);return o?r==null?(r=o[1].length,i=o[2].length,s=o[3].length,o):(r+i+s!=o[1].length+o[2].length+o[3].length&&(n=!1),r!=o[1].length&&(t=!1),r>o[1].length&&(r=o[1].length),i<o[2].length&&(i=o[2].length),s>o[3].length&&(s=o[3].length),o):[e]}).map(t?n?f:u:l)}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t.multiSelect||(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t.multiSelect;var n=e.oldSession;n&&(n.multiSelect&&n.multiSelect.editor==this&&(n.multiSelect.editor=null),t.multiSelect.removeEventListener(\"addRange\",this.$onAddRange),t.multiSelect.removeEventListener(\"removeRange\",this.$onRemoveRange),t.multiSelect.removeEventListener(\"multiSelect\",this.$onMultiSelect),t.multiSelect.removeEventListener(\"singleSelect\",this.$onSingleSelect)),t.multiSelect.on(\"addRange\",this.$onAddRange),t.multiSelect.on(\"removeRange\",this.$onRemoveRange),t.multiSelect.on(\"multiSelect\",this.$onMultiSelect),t.multiSelect.on(\"singleSelect\",this.$onSingleSelect),this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=m}),define(\"ace/range_list\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r=function(){this.ranges=[]};(function(){this.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},this.pointIndex=function(e,t){var n=this.ranges;for(var r=t||0;r<n.length;r++){var i=n[r],s=this.comparePoints(e,i.end);if(s>0)continue;return s==0?r:(s=this.comparePoints(e,i.start),s>=0?r:-r-1)}return-r-1},this.add=function(e){var t=this.pointIndex(e.start);t<0&&(t=-t-1);var n=this.pointIndex(e.end,t);return n<0?n=-n-1:n++,this.ranges.splice(t,n-t,e)},this.addList=function(e){var t=[];for(var n=e.length;n--;)t.push.call(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges,n=t[0],r;for(var i=1;i<t.length;i++){r=n,n=t[i];var s=this.comparePoints(r.end,n.start);if(s<0)continue;if(s==0&&!r.isEmpty()&&!n.isEmpty())continue;this.comparePoints(r.end,n.end)<0&&(r.end.row=n.end.row,r.end.column=n.end.column),t.splice(i,1),e.push(n),n=r,i--}return e},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);var s=[];for(var o=r;o<i;o++)s.push(n[o]);return s},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on(\"change\",this.onChange)},this.detach=function(){if(!this.session)return;this.session.removeListener(\"change\",this.onChange),this.session=null},this.$onChange=function(e){var t=e.data.range;if(e.data.action[0]==\"i\")var n=t.start,r=t.end;else var r=t.start,n=t.end;var i=n.row,s=r.row,o=s-i,u=-n.column+r.column,a=this.ranges;for(var f=0,l=a.length;f<l;f++){var c=a[f];if(c.end.row<i)continue;if(c.start.row>i)break;c.start.row==i&&c.start.column>=n.column&&(c.start.column+=u,c.start.row+=o),c.end.row==i&&c.end.column>=n.column&&(c.end.column+=u,c.end.row+=o)}if(o!=0&&f<l)for(;f<l;f++){var c=a[f];c.start.row+=o,c.end.row+=o}}}).call(r.prototype),t.RangeList=r}),define(\"ace/mouse/multi_select_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\"],function(e,t,n){function i(e,t){return e.row==t.row&&e.column==t.column}function s(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,o=e.getAccelKey(),u=e.getButton();if(e.editor.inMultiSelectMode&&u==2){e.editor.textInput.onContextMenu(e.domEvent);return}if(!o&&!n){u==0&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode();return}var a=e.editor,f=a.selection,l=a.inMultiSelectMode,c=e.getDocumentPosition(),h=f.getCursor(),p=e.inSelection()||f.isEmpty()&&i(c,h),d=e.x,v=e.y,m=function(e){d=e.clientX,v=e.clientY},g=function(){var e=a.renderer.pixelToScreenCoordinates(d,v),t=y.screenToDocumentPosition(e.row,e.column);if(i(w,e)&&i(t,f.selectionLead))return;w=e,a.selection.moveCursorToPosition(t),a.selection.clearSelection(),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(x),x=f.rectangularRangeBlock(w,b),x.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers()},y=a.session,b=a.renderer.pixelToScreenCoordinates(d,v),w=b;if(o&&!s&&!n&&u==0){if(!l&&p)return;if(!l){var E=f.toOrientedRange();a.addSelectionMarker(E)}var S=f.rangeList.rangeAtPoint(c);r.capture(a.container,function(){},function(){var e=f.toOrientedRange();S&&e.isEmpty()&&i(S.cursor,e.cursor)?f.substractPoint(e.cursor):(E&&(a.removeSelectionMarker(E),f.addRange(E)),f.addRange(e))})}else if(!s&&n&&u==0){e.stop(),l&&!o?f.toSingleRange():!l&&o&&f.addRange(),f.moveCursorToPosition(c),f.clearSelection();var x=[],T=function(e){clearInterval(C),a.removeSelectionMarkers(x);for(var t=0;t<x.length;t++)f.addRange(x[t])},N=g;r.capture(a.container,m,T);var C=setInterval(function(){N()},20);return e.preventDefault()}}var r=e(\"../lib/event\");t.onMouseDown=s}),define(\"ace/commands/multi_select_commands\",[\"require\",\"exports\",\"module\",\"ace/keyboard/hash_handler\"],function(e,t,n){t.defaultCommands=[{name:\"addCursorAbove\",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:\"Ctrl-Alt-Up\",mac:\"Ctrl-Alt-Up\"},readonly:!0},{name:\"addCursorBelow\",exec:function(e){e.selectMoreLines(1)},bindKey:{win:\"Ctrl-Alt-Down\",mac:\"Ctrl-Alt-Down\"},readonly:!0},{name:\"addCursorAboveSkipCurrent\",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:\"Ctrl-Alt-Shift-Up\",mac:\"Ctrl-Alt-Shift-Up\"},readonly:!0},{name:\"addCursorBelowSkipCurrent\",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:\"Ctrl-Alt-Shift-Down\",mac:\"Ctrl-Alt-Shift-Down\"},readonly:!0},{name:\"selectMoreBefore\",exec:function(e){e.selectMore(-1)},bindKey:{win:\"Ctrl-Alt-Left\",mac:\"Ctrl-Alt-Left\"},readonly:!0},{name:\"selectMoreAfter\",exec:function(e){e.selectMore(1)},bindKey:{win:\"Ctrl-Alt-Right\",mac:\"Ctrl-Alt-Right\"},readonly:!0},{name:\"selectNextBefore\",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:\"Ctrl-Alt-Shift-Left\",mac:\"Ctrl-Alt-Shift-Left\"},readonly:!0},{name:\"selectNextAfter\",exec:function(e){e.selectMore(1,!0)},bindKey:{win:\"Ctrl-Alt-Shift-Right\",mac:\"Ctrl-Alt-Shift-Right\"},readonly:!0},{name:\"splitIntoLines\",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:\"Ctrl-Alt-L\",mac:\"Ctrl-Alt-L\"},readonly:!0},{name:\"alignCursors\",exec:function(e){e.alignCursors()},bindKey:{win:\"Ctrl-Alt-A\",mac:\"Ctrl-Alt-A\"}}],t.multiSelectCommands=[{name:\"singleSelection\",bindKey:\"esc\",exec:function(e){e.exitMultiSelectMode()},readonly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e(\"../keyboard/hash_handler\").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)}),define(\"ace/worker/worker_client\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\",\"ace/config\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"../lib/event_emitter\").EventEmitter,s=e(\"../config\"),o=function(t,n,r){this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.onError=this.onError.bind(this);var i;if(s.get(\"packaged\"))i=s.moduleUrl(n,\"worker\");else{var o=this.$normalizePath;typeof e.supports!=\"undefined\"&&e.supports.indexOf(\"ucjs2-pinf-0\")>=0?i=e.nameToUrl(\"ace/worker/worker_sourcemint\"):(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),i=o(e.toUrl(\"ace/worker/worker\",null,\"_\")));var u={};t.forEach(function(t){u[t]=o(e.toUrl(t,null,\"_\").replace(/.js(\\?.*)?$/,\"\"))})}this.$worker=new Worker(i),this.$worker.postMessage({init:!0,tlns:u,module:n,classname:r}),this.callbackId=1,this.callbacks={},this.$worker.onerror=this.onError,this.$worker.onmessage=this.onMessage};(function(){r.implement(this,i),this.onError=function(e){throw window.console&&console.log&&console.log(e),e},this.onMessage=function(e){var t=e.data;switch(t.type){case\"log\":window.console&&console.log&&console.log.apply(console,t.data);break;case\"event\":this._emit(t.name,{data:t.data});break;case\"call\":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id])}},this.$normalizePath=function(e){return location.host?(e=e.replace(/^[a-z]+:\\/\\/[^\\/]+/,\"\"),e=location.protocol+\"//\"+location.host+(e.charAt(0)==\"/\"?\"\":location.pathname.replace(/\\/[^\\/]*$/,\"\"))+\"/\"+e.replace(/^[\\/]+/,\"\"),e):e},this.terminate=function(){this._emit(\"terminate\",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener(\"change\",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call(\"setValue\",[e.getValue()]),e.on(\"change\",this.changeListener)},this.changeListener=function(e){e.range={start:e.data.range.start,end:e.data.range.end},this.emit(\"change\",e)}}).call(o.prototype);var u=function(t,n,r){this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var s=null,o=Object.create(i),u=this;this.$worker={},this.$worker.postMessage=function(e){u.messageBuffer.push(e),s&&setTimeout(a)};var a=function(){var e=u.messageBuffer.shift();e.command?s[e.command].apply(s,e.args):e.event&&o._emit(e.event,e.data)};o.postMessage=function(e){u.onMessage({data:e})},o.callback=function(e,t){this.postMessage({type:\"call\",id:t,data:e})},o.emit=function(e,t){this.postMessage({type:\"event\",name:e,data:t})},e([n],function(e){s=new e[r](o);while(u.messageBuffer.length)a()})};u.prototype=o.prototype,t.UIWorkerClient=u,t.WorkerClient=o}),define(\"ace/placeholder\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/lib/oop\"],function(e,t,n){var r=e(\"./range\").Range,i=e(\"./lib/event_emitter\").EventEmitter,s=e(\"./lib/oop\"),o=function(e,t,n,r,i,s){var o=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on(\"change\",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n;var u=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=u.length,this.setup(),e.selection.on(\"changeCursor\",this.$onCursorChange)};(function(){s.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session,i=this.$pos;this.pos=t.createAnchor(i.row,i.column),this.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.pos.on(\"change\",function(t){n.removeMarker(e.markerId),e.markerId=n.addMarker(new r(t.value.row,t.value.column,t.value.row,t.value.column+e.length),e.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);e.others.push(r)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(this.othersActive)return;var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1),n.on(\"change\",function(i){e.removeMarker(n.markerId),n.markerId=e.addMarker(new r(i.value.row,i.value.column,i.value.row,i.value.column+t.length),t.othersClass,null,!1)})})},this.hideOtherMarkers=function(){if(!this.othersActive)return;this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)},this.onUpdate=function(e){var t=e.data,n=t.range;if(n.start.row!==n.end.row)return;if(n.start.row!==this.pos.row)return;if(this.$updating)return;this.$updating=!0;var i=t.action===\"insertText\"?n.end.column-n.start.column:n.start.column-n.end.column;if(n.start.column>=this.pos.column&&n.start.column<=this.pos.column+this.length+1){var s=n.start.column-this.pos.column;this.length+=i;if(!this.session.$fromUndo){if(t.action===\"insertText\")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};u.row===n.start.row&&n.start.column<u.column&&(a.column+=i),this.doc.insert(a,t.text)}else if(t.action===\"removeText\")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};u.row===n.start.row&&n.start.column<u.column&&(a.column+=i),this.doc.remove(new r(a.row,a.column,a.row,a.column-i))}n.start.column===this.pos.column&&t.action===\"insertText\"?setTimeout(function(){this.pos.setPosition(this.pos.row,this.pos.column-i);for(var e=0;e<this.others.length;e++){var t=this.others[e],r={row:t.row,column:t.column-i};t.row===n.start.row&&n.start.column<t.column&&(r.column+=i),t.setPosition(r.row,r.column)}}.bind(this),0):n.start.column===this.pos.column&&t.action===\"removeText\"&&setTimeout(function(){for(var e=0;e<this.others.length;e++){var t=this.others[e];t.row===n.start.row&&n.start.column<t.column&&t.setPosition(t.row,t.column-i)}}.bind(this),0)}this.pos._emit(\"change\",{value:this.pos});for(var o=0;o<this.others.length;o++)this.others[o]._emit(\"change\",{value:this.others[o]})}this.$updating=!1},this.onCursorChange=function(e){if(this.$updating)return;var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit(\"cursorEnter\",e)):(this.hideOtherMarkers(),this._emit(\"cursorLeave\",e))},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener(\"change\",this.$onUpdate),this.session.selection.removeEventListener(\"changeCursor\",this.$onCursorChange),this.pos.detach();for(var e=0;e<this.others.length;e++)this.others[e].detach();this.session.setUndoSelect(!0)},this.cancel=function(){if(this.$undoStackDepth===-1)throw Error(\"Canceling placeholders only supported with undo manager attached to session.\");var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth;for(var n=0;n<t;n++)e.undo(!0)}}).call(o.prototype),t.PlaceHolder=o}),define(\"ace/mode/folding/fold_mode\",[\"require\",\"exports\",\"module\",\"ace/range\"],function(e,t,n){var r=e(\"../../range\").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?\"start\":t==\"markbeginend\"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?\"end\":\"\"},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\\S/,s=e.getLine(t),o=s.search(i);if(o==-1)return;var u=n||s.length,a=e.getLength(),f=t,l=t;while(++t<a){var c=e.getLine(t).search(i);if(c==-1)continue;if(c<=o)break;l=t}if(l>f){var h=e.getLine(l).length;return new r(f,u,l,h)}},this.openingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i+1},u=e.$findClosingBracket(t,o,s);if(!u)return;var a=e.foldWidgets[u.row];return a==null&&(a=this.getFoldWidget(e,u.row)),a==\"start\"&&u.row>o.row&&(u.row--,u.column=e.getLine(u.row).length),r.fromPoints(o,u)},this.closingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i},u=e.$findOpeningBracket(t,o);if(!u)return;return u.column++,o.column--,r.fromPoints(u,o)}}).call(i.prototype)});\n            (function() {\n                window.require([\"ace/ace\"], function(a) {\n                    a && a.config.init();\n                    if (!window.ace)\n                        window.ace = {};\n                    for (var key in a) if (a.hasOwnProperty(key))\n                        ace[key] = a[key];\n                });\n            })();\n        "
  },
  {
    "path": "public/js/ace/ext-searchbox.js",
    "content": "define(\"ace/ext/searchbox\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/event\",\"ace/keyboard/hash_handler\",\"ace/lib/keys\"],function(e,t,n){var r=e(\"../lib/dom\"),i=e(\"../lib/lang\"),s=e(\"../lib/event\"),o=\"/* ------------------------------------------------------------------------------------------* Editor Search Form* --------------------------------------------------------------------------------------- */.ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 297px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;display: block;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;display: block;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=);    }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=);    }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;display: block;float: right;font-family: Arial;font-size: 16px;height: 14px;line-height: 16px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}\",u=e(\"../keyboard/hash_handler\").HashHandler,a=e(\"../lib/keys\");r.importCssString(o,\"ace_searchbox\");var f='<div class=\"ace_search right\">    <button action=\"hide\" class=\"ace_searchbtn_close\"></button>    <div class=\"ace_search_form\">        <input class=\"ace_search_field\" placeholder=\"Search for\" spellcheck=\"false\">        <button action=\"findNext\" class=\"ace_searchbtn next\"></button>        <button action=\"findPrev\" class=\"ace_searchbtn prev\"></button>    </div>    <div class=\"ace_replace_form\">        <input class=\"ace_search_field\" placeholder=\"Replace with\" spellcheck=\"false\">        <button action=\"replace\" class=\"ace_replacebtn\">Replace</button>        <button action=\"replaceAll\" class=\"ace_replacebtn\">All</button>    </div></div>'.replace(/>\\s+/g,\">\"),l=function(e,t,n){var i=r.createElement(\"div\");i.innerHTML=f,this.element=i.firstChild,this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.container.appendChild(this.element),this.editor=e},this.$init=function(){var e=this.element;this.searchBox=e.querySelector(\".ace_search_form\"),this.replaceBox=e.querySelector(\".ace_replace_form\"),this.searchInput=this.searchBox.querySelector(\".ace_search_field\"),this.replaceInput=this.replaceBox.querySelector(\".ace_search_field\");var t=this;s.addListener(e,\"mousedown\",function(e){setTimeout(function(){t.activeInput.focus()},0),s.stopPropagation(e)}),s.addListener(e,\"click\",function(e){var n=e.target,r=n.getAttribute(\"action\");r&&t[r]&&t[r](),s.stopPropagation(e)}),s.addCommandKeyListener(e,function(e,n,r){var i=a.keyCodeToString(r),o=t.$searchBarKb.findKeyCommand(n,i);o&&o.exec&&(o.exec(t),s.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),s.addListener(this.searchInput,\"input\",function(){t.$onChange.schedule(20)}),s.addListener(this.searchInput,\"focus\",function(){t.activeInput=t.searchInput}),s.addListener(this.replaceInput,\"focus\",function(){t.activeInput=t.replaceInput})},this.$closeSearchBarKb=new u([{bindKey:\"Esc\",name:\"closeSearchBar\",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new u,this.$searchBarKb.bindKeys({\"Ctrl-f|Command-f|Ctrl-H|Command-Option-F\":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?\"\":\"none\",e[t?\"replaceInput\":\"searchInput\"].focus()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},\"Shift-Return\":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.find=function(e,t){this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0}),this.editor.session.highlight(this.editor.$search.$options.re)},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.replace=function(){this.editor.replace(this.replaceInput.value),this.findNext()},this.replaceAll=function(){this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display=\"none\",this.editor.keyBinding.removeKeyboardHandler(this.$searchKeybingin),this.editor.focus()},this.show=function(e,t){this.element.style.display=\"\",this.replaceBox.style.display=t?\"\":\"none\",this.isReplace=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)}}).call(l.prototype),t.SearchBox=l,t.Search=function(e,t){var n=e.searchBox||new l(e);n.show(e.session.getTextRange(),t)},t.ISearch=function(e,t){this.$changeListener=this.$changeListener.bind(this),this.startRange=e.selection.toOrientedRange(),this.options=t||{}},function(){this.setSession=function(e){this.session&&this.session.removeListener(this.$changeListener),this.session=e,this.session.addListener(this.$changeListener)},this.setSearchString=function(){},this.getValue=function(){return this.value==null&&(this.value=this.session.getValue()),this.value},this.$changeListener=function(){this.value=null},this.find=function(){},this.$edgeBefore=function(){this.cursor=this.startRange[this.options.backwards?\"start\":\"end\"]},this.$edgeAfter=function(){},this.next=function(e){}}.call(t.ISearch.prototype)})"
  },
  {
    "path": "public/js/ace/ext-spellcheck.js",
    "content": "define(\"ace/ext/spellcheck\",[\"require\",\"exports\",\"module\"],function(e,t,n){text.spellcheck=!0,host.on(\"nativecontextmenu\",function(e){if(!host.selection.isEmpty())return;var t=host.getCursorPosition(),n=host.session.getWordRange(t.row,t.column),r=host.session.getTextRange(n);host.session.tokenRe.lastIndex=0;if(!host.session.tokenRe.test(r))return;var e=r+\" \"+PLACEHOLDER;text.value=e,text.setSelectionRange(r.length+1,r.length+1),text.setSelectionRange(0,0),inputHandler=function(t){if(t==e)return\"\";if(t.lastIndexOf(e)==t.length-e.length)return t.slice(0,-e.length);if(t.indexOf(e)==0)return t.slice(e.length);if(t.slice(-2)==PLACEHOLDER){var r=t.slice(0,-2);if(r.slice(-1)==\" \")return r=r.slice(0,-1),host.session.replace(n,r),r}return t}})})"
  },
  {
    "path": "public/js/ace/ext-static_highlight.js",
    "content": "define(\"ace/ext/static_highlight\",[\"require\",\"exports\",\"module\",\"ace/edit_session\",\"ace/layer/text\"],function(e,t,n){var r=e(\"../edit_session\").EditSession,i=e(\"../layer/text\").Text,s=\".ace_editor {font-family: 'Monaco', 'Menlo', 'Droid Sans Mono', 'Courier New', monospace;font-size: 12px;}.ace_editor .ace_gutter { width: 25px !important;display: block;float: left;text-align: right; padding: 0 3px 0 0; margin-right: 3px;}.ace_line { clear: both; }*.ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;}\";t.render=function(e,t,n,o,u){o=parseInt(o||1,10);var a=new r(\"\");a.setMode(t),a.setUseWorker(!1);var f=new i(document.createElement(\"div\"));f.setSession(a),f.config={characterWidth:10,lineHeight:20},a.setValue(e);var l=[],c=a.getLength();for(var h=0;h<c;h++)l.push(\"<div class='ace_line'>\"),u||l.push(\"<span class='ace_gutter ace_gutter-cell' unselectable='on'>\"+(h+o)+\"</span>\"),f.$renderLine(l,h,!0,!1),l.push(\"</div>\");var p=\"<div class=':cssClass'>        <div class='ace_editor ace_scroller ace_text-layer'>            :code        </div>    </div>\".replace(/:cssClass/,n.cssClass).replace(/:code/,l.join(\"\"));return f.destroy(),{css:s+n.cssText,html:p}}})"
  },
  {
    "path": "public/js/ace/ext-textarea.js",
    "content": "define(\"ace/ext/textarea\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/lib/net\",\"ace/ace\",\"ace/theme/textmate\",\"ace/mode/text\"],function(e,t,n){function a(e,t){for(var n in t)e.style[n]=t[n]}function f(e,t){if(e.type!=\"textarea\")throw\"Textarea required!\";var n=e.parentNode,i=document.createElement(\"div\"),s=function(){var t=\"position:relative;\";[\"margin-top\",\"margin-left\",\"margin-right\",\"margin-bottom\"].forEach(function(n){t+=n+\":\"+u(e,i,n)+\";\"});var n=u(e,i,\"width\")||e.clientWidth+\"px\",r=u(e,i,\"height\")||e.clientHeight+\"px\";t+=\"height:\"+r+\";width:\"+n+\";\",t+=\"display:inline-block;\",i.setAttribute(\"style\",t)};r.addListener(window,\"resize\",s),s(),e.nextSibling?n.insertBefore(i,e.nextSibling):n.appendChild(i);while(n!==document){if(n.tagName.toUpperCase()===\"FORM\"){var o=n.onsubmit;n.onsubmit=function(n){e.innerHTML=t(),e.value=t(),o&&o.call(this,n)};break}n=n.parentNode}return i}function l(t,n,r){s.loadScript(t,function(){e([n],r)})}function c(n,r,i,s,o,u){function c(e){return e==\"true\"}var a=n.getSession(),f=n.renderer;u=u||l,n.setDisplaySettings=function(e){e==null&&(e=i.style.display==\"none\"),i.style.display=e?\"block\":\"none\"},n.setOption=function(t,i){if(o[t]==i)return;switch(t){case\"gutter\":f.setShowGutter(c(i));break;case\"mode\":i!=\"text\"?u(\"mode-\"+i+\".js\",\"ace/mode/\"+i,function(){var t=e(\"../mode/\"+i).Mode;a.setMode(new t)}):a.setMode(new(e(\"../mode/text\").Mode));break;case\"theme\":i!=\"textmate\"?u(\"theme-\"+i+\".js\",\"ace/theme/\"+i,function(){n.setTheme(\"ace/theme/\"+i)}):n.setTheme(\"ace/theme/textmate\");break;case\"fontSize\":r.style.fontSize=i;break;case\"keybindings\":switch(i){case\"vim\":n.setKeyboardHandler(\"ace/keyboard/vim\");break;case\"emacs\":n.setKeyboardHandler(\"ace/keyboard/emacs\");break;default:n.setKeyboardHandler(null)}break;case\"softWrap\":switch(i){case\"off\":a.setUseWrapMode(!1),f.setPrintMarginColumn(80);break;case\"40\":a.setUseWrapMode(!0),a.setWrapLimitRange(40,40),f.setPrintMarginColumn(40);break;case\"80\":a.setUseWrapMode(!0),a.setWrapLimitRange(80,80),f.setPrintMarginColumn(80);break;case\"free\":a.setUseWrapMode(!0),a.setWrapLimitRange(null,null),f.setPrintMarginColumn(80)}break;case\"useSoftTabs\":a.setUseSoftTabs(c(i));break;case\"showPrintMargin\":f.setShowPrintMargin(c(i));break;case\"showInvisibles\":n.setShowInvisibles(c(i))}o[t]=i},n.getOption=function(e){return o[e]},n.getOptions=function(){return o};for(var h in t.options)n.setOption(h,t.options[h]);return n}function h(e,t,n,i){function f(e,t,n,r){e.push(\"<select title='\"+t+\"'>\");for(var i in n)e.push(\"<option value='\"+i+\"' \"),r==i&&e.push(\" selected \"),e.push(\">\",n[i],\"</option>\");e.push(\"</select>\")}var s={\"true\":!0,\"false\":!1},o={mode:\"Mode:\",gutter:\"Display Gutter:\",theme:\"Theme:\",fontSize:\"Font Size:\",softWrap:\"Soft Wrap:\",keybindings:\"Keyboard\",showPrintMargin:\"Show Print Margin:\",useSoftTabs:\"Use Soft Tabs:\",showInvisibles:\"Show Invisibles\"},u={mode:{text:\"Plain\",javascript:\"JavaScript\",xml:\"XML\",html:\"HTML\",css:\"CSS\",scss:\"SCSS\",python:\"Python\",php:\"PHP\",java:\"Java\",ruby:\"Ruby\",c_cpp:\"C/C++\",coffee:\"CoffeeScript\",json:\"json\",perl:\"Perl\",clojure:\"Clojure\",ocaml:\"OCaml\",csharp:\"C#\",haxe:\"haXe\",svg:\"SVG\",textile:\"Textile\",groovy:\"Groovy\",liquid:\"Liquid\",Scala:\"Scala\"},theme:{clouds:\"Clouds\",clouds_midnight:\"Clouds Midnight\",cobalt:\"Cobalt\",crimson_editor:\"Crimson Editor\",dawn:\"Dawn\",eclipse:\"Eclipse\",idle_fingers:\"Idle Fingers\",kr_theme:\"Kr Theme\",merbivore:\"Merbivore\",merbivore_soft:\"Merbivore Soft\",mono_industrial:\"Mono Industrial\",monokai:\"Monokai\",pastel_on_dark:\"Pastel On Dark\",solarized_dark:\"Solarized Dark\",solarized_light:\"Solarized Light\",textmate:\"Textmate\",twilight:\"Twilight\",vibrant_ink:\"Vibrant Ink\"},gutter:s,fontSize:{\"10px\":\"10px\",\"11px\":\"11px\",\"12px\":\"12px\",\"14px\":\"14px\",\"16px\":\"16px\"},softWrap:{off:\"Off\",40:\"40\",80:\"80\",free:\"Free\"},keybindings:{ace:\"ace\",vim:\"vim\",emacs:\"emacs\"},showPrintMargin:s,useSoftTabs:s,showInvisibles:s},a=[];a.push(\"<table><tr><th>Setting</th><th>Value</th></tr>\");for(var l in i)a.push(\"<tr><td>\",o[l],\"</td>\"),a.push(\"<td>\"),f(a,l,u[l],i[l]),a.push(\"</td></tr>\");a.push(\"</table>\"),e.innerHTML=a.join(\"\");var c=e.getElementsByTagName(\"select\");for(var h=0;h<c.length;h++){var p=function(){var e=c[h];return function(){var t=e.title,r=e.value;n.setOption(t,r)}}();c[h].onchange=p}var d=document.createElement(\"input\");d.type=\"button\",d.value=\"Hide\",r.addListener(d,\"click\",function(){n.setDisplaySettings(!1)}),e.appendChild(d)}var r=e(\"../lib/event\"),i=e(\"../lib/useragent\"),s=e(\"../lib/net\"),o=e(\"../ace\");e(\"../theme/textmate\"),n.exports=t=o;var u=function(e,t,n){var r=e.style[n];r||(window.getComputedStyle?r=window.getComputedStyle(e,\"\").getPropertyValue(n):r=e.currentStyle[n]);if(!r||r==\"auto\"||r==\"intrinsic\")r=t.style[n];return r};t.transformTextarea=function(e,t){var n,s=f(e,function(){return n.getValue()});e.style.display=\"none\",s.style.background=\"white\";var u=document.createElement(\"div\");a(u,{top:\"0px\",left:\"0px\",right:\"0px\",bottom:\"0px\",border:\"1px solid gray\"}),s.appendChild(u);var l=document.createElement(\"div\");a(l,{position:\"absolute\",right:\"0px\",bottom:\"0px\",background:\"red\",cursor:\"nw-resize\",borderStyle:\"solid\",borderWidth:\"9px 8px 10px 9px\",width:\"2px\",borderColor:\"lightblue gray gray lightblue\",zIndex:101});var p=document.createElement(\"div\"),d={top:\"0px\",left:\"0px\",right:\"0px\",bottom:\"0px\",position:\"absolute\",padding:\"5px\",zIndex:100,color:\"white\",display:\"none\",overflow:\"auto\",fontSize:\"14px\"};i.isOldIE?d.backgroundColor=\"#333\":d.backgroundColor=\"rgba(0, 0, 0, 0.6)\",a(p,d),s.appendChild(p);var v={},m=o.edit(u);n=m.getSession(),n.setValue(e.value||e.innerHTML),m.focus(),u.appendChild(l),c(m,u,p,o,v,t),h(p,l,m,v);var g=\"\";return r.addListener(l,\"mousemove\",function(e){var t=this.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;n+r<(t.width+t.height)/2?(this.style.cursor=\"pointer\",g=\"toggle\"):(g=\"resize\",this.style.cursor=\"nw-resize\")}),r.addListener(l,\"mousedown\",function(e){if(g==\"toggle\"){m.setDisplaySettings();return}s.style.zIndex=1e5;var t=s.getBoundingClientRect(),n=t.width+t.left-e.clientX,i=t.height+t.top-e.clientY;r.capture(l,function(e){s.style.width=e.clientX-t.left+n+\"px\",s.style.height=e.clientY-t.top+i+\"px\",m.resize()},function(){})}),m},t.options={mode:\"text\",theme:\"textmate\",gutter:\"false\",fontSize:\"12px\",softWrap:\"off\",keybindings:\"ace\",showPrintMargin:\"false\",useSoftTabs:\"true\",showInvisibles:\"true\"}}),define(\"ace/theme/textmate\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"],function(e,t,n){t.isDark=!1,t.cssClass=\"ace-tm\",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm .ace_scroller {background-color: #FFFFFF;}.ace-tm .ace_cursor {border-left: 2px solid black;}.ace-tm .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_markup.ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;}';var r=e(\"../lib/dom\");r.importCssString(t.cssText,t.cssClass)})"
  },
  {
    "path": "public/js/ace/mode-diff.js",
    "content": "define(\"ace/mode/diff\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/tokenizer\",\"ace/mode/diff_highlight_rules\",\"ace/mode/folding/diff\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text\").Mode,s=e(\"../tokenizer\").Tokenizer,o=e(\"./diff_highlight_rules\").DiffHighlightRules,u=e(\"./folding/diff\").FoldMode,a=function(){this.$tokenizer=new s((new o).getRules(),\"i\"),this.foldingRules=new u([\"diff\",\"index\",\"\\\\+{3}\",\"@@|\\\\*{5}\"],\"i\")};r.inherits(a,i),function(){}.call(a.prototype),t.Mode=a}),define(\"ace/mode/diff_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text_highlight_rules\").TextHighlightRules,s=function(){this.$rules={start:[{regex:\"^(?:\\\\*{15}|={67}|-{3}|\\\\+{3})$\",token:\"punctuation.definition.separator.diff\",name:\"keyword\"},{regex:\"^(@@)(\\\\s*.+?\\\\s*)(@@)(.*)$\",token:[\"constant\",\"constant.numeric\",\"constant\",\"comment.doc.tag\"]},{regex:\"^(\\\\d+)([,\\\\d]+)(a|d|c)(\\\\d+)([,\\\\d]+)(.*)$\",token:[\"constant.numeric\",\"punctuation.definition.range.diff\",\"constant.function\",\"constant.numeric\",\"punctuation.definition.range.diff\",\"invalid\"],name:\"meta.\"},{regex:\"^(?:(\\\\-{3}|\\\\+{3}|\\\\*{3})( .+))$\",token:[\"constant.numeric\",\"meta.tag\"]},{regex:\"^([!+>])(.*?)(\\\\s*)$\",token:[\"support.constant\",\"text\",\"invalid\"]},{regex:\"^([<\\\\-])(.*?)(\\\\s*)$\",token:[\"support.function\",\"string\",\"invalid\"]},{regex:\"^(diff)(\\\\s+--\\\\w+)?(.+?)( .+)?$\",token:[\"variable\",\"variable\",\"keyword\",\"variable\"]},{regex:\"^Index.+$\",token:\"variable\"},{regex:\"^(.*?)(\\\\s*)$\",token:[\"invisible\",\"invalid\"]}]}};r.inherits(s,i),t.DiffHighlightRules=s}),define(\"ace/mode/folding/diff\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/folding/fold_mode\",\"ace/range\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"./fold_mode\").FoldMode,s=e(\"../../range\").Range,o=t.FoldMode=function(e,t){this.regExpList=e,this.flag=t,this.foldingStartMarker=RegExp(\"^(\"+e.join(\"|\")+\")\",this.flag)};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i={row:n,column:r.length},o=this.regExpList;for(var u=1;u<=o.length;u++){var a=RegExp(\"^(\"+o.slice(0,u).join(\"|\")+\")\",this.flag);if(a.test(r))break}for(var f=e.getLength();++n<f;){r=e.getLine(n);if(a.test(r))break}if(n==i.row+1)return;return s.fromPoints(i,{row:n-1,column:r.length})}}.call(o.prototype)})"
  },
  {
    "path": "public/js/ace/mode-html.js",
    "content": "define(\"ace/mode/html\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/javascript\",\"ace/mode/css\",\"ace/tokenizer\",\"ace/mode/html_highlight_rules\",\"ace/mode/behaviour/html\",\"ace/mode/folding/html\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text\").Mode,s=e(\"./javascript\").Mode,o=e(\"./css\").Mode,u=e(\"../tokenizer\").Tokenizer,a=e(\"./html_highlight_rules\").HtmlHighlightRules,f=e(\"./behaviour/html\").HtmlBehaviour,l=e(\"./folding/html\").FoldMode,c=function(){var e=new a;this.$tokenizer=new u(e.getRules()),this.$behaviour=new f,this.$embeds=e.getEmbeds(),this.createModeDelegates({\"js-\":s,\"css-\":o}),this.foldingRules=new l};r.inherits(c,i),function(){this.toggleCommentLines=function(e,t,n,r){return 0},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1}}.call(c.prototype),t.Mode=c}),define(\"ace/mode/javascript\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/tokenizer\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/range\",\"ace/worker/worker_client\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text\").Mode,s=e(\"../tokenizer\").Tokenizer,o=e(\"./javascript_highlight_rules\").JavaScriptHighlightRules,u=e(\"./matching_brace_outdent\").MatchingBraceOutdent,a=e(\"../range\").Range,f=e(\"../worker/worker_client\").WorkerClient,l=e(\"./behaviour/cstyle\").CstyleBehaviour,c=e(\"./folding/cstyle\").FoldMode,h=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.$behaviour=new l,this.foldingRules=new c};r.inherits(h,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\\s*)\\/\\//;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new a(0,0,0,0);for(var o=n;o<=r;o++){var f=t.getLine(o),l=f.match(s);u.start.row=o,u.end.row=o,u.end.column=l[0].length,t.replace(u,l[1])}}else t.indentRows(n,r,\"//\")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type==\"comment\")return r;if(e==\"start\"||e==\"regex_allowed\"){var u=t.match(/^.*(?:\\bcase\\b.*\\:|[\\{\\(\\[])\\s*$/);u&&(r+=n)}else if(e==\"doc-start\"){if(o==\"start\"||e==\"regex_allowed\")return\"\";var u=t.match(/^\\s*(\\/?)\\*/);u&&(u[1]&&(r+=\" \"),r+=\"* \")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new f([\"ace\"],\"ace/mode/javascript_worker\",\"JavaScriptWorker\");return t.attachToDocument(e.getDocument()),t.on(\"jslint\",function(t){e.setAnnotations(t.data)}),t.on(\"terminate\",function(){e.clearAnnotations()}),t}}.call(h.prototype),t.Mode=h}),define(\"ace/mode/javascript_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/doc_comment_highlight_rules\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./doc_comment_highlight_rules\").DocCommentHighlightRules,s=e(\"./text_highlight_rules\").TextHighlightRules,o=function(){var e=this.createKeywordMapper({\"variable.language\":\"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document\",keyword:\"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static\",\"storage.type\":\"const|let|var|function\",\"constant.language\":\"null|Infinity|NaN|undefined\",\"support.function\":\"alert\"},\"identifier\"),t=\"case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void\",n=\"[a-zA-Z\\\\$_¡-￿][a-zA-Z\\\\d\\\\$_¡-￿]*\\\\b\",r=\"\\\\\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)\";this.$rules={start:[{token:\"comment\",regex:/\\/\\/.*$/},i.getStartRule(\"doc-start\"),{token:\"comment\",regex:/\\/\\*/,next:\"comment\"},{token:\"string\",regex:\"'(?=.)\",next:\"qstring\"},{token:\"string\",regex:'\"(?=.)',next:\"qqstring\"},{token:\"constant.numeric\",regex:/0[xX][0-9a-fA-F]+\\b/},{token:\"constant.numeric\",regex:/[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b/},{token:[\"storage.type\",\"punctuation.operator\",\"support.function\",\"punctuation.operator\",\"entity.name.function\",\"text\",\"keyword.operator\"],regex:\"(\"+n+\")(\\\\.)(prototype)(\\\\.)(\"+n+\")(\\\\s*)(=)\",next:\"function_arguments\"},{token:[\"storage.type\",\"punctuation.operator\",\"entity.name.function\",\"text\",\"keyword.operator\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(\"+n+\")(\\\\.)(\"+n+\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"entity.name.function\",\"text\",\"keyword.operator\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(\"+n+\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"storage.type\",\"punctuation.operator\",\"entity.name.function\",\"text\",\"keyword.operator\",\"text\",\"storage.type\",\"text\",\"entity.name.function\",\"text\",\"paren.lparen\"],regex:\"(\"+n+\")(\\\\.)(\"+n+\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s+)(\\\\w+)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"storage.type\",\"text\",\"entity.name.function\",\"text\",\"paren.lparen\"],regex:\"(function)(\\\\s+)(\"+n+\")(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"entity.name.function\",\"text\",\"punctuation.operator\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(\"+n+\")(\\\\s*)(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"text\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:\"constant.language.boolean\",regex:/(?:true|false)\\b/},{token:\"keyword\",regex:\"(?:\"+t+\")\\\\b\",next:\"regex_allowed\"},{token:[\"punctuation.operator\",\"support.function\"],regex:/(\\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\\b(?=\\()/},{token:[\"punctuation.operator\",\"support.function.dom\"],regex:/(\\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()/},{token:[\"punctuation.operator\",\"support.constant\"],regex:/(\\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\\b/},{token:[\"storage.type\",\"punctuation.operator\",\"support.function.firebug\"],regex:/(console)(\\.)(warn|info|log|error|time|timeEnd|assert)\\b/},{token:e,regex:n},{token:\"keyword.operator\",regex:/--|\\+\\+|[!$%&*+\\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=/,next:\"regex_allowed\"},{token:\"punctuation.operator\",regex:/\\?|\\:|\\,|\\;|\\./,next:\"regex_allowed\"},{token:\"paren.lparen\",regex:/[\\[({]/,next:\"regex_allowed\"},{token:\"paren.rparen\",regex:/[\\])}]/},{token:\"keyword.operator\",regex:/\\/=?/,next:\"regex_allowed\"},{token:\"comment\",regex:/^#!.*$/},{token:\"text\",regex:/\\s+/}],regex_allowed:[i.getStartRule(\"doc-start\"),{token:\"comment\",regex:\"\\\\/\\\\*\",next:\"comment_regex_allowed\"},{token:\"comment\",regex:\"\\\\/\\\\/.*$\"},{token:\"string.regexp\",regex:\"\\\\/\",next:\"regex\"},{token:\"text\",regex:\"\\\\s+\"},{token:\"empty\",regex:\"\",next:\"start\"}],regex:[{token:\"regexp.keyword.operator\",regex:\"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"},{token:\"string.regexp\",regex:\"/\\\\w*\",next:\"start\"},{token:\"invalid\",regex:/\\{\\d+,?(?:\\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/},{token:\"constant.language.escape\",regex:/\\(\\?[:=!]|\\)|{\\d+,?(?:\\d+)?}|{,\\d+}|[+*]\\?|[(|)$^+*?]/},{token:\"string.regexp\",regex:/{|[^{\\[\\/\\\\(|)$^+*?]+/},{token:\"constant.language.escape\",regex:/\\[\\^?/,next:\"regex_character_class\"},{token:\"empty\",regex:\"\",next:\"start\"}],regex_character_class:[{token:\"regexp.keyword.operator\",regex:\"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"},{token:\"constant.language.escape\",regex:\"]\",next:\"regex\"},{token:\"constant.language.escape\",regex:\"-\"},{token:\"string.regexp.charachterclass\",regex:/[^\\]\\-\\\\]+/},{token:\"empty\",regex:\"\",next:\"start\"}],function_arguments:[{token:\"variable.parameter\",regex:n},{token:\"punctuation.operator\",regex:\"[, ]+\"},{token:\"punctuation.operator\",regex:\"$\"},{token:\"empty\",regex:\"\",next:\"start\"}],comment_regex_allowed:[{token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"regex_allowed\"},{token:\"comment\",regex:\".+\"}],comment:[{token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"start\"},{token:\"comment\",regex:\".+\"}],qqstring:[{token:\"constant.language.escape\",regex:r},{token:\"string\",regex:\"\\\\\\\\$\",next:\"qqstring\"},{token:\"string\",regex:'\"|$',next:\"start\"},{token:\"string\",regex:\".|\\\\w+|\\\\s+\"}],qstring:[{token:\"constant.language.escape\",regex:r},{token:\"string\",regex:\"\\\\\\\\$\",next:\"qstring\"},{token:\"string\",regex:\"'|$\",next:\"start\"},{token:\"string\",regex:\".|\\\\w+|\\\\s+\"}]},this.embedRules(i,\"doc-\",[i.getEndRule(\"start\")])};r.inherits(o,s),t.JavaScriptHighlightRules=o}),define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text_highlight_rules\").TextHighlightRules,s=function(){this.$rules={start:[{token:\"comment.doc.tag\",regex:\"@[\\\\w\\\\d_]+\"},{token:\"comment.doc\",regex:\"\\\\s+\"},{token:\"comment.doc\",regex:\"TODO\"},{token:\"comment.doc\",regex:\"[^@\\\\*]+\"},{token:\"comment.doc\",regex:\".\"}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:\"comment.doc\",regex:\"\\\\/\\\\*(?=\\\\*)\",next:e}},s.getEndRule=function(e){return{token:\"comment.doc\",regex:\"\\\\*\\\\/\",next:e}},t.DocCommentHighlightRules=s}),define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"],function(e,t,n){var r=e(\"../range\").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\\s+$/.test(e)?/^\\s*\\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\\s*\\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\\s+)/);return t?t[1]:\"\"}}).call(i.prototype),t.MatchingBraceOutdent=i}),define(\"ace/mode/behaviour/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"../behaviour\").Behaviour,s=e(\"../../token_iterator\").TokenIterator,o=e(\"../../lib/lang\"),u=[\"text\",\"paren.rparen\",\"punctuation.operator\"],a=[\"text\",\"paren.rparen\",\"punctuation.operator\",\"comment\"],f=0,l=-1,c=\"\",h=0,p=-1,d=\"\",v=\"\",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||\"text\",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||\"text\",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||\"text\",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add(\"braces\",\"insertion\",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i==\"{\"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==\"\"&&f!==\"{\"&&n.getWrapBehavioursEnabled())return{text:\"{\"+f+\"}\",selection:!1};if(m.isSaneInsertion(n,r))return/[\\]\\}\\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,\"}\"),{text:\"{}\",selection:[1,1]}):(m.recordMaybeInsert(n,r,\"{\"),{text:\"{\",selection:[1,1]})}else if(i==\"}\"){var l=u.substring(s.column,s.column+1);if(l==\"}\"){var c=r.$findOpeningBracket(\"}\",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}else if(i==\"\\n\"||i==\"\\r\\n\"){var p=\"\";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat(\"}\",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l==\"}\"||p!==\"\"){var d=r.findMatchingBracket({row:s.row,column:s.column},\"}\");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:\"\\n\"+v+\"\\n\"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add(\"braces\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"{\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u==\"}\")return i.end.column++,i;h--}}),this.add(\"parens\",\"insertion\",function(e,t,n,r,i){if(i==\"(\"){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==\"\"&&n.getWrapBehavioursEnabled())return{text:\"(\"+o+\")\",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,\")\"),{text:\"()\",selection:[1,1]}}else if(i==\")\"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==\")\"){var l=r.$findOpeningBracket(\")\",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}}),this.add(\"parens\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"(\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==\")\")return i.end.column++,i}}),this.add(\"brackets\",\"insertion\",function(e,t,n,r,i){if(i==\"[\"){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==\"\"&&n.getWrapBehavioursEnabled())return{text:\"[\"+o+\"]\",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,\"]\"),{text:\"[]\",selection:[1,1]}}else if(i==\"]\"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==\"]\"){var l=r.$findOpeningBracket(\"]\",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}}),this.add(\"brackets\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"[\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==\"]\")return i.end.column++,i}}),this.add(\"string_dquotes\",\"insertion\",function(e,t,n,r,i){if(i=='\"'||i==\"'\"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==\"\"&&u!==\"'\"&&u!='\"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l==\"\\\\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type==\"string\"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!==\"comment\"&&(p.type!==\"string\"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type===\"string\"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:\"\",selection:[1,1]}}}}),this.add(\"string_dquotes\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='\"'||s==\"'\")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"../../range\").Range,s=e(\"./fold_mode\").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\\{|\\[)[^\\}\\]]*$|^\\s*(\\/\\*)/,this.foldingStopMarker=/^[^\\[\\{]*(\\}|\\])|^[\\s\\*]*(\\*\\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!==\"markbeginend\")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)}),define(\"ace/mode/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/tokenizer\",\"ace/mode/css_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text\").Mode,s=e(\"../tokenizer\").Tokenizer,o=e(\"./css_highlight_rules\").CssHighlightRules,u=e(\"./matching_brace_outdent\").MatchingBraceOutdent,a=e(\"../worker/worker_client\").WorkerClient,f=e(\"./behaviour/cstyle\").CstyleBehaviour,l=e(\"./folding/cstyle\").FoldMode,c=function(){this.$tokenizer=new s((new o).getRules(),\"i\"),this.$outdent=new u,this.$behaviour=new f,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules=\"cStyle\",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type==\"comment\")return r;var s=t.match(/^.*\\{\\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a([\"ace\"],\"ace/mode/css_worker\",\"Worker\");return t.attachToDocument(e.getDocument()),t.on(\"csslint\",function(t){e.setAnnotations(t.data)}),t.on(\"terminate\",function(){e.clearAnnotations()}),t}}.call(c.prototype),t.Mode=c}),define(\"ace/mode/css_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"../lib/lang\"),s=e(\"./text_highlight_rules\").TextHighlightRules,o=t.supportType=\"animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index\",u=t.supportFunction=\"rgb|rgba|url|attr|counter|counters\",a=t.supportConstant=\"absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero\",f=t.supportConstantColor=\"aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow\",l=t.supportConstantFonts=\"arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace\",c=t.numRe=\"\\\\-?(?:(?:[0-9]+)|(?:[0-9]*\\\\.[0-9]+))\",h=t.pseudoElements=\"(\\\\:+)\\\\b(after|before|first-letter|first-line|moz-selection|selection)\\\\b\",p=t.pseudoClasses=\"(:)\\\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\\\b\",d=function(){var e=this.createKeywordMapper({\"support.function\":u,\"support.constant\":a,\"support.type\":o,\"support.constant.color\":f,\"support.constant.fonts\":l},\"text\",!0),t=[{token:\"comment\",regex:\"\\\\/\\\\*\",next:\"ruleset_comment\"},{token:\"string\",regex:'[\"](?:(?:\\\\\\\\.)|(?:[^\"\\\\\\\\]))*?[\"]'},{token:\"string\",regex:\"['](?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?[']\"},{token:[\"constant.numeric\",\"keyword\"],regex:\"(\"+c+\")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\"},{token:\"constant.numeric\",regex:c},{token:\"constant.numeric\",regex:\"#[a-f0-9]{6}\"},{token:\"constant.numeric\",regex:\"#[a-f0-9]{3}\"},{token:[\"punctuation\",\"entity.other.attribute-name.pseudo-element.css\"],regex:h},{token:[\"punctuation\",\"entity.other.attribute-name.pseudo-class.css\"],regex:p},{token:e,regex:\"\\\\-?[a-zA-Z_][a-zA-Z0-9_\\\\-]*\"}],n=i.copyArray(t);n.unshift({token:\"paren.rparen\",regex:\"\\\\}\",next:\"start\"});var r=i.copyArray(t);r.unshift({token:\"paren.rparen\",regex:\"\\\\}\",next:\"media\"});var s=[{token:\"comment\",regex:\".+\"}],d=i.copyArray(s);d.unshift({token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"start\"});var v=i.copyArray(s);v.unshift({token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"media\"});var m=i.copyArray(s);m.unshift({token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"ruleset\"}),this.$rules={start:[{token:\"comment\",regex:\"\\\\/\\\\*\",next:\"comment\"},{token:\"paren.lparen\",regex:\"\\\\{\",next:\"ruleset\"},{token:\"string\",regex:\"@.*?{\",next:\"media\"},{token:\"keyword\",regex:\"#[a-z0-9-_]+\"},{token:\"variable\",regex:\"\\\\.[a-z0-9-_]+\"},{token:\"string\",regex:\":[a-z0-9-_]+\"},{token:\"constant\",regex:\"[a-z0-9-_]+\"}],media:[{token:\"comment\",regex:\"\\\\/\\\\*\",next:\"media_comment\"},{token:\"paren.lparen\",regex:\"\\\\{\",next:\"media_ruleset\"},{token:\"string\",regex:\"\\\\}\",next:\"start\"},{token:\"keyword\",regex:\"#[a-z0-9-_]+\"},{token:\"variable\",regex:\"\\\\.[a-z0-9-_]+\"},{token:\"string\",regex:\":[a-z0-9-_]+\"},{token:\"constant\",regex:\"[a-z0-9-_]+\"}],comment:d,ruleset:n,ruleset_comment:m,media_ruleset:r,media_comment:v}};r.inherits(d,s),t.CssHighlightRules=d}),define(\"ace/mode/html_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/css_highlight_rules\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/xml_util\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"../lib/lang\"),s=e(\"./css_highlight_rules\").CssHighlightRules,o=e(\"./javascript_highlight_rules\").JavaScriptHighlightRules,u=e(\"./xml_util\"),a=e(\"./text_highlight_rules\").TextHighlightRules,f=i.createMap({a:\"anchor\",button:\"form\",form:\"form\",img:\"image\",input:\"form\",label:\"form\",script:\"script\",select:\"form\",textarea:\"form\",style:\"style\",table:\"table\",tbody:\"table\",td:\"table\",tfoot:\"table\",th:\"table\",tr:\"table\"}),l=function(){this.$rules={start:[{token:\"text\",regex:\"<\\\\!\\\\[CDATA\\\\[\",next:\"cdata\"},{token:\"xml-pe\",regex:\"<\\\\?.*?\\\\?>\"},{token:\"comment\",regex:\"<\\\\!--\",next:\"comment\"},{token:\"xml-pe\",regex:\"<\\\\!.*?>\"},{token:\"meta.tag\",regex:\"<(?=script\\\\b)\",next:\"script\"},{token:\"meta.tag\",regex:\"<(?=style\\\\b)\",next:\"style\"},{token:\"meta.tag\",regex:\"<\\\\/?\",next:\"tag\"},{token:\"text\",regex:\"\\\\s+\"},{token:\"constant.character.entity\",regex:\"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"},{token:\"text\",regex:\"[^<]+\"}],cdata:[{token:\"text\",regex:\"\\\\]\\\\]>\",next:\"start\"},{token:\"text\",regex:\"\\\\s+\"},{token:\"text\",regex:\".+\"}],comment:[{token:\"comment\",regex:\".*?-->\",next:\"start\"},{token:\"comment\",regex:\".+\"}]},u.tag(this.$rules,\"tag\",\"start\",f),u.tag(this.$rules,\"style\",\"css-start\",f),u.tag(this.$rules,\"script\",\"js-start\",f),this.embedRules(o,\"js-\",[{token:\"comment\",regex:\"\\\\/\\\\/.*(?=<\\\\/script>)\",next:\"tag\"},{token:\"meta.tag\",regex:\"<\\\\/(?=script)\",next:\"tag\"}]),this.embedRules(s,\"css-\",[{token:\"meta.tag\",regex:\"<\\\\/(?=style)\",next:\"tag\"}])};r.inherits(l,a),t.HtmlHighlightRules=l}),define(\"ace/mode/xml_util\",[\"require\",\"exports\",\"module\"],function(e,t,n){function r(e){return[{token:\"string\",regex:'\"',next:e+\"_qqstring\"},{token:\"string\",regex:\"'\",next:e+\"_qstring\"}]}function i(e,t){return[{token:\"string\",regex:e,next:t},{token:\"constant.language.escape\",regex:\"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"},{token:\"string\",regex:\"\\\\w+|.|\\\\s+\"}]}t.tag=function(e,t,n,s){e[t]=[{token:\"text\",regex:\"\\\\s+\"},{token:s?function(e){return s[e]?\"meta.tag.tag-name.\"+s[e]:\"meta.tag.tag-name\"}:\"meta.tag.tag-name\",regex:\"[-_a-zA-Z0-9:]+\",next:t+\"_embed_attribute_list\"},{token:\"empty\",regex:\"\",next:t+\"_embed_attribute_list\"}],e[t+\"_qstring\"]=i(\"'\",t+\"_embed_attribute_list\"),e[t+\"_qqstring\"]=i('\"',t+\"_embed_attribute_list\"),e[t+\"_embed_attribute_list\"]=[{token:\"meta.tag.r\",regex:\"/?>\",next:n},{token:\"keyword.operator\",regex:\"=\"},{token:\"entity.other.attribute-name\",regex:\"[-_a-zA-Z0-9:]+\"},{token:\"constant.numeric\",regex:\"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"},{token:\"text\",regex:\"\\\\s+\"}].concat(r(t))}}),define(\"ace/mode/behaviour/html\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour/xml\",\"ace/mode/behaviour/cstyle\",\"ace/token_iterator\"],function(e,t,n){function a(e,t){var n=!0,r=e.type.split(\".\"),i=t.split(\".\");return i.forEach(function(e){if(r.indexOf(e)==-1)return n=!1,!1}),n}var r=e(\"../../lib/oop\"),i=e(\"../behaviour/xml\").XmlBehaviour,s=e(\"./cstyle\").CstyleBehaviour,o=e(\"../../token_iterator\").TokenIterator,u=[\"area\",\"base\",\"br\",\"col\",\"command\",\"embed\",\"hr\",\"img\",\"input\",\"keygen\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"],f=function(){this.inherit(i),this.add(\"autoclosing\",\"insertion\",function(e,t,n,r,i){if(i==\">\"){var s=n.getCursorPosition(),f=new o(r,s.row,s.column),l=f.getCurrentToken(),c=!1;if(!l||!a(l,\"meta.tag\")&&(!a(l,\"text\")||!l.value.match(\"/\"))){do l=f.stepBackward();while(l&&(a(l,\"string\")||a(l,\"keyword.operator\")||a(l,\"entity.attribute-name\")||a(l,\"text\")))}else c=!0;if(!l||!a(l,\"meta.tag-name\")||f.stepBackward().value.match(\"/\"))return;var h=l.value;if(c)var h=h.substring(0,s.column-l.start);if(u.indexOf(h)!==-1)return;return{text:\"></\"+h+\">\",selection:[1,1]}}})};r.inherits(f,i),t.HtmlBehaviour=f}),define(\"ace/mode/behaviour/xml\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/mode/behaviour/cstyle\",\"ace/token_iterator\"],function(e,t,n){function u(e,t){var n=!0,r=e.type.split(\".\"),i=t.split(\".\");return i.forEach(function(e){if(r.indexOf(e)==-1)return n=!1,!1}),n}var r=e(\"../../lib/oop\"),i=e(\"../behaviour\").Behaviour,s=e(\"./cstyle\").CstyleBehaviour,o=e(\"../../token_iterator\").TokenIterator,a=function(){this.inherit(s,[\"string_dquotes\"]),this.add(\"autoclosing\",\"insertion\",function(e,t,n,r,i){if(i==\">\"){var s=n.getCursorPosition(),a=new o(r,s.row,s.column),f=a.getCurrentToken(),l=!1;if(!f||!u(f,\"meta.tag\")&&(!u(f,\"text\")||!f.value.match(\"/\"))){do f=a.stepBackward();while(f&&(u(f,\"string\")||u(f,\"keyword.operator\")||u(f,\"entity.attribute-name\")||u(f,\"text\")))}else l=!0;if(!f||!u(f,\"meta.tag-name\")||a.stepBackward().value.match(\"/\"))return;var c=f.value;if(l)var c=c.substring(0,s.column-f.start);return{text:\"></\"+c+\">\",selection:[1,1]}}}),this.add(\"autoindent\",\"insertion\",function(e,t,n,r,i){if(i==\"\\n\"){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+2);if(u==\"</\"){var a=this.$getIndent(r.doc.getLine(s.row))+r.getTabString(),f=this.$getIndent(r.doc.getLine(s.row));return{text:\"\\n\"+a+\"\\n\"+f,selection:[1,a.length,1,a.length]}}}})};r.inherits(a,i),t.XmlBehaviour=a}),define(\"ace/mode/folding/html\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/folding/mixed\",\"ace/mode/folding/xml\",\"ace/mode/folding/cstyle\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"./mixed\").FoldMode,s=e(\"./xml\").FoldMode,o=e(\"./cstyle\").FoldMode,u=t.FoldMode=function(){i.call(this,new s({area:1,base:1,br:1,col:1,command:1,embed:1,hr:1,img:1,input:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1,li:1,dt:1,dd:1,p:1,rt:1,rp:1,optgroup:1,option:1,colgroup:1,td:1,th:1}),{\"js-\":new o,\"css-\":new o})};r.inherits(u,i)}),define(\"ace/mode/folding/mixed\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/folding/fold_mode\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"./fold_mode\").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):\"\"},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),define(\"ace/mode/folding/xml\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/range\",\"ace/mode/folding/fold_mode\",\"ace/token_iterator\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"../../lib/lang\"),s=e(\"../../range\").Range,o=e(\"./fold_mode\").FoldMode,u=e(\"../../token_iterator\").TokenIterator,a=t.FoldMode=function(e){o.call(this),this.voidElements=e||{}};r.inherits(a,o),function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r.closing?t==\"markbeginend\"?\"end\":\"\":!r.tagName||this.voidElements[r.tagName.toLowerCase()]?\"\":r.selfClosing?\"\":r.value.indexOf(\"/\"+r.tagName)!==-1?\"\":\"start\"},this._getFirstTagInLine=function(e,t){var n=e.getTokens(t),r=\"\";for(var s=0;s<n.length;s++){var o=n[s];o.type.indexOf(\"meta.tag\")===0?r+=o.value:r+=i.stringRepeat(\" \",o.value.length)}return this._parseTag(r)},this.tagRe=/^(\\s*)(<?(\\/?)([-_a-zA-Z0-9:!]*)\\s*(\\/?)>?)/,this._parseTag=function(e){var t=this.tagRe.exec(e),n=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:e,match:t?t[2]:\"\",closing:t?!!t[3]:!1,selfClosing:t?!!t[5]||t[2]==\"/>\":!1,tagName:t?t[4]:\"\",column:t[1]?n+t[1].length:n}},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=\"\",r;do if(t.type.indexOf(\"meta.tag\")===0){if(!r)var r={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()};n+=t.value;if(n.indexOf(\">\")!==-1){var i=this._parseTag(n);return i.start=r,i.end={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()+t.value.length},e.stepForward(),i}}while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=\"\",r;do if(t.type.indexOf(\"meta.tag\")===0){r||(r={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()+t.value.length}),n=t.value+n;if(n.indexOf(\"<\")!==-1){var i=this._parseTag(n);return i.end=r,i.start={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()},e.stepBackward(),i}}while(t=e.stepBackward());return null},this._pop=function(e,t){while(e.length){var n=e[e.length-1];if(!t||n.tagName==t.tagName)return e.pop();if(this.voidElements[t.tagName])return;if(this.voidElements[n.tagName]){e.pop();continue}return null}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r.match)return null;var i=r.closing||r.selfClosing,o=[],a;if(!i){var f=new u(e,n,r.column),l={row:n,column:r.column+r.tagName.length+2};while(a=this._readTagForward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(a.closing){this._pop(o,a);if(o.length==0)return s.fromPoints(l,a.start)}else o.push(a)}}else{var f=new u(e,n,r.column+r.match.length),c={row:n,column:r.column};while(a=this._readTagBackward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(!a.closing){this._pop(o,a);if(o.length==0)return a.start.column+=a.tagName.length+2,s.fromPoints(a.start,c)}else o.push(a)}}}}.call(a.prototype)})"
  },
  {
    "path": "public/js/ace/mode-javascript.js",
    "content": "define(\"ace/mode/javascript\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/tokenizer\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/range\",\"ace/worker/worker_client\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text\").Mode,s=e(\"../tokenizer\").Tokenizer,o=e(\"./javascript_highlight_rules\").JavaScriptHighlightRules,u=e(\"./matching_brace_outdent\").MatchingBraceOutdent,a=e(\"../range\").Range,f=e(\"../worker/worker_client\").WorkerClient,l=e(\"./behaviour/cstyle\").CstyleBehaviour,c=e(\"./folding/cstyle\").FoldMode,h=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.$behaviour=new l,this.foldingRules=new c};r.inherits(h,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\\s*)\\/\\//;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new a(0,0,0,0);for(var o=n;o<=r;o++){var f=t.getLine(o),l=f.match(s);u.start.row=o,u.end.row=o,u.end.column=l[0].length,t.replace(u,l[1])}}else t.indentRows(n,r,\"//\")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type==\"comment\")return r;if(e==\"start\"||e==\"regex_allowed\"){var u=t.match(/^.*(?:\\bcase\\b.*\\:|[\\{\\(\\[])\\s*$/);u&&(r+=n)}else if(e==\"doc-start\"){if(o==\"start\"||e==\"regex_allowed\")return\"\";var u=t.match(/^\\s*(\\/?)\\*/);u&&(u[1]&&(r+=\" \"),r+=\"* \")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new f([\"ace\"],\"ace/mode/javascript_worker\",\"JavaScriptWorker\");return t.attachToDocument(e.getDocument()),t.on(\"jslint\",function(t){e.setAnnotations(t.data)}),t.on(\"terminate\",function(){e.clearAnnotations()}),t}}.call(h.prototype),t.Mode=h}),define(\"ace/mode/javascript_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/doc_comment_highlight_rules\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./doc_comment_highlight_rules\").DocCommentHighlightRules,s=e(\"./text_highlight_rules\").TextHighlightRules,o=function(){var e=this.createKeywordMapper({\"variable.language\":\"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document\",keyword:\"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static\",\"storage.type\":\"const|let|var|function\",\"constant.language\":\"null|Infinity|NaN|undefined\",\"support.function\":\"alert\"},\"identifier\"),t=\"case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void\",n=\"[a-zA-Z\\\\$_¡-￿][a-zA-Z\\\\d\\\\$_¡-￿]*\\\\b\",r=\"\\\\\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)\";this.$rules={start:[{token:\"comment\",regex:/\\/\\/.*$/},i.getStartRule(\"doc-start\"),{token:\"comment\",regex:/\\/\\*/,next:\"comment\"},{token:\"string\",regex:\"'(?=.)\",next:\"qstring\"},{token:\"string\",regex:'\"(?=.)',next:\"qqstring\"},{token:\"constant.numeric\",regex:/0[xX][0-9a-fA-F]+\\b/},{token:\"constant.numeric\",regex:/[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b/},{token:[\"storage.type\",\"punctuation.operator\",\"support.function\",\"punctuation.operator\",\"entity.name.function\",\"text\",\"keyword.operator\"],regex:\"(\"+n+\")(\\\\.)(prototype)(\\\\.)(\"+n+\")(\\\\s*)(=)\",next:\"function_arguments\"},{token:[\"storage.type\",\"punctuation.operator\",\"entity.name.function\",\"text\",\"keyword.operator\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(\"+n+\")(\\\\.)(\"+n+\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"entity.name.function\",\"text\",\"keyword.operator\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(\"+n+\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"storage.type\",\"punctuation.operator\",\"entity.name.function\",\"text\",\"keyword.operator\",\"text\",\"storage.type\",\"text\",\"entity.name.function\",\"text\",\"paren.lparen\"],regex:\"(\"+n+\")(\\\\.)(\"+n+\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s+)(\\\\w+)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"storage.type\",\"text\",\"entity.name.function\",\"text\",\"paren.lparen\"],regex:\"(function)(\\\\s+)(\"+n+\")(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"entity.name.function\",\"text\",\"punctuation.operator\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(\"+n+\")(\\\\s*)(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"text\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:\"constant.language.boolean\",regex:/(?:true|false)\\b/},{token:\"keyword\",regex:\"(?:\"+t+\")\\\\b\",next:\"regex_allowed\"},{token:[\"punctuation.operator\",\"support.function\"],regex:/(\\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\\b(?=\\()/},{token:[\"punctuation.operator\",\"support.function.dom\"],regex:/(\\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()/},{token:[\"punctuation.operator\",\"support.constant\"],regex:/(\\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\\b/},{token:[\"storage.type\",\"punctuation.operator\",\"support.function.firebug\"],regex:/(console)(\\.)(warn|info|log|error|time|timeEnd|assert)\\b/},{token:e,regex:n},{token:\"keyword.operator\",regex:/--|\\+\\+|[!$%&*+\\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=/,next:\"regex_allowed\"},{token:\"punctuation.operator\",regex:/\\?|\\:|\\,|\\;|\\./,next:\"regex_allowed\"},{token:\"paren.lparen\",regex:/[\\[({]/,next:\"regex_allowed\"},{token:\"paren.rparen\",regex:/[\\])}]/},{token:\"keyword.operator\",regex:/\\/=?/,next:\"regex_allowed\"},{token:\"comment\",regex:/^#!.*$/},{token:\"text\",regex:/\\s+/}],regex_allowed:[i.getStartRule(\"doc-start\"),{token:\"comment\",regex:\"\\\\/\\\\*\",next:\"comment_regex_allowed\"},{token:\"comment\",regex:\"\\\\/\\\\/.*$\"},{token:\"string.regexp\",regex:\"\\\\/\",next:\"regex\"},{token:\"text\",regex:\"\\\\s+\"},{token:\"empty\",regex:\"\",next:\"start\"}],regex:[{token:\"regexp.keyword.operator\",regex:\"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"},{token:\"string.regexp\",regex:\"/\\\\w*\",next:\"start\"},{token:\"invalid\",regex:/\\{\\d+,?(?:\\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/},{token:\"constant.language.escape\",regex:/\\(\\?[:=!]|\\)|{\\d+,?(?:\\d+)?}|{,\\d+}|[+*]\\?|[(|)$^+*?]/},{token:\"string.regexp\",regex:/{|[^{\\[\\/\\\\(|)$^+*?]+/},{token:\"constant.language.escape\",regex:/\\[\\^?/,next:\"regex_character_class\"},{token:\"empty\",regex:\"\",next:\"start\"}],regex_character_class:[{token:\"regexp.keyword.operator\",regex:\"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"},{token:\"constant.language.escape\",regex:\"]\",next:\"regex\"},{token:\"constant.language.escape\",regex:\"-\"},{token:\"string.regexp.charachterclass\",regex:/[^\\]\\-\\\\]+/},{token:\"empty\",regex:\"\",next:\"start\"}],function_arguments:[{token:\"variable.parameter\",regex:n},{token:\"punctuation.operator\",regex:\"[, ]+\"},{token:\"punctuation.operator\",regex:\"$\"},{token:\"empty\",regex:\"\",next:\"start\"}],comment_regex_allowed:[{token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"regex_allowed\"},{token:\"comment\",regex:\".+\"}],comment:[{token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"start\"},{token:\"comment\",regex:\".+\"}],qqstring:[{token:\"constant.language.escape\",regex:r},{token:\"string\",regex:\"\\\\\\\\$\",next:\"qqstring\"},{token:\"string\",regex:'\"|$',next:\"start\"},{token:\"string\",regex:\".|\\\\w+|\\\\s+\"}],qstring:[{token:\"constant.language.escape\",regex:r},{token:\"string\",regex:\"\\\\\\\\$\",next:\"qstring\"},{token:\"string\",regex:\"'|$\",next:\"start\"},{token:\"string\",regex:\".|\\\\w+|\\\\s+\"}]},this.embedRules(i,\"doc-\",[i.getEndRule(\"start\")])};r.inherits(o,s),t.JavaScriptHighlightRules=o}),define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text_highlight_rules\").TextHighlightRules,s=function(){this.$rules={start:[{token:\"comment.doc.tag\",regex:\"@[\\\\w\\\\d_]+\"},{token:\"comment.doc\",regex:\"\\\\s+\"},{token:\"comment.doc\",regex:\"TODO\"},{token:\"comment.doc\",regex:\"[^@\\\\*]+\"},{token:\"comment.doc\",regex:\".\"}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:\"comment.doc\",regex:\"\\\\/\\\\*(?=\\\\*)\",next:e}},s.getEndRule=function(e){return{token:\"comment.doc\",regex:\"\\\\*\\\\/\",next:e}},t.DocCommentHighlightRules=s}),define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"],function(e,t,n){var r=e(\"../range\").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\\s+$/.test(e)?/^\\s*\\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\\s*\\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\\s+)/);return t?t[1]:\"\"}}).call(i.prototype),t.MatchingBraceOutdent=i}),define(\"ace/mode/behaviour/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"../behaviour\").Behaviour,s=e(\"../../token_iterator\").TokenIterator,o=e(\"../../lib/lang\"),u=[\"text\",\"paren.rparen\",\"punctuation.operator\"],a=[\"text\",\"paren.rparen\",\"punctuation.operator\",\"comment\"],f=0,l=-1,c=\"\",h=0,p=-1,d=\"\",v=\"\",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||\"text\",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||\"text\",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||\"text\",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add(\"braces\",\"insertion\",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i==\"{\"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==\"\"&&f!==\"{\"&&n.getWrapBehavioursEnabled())return{text:\"{\"+f+\"}\",selection:!1};if(m.isSaneInsertion(n,r))return/[\\]\\}\\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,\"}\"),{text:\"{}\",selection:[1,1]}):(m.recordMaybeInsert(n,r,\"{\"),{text:\"{\",selection:[1,1]})}else if(i==\"}\"){var l=u.substring(s.column,s.column+1);if(l==\"}\"){var c=r.$findOpeningBracket(\"}\",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}else if(i==\"\\n\"||i==\"\\r\\n\"){var p=\"\";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat(\"}\",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l==\"}\"||p!==\"\"){var d=r.findMatchingBracket({row:s.row,column:s.column},\"}\");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:\"\\n\"+v+\"\\n\"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add(\"braces\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"{\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u==\"}\")return i.end.column++,i;h--}}),this.add(\"parens\",\"insertion\",function(e,t,n,r,i){if(i==\"(\"){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==\"\"&&n.getWrapBehavioursEnabled())return{text:\"(\"+o+\")\",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,\")\"),{text:\"()\",selection:[1,1]}}else if(i==\")\"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==\")\"){var l=r.$findOpeningBracket(\")\",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}}),this.add(\"parens\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"(\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==\")\")return i.end.column++,i}}),this.add(\"brackets\",\"insertion\",function(e,t,n,r,i){if(i==\"[\"){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==\"\"&&n.getWrapBehavioursEnabled())return{text:\"[\"+o+\"]\",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,\"]\"),{text:\"[]\",selection:[1,1]}}else if(i==\"]\"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==\"]\"){var l=r.$findOpeningBracket(\"]\",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}}),this.add(\"brackets\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"[\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==\"]\")return i.end.column++,i}}),this.add(\"string_dquotes\",\"insertion\",function(e,t,n,r,i){if(i=='\"'||i==\"'\"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==\"\"&&u!==\"'\"&&u!='\"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l==\"\\\\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type==\"string\"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!==\"comment\"&&(p.type!==\"string\"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type===\"string\"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:\"\",selection:[1,1]}}}}),this.add(\"string_dquotes\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='\"'||s==\"'\")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"../../range\").Range,s=e(\"./fold_mode\").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\\{|\\[)[^\\}\\]]*$|^\\s*(\\/\\*)/,this.foldingStopMarker=/^[^\\[\\{]*(\\}|\\])|^[\\s\\*]*(\\*\\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!==\"markbeginend\")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)})"
  },
  {
    "path": "public/js/ace/mode-json.js",
    "content": "define(\"ace/mode/json\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/tokenizer\",\"ace/mode/json_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\",\"ace/worker/worker_client\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text\").Mode,s=e(\"../tokenizer\").Tokenizer,o=e(\"./json_highlight_rules\").JsonHighlightRules,u=e(\"./matching_brace_outdent\").MatchingBraceOutdent,a=e(\"./behaviour/cstyle\").CstyleBehaviour,f=e(\"./folding/cstyle\").FoldMode,l=e(\"../worker/worker_client\").WorkerClient,c=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.$behaviour=new a,this.foldingRules=new f};r.inherits(c,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e==\"start\"){var i=t.match(/^.*[\\{\\(\\[]\\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new l([\"ace\"],\"ace/mode/json_worker\",\"JsonWorker\");return t.attachToDocument(e.getDocument()),t.on(\"error\",function(t){e.setAnnotations([t.data])}),t.on(\"ok\",function(){e.clearAnnotations()}),t}}.call(c.prototype),t.Mode=c}),define(\"ace/mode/json_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text_highlight_rules\").TextHighlightRules,s=function(){this.$rules={start:[{token:\"variable\",regex:'[\"](?:(?:\\\\\\\\.)|(?:[^\"\\\\\\\\]))*?[\"]\\\\s*(?=:)'},{token:\"string\",regex:'\"',next:\"string\"},{token:\"constant.numeric\",regex:\"0[xX][0-9a-fA-F]+\\\\b\"},{token:\"constant.numeric\",regex:\"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"},{token:\"constant.language.boolean\",regex:\"(?:true|false)\\\\b\"},{token:\"invalid.illegal\",regex:\"['](?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?[']\"},{token:\"invalid.illegal\",regex:\"\\\\/\\\\/.*$\"},{token:\"paren.lparen\",regex:\"[[({]\"},{token:\"paren.rparen\",regex:\"[\\\\])}]\"},{token:\"text\",regex:\"\\\\s+\"}],string:[{token:\"constant.language.escape\",regex:/\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[\"\\\\\\/bfnrt])/},{token:\"string\",regex:'[^\"\\\\\\\\]+'},{token:\"string\",regex:'\"',next:\"start\"},{token:\"string\",regex:\"\",next:\"start\"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"],function(e,t,n){var r=e(\"../range\").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\\s+$/.test(e)?/^\\s*\\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\\s*\\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\\s+)/);return t?t[1]:\"\"}}).call(i.prototype),t.MatchingBraceOutdent=i}),define(\"ace/mode/behaviour/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"../behaviour\").Behaviour,s=e(\"../../token_iterator\").TokenIterator,o=e(\"../../lib/lang\"),u=[\"text\",\"paren.rparen\",\"punctuation.operator\"],a=[\"text\",\"paren.rparen\",\"punctuation.operator\",\"comment\"],f=0,l=-1,c=\"\",h=0,p=-1,d=\"\",v=\"\",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||\"text\",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||\"text\",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||\"text\",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add(\"braces\",\"insertion\",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i==\"{\"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==\"\"&&f!==\"{\"&&n.getWrapBehavioursEnabled())return{text:\"{\"+f+\"}\",selection:!1};if(m.isSaneInsertion(n,r))return/[\\]\\}\\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,\"}\"),{text:\"{}\",selection:[1,1]}):(m.recordMaybeInsert(n,r,\"{\"),{text:\"{\",selection:[1,1]})}else if(i==\"}\"){var l=u.substring(s.column,s.column+1);if(l==\"}\"){var c=r.$findOpeningBracket(\"}\",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}else if(i==\"\\n\"||i==\"\\r\\n\"){var p=\"\";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat(\"}\",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l==\"}\"||p!==\"\"){var d=r.findMatchingBracket({row:s.row,column:s.column},\"}\");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:\"\\n\"+v+\"\\n\"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add(\"braces\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"{\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u==\"}\")return i.end.column++,i;h--}}),this.add(\"parens\",\"insertion\",function(e,t,n,r,i){if(i==\"(\"){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==\"\"&&n.getWrapBehavioursEnabled())return{text:\"(\"+o+\")\",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,\")\"),{text:\"()\",selection:[1,1]}}else if(i==\")\"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==\")\"){var l=r.$findOpeningBracket(\")\",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}}),this.add(\"parens\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"(\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==\")\")return i.end.column++,i}}),this.add(\"brackets\",\"insertion\",function(e,t,n,r,i){if(i==\"[\"){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==\"\"&&n.getWrapBehavioursEnabled())return{text:\"[\"+o+\"]\",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,\"]\"),{text:\"[]\",selection:[1,1]}}else if(i==\"]\"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==\"]\"){var l=r.$findOpeningBracket(\"]\",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}}),this.add(\"brackets\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"[\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==\"]\")return i.end.column++,i}}),this.add(\"string_dquotes\",\"insertion\",function(e,t,n,r,i){if(i=='\"'||i==\"'\"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==\"\"&&u!==\"'\"&&u!='\"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l==\"\\\\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type==\"string\"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!==\"comment\"&&(p.type!==\"string\"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type===\"string\"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:\"\",selection:[1,1]}}}}),this.add(\"string_dquotes\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='\"'||s==\"'\")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"../../range\").Range,s=e(\"./fold_mode\").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\\{|\\[)[^\\}\\]]*$|^\\s*(\\/\\*)/,this.foldingStopMarker=/^[^\\[\\{]*(\\}|\\])|^[\\s\\*]*(\\*\\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!==\"markbeginend\")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)})"
  },
  {
    "path": "public/js/ace/mode-php.js",
    "content": "define(\"ace/mode/php\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/tokenizer\",\"ace/mode/php_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/range\",\"ace/worker/worker_client\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\",\"ace/unicode\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text\").Mode,s=e(\"../tokenizer\").Tokenizer,o=e(\"./php_highlight_rules\").PhpHighlightRules,u=e(\"./php_highlight_rules\").PhpLangHighlightRules,a=e(\"./matching_brace_outdent\").MatchingBraceOutdent,f=e(\"../range\").Range,l=e(\"../worker/worker_client\").WorkerClient,c=e(\"./behaviour/cstyle\").CstyleBehaviour,h=e(\"./folding/cstyle\").FoldMode,p=e(\"../unicode\"),d=function(e){var t=e&&e.inline,n=t?u:o;this.$tokenizer=new s((new n).getRules()),this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new h};r.inherits(d,i),function(){this.tokenRe=new RegExp(\"^[\"+p.packages.L+p.packages.Mn+p.packages.Mc+p.packages.Nd+p.packages.Pc+\"_]+\",\"g\"),this.nonTokenRe=new RegExp(\"^(?:[^\"+p.packages.L+p.packages.Mn+p.packages.Mc+p.packages.Nd+p.packages.Pc+\"_]|s])+\",\"g\"),this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\\s*)#/;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new f(0,0,0,0);for(var o=n;o<=r;o++){var a=t.getLine(o),l=a.match(s);u.start.row=o,u.end.row=o,u.end.column=l[0].length,t.replace(u,l[1])}}else t.indentRows(n,r,\"#\")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type==\"comment\")return r;if(e==\"php-start\"){var u=t.match(/^.*[\\{\\(\\[\\:]\\s*$/);u&&(r+=n)}else if(e==\"php-doc-start\"){if(o!=\"php-doc-start\")return\"\";var u=t.match(/^\\s*(\\/?)\\*/);u&&(u[1]&&(r+=\" \"),r+=\"* \")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new l([\"ace\"],\"ace/mode/php_worker\",\"PhpWorker\");return t.attachToDocument(e.getDocument()),t.on(\"error\",function(t){e.setAnnotations(t.data)}),t.on(\"ok\",function(){e.clearAnnotations()}),t}}.call(d.prototype),t.Mode=d}),define(\"ace/mode/php_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/doc_comment_highlight_rules\",\"ace/mode/text_highlight_rules\",\"ace/mode/html_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"../lib/lang\"),s=e(\"./doc_comment_highlight_rules\").DocCommentHighlightRules,o=e(\"./text_highlight_rules\").TextHighlightRules,u=e(\"./html_highlight_rules\").HtmlHighlightRules,a=function(){var e=s,t=i.arrayToMap(\"abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|class_parents|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|m_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|m_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|m_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|m_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_bind_param|mysqli_bind_result|mysqli_client_encoding|mysqli_connect|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_report|mysqli_result|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_set_opt|mysqli_slave_query|mysqli_stmt|mysqli_warning|mysqlnd_ms_get_stats|mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|transliterator|traversable|trigger_error|trim|uasort|ucfirst|ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type\".split(\"|\")),n=i.arrayToMap(\"abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|public|static|switch|throw|try|use|var|while|xor\".split(\"|\")),r=i.arrayToMap(\"die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset\".split(\"|\")),o=i.arrayToMap(\"true|false|null|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__\".split(\"|\")),u=i.arrayToMap(\"$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|$http_response_header|$argc|$argv\".split(\"|\")),a=i.arrayToMap(\"key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregisterset_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|sql_regcase\".split(\"|\")),f=i.arrayToMap(\"cfunction|old_function\".split(\"|\")),l=i.arrayToMap([]);this.$rules={start:[{token:\"comment\",regex:\"\\\\/\\\\/.*$\"},{token:\"comment\",regex:\"#.*$\"},e.getStartRule(\"doc-start\"),{token:\"comment\",regex:\"\\\\/\\\\*\",next:\"comment\"},{token:\"string.regexp\",regex:\"[/](?:(?:\\\\[(?:\\\\\\\\]|[^\\\\]])+\\\\])|(?:\\\\\\\\/|[^\\\\]/]))*[/][gimy]*\\\\s*(?=[).,;]|$)\"},{token:\"string\",regex:'\"',next:\"qqstring\"},{token:\"string\",regex:\"'\",next:\"qstring\"},{token:\"constant.numeric\",regex:\"0[xX][0-9a-fA-F]+\\\\b\"},{token:\"constant.numeric\",regex:\"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"},{token:\"constant.language\",regex:\"\\\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\\\\b\"},{token:\"constant.language\",regex:\"\\\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\\\b\"},{token:function(e){return n.hasOwnProperty(e)?\"keyword\":o.hasOwnProperty(e)?\"constant.language\":u.hasOwnProperty(e)?\"variable.language\":l.hasOwnProperty(e)?\"invalid.illegal\":t.hasOwnProperty(e)?\"support.function\":e==\"debugger\"?\"invalid.deprecated\":e.match(/^(\\$[a-zA-Z][a-zA-Z0-9_]*|self|parent)$/)?\"variable\":\"identifier\"},regex:\"[a-zA-Z_$][a-zA-Z0-9_$]*\\\\b\"},{token:\"keyword.operator\",regex:\"!|\\\\$|%|&|\\\\*|\\\\-\\\\-|\\\\-|\\\\+\\\\+|\\\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\\\|\\\\||\\\\?\\\\:|\\\\*=|%=|\\\\+=|\\\\-=|&=|\\\\^=|\\\\b(?:in|instanceof|new|delete|typeof|void)\"},{token:\"paren.lparen\",regex:\"[[({]\"},{token:\"paren.rparen\",regex:\"[\\\\])}]\"},{token:\"text\",regex:\"\\\\s+\"}],comment:[{token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"start\"},{token:\"comment\",regex:\".+\"}],qqstring:[{token:\"constant.language.escape\",regex:'\\\\\\\\(?:[nrtvef\\\\\\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})'},{token:\"constant.language.escape\",regex:/\\$[\\w\\d]+(?:\\[[\\w\\d]+\\])?/},{token:\"constant.language.escape\",regex:/\\$\\{[^\"\\}]+\\}?/},{token:\"string\",regex:'\"',next:\"start\"},{token:\"string\",regex:\".+?\"}],qstring:[{token:\"constant.language.escape\",regex:\"\\\\\\\\['\\\\\\\\]\"},{token:\"string\",regex:\"'\",next:\"start\"},{token:\"string\",regex:\".+?\"}]},this.embedRules(s,\"doc-\",[s.getEndRule(\"start\")])};r.inherits(a,o);var f=function(){u.call(this);for(var e in this.$rules)this.$rules[e].unshift({token:\"support.php_tag\",regex:\"<\\\\?(?:php|\\\\=)?\",next:\"php-start\"});this.embedRules(a,\"php-\"),this.$rules[\"php-start\"].unshift({token:\"support.php_tag\",regex:\"\\\\?>\",next:\"start\"})};r.inherits(f,u),t.PhpHighlightRules=f,t.PhpLangHighlightRules=a}),define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text_highlight_rules\").TextHighlightRules,s=function(){this.$rules={start:[{token:\"comment.doc.tag\",regex:\"@[\\\\w\\\\d_]+\"},{token:\"comment.doc\",regex:\"\\\\s+\"},{token:\"comment.doc\",regex:\"TODO\"},{token:\"comment.doc\",regex:\"[^@\\\\*]+\"},{token:\"comment.doc\",regex:\".\"}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:\"comment.doc\",regex:\"\\\\/\\\\*(?=\\\\*)\",next:e}},s.getEndRule=function(e){return{token:\"comment.doc\",regex:\"\\\\*\\\\/\",next:e}},t.DocCommentHighlightRules=s}),define(\"ace/mode/html_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/css_highlight_rules\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/xml_util\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"../lib/lang\"),s=e(\"./css_highlight_rules\").CssHighlightRules,o=e(\"./javascript_highlight_rules\").JavaScriptHighlightRules,u=e(\"./xml_util\"),a=e(\"./text_highlight_rules\").TextHighlightRules,f=i.createMap({a:\"anchor\",button:\"form\",form:\"form\",img:\"image\",input:\"form\",label:\"form\",script:\"script\",select:\"form\",textarea:\"form\",style:\"style\",table:\"table\",tbody:\"table\",td:\"table\",tfoot:\"table\",th:\"table\",tr:\"table\"}),l=function(){this.$rules={start:[{token:\"text\",regex:\"<\\\\!\\\\[CDATA\\\\[\",next:\"cdata\"},{token:\"xml-pe\",regex:\"<\\\\?.*?\\\\?>\"},{token:\"comment\",regex:\"<\\\\!--\",next:\"comment\"},{token:\"xml-pe\",regex:\"<\\\\!.*?>\"},{token:\"meta.tag\",regex:\"<(?=script\\\\b)\",next:\"script\"},{token:\"meta.tag\",regex:\"<(?=style\\\\b)\",next:\"style\"},{token:\"meta.tag\",regex:\"<\\\\/?\",next:\"tag\"},{token:\"text\",regex:\"\\\\s+\"},{token:\"constant.character.entity\",regex:\"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"},{token:\"text\",regex:\"[^<]+\"}],cdata:[{token:\"text\",regex:\"\\\\]\\\\]>\",next:\"start\"},{token:\"text\",regex:\"\\\\s+\"},{token:\"text\",regex:\".+\"}],comment:[{token:\"comment\",regex:\".*?-->\",next:\"start\"},{token:\"comment\",regex:\".+\"}]},u.tag(this.$rules,\"tag\",\"start\",f),u.tag(this.$rules,\"style\",\"css-start\",f),u.tag(this.$rules,\"script\",\"js-start\",f),this.embedRules(o,\"js-\",[{token:\"comment\",regex:\"\\\\/\\\\/.*(?=<\\\\/script>)\",next:\"tag\"},{token:\"meta.tag\",regex:\"<\\\\/(?=script)\",next:\"tag\"}]),this.embedRules(s,\"css-\",[{token:\"meta.tag\",regex:\"<\\\\/(?=style)\",next:\"tag\"}])};r.inherits(l,a),t.HtmlHighlightRules=l}),define(\"ace/mode/css_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"../lib/lang\"),s=e(\"./text_highlight_rules\").TextHighlightRules,o=t.supportType=\"animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index\",u=t.supportFunction=\"rgb|rgba|url|attr|counter|counters\",a=t.supportConstant=\"absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero\",f=t.supportConstantColor=\"aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow\",l=t.supportConstantFonts=\"arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace\",c=t.numRe=\"\\\\-?(?:(?:[0-9]+)|(?:[0-9]*\\\\.[0-9]+))\",h=t.pseudoElements=\"(\\\\:+)\\\\b(after|before|first-letter|first-line|moz-selection|selection)\\\\b\",p=t.pseudoClasses=\"(:)\\\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\\\b\",d=function(){var e=this.createKeywordMapper({\"support.function\":u,\"support.constant\":a,\"support.type\":o,\"support.constant.color\":f,\"support.constant.fonts\":l},\"text\",!0),t=[{token:\"comment\",regex:\"\\\\/\\\\*\",next:\"ruleset_comment\"},{token:\"string\",regex:'[\"](?:(?:\\\\\\\\.)|(?:[^\"\\\\\\\\]))*?[\"]'},{token:\"string\",regex:\"['](?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?[']\"},{token:[\"constant.numeric\",\"keyword\"],regex:\"(\"+c+\")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\"},{token:\"constant.numeric\",regex:c},{token:\"constant.numeric\",regex:\"#[a-f0-9]{6}\"},{token:\"constant.numeric\",regex:\"#[a-f0-9]{3}\"},{token:[\"punctuation\",\"entity.other.attribute-name.pseudo-element.css\"],regex:h},{token:[\"punctuation\",\"entity.other.attribute-name.pseudo-class.css\"],regex:p},{token:e,regex:\"\\\\-?[a-zA-Z_][a-zA-Z0-9_\\\\-]*\"}],n=i.copyArray(t);n.unshift({token:\"paren.rparen\",regex:\"\\\\}\",next:\"start\"});var r=i.copyArray(t);r.unshift({token:\"paren.rparen\",regex:\"\\\\}\",next:\"media\"});var s=[{token:\"comment\",regex:\".+\"}],d=i.copyArray(s);d.unshift({token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"start\"});var v=i.copyArray(s);v.unshift({token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"media\"});var m=i.copyArray(s);m.unshift({token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"ruleset\"}),this.$rules={start:[{token:\"comment\",regex:\"\\\\/\\\\*\",next:\"comment\"},{token:\"paren.lparen\",regex:\"\\\\{\",next:\"ruleset\"},{token:\"string\",regex:\"@.*?{\",next:\"media\"},{token:\"keyword\",regex:\"#[a-z0-9-_]+\"},{token:\"variable\",regex:\"\\\\.[a-z0-9-_]+\"},{token:\"string\",regex:\":[a-z0-9-_]+\"},{token:\"constant\",regex:\"[a-z0-9-_]+\"}],media:[{token:\"comment\",regex:\"\\\\/\\\\*\",next:\"media_comment\"},{token:\"paren.lparen\",regex:\"\\\\{\",next:\"media_ruleset\"},{token:\"string\",regex:\"\\\\}\",next:\"start\"},{token:\"keyword\",regex:\"#[a-z0-9-_]+\"},{token:\"variable\",regex:\"\\\\.[a-z0-9-_]+\"},{token:\"string\",regex:\":[a-z0-9-_]+\"},{token:\"constant\",regex:\"[a-z0-9-_]+\"}],comment:d,ruleset:n,ruleset_comment:m,media_ruleset:r,media_comment:v}};r.inherits(d,s),t.CssHighlightRules=d}),define(\"ace/mode/javascript_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/doc_comment_highlight_rules\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./doc_comment_highlight_rules\").DocCommentHighlightRules,s=e(\"./text_highlight_rules\").TextHighlightRules,o=function(){var e=this.createKeywordMapper({\"variable.language\":\"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document\",keyword:\"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static\",\"storage.type\":\"const|let|var|function\",\"constant.language\":\"null|Infinity|NaN|undefined\",\"support.function\":\"alert\"},\"identifier\"),t=\"case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void\",n=\"[a-zA-Z\\\\$_¡-￿][a-zA-Z\\\\d\\\\$_¡-￿]*\\\\b\",r=\"\\\\\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)\";this.$rules={start:[{token:\"comment\",regex:/\\/\\/.*$/},i.getStartRule(\"doc-start\"),{token:\"comment\",regex:/\\/\\*/,next:\"comment\"},{token:\"string\",regex:\"'(?=.)\",next:\"qstring\"},{token:\"string\",regex:'\"(?=.)',next:\"qqstring\"},{token:\"constant.numeric\",regex:/0[xX][0-9a-fA-F]+\\b/},{token:\"constant.numeric\",regex:/[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b/},{token:[\"storage.type\",\"punctuation.operator\",\"support.function\",\"punctuation.operator\",\"entity.name.function\",\"text\",\"keyword.operator\"],regex:\"(\"+n+\")(\\\\.)(prototype)(\\\\.)(\"+n+\")(\\\\s*)(=)\",next:\"function_arguments\"},{token:[\"storage.type\",\"punctuation.operator\",\"entity.name.function\",\"text\",\"keyword.operator\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(\"+n+\")(\\\\.)(\"+n+\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"entity.name.function\",\"text\",\"keyword.operator\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(\"+n+\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"storage.type\",\"punctuation.operator\",\"entity.name.function\",\"text\",\"keyword.operator\",\"text\",\"storage.type\",\"text\",\"entity.name.function\",\"text\",\"paren.lparen\"],regex:\"(\"+n+\")(\\\\.)(\"+n+\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s+)(\\\\w+)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"storage.type\",\"text\",\"entity.name.function\",\"text\",\"paren.lparen\"],regex:\"(function)(\\\\s+)(\"+n+\")(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"entity.name.function\",\"text\",\"punctuation.operator\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(\"+n+\")(\\\\s*)(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"text\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:\"constant.language.boolean\",regex:/(?:true|false)\\b/},{token:\"keyword\",regex:\"(?:\"+t+\")\\\\b\",next:\"regex_allowed\"},{token:[\"punctuation.operator\",\"support.function\"],regex:/(\\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\\b(?=\\()/},{token:[\"punctuation.operator\",\"support.function.dom\"],regex:/(\\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()/},{token:[\"punctuation.operator\",\"support.constant\"],regex:/(\\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\\b/},{token:[\"storage.type\",\"punctuation.operator\",\"support.function.firebug\"],regex:/(console)(\\.)(warn|info|log|error|time|timeEnd|assert)\\b/},{token:e,regex:n},{token:\"keyword.operator\",regex:/--|\\+\\+|[!$%&*+\\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=/,next:\"regex_allowed\"},{token:\"punctuation.operator\",regex:/\\?|\\:|\\,|\\;|\\./,next:\"regex_allowed\"},{token:\"paren.lparen\",regex:/[\\[({]/,next:\"regex_allowed\"},{token:\"paren.rparen\",regex:/[\\])}]/},{token:\"keyword.operator\",regex:/\\/=?/,next:\"regex_allowed\"},{token:\"comment\",regex:/^#!.*$/},{token:\"text\",regex:/\\s+/}],regex_allowed:[i.getStartRule(\"doc-start\"),{token:\"comment\",regex:\"\\\\/\\\\*\",next:\"comment_regex_allowed\"},{token:\"comment\",regex:\"\\\\/\\\\/.*$\"},{token:\"string.regexp\",regex:\"\\\\/\",next:\"regex\"},{token:\"text\",regex:\"\\\\s+\"},{token:\"empty\",regex:\"\",next:\"start\"}],regex:[{token:\"regexp.keyword.operator\",regex:\"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"},{token:\"string.regexp\",regex:\"/\\\\w*\",next:\"start\"},{token:\"invalid\",regex:/\\{\\d+,?(?:\\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/},{token:\"constant.language.escape\",regex:/\\(\\?[:=!]|\\)|{\\d+,?(?:\\d+)?}|{,\\d+}|[+*]\\?|[(|)$^+*?]/},{token:\"string.regexp\",regex:/{|[^{\\[\\/\\\\(|)$^+*?]+/},{token:\"constant.language.escape\",regex:/\\[\\^?/,next:\"regex_character_class\"},{token:\"empty\",regex:\"\",next:\"start\"}],regex_character_class:[{token:\"regexp.keyword.operator\",regex:\"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"},{token:\"constant.language.escape\",regex:\"]\",next:\"regex\"},{token:\"constant.language.escape\",regex:\"-\"},{token:\"string.regexp.charachterclass\",regex:/[^\\]\\-\\\\]+/},{token:\"empty\",regex:\"\",next:\"start\"}],function_arguments:[{token:\"variable.parameter\",regex:n},{token:\"punctuation.operator\",regex:\"[, ]+\"},{token:\"punctuation.operator\",regex:\"$\"},{token:\"empty\",regex:\"\",next:\"start\"}],comment_regex_allowed:[{token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"regex_allowed\"},{token:\"comment\",regex:\".+\"}],comment:[{token:\"comment\",regex:\".*?\\\\*\\\\/\",next:\"start\"},{token:\"comment\",regex:\".+\"}],qqstring:[{token:\"constant.language.escape\",regex:r},{token:\"string\",regex:\"\\\\\\\\$\",next:\"qqstring\"},{token:\"string\",regex:'\"|$',next:\"start\"},{token:\"string\",regex:\".|\\\\w+|\\\\s+\"}],qstring:[{token:\"constant.language.escape\",regex:r},{token:\"string\",regex:\"\\\\\\\\$\",next:\"qstring\"},{token:\"string\",regex:\"'|$\",next:\"start\"},{token:\"string\",regex:\".|\\\\w+|\\\\s+\"}]},this.embedRules(i,\"doc-\",[i.getEndRule(\"start\")])};r.inherits(o,s),t.JavaScriptHighlightRules=o}),define(\"ace/mode/xml_util\",[\"require\",\"exports\",\"module\"],function(e,t,n){function r(e){return[{token:\"string\",regex:'\"',next:e+\"_qqstring\"},{token:\"string\",regex:\"'\",next:e+\"_qstring\"}]}function i(e,t){return[{token:\"string\",regex:e,next:t},{token:\"constant.language.escape\",regex:\"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"},{token:\"string\",regex:\"\\\\w+|.|\\\\s+\"}]}t.tag=function(e,t,n,s){e[t]=[{token:\"text\",regex:\"\\\\s+\"},{token:s?function(e){return s[e]?\"meta.tag.tag-name.\"+s[e]:\"meta.tag.tag-name\"}:\"meta.tag.tag-name\",regex:\"[-_a-zA-Z0-9:]+\",next:t+\"_embed_attribute_list\"},{token:\"empty\",regex:\"\",next:t+\"_embed_attribute_list\"}],e[t+\"_qstring\"]=i(\"'\",t+\"_embed_attribute_list\"),e[t+\"_qqstring\"]=i('\"',t+\"_embed_attribute_list\"),e[t+\"_embed_attribute_list\"]=[{token:\"meta.tag.r\",regex:\"/?>\",next:n},{token:\"keyword.operator\",regex:\"=\"},{token:\"entity.other.attribute-name\",regex:\"[-_a-zA-Z0-9:]+\"},{token:\"constant.numeric\",regex:\"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"},{token:\"text\",regex:\"\\\\s+\"}].concat(r(t))}}),define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"],function(e,t,n){var r=e(\"../range\").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\\s+$/.test(e)?/^\\s*\\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\\s*\\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\\s+)/);return t?t[1]:\"\"}}).call(i.prototype),t.MatchingBraceOutdent=i}),define(\"ace/mode/behaviour/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"../behaviour\").Behaviour,s=e(\"../../token_iterator\").TokenIterator,o=e(\"../../lib/lang\"),u=[\"text\",\"paren.rparen\",\"punctuation.operator\"],a=[\"text\",\"paren.rparen\",\"punctuation.operator\",\"comment\"],f=0,l=-1,c=\"\",h=0,p=-1,d=\"\",v=\"\",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||\"text\",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||\"text\",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||\"text\",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add(\"braces\",\"insertion\",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i==\"{\"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==\"\"&&f!==\"{\"&&n.getWrapBehavioursEnabled())return{text:\"{\"+f+\"}\",selection:!1};if(m.isSaneInsertion(n,r))return/[\\]\\}\\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,\"}\"),{text:\"{}\",selection:[1,1]}):(m.recordMaybeInsert(n,r,\"{\"),{text:\"{\",selection:[1,1]})}else if(i==\"}\"){var l=u.substring(s.column,s.column+1);if(l==\"}\"){var c=r.$findOpeningBracket(\"}\",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}else if(i==\"\\n\"||i==\"\\r\\n\"){var p=\"\";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat(\"}\",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l==\"}\"||p!==\"\"){var d=r.findMatchingBracket({row:s.row,column:s.column},\"}\");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:\"\\n\"+v+\"\\n\"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add(\"braces\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"{\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u==\"}\")return i.end.column++,i;h--}}),this.add(\"parens\",\"insertion\",function(e,t,n,r,i){if(i==\"(\"){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==\"\"&&n.getWrapBehavioursEnabled())return{text:\"(\"+o+\")\",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,\")\"),{text:\"()\",selection:[1,1]}}else if(i==\")\"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==\")\"){var l=r.$findOpeningBracket(\")\",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}}),this.add(\"parens\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"(\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==\")\")return i.end.column++,i}}),this.add(\"brackets\",\"insertion\",function(e,t,n,r,i){if(i==\"[\"){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==\"\"&&n.getWrapBehavioursEnabled())return{text:\"[\"+o+\"]\",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,\"]\"),{text:\"[]\",selection:[1,1]}}else if(i==\"]\"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==\"]\"){var l=r.$findOpeningBracket(\"]\",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}}),this.add(\"brackets\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"[\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==\"]\")return i.end.column++,i}}),this.add(\"string_dquotes\",\"insertion\",function(e,t,n,r,i){if(i=='\"'||i==\"'\"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==\"\"&&u!==\"'\"&&u!='\"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l==\"\\\\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type==\"string\"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!==\"comment\"&&(p.type!==\"string\"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type===\"string\"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:\"\",selection:[1,1]}}}}),this.add(\"string_dquotes\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='\"'||s==\"'\")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"../../range\").Range,s=e(\"./fold_mode\").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\\{|\\[)[^\\}\\]]*$|^\\s*(\\/\\*)/,this.foldingStopMarker=/^[^\\[\\{]*(\\}|\\])|^[\\s\\*]*(\\*\\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!==\"markbeginend\")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)})"
  },
  {
    "path": "public/js/ace/mode-sql.js",
    "content": "define(\"ace/mode/sql\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/tokenizer\",\"ace/mode/sql_highlight_rules\",\"ace/range\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text\").Mode,s=e(\"../tokenizer\").Tokenizer,o=e(\"./sql_highlight_rules\").SqlHighlightRules,u=e(\"../range\").Range,a=function(){this.$tokenizer=new s((new o).getRules())};r.inherits(a,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=[],o=/^(\\s*)--/;for(var a=n;a<=r;a++)if(!o.test(t.getLine(a))){i=!1;break}if(i){var f=new u(0,0,0,0);for(var a=n;a<=r;a++){var l=t.getLine(a),c=l.match(o);f.start.row=a,f.end.row=a,f.end.column=c[0].length,t.replace(f,c[1])}}else t.indentRows(n,r,\"--\")}}.call(a.prototype),t.Mode=a}),define(\"ace/mode/sql_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text_highlight_rules\").TextHighlightRules,s=function(){var e=\"select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc\",t=\"true|false|null\",n=\"count|min|max|avg|sum|rank|now|coalesce\",r=this.createKeywordMapper({\"support.function\":n,keyword:e,\"constant.language\":t},\"identifier\",!0);this.$rules={start:[{token:\"comment\",regex:\"--.*$\"},{token:\"string\",regex:'\".*?\"'},{token:\"string\",regex:\"'.*?'\"},{token:\"constant.numeric\",regex:\"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"},{token:r,regex:\"[a-zA-Z_$][a-zA-Z0-9_$]*\\\\b\"},{token:\"keyword.operator\",regex:\"\\\\+|\\\\-|\\\\/|\\\\/\\\\/|%|<@>|@>|<@|&|\\\\^|~|<|>|<=|=>|==|!=|<>|=\"},{token:\"paren.lparen\",regex:\"[\\\\(]\"},{token:\"paren.rparen\",regex:\"[\\\\)]\"},{token:\"text\",regex:\"\\\\s+\"}]}};r.inherits(s,i),t.SqlHighlightRules=s})"
  },
  {
    "path": "public/js/ace/mode-text.js",
    "content": ""
  },
  {
    "path": "public/js/ace/mode-xml.js",
    "content": "define(\"ace/mode/xml\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/tokenizer\",\"ace/mode/xml_highlight_rules\",\"ace/mode/behaviour/xml\",\"ace/mode/folding/xml\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text\").Mode,s=e(\"../tokenizer\").Tokenizer,o=e(\"./xml_highlight_rules\").XmlHighlightRules,u=e(\"./behaviour/xml\").XmlBehaviour,a=e(\"./folding/xml\").FoldMode,f=function(){this.$tokenizer=new s((new o).getRules()),this.$behaviour=new u,this.foldingRules=new a};r.inherits(f,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)}}.call(f.prototype),t.Mode=f}),define(\"ace/mode/xml_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/xml_util\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./xml_util\"),s=e(\"./text_highlight_rules\").TextHighlightRules,o=function(){this.$rules={start:[{token:\"text\",regex:\"<\\\\!\\\\[CDATA\\\\[\",next:\"cdata\"},{token:\"xml-pe\",regex:\"<\\\\?.*?\\\\?>\"},{token:\"comment\",regex:\"<\\\\!--\",next:\"comment\"},{token:\"xml-pe\",regex:\"<\\\\!.*?>\"},{token:\"meta.tag\",regex:\"<\\\\/?\",next:\"tag\"},{token:\"text\",regex:\"\\\\s+\"},{token:\"constant.character.entity\",regex:\"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"},{token:\"text\",regex:\"[^<]+\"}],cdata:[{token:\"text\",regex:\"\\\\]\\\\]>\",next:\"start\"},{token:\"text\",regex:\"\\\\s+\"},{token:\"text\",regex:\"(?:[^\\\\]]|\\\\](?!\\\\]>))+\"}],comment:[{token:\"comment\",regex:\".*?-->\",next:\"start\"},{token:\"comment\",regex:\".+\"}]},i.tag(this.$rules,\"tag\",\"start\")};r.inherits(o,s),t.XmlHighlightRules=o}),define(\"ace/mode/xml_util\",[\"require\",\"exports\",\"module\"],function(e,t,n){function r(e){return[{token:\"string\",regex:'\"',next:e+\"_qqstring\"},{token:\"string\",regex:\"'\",next:e+\"_qstring\"}]}function i(e,t){return[{token:\"string\",regex:e,next:t},{token:\"constant.language.escape\",regex:\"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"},{token:\"string\",regex:\"\\\\w+|.|\\\\s+\"}]}t.tag=function(e,t,n,s){e[t]=[{token:\"text\",regex:\"\\\\s+\"},{token:s?function(e){return s[e]?\"meta.tag.tag-name.\"+s[e]:\"meta.tag.tag-name\"}:\"meta.tag.tag-name\",regex:\"[-_a-zA-Z0-9:]+\",next:t+\"_embed_attribute_list\"},{token:\"empty\",regex:\"\",next:t+\"_embed_attribute_list\"}],e[t+\"_qstring\"]=i(\"'\",t+\"_embed_attribute_list\"),e[t+\"_qqstring\"]=i('\"',t+\"_embed_attribute_list\"),e[t+\"_embed_attribute_list\"]=[{token:\"meta.tag.r\",regex:\"/?>\",next:n},{token:\"keyword.operator\",regex:\"=\"},{token:\"entity.other.attribute-name\",regex:\"[-_a-zA-Z0-9:]+\"},{token:\"constant.numeric\",regex:\"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"},{token:\"text\",regex:\"\\\\s+\"}].concat(r(t))}}),define(\"ace/mode/behaviour/xml\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/mode/behaviour/cstyle\",\"ace/token_iterator\"],function(e,t,n){function u(e,t){var n=!0,r=e.type.split(\".\"),i=t.split(\".\");return i.forEach(function(e){if(r.indexOf(e)==-1)return n=!1,!1}),n}var r=e(\"../../lib/oop\"),i=e(\"../behaviour\").Behaviour,s=e(\"./cstyle\").CstyleBehaviour,o=e(\"../../token_iterator\").TokenIterator,a=function(){this.inherit(s,[\"string_dquotes\"]),this.add(\"autoclosing\",\"insertion\",function(e,t,n,r,i){if(i==\">\"){var s=n.getCursorPosition(),a=new o(r,s.row,s.column),f=a.getCurrentToken(),l=!1;if(!f||!u(f,\"meta.tag\")&&(!u(f,\"text\")||!f.value.match(\"/\"))){do f=a.stepBackward();while(f&&(u(f,\"string\")||u(f,\"keyword.operator\")||u(f,\"entity.attribute-name\")||u(f,\"text\")))}else l=!0;if(!f||!u(f,\"meta.tag-name\")||a.stepBackward().value.match(\"/\"))return;var c=f.value;if(l)var c=c.substring(0,s.column-f.start);return{text:\"></\"+c+\">\",selection:[1,1]}}}),this.add(\"autoindent\",\"insertion\",function(e,t,n,r,i){if(i==\"\\n\"){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+2);if(u==\"</\"){var a=this.$getIndent(r.doc.getLine(s.row))+r.getTabString(),f=this.$getIndent(r.doc.getLine(s.row));return{text:\"\\n\"+a+\"\\n\"+f,selection:[1,a.length,1,a.length]}}}})};r.inherits(a,i),t.XmlBehaviour=a}),define(\"ace/mode/behaviour/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"../behaviour\").Behaviour,s=e(\"../../token_iterator\").TokenIterator,o=e(\"../../lib/lang\"),u=[\"text\",\"paren.rparen\",\"punctuation.operator\"],a=[\"text\",\"paren.rparen\",\"punctuation.operator\",\"comment\"],f=0,l=-1,c=\"\",h=0,p=-1,d=\"\",v=\"\",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||\"text\",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||\"text\",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||\"text\",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add(\"braces\",\"insertion\",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i==\"{\"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==\"\"&&f!==\"{\"&&n.getWrapBehavioursEnabled())return{text:\"{\"+f+\"}\",selection:!1};if(m.isSaneInsertion(n,r))return/[\\]\\}\\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,\"}\"),{text:\"{}\",selection:[1,1]}):(m.recordMaybeInsert(n,r,\"{\"),{text:\"{\",selection:[1,1]})}else if(i==\"}\"){var l=u.substring(s.column,s.column+1);if(l==\"}\"){var c=r.$findOpeningBracket(\"}\",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}else if(i==\"\\n\"||i==\"\\r\\n\"){var p=\"\";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat(\"}\",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l==\"}\"||p!==\"\"){var d=r.findMatchingBracket({row:s.row,column:s.column},\"}\");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:\"\\n\"+v+\"\\n\"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add(\"braces\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"{\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u==\"}\")return i.end.column++,i;h--}}),this.add(\"parens\",\"insertion\",function(e,t,n,r,i){if(i==\"(\"){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==\"\"&&n.getWrapBehavioursEnabled())return{text:\"(\"+o+\")\",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,\")\"),{text:\"()\",selection:[1,1]}}else if(i==\")\"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==\")\"){var l=r.$findOpeningBracket(\")\",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}}),this.add(\"parens\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"(\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==\")\")return i.end.column++,i}}),this.add(\"brackets\",\"insertion\",function(e,t,n,r,i){if(i==\"[\"){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==\"\"&&n.getWrapBehavioursEnabled())return{text:\"[\"+o+\"]\",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,\"]\"),{text:\"[]\",selection:[1,1]}}else if(i==\"]\"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==\"]\"){var l=r.$findOpeningBracket(\"]\",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}}),this.add(\"brackets\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s==\"[\"){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==\"]\")return i.end.column++,i}}),this.add(\"string_dquotes\",\"insertion\",function(e,t,n,r,i){if(i=='\"'||i==\"'\"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==\"\"&&u!==\"'\"&&u!='\"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l==\"\\\\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type==\"string\"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!==\"comment\"&&(p.type!==\"string\"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type===\"string\"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:\"\",selection:[1,1]}}}}),this.add(\"string_dquotes\",\"deletion\",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='\"'||s==\"'\")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),define(\"ace/mode/folding/xml\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/range\",\"ace/mode/folding/fold_mode\",\"ace/token_iterator\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"../../lib/lang\"),s=e(\"../../range\").Range,o=e(\"./fold_mode\").FoldMode,u=e(\"../../token_iterator\").TokenIterator,a=t.FoldMode=function(e){o.call(this),this.voidElements=e||{}};r.inherits(a,o),function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r.closing?t==\"markbeginend\"?\"end\":\"\":!r.tagName||this.voidElements[r.tagName.toLowerCase()]?\"\":r.selfClosing?\"\":r.value.indexOf(\"/\"+r.tagName)!==-1?\"\":\"start\"},this._getFirstTagInLine=function(e,t){var n=e.getTokens(t),r=\"\";for(var s=0;s<n.length;s++){var o=n[s];o.type.indexOf(\"meta.tag\")===0?r+=o.value:r+=i.stringRepeat(\" \",o.value.length)}return this._parseTag(r)},this.tagRe=/^(\\s*)(<?(\\/?)([-_a-zA-Z0-9:!]*)\\s*(\\/?)>?)/,this._parseTag=function(e){var t=this.tagRe.exec(e),n=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:e,match:t?t[2]:\"\",closing:t?!!t[3]:!1,selfClosing:t?!!t[5]||t[2]==\"/>\":!1,tagName:t?t[4]:\"\",column:t[1]?n+t[1].length:n}},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=\"\",r;do if(t.type.indexOf(\"meta.tag\")===0){if(!r)var r={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()};n+=t.value;if(n.indexOf(\">\")!==-1){var i=this._parseTag(n);return i.start=r,i.end={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()+t.value.length},e.stepForward(),i}}while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=\"\",r;do if(t.type.indexOf(\"meta.tag\")===0){r||(r={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()+t.value.length}),n=t.value+n;if(n.indexOf(\"<\")!==-1){var i=this._parseTag(n);return i.end=r,i.start={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()},e.stepBackward(),i}}while(t=e.stepBackward());return null},this._pop=function(e,t){while(e.length){var n=e[e.length-1];if(!t||n.tagName==t.tagName)return e.pop();if(this.voidElements[t.tagName])return;if(this.voidElements[n.tagName]){e.pop();continue}return null}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r.match)return null;var i=r.closing||r.selfClosing,o=[],a;if(!i){var f=new u(e,n,r.column),l={row:n,column:r.column+r.tagName.length+2};while(a=this._readTagForward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(a.closing){this._pop(o,a);if(o.length==0)return s.fromPoints(l,a.start)}else o.push(a)}}else{var f=new u(e,n,r.column+r.match.length),c={row:n,column:r.column};while(a=this._readTagBackward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(!a.closing){this._pop(o,a);if(o.length==0)return a.start.column+=a.tagName.length+2,s.fromPoints(a.start,c)}else o.push(a)}}}}.call(a.prototype)})"
  },
  {
    "path": "public/js/ace/mode-yaml.js",
    "content": "define(\"ace/mode/yaml\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/tokenizer\",\"ace/mode/yaml_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/mode/folding/coffee\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text\").Mode,s=e(\"../tokenizer\").Tokenizer,o=e(\"./yaml_highlight_rules\").YamlHighlightRules,u=e(\"./matching_brace_outdent\").MatchingBraceOutdent,a=e(\"./folding/coffee\").FoldMode,f=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.foldingRules=new a};r.inherits(f,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e==\"start\"){var i=t.match(/^.*[\\{\\(\\[]\\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)}}.call(f.prototype),t.Mode=f}),define(\"ace/mode/yaml_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"./text_highlight_rules\").TextHighlightRules,s=function(){this.$rules={start:[{token:\"comment\",regex:\"#.*$\"},{token:\"list.markup\",regex:/^(?:-{3}|\\.{3})\\s*(?=#|$)/},{token:\"list.markup\",regex:/^\\s*[\\-?](?:$|\\s)/},{token:\"constant\",regex:\"!![\\\\w//]+\"},{token:\"constant.language\",regex:\"[&\\\\*][a-zA-Z0-9-_]+\"},{token:[\"meta.tag\",\"keyword\"],regex:/^(\\s*\\w.*?)(\\:(?:\\s+|$))/},{token:[\"meta.tag\",\"keyword\"],regex:/(\\w+?)(\\s*\\:(?:\\s+|$))/},{token:\"keyword.operator\",regex:\"<<\\\\w*:\\\\w*\"},{token:\"keyword.operator\",regex:\"-\\\\s*(?=[{])\"},{token:\"string\",regex:'[\"](?:(?:\\\\\\\\.)|(?:[^\"\\\\\\\\]))*?[\"]'},{token:\"string\",regex:\"[\\\\|>]\\\\w*\",next:\"qqstring\"},{token:\"string\",regex:\"['](?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?[']\"},{token:\"constant.numeric\",regex:/[+\\-]?[\\d_]+(?:(?:\\.[\\d_]*)?(?:[eE][+\\-]?[\\d_]+)?)?\\b/},{token:\"constant.numeric\",regex:/[+\\-]?\\.inf\\b|NaN\\b|0x[\\dA-Fa-f_]+|0b[10_]+/},{token:\"constant.language.boolean\",regex:\"(?:true|false|TRUE|FALSE|True|False|yes|no)\\\\b\"},{token:\"invalid.illegal\",regex:\"\\\\/\\\\/.*$\"},{token:\"paren.lparen\",regex:\"[[({]\"},{token:\"paren.rparen\",regex:\"[\\\\])}]\"},{token:\"text\",regex:\"\\\\s+\"},{token:\"text\",regex:\"\\\\w+\"}],qqstring:[{token:\"string\",regex:\"(?=(?:(?:\\\\\\\\.)|(?:[^:]))*?:)\",next:\"start\"},{token:\"string\",regex:\".+\"}]}};r.inherits(s,i),t.YamlHighlightRules=s}),define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"],function(e,t,n){var r=e(\"../range\").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\\s+$/.test(e)?/^\\s*\\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\\s*\\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\\s+)/);return t?t[1]:\"\"}}).call(i.prototype),t.MatchingBraceOutdent=i}),define(\"ace/mode/folding/coffee\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/folding/fold_mode\",\"ace/range\"],function(e,t,n){var r=e(\"../../lib/oop\"),i=e(\"./fold_mode\").FoldMode,s=e(\"../../range\").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!=\"#\")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!=\"#\")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\\S/),a=s.search(/\\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?\"start\":\"\",\"\";if(u==-1){if(i==a&&r[i]==\"#\"&&s[i]==\"#\")return e.foldWidgets[n-1]=\"\",e.foldWidgets[n+1]=\"\",\"start\"}else if(u==i&&r[i]==\"#\"&&o[i]==\"#\"&&e.getLine(n-2).search(/\\S/)==-1)return e.foldWidgets[n-1]=\"start\",e.foldWidgets[n+1]=\"\",\"\";return u!=-1&&u<i?e.foldWidgets[n-1]=\"start\":e.foldWidgets[n-1]=\"\",i<a?\"start\":\"\"}}.call(o.prototype)})"
  },
  {
    "path": "public/js/ace/theme-eclipse.js",
    "content": "define(\"ace/theme/eclipse\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"],function(e,t,n){t.isDark=!1,t.cssText='.ace-eclipse .ace_gutter {background: #ebebeb;border-right: 1px solid rgb(159, 159, 159);color: rgb(136, 136, 136);}.ace-eclipse .ace_print-margin {width: 1px;background: #ebebeb;}.ace-eclipse .ace_scroller {background-color: #FFFFFF;}.ace-eclipse .ace_fold {background-color: rgb(60, 76, 114);}.ace-eclipse .ace_text-layer {}.ace-eclipse .ace_cursor {border-left: 2px solid black;}.ace-eclipse .ace_storage,.ace-eclipse .ace_keyword,.ace-eclipse .ace_variable {color: rgb(127, 0, 85);}.ace-eclipse .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-eclipse .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-eclipse .ace_function {color: rgb(60, 76, 114);}.ace-eclipse .ace_string {color: rgb(42, 0, 255);}.ace-eclipse .ace_comment {color: rgb(63, 127, 95);}.ace-eclipse .ace_comment.ace_doc {color: rgb(63, 95, 191);}.ace-eclipse .ace_comment.ace_doc.ace_tag {color: rgb(127, 159, 191);}.ace-eclipse .ace_constant.ace_numeric {}.ace-eclipse .ace_tag {color: rgb(63, 127, 127);}.ace-eclipse .ace_type {color: rgb(127, 0, 127);}.ace-eclipse .ace_xml-pe {color: rgb(104, 104, 91);}.ace-eclipse .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-eclipse .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-eclipse .ace_meta.ace_tag {color:rgb(63, 127, 127);}.ace-eclipse .ace_entity.ace_other.ace_attribute-name {color:rgb(127, 0, 127);}.ace-eclipse .ace_marker-layer .ace_step {background: rgb(255, 255, 0);}.ace-eclipse .ace_marker-layer .ace_active-line {background: rgb(232, 242, 254);}.ace-eclipse .ace_marker-layer .ace_selected-word {border: 1px solid rgb(181, 213, 255);}.ace-eclipse .ace_indent-guide {background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;}',t.cssClass=\"ace-eclipse\";var r=e(\"../lib/dom\");r.importCssString(t.cssText,t.cssClass)})"
  },
  {
    "path": "public/js/ace/worker-javascript.js",
    "content": "\"no use strict\";function initBaseUrls(e){require.tlns=e}function initSender(){var e=require(null,\"ace/lib/event_emitter\").EventEmitter,t=require(null,\"ace/lib/oop\"),n=function(){};return function(){t.implement(this,e),this.callback=function(e,t){postMessage({type:\"call\",id:t,data:e})},this.emit=function(e,t){postMessage({type:\"event\",name:e,data:t})}}.call(n.prototype),new n}if(typeof window!=\"undefined\"&&window.document)throw\"atempt to load ace worker into main window instead of webWorker\";var console={log:function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:e})},error:function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:e})}},window={console:console},normalizeModule=function(e,t){if(t.indexOf(\"!\")!==-1){var n=t.split(\"!\");return normalizeModule(e,n[0])+\"!\"+normalizeModule(e,n[1])}if(t.charAt(0)==\".\"){var r=e.split(\"/\").slice(0,-1).join(\"/\");t=r+\"/\"+t;while(t.indexOf(\".\")!==-1&&i!=t){var i=t;t=t.replace(/\\/\\.\\//,\"/\").replace(/[^\\/]+\\/\\.\\.\\//,\"\")}}return t},require=function(e,t){if(!t.charAt)throw new Error(\"worker.js require() accepts only (parentId, id) as arguments\");t=normalizeModule(e,t);var n=require.modules[t];if(n)return n.initialized||(n.initialized=!0,n.exports=n.factory().exports),n.exports;var r=t.split(\"/\");r[0]=require.tlns[r[0]]||r[0];var i=r.join(\"/\")+\".js\";return require.id=t,importScripts(i),require(e,t)};require.modules={},require.tlns={};var define=function(e,t,n){arguments.length==2?(n=t,typeof e!=\"string\"&&(t=e,e=require.id)):arguments.length==1&&(n=e,e=require.id);if(e.indexOf(\"text!\")===0)return;var r=function(t,n){return require(e,t,n)};require.modules[e]={factory:function(){var e={exports:{}},t=n(r,e.exports,e);return t&&(e.exports=t),e}}},main,sender;onmessage=function(e){var t=e.data;if(t.command){if(!main[t.command])throw new Error(\"Unknown command:\"+t.command);main[t.command].apply(main,t.args)}else if(t.init){initBaseUrls(t.tlns),require(null,\"ace/lib/fixoldbrowsers\"),sender=initSender();var n=require(null,t.module)[t.classname];main=new n(sender)}else t.event&&sender&&sender._emit(t.event,t.data)},define(\"ace/lib/fixoldbrowsers\",[\"require\",\"exports\",\"module\",\"ace/lib/regexp\",\"ace/lib/es5-shim\"],function(e,t,n){e(\"./regexp\"),e(\"./es5-shim\")}),define(\"ace/lib/regexp\",[\"require\",\"exports\",\"module\"],function(e,t,n){function o(e){return(e.global?\"g\":\"\")+(e.ignoreCase?\"i\":\"\")+(e.multiline?\"m\":\"\")+(e.extended?\"x\":\"\")+(e.sticky?\"y\":\"\")}function u(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r<e.length;r++)if(e[r]===t)return r;return-1}var r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=r.exec.call(/()??/,\"\")[1]===undefined,s=function(){var e=/^/g;return r.test.call(e,\"\"),!e.lastIndex}();if(s&&i)return;RegExp.prototype.exec=function(e){var t=r.exec.apply(this,arguments),n,a;if(typeof e==\"string\"&&t){!i&&t.length>1&&u(t,\"\")>-1&&(a=RegExp(this.source,r.replace.call(o(this),\"g\",\"\")),r.replace.call(e.slice(t.index),a,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===undefined&&(t[e]=undefined)}));if(this._xregexp&&this._xregexp.captureNames)for(var f=1;f<t.length;f++)n=this._xregexp.captureNames[f-1],n&&(t[n]=t[f]);!s&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--}return t},s||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t})}),define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"],function(e,t,n){function m(e){try{return Object.defineProperty(e,\"sentinel\",{}),\"sentinel\"in e}catch(t){}}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!=\"function\")throw new TypeError;var r=o.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,u=n.apply(s,r.concat(o.call(arguments)));return u!==null&&Object(u)===u?u:s}return n.apply(t,r.concat(o.call(arguments)))};return i});var r=Function.prototype.call,i=Array.prototype,s=Object.prototype,o=i.slice,u=r.bind(s.toString),a=r.bind(s.hasOwnProperty),f,l,c,h,p;if(p=a(s,\"__defineGetter__\"))f=r.bind(s.__defineGetter__),l=r.bind(s.__defineSetter__),c=r.bind(s.__lookupGetter__),h=r.bind(s.__lookupSetter__);Array.isArray||(Array.isArray=function(t){return u(t)==\"[object Array]\"}),Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=D(this),r=arguments[1],i=0,s=n.length>>>0;if(u(t)!=\"[object Function]\")throw new TypeError;while(i<s)i in n&&t.call(r,n[i],i,n),i++}),Array.prototype.map||(Array.prototype.map=function(t){var n=D(this),r=n.length>>>0,i=Array(r),s=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var o=0;o<r;o++)o in n&&(i[o]=t.call(s,n[o],o,n));return i}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=D(this),r=n.length>>>0,i=[],s=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var o=0;o<r;o++)o in n&&t.call(s,n[o],o,n)&&i.push(n[o]);return i}),Array.prototype.every||(Array.prototype.every=function(t){var n=D(this),r=n.length>>>0,i=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var s=0;s<r;s++)if(s in n&&!t.call(i,n[s],s,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=D(this),r=n.length>>>0,i=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var s=0;s<r;s++)if(s in n&&t.call(i,n[s],s,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=D(this),r=n.length>>>0;if(u(t)!=\"[object Function]\")throw new TypeError;if(!r&&arguments.length==1)throw new TypeError;var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError}while(!0);for(;i<r;i++)i in n&&(s=t.call(void 0,s,n[i],i,n));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=D(this),r=n.length>>>0;if(u(t)!=\"[object Function]\")throw new TypeError;if(!r&&arguments.length==1)throw new TypeError;var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError}while(!0);do s in this&&(i=t.call(void 0,i,n[s],s,n));while(s--);return i}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var n=D(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=M(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(t){var n=D(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,M(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:s)});if(!Object.getOwnPropertyDescriptor){var d=\"Object.getOwnPropertyDescriptor called on a non-object: \";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!=\"object\"&&typeof t!=\"function\"||t===null)throw new TypeError(d+t);if(!a(t,n))return;var r,i,o;r={enumerable:!0,configurable:!0};if(p){var u=t.__proto__;t.__proto__=s;var i=c(t,n),o=h(t,n);t.__proto__=u;if(i||o)return i&&(r.get=i),o&&(r.set=o),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var v;Object.prototype.__proto__===null?v=function(){return{__proto__:null}}:v=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=v();else{if(typeof t!=\"object\")throw new TypeError(\"typeof prototype[\"+typeof t+\"] != 'object'\");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var g=m({}),y=typeof document==\"undefined\"||m(document.createElement(\"div\"));if(!g||!y)var b=Object.defineProperty}if(!Object.defineProperty||b){var w=\"Property description must be an object: \",E=\"Object.defineProperty called on non-object: \",S=\"getters & setters can not be defined on this javascript engine\";Object.defineProperty=function(t,n,r){if(typeof t!=\"object\"&&typeof t!=\"function\"||t===null)throw new TypeError(E+t);if(typeof r!=\"object\"&&typeof r!=\"function\"||r===null)throw new TypeError(w+r);if(b)try{return b.call(Object,t,n,r)}catch(i){}if(a(r,\"value\"))if(p&&(c(t,n)||h(t,n))){var o=t.__proto__;t.__proto__=s,delete t[n],t[n]=r.value,t.__proto__=o}else t[n]=r.value;else{if(!p)throw new TypeError(S);a(r,\"get\")&&f(t,n,r.get),a(r,\"set\")&&l(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)a(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(x){Object.freeze=function(t){return function(n){return typeof n==\"function\"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n=\"\";while(a(t,n))n+=\"?\";t[n]=!0;var r=a(t,n);return delete t[n],r});if(!Object.keys){var T=!0,N=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],C=N.length;for(var k in{toString:null})T=!1;Object.keys=function P(e){if(typeof e!=\"object\"&&typeof e!=\"function\"||e===null)throw new TypeError(\"Object.keys called on a non-object\");var P=[];for(var t in e)a(e,t)&&P.push(t);if(T)for(var n=0,r=C;n<r;n++){var i=N[n];a(e,i)&&P.push(i)}return P}}if(!Date.prototype.toISOString||(new Date(-621987552e5)).toISOString().indexOf(\"-000001\")===-1)Date.prototype.toISOString=function(){var t,n,r,i;if(!isFinite(this))throw new RangeError;t=[this.getUTCMonth()+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],i=this.getUTCFullYear(),i=(i<0?\"-\":i>9999?\"+\":\"\")+(\"00000\"+Math.abs(i)).slice(0<=i&&i<=9999?-4:-6),n=t.length;while(n--)r=t[n],r<10&&(t[n]=\"0\"+r);return i+\"-\"+t.slice(0,2).join(\"-\")+\"T\"+t.slice(2).join(\":\")+\".\"+(\"000\"+this.getUTCMilliseconds()).slice(-3)+\"Z\"};Date.now||(Date.now=function(){return(new Date).getTime()}),Date.prototype.toJSON||(Date.prototype.toJSON=function(t){if(typeof this.toISOString!=\"function\")throw new TypeError;return this.toISOString()}),Date.parse(\"+275760-09-13T00:00:00.000Z\")!==864e13&&(Date=function(e){var t=function i(t,n,r,s,o,u,a){var f=arguments.length;if(this instanceof e){var l=f==1&&String(t)===t?new e(i.parse(t)):f>=7?new e(t,n,r,s,o,u,a):f>=6?new e(t,n,r,s,o,u):f>=5?new e(t,n,r,s,o):f>=4?new e(t,n,r,s):f>=3?new e(t,n,r):f>=2?new e(t,n):f>=1?new e(t):new e;return l.constructor=i,l}return e.apply(this,arguments)},n=new RegExp(\"^(\\\\d{4}|[+-]\\\\d{6})(?:-(\\\\d{2})(?:-(\\\\d{2})(?:T(\\\\d{2}):(\\\\d{2})(?::(\\\\d{2})(?:\\\\.(\\\\d{3}))?)?(?:Z|(?:([-+])(\\\\d{2}):(\\\\d{2})))?)?)?)?$\");for(var r in e)t[r]=e[r];return t.now=e.now,t.UTC=e.UTC,t.prototype=e.prototype,t.prototype.constructor=t,t.parse=function(r){var i=n.exec(r);if(i){i.shift();for(var s=1;s<7;s++)i[s]=+(i[s]||(s<3?1:0)),s==1&&i[s]--;var o=+i.pop(),u=+i.pop(),a=i.pop(),f=0;if(a){if(u>23||o>59)return NaN;f=(u*60+o)*6e4*(a==\"+\"?-1:1)}var l=+i[0];return 0<=l&&l<=99?(i[0]=l+400,e.UTC.apply(this,i)+f-126227808e5):e.UTC.apply(this,i)+f}return e.parse.apply(this,arguments)},t}(Date));var L=\"\t\\n\u000b\\f\\r   ᠎             　\\u2028\\u2029﻿\";if(!String.prototype.trim||L.trim()){L=\"[\"+L+\"]\";var A=new RegExp(\"^\"+L+L+\"*\"),O=new RegExp(L+L+\"*$\");String.prototype.trim=function(){return String(this).replace(A,\"\").replace(O,\"\")}}var M=function(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e},_=\"a\"[0]!=\"a\",D=function(e){if(e==null)throw new TypeError;return _&&typeof e==\"string\"&&e?e.split(\"\"):Object(e)}}),define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r={};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry=this._eventRegistry||{},this._defaultHandlers=this._defaultHandlers||{};var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!=\"object\"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=function(){this.propagationStopped=!0}),t.preventDefault||(t.preventDefault=function(){this.defaultPrevented=!0});for(var i=0;i<n.length;i++){n[i](t);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t)},r.setDefaultHandler=function(e,t){this._defaultHandlers=this._defaultHandlers||{};if(this._defaultHandlers[e])throw new Error(\"The default handler for '\"+e+\"' is already set\");this._defaultHandlers[e]=t},r.on=r.addEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];n||(n=this._eventRegistry[e]=[]),n.indexOf(t)==-1&&n.push(t)},r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"],function(e,t,n){t.inherits=function(){var e=function(){};return function(t,n){e.prototype=n.prototype,t.super_=n.prototype,t.prototype=new e,t.prototype.constructor=t}}(),t.mixin=function(e,t){for(var n in t)e[n]=t[n]},t.implement=function(e,n){t.mixin(e,n)}}),define(\"ace/mode/javascript_worker\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/worker/mirror\",\"ace/mode/javascript/jshint\"],function(require,exports,module){function startRegex(e){return RegExp(\"^(\"+e.join(\"|\")+\")\")}var oop=require(\"../lib/oop\"),Mirror=require(\"../worker/mirror\").Mirror,lint=require(\"./javascript/jshint\").JSHINT,disabledWarningsRe=startRegex([\"Bad for in variable '(.+)'.\",'Missing \"use strict\"']),errorsRe=startRegex([\"Unexpected\",\"Expected \",\"Confusing (plus|minus)\",\"\\\\{a\\\\} unterminated regular expression\",\"Unclosed \",\"Unmatched \",\"Unbegun comment\",\"Bad invocation\",\"Missing space after\",\"Missing operator at\"]),infoRe=startRegex([\"Expected an assignment\",\"Bad escapement of EOL\",\"Unexpected comma\",\"Unexpected space\",\"Missing radix parameter.\",\"A leading decimal point can\",\"\\\\['{a}'\\\\] is better written in dot notation.\",\"'{a}' used out of scope\"]),JavaScriptWorker=exports.JavaScriptWorker=function(e){Mirror.call(this,e),this.setTimeout(500),this.setOptions()};oop.inherits(JavaScriptWorker,Mirror),function(){this.setOptions=function(e){this.options=e||{es5:!0,esnext:!0,devel:!0,browser:!0,node:!0,laxcomma:!0,laxbreak:!0,lastsemic:!0,onevar:!1,passfail:!1,maxerr:100,expr:!0,multistr:!0,globalstrict:!0},this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.changeOptions=function(e){oop.mixin(this.options,e),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.isValidJS=function(str){try{eval(\"throw 0;\"+str)}catch(e){if(e===0)return!0}return!1},this.onUpdate=function(){var e=this.doc.getValue();e=e.replace(/^#!.*\\n/,\"\\n\");if(!e){this.sender.emit(\"jslint\",[]);return}var t=[],n=this.isValidJS(e)?\"warning\":\"error\";lint(e,this.options);var r=lint.errors,i=!1;for(var s=0;s<r.length;s++){var o=r[s];if(!o)continue;var u=o.raw,a=\"warning\";if(u==\"Missing semicolon.\"){var f=o.evidence.substr(o.character);f=f.charAt(f.search(/\\S/)),n==\"error\"&&f&&/[\\w\\d{(['\"]/.test(f)?(o.reason='Missing \";\" before statement',a=\"error\"):a=\"info\"}else{if(disabledWarningsRe.test(u))continue;infoRe.test(u)?a=\"info\":errorsRe.test(u)?(i=!0,a=n):u==\"'{a}' is not defined.\"?a=\"warning\":u==\"'{a}' is defined but never used.\"&&(a=\"info\")}t.push({row:o.line-1,column:o.character-1,text:o.reason,type:a,raw:u}),i}this.sender.emit(\"jslint\",t)}}.call(JavaScriptWorker.prototype)}),define(\"ace/worker/mirror\",[\"require\",\"exports\",\"module\",\"ace/document\",\"ace/lib/lang\"],function(e,t,n){var r=e(\"../document\").Document,i=e(\"../lib/lang\"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(\"\"),n=this.deferredUpdate=i.deferredCall(this.onUpdate.bind(this)),s=this;e.on(\"change\",function(e){t.applyDeltas([e.data]),n.schedule(s.$timeout)})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){}}).call(s.prototype)}),define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"],function(e,t,n){var r=e(\"./lib/oop\"),i=e(\"./lib/event_emitter\").EventEmitter,s=e(\"./range\").Range,o=e(\"./anchor\").Anchor,u=function(e){this.$lines=[],e.length==0?this.$lines=[\"\"]:Array.isArray(e)?this.insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},\"aaa\".split(/a/).length==0?this.$split=function(e){return e.replace(/\\r\\n|\\r/g,\"\\n\").split(\"\\n\")}:this.$split=function(e){return e.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\\r\\n|\\r|\\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine=\"\\n\"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\"windows\":return\"\\r\\n\";case\"unix\":return\"\\n\";default:return this.$autoNewLine}},this.$autoNewLine=\"\\n\",this.$newLineMode=\"auto\",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e==\"\\r\\n\"||e==\"\\r\"||e==\"\\n\"},this.getLine=function(e){return this.$lines[e]||\"\"},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.$lines[e.start.row].substring(e.start.column,e.end.column);var t=this.getLines(e.start.row+1,e.end.row-1);return t.unshift((this.$lines[e.start.row]||\"\").substring(e.start.column)),t.push((this.$lines[e.end.row]||\"\").substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t&&(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this.insertLines(e.row,n),e=this.insertInLine(e,i||\"\")),e},this.insertLines=function(e,t){if(t.length==0)return{row:e,column:0};if(t.length>65535){var n=this.insertLines(e,t.slice(65535));t=t.slice(0,65535)}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:\"insertLines\",range:i,lines:t};return this._emit(\"change\",{data:o}),n||i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||\"\";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:\"insertText\",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._emit(\"change\",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||\"\";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:\"insertText\",range:s.fromPoints(e,r),text:t};return this._emit(\"change\",{data:i}),r},this.remove=function(e){e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this.removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:\"removeText\",range:r,text:o};return this._emit(\"change\",{data:a}),r.start},this.removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:\"removeLines\",range:n,nl:this.getNewLineCharacter(),lines:r};return this._emit(\"change\",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:\"removeText\",range:r,text:this.getNewLineCharacter()};this._emit(\"change\",{data:o})},this.replace=function(e,t){if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action==\"insertLines\"?this.insertLines(r.start.row,n.lines):n.action==\"insertText\"?this.insert(r.start,n.text):n.action==\"removeLines\"?this.removeLines(r.start.row,r.end.row-1):n.action==\"removeText\"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action==\"insertLines\"?this.removeLines(r.start.row,r.end.row-1):n.action==\"insertText\"?this.remove(r):n.action==\"removeLines\"?this.insertLines(r.start.row,n.lines):n.action==\"removeText\"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length;return i+r*o+e.column}}).call(u.prototype),t.Document=u}),define(\"ace/range\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row==e.start.row&&this.end.row==e.end.row&&this.start.column==e.start.column&&this.end.column==e.end.column},this.toString=function(){return\"Range: [\"+this.start.row+\"/\"+this.start.column+\"] -> [\"+this.end.row+\"/\"+this.end.column+\"]\"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e==\"object\"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e==\"object\"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};if(this.start.row>t)var i={row:t+1,column:0};if(this.start.row<e)var i={row:e,column:0};if(this.end.row<e)var n={row:e,column:0};return r.fromPoints(i||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var i={row:e,column:t};else var s={row:e,column:t};return r.fromPoints(i||this.start,s||this.end)},this.isEmpty=function(){return this.start.row==this.end.row&&this.start.column==this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return r.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new r(t.row,t.column,n.row,n.column)}}).call(r.prototype),r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},t.Range=r}),define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(e,t,n){var r=e(\"./lib/oop\"),i=e(\"./lib/event_emitter\").EventEmitter,s=t.Anchor=function(e,t,n){this.document=e,typeof n==\"undefined\"?this.setPosition(t.row,t.column):this.setPosition(t,n),this.$onChange=this.onChange.bind(this),e.on(\"change\",this.$onChange)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column;t.action===\"insertText\"?n.start.row===r&&n.start.column<=i?n.start.row===n.end.row?i+=n.end.column-n.start.column:(i-=n.start.column,r+=n.end.row-n.start.row):n.start.row!==n.end.row&&n.start.row<r&&(r+=n.end.row-n.start.row):t.action===\"insertLines\"?n.start.row<=r&&(r+=n.end.row-n.start.row):t.action==\"removeText\"?n.start.row==r&&n.start.column<i?n.end.column>=i?i=n.start.column:i=Math.max(0,i-(n.end.column-n.start.column)):n.start.row!==n.end.row&&n.start.row<r?(n.end.row==r&&(i=Math.max(0,i-n.end.column)+n.start.column),r-=n.end.row-n.start.row):n.end.row==r&&(r-=n.end.row-n.start.row,i=Math.max(0,i-n.end.column)+n.start.column):t.action==\"removeLines\"&&n.start.row<=r&&(n.end.row<=r?r-=n.end.row-n.start.row:(r=n.start.row,i=0)),this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._emit(\"change\",{old:i,value:r})},this.detach=function(){this.document.removeEventListener(\"change\",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"],function(e,t,n){t.stringReverse=function(e){return e.split(\"\").reverse().join(\"\")},t.stringRepeat=function(e,t){var n=\"\";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\\s\\s*/,i=/\\s\\s*$/;t.stringTrimLeft=function(e){return e.replace(r,\"\")},t.stringTrimRight=function(e){return e.replace(i,\"\")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]==\"object\"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!=\"object\")return e;var t=e.constructor();for(var n in e)typeof e[n]==\"object\"?t[n]=this.deepCopy(e[n]):t[n]=e[n];return t},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,\"\\\\$1\")},t.escapeHTML=function(e){return e.replace(/&/g,\"&#38;\").replace(/\"/g,\"&#34;\").replace(/'/g,\"&#39;\").replace(/</g,\"&#60;\")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)};return i.delay=i,i.schedule=function(e){n==null&&(n=setTimeout(r,e||0))},i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),define(\"ace/mode/javascript/jshint\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r=function(){function ot(){}function ut(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function at(e,t){i[e]===undefined&&n[e]===undefined&&bt(\"Bad option: '\"+e+\"'.\",t)}function ft(e){return Object.prototype.toString.call(e)===\"[object String]\"}function lt(e){return e>=\"a\"&&e<=\"z￿\"||e>=\"A\"&&e<=\"Z￿\"}function ct(e){return e>=\"0\"&&e<=\"9\"}function ht(e,t){return e?!e.identifier||e.value!==t?!1:!0:!1}function pt(e,t){return e.replace(/\\{([^{}]*)\\}/g,function(e,n){var r=t[n];return typeof r==\"string\"||typeof r==\"number\"?r:e})}function dt(e,t){var n;for(n in t)ut(t,n)&&!ut(r.blacklist,n)&&(e[n]=t[n])}function vt(){Object.keys(r.blacklist).forEach(function(e){delete O[e]})}function mt(){A.couch&&dt(O,a),A.rhino&&dt(O,H),A.prototypejs&&dt(O,D),A.node&&(dt(O,k),A.globalstrict=!0),A.devel&&dt(O,l),A.dojo&&dt(O,c),A.browser&&dt(O,u),A.nonstandard&&dt(O,I),A.jquery&&dt(O,w),A.mootools&&dt(O,N),A.worker&&dt(O,J),A.wsh&&dt(O,K),A.esnext&&V(),A.globalstrict&&A.strict!==!1&&(A.strict=!0),A.yui&&dt(O,Q)}function gt(e,t,n){var r=Math.floor(t/E.length*100);throw{name:\"JSHintError\",line:t,character:n,message:e+\" (\"+r+\"% scanned).\",raw:e}}function yt(e,t,n,i){return r.undefs.push([e,t,n,i])}function bt(e,t,n,i,s,o){var u,a,f;return t=t||C,t.id===\"(end)\"&&(t=z),a=t.line||0,u=t.from||0,f={id:\"(error)\",raw:e,evidence:E[a-1]||\"\",line:a,character:u,scope:r.scope,a:n,b:i,c:s,d:o},f.reason=pt(e,f),r.errors.push(f),A.passfail&&gt(\"Stopping. \",a,u),$+=1,$>=A.maxerr&&gt(\"Too many errors.\",a,u),f}function wt(e,t,n,r,i,s,o){return bt(e,{line:t,from:n},r,i,s,o)}function Et(e,t,n,r,i,s){bt(e,t,n,r,i,s)}function St(e,t,n,r,i,s,o){return Et(e,{line:t,from:n},r,i,s,o)}function xt(e,t){var n;return n={id:\"(internal)\",elem:e,value:t},r.internals.push(n),n}function Nt(e,t,n){e===\"hasOwnProperty\"&&bt(\"'hasOwnProperty' is a really bad name.\"),t===\"exception\"&&ut(h[\"(context)\"],e)&&h[e]!==!0&&!A.node&&bt(\"Value of '{a}' may be overwritten in IE.\",C,e),ut(h,e)&&!h[\"(global)\"]&&(h[e]===!0?A.latedef&&bt(\"'{a}' was used before it was defined.\",C,e):!A.shadow&&t!==\"exception\"&&bt(\"'{a}' is already defined.\",C,e)),h[e]=t,n&&(h[\"(tokens)\"][e]=n),h[\"(global)\"]?(v[e]=h,ut(m,e)&&(A.latedef&&bt(\"'{a}' was used before it was defined.\",C,e),delete m[e])):B[e]=h}function Ct(){var e=C,t=e.value,i=A.quotmark,u={},a,l,c,p,d,v,m;switch(t){case\"*/\":Et(\"Unbegun comment.\");break;case\"/*members\":case\"/*member\":t=\"/*members\",T||(T={}),l=T,A.quotmark=!1;break;case\"/*jshint\":case\"/*jslint\":l=A,c=n;break;case\"/*global\":l=u;break;default:Et(\"What?\")}p=Tt.token();e:for(;;){m=!1;for(;;){if(p.type===\"special\"&&p.value===\"*/\")break e;if(p.id!==\"(endline)\"&&p.id!==\",\")break;p=Tt.token()}t===\"/*global\"&&p.value===\"-\"&&(m=!0,p=Tt.token()),p.type!==\"(string)\"&&p.type!==\"(identifier)\"&&t!==\"/*members\"&&Et(\"Bad option.\",p),v=Tt.token();if(v.id===\":\"){v=Tt.token(),l===T&&Et(\"Expected '{a}' and instead saw '{b}'.\",p,\"*/\",\":\"),t===\"/*jshint\"&&at(p.value,p);var g=[\"maxstatements\",\"maxparams\",\"maxdepth\",\"maxcomplexity\",\"maxerr\",\"maxlen\",\"indent\"];if(g.indexOf(p.value)>-1&&(t===\"/*jshint\"||t===\"/*jslint\"))a=+v.value,(typeof a!=\"number\"||!isFinite(a)||a<=0||Math.floor(a)!==a)&&Et(\"Expected a small integer and instead saw '{a}'.\",v,v.value),p.value===\"indent\"&&(l.white=!0),l[p.value]=a;else if(p.value===\"validthis\")h[\"(global)\"]?Et(\"Option 'validthis' can't be used in a global scope.\"):v.value===\"true\"||v.value===\"false\"?l[p.value]=v.value===\"true\":Et(\"Bad option value.\",v);else if(p.value===\"quotmark\"&&t===\"/*jshint\")switch(v.value){case\"true\":l.quotmark=!0;break;case\"false\":l.quotmark=!1;break;case\"double\":case\"single\":l.quotmark=v.value;break;default:Et(\"Bad option value.\",v)}else v.value===\"true\"||v.value===\"false\"?(t===\"/*jslint\"?(d=o[p.value]||p.value,l[d]=v.value===\"true\",s[d]!==undefined&&(l[d]=!l[d])):l[p.value]=v.value===\"true\",p.value===\"newcap\"&&(l[\"(explicitNewcap)\"]=!0)):Et(\"Bad option value.\",v);p=Tt.token()}else(t===\"/*jshint\"||t===\"/*jslint\")&&Et(\"Missing option value.\",p),l[p.value]=!1,t===\"/*global\"&&m===!0&&(r.blacklist[p.value]=p.value,vt()),p=v}t===\"/*members\"&&(A.quotmark=i),dt(O,u);for(var y in u)ut(u,y)&&(f[y]=e);c&&mt()}function kt(e){var t=e||0,n=0,r;while(n<=t)r=S[n],r||(r=S[n]=Tt.token()),n+=1;return r}function Lt(t,n){switch(z.id){case\"(number)\":C.id===\".\"&&bt(\"A dot following a number can be confused with a decimal point.\",z);break;case\"-\":(C.id===\"-\"||C.id===\"--\")&&bt(\"Confusing minusses.\");break;case\"+\":(C.id===\"+\"||C.id===\"++\")&&bt(\"Confusing plusses.\")}if(z.type===\"(string)\"||z.identifier)e=z.value;t&&C.id!==t&&(n?C.id===\"(end)\"?bt(\"Unmatched '{a}'.\",n,n.id):bt(\"Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.\",C,t,n.id,n.line,C.value):(C.type!==\"(identifier)\"||C.value!==t)&&bt(\"Expected '{a}' and instead saw '{b}'.\",C,t,C.value)),_=z,z=C;for(;;){C=S.shift()||Tt.token();if(C.id===\"(end)\"||C.id===\"(error)\")return;if(C.type===\"special\")Ct();else if(C.id!==\"(endline)\")break}}function At(t,n){var r,i=!1,s=!1;C.id===\"(end)\"&&Et(\"Unexpected early end of program.\",z),Lt(),n&&(e=\"anonymous\",h[\"(verb)\"]=z.value);if(n===!0&&z.fud)r=z.fud();else{if(z.nud)r=z.nud();else{if(C.type===\"(number)\"&&z.id===\".\")return bt(\"A leading decimal point can be confused with a dot: '.{a}'.\",z,C.value),Lt(),z;Et(\"Expected an identifier and instead saw '{a}'.\",z,z.id)}while(t<C.lbp)i=z.value===\"Array\",s=z.value===\"Object\",r&&(r.value||r.first&&r.first.value)&&(r.value!==\"new\"||r.first&&r.first.value&&r.first.value===\".\")&&(i=!1,r.value!==z.value&&(s=!1)),Lt(),i&&z.id===\"(\"&&C.id===\")\"&&bt(\"Use the array literal notation [].\",z),s&&z.id===\"(\"&&C.id===\")\"&&bt(\"Use the object literal notation {}.\",z),z.led?r=z.led(r):Et(\"Expected an operator and instead saw '{a}'.\",z,z.id)}return r}function Ot(e,t){e=e||z,t=t||C,A.white&&e.character!==t.from&&e.line===t.line&&(e.from+=e.character-e.from,bt(\"Unexpected space after '{a}'.\",e,e.value))}function Mt(e,t){e=e||z,t=t||C,A.white&&(e.character!==t.from||e.line!==t.line)&&bt(\"Unexpected space before '{a}'.\",t,t.value)}function _t(e,t){e=e||z,t=t||C,A.white&&!e.comment&&e.line===t.line&&Ot(e,t)}function Dt(e,t){if(A.white){e=e||z,t=t||C;if(e.value===\";\"&&t.value===\";\")return;e.line===t.line&&e.character===t.from&&(e.from+=e.character-e.from,bt(\"Missing space after '{a}'.\",e,e.value))}}function Pt(e,t){e=e||z,t=t||C,!A.laxbreak&&e.line!==t.line?bt(\"Bad line breaking before '{a}'.\",t,t.id):A.white&&(e=e||z,t=t||C,e.character===t.from&&(e.from+=e.character-e.from,bt(\"Missing space after '{a}'.\",e,e.value)))}function Ht(e){var t;A.white&&C.id!==\"(end)\"&&(t=y+(e||0),C.from!==t&&bt(\"Expected '{a}' to have an indentation at {b} instead at {c}.\",C,C.value,t,C.from))}function Bt(e){e=e||z,e.line!==C.line&&bt(\"Line breaking error '{a}'.\",e,e.value)}function jt(){z.line!==C.line?A.laxcomma||(jt.first&&(bt(\"Comma warnings can be turned off with 'laxcomma'\"),jt.first=!1),bt(\"Bad line breaking before '{a}'.\",z,C.id)):!z.comment&&z.character!==C.from&&A.white&&(z.from+=z.character-z.from,bt(\"Unexpected space after '{a}'.\",z,z.value)),Lt(\",\"),Dt(z,C)}function Ft(e,t){var n=R[e];if(!n||typeof n!=\"object\")R[e]=n={id:e,lbp:t,value:e};return n}function It(e){return Ft(e,0)}function qt(e,t){var n=It(e);return n.identifier=n.reserved=!0,n.fud=t,n}function Rt(e,t){var n=qt(e,t);return n.block=!0,n}function Ut(e){var t=e.id.charAt(0);if(t>=\"a\"&&t<=\"z\"||t>=\"A\"&&t<=\"Z\")e.identifier=e.reserved=!0;return e}function zt(e,t){var n=Ft(e,150);return Ut(n),n.nud=typeof t==\"function\"?t:function(){this.right=At(150),this.arity=\"unary\";if(this.id===\"++\"||this.id===\"--\")A.plusplus?bt(\"Unexpected use of '{a}'.\",this,this.id):(!this.right.identifier||this.right.reserved)&&this.right.id!==\".\"&&this.right.id!==\"[\"&&bt(\"Bad operand.\",this);return this},n}function Wt(e,t){var n=It(e);return n.type=e,n.nud=t,n}function Xt(e,t){var n=Wt(e,t);return n.identifier=n.reserved=!0,n}function Vt(e,t){return Xt(e,function(){return typeof t==\"function\"&&t(this),this})}function $t(e,t,n,r){var i=Ft(e,n);return Ut(i),i.led=function(i){return r||(Pt(_,z),Dt(z,C)),e===\"in\"&&i.id===\"!\"&&bt(\"Confusing use of '{a}'.\",i,\"!\"),typeof t==\"function\"?t(i,this):(this.left=i,this.right=At(n),this)},i}function Jt(e,t){var n=Ft(e,100);return n.led=function(e){Pt(_,z),Dt(z,C);var n=At(100);return ht(e,\"NaN\")||ht(n,\"NaN\")?bt(\"Use the isNaN function to compare with NaN.\",this):t&&t.apply(this,[e,n]),e.id===\"!\"&&bt(\"Confusing use of '{a}'.\",e,\"!\"),n.id===\"!\"&&bt(\"Confusing use of '{a}'.\",n,\"!\"),this.left=e,this.right=n,this},n}function Kt(e){return e&&(e.type===\"(number)\"&&+e.value===0||e.type===\"(string)\"&&e.value===\"\"||e.type===\"null\"&&!A.eqnull||e.type===\"true\"||e.type===\"false\"||e.type===\"undefined\")}function Qt(e){return Ft(e,20).exps=!0,$t(e,function(e,t){t.left=e,O[e.value]===!1&&B[e.value][\"(global)\"]===!0?bt(\"Read only.\",e):e[\"function\"]&&bt(\"'{a}' is a function.\",e,e.value);if(e){A.esnext&&h[e.value]===\"const\"&&bt(\"Attempting to override '{a}' which is a constant\",e,e.value);if(e.id===\".\"||e.id===\"[\")return(!e.left||e.left.value===\"arguments\")&&bt(\"Bad assignment.\",t),t.right=At(19),t;if(e.identifier&&!e.reserved)return h[e.value]===\"exception\"&&bt(\"Do not assign to the exception parameter.\",e),t.right=At(19),t;e===R[\"function\"]&&bt(\"Expected an identifier in an assignment and instead saw a function invocation.\",z)}Et(\"Bad assignment.\",t)},20)}function Gt(e,t,n){var r=Ft(e,n);return Ut(r),r.led=typeof t==\"function\"?t:function(e){return A.bitwise&&bt(\"Unexpected use of '{a}'.\",this,this.id),this.left=e,this.right=At(n),this},r}function Yt(e){return Ft(e,20).exps=!0,$t(e,function(e,t){A.bitwise&&bt(\"Unexpected use of '{a}'.\",t,t.id),Dt(_,z),Dt(z,C);if(e)return e.id===\".\"||e.id===\"[\"||e.identifier&&!e.reserved?(At(19),t):(e===R[\"function\"]&&bt(\"Expected an identifier in an assignment, and instead saw a function invocation.\",z),t);Et(\"Bad assignment.\",t)},20)}function Zt(e){var t=Ft(e,150);return t.led=function(e){return A.plusplus?bt(\"Unexpected use of '{a}'.\",this,this.id):(!e.identifier||e.reserved)&&e.id!==\".\"&&e.id!==\"[\"&&bt(\"Bad operand.\",this),this.left=e,this},t}function en(e){if(C.identifier)return Lt(),z.reserved&&!A.es5&&(!e||z.value!==\"undefined\")&&bt(\"Expected an identifier and instead saw '{a}' (a reserved word).\",z,z.id),z.value}function tn(e){var t=en(e);if(t)return t;z.id===\"function\"&&C.id===\"(\"?bt(\"Missing name in function declaration.\"):Et(\"Expected an identifier and instead saw '{a}'.\",C,C.value)}function nn(e){var t=0,n;if(C.id!==\";\"||L)return;for(;;){n=kt(t);if(n.reach)return;if(n.id!==\"(endline)\"){if(n.id===\"function\"){if(!A.latedef)break;bt(\"Inner functions should be listed at the top of the outer function.\",n);break}bt(\"Unreachable '{a}' after '{b}'.\",n,n.value,e);break}t+=1}}function rn(e){var t=y,n,r=B,i=C;if(i.id===\";\"){Lt(\";\");return}i.identifier&&!i.reserved&&kt().id===\":\"&&(Lt(),Lt(\":\"),B=Object.create(r),Nt(i.value,\"label\"),!C.labelled&&C.value!==\"{\"&&bt(\"Label '{a}' on {b} statement.\",C,i.value,C.value),it.test(i.value+\":\")&&bt(\"Label '{a}' looks like a javascript url.\",i,i.value),C.label=i.value,i=C);if(i.id===\"{\"){un(!0,!0);return}e||Ht(),n=At(0,!0);if(!i.block){!A.expr&&(!n||!n.exps)?bt(\"Expected an assignment or function call and instead saw an expression.\",z):A.nonew&&n.id===\"(\"&&n.left.id===\"new\"&&bt(\"Do not use 'new' for side effects.\",i);if(C.id===\",\")return jt();C.id!==\";\"?A.asi||(!A.lastsemic||C.id!==\"}\"||C.line!==z.line)&&wt(\"Missing semicolon.\",z.line,z.character):(Ot(z,C),Lt(\";\"),Dt(z,C))}return y=t,B=r,n}function sn(e){var t=[],n;while(!C.reach&&C.id!==\"(end)\")C.id===\";\"?(n=kt(),(!n||n.id!==\"(\")&&bt(\"Unnecessary semicolon.\"),Lt(\";\")):t.push(rn(e===C.line));return t}function on(){var e,t,n;for(;;){if(C.id===\"(string)\"){t=kt(0);if(t.id===\"(endline)\"){e=1;do n=kt(e),e+=1;while(n.id===\"(endline)\");if(n.id!==\";\"){if(n.id!==\"(string)\"&&n.id!==\"(number)\"&&n.id!==\"(regexp)\"&&n.identifier!==!0&&n.id!==\"}\")break;bt(\"Missing semicolon.\",C)}else t=n}else if(t.id===\"}\")bt(\"Missing semicolon.\",t);else if(t.id!==\";\")break;Ht(),Lt(),q[z.value]&&bt('Unnecessary directive \"{a}\".',z,z.value),z.value===\"use strict\"&&(A[\"(explicitNewcap)\"]||(A.newcap=!0),A.undef=!0),q[z.value]=!0,t.id===\";\"&&Lt(\";\");continue}break}}function un(e,t,n){var r,i=g,s=y,o,u=B,a,f,l;g=e;if(!e||!A.funcscope)B=Object.create(B);Dt(z,C),a=C;var c=h[\"(metrics)\"];c.nestedBlockDepth+=1,c.verifyMaxNestedBlockDepthPerFunction();if(C.id===\"{\"){Lt(\"{\"),f=z.line;if(C.id!==\"}\"){y+=A.indent;while(!e&&C.from>y)y+=A.indent;if(n){o={};for(l in q)ut(q,l)&&(o[l]=q[l]);on(),A.strict&&h[\"(context)\"][\"(global)\"]&&!o[\"use strict\"]&&!q[\"use strict\"]&&bt('Missing \"use strict\" statement.')}r=sn(f),c.statementCount+=r.length,n&&(q=o),y-=A.indent,f!==C.line&&Ht()}else f!==C.line&&Ht();Lt(\"}\",a),y=s}else e?((!t||A.curly)&&bt(\"Expected '{a}' and instead saw '{b}'.\",C,\"{\",C.value),L=!0,y+=A.indent,r=[rn(C.line===z.line)],y-=A.indent,L=!1):Et(\"Expected '{a}' and instead saw '{b}'.\",C,\"{\",C.value);h[\"(verb)\"]=null;if(!e||!A.funcscope)B=u;return g=i,e&&A.noempty&&(!r||r.length===0)&&bt(\"Empty block.\"),c.nestedBlockDepth-=1,r}function an(e){T&&typeof T[e]!=\"boolean\"&&bt(\"Unexpected /*member '{a}'.\",z,e),typeof x[e]==\"number\"?x[e]+=1:x[e]=1}function fn(e){var t=e.value,n=e.line,r=m[t];typeof r==\"function\"&&(r=!1),r?r[r.length-1]!==n&&r.push(n):(r=[n],m[t]=r)}function ln(){var e=en(!0);return e||(C.id===\"(string)\"?(e=C.value,Lt()):C.id===\"(number)\"&&(e=C.value.toString(),Lt())),e}function cn(){var e=C,t=[],n;Lt(\"(\"),_t();if(C.id===\")\"){Lt(\")\");return}for(;;){n=tn(!0),t.push(n),Nt(n,\"unused\",z);if(C.id!==\",\")return Lt(\")\",e),_t(_,z),t;jt()}}function hn(t,n){var r,i=A,s=B;return A=Object.create(A),B=Object.create(B),h={\"(name)\":t||'\"'+e+'\"',\"(line)\":C.line,\"(character)\":C.character,\"(context)\":h,\"(breakage)\":0,\"(loopage)\":0,\"(metrics)\":pn(C),\"(scope)\":B,\"(statement)\":n,\"(tokens)\":{}},r=h,z.funct=h,d.push(h),t&&Nt(t,\"function\"),h[\"(params)\"]=cn(),h[\"(metrics)\"].verifyMaxParametersPerFunction(h[\"(params)\"]),un(!1,!1,!0),h[\"(metrics)\"].verifyMaxStatementsPerFunction(),h[\"(metrics)\"].verifyMaxComplexityPerFunction(),B=s,A=i,h[\"(last)\"]=z.line,h[\"(lastcharacter)\"]=z.character,h=h[\"(context)\"],r}function pn(e){return{statementCount:0,nestedBlockDepth:-1,ComplexityCount:1,verifyMaxStatementsPerFunction:function(){if(A.maxstatements&&this.statementCount>A.maxstatements){var t=\"Too many statements per function (\"+this.statementCount+\").\";bt(t,e)}},verifyMaxParametersPerFunction:function(t){t=t||[];if(A.maxparams&&t.length>A.maxparams){var n=\"Too many parameters per function (\"+t.length+\").\";bt(n,e)}},verifyMaxNestedBlockDepthPerFunction:function(){if(A.maxdepth&&this.nestedBlockDepth>0&&this.nestedBlockDepth===A.maxdepth+1){var e=\"Blocks are nested too deeply (\"+this.nestedBlockDepth+\").\";bt(e)}},verifyMaxComplexityPerFunction:function(){var t=A.maxcomplexity,n=this.ComplexityCount;if(t&&n>t){var r=\"Cyclomatic complexity is too high per function (\"+n+\").\";bt(r,e)}}}}function dn(){h[\"(metrics)\"].ComplexityCount+=1}function mn(){function e(){var e={},t=C;Lt(\"{\");if(C.id!==\"}\")for(;;){if(C.id===\"(end)\")Et(\"Missing '}' to match '{' from line {a}.\",C,t.line);else{if(C.id===\"}\"){bt(\"Unexpected comma.\",z);break}C.id===\",\"?Et(\"Unexpected comma.\",C):C.id!==\"(string)\"&&bt(\"Expected a string and instead saw {a}.\",C,C.value)}e[C.value]===!0?bt(\"Duplicate key '{a}'.\",C,C.value):C.value===\"__proto__\"&&!A.proto||C.value===\"__iterator__\"&&!A.iterator?bt(\"The '{a}' key may produce unexpected results.\",C,C.value):e[C.value]=!0,Lt(),Lt(\":\"),mn();if(C.id!==\",\")break;Lt(\",\")}Lt(\"}\")}function t(){var e=C;Lt(\"[\");if(C.id!==\"]\")for(;;){if(C.id===\"(end)\")Et(\"Missing ']' to match '[' from line {a}.\",C,e.line);else{if(C.id===\"]\"){bt(\"Unexpected comma.\",z);break}C.id===\",\"&&Et(\"Unexpected comma.\",C)}mn();if(C.id!==\",\")break;Lt(\",\")}Lt(\"]\")}switch(C.id){case\"{\":e();break;case\"[\":t();break;case\"true\":case\"false\":case\"null\":case\"(number)\":case\"(string)\":Lt();break;case\"-\":Lt(\"-\"),z.character!==C.from&&bt(\"Unexpected space after '-'.\",z),Ot(z,C),Lt(\"(number)\");break;default:Et(\"Expected a JSON value.\",C)}}var e,t={\"<\":!0,\"<=\":!0,\"==\":!0,\"===\":!0,\"!==\":!0,\"!=\":!0,\">\":!0,\">=\":!0,\"+\":!0,\"-\":!0,\"*\":!0,\"/\":!0,\"%\":!0},n={asi:!0,bitwise:!0,boss:!0,browser:!0,camelcase:!0,couch:!0,curly:!0,debug:!0,devel:!0,dojo:!0,eqeqeq:!0,eqnull:!0,es5:!0,esnext:!0,evil:!0,expr:!0,forin:!0,funcscope:!0,globalstrict:!0,immed:!0,iterator:!0,jquery:!0,lastsemic:!0,latedef:!0,laxbreak:!0,laxcomma:!0,loopfunc:!0,mootools:!0,multistr:!0,newcap:!0,noarg:!0,node:!0,noempty:!0,nonew:!0,nonstandard:!0,nomen:!0,onevar:!0,onecase:!0,passfail:!0,plusplus:!0,proto:!0,prototypejs:!0,regexdash:!0,regexp:!0,rhino:!0,undef:!0,unused:!0,scripturl:!0,shadow:!0,smarttabs:!0,strict:!0,sub:!0,supernew:!0,trailing:!0,validthis:!0,withstmt:!0,white:!0,worker:!0,wsh:!0,yui:!0},i={maxlen:!1,indent:!1,maxerr:!1,predef:!1,quotmark:!1,scope:!1,maxstatements:!1,maxdepth:!1,maxparams:!1,maxcomplexity:!1},s={bitwise:!0,forin:!0,newcap:!0,nomen:!0,plusplus:!0,regexp:!0,undef:!0,white:!0,eqeqeq:!0,onevar:!0},o={eqeq:\"eqeqeq\",vars:\"onevar\",windows:\"wsh\"},u={ArrayBuffer:!1,ArrayBufferView:!1,Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,DataView:!1,DOMParser:!1,defaultStatus:!1,document:!1,event:!1,FileReader:!1,Float32Array:!1,Float64Array:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Image:!1,length:!1,localStorage:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,print:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,top:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,WebSocket:!1,window:!1,Worker:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},a={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},f,l={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},c={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},h,p=[\"closure\",\"exception\",\"global\",\"label\",\"outer\",\"unused\",\"var\"],d,v,m,g,y,b,w={$:!1,jQuery:!1},E,S,x,T,N={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,Iframe:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},C,k={__filename:!1,__dirname:!1,Buffer:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1,setTimeout:!1,clearTimeout:!1,setInterval:!1,clearInterval:!1},L,A,O,M,_,D={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},P,H={defineClass:!1,deserialize:!1,gc:!1,help:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},B,j,F={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,Set:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1,WeakMap:!1},I={escape:!1,unescape:!1},q,R={},U,z,W,X,V,$,J={importScripts:!0,postMessage:!0,self:!0},K={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},Q={YUI:!1,Y:!1,YUI_config:!1},G,Y,Z,et,tt,nt,rt,it,st;(function(){G=/@cc|<\\/?|script|\\]\\s*\\]|<\\s*!|&lt/i,Y=/[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/,Z=/^\\s*([(){}\\[.,:;'\"~\\?\\]#@]|==?=?|\\/=(?!(\\S*\\/[gim]?))|\\/(\\*(jshint|jslint|members?|global)?|\\/)?|\\*[\\/=]?|\\+(?:=|\\++)?|-(?:=|-+)?|%=?|&[&=]?|\\|[|=]?|>>?>?=?|<([\\/=!]|\\!(\\[|--)?|<=?)?|\\^=?|\\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\\.[0-9]*)?([eE][+\\-]?[0-9]+)?)/,et=/[\\u0000-\\u001f&<\"\\/\\\\\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/,tt=/[\\u0000-\\u001f&<\"\\/\\\\\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,nt=/\\*\\//,rt=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,it=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\\s*:/i,st=/^\\s*\\/\\*\\s*falls\\sthrough\\s*\\*\\/\\s*$/})(),typeof Array.isArray!=\"function\"&&(Array.isArray=function(e){return Object.prototype.toString.apply(e)===\"[object Array]\"}),Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var n=this.length;for(var r=0;r<n;r++)e.call(t||this,this[r],r,this)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){if(this===null||this===undefined)throw new TypeError;var t=new Object(this),n=t.length>>>0;if(n===0)return-1;var r=0;arguments.length>0&&(r=Number(arguments[1]),r!=r?r=0:r!==0&&r!=Infinity&&r!=-Infinity&&(r=(r>0||-1)*Math.floor(Math.abs(r))));if(r>=n)return-1;var i=r>=0?r:Math.max(n-Math.abs(r),0);for(;i<n;i++)if(i in t&&t[i]===e)return i;return-1}),typeof Object.create!=\"function\"&&(Object.create=function(e){return ot.prototype=e,new ot}),typeof Object.keys!=\"function\"&&(Object.keys=function(e){var t=[],n;for(n in e)ut(e,n)&&t.push(n);return t});var Tt=function(){function s(){var e,n,s;return r>=E.length?!1:(t=1,i=E[r],r+=1,A.smarttabs?(n=i.match(/(\\/\\/)? \\t/),e=n&&!n[1]?0:-1):e=i.search(/ \\t|\\t [^\\*]/),e>=0&&wt(\"Mixed spaces and tabs.\",r,e+1),i=i.replace(/\\t/g,U),e=i.search(Y),e>=0&&wt(\"Unsafe character.\",r,e),A.maxlen&&A.maxlen<i.length&&wt(\"Line too long.\",r,i.length),s=A.trailing&&i.match(/^(.*?)\\s+$/),s&&!/^\\s+$/.test(i)&&wt(\"Trailing whitespace.\",r,s[1].length+1),!0)}function o(e,i){function u(e){if(!A.proto&&e===\"__proto__\"){wt(\"The '{a}' property is deprecated.\",r,n,e);return}if(!A.iterator&&e===\"__iterator__\"){wt(\"'{a}' is only available in JavaScript 1.7.\",r,n,e);return}var t=/^(_+.*|.*_+)$/.test(e);if(A.nomen&&t&&e!==\"_\"){if(A.node&&z.id!==\".\"&&/^(__dirname|__filename)$/.test(e))return;wt(\"Unexpected {a} in '{b}'.\",r,n,\"dangling '_'\",e);return}A.camelcase&&e.replace(/^_+/,\"\").indexOf(\"_\")>-1&&!e.match(/^[A-Z0-9_]*$/)&&wt(\"Identifier '{a}' is not in camel case.\",r,n,i)}var s,o;return e===\"(color)\"||e===\"(range)\"?o={type:e}:e===\"(punctuator)\"||e===\"(identifier)\"&&ut(R,i)?o=R[i]||R[\"(error)\"]:o=R[e],o=Object.create(o),(e===\"(string)\"||e===\"(range)\")&&!A.scripturl&&it.test(i)&&wt(\"Script URL.\",r,n),e===\"(identifier)\"&&(o.identifier=!0,u(i)),o.value=i,o.line=r,o.character=t,o.from=n,s=o.id,s!==\"(endline)\"&&(M=s&&(\"(,=:[!&|?{};\".indexOf(s.charAt(s.length-1))>=0||s===\"return\"||s===\"case\")),o}var t,n,r,i;return{init:function(e){typeof e==\"string\"?E=e.replace(/\\r\\n/g,\"\\n\").replace(/\\r/g,\"\\n\").split(\"\\n\"):E=e,E[0]&&E[0].substr(0,2)===\"#!\"&&(E[0]=\"\"),r=0,s(),n=1},range:function(e,s){var u,a=\"\";n=t,i.charAt(0)!==e&&St(\"Expected '{a}' and instead saw '{b}'.\",r,t,e,i.charAt(0));for(;;){i=i.slice(1),t+=1,u=i.charAt(0);switch(u){case\"\":St(\"Missing '{a}'.\",r,t,u);break;case s:return i=i.slice(1),t+=1,o(\"(range)\",a);case\"\\\\\":wt(\"Unexpected '{a}'.\",r,t,u)}a+=u}},token:function(){function E(e){var r=e.exec(i),s;if(r)return p=r[0].length,s=r[1],u=s.charAt(0),i=i.substr(p),n=t+p-s.length,t+=p,s}function S(e){function c(e){var n=parseInt(i.substr(a+1,e),16);a+=e,n>=32&&n<=126&&n!==34&&n!==92&&n!==39&&wt(\"Unnecessary escapement.\",r,t),t+=e,u=String.fromCharCode(n)}var u,a,f=\"\",l=!1;b&&e!=='\"'&&wt(\"Strings must use doublequote.\",r,t),A.quotmark&&(A.quotmark===\"single\"&&e!==\"'\"?wt(\"Strings must use singlequote.\",r,t):A.quotmark===\"double\"&&e!=='\"'?wt(\"Strings must use doublequote.\",r,t):A.quotmark===!0&&(P=P||e,P!==e&&wt(\"Mixed double and single quotes.\",r,t))),a=0;e:for(;;){while(a>=i.length){a=0;var h=r,p=n;if(!s()){St(\"Unclosed string.\",h,p);break e}l?l=!1:wt(\"Unclosed string.\",h,p)}u=i.charAt(a);if(u===e)return t+=1,i=i.substr(a+1),o(\"(string)\",f,e);if(u<\" \"){if(u===\"\\n\"||u===\"\\r\")break;wt(\"Control character in string: {a}.\",r,t+a,i.slice(0,a))}else if(u===\"\\\\\"){a+=1,t+=1,u=i.charAt(a),w=i.charAt(a+1);switch(u){case\"\\\\\":case'\"':case\"/\":break;case\"'\":b&&wt(\"Avoid \\\\'.\",r,t);break;case\"b\":u=\"\\b\";break;case\"f\":u=\"\\f\";break;case\"n\":u=\"\\n\";break;case\"r\":u=\"\\r\";break;case\"t\":u=\"\t\";break;case\"0\":u=\"\\0\",w>=0&&w<=7&&q[\"use strict\"]&&wt(\"Octal literals are not allowed in strict mode.\",r,t);break;case\"u\":c(4);break;case\"v\":b&&wt(\"Avoid \\\\v.\",r,t),u=\"\u000b\";break;case\"x\":b&&wt(\"Avoid \\\\x-.\",r,t),c(2);break;case\"\":l=!0;if(A.multistr){b&&wt(\"Avoid EOL escapement.\",r,t),u=\"\",t-=1;break}wt(\"Bad escapement of EOL. Use option multistr if needed.\",r,t);break;case\"!\":if(i.charAt(a-2)===\"<\")break;default:wt(\"Bad escapement.\",r,t)}}f+=u,t+=1,a+=1}}var e,u,a,f,l,c,h,p,d,v,m,g,y,w;for(;;){if(!i)return o(s()?\"(endline)\":\"(end)\",\"\");m=E(Z);if(!m){m=\"\",u=\"\";while(i&&i<\"!\")i=i.substr(1);i&&(St(\"Unexpected '{a}'.\",r,t,i.substr(0,1)),i=\"\")}else{if(lt(u)||u===\"_\"||u===\"$\")return o(\"(identifier)\",m);if(ct(u))return isFinite(Number(m))||wt(\"Bad number '{a}'.\",r,t,m),lt(i.substr(0,1))&&wt(\"Missing space after '{a}'.\",r,t,m),u===\"0\"&&(f=m.substr(1,1),ct(f)?z.id!==\".\"&&wt(\"Don't use extra leading zeros '{a}'.\",r,t,m):b&&(f===\"x\"||f===\"X\")&&wt(\"Avoid 0x-. '{a}'.\",r,t,m)),m.substr(m.length-1)===\".\"&&wt(\"A trailing decimal point can be confused with a dot '{a}'.\",r,t,m),o(\"(number)\",m);switch(m){case'\"':case\"'\":return S(m);case\"//\":i=\"\",z.comment=!0;break;case\"/*\":for(;;){h=i.search(nt);if(h>=0)break;s()||St(\"Unclosed comment.\",r,t)}i=i.substr(h+2),z.comment=!0;break;case\"/*members\":case\"/*member\":case\"/*jshint\":case\"/*jslint\":case\"/*global\":case\"*/\":return{value:m,type:\"special\",line:r,character:t,from:n};case\"\":break;case\"/\":i.charAt(0)===\"=\"&&St(\"A regular expression literal can be confused with '/='.\",r,n);if(M){l=0,a=0,p=0;for(;;){e=!0,u=i.charAt(p),p+=1;switch(u){case\"\":return St(\"Unclosed regular expression.\",r,n),gt(\"Stopping.\",r,n);case\"/\":l>0&&wt(\"{a} unterminated regular expression group(s).\",r,n+p,l),u=i.substr(0,p-1),v={g:!0,i:!0,m:!0};while(v[i.charAt(p)]===!0)v[i.charAt(p)]=!1,p+=1;return t+=p,i=i.substr(p),v=i.charAt(0),(v===\"/\"||v===\"*\")&&St(\"Confusing regular expression.\",r,n),o(\"(regexp)\",u);case\"\\\\\":u=i.charAt(p),u<\" \"?wt(\"Unexpected control character in regular expression.\",r,n+p):u===\"<\"&&wt(\"Unexpected escaped character '{a}' in regular expression.\",r,n+p,u),p+=1;break;case\"(\":l+=1,e=!1;if(i.charAt(p)===\"?\"){p+=1;switch(i.charAt(p)){case\":\":case\"=\":case\"!\":p+=1;break;default:wt(\"Expected '{a}' and instead saw '{b}'.\",r,n+p,\":\",i.charAt(p))}}else a+=1;break;case\"|\":e=!1;break;case\")\":l===0?wt(\"Unescaped '{a}'.\",r,n+p,\")\"):l-=1;break;case\" \":v=1;while(i.charAt(p)===\" \")p+=1,v+=1;v>1&&wt(\"Spaces are hard to count. Use {{a}}.\",r,n+p,v);break;case\"[\":u=i.charAt(p),u===\"^\"&&(p+=1,i.charAt(p)===\"]\"&&St(\"Unescaped '{a}'.\",r,n+p,\"^\")),u===\"]\"&&wt(\"Empty class.\",r,n+p-1),g=!1,y=!1;e:do{u=i.charAt(p),p+=1;switch(u){case\"[\":case\"^\":wt(\"Unescaped '{a}'.\",r,n+p,u),y?y=!1:g=!0;break;case\"-\":g&&!y?(g=!1,y=!0):y?y=!1:i.charAt(p)===\"]\"?y=!0:(A.regexdash!==(p===2||p===3&&i.charAt(1)===\"^\")&&wt(\"Unescaped '{a}'.\",r,n+p-1,\"-\"),g=!0);break;case\"]\":y&&!A.regexdash&&wt(\"Unescaped '{a}'.\",r,n+p-1,\"-\");break e;case\"\\\\\":u=i.charAt(p),u<\" \"?wt(\"Unexpected control character in regular expression.\",r,n+p):u===\"<\"&&wt(\"Unexpected escaped character '{a}' in regular expression.\",r,n+p,u),p+=1,/[wsd]/i.test(u)?(y&&(wt(\"Unescaped '{a}'.\",r,n+p,\"-\"),y=!1),g=!1):y?y=!1:g=!0;break;case\"/\":wt(\"Unescaped '{a}'.\",r,n+p-1,\"/\"),y?y=!1:g=!0;break;case\"<\":y?y=!1:g=!0;break;default:y?y=!1:g=!0}}while(u);break;case\".\":A.regexp&&wt(\"Insecure '{a}'.\",r,n+p,u);break;case\"]\":case\"?\":case\"{\":case\"}\":case\"+\":case\"*\":wt(\"Unescaped '{a}'.\",r,n+p,u)}if(e)switch(i.charAt(p)){case\"?\":case\"+\":case\"*\":p+=1,i.charAt(p)===\"?\"&&(p+=1);break;case\"{\":p+=1,u=i.charAt(p);if(u<\"0\"||u>\"9\"){wt(\"Expected a number and instead saw '{a}'.\",r,n+p,u);break}p+=1,d=+u;for(;;){u=i.charAt(p);if(u<\"0\"||u>\"9\")break;p+=1,d=+u+d*10}c=d;if(u===\",\"){p+=1,c=Infinity,u=i.charAt(p);if(u>=\"0\"&&u<=\"9\"){p+=1,c=+u;for(;;){u=i.charAt(p);if(u<\"0\"||u>\"9\")break;p+=1,c=+u+c*10}}}i.charAt(p)!==\"}\"?wt(\"Expected '{a}' and instead saw '{b}'.\",r,n+p,\"}\",u):p+=1,i.charAt(p)===\"?\"&&(p+=1),d>c&&wt(\"'{a}' should not be greater than '{b}'.\",r,n+p,d,c)}}return u=i.substr(0,p-1),t+=p,i=i.substr(p),o(\"(regexp)\",u)}return o(\"(punctuator)\",m);case\"#\":return o(\"(punctuator)\",m);default:return o(\"(punctuator)\",m)}}}}}}();Wt(\"(number)\",function(){return this}),Wt(\"(string)\",function(){return this}),R[\"(identifier)\"]={type:\"(identifier)\",lbp:0,identifier:!0,nud:function(){var t=this.value,n=B[t],r;typeof n==\"function\"?n=undefined:typeof n==\"boolean\"&&(r=h,h=d[0],Nt(t,\"var\"),n=h,h=r);if(h===n)switch(h[t]){case\"unused\":h[t]=\"var\";break;case\"unction\":h[t]=\"function\",this[\"function\"]=!0;break;case\"function\":this[\"function\"]=!0;break;case\"label\":bt(\"'{a}' is a statement label.\",z,t)}else if(h[\"(global)\"])A.undef&&typeof O[t]!=\"boolean\"&&(e!==\"typeof\"&&e!==\"delete\"||C&&(C.value===\".\"||C.value===\"[\"))&&yt(h,\"'{a}' is not defined.\",z,t),fn(z);else switch(h[t]){case\"closure\":case\"function\":case\"var\":case\"unused\":bt(\"'{a}' used out of scope.\",z,t);break;case\"label\":bt(\"'{a}' is a statement label.\",z,t);break;case\"outer\":case\"global\":break;default:if(n===!0)h[t]=!0;else if(n===null)bt(\"'{a}' is not allowed.\",z,t),fn(z);else if(typeof n!=\"object\")A.undef&&(e!==\"typeof\"&&e!==\"delete\"||C&&(C.value===\".\"||C.value===\"[\"))&&yt(h,\"'{a}' is not defined.\",z,t),h[t]=!0,fn(z);else switch(n[t]){case\"function\":case\"unction\":this[\"function\"]=!0,n[t]=\"closure\",h[t]=n[\"(global)\"]?\"global\":\"outer\";break;case\"var\":case\"unused\":n[t]=\"closure\",h[t]=n[\"(global)\"]?\"global\":\"outer\";break;case\"closure\":h[t]=n[\"(global)\"]?\"global\":\"outer\";break;case\"label\":bt(\"'{a}' is a statement label.\",z,t)}}return this},led:function(){Et(\"Expected an operator and instead saw '{a}'.\",C,C.value)}},Wt(\"(regexp)\",function(){return this}),It(\"(endline)\"),It(\"(begin)\"),It(\"(end)\").reach=!0,It(\"</\").reach=!0,It(\"<!\"),It(\"<!--\"),It(\"-->\"),It(\"(error)\").reach=!0,It(\"}\").reach=!0,It(\")\"),It(\"]\"),It('\"').reach=!0,It(\"'\").reach=!0,It(\";\"),It(\":\").reach=!0,It(\",\"),It(\"#\"),It(\"@\"),Xt(\"else\"),Xt(\"case\").reach=!0,Xt(\"catch\"),Xt(\"default\").reach=!0,Xt(\"finally\"),Vt(\"arguments\",function(e){q[\"use strict\"]&&h[\"(global)\"]&&bt(\"Strict violation.\",e)}),Vt(\"eval\"),Vt(\"false\"),Vt(\"Infinity\"),Vt(\"null\"),Vt(\"this\",function(e){q[\"use strict\"]&&!A.validthis&&(h[\"(statement)\"]&&h[\"(name)\"].charAt(0)>\"Z\"||h[\"(global)\"])&&bt(\"Possible strict violation.\",e)}),Vt(\"true\"),Vt(\"undefined\"),Qt(\"=\",\"assign\",20),Qt(\"+=\",\"assignadd\",20),Qt(\"-=\",\"assignsub\",20),Qt(\"*=\",\"assignmult\",20),Qt(\"/=\",\"assigndiv\",20).nud=function(){Et(\"A regular expression literal can be confused with '/='.\")},Qt(\"%=\",\"assignmod\",20),Yt(\"&=\",\"assignbitand\",20),Yt(\"|=\",\"assignbitor\",20),Yt(\"^=\",\"assignbitxor\",20),Yt(\"<<=\",\"assignshiftleft\",20),Yt(\">>=\",\"assignshiftright\",20),Yt(\">>>=\",\"assignshiftrightunsigned\",20),$t(\"?\",function(e,t){return t.left=e,t.right=At(10),Lt(\":\"),t[\"else\"]=At(10),t},30),$t(\"||\",\"or\",40),$t(\"&&\",\"and\",50),Gt(\"|\",\"bitor\",70),Gt(\"^\",\"bitxor\",80),Gt(\"&\",\"bitand\",90),Jt(\"==\",function(e,t){var n=A.eqnull&&(e.value===\"null\"||t.value===\"null\");return!n&&A.eqeqeq?bt(\"Expected '{a}' and instead saw '{b}'.\",this,\"===\",\"==\"):Kt(e)?bt(\"Use '{a}' to compare with '{b}'.\",this,\"===\",e.value):Kt(t)&&bt(\"Use '{a}' to compare with '{b}'.\",this,\"===\",t.value),this}),Jt(\"===\"),Jt(\"!=\",function(e,t){var n=A.eqnull&&(e.value===\"null\"||t.value===\"null\");return!n&&A.eqeqeq?bt(\"Expected '{a}' and instead saw '{b}'.\",this,\"!==\",\"!=\"):Kt(e)?bt(\"Use '{a}' to compare with '{b}'.\",this,\"!==\",e.value):Kt(t)&&bt(\"Use '{a}' to compare with '{b}'.\",this,\"!==\",t.value),this}),Jt(\"!==\"),Jt(\"<\"),Jt(\">\"),Jt(\"<=\"),Jt(\">=\"),Gt(\"<<\",\"shiftleft\",120),Gt(\">>\",\"shiftright\",120),Gt(\">>>\",\"shiftrightunsigned\",120),$t(\"in\",\"in\",120),$t(\"instanceof\",\"instanceof\",120),$t(\"+\",function(e,t){var n=At(130);return e&&n&&e.id===\"(string)\"&&n.id===\"(string)\"?(e.value+=n.value,e.character=n.character,!A.scripturl&&it.test(e.value)&&bt(\"JavaScript URL.\",e),e):(t.left=e,t.right=n,t)},130),zt(\"+\",\"num\"),zt(\"+++\",function(){return bt(\"Confusing pluses.\"),this.right=At(150),this.arity=\"unary\",this}),$t(\"+++\",function(e){return bt(\"Confusing pluses.\"),this.left=e,this.right=At(130),this},130),$t(\"-\",\"sub\",130),zt(\"-\",\"neg\"),zt(\"---\",function(){return bt(\"Confusing minuses.\"),this.right=At(150),this.arity=\"unary\",this}),$t(\"---\",function(e){return bt(\"Confusing minuses.\"),this.left=e,this.right=At(130),this},130),$t(\"*\",\"mult\",140),$t(\"/\",\"div\",140),$t(\"%\",\"mod\",140),Zt(\"++\",\"postinc\"),zt(\"++\",\"preinc\"),R[\"++\"].exps=!0,Zt(\"--\",\"postdec\"),zt(\"--\",\"predec\"),R[\"--\"].exps=!0,zt(\"delete\",function(){var e=At(0);return(!e||e.id!==\".\"&&e.id!==\"[\")&&bt(\"Variables should not be deleted.\"),this.first=e,this}).exps=!0,zt(\"~\",function(){return A.bitwise&&bt(\"Unexpected '{a}'.\",this,\"~\"),At(150),this}),zt(\"!\",function(){return this.right=At(150),this.arity=\"unary\",t[this.right.id]===!0&&bt(\"Confusing use of '{a}'.\",this,\"!\"),this}),zt(\"typeof\",\"typeof\"),zt(\"new\",function(){var e=At(155),t;if(e&&e.id!==\"function\")if(e.identifier){e[\"new\"]=!0;switch(e.value){case\"Number\":case\"String\":case\"Boolean\":case\"Math\":case\"JSON\":bt(\"Do not use {a} as a constructor.\",_,e.value);break;case\"Function\":A.evil||bt(\"The Function constructor is eval.\");break;case\"Date\":case\"RegExp\":break;default:e.id!==\"function\"&&(t=e.value.substr(0,1),A.newcap&&(t<\"A\"||t>\"Z\")&&!ut(v,e.value)&&bt(\"A constructor name should start with an uppercase letter.\",z))}}else e.id!==\".\"&&e.id!==\"[\"&&e.id!==\"(\"&&bt(\"Bad constructor.\",z);else A.supernew||bt(\"Weird construction. Delete 'new'.\",this);return Ot(z,C),C.id!==\"(\"&&!A.supernew&&bt(\"Missing '()' invoking a constructor.\",z,z.value),this.first=e,this}),R[\"new\"].exps=!0,zt(\"void\").exps=!0,$t(\".\",function(e,t){Ot(_,z),Mt();var n=tn();return typeof n==\"string\"&&an(n),t.left=e,t.right=n,!e||e.value!==\"arguments\"||n!==\"callee\"&&n!==\"caller\"?!A.evil&&e&&e.value===\"document\"&&(n===\"write\"||n===\"writeln\")&&bt(\"document.write can be a form of eval.\",e):A.noarg?bt(\"Avoid arguments.{a}.\",e,n):q[\"use strict\"]&&Et(\"Strict violation.\"),!A.evil&&(n===\"eval\"||n===\"execScript\")&&bt(\"eval is evil.\"),t},160,!0),$t(\"(\",function(e,t){_.id!==\"}\"&&_.id!==\")\"&&Mt(_,z),_t(),A.immed&&!e.immed&&e.id===\"function\"&&bt(\"Wrap an immediate function invocation in parentheses to assist the reader in understanding that the expression is the result of a function, and not the function itself.\");var n=0,r=[];e&&e.type===\"(identifier)\"&&e.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&\"Number String Boolean Date Object\".indexOf(e.value)===-1&&(e.value===\"Math\"?bt(\"Math is not a function.\",e):A.newcap&&bt(\"Missing 'new' prefix when invoking a constructor.\",e));if(C.id!==\")\")for(;;){r[r.length]=At(10),n+=1;if(C.id!==\",\")break;jt()}return Lt(\")\"),_t(_,z),typeof e==\"object\"&&(e.value===\"parseInt\"&&n===1&&bt(\"Missing radix parameter.\",z),A.evil||(e.value===\"eval\"||e.value===\"Function\"||e.value===\"execScript\"?(bt(\"eval is evil.\",e),r[0]&&[0].id===\"(string)\"&&xt(e,r[0].value)):!r[0]||r[0].id!==\"(string)\"||e.value!==\"setTimeout\"&&e.value!==\"setInterval\"?r[0]&&r[0].id===\"(string)\"&&e.value===\".\"&&e.left.value===\"window\"&&(e.right===\"setTimeout\"||e.right===\"setInterval\")&&(bt(\"Implied eval is evil. Pass a function instead of a string.\",e),xt(e,r[0].value)):(bt(\"Implied eval is evil. Pass a function instead of a string.\",e),xt(e,r[0].value))),!e.identifier&&e.id!==\".\"&&e.id!==\"[\"&&e.id!==\"(\"&&e.id!==\"&&\"&&e.id!==\"||\"&&e.id!==\"?\"&&bt(\"Bad invocation.\",e)),t.left=e,t},155,!0).exps=!0,zt(\"(\",function(){_t(),C.id===\"function\"&&(C.immed=!0);var e=At(0);return Lt(\")\",this),_t(_,z),A.immed&&e.id===\"function\"&&C.id!==\"(\"&&(C.id!==\".\"||kt().value!==\"call\"&&kt().value!==\"apply\")&&bt(\"Do not wrap function literals in parens unless they are to be immediately invoked.\",this),e}),$t(\"[\",function(e,t){Mt(_,z),_t();var n=At(0),r;return n&&n.type===\"(string)\"&&(!A.evil&&(n.value===\"eval\"||n.value===\"execScript\")&&bt(\"eval is evil.\",t),an(n.value),!A.sub&&rt.test(n.value)&&(r=R[n.value],(!r||!r.reserved)&&bt(\"['{a}'] is better written in dot notation.\",_,n.value))),Lt(\"]\",t),_t(_,z),t.left=e,t.right=n,t},160,!0),zt(\"[\",function(){var e=z.line!==C.line;this.first=[],e&&(y+=A.indent,C.from===y+A.indent&&(y+=A.indent));while(C.id!==\"(end)\"){while(C.id===\",\")A.es5||bt(\"Extra comma.\"),Lt(\",\");if(C.id===\"]\")break;e&&z.line!==C.line&&Ht(),this.first.push(At(10));if(C.id!==\",\")break;jt();if(C.id===\"]\"&&!A.es5){bt(\"Extra comma.\",z);break}}return e&&(y-=A.indent,Ht()),Lt(\"]\",this),this},160),function(e){e.nud=function(){function o(e,t){s[e]&&ut(s,e)?bt(\"Duplicate member '{a}'.\",C,n):s[e]={},s[e].basic=!0,s[e].basicToken=t}function u(e,t){s[e]&&ut(s,e)?(s[e].basic||s[e].setter)&&bt(\"Duplicate member '{a}'.\",C,n):s[e]={},s[e].setter=!0,s[e].setterToken=t}function a(e){s[e]&&ut(s,e)?(s[e].basic||s[e].getter)&&bt(\"Duplicate member '{a}'.\",C,n):s[e]={},s[e].getter=!0,s[e].getterToken=z}var e,t,n,r,i,s={};e=z.line!==C.line,e&&(y+=A.indent,C.from===y+A.indent&&(y+=A.indent));for(;;){if(C.id===\"}\")break;e&&Ht();if(C.value===\"get\"&&kt().id!==\":\")Lt(\"get\"),A.es5||Et(\"get/set are ES5 features.\"),n=ln(),n||Et(\"Missing property name.\"),a(n),i=C,Ot(z,C),t=hn(),r=t[\"(params)\"],r&&bt(\"Unexpected parameter '{a}' in get {b} function.\",i,r[0],n),Ot(z,C);else if(C.value===\"set\"&&kt().id!==\":\")Lt(\"set\"),A.es5||Et(\"get/set are ES5 features.\"),n=ln(),n||Et(\"Missing property name.\"),u(n,C),i=C,Ot(z,C),t=hn(),r=t[\"(params)\"],(!r||r.length!==1)&&bt(\"Expected a single parameter in set {a} function.\",i,n);else{n=ln(),o(n,C);if(typeof n!=\"string\")break;Lt(\":\"),Dt(z,C),At(10)}an(n);if(C.id!==\",\")break;jt(),C.id===\",\"?bt(\"Extra comma.\",z):C.id===\"}\"&&!A.es5&&bt(\"Extra comma.\",z)}e&&(y-=A.indent,Ht()),Lt(\"}\",this);if(A.es5)for(var f in s)ut(s,f)&&s[f].setter&&!s[f].getter&&bt(\"Setter is defined without getter.\",s[f].setterToken);return this},e.fud=function(){Et(\"Expected to see a statement and instead saw a block.\",z)}}(It(\"{\")),V=function(){var e=qt(\"const\",function(e){var t,n,r;this.first=[];for(;;){Dt(z,C),t=tn(),h[t]===\"const\"&&bt(\"const '\"+t+\"' has already been declared\"),h[\"(global)\"]&&O[t]===!1&&bt(\"Redefinition of '{a}'.\",z,t),Nt(t,\"const\");if(e)break;n=z,this.first.push(z),C.id!==\"=\"&&bt(\"const '{a}' is initialized to 'undefined'.\",z,t),C.id===\"=\"&&(Dt(z,C),Lt(\"=\"),Dt(z,C),C.id===\"undefined\"&&bt(\"It is not necessary to initialize '{a}' to 'undefined'.\",z,t),kt(0).id===\"=\"&&C.identifier&&Et(\"Constant {a} was not declared correctly.\",C,C.value),r=At(0),n.first=r);if(C.id!==\",\")break;jt()}return this});e.exps=!0};var vn=qt(\"var\",function(e){var t,n,r;h[\"(onevar)\"]&&A.onevar?bt(\"Too many var statements.\"):h[\"(global)\"]||(h[\"(onevar)\"]=!0),this.first=[];for(;;){Dt(z,C),t=tn(),A.esnext&&h[t]===\"const\"&&bt(\"const '\"+t+\"' has already been declared\"),h[\"(global)\"]&&O[t]===!1&&bt(\"Redefinition of '{a}'.\",z,t),Nt(t,\"unused\",z);if(e)break;n=z,this.first.push(z),C.id===\"=\"&&(Dt(z,C),Lt(\"=\"),Dt(z,C),C.id===\"undefined\"&&bt(\"It is not necessary to initialize '{a}' to 'undefined'.\",z,t),kt(0).id===\"=\"&&C.identifier&&Et(\"Variable {a} was not declared correctly.\",C,C.value),r=At(0),n.first=r);if(C.id!==\",\")break;jt()}return this});vn.exps=!0,Rt(\"function\",function(){g&&bt(\"Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.\",z);var e=tn();return A.esnext&&h[e]===\"const\"&&bt(\"const '\"+e+\"' has already been declared\"),Ot(z,C),Nt(e,\"unction\",z),hn(e,{statement:!0}),C.id===\"(\"&&C.line===z.line&&Et(\"Function declarations are not invocable. Wrap the whole function invocation in parens.\"),this}),zt(\"function\",function(){var e=en();return e?Ot(z,C):Dt(z,C),hn(e),!A.loopfunc&&h[\"(loopage)\"]&&bt(\"Don't make functions within a loop.\"),this}),Rt(\"if\",function(){var e=C;return dn(),Lt(\"(\"),Dt(this,e),_t(),At(20),C.id===\"=\"&&(A.boss||bt(\"Assignment in conditional expression\"),Lt(\"=\"),At(20)),Lt(\")\",e),_t(_,z),un(!0,!0),C.id===\"else\"&&(Dt(z,C),Lt(\"else\"),C.id===\"if\"||C.id===\"switch\"?rn(!0):un(!0,!0)),this}),Rt(\"try\",function(){function t(){var e=B,t;Lt(\"catch\"),Dt(z,C),Lt(\"(\"),B=Object.create(e),t=C.value,C.type!==\"(identifier)\"&&(t=null,bt(\"Expected an identifier and instead saw '{a}'.\",C,t)),Lt(),Lt(\")\"),h={\"(name)\":\"(catch)\",\"(line)\":C.line,\"(character)\":C.character,\"(context)\":h,\"(breakage)\":h[\"(breakage)\"],\"(loopage)\":h[\"(loopage)\"],\"(scope)\":B,\"(statement)\":!1,\"(metrics)\":pn(C),\"(catch)\":!0,\"(tokens)\":{}},t&&Nt(t,\"exception\"),z.funct=h,d.push(h),un(!1),B=e,h[\"(last)\"]=z.line,h[\"(lastcharacter)\"]=z.character,h=h[\"(context)\"]}var e;un(!1),C.id===\"catch\"&&(dn(),t(),e=!0);if(C.id===\"finally\"){Lt(\"finally\"),un(!1);return}return e||Et(\"Expected '{a}' and instead saw '{b}'.\",C,\"catch\",C.value),this}),Rt(\"while\",function(){var e=C;return h[\"(breakage)\"]+=1,h[\"(loopage)\"]+=1,dn(),Lt(\"(\"),Dt(this,e),_t(),At(20),C.id===\"=\"&&(A.boss||bt(\"Assignment in conditional expression\"),Lt(\"=\"),At(20)),Lt(\")\",e),_t(_,z),un(!0,!0),h[\"(breakage)\"]-=1,h[\"(loopage)\"]-=1,this}).labelled=!0,Rt(\"with\",function(){var e=C;return q[\"use strict\"]?Et(\"'with' is not allowed in strict mode.\",z):A.withstmt||bt(\"Don't use 'with'.\",z),Lt(\"(\"),Dt(this,e),_t(),At(0),Lt(\")\",e),_t(_,z),un(!0,!0),this}),Rt(\"switch\",function(){var e=C,t=!1;h[\"(breakage)\"]+=1,Lt(\"(\"),Dt(this,e),_t(),this.condition=At(20),Lt(\")\",e),_t(_,z),Dt(z,C),e=C,Lt(\"{\"),Dt(z,C),y+=A.indent,this.cases=[];for(;;)switch(C.id){case\"case\":switch(h[\"(verb)\"]){case\"break\":case\"case\":case\"continue\":case\"return\":case\"switch\":case\"throw\":break;default:st.test(E[C.line-2])||bt(\"Expected a 'break' statement before 'case'.\",z)}Ht(-A.indent),Lt(\"case\"),this.cases.push(At(20)),dn(),t=!0,Lt(\":\"),h[\"(verb)\"]=\"case\";break;case\"default\":switch(h[\"(verb)\"]){case\"break\":case\"continue\":case\"return\":case\"throw\":break;default:st.test(E[C.line-2])||bt(\"Expected a 'break' statement before 'default'.\",z)}Ht(-A.indent),Lt(\"default\"),t=!0,Lt(\":\");break;case\"}\":y-=A.indent,Ht(),Lt(\"}\",e);if(this.cases.length===1||this.condition.id===\"true\"||this.condition.id===\"false\")A.onecase||bt(\"This 'switch' should be an 'if'.\",this);h[\"(breakage)\"]-=1,h[\"(verb)\"]=undefined;return;case\"(end)\":Et(\"Missing '{a}'.\",C,\"}\");return;default:if(t)switch(z.id){case\",\":Et(\"Each value should have its own case label.\");return;case\":\":t=!1,sn();break;default:Et(\"Missing ':' on a case clause.\",z);return}else{if(z.id!==\":\"){Et(\"Expected '{a}' and instead saw '{b}'.\",C,\"case\",C.value);return}Lt(\":\"),Et(\"Unexpected '{a}'.\",z,\":\"),sn()}}}).labelled=!0,qt(\"debugger\",function(){return A.debug||bt(\"All 'debugger' statements should be removed.\"),this}).exps=!0,function(){var e=qt(\"do\",function(){h[\"(breakage)\"]+=1,h[\"(loopage)\"]+=1,dn(),this.first=un(!0),Lt(\"while\");var e=C;return Dt(z,e),Lt(\"(\"),_t(),At(20),C.id===\"=\"&&(A.boss||bt(\"Assignment in conditional expression\"),Lt(\"=\"),At(20)),Lt(\")\",e),_t(_,z),h[\"(breakage)\"]-=1,h[\"(loopage)\"]-=1,this});e.labelled=!0,e.exps=!0}(),Rt(\"for\",function(){var e,t=C;h[\"(breakage)\"]+=1,h[\"(loopage)\"]+=1,dn(),Lt(\"(\"),Dt(this,t),_t();if(kt(C.id===\"var\"?1:0).id===\"in\"){if(C.id===\"var\")Lt(\"var\"),vn.fud.call(vn,!0);else{switch(h[C.value]){case\"unused\":h[C.value]=\"var\";break;case\"var\":break;default:bt(\"Bad for in variable '{a}'.\",C,C.value)}Lt()}return Lt(\"in\"),At(20),Lt(\")\",t),e=un(!0,!0),A.forin&&e&&(e.length>1||typeof e[0]!=\"object\"||e[0].value!==\"if\")&&bt(\"The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.\",this),h[\"(breakage)\"]-=1,h[\"(loopage)\"]-=1,this}if(C.id!==\";\")if(C.id===\"var\")Lt(\"var\"),vn.fud.call(vn);else for(;;){At(0,\"for\");if(C.id!==\",\")break;jt()}Bt(z),Lt(\";\"),C.id!==\";\"&&(At(20),C.id===\"=\"&&(A.boss||bt(\"Assignment in conditional expression\"),Lt(\"=\"),At(20))),Bt(z),Lt(\";\"),C.id===\";\"&&Et(\"Expected '{a}' and instead saw '{b}'.\",C,\")\",\";\");if(C.id!==\")\")for(;;){At(0,\"for\");if(C.id!==\",\")break;jt()}return Lt(\")\",t),_t(_,z),un(!0,!0),h[\"(breakage)\"]-=1,h[\"(loopage)\"]-=1,this}).labelled=!0,qt(\"break\",function(){var e=C.value;return h[\"(breakage)\"]===0&&bt(\"Unexpected '{a}'.\",C,this.value),A.asi||Bt(this),C.id!==\";\"&&z.line===C.line&&(h[e]!==\"label\"?bt(\"'{a}' is not a statement label.\",C,e):B[e]!==h&&bt(\"'{a}' is out of scope.\",C,e),this.first=C,Lt()),nn(\"break\"),this}).exps=!0,qt(\"continue\",function(){var e=C.value;return h[\"(breakage)\"]===0&&bt(\"Unexpected '{a}'.\",C,this.value),A.asi||Bt(this),C.id!==\";\"?z.line===C.line&&(h[e]!==\"label\"?bt(\"'{a}' is not a statement label.\",C,e):B[e]!==h&&bt(\"'{a}' is out of scope.\",C,e),this.first=C,Lt()):h[\"(loopage)\"]||bt(\"Unexpected '{a}'.\",C,this.value),nn(\"continue\"),this}).exps=!0,qt(\"return\",function(){return this.line===C.line?(C.id===\"(regexp)\"&&bt(\"Wrap the /regexp/ literal in parens to disambiguate the slash operator.\"),C.id!==\";\"&&!C.reach&&(Dt(z,C),kt().value===\"=\"&&!A.boss&&wt(\"Did you mean to return a conditional instead of an assignment?\",z.line,z.character+1),this.first=At(0))):A.asi||Bt(this),nn(\"return\"),this}).exps=!0,qt(\"throw\",function(){return Bt(this),Dt(z,C),this.first=At(20),nn(\"throw\"),this}).exps=!0,Xt(\"class\"),Xt(\"const\"),Xt(\"enum\"),Xt(\"export\"),Xt(\"extends\"),Xt(\"import\"),Xt(\"super\"),Xt(\"let\"),Xt(\"yield\"),Xt(\"implements\"),Xt(\"interface\"),Xt(\"package\"),Xt(\"private\"),Xt(\"protected\"),Xt(\"public\"),Xt(\"static\");var gn=function(e,t,n){var i,s,o,u,a,l={};t&&t.scope?r.scope=t.scope:(r.errors=[],r.undefs=[],r.internals=[],r.blacklist={},r.scope=\"(main)\"),O=Object.create(F),f=Object.create(null),dt(O,n||{});if(t){i=t.predef,i&&(!Array.isArray(i)&&typeof i==\"object\"&&(i=Object.keys(i)),i.forEach(function(e){var t;e[0]===\"-\"?(t=e.slice(1),r.blacklist[t]=t):O[e]=!0})),a=Object.keys(t);for(u=0;u<a.length;u++)l[a[u]]=t[a[u]],a[u]===\"newcap\"&&t[a[u]]===!1&&(l[\"(explicitNewcap)\"]=!0),a[u]===\"indent\"&&(l.white=!0)}A=l,A.indent=A.indent||4,A.maxerr=A.maxerr||50,U=\"\";for(s=0;s<A.indent;s+=1)U+=\" \";y=1,v=Object.create(O),B=v,h={\"(global)\":!0,\"(name)\":\"(global)\",\"(scope)\":B,\"(breakage)\":0,\"(loopage)\":0,\"(tokens)\":{},\"(metrics)\":pn(C)},d=[h],X=[],j=null,x={},T=null,m={},g=!1,S=[],b=!1,$=0,E=[],W=[];if(!ft(e)&&!Array.isArray(e))return St(\"Input is neither a string nor an array of strings.\",0),!1;if(ft(e)&&/^\\s*$/g.test(e))return St(\"Input is an empty string.\",0),!1;if(e.length===0)return St(\"Input is an empty array.\",0),!1;Tt.init(e),M=!0,q={},_=z=C=R[\"(begin)\"];for(var c in t)ut(t,c)&&at(c,z);mt(),dt(O,n||{}),jt.first=!0,P=undefined;try{Lt();switch(C.id){case\"{\":case\"[\":A.laxbreak=!0,b=!0,mn();break;default:on(),q[\"use strict\"]&&!A.globalstrict&&bt('Use the function form of \"use strict\".',_),sn()}Lt(C&&C.value!==\".\"?\"(end)\":undefined);var p=function(e,t){do{if(typeof t[e]==\"string\")return t[e]===\"unused\"?t[e]=\"var\":t[e]===\"unction\"&&(t[e]=\"closure\"),!0;t=t[\"(context)\"]}while(t);return!1},w=function(e,t){if(!m[e])return;var n=[];for(var r=0;r<m[e].length;r+=1)m[e][r]!==t&&n.push(m[e][r]);n.length===0?delete m[e]:m[e]=n},N=function(e,t){var n=t.line,r=t.character;A.unused&&wt(\"'{a}' is defined but never used.\",n,r,e),W.push({name:e,line:n,character:r})},k=function(e,t){var n=e[t],r=e[\"(tokens)\"][t];if(t.charAt(0)===\"(\")return;if(n!==\"unused\"&&n!==\"unction\")return;if(e[\"(params)\"]&&e[\"(params)\"].indexOf(t)!==-1)return;N(t,r)};for(s=0;s<r.undefs.length;s+=1)o=r.undefs[s].slice(0),p(o[2].value,o[0])?w(o[2].value,o[2].line):bt.apply(bt,o.slice(1));d.forEach(function(e){for(var t in e)ut(e,t)&&k(e,t);if(!e[\"(params)\"])return;var n=e[\"(params)\"].slice(),r=n.pop(),i;while(r){i=e[r];if(r===\"undefined\")return;if(i!==\"unused\"&&i!==\"unction\")return;N(r,e[\"(tokens)\"][r]),r=n.pop()}});for(var L in f)ut(f,L)&&!ut(v,L)&&N(L,f[L])}catch(D){if(D){var H=C||{};r.errors.push({raw:D.raw,reason:D.message,line:D.line||H.line,character:D.character||H.from},null)}}if(r.scope===\"(main)\"){t=t||{};for(s=0;s<r.internals.length;s+=1)o=r.internals[s],t.scope=o.elem,gn(o.value,t,n)}return r.errors.length===0};return gn.data=function(){var e={functions:[],options:A},t=[],n=[],r,i,s,o,u,a;gn.errors.length&&(e.errors=gn.errors),b&&(e.json=!0);for(u in m)ut(m,u)&&t.push({name:u,line:m[u]});t.length>0&&(e.implieds=t),X.length>0&&(e.urls=X),a=Object.keys(B),a.length>0&&(e.globals=a);for(s=1;s<d.length;s+=1){i=d[s],r={};for(o=0;o<p.length;o+=1)r[p[o]]=[];for(o=0;o<p.length;o+=1)r[p[o]].length===0&&delete r[p[o]];r.name=i[\"(name)\"],r.param=i[\"(params)\"],r.line=i[\"(line)\"],r.character=i[\"(character)\"],r.last=i[\"(last)\"],r.lastcharacter=i[\"(lastcharacter)\"],e.functions.push(r)}W.length>0&&(e.unused=W),n=[];for(u in x)if(typeof x[u]==\"number\"){e.member=x;break}return e},gn.jshint=gn,gn}();typeof t==\"object\"&&t&&(t.JSHINT=r)})"
  },
  {
    "path": "public/js/ace/worker-json.js",
    "content": "\"no use strict\";function initBaseUrls(e){require.tlns=e}function initSender(){var e=require(null,\"ace/lib/event_emitter\").EventEmitter,t=require(null,\"ace/lib/oop\"),n=function(){};return function(){t.implement(this,e),this.callback=function(e,t){postMessage({type:\"call\",id:t,data:e})},this.emit=function(e,t){postMessage({type:\"event\",name:e,data:t})}}.call(n.prototype),new n}if(typeof window!=\"undefined\"&&window.document)throw\"atempt to load ace worker into main window instead of webWorker\";var console={log:function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:e})},error:function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:e})}},window={console:console},normalizeModule=function(e,t){if(t.indexOf(\"!\")!==-1){var n=t.split(\"!\");return normalizeModule(e,n[0])+\"!\"+normalizeModule(e,n[1])}if(t.charAt(0)==\".\"){var r=e.split(\"/\").slice(0,-1).join(\"/\");t=r+\"/\"+t;while(t.indexOf(\".\")!==-1&&i!=t){var i=t;t=t.replace(/\\/\\.\\//,\"/\").replace(/[^\\/]+\\/\\.\\.\\//,\"\")}}return t},require=function(e,t){if(!t.charAt)throw new Error(\"worker.js require() accepts only (parentId, id) as arguments\");t=normalizeModule(e,t);var n=require.modules[t];if(n)return n.initialized||(n.initialized=!0,n.exports=n.factory().exports),n.exports;var r=t.split(\"/\");r[0]=require.tlns[r[0]]||r[0];var i=r.join(\"/\")+\".js\";return require.id=t,importScripts(i),require(e,t)};require.modules={},require.tlns={};var define=function(e,t,n){arguments.length==2?(n=t,typeof e!=\"string\"&&(t=e,e=require.id)):arguments.length==1&&(n=e,e=require.id);if(e.indexOf(\"text!\")===0)return;var r=function(t,n){return require(e,t,n)};require.modules[e]={factory:function(){var e={exports:{}},t=n(r,e.exports,e);return t&&(e.exports=t),e}}},main,sender;onmessage=function(e){var t=e.data;if(t.command){if(!main[t.command])throw new Error(\"Unknown command:\"+t.command);main[t.command].apply(main,t.args)}else if(t.init){initBaseUrls(t.tlns),require(null,\"ace/lib/fixoldbrowsers\"),sender=initSender();var n=require(null,t.module)[t.classname];main=new n(sender)}else t.event&&sender&&sender._emit(t.event,t.data)},define(\"ace/lib/fixoldbrowsers\",[\"require\",\"exports\",\"module\",\"ace/lib/regexp\",\"ace/lib/es5-shim\"],function(e,t,n){e(\"./regexp\"),e(\"./es5-shim\")}),define(\"ace/lib/regexp\",[\"require\",\"exports\",\"module\"],function(e,t,n){function o(e){return(e.global?\"g\":\"\")+(e.ignoreCase?\"i\":\"\")+(e.multiline?\"m\":\"\")+(e.extended?\"x\":\"\")+(e.sticky?\"y\":\"\")}function u(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r<e.length;r++)if(e[r]===t)return r;return-1}var r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=r.exec.call(/()??/,\"\")[1]===undefined,s=function(){var e=/^/g;return r.test.call(e,\"\"),!e.lastIndex}();if(s&&i)return;RegExp.prototype.exec=function(e){var t=r.exec.apply(this,arguments),n,a;if(typeof e==\"string\"&&t){!i&&t.length>1&&u(t,\"\")>-1&&(a=RegExp(this.source,r.replace.call(o(this),\"g\",\"\")),r.replace.call(e.slice(t.index),a,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===undefined&&(t[e]=undefined)}));if(this._xregexp&&this._xregexp.captureNames)for(var f=1;f<t.length;f++)n=this._xregexp.captureNames[f-1],n&&(t[n]=t[f]);!s&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--}return t},s||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t})}),define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"],function(e,t,n){function m(e){try{return Object.defineProperty(e,\"sentinel\",{}),\"sentinel\"in e}catch(t){}}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!=\"function\")throw new TypeError;var r=o.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,u=n.apply(s,r.concat(o.call(arguments)));return u!==null&&Object(u)===u?u:s}return n.apply(t,r.concat(o.call(arguments)))};return i});var r=Function.prototype.call,i=Array.prototype,s=Object.prototype,o=i.slice,u=r.bind(s.toString),a=r.bind(s.hasOwnProperty),f,l,c,h,p;if(p=a(s,\"__defineGetter__\"))f=r.bind(s.__defineGetter__),l=r.bind(s.__defineSetter__),c=r.bind(s.__lookupGetter__),h=r.bind(s.__lookupSetter__);Array.isArray||(Array.isArray=function(t){return u(t)==\"[object Array]\"}),Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=D(this),r=arguments[1],i=0,s=n.length>>>0;if(u(t)!=\"[object Function]\")throw new TypeError;while(i<s)i in n&&t.call(r,n[i],i,n),i++}),Array.prototype.map||(Array.prototype.map=function(t){var n=D(this),r=n.length>>>0,i=Array(r),s=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var o=0;o<r;o++)o in n&&(i[o]=t.call(s,n[o],o,n));return i}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=D(this),r=n.length>>>0,i=[],s=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var o=0;o<r;o++)o in n&&t.call(s,n[o],o,n)&&i.push(n[o]);return i}),Array.prototype.every||(Array.prototype.every=function(t){var n=D(this),r=n.length>>>0,i=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var s=0;s<r;s++)if(s in n&&!t.call(i,n[s],s,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=D(this),r=n.length>>>0,i=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var s=0;s<r;s++)if(s in n&&t.call(i,n[s],s,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=D(this),r=n.length>>>0;if(u(t)!=\"[object Function]\")throw new TypeError;if(!r&&arguments.length==1)throw new TypeError;var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError}while(!0);for(;i<r;i++)i in n&&(s=t.call(void 0,s,n[i],i,n));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=D(this),r=n.length>>>0;if(u(t)!=\"[object Function]\")throw new TypeError;if(!r&&arguments.length==1)throw new TypeError;var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError}while(!0);do s in this&&(i=t.call(void 0,i,n[s],s,n));while(s--);return i}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var n=D(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=M(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(t){var n=D(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,M(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:s)});if(!Object.getOwnPropertyDescriptor){var d=\"Object.getOwnPropertyDescriptor called on a non-object: \";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!=\"object\"&&typeof t!=\"function\"||t===null)throw new TypeError(d+t);if(!a(t,n))return;var r,i,o;r={enumerable:!0,configurable:!0};if(p){var u=t.__proto__;t.__proto__=s;var i=c(t,n),o=h(t,n);t.__proto__=u;if(i||o)return i&&(r.get=i),o&&(r.set=o),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var v;Object.prototype.__proto__===null?v=function(){return{__proto__:null}}:v=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=v();else{if(typeof t!=\"object\")throw new TypeError(\"typeof prototype[\"+typeof t+\"] != 'object'\");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var g=m({}),y=typeof document==\"undefined\"||m(document.createElement(\"div\"));if(!g||!y)var b=Object.defineProperty}if(!Object.defineProperty||b){var w=\"Property description must be an object: \",E=\"Object.defineProperty called on non-object: \",S=\"getters & setters can not be defined on this javascript engine\";Object.defineProperty=function(t,n,r){if(typeof t!=\"object\"&&typeof t!=\"function\"||t===null)throw new TypeError(E+t);if(typeof r!=\"object\"&&typeof r!=\"function\"||r===null)throw new TypeError(w+r);if(b)try{return b.call(Object,t,n,r)}catch(i){}if(a(r,\"value\"))if(p&&(c(t,n)||h(t,n))){var o=t.__proto__;t.__proto__=s,delete t[n],t[n]=r.value,t.__proto__=o}else t[n]=r.value;else{if(!p)throw new TypeError(S);a(r,\"get\")&&f(t,n,r.get),a(r,\"set\")&&l(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)a(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(x){Object.freeze=function(t){return function(n){return typeof n==\"function\"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n=\"\";while(a(t,n))n+=\"?\";t[n]=!0;var r=a(t,n);return delete t[n],r});if(!Object.keys){var T=!0,N=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],C=N.length;for(var k in{toString:null})T=!1;Object.keys=function P(e){if(typeof e!=\"object\"&&typeof e!=\"function\"||e===null)throw new TypeError(\"Object.keys called on a non-object\");var P=[];for(var t in e)a(e,t)&&P.push(t);if(T)for(var n=0,r=C;n<r;n++){var i=N[n];a(e,i)&&P.push(i)}return P}}if(!Date.prototype.toISOString||(new Date(-621987552e5)).toISOString().indexOf(\"-000001\")===-1)Date.prototype.toISOString=function(){var t,n,r,i;if(!isFinite(this))throw new RangeError;t=[this.getUTCMonth()+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],i=this.getUTCFullYear(),i=(i<0?\"-\":i>9999?\"+\":\"\")+(\"00000\"+Math.abs(i)).slice(0<=i&&i<=9999?-4:-6),n=t.length;while(n--)r=t[n],r<10&&(t[n]=\"0\"+r);return i+\"-\"+t.slice(0,2).join(\"-\")+\"T\"+t.slice(2).join(\":\")+\".\"+(\"000\"+this.getUTCMilliseconds()).slice(-3)+\"Z\"};Date.now||(Date.now=function(){return(new Date).getTime()}),Date.prototype.toJSON||(Date.prototype.toJSON=function(t){if(typeof this.toISOString!=\"function\")throw new TypeError;return this.toISOString()}),Date.parse(\"+275760-09-13T00:00:00.000Z\")!==864e13&&(Date=function(e){var t=function i(t,n,r,s,o,u,a){var f=arguments.length;if(this instanceof e){var l=f==1&&String(t)===t?new e(i.parse(t)):f>=7?new e(t,n,r,s,o,u,a):f>=6?new e(t,n,r,s,o,u):f>=5?new e(t,n,r,s,o):f>=4?new e(t,n,r,s):f>=3?new e(t,n,r):f>=2?new e(t,n):f>=1?new e(t):new e;return l.constructor=i,l}return e.apply(this,arguments)},n=new RegExp(\"^(\\\\d{4}|[+-]\\\\d{6})(?:-(\\\\d{2})(?:-(\\\\d{2})(?:T(\\\\d{2}):(\\\\d{2})(?::(\\\\d{2})(?:\\\\.(\\\\d{3}))?)?(?:Z|(?:([-+])(\\\\d{2}):(\\\\d{2})))?)?)?)?$\");for(var r in e)t[r]=e[r];return t.now=e.now,t.UTC=e.UTC,t.prototype=e.prototype,t.prototype.constructor=t,t.parse=function(r){var i=n.exec(r);if(i){i.shift();for(var s=1;s<7;s++)i[s]=+(i[s]||(s<3?1:0)),s==1&&i[s]--;var o=+i.pop(),u=+i.pop(),a=i.pop(),f=0;if(a){if(u>23||o>59)return NaN;f=(u*60+o)*6e4*(a==\"+\"?-1:1)}var l=+i[0];return 0<=l&&l<=99?(i[0]=l+400,e.UTC.apply(this,i)+f-126227808e5):e.UTC.apply(this,i)+f}return e.parse.apply(this,arguments)},t}(Date));var L=\"\t\\n\u000b\\f\\r   ᠎             　\\u2028\\u2029﻿\";if(!String.prototype.trim||L.trim()){L=\"[\"+L+\"]\";var A=new RegExp(\"^\"+L+L+\"*\"),O=new RegExp(L+L+\"*$\");String.prototype.trim=function(){return String(this).replace(A,\"\").replace(O,\"\")}}var M=function(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e},_=\"a\"[0]!=\"a\",D=function(e){if(e==null)throw new TypeError;return _&&typeof e==\"string\"&&e?e.split(\"\"):Object(e)}}),define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r={};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry=this._eventRegistry||{},this._defaultHandlers=this._defaultHandlers||{};var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!=\"object\"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=function(){this.propagationStopped=!0}),t.preventDefault||(t.preventDefault=function(){this.defaultPrevented=!0});for(var i=0;i<n.length;i++){n[i](t);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t)},r.setDefaultHandler=function(e,t){this._defaultHandlers=this._defaultHandlers||{};if(this._defaultHandlers[e])throw new Error(\"The default handler for '\"+e+\"' is already set\");this._defaultHandlers[e]=t},r.on=r.addEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];n||(n=this._eventRegistry[e]=[]),n.indexOf(t)==-1&&n.push(t)},r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"],function(e,t,n){t.inherits=function(){var e=function(){};return function(t,n){e.prototype=n.prototype,t.super_=n.prototype,t.prototype=new e,t.prototype.constructor=t}}(),t.mixin=function(e,t){for(var n in t)e[n]=t[n]},t.implement=function(e,n){t.mixin(e,n)}}),define(\"ace/mode/json_worker\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/worker/mirror\",\"ace/mode/json/json_parse\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"../worker/mirror\").Mirror,s=e(\"./json/json_parse\"),o=t.JsonWorker=function(e){i.call(this,e),this.setTimeout(200)};r.inherits(o,i),function(){this.onUpdate=function(){var e=this.doc.getValue();try{var t=s(e)}catch(n){var r=this.doc.indexToPosition(n.at-1);this.sender.emit(\"error\",{row:r.row,column:r.column,text:n.message,type:\"error\"});return}this.sender.emit(\"ok\")}}.call(o.prototype)}),define(\"ace/worker/mirror\",[\"require\",\"exports\",\"module\",\"ace/document\",\"ace/lib/lang\"],function(e,t,n){var r=e(\"../document\").Document,i=e(\"../lib/lang\"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(\"\"),n=this.deferredUpdate=i.deferredCall(this.onUpdate.bind(this)),s=this;e.on(\"change\",function(e){t.applyDeltas([e.data]),n.schedule(s.$timeout)})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){}}).call(s.prototype)}),define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"],function(e,t,n){var r=e(\"./lib/oop\"),i=e(\"./lib/event_emitter\").EventEmitter,s=e(\"./range\").Range,o=e(\"./anchor\").Anchor,u=function(e){this.$lines=[],e.length==0?this.$lines=[\"\"]:Array.isArray(e)?this.insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},\"aaa\".split(/a/).length==0?this.$split=function(e){return e.replace(/\\r\\n|\\r/g,\"\\n\").split(\"\\n\")}:this.$split=function(e){return e.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\\r\\n|\\r|\\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine=\"\\n\"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\"windows\":return\"\\r\\n\";case\"unix\":return\"\\n\";default:return this.$autoNewLine}},this.$autoNewLine=\"\\n\",this.$newLineMode=\"auto\",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e==\"\\r\\n\"||e==\"\\r\"||e==\"\\n\"},this.getLine=function(e){return this.$lines[e]||\"\"},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.$lines[e.start.row].substring(e.start.column,e.end.column);var t=this.getLines(e.start.row+1,e.end.row-1);return t.unshift((this.$lines[e.start.row]||\"\").substring(e.start.column)),t.push((this.$lines[e.end.row]||\"\").substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t&&(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this.insertLines(e.row,n),e=this.insertInLine(e,i||\"\")),e},this.insertLines=function(e,t){if(t.length==0)return{row:e,column:0};if(t.length>65535){var n=this.insertLines(e,t.slice(65535));t=t.slice(0,65535)}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:\"insertLines\",range:i,lines:t};return this._emit(\"change\",{data:o}),n||i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||\"\";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:\"insertText\",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._emit(\"change\",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||\"\";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:\"insertText\",range:s.fromPoints(e,r),text:t};return this._emit(\"change\",{data:i}),r},this.remove=function(e){e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this.removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:\"removeText\",range:r,text:o};return this._emit(\"change\",{data:a}),r.start},this.removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:\"removeLines\",range:n,nl:this.getNewLineCharacter(),lines:r};return this._emit(\"change\",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:\"removeText\",range:r,text:this.getNewLineCharacter()};this._emit(\"change\",{data:o})},this.replace=function(e,t){if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action==\"insertLines\"?this.insertLines(r.start.row,n.lines):n.action==\"insertText\"?this.insert(r.start,n.text):n.action==\"removeLines\"?this.removeLines(r.start.row,r.end.row-1):n.action==\"removeText\"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action==\"insertLines\"?this.removeLines(r.start.row,r.end.row-1):n.action==\"insertText\"?this.remove(r):n.action==\"removeLines\"?this.insertLines(r.start.row,n.lines):n.action==\"removeText\"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length;return i+r*o+e.column}}).call(u.prototype),t.Document=u}),define(\"ace/range\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row==e.start.row&&this.end.row==e.end.row&&this.start.column==e.start.column&&this.end.column==e.end.column},this.toString=function(){return\"Range: [\"+this.start.row+\"/\"+this.start.column+\"] -> [\"+this.end.row+\"/\"+this.end.column+\"]\"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e==\"object\"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e==\"object\"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};if(this.start.row>t)var i={row:t+1,column:0};if(this.start.row<e)var i={row:e,column:0};if(this.end.row<e)var n={row:e,column:0};return r.fromPoints(i||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var i={row:e,column:t};else var s={row:e,column:t};return r.fromPoints(i||this.start,s||this.end)},this.isEmpty=function(){return this.start.row==this.end.row&&this.start.column==this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return r.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new r(t.row,t.column,n.row,n.column)}}).call(r.prototype),r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},t.Range=r}),define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(e,t,n){var r=e(\"./lib/oop\"),i=e(\"./lib/event_emitter\").EventEmitter,s=t.Anchor=function(e,t,n){this.document=e,typeof n==\"undefined\"?this.setPosition(t.row,t.column):this.setPosition(t,n),this.$onChange=this.onChange.bind(this),e.on(\"change\",this.$onChange)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column;t.action===\"insertText\"?n.start.row===r&&n.start.column<=i?n.start.row===n.end.row?i+=n.end.column-n.start.column:(i-=n.start.column,r+=n.end.row-n.start.row):n.start.row!==n.end.row&&n.start.row<r&&(r+=n.end.row-n.start.row):t.action===\"insertLines\"?n.start.row<=r&&(r+=n.end.row-n.start.row):t.action==\"removeText\"?n.start.row==r&&n.start.column<i?n.end.column>=i?i=n.start.column:i=Math.max(0,i-(n.end.column-n.start.column)):n.start.row!==n.end.row&&n.start.row<r?(n.end.row==r&&(i=Math.max(0,i-n.end.column)+n.start.column),r-=n.end.row-n.start.row):n.end.row==r&&(r-=n.end.row-n.start.row,i=Math.max(0,i-n.end.column)+n.start.column):t.action==\"removeLines\"&&n.start.row<=r&&(n.end.row<=r?r-=n.end.row-n.start.row:(r=n.start.row,i=0)),this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._emit(\"change\",{old:i,value:r})},this.detach=function(){this.document.removeEventListener(\"change\",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"],function(e,t,n){t.stringReverse=function(e){return e.split(\"\").reverse().join(\"\")},t.stringRepeat=function(e,t){var n=\"\";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\\s\\s*/,i=/\\s\\s*$/;t.stringTrimLeft=function(e){return e.replace(r,\"\")},t.stringTrimRight=function(e){return e.replace(i,\"\")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]==\"object\"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!=\"object\")return e;var t=e.constructor();for(var n in e)typeof e[n]==\"object\"?t[n]=this.deepCopy(e[n]):t[n]=e[n];return t},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,\"\\\\$1\")},t.escapeHTML=function(e){return e.replace(/&/g,\"&#38;\").replace(/\"/g,\"&#34;\").replace(/'/g,\"&#39;\").replace(/</g,\"&#60;\")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)};return i.delay=i,i.schedule=function(e){n==null&&(n=setTimeout(r,e||0))},i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),define(\"ace/mode/json/json_parse\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r,i,s={'\"':'\"',\"\\\\\":\"\\\\\",\"/\":\"/\",b:\"\\b\",f:\"\\f\",n:\"\\n\",r:\"\\r\",t:\"\t\"},o,u=function(e){throw{name:\"SyntaxError\",message:e,at:r,text:o}},a=function(e){return e&&e!==i&&u(\"Expected '\"+e+\"' instead of '\"+i+\"'\"),i=o.charAt(r),r+=1,i},f=function(){var e,t=\"\";i===\"-\"&&(t=\"-\",a(\"-\"));while(i>=\"0\"&&i<=\"9\")t+=i,a();if(i===\".\"){t+=\".\";while(a()&&i>=\"0\"&&i<=\"9\")t+=i}if(i===\"e\"||i===\"E\"){t+=i,a();if(i===\"-\"||i===\"+\")t+=i,a();while(i>=\"0\"&&i<=\"9\")t+=i,a()}e=+t;if(!isNaN(e))return e;u(\"Bad number\")},l=function(){var e,t,n=\"\",r;if(i==='\"')while(a()){if(i==='\"')return a(),n;if(i===\"\\\\\"){a();if(i===\"u\"){r=0;for(t=0;t<4;t+=1){e=parseInt(a(),16);if(!isFinite(e))break;r=r*16+e}n+=String.fromCharCode(r)}else{if(typeof s[i]!=\"string\")break;n+=s[i]}}else n+=i}u(\"Bad string\")},c=function(){while(i&&i<=\" \")a()},h=function(){switch(i){case\"t\":return a(\"t\"),a(\"r\"),a(\"u\"),a(\"e\"),!0;case\"f\":return a(\"f\"),a(\"a\"),a(\"l\"),a(\"s\"),a(\"e\"),!1;case\"n\":return a(\"n\"),a(\"u\"),a(\"l\"),a(\"l\"),null}u(\"Unexpected '\"+i+\"'\")},p,d=function(){var e=[];if(i===\"[\"){a(\"[\"),c();if(i===\"]\")return a(\"]\"),e;while(i){e.push(p()),c();if(i===\"]\")return a(\"]\"),e;a(\",\"),c()}}u(\"Bad array\")},v=function(){var e,t={};if(i===\"{\"){a(\"{\"),c();if(i===\"}\")return a(\"}\"),t;while(i){e=l(),c(),a(\":\"),Object.hasOwnProperty.call(t,e)&&u('Duplicate key \"'+e+'\"'),t[e]=p(),c();if(i===\"}\")return a(\"}\"),t;a(\",\"),c()}}u(\"Bad object\")};return p=function(){c();switch(i){case\"{\":return v();case\"[\":return d();case'\"':return l();case\"-\":return f();default:return i>=\"0\"&&i<=\"9\"?f():h()}},function(e,t){var n;return o=e,r=0,i=\" \",n=p(),c(),i&&u(\"Syntax error\"),typeof t==\"function\"?function s(e,n){var r,i,o=e[n];if(o&&typeof o==\"object\")for(r in o)Object.hasOwnProperty.call(o,r)&&(i=s(o,r),i!==undefined?o[r]=i:delete o[r]);return t.call(e,n,o)}({\"\":n},\"\"):n}})"
  },
  {
    "path": "public/js/ace/worker-php.js",
    "content": "\"no use strict\";function initBaseUrls(e){require.tlns=e}function initSender(){var e=require(null,\"ace/lib/event_emitter\").EventEmitter,t=require(null,\"ace/lib/oop\"),n=function(){};return function(){t.implement(this,e),this.callback=function(e,t){postMessage({type:\"call\",id:t,data:e})},this.emit=function(e,t){postMessage({type:\"event\",name:e,data:t})}}.call(n.prototype),new n}if(typeof window!=\"undefined\"&&window.document)throw\"atempt to load ace worker into main window instead of webWorker\";var console={log:function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:e})},error:function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:e})}},window={console:console},normalizeModule=function(e,t){if(t.indexOf(\"!\")!==-1){var n=t.split(\"!\");return normalizeModule(e,n[0])+\"!\"+normalizeModule(e,n[1])}if(t.charAt(0)==\".\"){var r=e.split(\"/\").slice(0,-1).join(\"/\");t=r+\"/\"+t;while(t.indexOf(\".\")!==-1&&i!=t){var i=t;t=t.replace(/\\/\\.\\//,\"/\").replace(/[^\\/]+\\/\\.\\.\\//,\"\")}}return t},require=function(e,t){if(!t.charAt)throw new Error(\"worker.js require() accepts only (parentId, id) as arguments\");t=normalizeModule(e,t);var n=require.modules[t];if(n)return n.initialized||(n.initialized=!0,n.exports=n.factory().exports),n.exports;var r=t.split(\"/\");r[0]=require.tlns[r[0]]||r[0];var i=r.join(\"/\")+\".js\";return require.id=t,importScripts(i),require(e,t)};require.modules={},require.tlns={};var define=function(e,t,n){arguments.length==2?(n=t,typeof e!=\"string\"&&(t=e,e=require.id)):arguments.length==1&&(n=e,e=require.id);if(e.indexOf(\"text!\")===0)return;var r=function(t,n){return require(e,t,n)};require.modules[e]={factory:function(){var e={exports:{}},t=n(r,e.exports,e);return t&&(e.exports=t),e}}},main,sender;onmessage=function(e){var t=e.data;if(t.command){if(!main[t.command])throw new Error(\"Unknown command:\"+t.command);main[t.command].apply(main,t.args)}else if(t.init){initBaseUrls(t.tlns),require(null,\"ace/lib/fixoldbrowsers\"),sender=initSender();var n=require(null,t.module)[t.classname];main=new n(sender)}else t.event&&sender&&sender._emit(t.event,t.data)},define(\"ace/lib/fixoldbrowsers\",[\"require\",\"exports\",\"module\",\"ace/lib/regexp\",\"ace/lib/es5-shim\"],function(e,t,n){e(\"./regexp\"),e(\"./es5-shim\")}),define(\"ace/lib/regexp\",[\"require\",\"exports\",\"module\"],function(e,t,n){function o(e){return(e.global?\"g\":\"\")+(e.ignoreCase?\"i\":\"\")+(e.multiline?\"m\":\"\")+(e.extended?\"x\":\"\")+(e.sticky?\"y\":\"\")}function u(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r<e.length;r++)if(e[r]===t)return r;return-1}var r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=r.exec.call(/()??/,\"\")[1]===undefined,s=function(){var e=/^/g;return r.test.call(e,\"\"),!e.lastIndex}();if(s&&i)return;RegExp.prototype.exec=function(e){var t=r.exec.apply(this,arguments),n,a;if(typeof e==\"string\"&&t){!i&&t.length>1&&u(t,\"\")>-1&&(a=RegExp(this.source,r.replace.call(o(this),\"g\",\"\")),r.replace.call(e.slice(t.index),a,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===undefined&&(t[e]=undefined)}));if(this._xregexp&&this._xregexp.captureNames)for(var f=1;f<t.length;f++)n=this._xregexp.captureNames[f-1],n&&(t[n]=t[f]);!s&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--}return t},s||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t})}),define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"],function(e,t,n){function m(e){try{return Object.defineProperty(e,\"sentinel\",{}),\"sentinel\"in e}catch(t){}}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!=\"function\")throw new TypeError;var r=o.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,u=n.apply(s,r.concat(o.call(arguments)));return u!==null&&Object(u)===u?u:s}return n.apply(t,r.concat(o.call(arguments)))};return i});var r=Function.prototype.call,i=Array.prototype,s=Object.prototype,o=i.slice,u=r.bind(s.toString),a=r.bind(s.hasOwnProperty),f,l,c,h,p;if(p=a(s,\"__defineGetter__\"))f=r.bind(s.__defineGetter__),l=r.bind(s.__defineSetter__),c=r.bind(s.__lookupGetter__),h=r.bind(s.__lookupSetter__);Array.isArray||(Array.isArray=function(t){return u(t)==\"[object Array]\"}),Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=D(this),r=arguments[1],i=0,s=n.length>>>0;if(u(t)!=\"[object Function]\")throw new TypeError;while(i<s)i in n&&t.call(r,n[i],i,n),i++}),Array.prototype.map||(Array.prototype.map=function(t){var n=D(this),r=n.length>>>0,i=Array(r),s=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var o=0;o<r;o++)o in n&&(i[o]=t.call(s,n[o],o,n));return i}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=D(this),r=n.length>>>0,i=[],s=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var o=0;o<r;o++)o in n&&t.call(s,n[o],o,n)&&i.push(n[o]);return i}),Array.prototype.every||(Array.prototype.every=function(t){var n=D(this),r=n.length>>>0,i=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var s=0;s<r;s++)if(s in n&&!t.call(i,n[s],s,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=D(this),r=n.length>>>0,i=arguments[1];if(u(t)!=\"[object Function]\")throw new TypeError;for(var s=0;s<r;s++)if(s in n&&t.call(i,n[s],s,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=D(this),r=n.length>>>0;if(u(t)!=\"[object Function]\")throw new TypeError;if(!r&&arguments.length==1)throw new TypeError;var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError}while(!0);for(;i<r;i++)i in n&&(s=t.call(void 0,s,n[i],i,n));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=D(this),r=n.length>>>0;if(u(t)!=\"[object Function]\")throw new TypeError;if(!r&&arguments.length==1)throw new TypeError;var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError}while(!0);do s in this&&(i=t.call(void 0,i,n[s],s,n));while(s--);return i}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var n=D(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=M(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(t){var n=D(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,M(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:s)});if(!Object.getOwnPropertyDescriptor){var d=\"Object.getOwnPropertyDescriptor called on a non-object: \";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!=\"object\"&&typeof t!=\"function\"||t===null)throw new TypeError(d+t);if(!a(t,n))return;var r,i,o;r={enumerable:!0,configurable:!0};if(p){var u=t.__proto__;t.__proto__=s;var i=c(t,n),o=h(t,n);t.__proto__=u;if(i||o)return i&&(r.get=i),o&&(r.set=o),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var v;Object.prototype.__proto__===null?v=function(){return{__proto__:null}}:v=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=v();else{if(typeof t!=\"object\")throw new TypeError(\"typeof prototype[\"+typeof t+\"] != 'object'\");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var g=m({}),y=typeof document==\"undefined\"||m(document.createElement(\"div\"));if(!g||!y)var b=Object.defineProperty}if(!Object.defineProperty||b){var w=\"Property description must be an object: \",E=\"Object.defineProperty called on non-object: \",S=\"getters & setters can not be defined on this javascript engine\";Object.defineProperty=function(t,n,r){if(typeof t!=\"object\"&&typeof t!=\"function\"||t===null)throw new TypeError(E+t);if(typeof r!=\"object\"&&typeof r!=\"function\"||r===null)throw new TypeError(w+r);if(b)try{return b.call(Object,t,n,r)}catch(i){}if(a(r,\"value\"))if(p&&(c(t,n)||h(t,n))){var o=t.__proto__;t.__proto__=s,delete t[n],t[n]=r.value,t.__proto__=o}else t[n]=r.value;else{if(!p)throw new TypeError(S);a(r,\"get\")&&f(t,n,r.get),a(r,\"set\")&&l(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)a(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(x){Object.freeze=function(t){return function(n){return typeof n==\"function\"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n=\"\";while(a(t,n))n+=\"?\";t[n]=!0;var r=a(t,n);return delete t[n],r});if(!Object.keys){var T=!0,N=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],C=N.length;for(var k in{toString:null})T=!1;Object.keys=function P(e){if(typeof e!=\"object\"&&typeof e!=\"function\"||e===null)throw new TypeError(\"Object.keys called on a non-object\");var P=[];for(var t in e)a(e,t)&&P.push(t);if(T)for(var n=0,r=C;n<r;n++){var i=N[n];a(e,i)&&P.push(i)}return P}}if(!Date.prototype.toISOString||(new Date(-621987552e5)).toISOString().indexOf(\"-000001\")===-1)Date.prototype.toISOString=function(){var t,n,r,i;if(!isFinite(this))throw new RangeError;t=[this.getUTCMonth()+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],i=this.getUTCFullYear(),i=(i<0?\"-\":i>9999?\"+\":\"\")+(\"00000\"+Math.abs(i)).slice(0<=i&&i<=9999?-4:-6),n=t.length;while(n--)r=t[n],r<10&&(t[n]=\"0\"+r);return i+\"-\"+t.slice(0,2).join(\"-\")+\"T\"+t.slice(2).join(\":\")+\".\"+(\"000\"+this.getUTCMilliseconds()).slice(-3)+\"Z\"};Date.now||(Date.now=function(){return(new Date).getTime()}),Date.prototype.toJSON||(Date.prototype.toJSON=function(t){if(typeof this.toISOString!=\"function\")throw new TypeError;return this.toISOString()}),Date.parse(\"+275760-09-13T00:00:00.000Z\")!==864e13&&(Date=function(e){var t=function i(t,n,r,s,o,u,a){var f=arguments.length;if(this instanceof e){var l=f==1&&String(t)===t?new e(i.parse(t)):f>=7?new e(t,n,r,s,o,u,a):f>=6?new e(t,n,r,s,o,u):f>=5?new e(t,n,r,s,o):f>=4?new e(t,n,r,s):f>=3?new e(t,n,r):f>=2?new e(t,n):f>=1?new e(t):new e;return l.constructor=i,l}return e.apply(this,arguments)},n=new RegExp(\"^(\\\\d{4}|[+-]\\\\d{6})(?:-(\\\\d{2})(?:-(\\\\d{2})(?:T(\\\\d{2}):(\\\\d{2})(?::(\\\\d{2})(?:\\\\.(\\\\d{3}))?)?(?:Z|(?:([-+])(\\\\d{2}):(\\\\d{2})))?)?)?)?$\");for(var r in e)t[r]=e[r];return t.now=e.now,t.UTC=e.UTC,t.prototype=e.prototype,t.prototype.constructor=t,t.parse=function(r){var i=n.exec(r);if(i){i.shift();for(var s=1;s<7;s++)i[s]=+(i[s]||(s<3?1:0)),s==1&&i[s]--;var o=+i.pop(),u=+i.pop(),a=i.pop(),f=0;if(a){if(u>23||o>59)return NaN;f=(u*60+o)*6e4*(a==\"+\"?-1:1)}var l=+i[0];return 0<=l&&l<=99?(i[0]=l+400,e.UTC.apply(this,i)+f-126227808e5):e.UTC.apply(this,i)+f}return e.parse.apply(this,arguments)},t}(Date));var L=\"\t\\n\u000b\\f\\r   ᠎             　\\u2028\\u2029﻿\";if(!String.prototype.trim||L.trim()){L=\"[\"+L+\"]\";var A=new RegExp(\"^\"+L+L+\"*\"),O=new RegExp(L+L+\"*$\");String.prototype.trim=function(){return String(this).replace(A,\"\").replace(O,\"\")}}var M=function(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e},_=\"a\"[0]!=\"a\",D=function(e){if(e==null)throw new TypeError;return _&&typeof e==\"string\"&&e?e.split(\"\"):Object(e)}}),define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r={};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry=this._eventRegistry||{},this._defaultHandlers=this._defaultHandlers||{};var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!=\"object\"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=function(){this.propagationStopped=!0}),t.preventDefault||(t.preventDefault=function(){this.defaultPrevented=!0});for(var i=0;i<n.length;i++){n[i](t);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t)},r.setDefaultHandler=function(e,t){this._defaultHandlers=this._defaultHandlers||{};if(this._defaultHandlers[e])throw new Error(\"The default handler for '\"+e+\"' is already set\");this._defaultHandlers[e]=t},r.on=r.addEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];n||(n=this._eventRegistry[e]=[]),n.indexOf(t)==-1&&n.push(t)},r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"],function(e,t,n){t.inherits=function(){var e=function(){};return function(t,n){e.prototype=n.prototype,t.super_=n.prototype,t.prototype=new e,t.prototype.constructor=t}}(),t.mixin=function(e,t){for(var n in t)e[n]=t[n]},t.implement=function(e,n){t.mixin(e,n)}}),define(\"ace/mode/php_worker\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/worker/mirror\",\"ace/mode/php/php\"],function(e,t,n){var r=e(\"../lib/oop\"),i=e(\"../worker/mirror\").Mirror,s=e(\"./php/php\").PHP,o=t.PhpWorker=function(e){i.call(this,e),this.setTimeout(500)};r.inherits(o,i),function(){this.onUpdate=function(){var e=this.doc.getValue(),t=[],n=s.Lexer(e,{short_open_tag:1});try{new s.Parser(n)}catch(r){t.push({row:r.line-1,column:null,text:r.message.charAt(0).toUpperCase()+r.message.substring(1),type:\"error\"})}t.length?this.sender.emit(\"error\",t):this.sender.emit(\"ok\")}}.call(o.prototype)}),define(\"ace/worker/mirror\",[\"require\",\"exports\",\"module\",\"ace/document\",\"ace/lib/lang\"],function(e,t,n){var r=e(\"../document\").Document,i=e(\"../lib/lang\"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(\"\"),n=this.deferredUpdate=i.deferredCall(this.onUpdate.bind(this)),s=this;e.on(\"change\",function(e){t.applyDeltas([e.data]),n.schedule(s.$timeout)})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){}}).call(s.prototype)}),define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"],function(e,t,n){var r=e(\"./lib/oop\"),i=e(\"./lib/event_emitter\").EventEmitter,s=e(\"./range\").Range,o=e(\"./anchor\").Anchor,u=function(e){this.$lines=[],e.length==0?this.$lines=[\"\"]:Array.isArray(e)?this.insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},\"aaa\".split(/a/).length==0?this.$split=function(e){return e.replace(/\\r\\n|\\r/g,\"\\n\").split(\"\\n\")}:this.$split=function(e){return e.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\\r\\n|\\r|\\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine=\"\\n\"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\"windows\":return\"\\r\\n\";case\"unix\":return\"\\n\";default:return this.$autoNewLine}},this.$autoNewLine=\"\\n\",this.$newLineMode=\"auto\",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e==\"\\r\\n\"||e==\"\\r\"||e==\"\\n\"},this.getLine=function(e){return this.$lines[e]||\"\"},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.$lines[e.start.row].substring(e.start.column,e.end.column);var t=this.getLines(e.start.row+1,e.end.row-1);return t.unshift((this.$lines[e.start.row]||\"\").substring(e.start.column)),t.push((this.$lines[e.end.row]||\"\").substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t&&(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this.insertLines(e.row,n),e=this.insertInLine(e,i||\"\")),e},this.insertLines=function(e,t){if(t.length==0)return{row:e,column:0};if(t.length>65535){var n=this.insertLines(e,t.slice(65535));t=t.slice(0,65535)}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:\"insertLines\",range:i,lines:t};return this._emit(\"change\",{data:o}),n||i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||\"\";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:\"insertText\",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._emit(\"change\",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||\"\";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:\"insertText\",range:s.fromPoints(e,r),text:t};return this._emit(\"change\",{data:i}),r},this.remove=function(e){e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this.removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:\"removeText\",range:r,text:o};return this._emit(\"change\",{data:a}),r.start},this.removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:\"removeLines\",range:n,nl:this.getNewLineCharacter(),lines:r};return this._emit(\"change\",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:\"removeText\",range:r,text:this.getNewLineCharacter()};this._emit(\"change\",{data:o})},this.replace=function(e,t){if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action==\"insertLines\"?this.insertLines(r.start.row,n.lines):n.action==\"insertText\"?this.insert(r.start,n.text):n.action==\"removeLines\"?this.removeLines(r.start.row,r.end.row-1):n.action==\"removeText\"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action==\"insertLines\"?this.removeLines(r.start.row,r.end.row-1):n.action==\"insertText\"?this.remove(r):n.action==\"removeLines\"?this.insertLines(r.start.row,n.lines):n.action==\"removeText\"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length;return i+r*o+e.column}}).call(u.prototype),t.Document=u}),define(\"ace/range\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row==e.start.row&&this.end.row==e.end.row&&this.start.column==e.start.column&&this.end.column==e.end.column},this.toString=function(){return\"Range: [\"+this.start.row+\"/\"+this.start.column+\"] -> [\"+this.end.row+\"/\"+this.end.column+\"]\"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e==\"object\"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e==\"object\"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};if(this.start.row>t)var i={row:t+1,column:0};if(this.start.row<e)var i={row:e,column:0};if(this.end.row<e)var n={row:e,column:0};return r.fromPoints(i||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var i={row:e,column:t};else var s={row:e,column:t};return r.fromPoints(i||this.start,s||this.end)},this.isEmpty=function(){return this.start.row==this.end.row&&this.start.column==this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return r.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new r(t.row,t.column,n.row,n.column)}}).call(r.prototype),r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},t.Range=r}),define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(e,t,n){var r=e(\"./lib/oop\"),i=e(\"./lib/event_emitter\").EventEmitter,s=t.Anchor=function(e,t,n){this.document=e,typeof n==\"undefined\"?this.setPosition(t.row,t.column):this.setPosition(t,n),this.$onChange=this.onChange.bind(this),e.on(\"change\",this.$onChange)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column;t.action===\"insertText\"?n.start.row===r&&n.start.column<=i?n.start.row===n.end.row?i+=n.end.column-n.start.column:(i-=n.start.column,r+=n.end.row-n.start.row):n.start.row!==n.end.row&&n.start.row<r&&(r+=n.end.row-n.start.row):t.action===\"insertLines\"?n.start.row<=r&&(r+=n.end.row-n.start.row):t.action==\"removeText\"?n.start.row==r&&n.start.column<i?n.end.column>=i?i=n.start.column:i=Math.max(0,i-(n.end.column-n.start.column)):n.start.row!==n.end.row&&n.start.row<r?(n.end.row==r&&(i=Math.max(0,i-n.end.column)+n.start.column),r-=n.end.row-n.start.row):n.end.row==r&&(r-=n.end.row-n.start.row,i=Math.max(0,i-n.end.column)+n.start.column):t.action==\"removeLines\"&&n.start.row<=r&&(n.end.row<=r?r-=n.end.row-n.start.row:(r=n.start.row,i=0)),this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._emit(\"change\",{old:i,value:r})},this.detach=function(){this.document.removeEventListener(\"change\",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"],function(e,t,n){t.stringReverse=function(e){return e.split(\"\").reverse().join(\"\")},t.stringRepeat=function(e,t){var n=\"\";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\\s\\s*/,i=/\\s\\s*$/;t.stringTrimLeft=function(e){return e.replace(r,\"\")},t.stringTrimRight=function(e){return e.replace(i,\"\")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]==\"object\"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!=\"object\")return e;var t=e.constructor();for(var n in e)typeof e[n]==\"object\"?t[n]=this.deepCopy(e[n]):t[n]=e[n];return t},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,\"\\\\$1\")},t.escapeHTML=function(e){return e.replace(/&/g,\"&#38;\").replace(/\"/g,\"&#34;\").replace(/'/g,\"&#39;\").replace(/</g,\"&#60;\")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)};return i.delay=i,i.schedule=function(e){n==null&&(n=setTimeout(r,e||0))},i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),define(\"ace/mode/php/php\",[\"require\",\"exports\",\"module\"],function(e,t,n){var r={Constants:{}};r.Constants.T_INCLUDE=262,r.Constants.T_INCLUDE_ONCE=261,r.Constants.T_EVAL=260,r.Constants.T_REQUIRE=259,r.Constants.T_REQUIRE_ONCE=258,r.Constants.T_LOGICAL_OR=263,r.Constants.T_LOGICAL_XOR=264,r.Constants.T_LOGICAL_AND=265,r.Constants.T_PRINT=266,r.Constants.T_PLUS_EQUAL=277,r.Constants.T_MINUS_EQUAL=276,r.Constants.T_MUL_EQUAL=275,r.Constants.T_DIV_EQUAL=274,r.Constants.T_CONCAT_EQUAL=273,r.Constants.T_MOD_EQUAL=272,r.Constants.T_AND_EQUAL=271,r.Constants.T_OR_EQUAL=270,r.Constants.T_XOR_EQUAL=269,r.Constants.T_SL_EQUAL=268,r.Constants.T_SR_EQUAL=267,r.Constants.T_BOOLEAN_OR=278,r.Constants.T_BOOLEAN_AND=279,r.Constants.T_IS_EQUAL=283,r.Constants.T_IS_NOT_EQUAL=282,r.Constants.T_IS_IDENTICAL=281,r.Constants.T_IS_NOT_IDENTICAL=280,r.Constants.T_IS_SMALLER_OR_EQUAL=285,r.Constants.T_IS_GREATER_OR_EQUAL=284,r.Constants.T_SL=287,r.Constants.T_SR=286,r.Constants.T_INSTANCEOF=288,r.Constants.T_INC=297,r.Constants.T_DEC=296,r.Constants.T_INT_CAST=295,r.Constants.T_DOUBLE_CAST=294,r.Constants.T_STRING_CAST=293,r.Constants.T_ARRAY_CAST=292,r.Constants.T_OBJECT_CAST=291,r.Constants.T_BOOL_CAST=290,r.Constants.T_UNSET_CAST=289,r.Constants.T_NEW=299,r.Constants.T_CLONE=298,r.Constants.T_EXIT=300,r.Constants.T_IF=301,r.Constants.T_ELSEIF=302,r.Constants.T_ELSE=303,r.Constants.T_ENDIF=304,r.Constants.T_LNUMBER=305,r.Constants.T_DNUMBER=306,r.Constants.T_STRING=307,r.Constants.T_STRING_VARNAME=308,r.Constants.T_VARIABLE=309,r.Constants.T_NUM_STRING=310,r.Constants.T_INLINE_HTML=311,r.Constants.T_CHARACTER=312,r.Constants.T_BAD_CHARACTER=313,r.Constants.T_ENCAPSED_AND_WHITESPACE=314,r.Constants.T_CONSTANT_ENCAPSED_STRING=315,r.Constants.T_ECHO=316,r.Constants.T_DO=317,r.Constants.T_WHILE=318,r.Constants.T_ENDWHILE=319,r.Constants.T_FOR=320,r.Constants.T_ENDFOR=321,r.Constants.T_FOREACH=322,r.Constants.T_ENDFOREACH=323,r.Constants.T_DECLARE=324,r.Constants.T_ENDDECLARE=325,r.Constants.T_AS=326,r.Constants.T_SWITCH=327,r.Constants.T_ENDSWITCH=328,r.Constants.T_CASE=329,r.Constants.T_DEFAULT=330,r.Constants.T_BREAK=331,r.Constants.T_CONTINUE=332,r.Constants.T_GOTO=333,r.Constants.T_FUNCTION=334,r.Constants.T_CONST=335,r.Constants.T_RETURN=336,r.Constants.T_TRY=337,r.Constants.T_CATCH=338,r.Constants.T_THROW=339,r.Constants.T_USE=340,r.Constants.T_GLOBAL=341,r.Constants.T_STATIC=347,r.Constants.T_ABSTRACT=346,r.Constants.T_FINAL=345,r.Constants.T_PRIVATE=344,r.Constants.T_PROTECTED=343,r.Constants.T_PUBLIC=342,r.Constants.T_VAR=348,r.Constants.T_UNSET=349,r.Constants.T_ISSET=350,r.Constants.T_EMPTY=351,r.Constants.T_HALT_COMPILER=352,r.Constants.T_CLASS=353,r.Constants.T_INTERFACE=354,r.Constants.T_EXTENDS=355,r.Constants.T_IMPLEMENTS=356,r.Constants.T_OBJECT_OPERATOR=357,r.Constants.T_DOUBLE_ARROW=358,r.Constants.T_LIST=359,r.Constants.T_ARRAY=360,r.Constants.T_CLASS_C=361,r.Constants.T_TRAIT_C=381,r.Constants.T_METHOD_C=362,r.Constants.T_FUNC_C=363,r.Constants.T_LINE=364,r.Constants.T_FILE=365,r.Constants.T_COMMENT=366,r.Constants.T_DOC_COMMENT=367,r.Constants.T_OPEN_TAG=368,r.Constants.T_OPEN_TAG_WITH_ECHO=369,r.Constants.T_CLOSE_TAG=370,r.Constants.T_WHITESPACE=371,r.Constants.T_START_HEREDOC=372,r.Constants.T_END_HEREDOC=373,r.Constants.T_DOLLAR_OPEN_CURLY_BRACES=374,r.Constants.T_CURLY_OPEN=375,r.Constants.T_PAAMAYIM_NEKUDOTAYIM=376,r.Constants.T_DOUBLE_COLON=376,r.Constants.T_NAMESPACE=377,r.Constants.T_NS_C=378,r.Constants.T_DIR=379,r.Constants.T_NS_SEPARATOR=380,r.Lexer=function(e,t){var n,i=function(e){if(e.match(/\\n/)!==null){var t=e.substring(0,1);e=\"[\"+e.split(/\\n/).join(t+\",\"+t)+'].join(\"\\\\n\")'}return e},s,o=t===undefined||/^(on|true|1)$/i.test(t.short_open_tag)?/(\\<\\?php\\s|\\<\\?|\\<\\%|\\<script language\\=('|\")?php('|\")?\\>)/i:/(\\<\\?php\\s|<\\?=|\\<script language\\=('|\")?php('|\")?\\>)/i,u=t===undefined||/^(on|true|1)$/i.test(t.short_open_tag)?/^(\\<\\?php\\s|\\<\\?|\\<\\%|\\<script language\\=('|\")?php('|\")?\\>)/i:/^(\\<\\?php\\s|<\\?=|\\<script language\\=('|\")?php('|\")?\\>)/i,a=[{value:r.Constants.T_ABSTRACT,re:/^abstract(?=\\s)/i},{value:r.Constants.T_IMPLEMENTS,re:/^implements(?=\\s)/i},{value:r.Constants.T_INTERFACE,re:/^interface(?=\\s)/i},{value:r.Constants.T_CONST,re:/^const(?=\\s)/i},{value:r.Constants.T_STATIC,re:/^static(?=\\s)/i},{value:r.Constants.T_FINAL,re:/^final(?=\\s)/i},{value:r.Constants.T_VAR,re:/^var(?=\\s)/i},{value:r.Constants.T_GLOBAL,re:/^global(?=\\s)/i},{value:r.Constants.T_CLONE,re:/^clone(?=\\s)/i},{value:r.Constants.T_THROW,re:/^throw(?=\\s)/i},{value:r.Constants.T_EXTENDS,re:/^extends(?=\\s)/i},{value:r.Constants.T_AND_EQUAL,re:/^&=/},{value:r.Constants.T_AS,re:/^as(?=\\s)/i},{value:r.Constants.T_ARRAY_CAST,re:/^\\(array\\)/i},{value:r.Constants.T_BOOL_CAST,re:/^\\((bool|boolean)\\)/i},{value:r.Constants.T_DOUBLE_CAST,re:/^\\((real|float|double)\\)/i},{value:r.Constants.T_INT_CAST,re:/^\\((int|integer)\\)/i},{value:r.Constants.T_OBJECT_CAST,re:/^\\(object\\)/i},{value:r.Constants.T_STRING_CAST,re:/^\\(string\\)/i},{value:r.Constants.T_UNSET_CAST,re:/^\\(unset\\)/i},{value:r.Constants.T_TRY,re:/^try(?=\\s*{)/i},{value:r.Constants.T_CATCH,re:/^catch(?=\\s*\\()/i},{value:r.Constants.T_INSTANCEOF,re:/^instanceof(?=\\s)/i},{value:r.Constants.T_LOGICAL_OR,re:/^or(?=\\s)/i},{value:r.Constants.T_LOGICAL_AND,re:/^and(?=\\s)/i},{value:r.Constants.T_LOGICAL_XOR,re:/^xor(?=\\s)/i},{value:r.Constants.T_BOOLEAN_AND,re:/^&&/},{value:r.Constants.T_BOOLEAN_OR,re:/^\\|\\|/},{value:r.Constants.T_CONTINUE,re:/^continue(?=\\s|;)/i},{value:r.Constants.T_BREAK,re:/^break(?=\\s|;)/i},{value:r.Constants.T_ENDDECLARE,re:/^enddeclare(?=\\s|;)/i},{value:r.Constants.T_ENDFOR,re:/^endfor(?=\\s|;)/i},{value:r.Constants.T_ENDFOREACH,re:/^endforeach(?=\\s|;)/i},{value:r.Constants.T_ENDIF,re:/^endif(?=\\s|;)/i},{value:r.Constants.T_ENDSWITCH,re:/^endswitch(?=\\s|;)/i},{value:r.Constants.T_ENDWHILE,re:/^endwhile(?=\\s|;)/i},{value:r.Constants.T_CASE,re:/^case(?=\\s)/i},{value:r.Constants.T_DEFAULT,re:/^default(?=\\s|:)/i},{value:r.Constants.T_SWITCH,re:/^switch(?=[ (])/i},{value:r.Constants.T_EXIT,re:/^(exit|die)(?=[ \\(;])/i},{value:r.Constants.T_CLOSE_TAG,re:/^(\\?\\>|\\%\\>|\\<\\/script\\>)\\s?\\s?/i,func:function(e){return c=!1,e}},{value:r.Constants.T_DOUBLE_ARROW,re:/^\\=\\>/},{value:r.Constants.T_DOUBLE_COLON,re:/^\\:\\:/},{value:r.Constants.T_METHOD_C,re:/^__METHOD__/},{value:r.Constants.T_LINE,re:/^__LINE__/},{value:r.Constants.T_FILE,re:/^__FILE__/},{value:r.Constants.T_FUNC_C,re:/^__FUNCTION__/},{value:r.Constants.T_NS_C,re:/^__NAMESPACE__/},{value:r.Constants.T_TRAIT_C,re:/^__TRAIT__/},{value:r.Constants.T_DIR,re:/^__DIR__/},{value:r.Constants.T_CLASS_C,re:/^__CLASS__/},{value:r.Constants.T_INC,re:/^\\+\\+/},{value:r.Constants.T_DEC,re:/^\\-\\-/},{value:r.Constants.T_CONCAT_EQUAL,re:/^\\.\\=/},{value:r.Constants.T_DIV_EQUAL,re:/^\\/\\=/},{value:r.Constants.T_XOR_EQUAL,re:/^\\^\\=/},{value:r.Constants.T_MUL_EQUAL,re:/^\\*\\=/},{value:r.Constants.T_MOD_EQUAL,re:/^\\%\\=/},{value:r.Constants.T_SL_EQUAL,re:/^<<=/},{value:r.Constants.T_START_HEREDOC,re:/^<<<[A-Z_0-9]+\\s/i,func:function(e){return n=e.substring(3,e.length-1),e}},{value:r.Constants.T_SL,re:/^<</},{value:r.Constants.T_IS_SMALLER_OR_EQUAL,re:/^<=/},{value:r.Constants.T_SR_EQUAL,re:/^>>=/},{value:r.Constants.T_SR,re:/^>>/},{value:r.Constants.T_IS_GREATER_OR_EQUAL,re:/^>=/},{value:r.Constants.T_OR_EQUAL,re:/^\\|\\=/},{value:r.Constants.T_PLUS_EQUAL,re:/^\\+\\=/},{value:r.Constants.T_MINUS_EQUAL,re:/^-\\=/},{value:r.Constants.T_OBJECT_OPERATOR,re:/^\\-\\>/i},{value:r.Constants.T_CLASS,re:/^class(?=[\\s\\{])/i,afterWhitespace:!0},{value:r.Constants.T_PUBLIC,re:/^public(?=[\\s])/i},{value:r.Constants.T_PRIVATE,re:/^private(?=[\\s])/i},{value:r.Constants.T_PROTECTED,re:/^protected(?=[\\s])/i},{value:r.Constants.T_ARRAY,re:/^array(?=\\s*?\\()/i},{value:r.Constants.T_EMPTY,re:/^empty(?=[ \\(])/i},{value:r.Constants.T_ISSET,re:/^isset(?=[ \\(])/i},{value:r.Constants.T_UNSET,re:/^unset(?=[ \\(])/i},{value:r.Constants.T_RETURN,re:/^return(?=[ \"'(;])/i},{value:r.Constants.T_FUNCTION,re:/^function(?=[ \"'(;])/i},{value:r.Constants.T_ECHO,re:/^echo(?=[ \"'(;])/i},{value:r.Constants.T_LIST,re:/^list(?=\\s*?\\()/i},{value:r.Constants.T_PRINT,re:/^print(?=[ \"'(;])/i},{value:r.Constants.T_INCLUDE,re:/^include(?=[ \"'(;])/i},{value:r.Constants.T_INCLUDE_ONCE,re:/^include_once(?=[ \"'(;])/i},{value:r.Constants.T_REQUIRE,re:/^require(?=[ \"'(;])/i},{value:r.Constants.T_REQUIRE_ONCE,re:/^require_once(?=[ \"'(;])/i},{value:r.Constants.T_NEW,re:/^new(?=[ ])/i},{value:r.Constants.T_COMMENT,re:/^\\/\\*([\\S\\s]*?)(?:\\*\\/|$)/},{value:r.Constants.T_COMMENT,re:/^\\/\\/.*(\\s)?/},{value:r.Constants.T_COMMENT,re:/^\\#.*(\\s)?/},{value:r.Constants.T_ELSEIF,re:/^elseif(?=[\\s(])/i},{value:r.Constants.T_GOTO,re:/^goto(?=[\\s(])/i},{value:r.Constants.T_ELSE,re:/^else(?=[\\s{:])/i},{value:r.Constants.T_IF,re:/^if(?=[\\s(])/i},{value:r.Constants.T_DO,re:/^do(?=[ {])/i},{value:r.Constants.T_WHILE,re:/^while(?=[ (])/i},{value:r.Constants.T_FOREACH,re:/^foreach(?=[ (])/i},{value:r.Constants.T_ISSET,re:/^isset(?=[ (])/i},{value:r.Constants.T_IS_IDENTICAL,re:/^===/},{value:r.Constants.T_IS_EQUAL,re:/^==/},{value:r.Constants.T_IS_NOT_IDENTICAL,re:/^\\!==/},{value:r.Constants.T_IS_NOT_EQUAL,re:/^(\\!=|\\<\\>)/},{value:r.Constants.T_FOR,re:/^for(?=[ (])/i},{value:r.Constants.T_DNUMBER,re:/^[0-9]*\\.[0-9]+([eE][-]?[0-9]*)?/},{value:r.Constants.T_LNUMBER,re:/^(0x[0-9A-F]+|[0-9]+)/i},{value:r.Constants.T_OPEN_TAG_WITH_ECHO,re:/^(\\<\\?=|\\<\\%=)/i},{value:r.Constants.T_OPEN_TAG,re:u},{value:r.Constants.T_VARIABLE,re:/^\\$[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/},{value:r.Constants.T_WHITESPACE,re:/^\\s+/},{value:r.Constants.T_CONSTANT_ENCAPSED_STRING,re:/^(\"(?:[^\"\\\\]|\\\\[\\s\\S])*\"|'(?:[^'\\\\]|\\\\[\\s\\S])*')/,func:function(e,t){var n=0,i,s=0;if(e.substring(0,1)===\"'\")return e;var o=e.match(/(?:[^\\\\]|\\\\.)*[^\\\\]\\$[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/g);if(o!==null){while(e.length>0){i=e.length,o=e.match(/^[\\[\\]\\;\\:\\?\\(\\)\\!\\.\\,\\>\\<\\=\\+\\-\\/\\*\\|\\&\\@\\^\\%\\\"\\'\\{\\}]/),o!==null&&(f.push(o[0]),e=e.substring(1),n>0&&o[0]===\"}\"&&n--,o[0]===\"[\"&&s++,o[0]===\"]\"&&s--),o=e.match(/^\\$[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/);if(o!==null){f.push([parseInt(r.Constants.T_VARIABLE,10),o[0],l]),e=e.substring(o[0].length),o=e.match(/^(\\-\\>)([a-zA-Z0-9_\\x7f-\\xff]*)/),o!==null&&(f.push([parseInt(r.Constants.T_OBJECT_OPERATOR,10),o[1],l]),f.push([parseInt(r.Constants.T_STRING,10),o[2],l]),e=e.substring(o[0].length));if(e.match(/^\\[/g)!==null)continue}var u;n>0?u=/^([^\\\\\\$\"{}\\]]|\\\\.)+/g:u=/^([^\\\\\\$\"{]|\\\\.|{[^\\$])+/g;while((o=e.match(u))!==null){if(e.length===1)throw new Error(o);f.push([parseInt(n>0?r.Constants.T_CONSTANT_ENCAPSED_STRING:r.Constants.T_ENCAPSED_AND_WHITESPACE,10),o[0],l]),l+=o[0].split(\"\\n\").length-1,e=e.substring(o[0].length)}e.match(/^{\\$/)!==null&&(f.push([parseInt(r.Constants.T_CURLY_OPEN,10),\"{\",l]),e=e.substring(1),n++);if(i===e.length&&(o=e.match(/^(([^\\\\]|\\\\.)*?[^\\\\]\\$[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)/g))!==null)return}return undefined}return e}},{value:r.Constants.T_STRING,re:/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/},{value:-1,re:/^[\\[\\]\\;\\:\\?\\(\\)\\!\\.\\,\\>\\<\\=\\+\\-\\/\\*\\|\\&\\{\\}\\@\\^\\%\\\"\\'\\$\\~]/}],f=[],l=1,c=!1,h=!0;if(e===null)return f;typeof e!=\"string\"&&(e=e.toString());while(e.length>0&&h===!0)if(c===!0)if(n!==undefined){var p=new RegExp(\"([\\\\S\\\\s]*)(\\\\r\\\\n|\\\\n|\\\\r)(\"+n+\")(;|\\\\r\\\\n|\\\\n)\",\"i\"),d=e.match(p);d!==null&&(f.push([parseInt(r.Constants.T_ENCAPSED_AND_WHITESPACE,10),d[1].replace(/^\\n/g,\"\").replace(/\\\\\\$/g,\"$\")+\"\\n\",l]),l+=d[1].split(\"\\n\").length,f.push([parseInt(r.Constants.T_END_HEREDOC,10),d[3],l]),e=e.substring(d[1].length+d[2].length+d[3].length),n=undefined);if(d===null)throw Error(\"sup\")}else h=a.some(function(t){if(t.afterWhitespace===!0){var n=f[f.length-1];if(!Array.isArray(n)||n[0]!==r.Constants.T_WHITESPACE&&n[0]!==r.Constants.T_OPEN_TAG&&n[0]!==r.Constants.T_COMMENT)return!1}var i=e.match(t.re);if(i!==null){if(t.value!==-1){var s=i[0];t.func!==undefined&&(s=t.func(s,t)),s!==undefined&&(f.push([parseInt(t.value,10),s,l]),l+=s.split(\"\\n\").length-1)}else f.push(i[0]);return e=e.substring(i[0].length),!0}return!1});else{var d=o.exec(e);if(d===null)return f.push([parseInt(r.Constants.T_INLINE_HTML,10),e.replace(/^\\n/,\"\"),l]),f;if(d.index>0){var v=e.substring(0,d.index);f.push([parseInt(r.Constants.T_INLINE_HTML,10),v,l]),l+=v.split(\"\\n\").length-1,e=e.substring(d.index)}c=!0}return f},r.Parser=function(e,t){var n=this.yybase,i=this.yydefault,s=this.yycheck,o=this.yyaction,u=this.yylen,a=this.yygbase,f=this.yygcheck,l=this.yyp,c=this.yygoto,h=this.yylhs,p=this.terminals,d=this.translate,v=this.yygdefault;this.pos=-1,this.line=1,this.tokenMap=this.createTokenMap(),this.dropTokens={},this.dropTokens[r.Constants.T_WHITESPACE]=1,this.dropTokens[r.Constants.T_OPEN_TAG]=1;var m=[];e.forEach(function(e,t){typeof e==\"object\"&&e[0]===r.Constants.T_OPEN_TAG_WITH_ECHO?(m.push([r.Constants.T_OPEN_TAG,e[1],e[2]]),m.push([r.Constants.T_ECHO,e[1],e[2]])):m.push(e)}),this.tokens=m;var g=this.TOKEN_NONE;this.startAttributes={startLine:1},this.endAttributes={};var y=[this.startAttributes],b=0,w=[b];this.yyastk=[],this.stackPos=0;var E,S;for(;;){if(n[b]===0)E=i[b];else{g===this.TOKEN_NONE&&(S=this.getNextToken(),g=S>=0&&S<this.TOKEN_MAP_SIZE?d[S]:this.TOKEN_INVALID,y[this.stackPos]=this.startAttributes);if(((E=n[b]+g)>=0&&E<this.YYLAST&&s[E]===g||b<this.YY2TBLSTATE&&(E=n[b+this.YYNLSTATES]+g)>=0&&E<this.YYLAST&&s[E]===g)&&(E=o[E])!==this.YYDEFAULT)if(E>0){++this.stackPos,w[this.stackPos]=b=E,this.yyastk[this.stackPos]=this.tokenValue,y[this.stackPos]=this.startAttributes,g=this.TOKEN_NONE;if(E<this.YYNLSTATES)continue;E-=this.YYNLSTATES}else E=-E;else E=i[b]}for(;;){if(E===0)return this.yyval;if(E===this.YYUNEXPECTED){if(t!==!0){var N=[];for(var C=0;C<this.TOKEN_MAP_SIZE;++C)if((E=n[b]+C)>=0&&E<this.YYLAST&&s[E]==C||b<this.YY2TBLSTATE&&(E=n[b+this.YYNLSTATES]+C)&&E<this.YYLAST&&s[E]==C)if(o[E]!=this.YYUNEXPECTED){if(N.length==4){N=[];break}N.push(this.terminals[C])}var k=\"\";throw N.length&&(k=\", expecting \"+N.join(\" or \")),new r.ParseError(\"syntax error, unexpected \"+p[g]+k,this.startAttributes.startLine)}return this.startAttributes.startLine}for(var x in this.endAttributes)y[this.stackPos-u[E]][x]=this.endAttributes[x];try{this[\"yyn\"+E](y[this.stackPos-u[E]])}catch(T){throw T}this.stackPos-=u[E],E=h[E],(l=a[E]+w[this.stackPos])>=0&&l<this.YYGLAST&&f[l]===E?b=c[l]:b=v[E],++this.stackPos,w[this.stackPos]=b,this.yyastk[this.stackPos]=this.yyval,y[this.stackPos]=this.startAttributes;if(b<this.YYNLSTATES)break;E=b-this.YYNLSTATES}}},r.ParseError=function(e,t){this.message=e,this.line=t},r.Parser.prototype.MODIFIER_PUBLIC=1,r.Parser.prototype.MODIFIER_PROTECTED=2,r.Parser.prototype.MODIFIER_PRIVATE=4,r.Parser.prototype.MODIFIER_STATIC=8,r.Parser.prototype.MODIFIER_ABSTRACT=16,r.Parser.prototype.MODIFIER_FINAL=32,r.Parser.prototype.getNextToken=function(){this.startAttributes={},this.endAttributes={};var e,t;while(this.tokens[++this.pos]!==undefined){e=this.tokens[this.pos];if(typeof e==\"string\")return this.startAttributes.startLine=this.line,this.endAttributes.endLine=this.line,this.tokenValue=e,e.charCodeAt(0);this.line+=(t=e[1].match(/\\n/g))===null?0:t.length;if(r.Constants.T_COMMENT===e[0])Array.isArray(this.startAttributes.comments)||(this.startAttributes.comments=[]),this.startAttributes.comments.push({type:\"comment\",comment:e[1],line:e[2]});else if(r.Constants.T_DOC_COMMENT===e[0])this.startAttributes.comments.push(new PHPParser_Comment_Doc(e[1],e[2]));else if(this.dropTokens[e[0]]===undefined)return this.tokenValue=e[1],this.startAttributes.startLine=e[2],this.endAttributes.endLine=this.line,this.tokenMap[e[0]]}return this.startAttributes.startLine=this.line,0},r.Parser.prototype.tokenName=function(e){var t=[\"T_INCLUDE\",\"T_INCLUDE_ONCE\",\"T_EVAL\",\"T_REQUIRE\",\"T_REQUIRE_ONCE\",\"T_LOGICAL_OR\",\"T_LOGICAL_XOR\",\"T_LOGICAL_AND\",\"T_PRINT\",\"T_PLUS_EQUAL\",\"T_MINUS_EQUAL\",\"T_MUL_EQUAL\",\"T_DIV_EQUAL\",\"T_CONCAT_EQUAL\",\"T_MOD_EQUAL\",\"T_AND_EQUAL\",\"T_OR_EQUAL\",\"T_XOR_EQUAL\",\"T_SL_EQUAL\",\"T_SR_EQUAL\",\"T_BOOLEAN_OR\",\"T_BOOLEAN_AND\",\"T_IS_EQUAL\",\"T_IS_NOT_EQUAL\",\"T_IS_IDENTICAL\",\"T_IS_NOT_IDENTICAL\",\"T_IS_SMALLER_OR_EQUAL\",\"T_IS_GREATER_OR_EQUAL\",\"T_SL\",\"T_SR\",\"T_INSTANCEOF\",\"T_INC\",\"T_DEC\",\"T_INT_CAST\",\"T_DOUBLE_CAST\",\"T_STRING_CAST\",\"T_ARRAY_CAST\",\"T_OBJECT_CAST\",\"T_BOOL_CAST\",\"T_UNSET_CAST\",\"T_NEW\",\"T_CLONE\",\"T_EXIT\",\"T_IF\",\"T_ELSEIF\",\"T_ELSE\",\"T_ENDIF\",\"T_LNUMBER\",\"T_DNUMBER\",\"T_STRING\",\"T_STRING_VARNAME\",\"T_VARIABLE\",\"T_NUM_STRING\",\"T_INLINE_HTML\",\"T_CHARACTER\",\"T_BAD_CHARACTER\",\"T_ENCAPSED_AND_WHITESPACE\",\"T_CONSTANT_ENCAPSED_STRING\",\"T_ECHO\",\"T_DO\",\"T_WHILE\",\"T_ENDWHILE\",\"T_FOR\",\"T_ENDFOR\",\"T_FOREACH\",\"T_ENDFOREACH\",\"T_DECLARE\",\"T_ENDDECLARE\",\"T_AS\",\"T_SWITCH\",\"T_ENDSWITCH\",\"T_CASE\",\"T_DEFAULT\",\"T_BREAK\",\"T_CONTINUE\",\"T_GOTO\",\"T_FUNCTION\",\"T_CONST\",\"T_RETURN\",\"T_TRY\",\"T_CATCH\",\"T_THROW\",\"T_USE\",\"T_INSTEADOF\",\"T_GLOBAL\",\"T_STATIC\",\"T_ABSTRACT\",\"T_FINAL\",\"T_PRIVATE\",\"T_PROTECTED\",\"T_PUBLIC\",\"T_VAR\",\"T_UNSET\",\"T_ISSET\",\"T_EMPTY\",\"T_HALT_COMPILER\",\"T_CLASS\",\"T_TRAIT\",\"T_INTERFACE\",\"T_EXTENDS\",\"T_IMPLEMENTS\",\"T_OBJECT_OPERATOR\",\"T_DOUBLE_ARROW\",\"T_LIST\",\"T_ARRAY\",\"T_CALLABLE\",\"T_CLASS_C\",\"T_TRAIT_C\",\"T_METHOD_C\",\"T_FUNC_C\",\"T_LINE\",\"T_FILE\",\"T_COMMENT\",\"T_DOC_COMMENT\",\"T_OPEN_TAG\",\"T_OPEN_TAG_WITH_ECHO\",\"T_CLOSE_TAG\",\"T_WHITESPACE\",\"T_START_HEREDOC\",\"T_END_HEREDOC\",\"T_DOLLAR_OPEN_CURLY_BRACES\",\"T_CURLY_OPEN\",\"T_PAAMAYIM_NEKUDOTAYIM\",\"T_DOUBLE_COLON\",\"T_NAMESPACE\",\"T_NS_C\",\"T_DIR\",\"T_NS_SEPARATOR\"],n=\"UNKNOWN\";return t.some(function(t){return r.Constants[t]===e?(n=t,!0):!1}),n},r.Parser.prototype.createTokenMap=function(){var e={},t,n,i=r.Constants.T_PAAMAYIM_NEKUDOTAYIM;for(n=256;n<1e3;++n)i===n?e[n]=this.T_PAAMAYIM_NEKUDOTAYIM:r.Constants.T_OPEN_TAG_WITH_ECHO===n?e[n]=r.Constants.T_ECHO:r.Constants.T_CLOSE_TAG===n?e[n]=59:\"UNKNOWN\"!==(t=this.tokenName(n))&&(e[n]=this[t]);return e},r.Parser.prototype.TOKEN_NONE=-1,r.Parser.prototype.TOKEN_INVALID=149,r.Parser.prototype.TOKEN_MAP_SIZE=384,r.Parser.prototype.YYLAST=913,r.Parser.prototype.YY2TBLSTATE=328,r.Parser.prototype.YYGLAST=415,r.Parser.prototype.YYNLSTATES=544,r.Parser.prototype.YYUNEXPECTED=32767,r.Parser.prototype.YYDEFAULT=-32766,r.Parser.prototype.YYERRTOK=256,r.Parser.prototype.T_INCLUDE=257,r.Parser.prototype.T_INCLUDE_ONCE=258,r.Parser.prototype.T_EVAL=259,r.Parser.prototype.T_REQUIRE=260,r.Parser.prototype.T_REQUIRE_ONCE=261,r.Parser.prototype.T_LOGICAL_OR=262,r.Parser.prototype.T_LOGICAL_XOR=263,r.Parser.prototype.T_LOGICAL_AND=264,r.Parser.prototype.T_PRINT=265,r.Parser.prototype.T_PLUS_EQUAL=266,r.Parser.prototype.T_MINUS_EQUAL=267,r.Parser.prototype.T_MUL_EQUAL=268,r.Parser.prototype.T_DIV_EQUAL=269,r.Parser.prototype.T_CONCAT_EQUAL=270,r.Parser.prototype.T_MOD_EQUAL=271,r.Parser.prototype.T_AND_EQUAL=272,r.Parser.prototype.T_OR_EQUAL=273,r.Parser.prototype.T_XOR_EQUAL=274,r.Parser.prototype.T_SL_EQUAL=275,r.Parser.prototype.T_SR_EQUAL=276,r.Parser.prototype.T_BOOLEAN_OR=277,r.Parser.prototype.T_BOOLEAN_AND=278,r.Parser.prototype.T_IS_EQUAL=279,r.Parser.prototype.T_IS_NOT_EQUAL=280,r.Parser.prototype.T_IS_IDENTICAL=281,r.Parser.prototype.T_IS_NOT_IDENTICAL=282,r.Parser.prototype.T_IS_SMALLER_OR_EQUAL=283,r.Parser.prototype.T_IS_GREATER_OR_EQUAL=284,r.Parser.prototype.T_SL=285,r.Parser.prototype.T_SR=286,r.Parser.prototype.T_INSTANCEOF=287,r.Parser.prototype.T_INC=288,r.Parser.prototype.T_DEC=289,r.Parser.prototype.T_INT_CAST=290,r.Parser.prototype.T_DOUBLE_CAST=291,r.Parser.prototype.T_STRING_CAST=292,r.Parser.prototype.T_ARRAY_CAST=293,r.Parser.prototype.T_OBJECT_CAST=294,r.Parser.prototype.T_BOOL_CAST=295,r.Parser.prototype.T_UNSET_CAST=296,r.Parser.prototype.T_NEW=297,r.Parser.prototype.T_CLONE=298,r.Parser.prototype.T_EXIT=299,r.Parser.prototype.T_IF=300,r.Parser.prototype.T_ELSEIF=301,r.Parser.prototype.T_ELSE=302,r.Parser.prototype.T_ENDIF=303,r.Parser.prototype.T_LNUMBER=304,r.Parser.prototype.T_DNUMBER=305,r.Parser.prototype.T_STRING=306,r.Parser.prototype.T_STRING_VARNAME=307,r.Parser.prototype.T_VARIABLE=308,r.Parser.prototype.T_NUM_STRING=309,r.Parser.prototype.T_INLINE_HTML=310,r.Parser.prototype.T_CHARACTER=311,r.Parser.prototype.T_BAD_CHARACTER=312,r.Parser.prototype.T_ENCAPSED_AND_WHITESPACE=313,r.Parser.prototype.T_CONSTANT_ENCAPSED_STRING=314,r.Parser.prototype.T_ECHO=315,r.Parser.prototype.T_DO=316,r.Parser.prototype.T_WHILE=317,r.Parser.prototype.T_ENDWHILE=318,r.Parser.prototype.T_FOR=319,r.Parser.prototype.T_ENDFOR=320,r.Parser.prototype.T_FOREACH=321,r.Parser.prototype.T_ENDFOREACH=322,r.Parser.prototype.T_DECLARE=323,r.Parser.prototype.T_ENDDECLARE=324,r.Parser.prototype.T_AS=325,r.Parser.prototype.T_SWITCH=326,r.Parser.prototype.T_ENDSWITCH=327,r.Parser.prototype.T_CASE=328,r.Parser.prototype.T_DEFAULT=329,r.Parser.prototype.T_BREAK=330,r.Parser.prototype.T_CONTINUE=331,r.Parser.prototype.T_GOTO=332,r.Parser.prototype.T_FUNCTION=333,r.Parser.prototype.T_CONST=334,r.Parser.prototype.T_RETURN=335,r.Parser.prototype.T_TRY=336,r.Parser.prototype.T_CATCH=337,r.Parser.prototype.T_THROW=338,r.Parser.prototype.T_USE=339,r.Parser.prototype.T_INSTEADOF=340,r.Parser.prototype.T_GLOBAL=341,r.Parser.prototype.T_STATIC=342,r.Parser.prototype.T_ABSTRACT=343,r.Parser.prototype.T_FINAL=344,r.Parser.prototype.T_PRIVATE=345,r.Parser.prototype.T_PROTECTED=346,r.Parser.prototype.T_PUBLIC=347,r.Parser.prototype.T_VAR=348,r.Parser.prototype.T_UNSET=349,r.Parser.prototype.T_ISSET=350,r.Parser.prototype.T_EMPTY=351,r.Parser.prototype.T_HALT_COMPILER=352,r.Parser.prototype.T_CLASS=353,r.Parser.prototype.T_TRAIT=354,r.Parser.prototype.T_INTERFACE=355,r.Parser.prototype.T_EXTENDS=356,r.Parser.prototype.T_IMPLEMENTS=357,r.Parser.prototype.T_OBJECT_OPERATOR=358,r.Parser.prototype.T_DOUBLE_ARROW=359,r.Parser.prototype.T_LIST=360,r.Parser.prototype.T_ARRAY=361,r.Parser.prototype.T_CALLABLE=362,r.Parser.prototype.T_CLASS_C=363,r.Parser.prototype.T_TRAIT_C=364,r.Parser.prototype.T_METHOD_C=365,r.Parser.prototype.T_FUNC_C=366,r.Parser.prototype.T_LINE=367,r.Parser.prototype.T_FILE=368,r.Parser.prototype.T_COMMENT=369,r.Parser.prototype.T_DOC_COMMENT=370,r.Parser.prototype.T_OPEN_TAG=371,r.Parser.prototype.T_OPEN_TAG_WITH_ECHO=372,r.Parser.prototype.T_CLOSE_TAG=373,r.Parser.prototype.T_WHITESPACE=374,r.Parser.prototype.T_START_HEREDOC=375,r.Parser.prototype.T_END_HEREDOC=376,r.Parser.prototype.T_DOLLAR_OPEN_CURLY_BRACES=377,r.Parser.prototype.T_CURLY_OPEN=378,r.Parser.prototype.T_PAAMAYIM_NEKUDOTAYIM=379,r.Parser.prototype.T_NAMESPACE=380,r.Parser.prototype.T_NS_C=381,r.Parser.prototype.T_DIR=382,r.Parser.prototype.T_NS_SEPARATOR=383,r.Parser.prototype.terminals=[\"$EOF\",\"error\",\"T_INCLUDE\",\"T_INCLUDE_ONCE\",\"T_EVAL\",\"T_REQUIRE\",\"T_REQUIRE_ONCE\",\"','\",\"T_LOGICAL_OR\",\"T_LOGICAL_XOR\",\"T_LOGICAL_AND\",\"T_PRINT\",\"'='\",\"T_PLUS_EQUAL\",\"T_MINUS_EQUAL\",\"T_MUL_EQUAL\",\"T_DIV_EQUAL\",\"T_CONCAT_EQUAL\",\"T_MOD_EQUAL\",\"T_AND_EQUAL\",\"T_OR_EQUAL\",\"T_XOR_EQUAL\",\"T_SL_EQUAL\",\"T_SR_EQUAL\",\"'?'\",\"':'\",\"T_BOOLEAN_OR\",\"T_BOOLEAN_AND\",\"'|'\",\"'^'\",\"'&'\",\"T_IS_EQUAL\",\"T_IS_NOT_EQUAL\",\"T_IS_IDENTICAL\",\"T_IS_NOT_IDENTICAL\",\"'<'\",\"T_IS_SMALLER_OR_EQUAL\",\"'>'\",\"T_IS_GREATER_OR_EQUAL\",\"T_SL\",\"T_SR\",\"'+'\",\"'-'\",\"'.'\",\"'*'\",\"'/'\",\"'%'\",\"'!'\",\"T_INSTANCEOF\",\"'~'\",\"T_INC\",\"T_DEC\",\"T_INT_CAST\",\"T_DOUBLE_CAST\",\"T_STRING_CAST\",\"T_ARRAY_CAST\",\"T_OBJECT_CAST\",\"T_BOOL_CAST\",\"T_UNSET_CAST\",\"'@'\",\"'['\",\"T_NEW\",\"T_CLONE\",\"T_EXIT\",\"T_IF\",\"T_ELSEIF\",\"T_ELSE\",\"T_ENDIF\",\"T_LNUMBER\",\"T_DNUMBER\",\"T_STRING\",\"T_STRING_VARNAME\",\"T_VARIABLE\",\"T_NUM_STRING\",\"T_INLINE_HTML\",\"T_ENCAPSED_AND_WHITESPACE\",\"T_CONSTANT_ENCAPSED_STRING\",\"T_ECHO\",\"T_DO\",\"T_WHILE\",\"T_ENDWHILE\",\"T_FOR\",\"T_ENDFOR\",\"T_FOREACH\",\"T_ENDFOREACH\",\"T_DECLARE\",\"T_ENDDECLARE\",\"T_AS\",\"T_SWITCH\",\"T_ENDSWITCH\",\"T_CASE\",\"T_DEFAULT\",\"T_BREAK\",\"T_CONTINUE\",\"T_GOTO\",\"T_FUNCTION\",\"T_CONST\",\"T_RETURN\",\"T_TRY\",\"T_CATCH\",\"T_THROW\",\"T_USE\",\"T_INSTEADOF\",\"T_GLOBAL\",\"T_STATIC\",\"T_ABSTRACT\",\"T_FINAL\",\"T_PRIVATE\",\"T_PROTECTED\",\"T_PUBLIC\",\"T_VAR\",\"T_UNSET\",\"T_ISSET\",\"T_EMPTY\",\"T_HALT_COMPILER\",\"T_CLASS\",\"T_TRAIT\",\"T_INTERFACE\",\"T_EXTENDS\",\"T_IMPLEMENTS\",\"T_OBJECT_OPERATOR\",\"T_DOUBLE_ARROW\",\"T_LIST\",\"T_ARRAY\",\"T_CALLABLE\",\"T_CLASS_C\",\"T_TRAIT_C\",\"T_METHOD_C\",\"T_FUNC_C\",\"T_LINE\",\"T_FILE\",\"T_START_HEREDOC\",\"T_END_HEREDOC\",\"T_DOLLAR_OPEN_CURLY_BRACES\",\"T_CURLY_OPEN\",\"T_PAAMAYIM_NEKUDOTAYIM\",\"T_NAMESPACE\",\"T_NS_C\",\"T_DIR\",\"T_NS_SEPARATOR\",\"';'\",\"'{'\",\"'}'\",\"'('\",\"')'\",\"'$'\",\"']'\",\"'`'\",\"'\\\"'\",\"???\"],r.Parser.prototype.translate=[0,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,47,148,149,145,46,30,149,143,144,44,41,7,42,43,45,149,149,149,149,149,149,149,149,149,149,25,140,35,12,37,24,59,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,60,149,146,29,149,147,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,141,28,142,49,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,1,2,3,4,5,6,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,26,27,31,32,33,34,36,38,39,40,48,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,149,149,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,149,149,149,149,149,149,131,132,133,134,135,136,137,138,139],r.Parser.prototype.yyaction=[61,62,363,63,64,-32766,-32766,-32766,509,65,708,709,710,707,706,705,-32766,-32766,-32766,-32766,-32766,-32766,132,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767,-32766,335,-32766,-32766,-32766,-32766,-32766,66,67,351,663,664,40,68,548,69,232,233,70,71,72,73,74,75,76,77,30,246,78,336,364,-112,0,469,833,834,365,641,890,436,590,41,835,53,27,366,294,367,687,368,921,369,923,922,370,-32766,-32766,-32766,42,43,371,339,126,44,372,337,79,297,349,292,293,-32766,918,-32766,-32766,373,374,375,376,377,391,199,361,338,573,613,378,379,380,381,845,839,840,841,842,836,837,253,-32766,87,88,89,391,843,838,338,597,519,128,80,129,273,332,257,261,47,673,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,799,247,884,108,109,110,226,247,21,-32766,310,-32766,-32766,-32766,642,548,-32766,-32766,-32766,-32766,56,353,-32766,-32766,-32766,55,-32766,-32766,-32766,-32766,-32766,58,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766,557,-32766,-32766,518,-32766,548,890,-32766,390,-32766,228,252,-32766,-32766,-32766,-32766,-32766,275,-32766,234,-32766,587,588,-32766,-32766,-32766,-32766,-32766,-32766,-32766,46,236,-32766,-32766,281,-32766,682,348,-32766,390,-32766,346,333,521,-32766,-32766,-32766,271,911,262,237,446,911,-32766,894,59,700,358,135,548,123,538,35,-32766,333,122,-32766,-32766,-32766,271,-32766,124,-32766,692,-32766,-32766,-32766,-32766,700,273,22,-32766,-32766,-32766,-32766,239,-32766,-32766,612,-32766,548,134,-32766,390,-32766,462,354,-32766,-32766,-32766,-32766,-32766,227,-32766,238,-32766,845,542,-32766,856,611,200,-32766,-32766,-32766,259,280,-32766,-32766,201,-32766,855,129,-32766,390,130,202,333,206,-32766,-32766,-32766,271,-32766,-32766,-32766,125,601,-32766,136,299,700,489,28,548,105,106,107,-32766,498,499,-32766,-32766,-32766,207,-32766,133,-32766,525,-32766,-32766,-32766,-32766,663,664,527,-32766,-32766,-32766,-32766,528,-32766,-32766,610,-32766,548,427,-32766,390,-32766,532,539,-32766,-32766,-32766,-32766,-32766,240,-32766,247,-32766,697,543,-32766,554,523,608,-32766,-32766,-32766,686,535,-32766,-32766,54,-32766,57,60,-32766,390,246,-155,278,345,-32766,-32766,-32766,506,347,-152,471,402,403,-32766,405,404,272,493,416,548,318,417,505,-32766,517,548,-32766,-32766,-32766,549,-32766,562,-32766,916,-32766,-32766,-32766,-32766,564,826,848,-32766,-32766,-32766,-32766,694,-32766,-32766,485,-32766,548,487,-32766,390,-32766,504,802,-32766,-32766,-32766,-32766,-32766,279,-32766,911,-32766,502,492,-32766,413,483,269,-32766,-32766,-32766,243,337,-32766,-32766,418,-32766,454,229,-32766,390,274,373,374,344,-32766,-32766,-32766,360,614,-32766,573,613,378,379,-274,548,615,-332,844,-32766,258,51,-32766,-32766,-32766,270,-32766,346,-32766,52,-32766,260,0,-32766,-333,-32766,-32766,-32766,-32766,-32766,-32766,205,-32766,-32766,49,-32766,548,424,-32766,390,-32766,-266,264,-32766,-32766,-32766,-32766,-32766,409,-32766,343,-32766,265,312,-32766,470,513,-275,-32766,-32766,-32766,920,337,-32766,-32766,530,-32766,531,600,-32766,390,592,373,374,578,581,-32766,-32766,644,629,-32766,573,613,378,379,635,548,636,576,627,-32766,625,693,-32766,-32766,-32766,691,-32766,591,-32766,582,-32766,203,204,-32766,584,583,-32766,-32766,-32766,-32766,586,599,-32766,-32766,589,-32766,690,558,-32766,390,197,683,919,86,520,522,-32766,524,833,834,529,533,-32766,534,537,541,835,48,111,112,113,114,115,116,117,118,119,120,121,127,31,633,337,330,634,585,-32766,32,291,337,330,478,373,374,917,291,891,889,875,373,374,553,613,378,379,737,739,887,553,613,378,379,824,451,675,839,840,841,842,836,837,320,895,277,885,23,33,843,838,556,277,337,330,-32766,34,-32766,555,291,36,37,38,373,374,39,45,50,81,82,83,84,553,613,378,379,-32767,-32767,-32767,-32767,103,104,105,106,107,337,85,131,137,337,138,198,224,225,277,373,374,-332,230,373,374,24,337,231,573,613,378,379,573,613,378,379,373,374,235,248,249,250,337,251,0,573,613,378,379,276,329,331,373,374,-32766,337,574,490,792,337,609,573,613,378,379,373,374,25,300,373,374,319,337,795,573,613,378,379,573,613,378,379,373,374,516,355,359,445,482,796,507,573,613,378,379,508,548,337,890,775,791,337,604,803,808,806,698,373,374,888,807,373,374,-32766,-32766,-32766,573,613,378,379,573,613,378,379,873,832,804,872,851,-32766,809,-32766,-32766,-32766,-32766,805,20,26,29,298,480,515,770,778,827,457,0,900,455,774,0,0,0,874,870,886,823,915,852,869,488,0,391,793,0,338,0,0,0,340,0,273],r.Parser.prototype.yycheck=[2,3,4,5,6,8,9,10,70,11,104,105,106,107,108,109,8,9,10,8,9,24,60,26,27,28,29,30,31,32,33,34,24,7,26,27,28,29,30,41,42,7,123,124,7,47,70,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,144,0,75,68,69,70,25,72,70,74,7,76,77,78,79,7,81,142,83,70,85,72,73,88,8,9,10,92,93,94,95,7,97,98,95,100,7,7,103,104,24,142,26,27,105,106,111,112,113,136,7,7,139,114,115,116,117,122,123,132,125,126,127,128,129,130,131,8,8,9,10,136,137,138,139,140,141,25,143,141,145,142,147,148,24,72,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,144,48,72,44,45,46,30,48,144,64,72,8,9,10,140,70,8,9,10,74,60,25,77,78,79,60,81,24,83,26,85,60,24,88,26,27,28,92,93,94,64,140,97,98,70,100,70,72,103,104,74,145,7,77,78,79,111,81,7,83,30,85,140,140,88,8,9,10,92,93,94,133,134,97,98,145,100,140,7,103,104,24,139,96,141,140,141,111,101,75,75,30,70,75,64,70,60,110,121,12,70,141,25,143,74,96,141,77,78,79,101,81,141,83,140,85,140,141,88,110,145,144,92,93,94,64,7,97,98,142,100,70,141,103,104,74,145,141,77,78,79,111,81,7,83,30,85,132,25,88,132,142,12,92,93,94,120,60,97,98,12,100,148,141,103,104,141,12,96,12,140,141,111,101,8,9,10,141,25,64,90,91,110,65,66,70,41,42,43,74,65,66,77,78,79,12,81,25,83,25,85,140,141,88,123,124,25,92,93,94,64,25,97,98,142,100,70,120,103,104,74,25,25,77,78,79,111,81,30,83,48,85,140,141,88,140,141,30,92,93,94,140,141,97,98,60,100,60,60,103,104,61,72,75,70,140,141,111,67,70,87,99,70,70,64,70,72,102,89,70,70,71,70,70,74,70,70,77,78,79,70,81,70,83,70,85,140,141,88,70,144,70,92,93,94,64,70,97,98,72,100,70,72,103,104,74,72,72,77,78,79,111,81,75,83,75,85,89,86,88,79,101,118,92,93,94,87,95,97,98,87,100,87,87,103,104,118,105,106,95,140,141,111,95,115,64,114,115,116,117,135,70,115,120,132,74,120,140,77,78,79,119,81,139,83,140,85,120,-1,88,120,140,141,92,93,94,64,121,97,98,121,100,70,122,103,104,74,135,135,77,78,79,111,81,139,83,139,85,135,135,88,135,135,135,92,93,94,142,95,97,98,140,100,140,140,103,104,140,105,106,140,140,141,111,140,140,64,114,115,116,117,140,70,140,140,140,74,140,140,77,78,79,140,81,140,83,140,85,41,42,88,140,140,141,92,93,94,140,140,97,98,140,100,140,140,103,104,60,140,142,141,141,141,111,141,68,69,141,141,72,141,141,141,76,12,13,14,15,16,17,18,19,20,21,22,23,141,143,142,95,96,142,140,141,143,101,95,96,142,105,106,142,101,142,142,142,105,106,114,115,116,117,50,51,142,114,115,116,117,142,123,142,125,126,127,128,129,130,131,142,136,142,144,143,137,138,142,136,95,96,143,143,145,142,101,143,143,143,105,106,143,143,143,143,143,143,143,114,115,116,117,35,36,37,38,39,40,41,42,43,95,143,143,143,95,143,143,143,143,136,105,106,120,143,105,106,144,95,143,114,115,116,117,114,115,116,117,105,106,143,143,143,143,95,143,-1,114,115,116,117,143,143,143,105,106,143,95,142,80,146,95,142,114,115,116,117,105,106,144,144,105,106,144,95,142,114,115,116,117,114,115,116,117,105,106,82,144,144,144,144,142,84,114,115,116,117,144,70,95,72,144,144,95,142,144,146,144,142,105,106,146,144,105,106,8,9,10,114,115,116,117,114,115,116,117,144,144,144,144,144,24,104,26,27,28,29,144,144,144,144,144,144,144,144,144,144,144,-1,144,144,144,-1,-1,-1,146,146,146,146,146,146,146,146,-1,136,147,-1,139,-1,-1,-1,143,-1,145],r.Parser.prototype.yybase=[0,574,581,623,655,2,718,402,747,659,672,688,743,701,705,483,483,483,483,483,351,356,366,366,367,366,344,-2,-2,-2,200,200,231,231,231,231,231,231,231,231,200,231,451,482,532,316,370,115,146,285,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,44,474,429,476,481,487,488,739,740,741,734,733,416,736,539,541,342,542,543,552,557,559,536,567,737,755,569,735,738,123,123,123,123,123,123,123,123,123,122,11,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,227,227,173,577,577,577,577,577,577,577,577,577,577,577,79,178,846,8,-3,-3,-3,-3,642,706,706,706,706,157,179,242,431,431,360,431,525,368,767,767,767,767,767,767,767,767,767,767,767,767,350,375,315,315,652,652,-81,-81,-81,-81,251,185,188,184,-62,348,195,195,195,408,392,410,1,192,129,129,129,-24,-24,-24,-24,499,-24,-24,-24,113,108,108,12,161,349,526,271,398,529,438,130,206,265,427,76,414,427,288,295,76,166,44,262,422,141,491,372,494,413,71,92,93,267,135,100,34,415,745,746,742,-38,420,-10,135,147,744,498,107,26,493,144,377,363,369,332,363,400,377,588,377,376,377,360,37,582,376,377,374,376,388,363,364,412,369,377,441,443,390,106,332,377,390,377,400,64,590,591,323,592,589,593,649,608,362,500,399,407,620,625,636,365,354,614,524,425,359,355,423,570,578,357,406,414,394,352,403,531,433,403,653,434,385,417,411,444,310,318,501,425,668,757,380,637,684,403,609,387,87,325,638,382,403,639,403,696,503,615,403,697,384,435,425,352,352,352,700,66,699,583,702,707,704,748,721,749,584,750,358,583,722,751,682,215,613,422,436,389,447,221,257,752,403,403,506,499,403,395,685,397,426,753,392,391,647,683,403,418,754,221,723,587,724,450,568,507,648,509,327,725,353,497,610,454,622,455,461,404,510,373,732,612,247,361,664,463,405,692,641,464,465,511,343,437,335,409,396,665,293,467,468,472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,0,0,0,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,0,0,0,0,0,0,0,0,0,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,767,767,767,767,767,767,767,767,767,767,767,123,123,123,123,123,123,123,123,0,129,129,129,129,-94,-94,-94,767,767,767,767,767,767,0,0,0,0,0,0,0,0,0,0,0,0,-94,-94,129,129,767,767,-24,-24,-24,-24,-24,108,108,108,-24,108,145,145,145,108,108,108,100,100,0,0,0,0,0,0,0,145,0,0,0,376,0,0,0,145,260,260,221,260,260,135,0,0,425,376,0,364,376,0,0,0,0,0,0,531,0,87,637,241,425,0,0,0,0,0,0,0,425,289,289,306,0,358,0,0,0,306,241,0,0,221],r.Parser.prototype.yydefault=[3,32767,32767,1,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,104,96,110,95,106,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,358,358,122,122,122,122,122,122,122,122,316,32767,32767,32767,32767,32767,32767,32767,32767,32767,173,173,173,32767,348,348,348,348,348,348,348,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,363,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,232,233,235,236,172,125,349,362,171,199,201,250,200,177,182,183,184,185,186,187,188,189,190,191,192,176,229,228,197,313,313,316,32767,32767,32767,32767,32767,32767,32767,32767,198,202,204,203,219,220,217,218,175,221,222,223,224,157,157,157,357,357,32767,357,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,158,32767,211,212,276,276,117,117,117,117,117,32767,32767,32767,32767,284,32767,32767,32767,32767,32767,286,32767,32767,206,207,205,32767,32767,32767,32767,32767,32767,32767,32767,32767,285,32767,32767,32767,32767,32767,32767,32767,32767,334,321,272,32767,32767,32767,265,32767,107,109,32767,32767,32767,32767,302,339,32767,32767,32767,17,32767,32767,32767,370,334,32767,32767,19,32767,32767,32767,32767,227,32767,338,332,32767,32767,32767,32767,32767,32767,63,32767,32767,32767,32767,32767,63,281,63,32767,63,32767,315,287,32767,63,74,32767,72,32767,32767,76,32767,63,93,93,254,315,54,63,254,63,32767,32767,32767,32767,4,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,267,32767,323,32767,337,336,324,32767,265,32767,215,194,266,32767,196,32767,32767,270,273,32767,32767,32767,134,32767,268,180,32767,32767,32767,32767,365,32767,32767,174,32767,32767,32767,130,32767,61,332,32767,32767,355,32767,32767,332,269,208,209,210,32767,121,32767,310,32767,32767,32767,32767,32767,32767,327,32767,333,32767,32767,32767,32767,111,32767,302,32767,32767,32767,75,32767,32767,178,126,32767,32767,364,32767,32767,32767,320,32767,32767,32767,32767,32767,62,32767,32767,77,32767,32767,32767,32767,332,32767,32767,32767,115,32767,169,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,332,32767,32767,32767,32767,32767,32767,32767,4,32767,151,32767,32767,32767,32767,32767,32767,32767,25,25,3,137,3,137,25,101,25,25,137,93,93,25,25,25,144,25,25,25,25,25,25,25,25],r.Parser.prototype.yygoto=[141,141,173,173,173,173,173,173,173,173,141,173,142,143,144,148,153,155,181,175,172,172,172,172,174,174,174,174,174,174,174,168,169,170,171,179,757,758,392,760,781,782,783,784,785,786,787,789,725,145,146,147,149,150,151,152,154,177,178,180,196,208,209,210,211,212,213,214,215,217,218,219,220,244,245,266,267,268,430,431,432,182,183,184,185,186,187,188,189,190,191,192,156,157,158,159,176,160,194,161,162,163,164,195,165,193,139,166,167,452,452,452,452,452,452,452,452,452,452,452,453,453,453,453,453,453,453,453,453,453,453,551,551,551,464,491,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,407,552,552,552,810,810,662,662,662,662,662,594,283,595,510,399,399,567,679,632,849,850,863,660,714,426,222,622,622,622,622,223,617,623,494,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,465,472,514,904,398,398,425,425,459,425,419,322,421,421,393,396,412,422,428,460,463,473,481,501,5,476,284,327,1,15,2,6,7,550,550,550,8,9,10,668,16,11,17,12,18,13,19,14,704,328,881,881,643,628,626,626,624,626,526,401,652,647,847,847,847,847,847,847,847,847,847,847,847,437,438,441,447,477,479,497,290,910,910,400,400,486,880,880,263,913,910,303,255,723,306,822,821,306,896,896,896,861,304,323,410,913,913,897,316,420,769,658,559,879,671,536,324,466,565,311,311,311,801,241,676,496,439,440,442,444,448,475,631,858,311,285,286,603,495,712,0,406,321,0,0,0,314,0,0,429,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,411],r.Parser.prototype.yygcheck=[15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,35,35,35,35,35,35,35,35,35,35,35,86,86,86,86,86,86,86,86,86,86,86,6,6,6,21,21,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,71,7,7,7,35,35,35,35,35,35,35,29,44,29,35,86,86,12,12,12,12,12,12,12,12,75,40,35,35,35,35,40,35,35,35,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,36,36,36,104,82,82,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,13,42,42,42,2,13,2,13,13,5,5,5,13,13,13,54,13,13,13,13,13,13,13,13,67,67,83,83,5,5,5,5,5,5,5,5,5,5,93,93,93,93,93,93,93,93,93,93,93,52,52,52,52,52,52,52,4,105,105,89,89,94,84,84,92,105,105,26,92,71,4,91,91,4,84,84,84,97,30,70,30,105,105,102,27,30,72,50,10,84,55,46,9,30,11,90,90,90,80,30,56,30,85,85,85,85,85,85,43,96,90,44,44,34,77,69,-1,4,90,-1,-1,-1,4,-1,-1,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,71],r.Parser.prototype.yygbase=[0,0,-286,0,10,239,130,154,0,-10,25,-23,-29,-289,0,-30,0,0,0,0,0,83,0,0,0,0,245,84,-11,142,-28,0,0,0,-13,-88,-42,0,0,0,-344,0,-38,-12,-188,0,23,0,0,0,66,0,247,0,205,24,-18,0,0,0,0,0,0,0,0,0,0,13,0,-15,85,74,70,0,0,148,0,-14,0,0,-6,0,-35,11,47,278,-77,0,0,44,68,43,38,72,94,0,-16,109,0,0,0,0,87,0,170,34,0],r.Parser.prototype.yygdefault=[-32768,362,3,546,382,570,571,572,307,305,560,566,467,4,568,140,295,575,296,500,577,414,579,580,308,309,415,315,216,593,503,313,596,357,602,301,449,383,350,461,221,423,456,630,282,638,540,646,649,450,657,352,433,434,667,672,677,680,334,325,474,684,685,256,689,511,512,703,242,711,317,724,342,788,790,397,408,484,797,326,800,384,385,386,387,435,818,815,289,866,287,443,254,853,468,356,903,862,288,388,389,302,898,341,905,912,458],r.Parser.prototype.yylhs=[0,1,2,2,4,4,3,3,3,3,3,3,3,3,3,8,8,10,10,10,10,9,9,11,13,13,14,14,14,14,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,33,33,34,27,27,30,30,6,7,7,7,37,37,37,38,38,41,41,39,39,42,42,22,22,29,29,32,32,31,31,43,23,23,23,23,44,44,45,45,46,46,20,20,16,16,47,18,18,48,17,17,19,19,36,36,49,49,50,50,51,51,51,51,52,52,53,53,54,54,24,24,55,55,55,25,25,56,56,40,40,57,57,57,57,62,62,63,63,64,64,64,64,65,66,66,61,61,58,58,60,60,68,68,67,67,67,67,67,67,59,59,69,69,26,26,21,21,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,71,77,77,79,79,80,81,81,81,81,81,81,86,86,35,35,35,72,72,87,87,82,82,88,88,88,88,88,73,73,73,76,76,76,78,78,93,93,93,93,93,93,93,93,93,93,93,93,93,93,12,12,12,12,12,12,74,74,74,74,94,94,96,96,95,95,97,97,28,28,28,28,99,99,98,98,98,98,98,100,100,84,84,89,89,83,83,101,101,101,101,90,90,90,90,85,85,91,91,91,70,70,102,102,102,75,75,103,103,104,104,104,104,92,92,92,92,105,105,105,105,105,105,105,106,106,106],r.Parser.prototype.yylen=[1,1,2,0,1,3,1,1,1,1,3,5,4,3,3,3,1,1,3,2,4,3,1,3,2,0,1,1,1,1,3,7,10,5,7,9,5,2,3,2,3,2,3,3,3,3,1,2,5,7,8,10,5,1,5,3,3,2,1,2,8,1,3,0,1,9,7,6,5,1,2,2,0,2,0,2,0,2,1,3,1,4,1,4,1,4,1,3,3,3,4,4,5,0,2,4,3,1,1,1,4,0,2,5,0,2,6,0,2,0,3,1,0,1,3,3,5,0,1,1,1,1,0,1,3,1,2,3,1,1,2,4,3,1,1,3,2,0,3,3,8,3,1,3,0,2,4,5,4,4,3,1,1,1,3,1,1,0,1,1,2,1,1,1,1,1,1,1,3,1,3,3,1,0,1,1,6,3,4,4,1,2,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,5,4,4,4,2,2,4,2,2,2,2,2,2,2,2,2,2,2,1,4,3,3,2,9,10,3,0,4,1,3,2,4,6,8,4,4,4,1,1,1,2,3,1,1,1,1,1,1,0,3,3,4,4,0,2,3,0,1,1,0,3,1,1,1,1,1,1,1,1,1,1,1,3,2,1,1,3,2,2,4,3,1,3,3,3,0,2,0,1,3,1,3,1,1,1,1,1,6,4,3,6,4,4,4,1,3,1,2,1,1,4,1,3,6,4,4,4,4,1,4,0,1,1,3,1,3,1,1,4,0,0,2,3,1,3,1,4,2,2,2,1,2,1,4,3,3,3,6,3,1,1,1],r.Parser.prototype.yyn0=function(){this.yyval=this.yyastk[this.stackPos]},r.Parser.prototype.yyn1=function(e){this.yyval=this.Stmt_Namespace_postprocess(this.yyastk[this.stackPos-0])},r.Parser.prototype.yyn2=function(e){Array.isArray(this.yyastk[this.stackPos-0])?this.yyval=this.yyastk[this.stackPos-1].concat(this.yyastk[this.stackPos-0]):(this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1])},r.Parser.prototype.yyn3=function(e){this.yyval=[]},r.Parser.prototype.yyn4=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn5=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn6=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn7=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn8=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn9=function(e){this.yyval=this.Node_Stmt_HaltCompiler(e)},r.Parser.prototype.yyn10=function(e){this.yyval=this.Node_Stmt_Namespace(this.Node_Name(this.yyastk[this.stackPos-1],e),null,e)},r.Parser.prototype.yyn11=function(e){this.yyval=this.Node_Stmt_Namespace(this.Node_Name(this.yyastk[this.stackPos-3],e),this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn12=function(e){this.yyval=this.Node_Stmt_Namespace(null,this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn13=function(e){this.yyval=this.Node_Stmt_Use(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn14=function(e){this.yyval=this.Node_Stmt_Const(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn15=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn16=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn17=function(e){this.yyval=this.Node_Stmt_UseUse(this.Node_Name(this.yyastk[this.stackPos-0],e),null,e)},r.Parser.prototype.yyn18=function(e){this.yyval=this.Node_Stmt_UseUse(this.Node_Name(this.yyastk[this.stackPos-2],e),this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn19=function(e){this.yyval=this.Node_Stmt_UseUse(this.Node_Name(this.yyastk[this.stackPos-0],e),null,e)},r.Parser.prototype.yyn20=function(e){this.yyval=this.Node_Stmt_UseUse(this.Node_Name(this.yyastk[this.stackPos-2],e),this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn21=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn22=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn23=function(e){this.yyval=this.Node_Const(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn24=function(e){Array.isArray(this.yyastk[this.stackPos-0])?this.yyval=this.yyastk[this.stackPos-1].concat(this.yyastk[this.stackPos-0]):(this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1])},r.Parser.prototype.yyn25=function(e){this.yyval=[]},r.Parser.prototype.yyn26=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn27=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn28=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn29=function(e){throw new Error(\"__halt_compiler() can only be used from the outermost scope\")},r.Parser.prototype.yyn30=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn31=function(e){this.yyval=this.Node_Stmt_If(this.yyastk[this.stackPos-4],{stmts:Array.isArray(this.yyastk[this.stackPos-2])?this.yyastk[this.stackPos-2]:[this.yyastk[this.stackPos-2]],elseifs:this.yyastk[this.stackPos-1],Else:this.yyastk[this.stackPos-0]},e)},r.Parser.prototype.yyn32=function(e){this.yyval=this.Node_Stmt_If(this.yyastk[this.stackPos-7],{stmts:this.yyastk[this.stackPos-4],elseifs:this.yyastk[this.stackPos-3],\"else\":this.yyastk[this.stackPos-2]},e)},r.Parser.prototype.yyn33=function(e){this.yyval=this.Node_Stmt_While(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn34=function(e){this.yyval=this.Node_Stmt_Do(this.yyastk[this.stackPos-2],Array.isArray(this.yyastk[this.stackPos-5])?this.yyastk[this.stackPos-5]:[this.yyastk[this.stackPos-5]],e)},r.Parser.prototype.yyn35=function(e){this.yyval=this.Node_Stmt_For({init:this.yyastk[this.stackPos-6],cond:this.yyastk[this.stackPos-4],loop:this.yyastk[this.stackPos-2],stmts:this.yyastk[this.stackPos-0]},e)},r.Parser.prototype.yyn36=function(e){this.yyval=this.Node_Stmt_Switch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn37=function(e){this.yyval=this.Node_Stmt_Break(null,e)},r.Parser.prototype.yyn38=function(e){this.yyval=this.Node_Stmt_Break(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn39=function(e){this.yyval=this.Node_Stmt_Continue(null,e)},r.Parser.prototype.yyn40=function(e){this.yyval=this.Node_Stmt_Continue(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn41=function(e){this.yyval=this.Node_Stmt_Return(null,e)},r.Parser.prototype.yyn42=function(e){this.yyval=this.Node_Stmt_Return(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn43=function(e){this.yyval=this.Node_Stmt_Global(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn44=function(e){this.yyval=this.Node_Stmt_Static(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn45=function(e){this.yyval=this.Node_Stmt_Echo(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn46=function(e){this.yyval=this.Node_Stmt_InlineHTML(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn47=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn48=function(e){this.yyval=this.Node_Stmt_Unset(this.yyastk[this.stackPos-2],e)},r.Parser.prototype.yyn49=function(e){this.yyval=this.Node_Stmt_Foreach(this.yyastk[this.stackPos-4],this.yyastk[this.stackPos-2],{keyVar:null,byRef:!1,stmts:this.yyastk[this.stackPos-0]},e)},r.Parser.prototype.yyn50=function(e){this.yyval=this.Node_Stmt_Foreach(this.yyastk[this.stackPos-5],this.yyastk[this.stackPos-2],{keyVar:null,byRef:!0,stmts:this.yyastk[this.stackPos-0]},e)},r.Parser.prototype.yyn51=function(e){this.yyval=this.Node_Stmt_Foreach(this.yyastk[this.stackPos-7],this.yyastk[this.stackPos-2],{keyVar:this.yyastk[this.stackPos-5],byRef:this.yyastk[this.stackPos-3],stmts:this.yyastk[this.stackPos-0]},e)},r.Parser.prototype.yyn52=function(e){this.yyval=this.Node_Stmt_Declare(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn53=function(e){this.yyval=[]},r.Parser.prototype.yyn54=function(e){this.yyval=this.Node_Stmt_TryCatch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn55=function(e){this.yyval=this.Node_Stmt_Throw(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn56=function(e){this.yyval=this.Node_Stmt_Goto(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn57=function(e){this.yyval=this.Node_Stmt_Label(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn58=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn59=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn60=function(e){this.yyval=this.Node_Stmt_Catch(this.yyastk[this.stackPos-5],this.yyastk[this.stackPos-4].substring(1),this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn61=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn62=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn63=function(e){this.yyval=!1},r.Parser.prototype.yyn64=function(e){this.yyval=!0},r.Parser.prototype.yyn65=function(e){this.yyval=this.Node_Stmt_Function(this.yyastk[this.stackPos-6],{byRef:this.yyastk[this.stackPos-7],params:this.yyastk[this.stackPos-4],stmts:this.yyastk[this.stackPos-1]},e)},r.Parser.prototype.yyn66=function(e){this.yyval=this.Node_Stmt_Class(this.yyastk[this.stackPos-5],{type:this.yyastk[this.stackPos-6],Extends:this.yyastk[this.stackPos-4],Implements:this.yyastk[this.stackPos-3],stmts:this.yyastk[this.stackPos-1]},e)},r.Parser.prototype.yyn67=function(e){this.yyval=this.Node_Stmt_Interface(this.yyastk[this.stackPos-4],{Extends:this.yyastk[this.stackPos-3],stmts:this.yyastk[this.stackPos-1]},e)},r.Parser.prototype.yyn68=function(e){this.yyval=this.Node_Stmt_Trait(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn69=function(e){this.yyval=0},r.Parser.prototype.yyn70=function(e){this.yyval=this.MODIFIER_ABSTRACT},r.Parser.prototype.yyn71=function(e){this.yyval=this.MODIFIER_FINAL},r.Parser.prototype.yyn72=function(e){this.yyval=null},r.Parser.prototype.yyn73=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn74=function(e){this.yyval=[]},r.Parser.prototype.yyn75=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn76=function(e){this.yyval=[]},r.Parser.prototype.yyn77=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn78=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn79=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn80=function(e){this.yyval=Array.isArray(this.yyastk[this.stackPos-0])?this.yyastk[this.stackPos-0]:[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn81=function(e){this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn82=function(e){this.yyval=Array.isArray(this.yyastk[this.stackPos-0])?this.yyastk[this.stackPos-0]:[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn83=function(e){this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn84=function(e){this.yyval=Array.isArray(this.yyastk[this.stackPos-0])?this.yyastk[this.stackPos-0]:[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn85=function(e){this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn86=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn87=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn88=function(e){this.yyval=this.Node_Stmt_DeclareDeclare(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn89=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn90=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn91=function(e){this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn92=function(e){this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn93=function(e){this.yyval=[]},r.Parser.prototype.yyn94=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn95=function(e){this.yyval=this.Node_Stmt_Case(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn96=function(e){this.yyval=this.Node_Stmt_Case(null,this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn97=function(){this.yyval=this.yyastk[this.stackPos]},r.Parser.prototype.yyn98=function(){this.yyval=this.yyastk[this.stackPos]},r.Parser.prototype.yyn99=function(e){this.yyval=Array.isArray(this.yyastk[this.stackPos-0])?this.yyastk[this.stackPos-0]:[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn100=function(e){this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn101=function(e){this.yyval=[]},r.Parser.prototype.yyn102=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn103=function(e){this.yyval=this.Node_Stmt_ElseIf(this.yyastk[this.stackPos-2],Array.isArray(this.yyastk[this.stackPos-0])?this.yyastk[this.stackPos-0]:[this.yyastk[this.stackPos-0]],e)},r.Parser.prototype.yyn104=function(e){this.yyval=[]},r.Parser.prototype.yyn105=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn106=function(e){this.yyval=this.Node_Stmt_ElseIf(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn107=function(e){this.yyval=null},r.Parser.prototype.yyn108=function(e){this.yyval=this.Node_Stmt_Else(Array.isArray(this.yyastk[this.stackPos-0])?this.yyastk[this.stackPos-0]:[this.yyastk[this.stackPos-0]],e)},r.Parser.prototype.yyn109=function(e){this.yyval=null},r.Parser.prototype.yyn110=function(e){this.yyval=this.Node_Stmt_Else(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn111=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn112=function(e){this.yyval=[]},r.Parser.prototype.yyn113=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn114=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn115=function(e){this.yyval=this.Node_Param(this.yyastk[this.stackPos-0].substring(1),null,this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn116=function(e){this.yyval=this.Node_Param(this.yyastk[this.stackPos-2].substring(1),this.yyastk[this.stackPos-0],this.yyastk[this.stackPos-4],this.yyastk[this.stackPos-3],e)},r.Parser.prototype.yyn117=function(e){this.yyval=null},r.Parser.prototype.yyn118=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn119=function(e){this.yyval=\"array\"},r.Parser.prototype.yyn120=function(e){this.yyval=\"callable\"},r.Parser.prototype.yyn121=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn122=function(e){this.yyval=[]},r.Parser.prototype.yyn123=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn124=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn125=function(e){this.yyval=this.Node_Arg(this.yyastk[this.stackPos-0],!1,e)},r.Parser.prototype.yyn126=function(e){this.yyval=this.Node_Arg(this.yyastk[this.stackPos-0],!0,e)},r.Parser.prototype.yyn127=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn128=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn129=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-0].substring(1),e)},r.Parser.prototype.yyn130=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn131=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn132=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn133=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn134=function(e){this.yyval=this.Node_Stmt_StaticVar(this.yyastk[this.stackPos-0].substring(1),null,e)},r.Parser.prototype.yyn135=function(e){this.yyval=this.Node_Stmt_StaticVar(this.yyastk[this.stackPos-2].substring(1),this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn136=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn137=function(e){this.yyval=[]},r.Parser.prototype.yyn138=function(e){this.yyval=this.Node_Stmt_Property(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn139=function(e){this.yyval=this.Node_Stmt_ClassConst(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn140=function(e){this.yyval=this.Node_Stmt_ClassMethod(this.yyastk[this.stackPos-4],{type:this.yyastk[this.stackPos-7],byRef:this.yyastk[this.stackPos-5],params:this.yyastk[this.stackPos-2],stmts:this.yyastk[this.stackPos-0]},e)},r.Parser.prototype.yyn141=function(e){this.yyval=this.Node_Stmt_TraitUse(this.yyastk[this.stackPos-1],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn142=function(e){this.yyval=[]},r.Parser.prototype.yyn143=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn144=function(e){this.yyval=[]},r.Parser.prototype.yyn145=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn146=function(e){this.yyval=this.Node_Stmt_TraitUseAdaptation_Precedence(this.yyastk[this.stackPos-3][0],this.yyastk[this.stackPos-3][1],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn147=function(e){this.yyval=this.Node_Stmt_TraitUseAdaptation_Alias(this.yyastk[this.stackPos-4][0],this.yyastk[this.stackPos-4][1],this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn148=function(e){this.yyval=this.Node_Stmt_TraitUseAdaptation_Alias(this.yyastk[this.stackPos-3][0],this.yyastk[this.stackPos-3][1],this.yyastk[this.stackPos-1],null,e)},r.Parser.prototype.yyn149=function(e){this.yyval=this.Node_Stmt_TraitUseAdaptation_Alias(this.yyastk[this.stackPos-3][0],this.yyastk[this.stackPos-3][1],null,this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn150=function(e){this.yyval=array(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0])},r.Parser.prototype.yyn151=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn152=function(e){this.yyval=array(null,this.yyastk[this.stackPos-0])},r.Parser.prototype.yyn153=function(e){this.yyval=null},r.Parser.prototype.yyn154=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn155=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn156=function(e){this.yyval=this.MODIFIER_PUBLIC},r.Parser.prototype.yyn157=function(e){this.yyval=this.MODIFIER_PUBLIC},r.Parser.prototype.yyn158=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn159=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn160=function(e){this.Stmt_Class_verifyModifier(this.yyastk[this.stackPos-1],this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]|this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn161=function(e){this.yyval=this.MODIFIER_PUBLIC},r.Parser.prototype.yyn162=function(e){this.yyval=this.MODIFIER_PROTECTED},r.Parser.prototype.yyn163=function(e){this.yyval=this.MODIFIER_PRIVATE},r.Parser.prototype.yyn164=function(e){this.yyval=this.MODIFIER_STATIC},r.Parser.prototype.yyn165=function(e){this.yyval=this.MODIFIER_ABSTRACT},r.Parser.prototype.yyn166=function(e){this.yyval=this.MODIFIER_FINAL},r.Parser.prototype.yyn167=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn168=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn169=function(e){this.yyval=this.Node_Stmt_PropertyProperty(this.yyastk[this.stackPos-0].substring(1),null,e)},r.Parser.prototype.yyn170=function(e){this.yyval=this.Node_Stmt_PropertyProperty(this.yyastk[this.stackPos-2].substring(1),this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn171=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn172=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn173=function(e){this.yyval=[]},r.Parser.prototype.yyn174=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn175=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn176=function(e){this.yyval=this.Node_Expr_AssignList(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn177=function(e){this.yyval=this.Node_Expr_Assign(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn178=function(e){this.yyval=this.Node_Expr_AssignRef(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn179=function(e){this.yyval=this.Node_Expr_AssignRef(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn180=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn181=function(e){this.yyval=this.Node_Expr_Clone(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn182=function(e){this.yyval=this.Node_Expr_AssignPlus(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn183=function(e){this.yyval=this.Node_Expr_AssignMinus(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn184=function(e){this.yyval=this.Node_Expr_AssignMul(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn185=function(e){this.yyval=this.Node_Expr_AssignDiv(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn186=function(e){this.yyval=this.Node_Expr_AssignConcat(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn187=function(e){this.yyval=this.Node_Expr_AssignMod(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn188=function(e){this.yyval=this.Node_Expr_AssignBitwiseAnd(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn189=function(e){this.yyval=this.Node_Expr_AssignBitwiseOr(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn190=function(e){this.yyval=this.Node_Expr_AssignBitwiseXor(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn191=function(e){this.yyval=this.Node_Expr_AssignShiftLeft(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn192=function(e){this.yyval=this.Node_Expr_AssignShiftRight(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn193=function(e){this.yyval=this.Node_Expr_PostInc(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn194=function(e){this.yyval=this.Node_Expr_PreInc(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn195=function(e){this.yyval=this.Node_Expr_PostDec(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn196=function(e){this.yyval=this.Node_Expr_PreDec(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn197=function(e){this.yyval=this.Node_Expr_BooleanOr(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn198=function(e){this.yyval=this.Node_Expr_BooleanAnd(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn199=function(e){this.yyval=this.Node_Expr_LogicalOr(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn200=function(e){this.yyval=this.Node_Expr_LogicalAnd(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn201=function(e){this.yyval=this.Node_Expr_LogicalXor(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn202=function(e){this.yyval=this.Node_Expr_BitwiseOr(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn203=function(e){this.yyval=this.Node_Expr_BitwiseAnd(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn204=function(e){this.yyval=this.Node_Expr_BitwiseXor(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn205=function(e){this.yyval=this.Node_Expr_Concat(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn206=function(e){this.yyval=this.Node_Expr_Plus(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn207=function(e){this.yyval=this.Node_Expr_Minus(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn208=function(e){this.yyval=this.Node_Expr_Mul(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn209=function(e){this.yyval=this.Node_Expr_Div(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn210=function(e){this.yyval=this.Node_Expr_Mod(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn211=function(e){this.yyval=this.Node_Expr_ShiftLeft(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn212=function(e){this.yyval=this.Node_Expr_ShiftRight(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn213=function(e){this.yyval=this.Node_Expr_UnaryPlus(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn214=function(e){this.yyval=this.Node_Expr_UnaryMinus(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn215=function(e){this.yyval=this.Node_Expr_BooleanNot(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn216=function(e){this.yyval=this.Node_Expr_BitwiseNot(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn217=function(e){this.yyval=this.Node_Expr_Identical(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn218=function(e){this.yyval=this.Node_Expr_NotIdentical(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn219=function(e){this.yyval=this.Node_Expr_Equal(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn220=function(e){this.yyval=this.Node_Expr_NotEqual(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn221=function(e){this.yyval=this.Node_Expr_Smaller(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn222=function(e){this.yyval=this.Node_Expr_SmallerOrEqual(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn223=function(e){this.yyval=this.Node_Expr_Greater(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn224=function(e){this.yyval=this.Node_Expr_GreaterOrEqual(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn225=function(e){this.yyval=this.Node_Expr_Instanceof(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn226=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn227=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn228=function(e){this.yyval=this.Node_Expr_Ternary(this.yyastk[this.stackPos-4],this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn229=function(e){this.yyval=this.Node_Expr_Ternary(this.yyastk[this.stackPos-3],null,this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn230=function(e){this.yyval=this.Node_Expr_Isset(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn231=function(e){this.yyval=this.Node_Expr_Empty(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn232=function(e){this.yyval=this.Node_Expr_Include(this.yyastk[this.stackPos-0],\"Node_Expr_Include\",e)},r.Parser.prototype.yyn233=function(e){this.yyval=this.Node_Expr_Include(this.yyastk[this.stackPos-0],\"Node_Expr_IncludeOnce\",e)},r.Parser.prototype.yyn234=function(e){this.yyval=this.Node_Expr_Eval(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn235=function(e){this.yyval=this.Node_Expr_Include(this.yyastk[this.stackPos-0],\"Node_Expr_Require\",e)},r.Parser.prototype.yyn236=function(e){this.yyval=this.Node_Expr_Include(this.yyastk[this.stackPos-0],\"Node_Expr_RequireOnce\",e)},r.Parser.prototype.yyn237=function(e){this.yyval=this.Node_Expr_Cast_Int(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn238=function(e){this.yyval=this.Node_Expr_Cast_Double(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn239=function(e){this.yyval=this.Node_Expr_Cast_String(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn240=function(e){this.yyval=this.Node_Expr_Cast_Array(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn241=function(e){this.yyval=this.Node_Expr_Cast_Object(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn242=function(e){this.yyval=this.Node_Expr_Cast_Bool(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn243=function(e){this.yyval=this.Node_Expr_Cast_Unset(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn244=function(e){this.yyval=this.Node_Expr_Exit(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn245=function(e){this.yyval=this.Node_Expr_ErrorSuppress(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn246=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn247=function(e){this.yyval=this.Node_Expr_Array(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn248=function(e){this.yyval=this.Node_Expr_Array(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn249=function(e){this.yyval=this.Node_Expr_ShellExec(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn250=function(e){this.yyval=this.Node_Expr_Print(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn251=function(e){this.yyval=this.Node_Expr_Closure({\"static\":!1,byRef:this.yyastk[this.stackPos-7],params:this.yyastk[this.stackPos-5],uses:this.yyastk[this.stackPos-3],stmts:this.yyastk[this.stackPos-1]},e)},r.Parser.prototype.yyn252=function(e){this.yyval=this.Node_Expr_Closure({\"static\":!0,byRef:this.yyastk[this.stackPos-7],params:this.yyastk[this.stackPos-5],uses:this.yyastk[this.stackPos-3],stmts:this.yyastk[this.stackPos-1]},e)},r.Parser.prototype.yyn253=function(e){this.yyval=this.Node_Expr_New(this.yyastk[this.stackPos-1],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn254=function(e){this.yyval=[]},r.Parser.prototype.yyn255=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn256=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn257=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn258=function(e){this.yyval=this.Node_Expr_ClosureUse(this.yyastk[this.stackPos-0].substring(1),this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn259=function(e){this.yyval=this.Node_Expr_FuncCall(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn260=function(e){this.yyval=this.Node_Expr_StaticCall(this.yyastk[this.stackPos-5],this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn261=function(e){this.yyval=this.Node_Expr_StaticCall(this.yyastk[this.stackPos-7],this.yyastk[this.stackPos-4],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn262=function(e){if(this.yyastk[this.stackPos-3].type===\"Node_Expr_StaticPropertyFetch\")this.yyval=this.Node_Expr_StaticCall(this.yyastk[this.stackPos-3].Class,this.Node_Expr_Variable(this.yyastk[this.stackPos-3].name,e),this.yyastk[this.stackPos-1],e);else{if(this.yyastk[this.stackPos-3].type!==\"Node_Expr_ArrayDimFetch\")throw new Exception;var t=this.yyastk[this.stackPos-3];while(t.variable.type===\"Node_Expr_ArrayDimFetch\")t=t.variable;this.yyval=this.Node_Expr_StaticCall(t.variable.Class,this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e),t.variable=this.Node_Expr_Variable(t.variable.name,e)}},r.Parser.prototype.yyn263=function(e){this.yyval=this.Node_Expr_FuncCall(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn264=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn265=function(e){this.yyval=this.Node_Name(\"static\",e)},r.Parser.prototype.yyn266=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn267=function(e){this.yyval=this.Node_Name(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn268=function(e){this.yyval=this.Node_Name_FullyQualified(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn269=function(e){this.yyval=this.Node_Name_Relative(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn270=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn271=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn272=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn273=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn274=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn275=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn276=function(){this.yyval=this.yyastk[this.stackPos]},r.Parser.prototype.yyn277=function(e){this.yyval=this.Node_Expr_PropertyFetch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn278=function(e){this.yyval=this.Node_Expr_PropertyFetch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn279=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn280=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn281=function(e){this.yyval=null},r.Parser.prototype.yyn282=function(e){this.yyval=null},r.Parser.prototype.yyn283=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn284=function(e){this.yyval=[]},r.Parser.prototype.yyn285=function(e){this.yyval=[this.Scalar_String_parseEscapeSequences(this.yyastk[this.stackPos-0],\"`\")]},r.Parser.prototype.yyn286=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn287=function(e){this.yyval=[]},r.Parser.prototype.yyn288=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn289=function(e){this.yyval=this.Node_Scalar_LNumber(this.Scalar_LNumber_parse(this.yyastk[this.stackPos-0]),e)},r.Parser.prototype.yyn290=function(e){this.yyval=this.Node_Scalar_DNumber(this.Scalar_DNumber_parse(this.yyastk[this.stackPos-0]),e)},r.Parser.prototype.yyn291=function(e){this.yyval=this.Scalar_String_create(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn292=function(e){this.yyval={type:\"Node_Scalar_LineConst\",attributes:e}},r.Parser.prototype.yyn293=function(e){this.yyval={type:\"Node_Scalar_FileConst\",attributes:e}},r.Parser.prototype.yyn294=function(e){this.yyval={type:\"Node_Scalar_DirConst\",attributes:e}},r.Parser.prototype.yyn295=function(e){this.yyval={type:\"Node_Scalar_ClassConst\",attributes:e}},r.Parser.prototype.yyn296=function(e){this.yyval={type:\"Node_Scalar_TraitConst\",attributes:e}},r.Parser.prototype.yyn297=function(e){this.yyval={type:\"Node_Scalar_MethodConst\",attributes:e}},r.Parser.prototype.yyn298=function(e){this.yyval={type:\"Node_Scalar_FuncConst\",attributes:e}},r.Parser.prototype.yyn299=function(e){this.yyval={type:\"Node_Scalar_NSConst\",attributes:e}},r.Parser.prototype.yyn300=function(e){this.yyval=this.Node_Scalar_String(this.Scalar_String_parseDocString(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-1]),e)},r.Parser.prototype.yyn301=function(e){this.yyval=this.Node_Scalar_String(\"\",e)},r.Parser.prototype.yyn302=function(e){this.yyval=this.Node_Expr_ConstFetch(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn303=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn304=function(e){this.yyval=this.Node_Expr_ClassConstFetch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn305=function(e){this.yyval=this.Node_Expr_UnaryPlus(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn306=function(e){this.yyval=this.Node_Expr_UnaryMinus(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn307=function(e){this.yyval=this.Node_Expr_Array(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn308=function(e){this.yyval=this.Node_Expr_Array(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn309=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn310=function(e){this.yyval=this.Node_Expr_ClassConstFetch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn311=function(e){this.yyval=this.Node_Scalar_Encapsed(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn312=function(e){this.yyval=this.Node_Scalar_Encapsed(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn313=function(e){this.yyval=[]},r.Parser.prototype.yyn314=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn315=function(){this.yyval=this.yyastk[this.stackPos]},r.Parser.prototype.yyn316=function(){this.yyval=this.yyastk[this.stackPos]},r.Parser.prototype.yyn317=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn318=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn319=function(e){this.yyval=this.Node_Expr_ArrayItem(this.yyastk[this.stackPos-0],this.yyastk[this.stackPos-2],!1,e)},r.Parser.prototype.yyn320=function(e){this.yyval=this.Node_Expr_ArrayItem(this.yyastk[this.stackPos-0],null,!1,e)},r.Parser.prototype.yyn321=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn322=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn323=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn324=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn325=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-4],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn326=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn327=function(e){this.yyval=this.Node_Expr_PropertyFetch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn328=function(e){this.yyval=this.Node_Expr_MethodCall(this.yyastk[this.stackPos-5],this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn329=function(e){this.yyval=this.Node_Expr_FuncCall(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn330=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn331=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn332=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn333=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn334=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn335=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn336=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn337=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn338=function(e){this.yyval=this.Node_Expr_StaticPropertyFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn339=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn340=function(e){this.yyval=this.Node_Expr_StaticPropertyFetch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0].substring(1),e)},r.Parser.prototype.yyn341=function(e){this.yyval=this.Node_Expr_StaticPropertyFetch(this.yyastk[this.stackPos-5],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn342=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn343=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn344=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn345=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn346=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-0].substring(1),e)},r.Parser.prototype.yyn347=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn348=function(e){this.yyval=null},r.Parser.prototype.yyn349=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn350=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn351=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn352=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn353=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn354=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn355=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn356=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn357=function(e){this.yyval=null},r.Parser.prototype.yyn358=function(e){this.yyval=[]},r.Parser.prototype.yyn359=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn360=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn361=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn362=function(e){this.yyval=this.Node_Expr_ArrayItem(this.yyastk[this.stackPos-0],this.yyastk[this.stackPos-2],!1,e)},r.Parser.prototype.yyn363=function(e){this.yyval=this.Node_Expr_ArrayItem(this.yyastk[this.stackPos-0],null,!1,e)},r.Parser.prototype.yyn364=function(e){this.yyval=this.Node_Expr_ArrayItem(this.yyastk[this.stackPos-0],this.yyastk[this.stackPos-3],!0,e)},r.Parser.prototype.yyn365=function(e){this.yyval=this.Node_Expr_ArrayItem(this.yyastk[this.stackPos-0],null,!0,e)},r.Parser.prototype.yyn366=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn367=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn368=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn369=function(e){this.yyval=[this.yyastk[this.stackPos-1],this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn370=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-0].substring(1),e)},r.Parser.prototype.yyn371=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.Node_Expr_Variable(this.yyastk[this.stackPos-3].substring(1),e),this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn372=function(e){this.yyval=this.Node_Expr_PropertyFetch(this.Node_Expr_Variable(this.yyastk[this.stackPos-2].substring(1),e),this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn373=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn374=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn375=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.Node_Expr_Variable(this.yyastk[this.stackPos-4],e),this.yyastk[this.stackPos-2],e)},r.Parser.prototype.yyn376=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn377=function(e){this.yyval=this.Node_Scalar_String(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn378=function(e){this.yyval=this.Node_Scalar_String(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn379=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-0].substring(1),e)},r.Parser.prototype.Stmt_Namespace_postprocess=function(e){return e},r.Parser.prototype.Node_Stmt_Echo=function(){return{type:\"Node_Stmt_Echo\",exprs:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_If=function(){return{type:\"Node_Stmt_If\",cond:arguments[0],stmts:arguments[1].stmts,elseifs:arguments[1].elseifs,Else:arguments[1].Else||null,attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_For=function(){return{type:\"Node_Stmt_For\",init:arguments[0].init,cond:arguments[0].cond,loop:arguments[0].loop,stmts:arguments[0].stmts,attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Function=function(){return{type:\"Node_Stmt_Function\",name:arguments[0],byRef:arguments[1].byRef,params:arguments[1].params,stmts:arguments[1].stmts,attributes:arguments[2]}},r.Parser.prototype.Stmt_Class_verifyModifier=function(){},r.Parser.prototype.Node_Stmt_Class=function(){return{type:\"Node_Stmt_Class\",name:arguments[0],Type:arguments[1].type,Extends:arguments[1].Extends,Implements:arguments[1].Implements,stmts:arguments[1].stmts,attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_ClassMethod=function(){return{type:\"Node_Stmt_ClassMethod\",name:arguments[0],Type:arguments[1].type,byRef:arguments[1].byRef,params:arguments[1].params,stmts:arguments[1].stmts,attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_ClassConst=function(){return{type:\"Node_Stmt_ClassConst\",consts:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Interface=function(){return{type:\"Node_Stmt_Interface\",name:arguments[0],Extends:arguments[1].Extends,stmts:arguments[1].stmts,attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Throw=function(){return{type:\"Node_Stmt_Throw\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Catch=function(){return{type:\"Node_Stmt_Catch\",Type:arguments[0],variable:arguments[1],stmts:arguments[2],attributes:arguments[3]}},r.Parser.prototype.Node_Stmt_TryCatch=function(){return{type:\"Node_Stmt_TryCatch\",stmts:arguments[0],catches:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Foreach=function(){return{type:\"Node_Stmt_Foreach\",expr:arguments[0],valueVar:arguments[1],keyVar:arguments[2].keyVar,byRef:arguments[2].byRef,stmts:arguments[2].stmts,attributes:arguments[3]}},r.Parser.prototype.Node_Stmt_While=function(){return{type:\"Node_Stmt_While\",cond:arguments[0],stmts:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Do=function(){return{type:\"Node_Stmt_Do\",cond:arguments[0],stmts:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Break=function(){return{type:\"Node_Stmt_Break\",num:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Continue=function(){return{type:\"Node_Stmt_Continue\",num:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Return=function(){return{type:\"Node_Stmt_Return\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Case=function(){return{type:\"Node_Stmt_Case\",cond:arguments[0],stmts:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Switch=function(){return{type:\"Node_Stmt_Switch\",cond:arguments[0],cases:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Else=function(){return{type:\"Node_Stmt_Else\",stmts:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_ElseIf=function(){return{type:\"Node_Stmt_ElseIf\",cond:arguments[0],stmts:arguments[1],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_InlineHTML=function(){return{type:\"Node_Stmt_InlineHTML\",value:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_StaticVar=function(){return{type:\"Node_Stmt_StaticVar\",name:arguments[0],def:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Static=function(){return{type:\"Node_Stmt_Static\",vars:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Global=function(){return{type:\"Node_Stmt_Global\",vars:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_PropertyProperty=function(){return{type:\"Node_Stmt_PropertyProperty\",name:arguments[0],def:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Property=function(){return{type:\"Node_Stmt_Property\",Type:arguments[0],props:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Unset=function(){return{type:\"Node_Stmt_Unset\",variables:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Variable=function(e){return{type:\"Node_Expr_Variable\",name:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_FuncCall=function(){return{type:\"Node_Expr_FuncCall\",func:arguments[0],args:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_MethodCall=function(){return{type:\"Node_Expr_MethodCall\",variable:arguments[0],name:arguments[1],args:arguments[2],attributes:arguments[3]}},r.Parser.prototype.Node_Expr_StaticCall=function(){return{type:\"Node_Expr_StaticCall\",Class:arguments[0],func:arguments[1],args:arguments[2],attributes:arguments[3]}},r.Parser.prototype.Node_Expr_Ternary=function(){return{type:\"Node_Expr_Ternary\",cond:arguments[0],If:arguments[1],Else:arguments[2],attributes:arguments[3]}},r.Parser.prototype.Node_Expr_AssignList=function(){return{type:\"Node_Expr_AssignList\",assignList:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Assign=function(){return{type:\"Node_Expr_Assign\",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignConcat=function(){return{type:\"Node_Expr_AssignConcat\",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignMinus=function(){return{type:\"Node_Expr_AssignMinus\",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignPlus=function(){return{type:\"Node_Expr_AssignPlus\",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignDiv=function(){return{type:\"Node_Expr_AssignDiv\",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignRef=function(){return{type:\"Node_Expr_AssignRef\",variable:arguments[0],refVar:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignMul=function(){return{type:\"Node_Expr_AssignMul\",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignMod=function(){return{type:\"Node_Expr_AssignMod\",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Plus=function(){return{type:\"Node_Expr_Plus\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Minus=function(){return{type:\"Node_Expr_Minus\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Mul=function(){return{type:\"Node_Expr_Mul\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Div=function(){return{type:\"Node_Expr_Div\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Mod=function(){return{type:\"Node_Expr_Mod\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Greater=function(){return{type:\"Node_Expr_Greater\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Equal=function(){return{type:\"Node_Expr_Equal\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_NotEqual=function(){return{type:\"Node_Expr_NotEqual\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Identical=function(){return{type:\"Node_Expr_Identical\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_NotIdentical=function(){return{type:\"Node_Expr_NotIdentical\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_GreaterOrEqual=function(){return{type:\"Node_Expr_GreaterOrEqual\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_SmallerOrEqual=function(){return{type:\"Node_Expr_SmallerOrEqual\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Concat=function(){return{type:\"Node_Expr_Concat\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Smaller=function(){return{type:\"Node_Expr_Smaller\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_PostInc=function(){return{type:\"Node_Expr_PostInc\",variable:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_PostDec=function(){return{type:\"Node_Expr_PostDec\",variable:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_PreInc=function(){return{type:\"Node_Expr_PreInc\",variable:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_PreDec=function(){return{type:\"Node_Expr_PreDec\",variable:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Include=function(){return{expr:arguments[0],type:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_ArrayDimFetch=function(){return{type:\"Node_Expr_ArrayDimFetch\",variable:arguments[0],dim:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_StaticPropertyFetch=function(){return{type:\"Node_Expr_StaticPropertyFetch\",Class:arguments[0],name:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_ClassConstFetch=function(){return{type:\"Node_Expr_ClassConstFetch\",Class:arguments[0],name:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_StaticPropertyFetch=function(){return{type:\"Node_Expr_StaticPropertyFetch\",Class:arguments[0],name:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_ConstFetch=function(){return{type:\"Node_Expr_ConstFetch\",name:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_ArrayItem=function(){return{type:\"Node_Expr_ArrayItem\",value:arguments[0],key:arguments[1],byRef:arguments[2],attributes:arguments[3]}},r.Parser.prototype.Node_Expr_Array=function(){return{type:\"Node_Expr_Array\",items:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_PropertyFetch=function(){return{type:\"Node_Expr_PropertyFetch\",variable:arguments[0],name:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_New=function(){return{type:\"Node_Expr_New\",Class:arguments[0],args:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Print=function(){return{type:\"Node_Expr_Print\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Exit=function(){return{type:\"Node_Expr_Exit\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Cast_Bool=function(){return{type:\"Node_Expr_Cast_Bool\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Cast_Int=function(){return{type:\"Node_Expr_Cast_Int\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Cast_String=function(){return{type:\"Node_Expr_Cast_String\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Cast_Double=function(){return{type:\"Node_Expr_Cast_Double\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Cast_Array=function(){return{type:\"Node_Expr_Cast_Array\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Cast_Object=function(){return{type:\"Node_Expr_Cast_Object\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_ErrorSuppress=function(){return{type:\"Node_Expr_ErrorSuppress\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Isset=function(){return{type:\"Node_Expr_Isset\",variables:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_UnaryMinus=function(){return{type:\"Node_Expr_UnaryMinus\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_UnaryPlus=function(){return{type:\"Node_Expr_UnaryPlus\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Empty=function(){return{type:\"Node_Expr_Empty\",variable:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_BooleanOr=function(){return{type:\"Node_Expr_BooleanOr\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_LogicalOr=function(){return{type:\"Node_Expr_LogicalOr\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_LogicalAnd=function(){return{type:\"Node_Expr_LogicalAnd\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_LogicalXor=function(){return{type:\"Node_Expr_LogicalXor\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_BitwiseAnd=function(){return{type:\"Node_Expr_BitwiseAnd\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_BitwiseOr=function(){return{type:\"Node_Expr_BitwiseOr\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_BitwiseNot=function(){return{type:\"Node_Expr_BitwiseNot\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_BooleanNot=function(){return{type:\"Node_Expr_BooleanNot\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_BooleanAnd=function(){return{type:\"Node_Expr_BooleanAnd\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Instanceof=function(){return{type:\"Node_Expr_Instanceof\",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Clone=function(){return{type:\"Node_Expr_Clone\",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Scalar_LNumber_parse=function(e){return e},r.Parser.prototype.Scalar_DNumber_parse=function(e){return e},r.Parser.prototype.Scalar_String_parseDocString=function(){return'\"'+arguments[1].replace(/([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"/g,'$1\\\\\"')+'\"'},r.Parser.prototype.Node_Scalar_String=function(){return{type:\"Node_Scalar_String\",value:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Scalar_String_create=function(){return{type:\"Node_Scalar_String\",value:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Scalar_LNumber=function(){return{type:\"Node_Scalar_LNumber\",value:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Scalar_DNumber=function(){return{type:\"Node_Scalar_DNumber\",value:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Scalar_Encapsed=function(){return{type:\"Node_Scalar_Encapsed\",parts:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Name=function(){return{type:\"Node_Name\",parts:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Param=function(){return{type:\"Node_Param\",name:arguments[0],def:arguments[1],Type:arguments[2],byRef:arguments[3],attributes:arguments[4]}},r.Parser.prototype.Node_Arg=function(){return{type:\"Node_Name\",value:arguments[0],byRef:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Const=function(){return{type:\"Node_Const\",name:arguments[0],value:arguments[1],attributes:arguments[2]}},t.PHP=r})"
  },
  {
    "path": "public/js/bootstrap-datepicker.js",
    "content": "/* =========================================================\n * bootstrap-datepicker.js \n * http://www.eyecon.ro/bootstrap-datepicker\n * =========================================================\n * Copyright 2012 Stefan Petre\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ========================================================= */\n \n!function( $ ) {\n\t\n\t// Picker object\n\t\n\tvar Datepicker = function(element, options){\n\t\tthis.element = $(element);\n\t\tthis.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'mm/dd/yyyy');\n\t\tthis.picker = $(DPGlobal.template)\n\t\t\t\t\t\t\t.appendTo('body')\n\t\t\t\t\t\t\t.on({\n\t\t\t\t\t\t\t\tclick: $.proxy(this.click, this),\n\t\t\t\t\t\t\t\tmousedown: $.proxy(this.mousedown, this)\n\t\t\t\t\t\t\t});\n\t\tthis.isInput = this.element.is('input');\n\t\tthis.component = this.element.is('.date') ? this.element.find('.add-on') : false;\n\t\t\n\t\tif (this.isInput) {\n\t\t\tthis.element.on({\n\t\t\t\tfocus: $.proxy(this.show, this),\n\t\t\t\tblur: $.proxy(this.hide, this),\n\t\t\t\tkeyup: $.proxy(this.update, this)\n\t\t\t});\n\t\t} else {\n\t\t\tif (this.component){\n\t\t\t\tthis.component.on('click', $.proxy(this.show, this));\n\t\t\t} else {\n\t\t\t\tthis.element.on('click', $.proxy(this.show, this));\n\t\t\t}\n\t\t}\n\t\tthis.minViewMode = options.minViewMode||this.element.data('date-minviewmode')||0;\n\t\tif (typeof this.minViewMode === 'string') {\n\t\t\tswitch (this.minViewMode) {\n\t\t\t\tcase 'months':\n\t\t\t\t\tthis.minViewMode = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'years':\n\t\t\t\t\tthis.minViewMode = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.minViewMode = 0;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tthis.viewMode = options.viewMode||this.element.data('date-viewmode')||0;\n\t\tif (typeof this.viewMode === 'string') {\n\t\t\tswitch (this.viewMode) {\n\t\t\t\tcase 'months':\n\t\t\t\t\tthis.viewMode = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'years':\n\t\t\t\t\tthis.viewMode = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.viewMode = 0;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tthis.startViewMode = this.viewMode;\n\t\tthis.weekStart = options.weekStart||this.element.data('date-weekstart')||0;\n\t\tthis.weekEnd = this.weekStart === 0 ? 6 : this.weekStart - 1;\n\t\tthis.fillDow();\n\t\tthis.fillMonths();\n\t\tthis.update();\n\t\tthis.showMode();\n\t};\n\t\n\tDatepicker.prototype = {\n\t\tconstructor: Datepicker,\n\t\t\n\t\tshow: function(e) {\n\t\t\tthis.picker.show();\n\t\t\tthis.height = this.component ? this.component.outerHeight() : this.element.outerHeight();\n\t\t\tthis.place();\n\t\t\t$(window).on('resize', $.proxy(this.place, this));\n\t\t\tif (e ) {\n\t\t\t\te.stopPropagation();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t\tif (!this.isInput) {\n\t\t\t\t$(document).on('mousedown', $.proxy(this.hide, this));\n\t\t\t}\n\t\t\tthis.element.trigger({\n\t\t\t\ttype: 'show',\n\t\t\t\tdate: this.date\n\t\t\t});\n\t\t},\n\t\t\n\t\thide: function(){\n\t\t\tthis.picker.hide();\n\t\t\t$(window).off('resize', this.place);\n\t\t\tthis.viewMode = this.startViewMode;\n\t\t\tthis.showMode();\n\t\t\tif (!this.isInput) {\n\t\t\t\t$(document).off('mousedown', this.hide);\n\t\t\t}\n\t\t\tthis.set();\n\t\t\tthis.element.trigger({\n\t\t\t\ttype: 'hide',\n\t\t\t\tdate: this.date\n\t\t\t});\n\t\t},\n\t\t\n\t\tset: function() {\n\t\t\tvar formated = DPGlobal.formatDate(this.date, this.format);\n\t\t\tif (!this.isInput) {\n\t\t\t\tif (this.component){\n\t\t\t\t\tthis.element.find('input').prop('value', formated);\n\t\t\t\t}\n\t\t\t\tthis.element.data('date', formated);\n\t\t\t} else {\n\t\t\t\tthis.element.prop('value', formated);\n\t\t\t}\n\t\t},\n\t\t\n\t\tsetValue: function(newDate) {\n\t\t\tif (typeof newDate === 'string') {\n\t\t\t\tthis.date = DPGlobal.parseDate(newDate, this.format);\n\t\t\t} else {\n\t\t\t\tthis.date = new Date(newDate);\n\t\t\t}\n\t\t\tthis.set();\n\t\t\tthis.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0);\n\t\t\tthis.fill();\n\t\t},\n\t\t\n\t\tplace: function(){\n\t\t\tvar offset = this.component ? this.component.offset() : this.element.offset();\n\t\t\tthis.picker.css({\n\t\t\t\ttop: offset.top + this.height,\n\t\t\t\tleft: offset.left\n\t\t\t});\n\t\t},\n\t\t\n\t\tupdate: function(newDate){\n\t\t\tthis.date = DPGlobal.parseDate(\n\t\t\t\ttypeof newDate === 'string' ? newDate : (this.isInput ? this.element.prop('value') : this.element.data('date')),\n\t\t\t\tthis.format\n\t\t\t);\n\t\t\tthis.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0);\n\t\t\tthis.fill();\n\t\t},\n\t\t\n\t\tfillDow: function(){\n\t\t\tvar dowCnt = this.weekStart;\n\t\t\tvar html = '<tr>';\n\t\t\twhile (dowCnt < this.weekStart + 7) {\n\t\t\t\thtml += '<th class=\"dow\">'+DPGlobal.dates.daysMin[(dowCnt++)%7]+'</th>';\n\t\t\t}\n\t\t\thtml += '</tr>';\n\t\t\tthis.picker.find('.datepicker-days thead').append(html);\n\t\t},\n\t\t\n\t\tfillMonths: function(){\n\t\t\tvar html = '';\n\t\t\tvar i = 0\n\t\t\twhile (i < 12) {\n\t\t\t\thtml += '<span class=\"month\">'+DPGlobal.dates.monthsShort[i++]+'</span>';\n\t\t\t}\n\t\t\tthis.picker.find('.datepicker-months td').append(html);\n\t\t},\n\t\t\n\t\tfill: function() {\n\t\t\tvar d = new Date(this.viewDate),\n\t\t\t\tyear = d.getFullYear(),\n\t\t\t\tmonth = d.getMonth(),\n\t\t\t\tcurrentDate = this.date.valueOf();\n\t\t\tthis.picker.find('.datepicker-days th:eq(1)')\n\t\t\t\t\t\t.text(DPGlobal.dates.months[month]+' '+year);\n\t\t\tvar prevMonth = new Date(year, month-1, 28,0,0,0,0),\n\t\t\t\tday = DPGlobal.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth());\n\t\t\tprevMonth.setDate(day);\n\t\t\tprevMonth.setDate(day - (prevMonth.getDay() - this.weekStart + 7)%7);\n\t\t\tvar nextMonth = new Date(prevMonth);\n\t\t\tnextMonth.setDate(nextMonth.getDate() + 42);\n\t\t\tnextMonth = nextMonth.valueOf();\n\t\t\thtml = [];\n\t\t\tvar clsName;\n\t\t\twhile(prevMonth.valueOf() < nextMonth) {\n\t\t\t\tif (prevMonth.getDay() === this.weekStart) {\n\t\t\t\t\thtml.push('<tr>');\n\t\t\t\t}\n\t\t\t\tclsName = '';\n\t\t\t\tif (prevMonth.getMonth() < month) {\n\t\t\t\t\tclsName += ' old';\n\t\t\t\t} else if (prevMonth.getMonth() > month) {\n\t\t\t\t\tclsName += ' new';\n\t\t\t\t}\n\t\t\t\tif (prevMonth.valueOf() === currentDate) {\n\t\t\t\t\tclsName += ' active';\n\t\t\t\t}\n\t\t\t\thtml.push('<td class=\"day'+clsName+'\">'+prevMonth.getDate() + '</td>');\n\t\t\t\tif (prevMonth.getDay() === this.weekEnd) {\n\t\t\t\t\thtml.push('</tr>');\n\t\t\t\t}\n\t\t\t\tprevMonth.setDate(prevMonth.getDate()+1);\n\t\t\t}\n\t\t\tthis.picker.find('.datepicker-days tbody').empty().append(html.join(''));\n\t\t\tvar currentYear = this.date.getFullYear();\n\t\t\t\n\t\t\tvar months = this.picker.find('.datepicker-months')\n\t\t\t\t\t\t.find('th:eq(1)')\n\t\t\t\t\t\t\t.text(year)\n\t\t\t\t\t\t\t.end()\n\t\t\t\t\t\t.find('span').removeClass('active');\n\t\t\tif (currentYear === year) {\n\t\t\t\tmonths.eq(this.date.getMonth()).addClass('active');\n\t\t\t}\n\t\t\t\n\t\t\thtml = '';\n\t\t\tyear = parseInt(year/10, 10) * 10;\n\t\t\tvar yearCont = this.picker.find('.datepicker-years')\n\t\t\t\t\t\t\t\t.find('th:eq(1)')\n\t\t\t\t\t\t\t\t\t.text(year + '-' + (year + 9))\n\t\t\t\t\t\t\t\t\t.end()\n\t\t\t\t\t\t\t\t.find('td');\n\t\t\tyear -= 1;\n\t\t\tfor (var i = -1; i < 11; i++) {\n\t\t\t\thtml += '<span class=\"year'+(i === -1 || i === 10 ? ' old' : '')+(currentYear === year ? ' active' : '')+'\">'+year+'</span>';\n\t\t\t\tyear += 1;\n\t\t\t}\n\t\t\tyearCont.html(html);\n\t\t},\n\t\t\n\t\tclick: function(e) {\n\t\t\te.stopPropagation();\n\t\t\te.preventDefault();\n\t\t\tvar target = $(e.target).closest('span, td, th');\n\t\t\tif (target.length === 1) {\n\t\t\t\tswitch(target[0].nodeName.toLowerCase()) {\n\t\t\t\t\tcase 'th':\n\t\t\t\t\t\tswitch(target[0].className) {\n\t\t\t\t\t\t\tcase 'switch':\n\t\t\t\t\t\t\t\tthis.showMode(1);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'prev':\n\t\t\t\t\t\t\tcase 'next':\n\t\t\t\t\t\t\t\tthis.viewDate['set'+DPGlobal.modes[this.viewMode].navFnc].call(\n\t\t\t\t\t\t\t\t\tthis.viewDate,\n\t\t\t\t\t\t\t\t\tthis.viewDate['get'+DPGlobal.modes[this.viewMode].navFnc].call(this.viewDate) + \n\t\t\t\t\t\t\t\t\tDPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tthis.fill();\n\t\t\t\t\t\t\t\tthis.set();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'span':\n\t\t\t\t\t\tif (target.is('.month')) {\n\t\t\t\t\t\t\tvar month = target.parent().find('span').index(target);\n\t\t\t\t\t\t\tthis.viewDate.setMonth(month);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar year = parseInt(target.text(), 10)||0;\n\t\t\t\t\t\t\tthis.viewDate.setFullYear(year);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (this.viewMode !== 0) {\n\t\t\t\t\t\t\tthis.date = new Date(this.viewDate);\n\t\t\t\t\t\t\tthis.element.trigger({\n\t\t\t\t\t\t\t\ttype: 'changeDate',\n\t\t\t\t\t\t\t\tdate: this.date,\n\t\t\t\t\t\t\t\tviewMode: DPGlobal.modes[this.viewMode].clsName\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.showMode(-1);\n\t\t\t\t\t\tthis.fill();\n\t\t\t\t\t\tthis.set();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'td':\n\t\t\t\t\t\tif (target.is('.day')){\n\t\t\t\t\t\t\tvar day = parseInt(target.text(), 10)||1;\n\t\t\t\t\t\t\tvar month = this.viewDate.getMonth();\n\t\t\t\t\t\t\tif (target.is('.old')) {\n\t\t\t\t\t\t\t\tmonth -= 1;\n\t\t\t\t\t\t\t} else if (target.is('.new')) {\n\t\t\t\t\t\t\t\tmonth += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar year = this.viewDate.getFullYear();\n\t\t\t\t\t\t\tthis.date = new Date(year, month, day,0,0,0,0);\n\t\t\t\t\t\t\tthis.viewDate = new Date(year, month, Math.min(28, day),0,0,0,0);\n\t\t\t\t\t\t\tthis.fill();\n\t\t\t\t\t\t\tthis.set();\n\t\t\t\t\t\t\tthis.element.trigger({\n\t\t\t\t\t\t\t\ttype: 'changeDate',\n\t\t\t\t\t\t\t\tdate: this.date,\n\t\t\t\t\t\t\t\tviewMode: DPGlobal.modes[this.viewMode].clsName\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\n\t\tmousedown: function(e){\n\t\t\te.stopPropagation();\n\t\t\te.preventDefault();\n\t\t},\n\t\t\n\t\tshowMode: function(dir) {\n\t\t\tif (dir) {\n\t\t\t\tthis.viewMode = Math.max(this.minViewMode, Math.min(2, this.viewMode + dir));\n\t\t\t}\n\t\t\tthis.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();\n\t\t}\n\t};\n\t\n\t$.fn.datepicker = function ( option, val ) {\n\t\treturn this.each(function () {\n\t\t\tvar $this = $(this),\n\t\t\t\tdata = $this.data('datepicker'),\n\t\t\t\toptions = typeof option === 'object' && option;\n\t\t\tif (!data) {\n\t\t\t\t$this.data('datepicker', (data = new Datepicker(this, $.extend({}, $.fn.datepicker.defaults,options))));\n\t\t\t}\n\t\t\tif (typeof option === 'string') data[option](val);\n\t\t});\n\t};\n\n\t$.fn.datepicker.defaults = {\n\t};\n\t$.fn.datepicker.Constructor = Datepicker;\n\t\n\tvar DPGlobal = {\n\t\tmodes: [\n\t\t\t{\n\t\t\t\tclsName: 'days',\n\t\t\t\tnavFnc: 'Month',\n\t\t\t\tnavStep: 1\n\t\t\t},\n\t\t\t{\n\t\t\t\tclsName: 'months',\n\t\t\t\tnavFnc: 'FullYear',\n\t\t\t\tnavStep: 1\n\t\t\t},\n\t\t\t{\n\t\t\t\tclsName: 'years',\n\t\t\t\tnavFnc: 'FullYear',\n\t\t\t\tnavStep: 10\n\t\t}],\n\t\tdates:{\n\t\t\tdays: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"],\n\t\t\tdaysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"],\n\t\t\tdaysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\", \"Su\"],\n\t\t\tmonths: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n\t\t\tmonthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n\t\t},\n\t\tisLeapYear: function (year) {\n\t\t\treturn (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0))\n\t\t},\n\t\tgetDaysInMonth: function (year, month) {\n\t\t\treturn [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]\n\t\t},\n\t\tparseFormat: function(format){\n\t\t\tvar separator = format.match(/[.\\/\\-\\s].*?/),\n\t\t\t\tparts = format.split(/\\W+/);\n\t\t\tif (!separator || !parts || parts.length === 0){\n\t\t\t\tthrow new Error(\"Invalid date format.\");\n\t\t\t}\n\t\t\treturn {separator: separator, parts: parts};\n\t\t},\n\t\tparseDate: function(date, format) {\n\t\t\tvar parts = date.split(format.separator),\n\t\t\t\tdate = new Date(),\n\t\t\t\tval;\n\t\t\tdate.setHours(0);\n\t\t\tdate.setMinutes(0);\n\t\t\tdate.setSeconds(0);\n\t\t\tdate.setMilliseconds(0);\n\t\t\tif (parts.length === format.parts.length) {\n\t\t\t\tfor (var i=0, cnt = format.parts.length; i < cnt; i++) {\n\t\t\t\t\tval = parseInt(parts[i], 10)||1;\n\t\t\t\t\tswitch(format.parts[i]) {\n\t\t\t\t\t\tcase 'dd':\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\t\tdate.setDate(val);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'mm':\n\t\t\t\t\t\tcase 'm':\n\t\t\t\t\t\t\tdate.setMonth(val - 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'yy':\n\t\t\t\t\t\t\tdate.setFullYear(2000 + val);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'yyyy':\n\t\t\t\t\t\t\tdate.setFullYear(val);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn date;\n\t\t},\n\t\tformatDate: function(date, format){\n\t\t\tvar val = {\n\t\t\t\td: date.getDate(),\n\t\t\t\tm: date.getMonth() + 1,\n\t\t\t\tyy: date.getFullYear().toString().substring(2),\n\t\t\t\tyyyy: date.getFullYear()\n\t\t\t};\n\t\t\tval.dd = (val.d < 10 ? '0' : '') + val.d;\n\t\t\tval.mm = (val.m < 10 ? '0' : '') + val.m;\n\t\t\tvar date = [];\n\t\t\tfor (var i=0, cnt = format.parts.length; i < cnt; i++) {\n\t\t\t\tdate.push(val[format.parts[i]]);\n\t\t\t}\n\t\t\treturn date.join(format.separator);\n\t\t},\n\t\theadTemplate: '<thead>'+\n\t\t\t\t\t\t\t'<tr>'+\n\t\t\t\t\t\t\t\t'<th class=\"prev\">&lsaquo;</th>'+\n\t\t\t\t\t\t\t\t'<th colspan=\"5\" class=\"switch\"></th>'+\n\t\t\t\t\t\t\t\t'<th class=\"next\">&rsaquo;</th>'+\n\t\t\t\t\t\t\t'</tr>'+\n\t\t\t\t\t\t'</thead>',\n\t\tcontTemplate: '<tbody><tr><td colspan=\"7\"></td></tr></tbody>'\n\t};\n\tDPGlobal.template = '<div class=\"datepicker dropdown-menu\">'+\n\t\t\t\t\t\t\t'<div class=\"datepicker-days\">'+\n\t\t\t\t\t\t\t\t'<table class=\" table-condensed\">'+\n\t\t\t\t\t\t\t\t\tDPGlobal.headTemplate+\n\t\t\t\t\t\t\t\t\t'<tbody></tbody>'+\n\t\t\t\t\t\t\t\t'</table>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t\t'<div class=\"datepicker-months\">'+\n\t\t\t\t\t\t\t\t'<table class=\"table-condensed\">'+\n\t\t\t\t\t\t\t\t\tDPGlobal.headTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.contTemplate+\n\t\t\t\t\t\t\t\t'</table>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t\t'<div class=\"datepicker-years\">'+\n\t\t\t\t\t\t\t\t'<table class=\"table-condensed\">'+\n\t\t\t\t\t\t\t\t\tDPGlobal.headTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.contTemplate+\n\t\t\t\t\t\t\t\t'</table>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t'</div>';\n\n}( window.jQuery )"
  },
  {
    "path": "public/js/bootstrap-multiselect.js",
    "content": "/**\n * bootstrap-multiselect.js 1.0.0\n * https://github.com/davidstutz/bootstrap-multiselect\n *\n * Copyright 2012, 2013 David Stutz\n * \n * Dual licensed under the BSD-3-Clause and the Apache License, Version 2.0.\n * See the README.\n */\n!function($) {\"use strict\";// jshint ;_;\n\n    if ( typeof ko != 'undefined' && ko.bindingHandlers && !ko.bindingHandlers.multiselect) {\n        ko.bindingHandlers.multiselect = {\n            init : function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {\n            },\n            update : function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {\n                var ms = $(element).data('multiselect');\n                if (!ms) {\n                    $(element).multiselect(ko.utils.unwrapObservable(valueAccessor()));\n                }\n                else\n                if (allBindingsAccessor().options && allBindingsAccessor().options().length !== ms.originalOptions.length) {\n                    ms.updateOriginalOptions();\n                    $(element).multiselect('rebuild');\n                }\n            }\n        };\n    }\n\n    function Multiselect(select, options) {\n\n        this.options = this.getOptions(options);\n        this.$select = $(select);\n        this.originalOptions = this.$select.clone()[0].options;\n        //we have to clone to create a new reference\n        this.query = '';\n        this.searchTimeout = null;\n\n        this.options.multiple = this.$select.attr('multiple') == \"multiple\";\n\n        this.$container = $(this.options.buttonContainer).append('<button type=\"button\" class=\"multiselect dropdown-toggle ' + this.options.buttonClass + '\" data-toggle=\"dropdown\">' + this.options.buttonText(this.getSelected(), this.$select) + '</button>')\n            .append('<ul class=\"multiselect-container dropdown-menu' + (this.options.dropRight ? ' pull-right' : '') + '\"></ul>');\n\n        // Manually add button width if set.\n        if (this.options.buttonWidth) {\n            $('button', this.$container).css({\n                'width' : this.options.buttonWidth\n            });\n        }\n        \n        // Keep the tab index from the select.\n        var tabindex = this.$select.attr('tabindex');\n        if (tabindex) {\n            $('button', this.$container).attr('tabindex', tabindex);\n        }\n        \n        // Set max height of dropdown menu to activate auto scrollbar.\n        if (this.options.maxHeight) {\n            // TODO: Add a class for this option to move the css declarations.\n            $('.multiselect-container', this.$container).css({\n                'max-height' : this.options.maxHeight + 'px',\n                'overflow-y' : 'auto',\n                'overflow-x' : 'hidden'\n            });\n        }\n\n        // Enable filtering.\n        if (this.options.enableFiltering || this.options.enableCaseInsensitiveFiltering) {\n            this.buildFilter();\n        }\n        \n        // Build select all if enabled.\n        this.buildSelectAll();\n        this.buildDropdown();\n        this.updateButtonText();\n\n        this.$select.hide().after(this.$container);\n    };\n\n    Multiselect.prototype = {\n\n        defaults: {\n            // Default text function will either print 'None selected' in case no\n            // option is selected, or a list of the selected options up to a length of 3 selected options.\n            // If more than 3 options are selected, the number of selected options is printed.\n            buttonText: function(options, select) {\n                if (options.length == 0) {\n                    return this.nonSelectedText + '<b class=\"caret\"></b>';\n                }\n                else\n                if (options.length > 3) {\n                    return options.length + ' ' + this.nSelectedText + ' <b class=\"caret\"></b>';\n                }\n                else {\n                    var selected = '';\n                    options.each(function() {\n                        var label = ($(this).attr('label') !== undefined) ? $(this).attr('label') : $(this).html();\n\n                        selected += label + ', ';\n                    });\n                    return selected.substr(0, selected.length - 2) + ' <b class=\"caret\"></b>';\n                }\n            },\n            // Like the buttonText option to update the title of the button.\n            buttonTitle: function(options, select) {\n                var selected = '';\n                options.each(function () {\n                    selected += $(this).text() + ', ';\n                });\n                return selected.substr(0, selected.length - 2);\n            },\n            // Is triggered on change of the selected options.\n            onChange : function(option, checked) {\n\n            },\n            buttonClass: 'btn',\n            dropRight: false,\n            selectedClass: 'active',\n            buttonWidth: 'auto',\n            buttonContainer: '<div class=\"btn-group\" />',\n            // Maximum height of the dropdown menu.\n            // If maximum height is exceeded a scrollbar will be displayed.\n            maxHeight: false,\n            includeSelectAllOption: false,\n            selectAllText: ' Select all',\n            selectAllValue: 'multiselect-all',\n            enableFiltering: false,\n            enableCaseInsensitiveFiltering: false,\n            filterPlaceholder: 'Search',\n            // possible options: 'text', 'value', 'both'\n            filterBehavior: 'text',\n            preventInputChangeEvent: false,\n            nonSelectedText: 'None selected',\n            nSelectedText: 'selected'\n        },\n\n        constructor: Multiselect,\n\n        // Will build an dropdown element for the given option.\n        createOptionValue: function(element) {\n            if ($(element).is(':selected')) {\n                $(element).attr('selected', 'selected').prop('selected', true);\n            }\n\n            // Support the label attribute on options.\n            var label = $(element).attr('label') || $(element).html();\n            var value = $(element).val();\n            var inputType = this.options.multiple ? \"checkbox\" : \"radio\";\n\n            var $li = $('<li><a href=\"javascript:void(0);\"><label class=\"' + inputType + '\"><input type=\"' + inputType + '\" /></label></a></li>');\n\n            var selected = $(element).prop('selected') || false;\n            var $checkbox = $('input', $li);\n            $checkbox.val(value);\n\n            if (value == this.options.selectAllValue) {\n                $checkbox.parent().parent().addClass('multiselect-all');\n            }\n\n            $('label', $li).append(\" \" + label);\n\n            $('.multiselect-container', this.$container).append($li);\n\n            if ($(element).is(':disabled')) {\n                $checkbox.attr('disabled', 'disabled').prop('disabled', true).parents('li').addClass('disabled');\n            }\n\n            $checkbox.prop('checked', selected);\n\n            if (selected && this.options.selectedClass) {\n                $checkbox.parents('li').addClass(this.options.selectedClass);\n            }\n        },\n\n        toggleActiveState: function(shouldBeActive) {\n            if (this.$select.attr('disabled') == undefined) {\n                $('button.multiselect.dropdown-toggle', this.$container).removeClass('disabled');\n            }\n            else {\n                $('button.multiselect.dropdown-toggle', this.$container).addClass('disabled');\n            }\n        },\n\n        // Add the select all option to the select.\n        buildSelectAll: function() {\n            var alreadyHasSelectAll = this.$select[0][0] ? this.$select[0][0].value == this.options.selectAllValue : false;\n\n            // If options.includeSelectAllOption === true, add the include all checkbox.\n            if (this.options.includeSelectAllOption && this.options.multiple && !alreadyHasSelectAll) {\n                this.$select.prepend('<option value=\"' + this.options.selectAllValue + '\">' + this.options.selectAllText + '</option>');\n            }\n        },\n\n        // Build the dropdown and bind event handling.\n        buildDropdown: function() {\n            this.toggleActiveState();\n\n            this.$select.children().each($.proxy(function(index, element) {\n                // Support optgroups and options without a group simultaneously.\n                var tag = $(element).prop('tagName').toLowerCase();\n                if (tag == 'optgroup') {\n                    var group = element;\n                    var groupName = $(group).prop('label');\n\n                    // Add a header for the group.\n                    var $li = $('<li><label class=\"multiselect-group\"></label></li>');\n                    $('label', $li).text(groupName);\n                    $('.multiselect-container', this.$container).append($li);\n\n                    // Add the options of the group.\n                    $('option', group).each($.proxy(function(index, element) {\n                        this.createOptionValue(element);\n                    }, this));\n                }\n                else\n                if (tag == 'option') {\n                    this.createOptionValue(element);\n                }\n                else {\n                    // Ignore illegal tags.\n                }\n            }, this));\n\n            // Bind the change event on the dropdown elements.\n            $('.multiselect-container li input', this.$container).on('change', $.proxy(function(event) {\n                var checked = $(event.target).prop('checked') || false;\n                var isSelectAllOption = $(event.target).val() == this.options.selectAllValue;\n\n                // Apply or unapply the configured selected class.\n                if (this.options.selectedClass) {\n                    if (checked) {\n                        $(event.target).parents('li').addClass(this.options.selectedClass);\n                    }\n                    else {\n                        $(event.target).parents('li').removeClass(this.options.selectedClass);\n                    }\n                }\n\n                var $option = $('option', this.$select).filter(function() {\n                    return $(this).val() == $(event.target).val();\n                });\n\n                var $optionsNotThis = $('option', this.$select).not($option);\n                var $checkboxesNotThis = $('input', this.$container).not($(event.target));\n\n                // Toggle all options if the select all option was changed.\n                if (isSelectAllOption) {\n                    $checkboxesNotThis.filter(function() {\n                        return $(this).is(':checked') != checked;\n                    }).trigger('click');\n                }\n\n                if (checked) {\n                    $option.prop('selected', true);\n\n                    if (this.options.multiple) {\n                        $option.attr('selected', 'selected');\n                    }\n                    else {\n                        if (this.options.selectedClass) {\n                            $($checkboxesNotThis).parents('li').removeClass(this.options.selectedClass);\n                        }\n\n                        $($checkboxesNotThis).prop('checked', false);\n\n                        $optionsNotThis.removeAttr('selected').prop('selected', false);\n\n                        // It's a single selection, so close.\n                        $(this.$container).find(\".multiselect.dropdown-toggle\").click();\n                    }\n\n                    if (this.options.selectedClass == \"active\") {\n                        $optionsNotThis.parents(\"a\").css(\"outline\", \"\");\n                    }\n\n                }\n                else {\n                    $option.removeAttr('selected').prop('selected', false);\n                }\n\n                this.updateButtonText();\n\n                this.options.onChange($option, checked);\n\n                this.$select.change();\n\n                if(this.options.preventInputChangeEvent) {\n                    return false;\n                }\n            }, this));\n\n            $('.multiselect-container li a', this.$container).on('touchstart click', function(event) {\n                event.stopPropagation();\n                $(event.target).blur();\n            });\n\n            // Keyboard support.\n            this.$container.on('keydown', $.proxy(function(event) {\n                if ($('input[type=\"text\"]', this.$container).is(':focus'))\n                    return;\n                if ((event.keyCode == 9 || event.keyCode == 27) && this.$container.hasClass('open')) {\n                    // Close on tab or escape.\n                    $(this.$container).find(\".multiselect.dropdown-toggle\").click();\n                }\n                else {\n                    var $items = $(this.$container).find(\"li:not(.divider):visible a\");\n\n                    if (!$items.length) {\n                        return;\n                    }\n\n                    var index = $items.index($items.filter(':focus'));\n\n                    // Navigation up.\n                    if (event.keyCode == 38 && index > 0) {\n                        index--;\n                    }\n                    // Navigate down.\n                    else\n                    if (event.keyCode == 40 && index < $items.length - 1) {\n                        index++;\n                    }\n                    else\n                    if (!~index) {\n                        index = 0;\n                    }\n\n                    var $current = $items.eq(index);\n                    $current.focus();\n\n                    // Override style for items in li:active.\n                    if (this.options.selectedClass == \"active\") {\n                        $current.css(\"outline\", \"thin dotted #333\").css(\"outline\", \"5px auto -webkit-focus-ring-color\");\n\n                        $items.not($current).css(\"outline\", \"\");\n                    }\n\n                    if (event.keyCode == 32 || event.keyCode == 13) {\n                        var $checkbox = $current.find('input');\n\n                        $checkbox.prop(\"checked\", !$checkbox.prop(\"checked\"));\n                        $checkbox.change();\n                    }\n\n                    event.stopPropagation();\n                    event.preventDefault();\n                }\n            }, this));\n        },\n\n        // Build and bind filter.\n        buildFilter: function() {\n            $('.multiselect-container', this.$container).prepend('<div class=\"input-prepend\"><span class=\"add-on\"><i class=\"icon-search\"></i></span><input class=\"multiselect-search\" type=\"text\" placeholder=\"' + this.options.filterPlaceholder + '\"></div>');\n\n            $('.multiselect-search', this.$container).val(this.query).on('click', function(event) {\n                event.stopPropagation();\n            }).on('keydown', $.proxy(function(event) {\n                // This is useful to catch \"keydown\" events after the browser has\n                // updated the control.\n                clearTimeout(this.searchTimeout);\n\n                this.searchTimeout = this.asyncFunction($.proxy(function() {\n\n                    if (this.query != event.target.value) {\n                        this.query = event.target.value;\n\n                        $.each($('.multiselect-container li', this.$container), $.proxy(function(index, element) {\n                            var value = $('input', element).val();\n                            if (value != this.options.selectAllValue) {\n                                var text = $('label', element).text();\n                                var value = $('input', element).val();\n                                if (value && text && value != this.options.selectAllValue) {\n                                    // by default lets assume that element is not\n                                    // interesting for this search\n                                    var showElement = false;\n\n                                    var filterCandidate = '';\n                                    if ((this.options.filterBehavior == 'text' || this.options.filterBehavior == 'both')) {\n                                        filterCandidate = text;\n                                    }\n                                    if ((this.options.filterBehavior == 'value' || this.options.filterBehavior == 'both')) {\n                                        filterCandidate = value;\n                                    }\n\n                                    if (this.options.enableCaseInsensitiveFiltering && filterCandidate.toLowerCase().indexOf(this.query.toLowerCase()) > -1) {\n                                        showElement = true;\n                                    }\n                                    else if (filterCandidate.indexOf(this.query) > -1) {\n                                        showElement = true;\n                                    }\n\n                                    if (showElement) {\n                                        $(element).show();\n                                    }\n                                    else {\n                                        $(element).hide();\n                                    }\n                                }\n                            }\n                        }, this));\n                    }\n                }, this), 300, this);\n            }, this));\n        },\n\n        // Destroy - unbind - the plugin.\n        destroy: function() {\n            this.$container.remove();\n            this.$select.show();\n        },\n\n        // Refreshs the checked options based on the current state of the select.\n        refresh: function() {\n            $('option', this.$select).each($.proxy(function(index, element) {\n                var $input = $('.multiselect-container li input', this.$container).filter(function() {\n                    return $(this).val() == $(element).val();\n                });\n\n                if ($(element).is(':selected')) {\n                    $input.prop('checked', true);\n\n                    if (this.options.selectedClass) {\n                        $input.parents('li').addClass(this.options.selectedClass);\n                    }\n                }\n                else {\n                    $input.prop('checked', false);\n\n                    if (this.options.selectedClass) {\n                        $input.parents('li').removeClass(this.options.selectedClass);\n                    }\n                }\n\n                if ($(element).is(\":disabled\")) {\n                    $input.attr('disabled', 'disabled').prop('disabled', true).parents('li').addClass('disabled');\n                }\n                else {\n                    $input.removeAttr('disabled').prop('disabled', false).parents('li').removeClass('disabled');\n                }\n            }, this));\n\n            this.updateButtonText();\n        },\n\n        // Select an option by its value.\n        select: function(value) {\n            var $option = $('option', this.$select).filter(function() {\n                return $(this).val() == value;\n            });\n            var $checkbox = $('.multiselect-container li input', this.$container).filter(function() {\n                return $(this).val() == value;\n            });\n\n            if (this.options.selectedClass) {\n                $checkbox.parents('li').addClass(this.options.selectedClass);\n            }\n\n            $checkbox.prop('checked', true);\n\n            $option.attr('selected', 'selected').prop('selected', true);\n\n            this.updateButtonText();\n            this.options.onChange($option, true);\n        },\n\n        // Deselect an option by its value.\n        deselect: function(value) {\n            var $option = $('option', this.$select).filter(function() {\n                return $(this).val() == value;\n            });\n            var $checkbox = $('.multiselect-container li input', this.$container).filter(function() {\n                return $(this).val() == value;\n            });\n\n            if (this.options.selectedClass) {\n                $checkbox.parents('li').removeClass(this.options.selectedClass);\n            }\n\n            $checkbox.prop('checked', false);\n\n            $option.removeAttr('selected').prop('selected', false);\n\n            this.updateButtonText();\n            this.options.onChange($option, false);\n        },\n\n        // Rebuild the whole dropdown menu.\n        rebuild: function() {\n            $('.multiselect-container', this.$container).html('');\n            this.buildDropdown(this.$select, this.options);\n            this.updateButtonText();\n\n            // Enable filtering.\n            if (this.options.enableFiltering || this.options.enableCaseInsensitiveFiltering) {\n                this.buildFilter();\n            }\n        },\n\n        // Get options by merging defaults and given options.\n        getOptions: function(options) {\n            return $.extend({}, this.defaults, options);\n        },\n\n        updateButtonText: function() {\n            var options = this.getSelected();\n            \n            // First update the displayed button text.\n            $('button', this.$container).html(this.options.buttonText(options, this.$select));\n            \n            // Now update the title attribute of the button.\n            $('button', this.$container).attr('title', this.options.buttonTitle(options, this.$select));\n            \n        },\n\n        // Get all selected options.\n        getSelected: function() {\n            return $('option:selected[value!=\"' + this.options.selectAllValue + '\"]', this.$select);\n        },\n\n        updateOriginalOptions: function() {\n            this.originalOptions = this.$select.clone()[0].options;\n        },\n\n        asyncFunction: function(callback, timeout, self) {\n            var args = Array.prototype.slice.call(arguments, 3);\n            return setTimeout(function() {\n                callback.apply(self || window, args);\n            }, timeout);\n        }\n    };\n\n    $.fn.multiselect = function(option, parameter) {\n        return this.each(function() {\n            var data = $(this).data('multiselect'), options = typeof option == 'object' && option;\n\n            // Initialize the multiselect.\n            if (!data) {\n                $(this).data('multiselect', ( data = new Multiselect(this, options)));\n            }\n\n            // Call multiselect method.\n            if ( typeof option == 'string') {\n                data[option](parameter);\n            }\n        });\n    };\n\n    $.fn.multiselect.Constructor = Multiselect;\n\n    $(function() {\n        $(\"select[data-role=multiselect]\").multiselect();\n    });\n\n}(window.jQuery);\n"
  },
  {
    "path": "public/js/daterangepicker-1.3.2.js",
    "content": "/**\n * @version: 1.3.2\n * @author: Dan Grossman http://www.dangrossman.info/\n * @date: 2014-01-22\n * @copyright: Copyright (c) 2012-2014 Dan Grossman. All rights reserved.\n * @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-2.0\n * @website: http://www.improvely.com/\n */\n!function ($) {\n\n    var DateRangePicker = function (element, options, cb) {\n\n        // by default, the daterangepicker element is placed at the bottom of HTML body\n        this.parentEl = 'body';\n\n        //element that triggered the date range picker\n        this.element = $(element);\n\n        //create the picker HTML object\n        var DRPTemplate = '<div class=\"daterangepicker dropdown-menu\">' +\n            '<div class=\"calendar left\"></div>' +\n            '<div class=\"calendar right\"></div>' +\n            '<div class=\"ranges\">' +\n            '<div class=\"range_inputs\">' +\n            '<div class=\"daterangepicker_start_input\">' +\n            '<label for=\"daterangepicker_start\"></label>' +\n            '<input class=\"input-mini\" type=\"text\" name=\"daterangepicker_start\" value=\"\" disabled=\"disabled\" />' +\n            '</div>' +\n            '<div class=\"daterangepicker_end_input\">' +\n            '<label for=\"daterangepicker_end\"></label>' +\n            '<input class=\"input-mini\" type=\"text\" name=\"daterangepicker_end\" value=\"\" disabled=\"disabled\" />' +\n            '</div>' +\n            '<button class=\"applyBtn\" disabled=\"disabled\"></button>&nbsp;' +\n            '<button class=\"cancelBtn\"></button>' +\n            '</div>' +\n            '</div>' +\n            '</div>';\n\n        this.parentEl = (typeof options == 'object' && options.parentEl && $(options.parentEl)) || $(this.parentEl);\n        this.container = $(DRPTemplate).appendTo(this.parentEl);\n\n        //custom options\n        if (typeof options != 'object')\n            options = {};\n        this.setOptions(options, cb);\n\n        //apply CSS classes and labels to buttons\n        var c = this.container;\n        $.each(this.buttonClasses, function (idx, val) {\n            c.find('button').addClass(val);\n        });\n        this.container.find('.daterangepicker_start_input label').html(this.locale.fromLabel);\n        this.container.find('.daterangepicker_end_input label').html(this.locale.toLabel);\n        if (this.applyClass.length)\n            this.container.find('.applyBtn').addClass(this.applyClass);\n        if (this.cancelClass.length)\n            this.container.find('.cancelBtn').addClass(this.cancelClass);\n        this.container.find('.applyBtn').html(this.locale.applyLabel);\n        this.container.find('.cancelBtn').html(this.locale.cancelLabel);\n\n        //event listeners\n        this.container.on('mousedown', $.proxy(this.mousedown, this));\n\n        this.container.find('.calendar')\n            .on('click', '.prev', $.proxy(this.clickPrev, this))\n            .on('click', '.next', $.proxy(this.clickNext, this))\n            .on('click', 'td.available', $.proxy(this.clickDate, this))\n            .on('mouseenter', 'td.available', $.proxy(this.enterDate, this))\n            .on('mouseleave', 'td.available', $.proxy(this.updateFormInputs, this))\n            .on('change', 'select.yearselect', $.proxy(this.updateMonthYear, this))\n            .on('change', 'select.monthselect', $.proxy(this.updateMonthYear, this))\n            .on('change', 'select.hourselect,select.minuteselect,select.ampmselect', $.proxy(this.updateTime, this));\n\n        this.container.find('.ranges')\n            .on('click', 'button.applyBtn', $.proxy(this.clickApply, this))\n            .on('click', 'button.cancelBtn', $.proxy(this.clickCancel, this))\n            .on('click', '.daterangepicker_start_input,.daterangepicker_end_input', $.proxy(this.showCalendars, this))\n            .on('click', 'li', $.proxy(this.clickRange, this))\n            .on('mouseenter', 'li', $.proxy(this.enterRange, this))\n            .on('mouseleave', 'li', $.proxy(this.updateFormInputs, this));\n\n        if (this.element.is('input')) {\n            this.element.on({\n                'click.daterangepicker': $.proxy(this.show, this),\n                'focus.daterangepicker': $.proxy(this.show, this),\n                'keyup.daterangepicker': $.proxy(this.updateFromControl, this)\n            });\n        } else {\n            this.element.on('click.daterangepicker', $.proxy(this.show, this));\n        }\n\n    };\n\n    DateRangePicker.prototype = {\n\n        constructor: DateRangePicker,\n\n        setOptions: function(options, callback) {\n\n            this.startDate = moment().startOf('day');\n            this.endDate = moment().startOf('day');\n            this.minDate = false;\n            this.maxDate = false;\n            this.dateLimit = false;\n\n            this.showDropdowns = false;\n            this.showWeekNumbers = false;\n            this.timePicker = false;\n            this.timePickerIncrement = 30;\n            this.timePicker12Hour = true;\n            this.singleDatePicker = false;\n            this.ranges = {};\n\n            this.opens = 'right';\n            if (this.element.hasClass('pull-right'))\n                this.opens = 'left';\n\n            this.buttonClasses = ['btn', 'btn-small'];\n            this.applyClass = 'btn-success';\n            this.cancelClass = 'btn-default';\n\n            this.format = 'MM/DD/YYYY';\n            this.separator = ' - ';\n\n            this.locale = {\n                applyLabel: 'Apply',\n                cancelLabel: 'Cancel',\n                fromLabel: 'From',\n                toLabel: 'To',\n                weekLabel: 'W',\n                customRangeLabel: 'Custom Range',\n                daysOfWeek: moment()._lang._weekdaysMin.slice(),\n                monthNames: moment()._lang._monthsShort.slice(),\n                firstDay: 0\n            };\n\n            this.cb = function () { };\n\n            if (typeof options.format == 'string')\n                this.format = options.format;\n\n            if (typeof options.separator == 'string')\n                this.separator = options.separator;\n\n            if (typeof options.startDate == 'string')\n                this.startDate = moment(options.startDate, this.format);\n\n            if (typeof options.endDate == 'string')\n                this.endDate = moment(options.endDate, this.format);\n\n            if (typeof options.minDate == 'string')\n                this.minDate = moment(options.minDate, this.format);\n\n            if (typeof options.maxDate == 'string')\n                this.maxDate = moment(options.maxDate, this.format);\n\n            if (typeof options.startDate == 'object')\n                this.startDate = moment(options.startDate);\n\n            if (typeof options.endDate == 'object')\n                this.endDate = moment(options.endDate);\n\n            if (typeof options.minDate == 'object')\n                this.minDate = moment(options.minDate);\n\n            if (typeof options.maxDate == 'object')\n                this.maxDate = moment(options.maxDate);\n\n            if (typeof options.applyClass == 'string')\n                this.applyClass = options.applyClass;\n\n            if (typeof options.cancelClass == 'string')\n                this.cancelClass = options.cancelClass;\n\n            if (typeof options.dateLimit == 'object')\n                this.dateLimit = options.dateLimit;\n\n            // update day names order to firstDay\n            if (typeof options.locale == 'object') {\n\n                if (typeof options.locale.daysOfWeek == 'object') {\n                    // Create a copy of daysOfWeek to avoid modification of original\n                    // options object for reusability in multiple daterangepicker instances\n                    this.locale.daysOfWeek = options.locale.daysOfWeek.slice();\n                }\n\n                if (typeof options.locale.monthNames == 'object') {\n                    this.locale.monthNames = options.locale.monthNames.slice();\n                }\n\n                if (typeof options.locale.firstDay == 'number') {\n                    this.locale.firstDay = options.locale.firstDay;\n                    var iterator = options.locale.firstDay;\n                    while (iterator > 0) {\n                        this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());\n                        iterator--;\n                    }\n                }\n\n                if (typeof options.locale.applyLabel == 'string') {\n                    this.locale.applyLabel = options.locale.applyLabel;\n                }\n\n                if (typeof options.locale.cancelLabel == 'string') {\n                    this.locale.cancelLabel = options.locale.cancelLabel;\n                }\n\n                if (typeof options.locale.fromLabel == 'string') {\n                    this.locale.fromLabel = options.locale.fromLabel;\n                }\n\n                if (typeof options.locale.toLabel == 'string') {\n                    this.locale.toLabel = options.locale.toLabel;\n                }\n\n                if (typeof options.locale.weekLabel == 'string') {\n                    this.locale.weekLabel = options.locale.weekLabel;\n                }\n\n                if (typeof options.locale.customRangeLabel == 'string') {\n                    this.locale.customRangeLabel = options.locale.customRangeLabel;\n                }\n            }\n\n            if (typeof options.opens == 'string')\n                this.opens = options.opens;\n\n            if (typeof options.showWeekNumbers == 'boolean') {\n                this.showWeekNumbers = options.showWeekNumbers;\n            }\n\n            if (typeof options.buttonClasses == 'string') {\n                this.buttonClasses = [options.buttonClasses];\n            }\n\n            if (typeof options.buttonClasses == 'object') {\n                this.buttonClasses = options.buttonClasses;\n            }\n\n            if (typeof options.showDropdowns == 'boolean') {\n                this.showDropdowns = options.showDropdowns;\n            }\n\n            if (typeof options.singleDatePicker == 'boolean') {\n                this.singleDatePicker = options.singleDatePicker;\n            }\n\n            if (typeof options.timePicker == 'boolean') {\n                this.timePicker = options.timePicker;\n            }\n\n            if (typeof options.timePickerIncrement == 'number') {\n                this.timePickerIncrement = options.timePickerIncrement;\n            }\n\n            if (typeof options.timePicker12Hour == 'boolean') {\n                this.timePicker12Hour = options.timePicker12Hour;\n            }\n\n            //if no start/end dates set, check if an input element contains initial values\n            if (typeof options.startDate == 'undefined' && typeof options.endDate == 'undefined') {\n                if ($(this.element).is('input[type=text]')) {\n                    var val = $(this.element).val();\n                    var split = val.split(this.separator);\n                    var start, end;\n                    if (split.length == 2) {\n                        start = moment(split[0], this.format);\n                        end = moment(split[1], this.format);\n                    } else if (this.singleDatePicker) {\n                        start = moment(val, this.format);\n                        end = moment(val, this.format);\n                    }\n                    if (start != null && end != null) {\n                        this.startDate = start;\n                        this.endDate = end;\n                    }\n                }\n            }\n\n            if (typeof options.ranges == 'object') {\n                for (var range in options.ranges) {\n\n                    var start = moment(options.ranges[range][0]);\n                    var end = moment(options.ranges[range][1]);\n\n                    // If we have a min/max date set, bound this range\n                    // to it, but only if it would otherwise fall\n                    // outside of the min/max.\n                    if (this.minDate && start.isBefore(this.minDate))\n                        start = moment(this.minDate);\n\n                    if (this.maxDate && end.isAfter(this.maxDate))\n                        end = moment(this.maxDate);\n\n                    // If the end of the range is before the minimum (if min is set) OR\n                    // the start of the range is after the max (also if set) don't display this\n                    // range option.\n                    if ((this.minDate && end.isBefore(this.minDate)) || (this.maxDate && start.isAfter(this.maxDate))) {\n                        continue;\n                    }\n\n                    this.ranges[range] = [start, end];\n                }\n\n                var list = '<ul>';\n                for (var range in this.ranges) {\n                    list += '<li>' + range + '</li>';\n                }\n                list += '<li>' + this.locale.customRangeLabel + '</li>';\n                list += '</ul>';\n                this.container.find('.ranges ul').remove();\n                this.container.find('.ranges').prepend(list);\n            }\n\n            if (typeof callback == 'function') {\n                this.cb = callback;\n            }\n\n            if (!this.timePicker) {\n                this.startDate = this.startDate.startOf('day');\n                this.endDate = this.endDate.startOf('day');\n            }\n\n            if (this.singleDatePicker) {\n                this.opens = 'right';\n                this.container.find('.calendar.right').show();\n                this.container.find('.calendar.left').hide();\n                this.container.find('.ranges').hide();\n                if (!this.container.find('.calendar.right').hasClass('single'))\n                    this.container.find('.calendar.right').addClass('single');\n            } else {\n                this.container.find('.calendar.right').removeClass('single');\n                this.container.find('.ranges').show();\n            }\n\n            this.oldStartDate = this.startDate.clone();\n            this.oldEndDate = this.endDate.clone();\n\n            this.leftCalendar = {\n                month: moment([this.startDate.year(), this.startDate.month(), 1, this.startDate.hour(), this.startDate.minute()]),\n                calendar: []\n            };\n\n            this.rightCalendar = {\n                month: moment([this.endDate.year(), this.endDate.month(), 1, this.endDate.hour(), this.endDate.minute()]),\n                calendar: []\n            };\n\n            if (this.opens == 'right') {\n                //swap calendar positions\n                var left = this.container.find('.calendar.left');\n                var right = this.container.find('.calendar.right');\n                left.removeClass('left').addClass('right');\n                right.removeClass('right').addClass('left');\n            }\n\n            if (typeof options.ranges == 'undefined' && !this.singleDatePicker) {\n                this.container.find('.calendar').show();\n            }\n\n            this.container.addClass('opens' + this.opens);\n\n            this.updateView();\n            this.updateCalendars()\n\n        },\n\n        setStartDate: function(startDate) {\n            if (typeof startDate == 'string')\n                this.startDate = moment(startDate, this.format);\n\n            if (typeof startDate == 'object')\n                this.startDate = moment(startDate);\n\n            if (!this.timePicker)\n                this.startDate = this.startDate.startOf('day');\n\n            this.oldStartDate = this.startDate.clone();\n\n            this.updateView();\n            this.updateCalendars();\n        },\n\n        setEndDate: function(endDate) {\n            if (typeof endDate == 'string')\n                this.endDate = moment(endDate, this.format);\n\n            if (typeof endDate == 'object')\n                this.endDate = moment(endDate);\n\n            if (!this.timePicker)\n                this.endDate = this.endDate.startOf('day');\n\n            this.oldEndDate = this.endDate.clone();\n\n            this.updateView();\n            this.updateCalendars();\n        },\n\n        mousedown: function (e) {\n            e.stopPropagation();\n        },\n\n        updateView: function () {\n            this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year());\n            this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year());\n            this.updateFormInputs();\n        },\n\n        updateFormInputs: function () {\n            this.container.find('input[name=daterangepicker_start]').val(this.startDate.format(this.format));\n            this.container.find('input[name=daterangepicker_end]').val(this.endDate.format(this.format));\n\n            if (this.startDate.isSame(this.endDate) || this.startDate.isBefore(this.endDate)) {\n                this.container.find('button.applyBtn').removeAttr('disabled');\n            } else {\n                this.container.find('button.applyBtn').attr('disabled', 'disabled');\n            }\n        },\n\n        updateFromControl: function () {\n            if (!this.element.is('input')) return;\n            if (!this.element.val().length) return;\n\n            var dateString = this.element.val().split(this.separator);\n            var start = moment(dateString[0], this.format);\n            var end = moment(dateString[1], this.format);\n\n            if (this.singleDatePicker) {\n                start = moment(this.element.val(), this.format);\n                end = start;\n            }\n\n            if (start == null || end == null) return;\n            if (end.isBefore(start)) return;\n\n            this.oldStartDate = this.startDate.clone();\n            this.oldEndDate = this.endDate.clone();\n\n            this.startDate = start;\n            this.endDate = end;\n\n            if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))\n                this.notify();\n\n            this.updateCalendars();\n        },\n\n        notify: function () {\n            this.updateView();\n            this.cb(this.startDate, this.endDate);\n        },\n\n        move: function () {\n            var parentOffset = { top: 0, left: 0 };\n            if (!this.parentEl.is('body')) {\n                parentOffset = {\n                    top: this.parentEl.offset().top - this.parentEl.scrollTop(),\n                    left: this.parentEl.offset().left - this.parentEl.scrollLeft()\n                };\n            }\n\n            if (this.opens == 'left') {\n                this.container.css({\n                    top: this.element.offset().top + this.element.outerHeight() - parentOffset.top,\n                    right: $(window).width() - this.element.offset().left - this.element.outerWidth() - parentOffset.left,\n                    left: 'auto'\n                });\n                if (this.container.offset().left < 0) {\n                    this.container.css({\n                        right: 'auto',\n                        left: 9\n                    });\n                }\n            } else {\n                this.container.css({\n                    top: this.element.offset().top + this.element.outerHeight() - parentOffset.top,\n                    left: this.element.offset().left - parentOffset.left,\n                    right: 'auto'\n                });\n                if (this.container.offset().left + this.container.outerWidth() > $(window).width()) {\n                    this.container.css({\n                        left: 'auto',\n                        right: 0\n                    });\n                }\n            }\n        },\n\n        show: function (e) {\n            this.container.show();\n            this.move();\n\n            if (e) {\n                e.stopPropagation();\n                e.preventDefault();\n            }\n\n            $(document).on('mousedown', $.proxy(this.hide, this));\n            this.element.trigger('show', this);\n        },\n\n        hide: function (e) {\n            this.container.hide();\n\n            if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))\n                this.notify();\n\n            this.oldStartDate = this.startDate.clone();\n            this.oldEndDate = this.endDate.clone();\n\n            $(document).off('mousedown', this.hide);\n            this.element.trigger('hide', this);\n        },\n\n        enterRange: function (e) {\n            var label = e.target.innerHTML;\n            if (label == this.locale.customRangeLabel) {\n                this.updateView();\n            } else {\n                var dates = this.ranges[label];\n                this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.format));\n                this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.format));\n            }\n        },\n\n        showCalendars: function() {\n            this.container.find('.calendar').show();\n            this.move();\n        },\n\n        updateInputText: function() {\n            if (this.element.is('input') && !this.singleDatePicker) {\n                this.element.val(this.startDate.format(this.format) + this.separator + this.endDate.format(this.format));\n            } else if (this.element.is('input')) {\n                this.element.val(this.startDate.format(this.format));\n            }\n\n        },\n\n        clickRange: function (e) {\n            var label = e.target.innerHTML;\n            if (label == this.locale.customRangeLabel) {\n                this.showCalendars();\n            } else {\n                var dates = this.ranges[label];\n\n                this.startDate = dates[0];\n                this.endDate = dates[1];\n\n                if (!this.timePicker) {\n                    this.startDate.startOf('day');\n                    this.endDate.startOf('day');\n                }\n\n                this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute());\n                this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute());\n                this.updateCalendars();\n\n                this.updateInputText();\n\n                this.container.find('.calendar').hide();\n                this.hide();\n                this.element.trigger('apply', this);\n            }\n        },\n\n        clickPrev: function (e) {\n            var cal = $(e.target).parents('.calendar');\n            if (cal.hasClass('left')) {\n                this.leftCalendar.month.subtract('month', 1);\n            } else {\n                this.rightCalendar.month.subtract('month', 1);\n            }\n            this.updateCalendars();\n        },\n\n        clickNext: function (e) {\n            var cal = $(e.target).parents('.calendar');\n            if (cal.hasClass('left')) {\n                this.leftCalendar.month.add('month', 1);\n            } else {\n                this.rightCalendar.month.add('month', 1);\n            }\n            this.updateCalendars();\n        },\n\n        enterDate: function (e) {\n\n            var title = $(e.target).attr('data-title');\n            var row = title.substr(1, 1);\n            var col = title.substr(3, 1);\n            var cal = $(e.target).parents('.calendar');\n\n            if (cal.hasClass('left')) {\n                this.container.find('input[name=daterangepicker_start]').val(this.leftCalendar.calendar[row][col].format(this.format));\n            } else {\n                this.container.find('input[name=daterangepicker_end]').val(this.rightCalendar.calendar[row][col].format(this.format));\n            }\n\n        },\n\n        clickDate: function (e) {\n            var title = $(e.target).attr('data-title');\n            var row = title.substr(1, 1);\n            var col = title.substr(3, 1);\n            var cal = $(e.target).parents('.calendar');\n\n            if (cal.hasClass('left')) {\n                var startDate = this.leftCalendar.calendar[row][col];\n                var endDate = this.endDate;\n                if (typeof this.dateLimit == 'object') {\n                    var maxDate = moment(startDate).add(this.dateLimit).startOf('day');\n                    if (endDate.isAfter(maxDate)) {\n                        endDate = maxDate;\n                    }\n                }\n            } else {\n                var startDate = this.startDate;\n                var endDate = this.rightCalendar.calendar[row][col];\n                if (typeof this.dateLimit == 'object') {\n                    var minDate = moment(endDate).subtract(this.dateLimit).startOf('day');\n                    if (startDate.isBefore(minDate)) {\n                        startDate = minDate;\n                    }\n                }\n            }\n\n            if (this.singleDatePicker && cal.hasClass('left')) {\n                endDate = startDate;\n            } else if (this.singleDatePicker && cal.hasClass('right')) {\n                startDate = endDate;\n            }\n\n            cal.find('td').removeClass('active');\n\n            if (startDate.isSame(endDate) || startDate.isBefore(endDate)) {\n                $(e.target).addClass('active');\n                this.startDate = startDate;\n                this.endDate = endDate;\n            } else if (startDate.isAfter(endDate)) {\n                $(e.target).addClass('active');\n                this.startDate = startDate;\n                this.endDate = moment(startDate).add('day', 1).startOf('day');\n            }\n\n            this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year());\n            this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year());\n            this.updateCalendars();\n\n            if (this.singleDatePicker)\n                this.clickApply();\n        },\n\n        clickApply: function (e) {\n            this.updateInputText();\n            this.hide();\n            this.element.trigger('apply', this);\n        },\n\n        clickCancel: function (e) {\n            this.startDate = this.oldStartDate;\n            this.endDate = this.oldEndDate;\n            this.updateView();\n            this.updateCalendars();\n            this.hide();\n            this.element.trigger('cancel', this);\n        },\n\n        updateMonthYear: function (e) {\n\n            var isLeft = $(e.target).closest('.calendar').hasClass('left');\n            var cal = this.container.find('.calendar.left');\n            if (!isLeft)\n                cal = this.container.find('.calendar.right');\n\n            // Month must be Number for new moment versions\n            var month = parseInt(cal.find('.monthselect').val(), 10);\n            var year = cal.find('.yearselect').val();\n\n            if (isLeft) {\n                this.leftCalendar.month.month(month).year(year);\n            } else {\n                this.rightCalendar.month.month(month).year(year);\n            }\n\n            this.updateCalendars();\n\n        },\n\n        updateTime: function(e) {\n\n            var isLeft = $(e.target).closest('.calendar').hasClass('left');\n            var cal = this.container.find('.calendar.left');\n            if (!isLeft)\n                cal = this.container.find('.calendar.right');\n\n            var hour = parseInt(cal.find('.hourselect').val());\n            var minute = parseInt(cal.find('.minuteselect').val());\n\n            if (this.timePicker12Hour) {\n                var ampm = cal.find('.ampmselect').val();\n                if (ampm == 'PM' && hour < 12)\n                    hour += 12;\n                if (ampm == 'AM' && hour == 12)\n                    hour = 0;\n            }\n\n            if (isLeft) {\n                var start = this.startDate.clone();\n                start.hour(hour);\n                start.minute(minute);\n                this.startDate = start;\n                this.leftCalendar.month.hour(hour).minute(minute);\n            } else {\n                var end = this.endDate.clone();\n                end.hour(hour);\n                end.minute(minute);\n                this.endDate = end;\n                this.rightCalendar.month.hour(hour).minute(minute);\n            }\n\n            this.updateCalendars();\n\n        },\n\n        updateCalendars: function () {\n            this.leftCalendar.calendar = this.buildCalendar(this.leftCalendar.month.month(), this.leftCalendar.month.year(), this.leftCalendar.month.hour(), this.leftCalendar.month.minute(), 'left');\n            this.rightCalendar.calendar = this.buildCalendar(this.rightCalendar.month.month(), this.rightCalendar.month.year(), this.rightCalendar.month.hour(), this.rightCalendar.month.minute(), 'right');\n            this.container.find('.calendar.left').html(this.renderCalendar(this.leftCalendar.calendar, this.startDate, this.minDate, this.maxDate));\n            this.container.find('.calendar.right').html(this.renderCalendar(this.rightCalendar.calendar, this.endDate, this.startDate, this.maxDate));\n\n            this.container.find('.ranges li').removeClass('active');\n            var customRange = true;\n            var i = 0;\n            for (var range in this.ranges) {\n                if (this.timePicker) {\n                    if (this.startDate.isSame(this.ranges[range][0]) && this.endDate.isSame(this.ranges[range][1])) {\n                        customRange = false;\n                        this.container.find('.ranges li:eq(' + i + ')').addClass('active');\n                    }\n                } else {\n                    //ignore times when comparing dates if time picker is not enabled\n                    if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) {\n                        customRange = false;\n                        this.container.find('.ranges li:eq(' + i + ')').addClass('active');\n                    }\n                }\n                i++;\n            }\n            if (customRange)\n                this.container.find('.ranges li:last').addClass('active');\n        },\n\n        buildCalendar: function (month, year, hour, minute, side) {\n\n            var firstDay = moment([year, month, 1]);\n            var lastMonth = moment(firstDay).subtract('month', 1).month();\n            var lastYear = moment(firstDay).subtract('month', 1).year();\n\n            var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth();\n\n            var dayOfWeek = firstDay.day();\n\n            //initialize a 6 rows x 7 columns array for the calendar\n            var calendar = [];\n            for (var i = 0; i < 6; i++) {\n                calendar[i] = [];\n            }\n\n            //populate the calendar with date objects\n            var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1;\n            if (startDay > daysInLastMonth)\n                startDay -= 7;\n\n            if (dayOfWeek == this.locale.firstDay)\n                startDay = daysInLastMonth - 6;\n\n            var curDate = moment([lastYear, lastMonth, startDay, 12, minute]);\n            for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add('hour', 24)) {\n                if (i > 0 && col % 7 == 0) {\n                    col = 0;\n                    row++;\n                }\n                calendar[row][col] = curDate.clone().hour(hour);\n                curDate.hour(12);\n            }\n\n            return calendar;\n\n        },\n\n        renderDropdowns: function (selected, minDate, maxDate) {\n            var currentMonth = selected.month();\n            var monthHtml = '<select class=\"monthselect\">';\n            var inMinYear = false;\n            var inMaxYear = false;\n\n            for (var m = 0; m < 12; m++) {\n                if ((!inMinYear || m >= minDate.month()) && (!inMaxYear || m <= maxDate.month())) {\n                    monthHtml += \"<option value='\" + m + \"'\" +\n                        (m === currentMonth ? \" selected='selected'\" : \"\") +\n                        \">\" + this.locale.monthNames[m] + \"</option>\";\n                }\n            }\n            monthHtml += \"</select>\";\n\n            var currentYear = selected.year();\n            var maxYear = (maxDate && maxDate.year()) || (currentYear + 5);\n            var minYear = (minDate && minDate.year()) || (currentYear - 50);\n            var yearHtml = '<select class=\"yearselect\">';\n\n            for (var y = minYear; y <= maxYear; y++) {\n                yearHtml += '<option value=\"' + y + '\"' +\n                    (y === currentYear ? ' selected=\"selected\"' : '') +\n                    '>' + y + '</option>';\n            }\n\n            yearHtml += '</select>';\n\n            return monthHtml + yearHtml;\n        },\n\n        renderCalendar: function (calendar, selected, minDate, maxDate) {\n\n            var html = '<div class=\"calendar-date\">';\n            html += '<table class=\"table-condensed\">';\n            html += '<thead>';\n            html += '<tr>';\n\n            // add empty cell for week number\n            if (this.showWeekNumbers)\n                html += '<th></th>';\n\n            if (!minDate || minDate.isBefore(calendar[1][1])) {\n                html += '<th class=\"prev available\"><i class=\"fa fa-arrow-left icon-arrow-left glyphicon glyphicon-arrow-left\"></i></th>';\n            } else {\n                html += '<th></th>';\n            }\n\n            var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(\" YYYY\");\n\n            if (this.showDropdowns) {\n                dateHtml = this.renderDropdowns(calendar[1][1], minDate, maxDate);\n            }\n\n            html += '<th colspan=\"5\" class=\"month\">' + dateHtml + '</th>';\n            if (!maxDate || maxDate.isAfter(calendar[1][1])) {\n                html += '<th class=\"next available\"><i class=\"fa fa-arrow-right icon-arrow-right glyphicon glyphicon-arrow-right\"></i></th>';\n            } else {\n                html += '<th></th>';\n            }\n\n            html += '</tr>';\n            html += '<tr>';\n\n            // add week number label\n            if (this.showWeekNumbers)\n                html += '<th class=\"week\">' + this.locale.weekLabel + '</th>';\n\n            $.each(this.locale.daysOfWeek, function (index, dayOfWeek) {\n                html += '<th>' + dayOfWeek + '</th>';\n            });\n\n            html += '</tr>';\n            html += '</thead>';\n            html += '<tbody>';\n\n            for (var row = 0; row < 6; row++) {\n                html += '<tr>';\n\n                // add week number\n                if (this.showWeekNumbers)\n                    html += '<td class=\"week\">' + calendar[row][0].week() + '</td>';\n\n                for (var col = 0; col < 7; col++) {\n                    var cname = 'available ';\n                    cname += (calendar[row][col].month() == calendar[1][1].month()) ? '' : 'off';\n\n                    if ((minDate && calendar[row][col].isBefore(minDate)) || (maxDate && calendar[row][col].isAfter(maxDate))) {\n                        cname = ' off disabled ';\n                    } else if (calendar[row][col].format('YYYY-MM-DD') == selected.format('YYYY-MM-DD')) {\n                        cname += ' active ';\n                        if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD')) {\n                            cname += ' start-date ';\n                        }\n                        if (calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD')) {\n                            cname += ' end-date ';\n                        }\n                    } else if (calendar[row][col] >= this.startDate && calendar[row][col] <= this.endDate) {\n                        cname += ' in-range ';\n                        if (calendar[row][col].isSame(this.startDate)) { cname += ' start-date '; }\n                        if (calendar[row][col].isSame(this.endDate)) { cname += ' end-date '; }\n                    }\n\n                    var title = 'r' + row + 'c' + col;\n                    html += '<td class=\"' + cname.replace(/\\s+/g, ' ').replace(/^\\s?(.*?)\\s?$/, '$1') + '\" data-title=\"' + title + '\">' + calendar[row][col].date() + '</td>';\n                }\n                html += '</tr>';\n            }\n\n            html += '</tbody>';\n            html += '</table>';\n            html += '</div>';\n\n            if (this.timePicker) {\n\n                html += '<div class=\"calendar-time\">';\n                html += '<select class=\"hourselect\">';\n                var start = 0;\n                var end = 23;\n                var selected_hour = selected.hour();\n                if (this.timePicker12Hour) {\n                    start = 1;\n                    end = 12;\n                    if (selected_hour >= 12)\n                        selected_hour -= 12;\n                    if (selected_hour == 0)\n                        selected_hour = 12;\n                }\n\n                for (var i = start; i <= end; i++) {\n                    if (i == selected_hour) {\n                        html += '<option value=\"' + i + '\" selected=\"selected\">' + i + '</option>';\n                    } else {\n                        html += '<option value=\"' + i + '\">' + i + '</option>';\n                    }\n                }\n\n                html += '</select> : ';\n\n                html += '<select class=\"minuteselect\">';\n\n                for (var i = 0; i < 60; i += this.timePickerIncrement) {\n                    var num = i;\n                    if (num < 10)\n                        num = '0' + num;\n                    if (i == selected.minute()) {\n                        html += '<option value=\"' + i + '\" selected=\"selected\">' + num + '</option>';\n                    } else {\n                        html += '<option value=\"' + i + '\">' + num + '</option>';\n                    }\n                }\n\n                html += '</select> ';\n\n                if (this.timePicker12Hour) {\n                    html += '<select class=\"ampmselect\">';\n                    if (selected.hour() >= 12) {\n                        html += '<option value=\"AM\">AM</option><option value=\"PM\" selected=\"selected\">PM</option>';\n                    } else {\n                        html += '<option value=\"AM\" selected=\"selected\">AM</option><option value=\"PM\">PM</option>';\n                    }\n                    html += '</select>';\n                }\n\n                html += '</div>';\n\n            }\n\n            return html;\n\n        },\n\n        remove: function() {\n\n            this.container.remove();\n            this.element.off('.daterangepicker');\n            this.element.removeData('daterangepicker');\n\n        }\n\n    };\n\n    $.fn.daterangepicker = function (options, cb) {\n        this.each(function () {\n            var el = $(this);\n            if (el.data('daterangepicker'))\n                el.data('daterangepicker').remove();\n            el.data('daterangepicker', new DateRangePicker(el, options, cb));\n        });\n        return this;\n    };\n\n}(window.jQuery);\n"
  },
  {
    "path": "public/js/html5shiv.js",
    "content": "/*\n HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed\n*/\n(function(l,f){function m(){var a=e.elements;return\"string\"==typeof a?a.split(\" \"):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();\na.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function(\"h,f\",\"return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(\"+m().join().replace(/[\\w\\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c(\"'+a+'\")'})+\");return n}\")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement(\"p\");d=d.getElementsByTagName(\"head\")[0]||d.documentElement;c.innerHTML=\"x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>\";\nc=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o=\"_html5shiv\",h=0,n={},g;(function(){try{var a=f.createElement(\"a\");a.innerHTML=\"<xyz></xyz>\";j=\"hidden\"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement(\"a\");var c=f.createDocumentFragment();b=\"undefined\"==typeof c.cloneNode||\n\"undefined\"==typeof c.createDocumentFragment||\"undefined\"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||\"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video\",version:\"3.7.0\",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:\"default\",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);\nif(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);\n"
  },
  {
    "path": "public/js/jquery.browser.js",
    "content": "(function( jQuery ) {\n\tvar matched,\n\t\tuserAgent = navigator.userAgent || \"\";\n\n\t// Use of jQuery.browser is frowned upon.\n\t// More details: http://api.jquery.com/jQuery.browser\n\t// jQuery.uaMatch maintained for back-compat\n\tjQuery.uaMatch = function( ua ) {\n\t\tua = ua.toLowerCase();\n\n\t\tvar match = /(chrome)[ \\/]([\\w.]+)/.exec( ua ) ||\n\t\t\t/(webkit)[ \\/]([\\w.]+)/.exec( ua ) ||\n\t\t\t/(opera)(?:.*version)?[ \\/]([\\w.]+)/.exec( ua ) ||\n\t\t\t/(msie) ([\\w.]+)/.exec( ua ) ||\n\t\t\tua.indexOf(\"compatible\") < 0 && /(mozilla)(?:.*? rv:([\\w.]+))?/.exec( ua ) ||\n\t\t\t[];\n\n\t\treturn {\n\t\t\tbrowser: match[ 1 ] || \"\",\n\t\t\tversion: match[ 2 ] || \"0\"\n\t\t};\n\t};\n\n\tmatched = jQuery.uaMatch( userAgent );\n\n\tjQuery.browser = {};\n\n\tif ( matched.browser ) {\n\t\tjQuery.browser[ matched.browser ] = true;\n\t\tjQuery.browser.version = matched.version;\n\t}\n\n\t// Deprecated, use jQuery.browser.webkit instead\n\t// Maintained for back-compat only\n\tif ( jQuery.browser.webkit ) {\n\t\tjQuery.browser.safari = true;\n\t}\n\n}( jQuery ));"
  },
  {
    "path": "public/js/jquery.cookie.js",
    "content": "/*!\n * jQuery Cookie Plugin v1.3.1\n * https://github.com/carhartl/jquery-cookie\n *\n * Copyright 2013 Klaus Hartl\n * Released under the MIT license\n */\n(function (factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as anonymous module.\n\t\tdefine(['jquery'], factory);\n\t} else {\n\t\t// Browser globals.\n\t\tfactory(jQuery);\n\t}\n}(function ($) {\n\n\tvar pluses = /\\+/g;\n\n\tfunction decode(s) {\n\t\tif (config.raw) {\n\t\t\treturn s;\n\t\t}\n\t\ttry {\n\t\t\t// If we can't decode the cookie, ignore it, it's unusable.\n\t\t\treturn decodeURIComponent(s.replace(pluses, ' '));\n\t\t} catch(e) {}\n\t}\n\n\tfunction decodeAndParse(s) {\n\t\tif (s.indexOf('\"') === 0) {\n\t\t\t// This is a quoted cookie as according to RFC2068, unescape...\n\t\t\ts = s.slice(1, -1).replace(/\\\\\"/g, '\"').replace(/\\\\\\\\/g, '\\\\');\n\t\t}\n\n\t\ts = decode(s);\n\n\t\ttry {\n\t\t\t// If we can't parse the cookie, ignore it, it's unusable.\n\t\t\treturn config.json ? JSON.parse(s) : s;\n\t\t} catch(e) {}\n\t}\n\n\tvar config = $.cookie = function (key, value, options) {\n\n\t\t// Write\n\t\tif (value !== undefined) {\n\t\t\toptions = $.extend({}, config.defaults, options);\n\n\t\t\tif (typeof options.expires === 'number') {\n\t\t\t\tvar days = options.expires, t = options.expires = new Date();\n\t\t\t\tt.setDate(t.getDate() + days);\n\t\t\t}\n\n\t\t\tvalue = config.json ? JSON.stringify(value) : String(value);\n\n\t\t\treturn (document.cookie = [\n\t\t\t\tconfig.raw ? key : encodeURIComponent(key),\n\t\t\t\t'=',\n\t\t\t\tconfig.raw ? value : encodeURIComponent(value),\n\t\t\t\toptions.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE\n\t\t\t\toptions.path    ? '; path=' + options.path : '',\n\t\t\t\toptions.domain  ? '; domain=' + options.domain : '',\n\t\t\t\toptions.secure  ? '; secure' : ''\n\t\t\t].join(''));\n\t\t}\n\n\t\t// Read\n\n\t\tvar result = key ? undefined : {};\n\n\t\t// To prevent the for loop in the first place assign an empty array\n\t\t// in case there are no cookies at all. Also prevents odd result when\n\t\t// calling $.cookie().\n\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\n\t\tfor (var i = 0, l = cookies.length; i < l; i++) {\n\t\t\tvar parts = cookies[i].split('=');\n\t\t\tvar name = decode(parts.shift());\n\t\t\tvar cookie = parts.join('=');\n\n\t\t\tif (key && key === name) {\n\t\t\t\tresult = decodeAndParse(cookie);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Prevent storing a cookie that we couldn't decode.\n\t\t\tif (!key && (cookie = decodeAndParse(cookie)) !== undefined) {\n\t\t\t\tresult[name] = cookie;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tconfig.defaults = {};\n\n\t$.removeCookie = function (key, options) {\n\t\tif ($.cookie(key) !== undefined) {\n\t\t\t// Must not alter options, thus extending a fresh object...\n\t\t\t$.cookie(key, '', $.extend({}, options, { expires: -1 }));\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n}));\n"
  },
  {
    "path": "public/js/jquery.iframe-auto-height.plugin.1.9.3.js",
    "content": "/*jslint white: true, indent: 2, onevar: false, browser: true, undef: true, nomen: false, eqeqeq: true, plusplus: false, bitwise: true, regexp: true, strict: false, newcap: true, immed: true */\n/*global window, console, jQuery, setTimeout */\n\n/*\n  Plugin: iframe autoheight jQuery Plugin\n  Version: 1.9.3\n  Author and Contributors\n  ========================================\n  NATHAN SMITH (http://sonspring.com/)\n  Jesse House (https://github.com/house9)\n  aaron manela (https://github.com/aaronmanela)\n  Hideki Abe (https://github.com/hideki-a)\n  Patrick Clark (https://github.com/hellopat)\n  ChristineP2 (https://github.com/ChristineP2)\n  Mmjavellana (https://github.com/Mmjavellana)\n  yiqing-95 (https://github.com/yiqing-95)\n  jcaspian (https://github.com/jcaspian)\n  adamjgray (https://github.com/adamjgray)\n  Jens Bissinger (https://github.com/dpree)\n\n  File: jquery.iframe-auto-height.plugin.js\n  Remarks: original code from http://sonspring.com/journal/jquery-iframe-sizing\n  Description: when the page loads set the height of an iframe based on the height of its contents\n  see README: http://github.com/house9/jquery-iframe-auto-height\n\n*/\n(function ($) {\n  $.fn.iframeAutoHeight = function (spec) {\n\n    var undef;\n    if ($.browser === undef) {\n      var message = [];\n      message.push(\"WARNING: you appear to be using a newer version of jquery which does not support the $.browser variable.\");\n      message.push(\"The jQuery iframe auto height plugin relies heavly on the $.browser features.\");\n      message.push(\"Install jquery-browser: https://raw.github.com/house9/jquery-iframe-auto-height/master/release/jquery.browser.js\");\n      alert(message.join(\"\\n\"));\n      return $;\n    }\n\n    // set default option values\n    var options = $.extend({\n        heightOffset: 0,\n        minHeight: 0,\n        callback: function (newHeight) {},\n        animate: false,\n        debug: false,\n        diagnostics: false, // used for development only\n        resetToMinHeight: false,\n        triggerFunctions: [],\n        heightCalculationOverrides: []\n      }, spec);\n\n    // logging\n    function debug(message) {\n      if (options.debug && options.debug === true && window.console) {\n        console.log(message);\n      }\n    }\n\n    // not used by production code\n    function showDiagnostics(iframe, calledFrom) {\n      debug(\"Diagnostics from '\" + calledFrom + \"'\");\n      try {\n        debug(\"  \" + $(iframe, window.top.document).contents().find('body')[0].scrollHeight + \" for ...find('body')[0].scrollHeight\");\n        debug(\"  \" + $(iframe.contentWindow.document).height() + \" for ...contentWindow.document).height()\");\n        debug(\"  \" + $(iframe.contentWindow.document.body).height() + \" for ...contentWindow.document.body).height()\");\n      } catch (ex) {\n        // ie fails when called during for each, ok later on\n        // probably not an issue if called in a document ready block\n        debug(\"  unable to check in this state\");\n      }\n      debug(\"End diagnostics -> results vary by browser and when diagnostics are requested\");\n    }\n\n    // show all option values\n    debug(options);\n\n    // ******************************************************\n    // iterate over the matched elements passed to the plugin ; return will make it chainable\n    return this.each(function () {\n\n      // ******************************************************\n      // http://api.jquery.com/jQuery.browser/\n      var strategyKeys = ['webkit', 'mozilla', 'msie', 'opera'];\n      var strategies = [];\n      strategies['default'] = function (iframe, $iframeBody, options, browser) {\n        // NOTE: this is how the plugin determines the iframe height, override if you need custom\n        return $iframeBody[0].scrollHeight + options.heightOffset;\n      };\n\n      jQuery.each(strategyKeys, function (index, value) {\n        // use the default strategy for all browsers, can be overridden if desired\n        strategies[value] = strategies['default'];\n      });\n\n      // override strategies if registered in options\n      jQuery.each(options.heightCalculationOverrides, function (index, value) {\n        strategies[value.browser] = value.calculation;\n      });\n\n      function findStrategy(browser) {\n        var strategy = null;\n\n        jQuery.each(strategyKeys, function (index, value) {\n          if (browser[value]) {\n            strategy = strategies[value];\n            return false;\n          }\n        });\n\n        if (strategy === null) {\n          strategy = strategies['default'];\n        }\n\n        return strategy;\n      }\n      // ******************************************************\n\n      // for use by webkit only\n      var loadCounter = 0;\n\n      // resizeHeight\n      function resizeHeight(iframe) {\n        if (options.diagnostics) {\n          showDiagnostics(iframe, \"resizeHeight\");\n        }\n\n        // set the iframe size to minHeight so it'll get smaller on resizes in FF and IE\n        if (options.resetToMinHeight && options.resetToMinHeight === true) {\n          iframe.style.height = options.minHeight + 'px';\n        }\n\n        // get the iframe body height and set inline style to that plus a little\n        var $body = $(iframe, window.top.document).contents().find('body');\n        var strategy = findStrategy($.browser);\n        var newHeight = strategy(iframe, $body, options, $.browser);\n        debug(newHeight);\n\n        if (newHeight < options.minHeight) {\n          debug(\"new height is less than minHeight\");\n          newHeight = options.minHeight + options.heightOffset;\n        }\n\n        debug(\"New Height: \" + newHeight);\n        if (options.animate) {\n          $(iframe).animate({height: newHeight + 'px'}, {duration: 500});\n        } else {\n          iframe.style.height = newHeight + 'px';\n        }\n\n        options.callback.apply($(iframe), [{newFrameHeight: newHeight}]);\n      } // END resizeHeight\n\n      // debug me\n      debug(this);\n      if (options.diagnostics) {\n        showDiagnostics(this, \"each iframe\");\n      }\n\n      // if trigger functions are registered, invoke them\n      if (options.triggerFunctions.length > 0) {\n        debug(options.triggerFunctions.length + \" trigger Functions\");\n        for (var i = 0; i < options.triggerFunctions.length; i++) {\n          options.triggerFunctions[i](resizeHeight, this);\n        }\n      }\n\n      // Check if browser is Webkit (Safari/Chrome) or Opera\n      if ($.browser.webkit || $.browser.opera) {\n        debug(\"browser is webkit or opera\");\n\n        // Start timer when loaded.\n        $(this).load(function () {\n          var delay = 0;\n          var iframe = this;\n\n          var delayedResize = function () {\n            resizeHeight(iframe);\n          };\n\n          if (loadCounter === 0) {\n            // delay the first one\n            delay = 500;\n          } else {\n            // Reset iframe height to 0 to force new frame size to fit window properly\n            // this is only an issue when going from large to small iframe, not executed on page load\n            iframe.style.height = options.minHeight + 'px';\n          }\n\n          debug(\"load delay: \" + delay);\n          setTimeout(delayedResize, delay);\n          loadCounter++;\n        });\n\n        // Safari and Opera need a kick-start.\n        var source = $(this).attr('src');\n        $(this).attr('src', '');\n        $(this).attr('src', source);\n      } else {\n        // For other browsers.\n        $(this).load(function () {\n          resizeHeight(this);\n        });\n      } // if browser\n\n    }); // $(this).each(function () {\n  }; // $.fn.iframeAutoHeight = function (options) {\n}(jQuery)); // (function ($) {"
  },
  {
    "path": "public/js/jquery.stickytableheaders.js",
    "content": "/*! Copyright (c) 2011 by Jonas Mosbech - https://github.com/jmosbech/StickyTableHeaders\n\tMIT license info: https://github.com/jmosbech/StickyTableHeaders/blob/master/license.txt */\n\n;(function ($, window, undefined) {\n\t'use strict';\n\n\tvar name = 'stickyTableHeaders',\n\t\tid = 0,\n\t\tdefaults = {\n\t\t\tfixedOffset: 0,\n\t\t\tleftOffset: 0,\n\t\t\tscrollableArea: window\n\t\t};\n\n\tfunction Plugin (el, options) {\n\t\t// To avoid scope issues, use 'base' instead of 'this'\n\t\t// to reference this class from internal events and functions.\n\t\tvar base = this;\n\n\t\t// Access to jQuery and DOM versions of element\n\t\tbase.$el = $(el);\n\t\tbase.el = el;\n\t\tbase.id = id++;\n\t\tbase.$window = $(window);\n\t\tbase.$document = $(document);\n\n\t\t// Listen for destroyed, call teardown\n\t\tbase.$el.bind('destroyed',\n\t\t\t$.proxy(base.teardown, base));\n\n\t\t// Cache DOM refs for performance reasons\n\t\tbase.$clonedHeader = null;\n\t\tbase.$originalHeader = null;\n\n\t\t// Keep track of state\n\t\tbase.isSticky = false;\n\t\tbase.hasBeenSticky = false;\n\t\tbase.leftOffset = null;\n\t\tbase.topOffset = null;\n\n\t\tbase.init = function () {\n\t\t\tbase.$el.each(function () {\n\t\t\t\tvar $this = $(this);\n\n\t\t\t\t// remove padding on <table> to fix issue #7\n\t\t\t\t$this.css('padding', 0);\n\n\t\t\t\tbase.$originalHeader = $('thead:first', this);\n\t\t\t\tbase.$clonedHeader = base.$originalHeader.clone();\n\t\t\t\t$this.trigger('clonedHeader.' + name, [base.$clonedHeader]);\n\n\t\t\t\tbase.$clonedHeader.addClass('tableFloatingHeader');\n\t\t\t\tbase.$clonedHeader.css('display', 'none');\n\n\t\t\t\tbase.$originalHeader.addClass('tableFloatingHeaderOriginal');\n\n\t\t\t\tbase.$originalHeader.after(base.$clonedHeader);\n\n\t\t\t\tbase.$printStyle = $('<style type=\"text/css\" media=\"print\">' +\n\t\t\t\t\t'.tableFloatingHeader{display:none !important;}' +\n\t\t\t\t\t'.tableFloatingHeaderOriginal{position:static !important;}' +\n\t\t\t\t\t'</style>');\n\t\t\t\t$('head').append(base.$printStyle);\n\t\t\t});\n\n\t\t\tbase.setOptions(options);\n\t\t\tbase.updateWidth();\n\t\t\tbase.toggleHeaders();\n\t\t\tbase.bind();\n\t\t};\n\n\t\tbase.destroy = function (){\n\t\t\tbase.$el.unbind('destroyed', base.teardown);\n\t\t\tbase.teardown();\n\t\t};\n\n\t\tbase.teardown = function(){\n\t\t\tif (base.isSticky) {\n\t\t\t\tbase.$originalHeader.css('position', 'static');\n\t\t\t}\n\t\t\t$.removeData(base.el, 'plugin_' + name);\n\t\t\tbase.unbind();\n\n\t\t\tbase.$clonedHeader.remove();\n\t\t\tbase.$originalHeader.removeClass('tableFloatingHeaderOriginal');\n\t\t\tbase.$originalHeader.css('visibility', 'visible');\n\t\t\tbase.$printStyle.remove();\n\n\t\t\tbase.el = null;\n\t\t\tbase.$el = null;\n\t\t};\n\n\t\tbase.bind = function(){\n\t\t\tbase.$scrollableArea.on('scroll.' + name, base.toggleHeaders);\n\t\t\tif (!base.isWindowScrolling) {\n\t\t\t\tbase.$window.on('scroll.' + name + base.id, base.setPositionValues);\n\t\t\t\tbase.$window.on('resize.' + name + base.id, base.toggleHeaders);\n\t\t\t}\n\t\t\tbase.$scrollableArea.on('resize.' + name, base.toggleHeaders);\n\t\t\tbase.$scrollableArea.on('resize.' + name, base.updateWidth);\n\t\t};\n\n\t\tbase.unbind = function(){\n\t\t\t// unbind window events by specifying handle so we don't remove too much\n\t\t\tbase.$scrollableArea.off('.' + name, base.toggleHeaders);\n\t\t\tif (!base.isWindowScrolling) {\n\t\t\t\tbase.$window.off('.' + name + base.id, base.setPositionValues);\n\t\t\t\tbase.$window.off('.' + name + base.id, base.toggleHeaders);\n\t\t\t}\n\t\t\tbase.$scrollableArea.off('.' + name, base.updateWidth);\n\t\t};\n\n\t\tbase.toggleHeaders = function () {\n\t\t\tif (base.$el) {\n\t\t\t\tbase.$el.each(function () {\n\t\t\t\t\tvar $this = $(this),\n\t\t\t\t\t\tnewLeft,\n\t\t\t\t\t\tnewTopOffset = base.isWindowScrolling ? (\n\t\t\t\t\t\t\t\t\tisNaN(base.options.fixedOffset) ?\n\t\t\t\t\t\t\t\t\tbase.options.fixedOffset.outerHeight() :\n\t\t\t\t\t\t\t\t\tbase.options.fixedOffset\n\t\t\t\t\t\t\t\t) :\n\t\t\t\t\t\t\t\tbase.$scrollableArea.offset().top + (!isNaN(base.options.fixedOffset) ? base.options.fixedOffset : 0),\n\t\t\t\t\t\toffset = $this.offset(),\n\n\t\t\t\t\t\tscrollTop = base.$scrollableArea.scrollTop() + newTopOffset,\n\t\t\t\t\t\tscrollLeft = base.$scrollableArea.scrollLeft(),\n\n\t\t\t\t\t\tscrolledPastTop = base.isWindowScrolling ?\n\t\t\t\t\t\t\t\tscrollTop > offset.top :\n\t\t\t\t\t\t\t\tnewTopOffset > offset.top,\n\t\t\t\t\t\tnotScrolledPastBottom = (base.isWindowScrolling ? scrollTop : 0) <\n\t\t\t\t\t\t\t\t(offset.top + $this.height() - base.$clonedHeader.height() - (base.isWindowScrolling ? 0 : newTopOffset));\n\n\t\t\t\t\tif (scrolledPastTop && notScrolledPastBottom) {\n\t\t\t\t\t\tnewLeft = offset.left - scrollLeft + base.options.leftOffset;\n\t\t\t\t\t\tbase.$originalHeader.css({\n\t\t\t\t\t\t\t'position': 'fixed',\n\t\t\t\t\t\t\t'margin-top': 0,\n\t\t\t\t\t\t\t'left': newLeft,\n\t\t\t\t\t\t\t'z-index': 3 // #18: opacity bug\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbase.leftOffset = newLeft;\n\t\t\t\t\t\tbase.topOffset = newTopOffset;\n\t\t\t\t\t\tbase.$clonedHeader.css('display', '');\n\t\t\t\t\t\tif (!base.isSticky) {\n\t\t\t\t\t\t\tbase.isSticky = true;\n\t\t\t\t\t\t\t// make sure the width is correct: the user might have resized the browser while in static mode\n\t\t\t\t\t\t\tbase.updateWidth();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbase.setPositionValues();\n\t\t\t\t\t} else if (base.isSticky) {\n\t\t\t\t\t\tbase.$originalHeader.css('position', 'static');\n\t\t\t\t\t\tbase.$clonedHeader.css('display', 'none');\n\t\t\t\t\t\tbase.isSticky = false;\n\t\t\t\t\t\tbase.resetWidth($('td,th', base.$clonedHeader), $('td,th', base.$originalHeader));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tbase.setPositionValues = function () {\n\t\t\tvar winScrollTop = base.$window.scrollTop(),\n\t\t\t\twinScrollLeft = base.$window.scrollLeft();\n\t\t\tif (!base.isSticky ||\n\t\t\t\t\twinScrollTop < 0 || winScrollTop + base.$window.height() > base.$document.height() ||\n\t\t\t\t\twinScrollLeft < 0 || winScrollLeft + base.$window.width() > base.$document.width()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbase.$originalHeader.css({\n\t\t\t\t'top': base.topOffset - (base.isWindowScrolling ? 0 : winScrollTop),\n\t\t\t\t'left': base.leftOffset - (base.isWindowScrolling ? 0 : winScrollLeft)\n\t\t\t});\n\t\t};\n\n\t\tbase.updateWidth = function () {\n\t\t\tif (!base.isSticky) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Copy cell widths from clone\n\t\t\tif (!base.$originalHeaderCells) {\n\t\t\t\tbase.$originalHeaderCells = $('th,td', base.$originalHeader);\n\t\t\t}\n\t\t\tif (!base.$clonedHeaderCells) {\n\t\t\t\tbase.$clonedHeaderCells = $('th,td', base.$clonedHeader);\n\t\t\t}\n\t\t\tvar cellWidths = base.getWidth(base.$clonedHeaderCells);\n\t\t\tbase.setWidth(cellWidths, base.$clonedHeaderCells, base.$originalHeaderCells);\n\n\t\t\t// Copy row width from whole table\n\t\t\tbase.$originalHeader.css('width', base.$clonedHeader.width());\n\t\t};\n\n\t\tbase.getWidth = function ($clonedHeaders) {\n\t\t\tvar widths = [];\n\t\t\t$clonedHeaders.each(function (index) {\n\t\t\t\tvar width, $this = $(this);\n\n\t\t\t\tif ($this.css('box-sizing') === 'border-box') {\n\t\t\t\t\twidth = $this.outerWidth(); // #39: border-box bug\n\t\t\t\t} else {\n\t\t\t\t\tvar $origTh = $('th', base.$originalHeader);\n\t\t\t\t\tif ($origTh.css('border-collapse') === 'collapse') {\n\t\t\t\t\t\tif (window.getComputedStyle) {\n\t\t\t\t\t\t\twidth = parseFloat(window.getComputedStyle(this, null).width);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// ie8 only\n\t\t\t\t\t\t\tvar leftPadding = parseFloat($this.css('padding-left'));\n\t\t\t\t\t\t\tvar rightPadding = parseFloat($this.css('padding-right'));\n\t\t\t\t\t\t\t// Needs more investigation - this is assuming constant border around this cell and it's neighbours.\n\t\t\t\t\t\t\tvar border = parseFloat($this.css('border-width'));\n\t\t\t\t\t\t\twidth = $this.outerWidth() - leftPadding - rightPadding - border;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\twidth = $this.width();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twidths[index] = width;\n\t\t\t});\n\t\t\treturn widths;\n\t\t};\n\n\t\tbase.setWidth = function (widths, $clonedHeaders, $origHeaders) {\n\t\t\t$clonedHeaders.each(function (index) {\n\t\t\t\tvar width = widths[index];\n\t\t\t\t$origHeaders.eq(index).css({\n\t\t\t\t\t'min-width': width,\n\t\t\t\t\t'max-width': width\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\n\t\tbase.resetWidth = function ($clonedHeaders, $origHeaders) {\n\t\t\t$clonedHeaders.each(function (index) {\n\t\t\t\tvar $this = $(this);\n\t\t\t\t$origHeaders.eq(index).css({\n\t\t\t\t\t'min-width': $this.css('min-width'),\n\t\t\t\t\t'max-width': $this.css('max-width')\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\n\t\tbase.setOptions = function (options) {\n\t\t\tbase.options = $.extend({}, defaults, options);\n\t\t\tbase.$scrollableArea = $(base.options.scrollableArea);\n\t\t\tbase.isWindowScrolling = base.$scrollableArea[0] === window;\n\t\t};\n\n\t\tbase.updateOptions = function (options) {\n\t\t\tbase.setOptions(options);\n\t\t\t// scrollableArea might have changed\n\t\t\tbase.unbind();\n\t\t\tbase.bind();\n\t\t\tbase.updateWidth();\n\t\t\tbase.toggleHeaders();\n\t\t};\n\n\t\t// Run initializer\n\t\tbase.init();\n\t}\n\n\t// A plugin wrapper around the constructor,\n\t// preventing against multiple instantiations\n\t$.fn[name] = function ( options ) {\n\t\treturn this.each(function () {\n\t\t\tvar instance = $.data(this, 'plugin_' + name);\n\t\t\tif (instance) {\n\t\t\t\tif (typeof options === 'string') {\n\t\t\t\t\tinstance[options].apply(instance);\n\t\t\t\t} else {\n\t\t\t\t\tinstance.updateOptions(options);\n\t\t\t\t}\n\t\t\t} else if(options !== 'destroy') {\n\t\t\t\t$.data(this, 'plugin_' + name, new Plugin( this, options ));\n\t\t\t}\n\t\t});\n\t};\n\n})(jQuery, window);\n"
  },
  {
    "path": "public/js/lang-sql.js",
    "content": "// Copyright (C) 2008 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n\n\n/**\n * @fileoverview\n * Registers a language handler for SQL.\n *\n *\n * To use, include prettify.js and this file in your HTML page.\n * Then put your code in an HTML tag like\n *      <pre class=\"prettyprint lang-sql\">(my SQL code)</pre>\n *\n *\n * http://savage.net.au/SQL/sql-99.bnf.html is the basis for the grammar, and\n * http://msdn.microsoft.com/en-us/library/aa238507(SQL.80).aspx and\n * http://meta.stackoverflow.com/q/92352/137403 as the bases for the keyword\n * list.\n *\n * @author mikesamuel@gmail.com\n */\n\nPR['registerLangHandler'](\n    PR['createSimpleLexer'](\n        [\n         // Whitespace\n         [PR['PR_PLAIN'],       /^[\\t\\n\\r \\xA0]+/, null, '\\t\\n\\r \\xA0'],\n         // A double or single quoted, possibly multi-line, string.\n         [PR['PR_STRING'],      /^(?:\"(?:[^\\\"\\\\]|\\\\.)*\"|'(?:[^\\'\\\\]|\\\\.)*')/, null,\n          '\"\\'']\n        ],\n        [\n         // A comment is either a line comment that starts with two dashes, or\n         // two dashes preceding a long bracketed block.\n         [PR['PR_COMMENT'], /^(?:--[^\\r\\n]*|\\/\\*[\\s\\S]*?(?:\\*\\/|$))/],\n         [PR['PR_KEYWORD'], /^(?:ADD|ALL|ALTER|AND|ANY|APPLY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOLLOWING|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|MATCH|MERGE|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECEDING|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|ROWS?|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNBOUNDED|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|USING|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\\w-]|$)/i, null],\n         // A number is a hex integer literal, a decimal real literal, or in\n         // scientific notation.\n         [PR['PR_LITERAL'],\n          /^[+-]?(?:0x[\\da-f]+|(?:(?:\\.\\d+|\\d+(?:\\.\\d*)?)(?:e[+\\-]?\\d+)?))/i],\n         // An identifier\n         [PR['PR_PLAIN'], /^[a-z_][\\w-]*/i],\n         // A run of punctuation\n         [PR['PR_PUNCTUATION'], /^[^\\w\\t\\n\\r \\xA0\\\"\\'][^\\w\\t\\n\\r \\xA0+\\-\\\"\\']*/]\n        ]),\n    ['sql']);\n"
  },
  {
    "path": "public/js/prettify.js",
    "content": "var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;\n(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:\"0\"<=b&&b<=\"7\"?parseInt(a.substring(1),8):b===\"u\"||b===\"x\"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?\"\\\\x0\":\"\\\\x\")+a.toString(16);a=String.fromCharCode(a);if(a===\"\\\\\"||a===\"-\"||a===\"[\"||a===\"]\")a=\"\\\\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\\\u[\\dA-Fa-f]{4}|\\\\x[\\dA-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\S\\s]|[^\\\\]/g),a=\n[],b=[],o=f[0]===\"^\",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&\"-\"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=[\"[\"];o&&b.push(\"^\");b.push.apply(b,a);for(c=0;c<\nf.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push(\"-\"),b.push(e(i[1])));b.push(\"]\");return b.join(\"\")}function y(a){for(var f=a.source.match(/\\[(?:[^\\\\\\]]|\\\\[\\S\\s])*]|\\\\u[\\dA-Fa-f]{4}|\\\\x[\\dA-Fa-f]{2}|\\\\\\d+|\\\\[^\\dux]|\\(\\?[!:=]|[()^]|[^()[\\\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j===\"(\"?++i:\"\\\\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j===\"(\"?(++i,d[i]===void 0&&(f[c]=\"(?:\")):\"\\\\\"===j.charAt(0)&&\n(j=+j.substring(1))&&j<=i&&(f[c]=\"\\\\\"+d[i]);for(i=c=0;c<b;++c)\"^\"===f[c]&&\"^\"!==f[c+1]&&(f[c]=\"\");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a===\"[\"?f[c]=h(j):a!==\"\\\\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return\"[\"+String.fromCharCode(a&-33,a|32)+\"]\"}));return f.join(\"\")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\\\u[\\da-f]{4}|\\\\x[\\da-f]{2}|\\\\[^UXux]/gi,\"\"))){s=!0;l=!1;break}}for(var r=\n{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(\"\"+g);n.push(\"(?:\"+y(g)+\")\")}return RegExp(n.join(\"|\"),l?\"gi\":\"g\")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if(\"BR\"===g||\"LI\"===g)h[s]=\"\\n\",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\\r\\n?/g,\"\\n\"):g.replace(/[\\t\\n\\r ]+/g,\" \"),h[s]=g,t[s<<1]=y,y+=g.length,\nt[s++<<1|1]=a)}}var e=/(?:^|\\s)nocode(?:\\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue(\"white-space\"));var p=l&&\"pre\"===l.substring(0,3);m(a);return{a:h.join(\"\").replace(/\\n$/,\"\"),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,\"pln\"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===\n\"string\")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b=\"pln\")}if((c=b.length>=5&&\"lang-\"===b.substring(0,5))&&!(o&&typeof o[1]===\"string\"))c=!1,b=\"src\";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),\nl=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=\"\"+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\\S\\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push([\"str\",/^(?:'''(?:[^'\\\\]|\\\\[\\S\\s]|''?(?=[^']))*(?:'''|$)|\"\"\"(?:[^\"\\\\]|\\\\[\\S\\s]|\"\"?(?=[^\"]))*(?:\"\"\"|$)|'(?:[^'\\\\]|\\\\[\\S\\s])*(?:'|$)|\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$))/,q,\"'\\\"\"]):a.multiLineStrings?m.push([\"str\",/^(?:'(?:[^'\\\\]|\\\\[\\S\\s])*(?:'|$)|\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)|`(?:[^\\\\`]|\\\\[\\S\\s])*(?:`|$))/,\nq,\"'\\\"`\"]):m.push([\"str\",/^(?:'(?:[^\\n\\r'\\\\]|\\\\.)*(?:'|$)|\"(?:[^\\n\\r\"\\\\]|\\\\.)*(?:\"|$))/,q,\"\\\"'\"]);a.verbatimStrings&&e.push([\"str\",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push([\"com\",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,\"#\"]):m.push([\"com\",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\\b|[^\\n\\r]*)/,q,\"#\"]),e.push([\"str\",/^<(?:(?:(?:\\.\\.\\/)*|\\/?)(?:[\\w-]+(?:\\/[\\w-]+)+)?[\\w-]+\\.h|[a-z]\\w*)>/,q])):m.push([\"com\",/^#[^\\n\\r]*/,\nq,\"#\"]));a.cStyleComments&&(e.push([\"com\",/^\\/\\/[^\\n\\r]*/,q]),e.push([\"com\",/^\\/\\*[\\S\\s]*?(?:\\*\\/|$)/,q]));a.regexLiterals&&e.push([\"lang-regex\",/^(?:^^\\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|,|-=|->|\\/|\\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\\^=|\\^\\^|\\^\\^=|{|\\||\\|=|\\|\\||\\|\\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*(\\/(?=[^*/])(?:[^/[\\\\]|\\\\[\\S\\s]|\\[(?:[^\\\\\\]]|\\\\[\\S\\s])*(?:]|$))+\\/)/]);(h=a.types)&&e.push([\"typ\",h]);a=(\"\"+a.keywords).replace(/^ | $/g,\n\"\");a.length&&e.push([\"kwd\",RegExp(\"^(?:\"+a.replace(/[\\s,]+/g,\"|\")+\")\\\\b\"),q]);m.push([\"pln\",/^\\s+/,q,\" \\r\\n\\t\\xa0\"]);e.push([\"lit\",/^@[$_a-z][\\w$@]*/i,q],[\"typ\",/^(?:[@_]?[A-Z]+[a-z][\\w$@]*|\\w+_t\\b)/,q],[\"pln\",/^[$_a-z][\\w$@]*/i,q],[\"lit\",/^(?:0x[\\da-f]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+-]?\\d+)?)[a-z]*/i,q,\"0123456789\"],[\"pln\",/^\\\\[\\S\\s]?/,q],[\"pun\",/^.[^\\s\\w\"-$'./@\\\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if(\"BR\"===a.nodeName)h(a),\na.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}\nfor(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\\s)nocode(?:\\s|$)/,t=/\\r\\n?|\\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue(\"white-space\"));var p=l&&\"pre\"===l.substring(0,3);for(l=s.createElement(\"LI\");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute(\"value\",\nm);var r=s.createElement(\"OL\");r.className=\"linenums\";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className=\"L\"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode(\"\\xa0\")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn(\"cannot override language handler %s\",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\\s*</.test(m)?\"default-markup\":\"default-code\";return A[a]}function E(a){var m=\na.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\\bMSIE\\b/.test(navigator.userAgent),m=/\\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,\"\\r\"));i.nodeValue=\nj;var u=i.ownerDocument,v=u.createElement(\"SPAN\");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){\"console\"in window&&console.log(w&&w.stack?w.stack:w)}}var v=[\"break,continue,do,else,for,if,return,while\"],w=[[v,\"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile\"],\n\"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof\"],F=[w,\"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where\"],G=[w,\"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient\"],\nH=[G,\"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var\"],w=[w,\"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN\"],I=[v,\"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None\"],\nJ=[v,\"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END\"],v=[v,\"case,done,elif,esac,eval,fi,function,in,local,set,then,until\"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\\d*)/,N=/\\S/,O=u({keywords:[F,H,w,\"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END\"+\nI,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,[\"default-code\"]);k(x([],[[\"pln\",/^[^<?]+/],[\"dec\",/^<!\\w[^>]*(?:>|$)/],[\"com\",/^<\\!--[\\S\\s]*?(?:--\\>|$)/],[\"lang-\",/^<\\?([\\S\\s]+?)(?:\\?>|$)/],[\"lang-\",/^<%([\\S\\s]+?)(?:%>|$)/],[\"pun\",/^(?:<[%?]|[%?]>)/],[\"lang-\",/^<xmp\\b[^>]*>([\\S\\s]+?)<\\/xmp\\b[^>]*>/i],[\"lang-js\",/^<script\\b[^>]*>([\\S\\s]*?)(<\\/script\\b[^>]*>)/i],[\"lang-css\",/^<style\\b[^>]*>([\\S\\s]*?)(<\\/style\\b[^>]*>)/i],[\"lang-in.tag\",/^(<\\/?[a-z][^<>]*>)/i]]),\n[\"default-markup\",\"htm\",\"html\",\"mxml\",\"xhtml\",\"xml\",\"xsl\"]);k(x([[\"pln\",/^\\s+/,q,\" \\t\\r\\n\"],[\"atv\",/^(?:\"[^\"]*\"?|'[^']*'?)/,q,\"\\\"'\"]],[[\"tag\",/^^<\\/?[a-z](?:[\\w-.:]*\\w)?|\\/?>$/i],[\"atn\",/^(?!style[\\s=]|on)[a-z](?:[\\w:-]*\\w)?/i],[\"lang-uq.val\",/^=\\s*([^\\s\"'>]*(?:[^\\s\"'/>]|\\/(?=\\s)))/],[\"pun\",/^[/<->]+/],[\"lang-js\",/^on\\w+\\s*=\\s*\"([^\"]+)\"/i],[\"lang-js\",/^on\\w+\\s*=\\s*'([^']+)'/i],[\"lang-js\",/^on\\w+\\s*=\\s*([^\\s\"'>]+)/i],[\"lang-css\",/^style\\s*=\\s*\"([^\"]+)\"/i],[\"lang-css\",/^style\\s*=\\s*'([^']+)'/i],[\"lang-css\",\n/^style\\s*=\\s*([^\\s\"'>]+)/i]]),[\"in.tag\"]);k(x([],[[\"atv\",/^[\\S\\s]+/]]),[\"uq.val\"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),[\"c\",\"cc\",\"cpp\",\"cxx\",\"cyc\",\"m\"]);k(u({keywords:\"null,true,false\"}),[\"json\"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),[\"cs\"]);k(u({keywords:G,cStyleComments:!0}),[\"java\"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),[\"bsh\",\"csh\",\"sh\"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),\n[\"cv\",\"py\"]);k(u({keywords:\"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END\",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),[\"perl\",\"pl\",\"pm\"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),[\"rb\"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),[\"js\"]);k(u({keywords:\"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes\",\nhashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),[\"coffee\"]);k(x([],[[\"str\",/^[\\S\\s]+/]]),[\"regex\"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement(\"PRE\");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf(\"prettyprint\")>=0){var k=k.match(g),f,b;if(b=\n!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&\"CODE\"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName===\"pre\"||o.tagName===\"code\"||o.tagName===\"xmp\")&&o.className&&o.className.indexOf(\"prettyprint\")>=0){b=!0;break}b||((b=(b=n.className.match(/\\blinenums\\b(?::(\\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,\n250):a&&a()}for(var e=[document.getElementsByTagName(\"pre\"),document.getElementsByTagName(\"code\"),document.getElementsByTagName(\"xmp\")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\\blang(?:uage)?-([\\w.]+)(?!\\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:\"atn\",PR_ATTRIB_VALUE:\"atv\",PR_COMMENT:\"com\",PR_DECLARATION:\"dec\",PR_KEYWORD:\"kwd\",PR_LITERAL:\"lit\",\nPR_NOCODE:\"nocode\",PR_PLAIN:\"pln\",PR_PUNCTUATION:\"pun\",PR_SOURCE:\"src\",PR_STRING:\"str\",PR_TAG:\"tag\",PR_TYPE:\"typ\"}})();\n"
  },
  {
    "path": "public/js/scripts.js",
    "content": "$.queryStringToJSON = function(string) {\n  var qArr = string.split('&');\n  var stack = [];\n  for (var i in qArr) {\n    var a = qArr[i].split('=');\n\n    stack.push({\n      name: a[0],\n      value: a[1]\n    });\n  }\n\n  var json, patterns, push_counters,\n    _this = this;\n  json = {};\n  push_counters = {};\n  patterns = {\n    validate: /^[a-zA-Z][a-zA-Z0-9_]*(?:\\[(?:\\d*|[a-zA-Z0-9_]+)\\])*$/,\n    key: /[a-zA-Z0-9_]+|(?=\\[\\])/g,\n    push: /^$/,\n    fixed: /^\\d+$/,\n    named: /^[a-zA-Z0-9_]+$/\n  };\n  this.build = function(base, key, value) {\n    base[key] = value;\n    return base;\n  };\n  this.push_counter = function(key) {\n    if (push_counters[key] === void 0) {\n      push_counters[key] = 0;\n    }\n    return push_counters[key]++;\n  };\n  $.each(stack, function(i, elem) {\n    var k, keys, merge, re, reverse_key;\n    if (!patterns.validate.test(elem.name)) {\n      return;\n    }\n    keys = elem.name.match(patterns.key);\n    merge = elem.value;\n    reverse_key = elem.name;\n    while ((k = keys.pop()) !== void 0) {\n      if (patterns.push.test(k)) {\n        re = new RegExp(\"\\\\[\" + k + \"\\\\]$\");\n        reverse_key = reverse_key.replace(re, '');\n        merge = _this.build([], _this.push_counter(reverse_key), merge);\n      } else if (patterns.fixed.test(k)) {\n        merge = _this.build([], k, merge);\n      } else if (patterns.named.test(k)) {\n        merge = _this.build({}, k, merge);\n      }\n    }\n    return json = $.extend(true, json, merge);\n  });\n\n  return json;\n};"
  },
  {
    "path": "public/js/timeline.js",
    "content": "/**\n * @file timeline.js\n *\n * @brief\n * The Timeline is an interactive visualization chart to visualize events in\n * time, having a start and end date.\n * You can freely move and zoom in the timeline by dragging\n * and scrolling in the Timeline. Items are optionally dragable. The time\n * scale on the axis is adjusted automatically, and supports scales ranging\n * from milliseconds to years.\n *\n * Timeline is part of the CHAP Links library.\n *\n * Timeline is tested on Firefox 3.6, Safari 5.0, Chrome 6.0, Opera 10.6, and\n * Internet Explorer 6+.\n *\n * @license\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n * use this file except in compliance with the License. You may obtain a copy\n * of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n *\n * Copyright (c) 2011-2013 Almende B.V.\n *\n * @author     Jos de Jong, <jos@almende.org>\n * @date    2013-08-20\n * @version 2.5.0\n */\n\n/*\n * i18n mods by github user iktuz (https://gist.github.com/iktuz/3749287/)\n * added to v2.4.1 with da_DK language by @bjarkebech\n */\n\n/*\n * TODO\n *\n * Add zooming with pinching on Android\n * \n * Bug: when an item contains a javascript onclick or a link, this does not work\n *      when the item is not selected (when the item is being selected,\n *      it is redrawn, which cancels any onclick or link action)\n * Bug: when an item contains an image without size, or a css max-width, it is not sized correctly\n * Bug: neglect items when they have no valid start/end, instead of throwing an error\n * Bug: Pinching on ipad does not work very well, sometimes the page will zoom when pinching vertically\n * Bug: cannot set max width for an item, like div.timeline-event-content {white-space: normal; max-width: 100px;}\n * Bug on IE in Quirks mode. When you have groups, and delete an item, the groups become invisible\n */\n\n/**\n * Declare a unique namespace for CHAP's Common Hybrid Visualisation Library,\n * \"links\"\n */\nif (typeof links === 'undefined') {\n    links = {};\n    // important: do not use var, as \"var links = {};\" will overwrite \n    //            the existing links variable value with undefined in IE8, IE7.  \n}\n\n\n/**\n * Ensure the variable google exists\n */\nif (typeof google === 'undefined') {\n    google = undefined;\n    // important: do not use var, as \"var google = undefined;\" will overwrite \n    //            the existing google variable value with undefined in IE8, IE7.\n}\n\n\n\n// Internet Explorer 8 and older does not support Array.indexOf,\n// so we define it here in that case\n// http://soledadpenades.com/2007/05/17/arrayindexof-in-internet-explorer/\nif(!Array.prototype.indexOf) {\n    Array.prototype.indexOf = function(obj){\n        for(var i = 0; i < this.length; i++){\n            if(this[i] == obj){\n                return i;\n            }\n        }\n        return -1;\n    }\n}\n\n// Internet Explorer 8 and older does not support Array.forEach,\n// so we define it here in that case\n// https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/forEach\nif (!Array.prototype.forEach) {\n    Array.prototype.forEach = function(fn, scope) {\n        for(var i = 0, len = this.length; i < len; ++i) {\n            fn.call(scope || this, this[i], i, this);\n        }\n    }\n}\n\n\n/**\n * @constructor links.Timeline\n * The timeline is a visualization chart to visualize events in time.\n *\n * The timeline is developed in javascript as a Google Visualization Chart.\n *\n * @param {Element} container   The DOM element in which the Timeline will\n *                                  be created. Normally a div element.\n */\nlinks.Timeline = function(container) {\n    if (!container) {\n        // this call was probably only for inheritance, no constructor-code is required\n        return;\n    }\n\n    // create variables and set default values\n    this.dom = {};\n    this.conversion = {};\n    this.eventParams = {}; // stores parameters for mouse events\n    this.groups = [];\n    this.groupIndexes = {};\n    this.items = [];\n    this.renderQueue = {\n        show: [],   // Items made visible but not yet added to DOM\n        hide: [],   // Items currently visible but not yet removed from DOM\n        update: []  // Items with changed data but not yet adjusted DOM\n    };\n    this.renderedItems = [];  // Items currently rendered in the DOM\n    this.clusterGenerator = new links.Timeline.ClusterGenerator(this);\n    this.currentClusters = [];\n    this.selection = undefined; // stores index and item which is currently selected\n\n    this.listeners = {}; // event listener callbacks\n\n    // Initialize sizes. \n    // Needed for IE (which gives an error when you try to set an undefined\n    // value in a style)\n    this.size = {\n        'actualHeight': 0,\n        'axis': {\n            'characterMajorHeight': 0,\n            'characterMajorWidth': 0,\n            'characterMinorHeight': 0,\n            'characterMinorWidth': 0,\n            'height': 0,\n            'labelMajorTop': 0,\n            'labelMinorTop': 0,\n            'line': 0,\n            'lineMajorWidth': 0,\n            'lineMinorHeight': 0,\n            'lineMinorTop': 0,\n            'lineMinorWidth': 0,\n            'top': 0\n        },\n        'contentHeight': 0,\n        'contentLeft': 0,\n        'contentWidth': 0,\n        'frameHeight': 0,\n        'frameWidth': 0,\n        'groupsLeft': 0,\n        'groupsWidth': 0,\n        'items': {\n            'top': 0\n        }\n    };\n\n    this.dom.container = container;\n\n    this.options = {\n        'width': \"100%\",\n        'height': \"auto\",\n        'minHeight': 0,        // minimal height in pixels\n        'autoHeight': true,\n\n        'eventMargin': 10,     // minimal margin between events\n        'eventMarginAxis': 20, // minimal margin between events and the axis\n        'dragAreaWidth': 10,   // pixels\n\n        'min': undefined,\n        'max': undefined,\n        'zoomMin': 10,     // milliseconds\n        'zoomMax': 1000 * 60 * 60 * 24 * 365 * 10000, // milliseconds\n\n        'moveable': true,\n        'zoomable': true,\n        'selectable': true,\n        'unselectable': true,\n        'editable': false,\n        'snapEvents': true,\n        'groupChangeable': true,\n\n        'showCurrentTime': true, // show a red bar displaying the current time\n        'showCustomTime': false, // show a blue, draggable bar displaying a custom time    \n        'showMajorLabels': true,\n        'showMinorLabels': true,\n        'showNavigation': false,\n        'showButtonNew': false,\n        'groupsOnRight': false,\n        'axisOnTop': false,\n        'stackEvents': true,\n        'animate': true,\n        'animateZoom': true,\n        'cluster': false,\n        'style': 'box',\n        'customStackOrder': false, //a function(a,b) for determining stackorder amongst a group of items. Essentially a comparator, -ve value for \"a before b\" and vice versa\n        \n        // i18n: Timeline only has built-in English text per default. Include timeline-locales.js to support more localized text.\n        'locale': 'en',\n        'MONTHS': new Array(\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"),\n        'MONTHS_SHORT': new Array(\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"),\n        'DAYS': new Array(\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"),\n        'DAYS_SHORT': new Array(\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"),\n        'ZOOM_IN': \"Zoom in\",\n        'ZOOM_OUT': \"Zoom out\",\n        'MOVE_LEFT': \"Move left\",\n        'MOVE_RIGHT': \"Move right\",\n        'NEW': \"New\",\n        'CREATE_NEW_EVENT': \"Create new event\"\n    };\n\n    this.clientTimeOffset = 0;    // difference between client time and the time\n    // set via Timeline.setCurrentTime()\n    var dom = this.dom;\n\n    // remove all elements from the container element.\n    while (dom.container.hasChildNodes()) {\n        dom.container.removeChild(dom.container.firstChild);\n    }\n\n    // create a step for drawing the axis\n    this.step = new links.Timeline.StepDate();\n\n    // add standard item types\n    this.itemTypes = {\n        box:   links.Timeline.ItemBox,\n        range: links.Timeline.ItemRange,\n        dot:   links.Timeline.ItemDot\n    };\n\n    // initialize data\n    this.data = [];\n    this.firstDraw = true;\n\n    // date interval must be initialized \n    this.setVisibleChartRange(undefined, undefined, false);\n\n    // render for the first time\n    this.render();\n\n    // fire the ready event\n    var me = this;\n    setTimeout(function () {\n        me.trigger('ready');\n    }, 0);\n};\n\n\n/**\n * Main drawing logic. This is the function that needs to be called\n * in the html page, to draw the timeline.\n *\n * A data table with the events must be provided, and an options table.\n *\n * @param {google.visualization.DataTable}      data\n *                                 The data containing the events for the timeline.\n *                                 Object DataTable is defined in\n *                                 google.visualization.DataTable\n * @param {Object} options         A name/value map containing settings for the\n *                                 timeline. Optional.\n */\nlinks.Timeline.prototype.draw = function(data, options) {\n    this.setOptions(options);\n    \n    if (this.options.selectable) {\n        links.Timeline.addClassName(this.dom.frame, \"timeline-selectable\");\n    }\n\n    // read the data\n    this.setData(data);\n\n    // set timer range. this will also redraw the timeline\n    if (options && (options.start || options.end)) {\n        this.setVisibleChartRange(options.start, options.end);\n    }\n    else if (this.firstDraw) {\n        this.setVisibleChartRangeAuto();\n    }\n\n    this.firstDraw = false;\n};\n\n\n/**\n * Set options for the timeline.\n * Timeline must be redrawn afterwards\n * @param {Object} options A name/value map containing settings for the\n *                                 timeline. Optional.\n */\nlinks.Timeline.prototype.setOptions = function(options) {\n    if (options) {\n        // retrieve parameter values\n        for (var i in options) {\n            if (options.hasOwnProperty(i)) {\n                this.options[i] = options[i];\n            }\n        }\n        \n        // prepare i18n dependent on set locale\n        if (typeof links.locales !== 'undefined' && this.options.locale !== 'en') {\n            var localeOpts = links.locales[this.options.locale];\n            if(localeOpts) {\n                for (var l in localeOpts) {\n                    if (localeOpts.hasOwnProperty(l)) {\n                        this.options[l] = localeOpts[l];\n                    }\n                }\n            }\n        }\n\n        // check for deprecated options\n        if (options.showButtonAdd != undefined) {\n            this.options.showButtonNew = options.showButtonAdd;\n            console.log('WARNING: Option showButtonAdd is deprecated. Use showButtonNew instead');\n        }\n        if (options.intervalMin != undefined) {\n            this.options.zoomMin = options.intervalMin;\n            console.log('WARNING: Option intervalMin is deprecated. Use zoomMin instead');\n        }\n        if (options.intervalMax != undefined) {\n            this.options.zoomMax = options.intervalMax;\n            console.log('WARNING: Option intervalMax is deprecated. Use zoomMax instead');\n        }\n\n        if (options.scale && options.step) {\n            this.step.setScale(options.scale, options.step);\n        }\n    }\n\n    // validate options\n    this.options.autoHeight = (this.options.height === \"auto\");\n};\n\n/**\n * Add new type of items\n * @param {String} typeName  Name of new type\n * @param {links.Timeline.Item} typeFactory Constructor of items\n */\nlinks.Timeline.prototype.addItemType = function (typeName, typeFactory) {\n    this.itemTypes[typeName] = typeFactory;\n};\n\n/**\n * Retrieve a map with the column indexes of the columns by column name.\n * For example, the method returns the map\n *     {\n *         start: 0,\n *         end: 1,\n *         content: 2,\n *         group: undefined,\n *         className: undefined\n *         editable: undefined\n *         type: undefined\n *     }\n * @param {google.visualization.DataTable} dataTable\n * @type {Object} map\n */\nlinks.Timeline.mapColumnIds = function (dataTable) {\n    var cols = {},\n        colCount = dataTable.getNumberOfColumns(),\n        allUndefined = true;\n\n    // loop over the columns, and map the column id's to the column indexes\n    for (var col = 0; col < colCount; col++) {\n        var id = dataTable.getColumnId(col) || dataTable.getColumnLabel(col);\n        cols[id] = col;\n        if (id == 'start' || id == 'end' || id == 'content' || id == 'group' ||\n            id == 'className' || id == 'editable' || id == 'type') {\n            allUndefined = false;\n        }\n    }\n\n    // if no labels or ids are defined, use the default mapping\n    // for start, end, content, group, className, editable, type\n    if (allUndefined) {\n        cols.start = 0;\n        cols.end = 1;\n        cols.content = 2;\n        if (colCount >= 3) {cols.group = 3}\n        if (colCount >= 4) {cols.className = 4}\n        if (colCount >= 5) {cols.editable = 5}\n        if (colCount >= 6) {cols.type = 6}\n    }\n\n    return cols;\n};\n\n/**\n * Set data for the timeline\n * @param {google.visualization.DataTable | Array} data\n */\nlinks.Timeline.prototype.setData = function(data) {\n    // unselect any previously selected item\n    this.unselectItem();\n\n    if (!data) {\n        data = [];\n    }\n\n    // clear all data\n    this.stackCancelAnimation();\n    this.clearItems();\n    this.data = data;\n    var items = this.items;\n    this.deleteGroups();\n\n    if (google && google.visualization &&\n        data instanceof google.visualization.DataTable) {\n        // map the datatable columns\n        var cols = links.Timeline.mapColumnIds(data);\n\n        // read DataTable\n        for (var row = 0, rows = data.getNumberOfRows(); row < rows; row++) {\n            items.push(this.createItem({\n                'start':     ((cols.start != undefined)     ? data.getValue(row, cols.start)     : undefined),\n                'end':       ((cols.end != undefined)       ? data.getValue(row, cols.end)       : undefined),\n                'content':   ((cols.content != undefined)   ? data.getValue(row, cols.content)   : undefined),\n                'group':     ((cols.group != undefined)     ? data.getValue(row, cols.group)     : undefined),\n                'className': ((cols.className != undefined) ? data.getValue(row, cols.className) : undefined),\n                'editable':  ((cols.editable != undefined)  ? data.getValue(row, cols.editable)  : undefined),\n                'type':      ((cols.editable != undefined)  ? data.getValue(row, cols.type)      : undefined)\n            }));\n        }\n    }\n    else if (links.Timeline.isArray(data)) {\n        // read JSON array\n        for (var row = 0, rows = data.length; row < rows; row++) {\n            var itemData = data[row];\n            var item = this.createItem(itemData);\n            items.push(item);\n        }\n    }\n    else {\n        throw \"Unknown data type. DataTable or Array expected.\";\n    }\n\n    // prepare data for clustering, by filtering and sorting by type\n    if (this.options.cluster) {\n        this.clusterGenerator.setData(this.items);\n    }\n\n    this.render({\n        animate: false\n    });\n};\n\n/**\n * Return the original data table.\n * @return {google.visualization.DataTable | Array} data\n */\nlinks.Timeline.prototype.getData = function  () {\n    return this.data;\n};\n\n\n/**\n * Update the original data with changed start, end or group.\n *\n * @param {Number} index\n * @param {Object} values   An object containing some of the following parameters:\n *                          {Date} start,\n *                          {Date} end,\n *                          {String} content,\n *                          {String} group\n */\nlinks.Timeline.prototype.updateData = function  (index, values) {\n    var data = this.data,\n        prop;\n\n    if (google && google.visualization &&\n        data instanceof google.visualization.DataTable) {\n        // update the original google DataTable\n        var missingRows = (index + 1) - data.getNumberOfRows();\n        if (missingRows > 0) {\n            data.addRows(missingRows);\n        }\n\n        // map the column id's by name\n        var cols = links.Timeline.mapColumnIds(data);\n\n        // merge all fields from the provided data into the current data\n        for (prop in values) {\n            if (values.hasOwnProperty(prop)) {\n                var col = cols[prop];\n                if (col == undefined) {\n                    // create new column\n                    var value = values[prop];\n                    var valueType = 'string';\n                    if (typeof(value) == 'number')       {valueType = 'number';}\n                    else if (typeof(value) == 'boolean') {valueType = 'boolean';}\n                    else if (value instanceof Date)      {valueType = 'datetime';}\n                    col = data.addColumn(valueType, prop);\n                }\n                data.setValue(index, col, values[prop]);\n\n                // TODO: correctly serialize the start and end Date to the desired type (Date, String, or Number)\n            }\n        }\n    }\n    else if (links.Timeline.isArray(data)) {\n        // update the original JSON table\n        var row = data[index];\n        if (row == undefined) {\n            row = {};\n            data[index] = row;\n        }\n\n        // merge all fields from the provided data into the current data\n        for (prop in values) {\n            if (values.hasOwnProperty(prop)) {\n                row[prop] = values[prop];\n\n                // TODO: correctly serialize the start and end Date to the desired type (Date, String, or Number)\n            }\n        }\n    }\n    else {\n        throw \"Cannot update data, unknown type of data\";\n    }\n};\n\n/**\n * Find the item index from a given HTML element\n * If no item index is found, undefined is returned\n * @param {Element} element\n * @return {Number | undefined} index\n */\nlinks.Timeline.prototype.getItemIndex = function(element) {\n    var e = element,\n        dom = this.dom,\n        frame = dom.items.frame,\n        items = this.items,\n        index = undefined;\n\n    // try to find the frame where the items are located in\n    while (e.parentNode && e.parentNode !== frame) {\n        e = e.parentNode;\n    }\n\n    if (e.parentNode === frame) {\n        // yes! we have found the parent element of all items\n        // retrieve its id from the array with items\n        for (var i = 0, iMax = items.length; i < iMax; i++) {\n            if (items[i].dom === e) {\n                index = i;\n                break;\n            }\n        }\n    }\n\n    return index;\n};\n\n/**\n * Set a new size for the timeline\n * @param {string} width   Width in pixels or percentage (for example \"800px\"\n *                         or \"50%\")\n * @param {string} height  Height in pixels or percentage  (for example \"400px\"\n *                         or \"30%\")\n */\nlinks.Timeline.prototype.setSize = function(width, height) {\n    if (width) {\n        this.options.width = width;\n        this.dom.frame.style.width = width;\n    }\n    if (height) {\n        this.options.height = height;\n        this.options.autoHeight = (this.options.height === \"auto\");\n        if (height !==  \"auto\" ) {\n            this.dom.frame.style.height = height;\n        }\n    }\n\n    this.render({\n        animate: false\n    });\n};\n\n\n/**\n * Set a new value for the visible range int the timeline.\n * Set start undefined to include everything from the earliest date to end.\n * Set end undefined to include everything from start to the last date.\n * Example usage:\n *    myTimeline.setVisibleChartRange(new Date(\"2010-08-22\"),\n *                                    new Date(\"2010-09-13\"));\n * @param {Date}   start     The start date for the timeline. optional\n * @param {Date}   end       The end date for the timeline. optional\n * @param {boolean} redraw   Optional. If true (default) the Timeline is\n *                           directly redrawn\n */\nlinks.Timeline.prototype.setVisibleChartRange = function(start, end, redraw) {\n    var range = {};\n    if (!start || !end) {\n        // retrieve the date range of the items\n        range = this.getDataRange(true);\n    }\n\n    if (!start) {\n        if (end) {\n            if (range.min && range.min.valueOf() < end.valueOf()) {\n                // start of the data\n                start = range.min;\n            }\n            else {\n                // 7 days before the end\n                start = new Date(end.valueOf());\n                start.setDate(start.getDate() - 7);\n            }\n        }\n        else {\n            // default of 3 days ago\n            start = new Date();\n            start.setDate(start.getDate() - 3);\n        }\n    }\n\n    if (!end) {\n        if (range.max) {\n            // end of the data\n            end = range.max;\n        }\n        else {\n            // 7 days after start\n            end = new Date(start.valueOf());\n            end.setDate(end.getDate() + 7);\n        }\n    }\n\n    // prevent start Date <= end Date\n    if (end <= start) {\n        end = new Date(start.valueOf());\n        end.setDate(end.getDate() + 7);\n    }\n\n    // limit to the allowed range (don't let this do by applyRange,\n    // because that method will try to maintain the interval (end-start)\n    var min = this.options.min ? this.options.min : undefined; // date\n    if (min != undefined && start.valueOf() < min.valueOf()) {\n        start = new Date(min.valueOf()); // date\n    }\n    var max = this.options.max ? this.options.max : undefined; // date\n    if (max != undefined && end.valueOf() > max.valueOf()) {\n        end = new Date(max.valueOf()); // date\n    }\n\n    this.applyRange(start, end);\n\n    if (redraw == undefined || redraw == true) {\n        this.render({\n            animate: false\n        });  // TODO: optimize, no reflow needed\n    }\n    else {\n        this.recalcConversion();\n    }\n};\n\n\n/**\n * Change the visible chart range such that all items become visible\n */\nlinks.Timeline.prototype.setVisibleChartRangeAuto = function() {\n    var range = this.getDataRange(true);\n    this.setVisibleChartRange(range.min, range.max);\n};\n\n/**\n * Adjust the visible range such that the current time is located in the center\n * of the timeline\n */\nlinks.Timeline.prototype.setVisibleChartRangeNow = function() {\n    var now = new Date();\n\n    var diff = (this.end.valueOf() - this.start.valueOf());\n\n    var startNew = new Date(now.valueOf() - diff/2);\n    var endNew = new Date(startNew.valueOf() + diff);\n    this.setVisibleChartRange(startNew, endNew);\n};\n\n\n/**\n * Retrieve the current visible range in the timeline.\n * @return {Object} An object with start and end properties\n */\nlinks.Timeline.prototype.getVisibleChartRange = function() {\n    return {\n        'start': new Date(this.start.valueOf()),\n        'end': new Date(this.end.valueOf())\n    };\n};\n\n/**\n * Get the date range of the items.\n * @param {boolean} [withMargin]  If true, 5% of whitespace is added to the\n *                                left and right of the range. Default is false.\n * @return {Object} range    An object with parameters min and max.\n *                           - {Date} min is the lowest start date of the items\n *                           - {Date} max is the highest start or end date of the items\n *                           If no data is available, the values of min and max\n *                           will be undefined\n */\nlinks.Timeline.prototype.getDataRange = function (withMargin) {\n    var items = this.items,\n        min = undefined, // number\n        max = undefined; // number\n\n    if (items) {\n        for (var i = 0, iMax = items.length; i < iMax; i++) {\n            var item = items[i],\n                start = item.start != undefined ? item.start.valueOf() : undefined,\n                end   = item.end != undefined   ? item.end.valueOf() : start;\n\n            if (start != undefined) {\n                min = (min != undefined) ? Math.min(min.valueOf(), start.valueOf()) : start;\n            }\n\n            if (end != undefined) {\n                max = (max != undefined) ? Math.max(max.valueOf(), end.valueOf()) : end;\n            }\n        }\n    }\n\n    if (min && max && withMargin) {\n        // zoom out 5% such that you have a little white space on the left and right\n        var diff = (max - min);\n        min = min - diff * 0.05;\n        max = max + diff * 0.05;\n    }\n\n    return {\n        'min': min != undefined ? new Date(min) : undefined,\n        'max': max != undefined ? new Date(max) : undefined\n    };\n};\n\n/**\n * Re-render (reflow and repaint) all components of the Timeline: frame, axis,\n * items, ...\n * @param {Object} [options]  Available options:\n *                            {boolean} renderTimesLeft   Number of times the\n *                                                        render may be repeated\n *                                                        5 times by default.\n *                            {boolean} animate           takes options.animate\n *                                                        as default value\n */\nlinks.Timeline.prototype.render = function(options) {\n    var frameResized = this.reflowFrame();\n    var axisResized = this.reflowAxis();\n    var groupsResized = this.reflowGroups();\n    var itemsResized = this.reflowItems();\n    var resized = (frameResized || axisResized || groupsResized || itemsResized);\n\n    // TODO: only stackEvents/filterItems when resized or changed. (gives a bootstrap issue).\n    // if (resized) {\n    var animate = this.options.animate;\n    if (options && options.animate != undefined) {\n        animate = options.animate;\n    }\n\n    this.recalcConversion();\n    this.clusterItems();\n    this.filterItems();\n    this.stackItems(animate);\n\n    this.recalcItems();\n\n    // TODO: only repaint when resized or when filterItems or stackItems gave a change?\n    var needsReflow = this.repaint();\n\n    // re-render once when needed (prevent endless re-render loop)\n    if (needsReflow) {\n        var renderTimesLeft = options ? options.renderTimesLeft : undefined;\n        if (renderTimesLeft == undefined) {\n            renderTimesLeft = 5;\n        }\n        if (renderTimesLeft > 0) {\n            this.render({\n                'animate': options ? options.animate: undefined,\n                'renderTimesLeft': (renderTimesLeft - 1)\n            });\n        }\n    }\n};\n\n/**\n * Repaint all components of the Timeline\n * @return {boolean} needsReflow   Returns true if the DOM is changed such that\n *                                 a reflow is needed.\n */\nlinks.Timeline.prototype.repaint = function() {\n    var frameNeedsReflow = this.repaintFrame();\n    var axisNeedsReflow  = this.repaintAxis();\n    var groupsNeedsReflow  = this.repaintGroups();\n    var itemsNeedsReflow = this.repaintItems();\n    this.repaintCurrentTime();\n    this.repaintCustomTime();\n\n    return (frameNeedsReflow || axisNeedsReflow || groupsNeedsReflow || itemsNeedsReflow);\n};\n\n/**\n * Reflow the timeline frame\n * @return {boolean} resized    Returns true if any of the frame elements\n *                              have been resized.\n */\nlinks.Timeline.prototype.reflowFrame = function() {\n    var dom = this.dom,\n        options = this.options,\n        size = this.size,\n        resized = false;\n\n    // Note: IE7 has issues with giving frame.clientWidth, therefore I use offsetWidth instead\n    var frameWidth  = dom.frame ? dom.frame.offsetWidth : 0,\n        frameHeight = dom.frame ? dom.frame.clientHeight : 0;\n\n    resized = resized || (size.frameWidth !== frameWidth);\n    resized = resized || (size.frameHeight !== frameHeight);\n    size.frameWidth = frameWidth;\n    size.frameHeight = frameHeight;\n\n    return resized;\n};\n\n/**\n * repaint the Timeline frame\n * @return {boolean} needsReflow   Returns true if the DOM is changed such that\n *                                 a reflow is needed.\n */\nlinks.Timeline.prototype.repaintFrame = function() {\n    var needsReflow = false,\n        dom = this.dom,\n        options = this.options,\n        size = this.size;\n\n    // main frame\n    if (!dom.frame) {\n        dom.frame = document.createElement(\"DIV\");\n        dom.frame.className = \"timeline-frame ui-widget ui-widget-content ui-corner-all\";\n        dom.frame.style.position = \"relative\";\n        dom.frame.style.overflow = \"hidden\";\n        dom.container.appendChild(dom.frame);\n        needsReflow = true;\n    }\n\n    var height = options.autoHeight ?\n        (size.actualHeight + \"px\") :\n        (options.height || \"100%\");\n    var width  = options.width || \"100%\";\n    needsReflow = needsReflow || (dom.frame.style.height != height);\n    needsReflow = needsReflow || (dom.frame.style.width != width);\n    dom.frame.style.height = height;\n    dom.frame.style.width = width;\n\n    // contents\n    if (!dom.content) {\n        // create content box where the axis and items will be created\n        dom.content = document.createElement(\"DIV\");\n        dom.content.style.position = \"relative\";\n        dom.content.style.overflow = \"hidden\";\n        dom.frame.appendChild(dom.content);\n\n        var timelines = document.createElement(\"DIV\");\n        timelines.style.position = \"absolute\";\n        timelines.style.left = \"0px\";\n        timelines.style.top = \"0px\";\n        timelines.style.height = \"100%\";\n        timelines.style.width = \"0px\";\n        dom.content.appendChild(timelines);\n        dom.contentTimelines = timelines;\n\n        var params = this.eventParams,\n            me = this;\n        if (!params.onMouseDown) {\n            params.onMouseDown = function (event) {me.onMouseDown(event);};\n            links.Timeline.addEventListener(dom.content, \"mousedown\", params.onMouseDown);\n        }\n        if (!params.onTouchStart) {\n            params.onTouchStart = function (event) {me.onTouchStart(event);};\n            links.Timeline.addEventListener(dom.content, \"touchstart\", params.onTouchStart);\n        }\n        if (!params.onMouseWheel) {\n            params.onMouseWheel = function (event) {me.onMouseWheel(event);};\n            links.Timeline.addEventListener(dom.content, \"mousewheel\", params.onMouseWheel);\n        }\n        if (!params.onDblClick) {\n            params.onDblClick = function (event) {me.onDblClick(event);};\n            links.Timeline.addEventListener(dom.content, \"dblclick\", params.onDblClick);\n        }\n\n        needsReflow = true;\n    }\n    dom.content.style.left = size.contentLeft + \"px\";\n    dom.content.style.top = \"0px\";\n    dom.content.style.width = size.contentWidth + \"px\";\n    dom.content.style.height = size.frameHeight + \"px\";\n\n    this.repaintNavigation();\n\n    return needsReflow;\n};\n\n/**\n * Reflow the timeline axis. Calculate its height, width, positioning, etc...\n * @return {boolean} resized    returns true if the axis is resized\n */\nlinks.Timeline.prototype.reflowAxis = function() {\n    var resized = false,\n        dom = this.dom,\n        options = this.options,\n        size = this.size,\n        axisDom = dom.axis;\n\n    var characterMinorWidth  = (axisDom && axisDom.characterMinor) ? axisDom.characterMinor.clientWidth : 0,\n        characterMinorHeight = (axisDom && axisDom.characterMinor) ? axisDom.characterMinor.clientHeight : 0,\n        characterMajorWidth  = (axisDom && axisDom.characterMajor) ? axisDom.characterMajor.clientWidth : 0,\n        characterMajorHeight = (axisDom && axisDom.characterMajor) ? axisDom.characterMajor.clientHeight : 0,\n        axisHeight = (options.showMinorLabels ? characterMinorHeight : 0) +\n            (options.showMajorLabels ? characterMajorHeight : 0);\n\n    var axisTop  = options.axisOnTop ? 0 : size.frameHeight - axisHeight,\n        axisLine = options.axisOnTop ? axisHeight : axisTop;\n\n    resized = resized || (size.axis.top !== axisTop);\n    resized = resized || (size.axis.line !== axisLine);\n    resized = resized || (size.axis.height !== axisHeight);\n    size.axis.top = axisTop;\n    size.axis.line = axisLine;\n    size.axis.height = axisHeight;\n    size.axis.labelMajorTop = options.axisOnTop ? 0 : axisLine +\n        (options.showMinorLabels ? characterMinorHeight : 0);\n    size.axis.labelMinorTop = options.axisOnTop ?\n        (options.showMajorLabels ? characterMajorHeight : 0) :\n        axisLine;\n    size.axis.lineMinorTop = options.axisOnTop ? size.axis.labelMinorTop : 0;\n    size.axis.lineMinorHeight = options.showMajorLabels ?\n        size.frameHeight - characterMajorHeight:\n        size.frameHeight;\n    if (axisDom && axisDom.minorLines && axisDom.minorLines.length) {\n        size.axis.lineMinorWidth = axisDom.minorLines[0].offsetWidth;\n    }\n    else {\n        size.axis.lineMinorWidth = 1;\n    }\n    if (axisDom && axisDom.majorLines && axisDom.majorLines.length) {\n        size.axis.lineMajorWidth = axisDom.majorLines[0].offsetWidth;\n    }\n    else {\n        size.axis.lineMajorWidth = 1;\n    }\n\n    resized = resized || (size.axis.characterMinorWidth  !== characterMinorWidth);\n    resized = resized || (size.axis.characterMinorHeight !== characterMinorHeight);\n    resized = resized || (size.axis.characterMajorWidth  !== characterMajorWidth);\n    resized = resized || (size.axis.characterMajorHeight !== characterMajorHeight);\n    size.axis.characterMinorWidth  = characterMinorWidth;\n    size.axis.characterMinorHeight = characterMinorHeight;\n    size.axis.characterMajorWidth  = characterMajorWidth;\n    size.axis.characterMajorHeight = characterMajorHeight;\n\n    var contentHeight = Math.max(size.frameHeight - axisHeight, 0);\n    size.contentLeft = options.groupsOnRight ? 0 : size.groupsWidth;\n    size.contentWidth = Math.max(size.frameWidth - size.groupsWidth, 0);\n    size.contentHeight = contentHeight;\n\n    return resized;\n};\n\n/**\n * Redraw the timeline axis with minor and major labels\n * @return {boolean} needsReflow     Returns true if the DOM is changed such\n *                                   that a reflow is needed.\n */\nlinks.Timeline.prototype.repaintAxis = function() {\n    var needsReflow = false,\n        dom = this.dom,\n        options = this.options,\n        size = this.size,\n        step = this.step;\n\n    var axis = dom.axis;\n    if (!axis) {\n        axis = {};\n        dom.axis = axis;\n    }\n    if (!size.axis.properties) {\n        size.axis.properties = {};\n    }\n    if (!axis.minorTexts) {\n        axis.minorTexts = [];\n    }\n    if (!axis.minorLines) {\n        axis.minorLines = [];\n    }\n    if (!axis.majorTexts) {\n        axis.majorTexts = [];\n    }\n    if (!axis.majorLines) {\n        axis.majorLines = [];\n    }\n\n    if (!axis.frame) {\n        axis.frame = document.createElement(\"DIV\");\n        axis.frame.style.position = \"absolute\";\n        axis.frame.style.left = \"0px\";\n        axis.frame.style.top = \"0px\";\n        dom.content.appendChild(axis.frame);\n    }\n\n    // take axis offline\n    dom.content.removeChild(axis.frame);\n\n    axis.frame.style.width = (size.contentWidth) + \"px\";\n    axis.frame.style.height = (size.axis.height) + \"px\";\n\n    // the drawn axis is more wide than the actual visual part, such that\n    // the axis can be dragged without having to redraw it each time again.\n    var start = this.screenToTime(0);\n    var end = this.screenToTime(size.contentWidth);\n\n    // calculate minimum step (in milliseconds) based on character size\n    if (size.axis.characterMinorWidth) {\n        this.minimumStep = this.screenToTime(size.axis.characterMinorWidth * 6) -\n            this.screenToTime(0);\n\n        step.setRange(start, end, this.minimumStep);\n    }\n\n    var charsNeedsReflow = this.repaintAxisCharacters();\n    needsReflow = needsReflow || charsNeedsReflow;\n\n    // The current labels on the axis will be re-used (much better performance),\n    // therefore, the repaintAxis method uses the mechanism with\n    // repaintAxisStartOverwriting, repaintAxisEndOverwriting, and\n    // this.size.axis.properties is used.\n    this.repaintAxisStartOverwriting();\n\n    step.start();\n    var xFirstMajorLabel = undefined;\n    var max = 0;\n    while (!step.end() && max < 1000) {\n        max++;\n        var cur = step.getCurrent(),\n            x = this.timeToScreen(cur),\n            isMajor = step.isMajor();\n\n        if (options.showMinorLabels) {\n            this.repaintAxisMinorText(x, step.getLabelMinor(options));\n        }\n\n        if (isMajor && options.showMajorLabels) {\n            if (x > 0) {\n                if (xFirstMajorLabel == undefined) {\n                    xFirstMajorLabel = x;\n                }\n                this.repaintAxisMajorText(x, step.getLabelMajor(options));\n            }\n            this.repaintAxisMajorLine(x);\n        }\n        else {\n            this.repaintAxisMinorLine(x);\n        }\n\n        step.next();\n    }\n\n    // create a major label on the left when needed\n    if (options.showMajorLabels) {\n        var leftTime = this.screenToTime(0),\n            leftText = this.step.getLabelMajor(options, leftTime),\n            width = leftText.length * size.axis.characterMajorWidth + 10; // upper bound estimation\n\n        if (xFirstMajorLabel == undefined || width < xFirstMajorLabel) {\n            this.repaintAxisMajorText(0, leftText, leftTime);\n        }\n    }\n\n    // cleanup left over labels\n    this.repaintAxisEndOverwriting();\n\n    this.repaintAxisHorizontal();\n\n    // put axis online\n    dom.content.insertBefore(axis.frame, dom.content.firstChild);\n\n    return needsReflow;\n};\n\n/**\n * Create characters used to determine the size of text on the axis\n * @return {boolean} needsReflow   Returns true if the DOM is changed such that\n *                                 a reflow is needed.\n */\nlinks.Timeline.prototype.repaintAxisCharacters = function () {\n    // calculate the width and height of a single character\n    // this is used to calculate the step size, and also the positioning of the\n    // axis\n    var needsReflow = false,\n        dom = this.dom,\n        axis = dom.axis,\n        text;\n\n    if (!axis.characterMinor) {\n        text = document.createTextNode(\"0\");\n        var characterMinor = document.createElement(\"DIV\");\n        characterMinor.className = \"timeline-axis-text timeline-axis-text-minor\";\n        characterMinor.appendChild(text);\n        characterMinor.style.position = \"absolute\";\n        characterMinor.style.visibility = \"hidden\";\n        characterMinor.style.paddingLeft = \"0px\";\n        characterMinor.style.paddingRight = \"0px\";\n        axis.frame.appendChild(characterMinor);\n\n        axis.characterMinor = characterMinor;\n        needsReflow = true;\n    }\n\n    if (!axis.characterMajor) {\n        text = document.createTextNode(\"0\");\n        var characterMajor = document.createElement(\"DIV\");\n        characterMajor.className = \"timeline-axis-text timeline-axis-text-major\";\n        characterMajor.appendChild(text);\n        characterMajor.style.position = \"absolute\";\n        characterMajor.style.visibility = \"hidden\";\n        characterMajor.style.paddingLeft = \"0px\";\n        characterMajor.style.paddingRight = \"0px\";\n        axis.frame.appendChild(characterMajor);\n\n        axis.characterMajor = characterMajor;\n        needsReflow = true;\n    }\n\n    return needsReflow;\n};\n\n/**\n * Initialize redraw of the axis. All existing labels and lines will be\n * overwritten and reused.\n */\nlinks.Timeline.prototype.repaintAxisStartOverwriting = function () {\n    var properties = this.size.axis.properties;\n\n    properties.minorTextNum = 0;\n    properties.minorLineNum = 0;\n    properties.majorTextNum = 0;\n    properties.majorLineNum = 0;\n};\n\n/**\n * End of overwriting HTML DOM elements of the axis.\n * remaining elements will be removed\n */\nlinks.Timeline.prototype.repaintAxisEndOverwriting = function () {\n    var dom = this.dom,\n        props = this.size.axis.properties,\n        frame = this.dom.axis.frame,\n        num;\n\n    // remove leftovers\n    var minorTexts = dom.axis.minorTexts;\n    num = props.minorTextNum;\n    while (minorTexts.length > num) {\n        var minorText = minorTexts[num];\n        frame.removeChild(minorText);\n        minorTexts.splice(num, 1);\n    }\n\n    var minorLines = dom.axis.minorLines;\n    num = props.minorLineNum;\n    while (minorLines.length > num) {\n        var minorLine = minorLines[num];\n        frame.removeChild(minorLine);\n        minorLines.splice(num, 1);\n    }\n\n    var majorTexts = dom.axis.majorTexts;\n    num = props.majorTextNum;\n    while (majorTexts.length > num) {\n        var majorText = majorTexts[num];\n        frame.removeChild(majorText);\n        majorTexts.splice(num, 1);\n    }\n\n    var majorLines = dom.axis.majorLines;\n    num = props.majorLineNum;\n    while (majorLines.length > num) {\n        var majorLine = majorLines[num];\n        frame.removeChild(majorLine);\n        majorLines.splice(num, 1);\n    }\n};\n\n/**\n * Repaint the horizontal line and background of the axis\n */\nlinks.Timeline.prototype.repaintAxisHorizontal = function() {\n    var axis = this.dom.axis,\n        size = this.size,\n        options = this.options;\n\n    // line behind all axis elements (possibly having a background color)\n    var hasAxis = (options.showMinorLabels || options.showMajorLabels);\n    if (hasAxis) {\n        if (!axis.backgroundLine) {\n            // create the axis line background (for a background color or so)\n            var backgroundLine = document.createElement(\"DIV\");\n            backgroundLine.className = \"timeline-axis\";\n            backgroundLine.style.position = \"absolute\";\n            backgroundLine.style.left = \"0px\";\n            backgroundLine.style.width = \"100%\";\n            backgroundLine.style.border = \"none\";\n            axis.frame.insertBefore(backgroundLine, axis.frame.firstChild);\n\n            axis.backgroundLine = backgroundLine;\n        }\n\n        if (axis.backgroundLine) {\n            axis.backgroundLine.style.top = size.axis.top + \"px\";\n            axis.backgroundLine.style.height = size.axis.height + \"px\";\n        }\n    }\n    else {\n        if (axis.backgroundLine) {\n            axis.frame.removeChild(axis.backgroundLine);\n            delete axis.backgroundLine;\n        }\n    }\n\n    // line before all axis elements\n    if (hasAxis) {\n        if (axis.line) {\n            // put this line at the end of all childs\n            var line = axis.frame.removeChild(axis.line);\n            axis.frame.appendChild(line);\n        }\n        else {\n            // make the axis line\n            var line = document.createElement(\"DIV\");\n            line.className = \"timeline-axis\";\n            line.style.position = \"absolute\";\n            line.style.left = \"0px\";\n            line.style.width = \"100%\";\n            line.style.height = \"0px\";\n            axis.frame.appendChild(line);\n\n            axis.line = line;\n        }\n\n        axis.line.style.top = size.axis.line + \"px\";\n    }\n    else {\n        if (axis.line && axis.line.parentElement) {\n            axis.frame.removeChild(axis.line);\n            delete axis.line;\n        }\n    }\n};\n\n/**\n * Create a minor label for the axis at position x\n * @param {Number} x\n * @param {String} text\n */\nlinks.Timeline.prototype.repaintAxisMinorText = function (x, text) {\n    var size = this.size,\n        dom = this.dom,\n        props = size.axis.properties,\n        frame = dom.axis.frame,\n        minorTexts = dom.axis.minorTexts,\n        index = props.minorTextNum,\n        label;\n\n    if (index < minorTexts.length) {\n        label = minorTexts[index]\n    }\n    else {\n        // create new label\n        var content = document.createTextNode(\"\");\n        label = document.createElement(\"DIV\");\n        label.appendChild(content);\n        label.className = \"timeline-axis-text timeline-axis-text-minor\";\n        label.style.position = \"absolute\";\n\n        frame.appendChild(label);\n\n        minorTexts.push(label);\n    }\n\n    label.childNodes[0].nodeValue = text;\n    label.style.left = x + \"px\";\n    label.style.top  = size.axis.labelMinorTop + \"px\";\n    //label.title = title;  // TODO: this is a heavy operation\n\n    props.minorTextNum++;\n};\n\n/**\n * Create a minor line for the axis at position x\n * @param {Number} x\n */\nlinks.Timeline.prototype.repaintAxisMinorLine = function (x) {\n    var axis = this.size.axis,\n        dom = this.dom,\n        props = axis.properties,\n        frame = dom.axis.frame,\n        minorLines = dom.axis.minorLines,\n        index = props.minorLineNum,\n        line;\n\n    if (index < minorLines.length) {\n        line = minorLines[index];\n    }\n    else {\n        // create vertical line\n        line = document.createElement(\"DIV\");\n        line.className = \"timeline-axis-grid timeline-axis-grid-minor\";\n        line.style.position = \"absolute\";\n        line.style.width = \"0px\";\n\n        frame.appendChild(line);\n        minorLines.push(line);\n    }\n\n    line.style.top = axis.lineMinorTop + \"px\";\n    line.style.height = axis.lineMinorHeight + \"px\";\n    line.style.left = (x - axis.lineMinorWidth/2) + \"px\";\n\n    props.minorLineNum++;\n};\n\n/**\n * Create a Major label for the axis at position x\n * @param {Number} x\n * @param {String} text\n */\nlinks.Timeline.prototype.repaintAxisMajorText = function (x, text) {\n    var size = this.size,\n        props = size.axis.properties,\n        frame = this.dom.axis.frame,\n        majorTexts = this.dom.axis.majorTexts,\n        index = props.majorTextNum,\n        label;\n\n    if (index < majorTexts.length) {\n        label = majorTexts[index];\n    }\n    else {\n        // create label\n        var content = document.createTextNode(text);\n        label = document.createElement(\"DIV\");\n        label.className = \"timeline-axis-text timeline-axis-text-major\";\n        label.appendChild(content);\n        label.style.position = \"absolute\";\n        label.style.top = \"0px\";\n\n        frame.appendChild(label);\n        majorTexts.push(label);\n    }\n\n    label.childNodes[0].nodeValue = text;\n    label.style.top = size.axis.labelMajorTop + \"px\";\n    label.style.left = x + \"px\";\n    //label.title = title; // TODO: this is a heavy operation\n\n    props.majorTextNum ++;\n};\n\n/**\n * Create a Major line for the axis at position x\n * @param {Number} x\n */\nlinks.Timeline.prototype.repaintAxisMajorLine = function (x) {\n    var size = this.size,\n        props = size.axis.properties,\n        axis = this.size.axis,\n        frame = this.dom.axis.frame,\n        majorLines = this.dom.axis.majorLines,\n        index = props.majorLineNum,\n        line;\n\n    if (index < majorLines.length) {\n        line = majorLines[index];\n    }\n    else {\n        // create vertical line\n        line = document.createElement(\"DIV\");\n        line.className = \"timeline-axis-grid timeline-axis-grid-major\";\n        line.style.position = \"absolute\";\n        line.style.top = \"0px\";\n        line.style.width = \"0px\";\n\n        frame.appendChild(line);\n        majorLines.push(line);\n    }\n\n    line.style.left = (x - axis.lineMajorWidth/2) + \"px\";\n    line.style.height = size.frameHeight + \"px\";\n\n    props.majorLineNum ++;\n};\n\n/**\n * Reflow all items, retrieve their actual size\n * @return {boolean} resized    returns true if any of the items is resized\n */\nlinks.Timeline.prototype.reflowItems = function() {\n    var resized = false,\n        i,\n        iMax,\n        group,\n        groups = this.groups,\n        renderedItems = this.renderedItems;\n\n    if (groups) { // TODO: need to check if labels exists?\n        // loop through all groups to reset the items height\n        groups.forEach(function (group) {\n            group.itemsHeight = 0;\n        });\n    }\n\n    // loop through the width and height of all visible items\n    for (i = 0, iMax = renderedItems.length; i < iMax; i++) {\n        var item = renderedItems[i],\n            domItem = item.dom;\n        group = item.group;\n\n        if (domItem) {\n            // TODO: move updating width and height into item.reflow\n            var width = domItem ? domItem.clientWidth : 0;\n            var height = domItem ? domItem.clientHeight : 0;\n            resized = resized || (item.width != width);\n            resized = resized || (item.height != height);\n            item.width = width;\n            item.height = height;\n            //item.borderWidth = (domItem.offsetWidth - domItem.clientWidth - 2) / 2; // TODO: borderWidth\n            item.reflow();\n        }\n\n        if (group) {\n            group.itemsHeight = group.itemsHeight ?\n                Math.max(group.itemsHeight, item.height) :\n                item.height;\n        }\n    }\n\n    return resized;\n};\n\n/**\n * Recalculate item properties:\n * - the height of each group.\n * - the actualHeight, from the stacked items or the sum of the group heights\n * @return {boolean} resized    returns true if any of the items properties is\n *                              changed\n */\nlinks.Timeline.prototype.recalcItems = function () {\n    var resized = false,\n        i,\n        iMax,\n        item,\n        finalItem,\n        finalItems,\n        group,\n        groups = this.groups,\n        size = this.size,\n        options = this.options,\n        renderedItems = this.renderedItems;\n\n    var actualHeight = 0;\n    if (groups.length == 0) {\n        // calculate actual height of the timeline when there are no groups\n        // but stacked items\n        if (options.autoHeight || options.cluster) {\n            var min = 0,\n                max = 0;\n\n            if (this.stack && this.stack.finalItems) {\n                // adjust the offset of all finalItems when the actualHeight has been changed\n                finalItems = this.stack.finalItems;\n                finalItem = finalItems[0];\n                if (finalItem && finalItem.top) {\n                    min = finalItem.top;\n                    max = finalItem.top + finalItem.height;\n                }\n                for (i = 1, iMax = finalItems.length; i < iMax; i++) {\n                    finalItem = finalItems[i];\n                    min = Math.min(min, finalItem.top);\n                    max = Math.max(max, finalItem.top + finalItem.height);\n                }\n            }\n            else {\n                item = renderedItems[0];\n                if (item && item.top) {\n                    min = item.top;\n                    max = item.top + item.height;\n                }\n                for (i = 1, iMax = renderedItems.length; i < iMax; i++) {\n                    item = renderedItems[i];\n                    if (item.top) {\n                        min = Math.min(min, item.top);\n                        max = Math.max(max, (item.top + item.height));\n                    }\n                }\n            }\n\n            actualHeight = (max - min) + 2 * options.eventMarginAxis + size.axis.height;\n            if (actualHeight < options.minHeight) {\n                actualHeight = options.minHeight;\n            }\n\n            if (size.actualHeight != actualHeight && options.autoHeight && !options.axisOnTop) {\n                // adjust the offset of all items when the actualHeight has been changed\n                var diff = actualHeight - size.actualHeight;\n                if (this.stack && this.stack.finalItems) {\n                    finalItems = this.stack.finalItems;\n                    for (i = 0, iMax = finalItems.length; i < iMax; i++) {\n                        finalItems[i].top += diff;\n                        finalItems[i].item.top += diff;\n                    }\n                }\n                else {\n                    for (i = 0, iMax = renderedItems.length; i < iMax; i++) {\n                        renderedItems[i].top += diff;\n                    }\n                }\n            }\n        }\n    }\n    else {\n        // loop through all groups to get the height of each group, and the\n        // total height\n        actualHeight = size.axis.height + 2 * options.eventMarginAxis;\n        for (i = 0, iMax = groups.length; i < iMax; i++) {\n            group = groups[i];\n\n            var groupHeight = Math.max(group.labelHeight || 0, group.itemsHeight || 0);\n            resized = resized || (groupHeight != group.height);\n            group.height = groupHeight;\n\n            actualHeight += groups[i].height + options.eventMargin;\n        }\n\n        // calculate top positions of the group labels and lines\n        var eventMargin = options.eventMargin,\n            top = options.axisOnTop ?\n                options.eventMarginAxis + eventMargin/2 :\n                size.contentHeight - options.eventMarginAxis + eventMargin/ 2,\n            axisHeight = size.axis.height;\n\n        for (i = 0, iMax = groups.length; i < iMax; i++) {\n            group = groups[i];\n            if (options.axisOnTop) {\n                group.top = top + axisHeight;\n                group.labelTop = top + axisHeight + (group.height - group.labelHeight) / 2;\n                group.lineTop = top + axisHeight + group.height + eventMargin/2;\n                top += group.height + eventMargin;\n            }\n            else {\n                top -= group.height + eventMargin;\n                group.top = top;\n                group.labelTop = top + (group.height - group.labelHeight) / 2;\n                group.lineTop = top - eventMargin/2;\n            }\n        }\n\n        // calculate top position of the visible items\n        for (i = 0, iMax = renderedItems.length; i < iMax; i++) {\n            item = renderedItems[i];\n            group = item.group;\n\n            if (group) {\n                item.top = group.top;\n            }\n        }\n\n        resized = true;\n    }\n\n    if (actualHeight < options.minHeight) {\n        actualHeight = options.minHeight;\n    }\n    resized = resized || (actualHeight != size.actualHeight);\n    size.actualHeight = actualHeight;\n\n    return resized;\n};\n\n/**\n * This method clears the (internal) array this.items in a safe way: neatly\n * cleaning up the DOM, and accompanying arrays this.renderedItems and\n * the created clusters.\n */\nlinks.Timeline.prototype.clearItems = function() {\n    // add all visible items to the list to be hidden\n    var hideItems = this.renderQueue.hide;\n    this.renderedItems.forEach(function (item) {\n        hideItems.push(item);\n    });\n\n    // clear the cluster generator\n    this.clusterGenerator.clear();\n\n    // actually clear the items\n    this.items = [];\n};\n\n/**\n * Repaint all items\n * @return {boolean} needsReflow   Returns true if the DOM is changed such that\n *                                 a reflow is needed.\n */\nlinks.Timeline.prototype.repaintItems = function() {\n    var i, iMax, item, index;\n\n    var needsReflow = false,\n        dom = this.dom,\n        size = this.size,\n        timeline = this,\n        renderedItems = this.renderedItems;\n\n    if (!dom.items) {\n        dom.items = {};\n    }\n\n    // draw the frame containing the items\n    var frame = dom.items.frame;\n    if (!frame) {\n        frame = document.createElement(\"DIV\");\n        frame.style.position = \"relative\";\n        dom.content.appendChild(frame);\n        dom.items.frame = frame;\n    }\n\n    frame.style.left = \"0px\";\n    frame.style.top = size.items.top + \"px\";\n    frame.style.height = \"0px\";\n\n    // Take frame offline (for faster manipulation of the DOM)\n    dom.content.removeChild(frame);\n\n    // process the render queue with changes\n    var queue = this.renderQueue;\n    var newImageUrls = [];\n    needsReflow = needsReflow ||\n        (queue.show.length > 0) ||\n        (queue.update.length > 0) ||\n        (queue.hide.length > 0);   // TODO: reflow needed on hide of items?\n\n    while (item = queue.show.shift()) {\n        item.showDOM(frame);\n        item.getImageUrls(newImageUrls);\n        renderedItems.push(item);\n    }\n    while (item = queue.update.shift()) {\n        item.updateDOM(frame);\n        item.getImageUrls(newImageUrls);\n        index = this.renderedItems.indexOf(item);\n        if (index == -1) {\n            renderedItems.push(item);\n        }\n    }\n    while (item = queue.hide.shift()) {\n        item.hideDOM(frame);\n        index = this.renderedItems.indexOf(item);\n        if (index != -1) {\n            renderedItems.splice(index, 1);\n        }\n    }\n\n    // reposition all visible items\n    renderedItems.forEach(function (item) {\n        item.updatePosition(timeline);\n    });\n\n    // redraw the delete button and dragareas of the selected item (if any)\n    this.repaintDeleteButton();\n    this.repaintDragAreas();\n\n    // put frame online again\n    dom.content.appendChild(frame);\n\n    if (newImageUrls.length) {\n        // retrieve all image sources from the items, and set a callback once\n        // all images are retrieved\n        var callback = function () {\n            timeline.render();\n        };\n        var sendCallbackWhenAlreadyLoaded = false;\n        links.imageloader.loadAll(newImageUrls, callback, sendCallbackWhenAlreadyLoaded);\n    }\n\n    return needsReflow;\n};\n\n/**\n * Reflow the size of the groups\n * @return {boolean} resized    Returns true if any of the frame elements\n *                              have been resized.\n */\nlinks.Timeline.prototype.reflowGroups = function() {\n    var resized = false,\n        options = this.options,\n        size = this.size,\n        dom = this.dom;\n\n    // calculate the groups width and height\n    // TODO: only update when data is changed! -> use an updateSeq\n    var groupsWidth = 0;\n\n    // loop through all groups to get the labels width and height\n    var groups = this.groups;\n    var labels = this.dom.groups ? this.dom.groups.labels : [];\n    for (var i = 0, iMax = groups.length; i < iMax; i++) {\n        var group = groups[i];\n        var label = labels[i];\n        group.labelWidth  = label ? label.clientWidth : 0;\n        group.labelHeight = label ? label.clientHeight : 0;\n        group.width = group.labelWidth;  // TODO: group.width is redundant with labelWidth\n\n        groupsWidth = Math.max(groupsWidth, group.width);\n    }\n\n    // limit groupsWidth to the groups width in the options\n    if (options.groupsWidth !== undefined) {\n        groupsWidth = dom.groups.frame ? dom.groups.frame.clientWidth : 0;\n    }\n\n    // compensate for the border width. TODO: calculate the real border width\n    groupsWidth += 1;\n\n    var groupsLeft = options.groupsOnRight ? size.frameWidth - groupsWidth : 0;\n    resized = resized || (size.groupsWidth !== groupsWidth);\n    resized = resized || (size.groupsLeft !== groupsLeft);\n    size.groupsWidth = groupsWidth;\n    size.groupsLeft = groupsLeft;\n\n    return resized;\n};\n\n/**\n * Redraw the group labels\n */\nlinks.Timeline.prototype.repaintGroups = function() {\n    var dom = this.dom,\n        timeline = this,\n        options = this.options,\n        size = this.size,\n        groups = this.groups;\n\n    if (dom.groups === undefined) {\n        dom.groups = {};\n    }\n\n    var labels = dom.groups.labels;\n    if (!labels) {\n        labels = [];\n        dom.groups.labels = labels;\n    }\n    var labelLines = dom.groups.labelLines;\n    if (!labelLines) {\n        labelLines = [];\n        dom.groups.labelLines = labelLines;\n    }\n    var itemLines = dom.groups.itemLines;\n    if (!itemLines) {\n        itemLines = [];\n        dom.groups.itemLines = itemLines;\n    }\n\n    // create the frame for holding the groups\n    var frame = dom.groups.frame;\n    if (!frame) {\n        frame =  document.createElement(\"DIV\");\n        frame.className = \"timeline-groups-axis\";\n        frame.style.position = \"absolute\";\n        frame.style.overflow = \"hidden\";\n        frame.style.top = \"0px\";\n        frame.style.height = \"100%\";\n\n        dom.frame.appendChild(frame);\n        dom.groups.frame = frame;\n    }\n\n    frame.style.left = size.groupsLeft + \"px\";\n    frame.style.width = (options.groupsWidth !== undefined) ?\n        options.groupsWidth :\n        size.groupsWidth + \"px\";\n\n    // hide groups axis when there are no groups\n    if (groups.length == 0) {\n        frame.style.display = 'none';\n    }\n    else {\n        frame.style.display = '';\n    }\n\n    // TODO: only create/update groups when data is changed.\n\n    // create the items\n    var current = labels.length,\n        needed = groups.length;\n\n    // overwrite existing group labels\n    for (var i = 0, iMax = Math.min(current, needed); i < iMax; i++) {\n        var group = groups[i];\n        var label = labels[i];\n        label.innerHTML = this.getGroupName(group);\n        label.style.display = '';\n    }\n\n    // append new items when needed\n    for (var i = current; i < needed; i++) {\n        var group = groups[i];\n\n        // create text label\n        var label = document.createElement(\"DIV\");\n        label.className = \"timeline-groups-text\";\n        label.style.position = \"absolute\";\n        if (options.groupsWidth === undefined) {\n            label.style.whiteSpace = \"nowrap\";\n        }\n        label.innerHTML = this.getGroupName(group);\n        frame.appendChild(label);\n        labels[i] = label;\n\n        // create the grid line between the group labels\n        var labelLine = document.createElement(\"DIV\");\n        labelLine.className = \"timeline-axis-grid timeline-axis-grid-minor\";\n        labelLine.style.position = \"absolute\";\n        labelLine.style.left = \"0px\";\n        labelLine.style.width = \"100%\";\n        labelLine.style.height = \"0px\";\n        labelLine.style.borderTopStyle = \"solid\";\n        frame.appendChild(labelLine);\n        labelLines[i] = labelLine;\n\n        // create the grid line between the items\n        var itemLine = document.createElement(\"DIV\");\n        itemLine.className = \"timeline-axis-grid timeline-axis-grid-minor\";\n        itemLine.style.position = \"absolute\";\n        itemLine.style.left = \"0px\";\n        itemLine.style.width = \"100%\";\n        itemLine.style.height = \"0px\";\n        itemLine.style.borderTopStyle = \"solid\";\n        dom.content.insertBefore(itemLine, dom.content.firstChild);\n        itemLines[i] = itemLine;\n    }\n\n    // remove redundant items from the DOM when needed\n    for (var i = needed; i < current; i++) {\n        var label = labels[i],\n            labelLine = labelLines[i],\n            itemLine = itemLines[i];\n\n        frame.removeChild(label);\n        frame.removeChild(labelLine);\n        dom.content.removeChild(itemLine);\n    }\n    labels.splice(needed, current - needed);\n    labelLines.splice(needed, current - needed);\n    itemLines.splice(needed, current - needed);\n    \n    links.Timeline.addClassName(frame, options.groupsOnRight ? 'timeline-groups-axis-onright' : 'timeline-groups-axis-onleft');\n\n    // position the groups\n    for (var i = 0, iMax = groups.length; i < iMax; i++) {\n        var group = groups[i],\n            label = labels[i],\n            labelLine = labelLines[i],\n            itemLine = itemLines[i];\n\n        label.style.top = group.labelTop + \"px\";\n        labelLine.style.top = group.lineTop + \"px\";\n        itemLine.style.top = group.lineTop + \"px\";\n        itemLine.style.width = size.contentWidth + \"px\";\n    }\n\n    if (!dom.groups.background) {\n        // create the axis grid line background\n        var background = document.createElement(\"DIV\");\n        background.className = \"timeline-axis\";\n        background.style.position = \"absolute\";\n        background.style.left = \"0px\";\n        background.style.width = \"100%\";\n        background.style.border = \"none\";\n\n        frame.appendChild(background);\n        dom.groups.background = background;\n    }\n    dom.groups.background.style.top = size.axis.top + 'px';\n    dom.groups.background.style.height = size.axis.height + 'px';\n\n    if (!dom.groups.line) {\n        // create the axis grid line\n        var line = document.createElement(\"DIV\");\n        line.className = \"timeline-axis\";\n        line.style.position = \"absolute\";\n        line.style.left = \"0px\";\n        line.style.width = \"100%\";\n        line.style.height = \"0px\";\n\n        frame.appendChild(line);\n        dom.groups.line = line;\n    }\n    dom.groups.line.style.top = size.axis.line + 'px';\n\n    // create a callback when there are images which are not yet loaded\n    // TODO: more efficiently load images in the groups\n    if (dom.groups.frame && groups.length) {\n        var imageUrls = [];\n        links.imageloader.filterImageUrls(dom.groups.frame, imageUrls);\n        if (imageUrls.length) {\n            // retrieve all image sources from the items, and set a callback once\n            // all images are retrieved\n            var callback = function () {\n                timeline.render();\n            };\n            var sendCallbackWhenAlreadyLoaded = false;\n            links.imageloader.loadAll(imageUrls, callback, sendCallbackWhenAlreadyLoaded);\n        }\n    }\n};\n\n\n/**\n * Redraw the current time bar\n */\nlinks.Timeline.prototype.repaintCurrentTime = function() {\n    var options = this.options,\n        dom = this.dom,\n        size = this.size;\n\n    if (!options.showCurrentTime) {\n        if (dom.currentTime) {\n            dom.contentTimelines.removeChild(dom.currentTime);\n            delete dom.currentTime;\n        }\n\n        return;\n    }\n\n    if (!dom.currentTime) {\n        // create the current time bar\n        var currentTime = document.createElement(\"DIV\");\n        currentTime.className = \"timeline-currenttime\";\n        currentTime.style.position = \"absolute\";\n        currentTime.style.top = \"0px\";\n        currentTime.style.height = \"100%\";\n\n        dom.contentTimelines.appendChild(currentTime);\n        dom.currentTime = currentTime;\n    }\n\n    var now = new Date();\n    var nowOffset = new Date(now.valueOf() + this.clientTimeOffset);\n    var x = this.timeToScreen(nowOffset);\n\n    var visible = (x > -size.contentWidth && x < 2 * size.contentWidth);\n    dom.currentTime.style.display = visible ? '' : 'none';\n    dom.currentTime.style.left = x + \"px\";\n    dom.currentTime.title = \"Current time: \" + nowOffset;\n\n    // start a timer to adjust for the new time\n    if (this.currentTimeTimer != undefined) {\n        clearTimeout(this.currentTimeTimer);\n        delete this.currentTimeTimer;\n    }\n    var timeline = this;\n    var onTimeout = function() {\n        timeline.repaintCurrentTime();\n    };\n    // the time equal to the width of one pixel, divided by 2 for more smoothness\n    var interval = 1 / this.conversion.factor / 2;\n    if (interval < 30) interval = 30;\n    this.currentTimeTimer = setTimeout(onTimeout, interval);\n};\n\n/**\n * Redraw the custom time bar\n */\nlinks.Timeline.prototype.repaintCustomTime = function() {\n    var options = this.options,\n        dom = this.dom,\n        size = this.size;\n\n    if (!options.showCustomTime) {\n        if (dom.customTime) {\n            dom.contentTimelines.removeChild(dom.customTime);\n            delete dom.customTime;\n        }\n\n        return;\n    }\n\n    if (!dom.customTime) {\n        var customTime = document.createElement(\"DIV\");\n        customTime.className = \"timeline-customtime\";\n        customTime.style.position = \"absolute\";\n        customTime.style.top = \"0px\";\n        customTime.style.height = \"100%\";\n\n        var drag = document.createElement(\"DIV\");\n        drag.style.position = \"relative\";\n        drag.style.top = \"0px\";\n        drag.style.left = \"-10px\";\n        drag.style.height = \"100%\";\n        drag.style.width = \"20px\";\n        customTime.appendChild(drag);\n\n        dom.contentTimelines.appendChild(customTime);\n        dom.customTime = customTime;\n\n        // initialize parameter\n        this.customTime = new Date();\n    }\n\n    var x = this.timeToScreen(this.customTime),\n        visible = (x > -size.contentWidth && x < 2 * size.contentWidth);\n    dom.customTime.style.display = visible ? '' : 'none';\n    dom.customTime.style.left = x + \"px\";\n    dom.customTime.title = \"Time: \" + this.customTime;\n};\n\n\n/**\n * Redraw the delete button, on the top right of the currently selected item\n * if there is no item selected, the button is hidden.\n */\nlinks.Timeline.prototype.repaintDeleteButton = function () {\n    var timeline = this,\n        dom = this.dom,\n        frame = dom.items.frame;\n\n    var deleteButton = dom.items.deleteButton;\n    if (!deleteButton) {\n        // create a delete button\n        deleteButton = document.createElement(\"DIV\");\n        deleteButton.className = \"timeline-navigation-delete\";\n        deleteButton.style.position = \"absolute\";\n\n        frame.appendChild(deleteButton);\n        dom.items.deleteButton = deleteButton;\n    }\n\n    var index = this.selection ? this.selection.index : -1,\n        item = this.selection ? this.items[index] : undefined;\n    if (item && item.rendered && this.isEditable(item)) {\n        var right = item.getRight(this),\n            top = item.top;\n\n        deleteButton.style.left = right + 'px';\n        deleteButton.style.top = top + 'px';\n        deleteButton.style.display = '';\n        frame.removeChild(deleteButton);\n        frame.appendChild(deleteButton);\n    }\n    else {\n        deleteButton.style.display = 'none';\n    }\n};\n\n\n/**\n * Redraw the drag areas. When an item (ranges only) is selected,\n * it gets a drag area on the left and right side, to change its width\n */\nlinks.Timeline.prototype.repaintDragAreas = function () {\n    var timeline = this,\n        options = this.options,\n        dom = this.dom,\n        frame = this.dom.items.frame;\n\n    // create left drag area\n    var dragLeft = dom.items.dragLeft;\n    if (!dragLeft) {\n        dragLeft = document.createElement(\"DIV\");\n        dragLeft.className=\"timeline-event-range-drag-left\";\n        dragLeft.style.position = \"absolute\";\n\n        frame.appendChild(dragLeft);\n        dom.items.dragLeft = dragLeft;\n    }\n\n    // create right drag area\n    var dragRight = dom.items.dragRight;\n    if (!dragRight) {\n        dragRight = document.createElement(\"DIV\");\n        dragRight.className=\"timeline-event-range-drag-right\";\n        dragRight.style.position = \"absolute\";\n\n        frame.appendChild(dragRight);\n        dom.items.dragRight = dragRight;\n    }\n\n    // reposition left and right drag area\n    var index = this.selection ? this.selection.index : -1,\n        item = this.selection ? this.items[index] : undefined;\n    if (item && item.rendered && this.isEditable(item) &&\n        (item instanceof links.Timeline.ItemRange)) {\n        var left = this.timeToScreen(item.start),\n            right = this.timeToScreen(item.end),\n            top = item.top,\n            height = item.height;\n\n        dragLeft.style.left = left + 'px';\n        dragLeft.style.top = top + 'px';\n        dragLeft.style.width = options.dragAreaWidth + \"px\";\n        dragLeft.style.height = height + 'px';\n        dragLeft.style.display = '';\n        frame.removeChild(dragLeft);\n        frame.appendChild(dragLeft);\n\n        dragRight.style.left = (right - options.dragAreaWidth) + 'px';\n        dragRight.style.top = top + 'px';\n        dragRight.style.width = options.dragAreaWidth + \"px\";\n        dragRight.style.height = height + 'px';\n        dragRight.style.display = '';\n        frame.removeChild(dragRight);\n        frame.appendChild(dragRight);\n    }\n    else {\n        dragLeft.style.display = 'none';\n        dragRight.style.display = 'none';\n    }\n};\n\n/**\n * Create the navigation buttons for zooming and moving\n */\nlinks.Timeline.prototype.repaintNavigation = function () {\n    var timeline = this,\n        options = this.options,\n        dom = this.dom,\n        frame = dom.frame,\n        navBar = dom.navBar;\n\n    if (!navBar) {\n        var showButtonNew = options.showButtonNew && options.editable;\n        var showNavigation = options.showNavigation && (options.zoomable || options.moveable);\n        if (showNavigation || showButtonNew) {\n            // create a navigation bar containing the navigation buttons\n            navBar = document.createElement(\"DIV\");\n            navBar.style.position = \"absolute\";\n            navBar.className = \"timeline-navigation ui-widget ui-state-highlight ui-corner-all\";\n            if (options.groupsOnRight) {\n                navBar.style.left = '10px';\n            }\n            else {\n                navBar.style.right = '10px';\n            }\n            if (options.axisOnTop) {\n                navBar.style.bottom = '10px';\n            }\n            else {\n                navBar.style.top = '10px';\n            }\n            dom.navBar = navBar;\n            frame.appendChild(navBar);\n        }\n\n        if (showButtonNew) {\n            // create a new in button\n            navBar.addButton = document.createElement(\"DIV\");\n            navBar.addButton.className = \"timeline-navigation-new\";\n            navBar.addButton.title = options.CREATE_NEW_EVENT;\n            var addIconSpan = document.createElement(\"SPAN\");\n            addIconSpan.className = \"ui-icon ui-icon-circle-plus\";            \n            navBar.addButton.appendChild(addIconSpan);\n            \n            var onAdd = function(event) {\n                links.Timeline.preventDefault(event);\n                links.Timeline.stopPropagation(event);\n\n                // create a new event at the center of the frame\n                var w = timeline.size.contentWidth;\n                var x = w / 2;\n                var xstart = timeline.screenToTime(x - w / 10); // subtract 10% of timeline width\n                var xend = timeline.screenToTime(x + w / 10);   // add 10% of timeline width\n                if (options.snapEvents) {\n                    timeline.step.snap(xstart);\n                    timeline.step.snap(xend);\n                }\n\n                var content = options.NEW;\n                var group = timeline.groups.length ? timeline.groups[0].content : undefined;\n                var preventRender = true;\n                timeline.addItem({\n                    'start': xstart,\n                    'end': xend,\n                    'content': content,\n                    'group': group\n                }, preventRender);\n                var index = (timeline.items.length - 1);\n                timeline.selectItem(index);\n\n                timeline.applyAdd = true;\n\n                // fire an add event.\n                // Note that the change can be canceled from within an event listener if\n                // this listener calls the method cancelAdd().\n                timeline.trigger('add');\n\n                if (timeline.applyAdd) {\n                    // render and select the item\n                    timeline.render({animate: false});\n                    timeline.selectItem(index);\n                }\n                else {\n                    // undo an add\n                    timeline.deleteItem(index);\n                }\n            };\n            links.Timeline.addEventListener(navBar.addButton, \"mousedown\", onAdd);\n            navBar.appendChild(navBar.addButton);\n        }\n\n        if (showButtonNew && showNavigation) {\n            // create a separator line\n            links.Timeline.addClassName(navBar.addButton, 'timeline-navigation-new-line');\n        }\n\n        if (showNavigation) {\n            if (options.zoomable) {\n                // create a zoom in button\n                navBar.zoomInButton = document.createElement(\"DIV\");\n                navBar.zoomInButton.className = \"timeline-navigation-zoom-in\";\n                navBar.zoomInButton.title = this.options.ZOOM_IN;\n                var ziIconSpan = document.createElement(\"SPAN\");\n                ziIconSpan.className = \"ui-icon ui-icon-circle-zoomin\";\n                navBar.zoomInButton.appendChild(ziIconSpan);\n                \n                var onZoomIn = function(event) {\n                    links.Timeline.preventDefault(event);\n                    links.Timeline.stopPropagation(event);\n                    timeline.zoom(0.4);\n                    timeline.trigger(\"rangechange\");\n                    timeline.trigger(\"rangechanged\");\n                };\n                links.Timeline.addEventListener(navBar.zoomInButton, \"mousedown\", onZoomIn);\n                navBar.appendChild(navBar.zoomInButton);\n\n                // create a zoom out button\n                navBar.zoomOutButton = document.createElement(\"DIV\");\n                navBar.zoomOutButton.className = \"timeline-navigation-zoom-out\";\n                navBar.zoomOutButton.title = this.options.ZOOM_OUT;\n                var zoIconSpan = document.createElement(\"SPAN\");\n                zoIconSpan.className = \"ui-icon ui-icon-circle-zoomout\";\n                navBar.zoomOutButton.appendChild(zoIconSpan);\n                \n                var onZoomOut = function(event) {\n                    links.Timeline.preventDefault(event);\n                    links.Timeline.stopPropagation(event);\n                    timeline.zoom(-0.4);\n                    timeline.trigger(\"rangechange\");\n                    timeline.trigger(\"rangechanged\");\n                };\n                links.Timeline.addEventListener(navBar.zoomOutButton, \"mousedown\", onZoomOut);\n                navBar.appendChild(navBar.zoomOutButton);\n            }\n\n            if (options.moveable) {\n                // create a move left button\n                navBar.moveLeftButton = document.createElement(\"DIV\");\n                navBar.moveLeftButton.className = \"timeline-navigation-move-left\";\n                navBar.moveLeftButton.title = this.options.MOVE_LEFT;\n                var mlIconSpan = document.createElement(\"SPAN\");\n                mlIconSpan.className = \"ui-icon ui-icon-circle-arrow-w\";\n                navBar.moveLeftButton.appendChild(mlIconSpan);\n                \n                var onMoveLeft = function(event) {\n                    links.Timeline.preventDefault(event);\n                    links.Timeline.stopPropagation(event);\n                    timeline.move(-0.2);\n                    timeline.trigger(\"rangechange\");\n                    timeline.trigger(\"rangechanged\");\n                };\n                links.Timeline.addEventListener(navBar.moveLeftButton, \"mousedown\", onMoveLeft);\n                navBar.appendChild(navBar.moveLeftButton);\n\n                // create a move right button\n                navBar.moveRightButton = document.createElement(\"DIV\");\n                navBar.moveRightButton.className = \"timeline-navigation-move-right\";\n                navBar.moveRightButton.title = this.options.MOVE_RIGHT;\n                var mrIconSpan = document.createElement(\"SPAN\");\n                mrIconSpan.className = \"ui-icon ui-icon-circle-arrow-e\";\n                navBar.moveRightButton.appendChild(mrIconSpan);\n                \n                var onMoveRight = function(event) {\n                    links.Timeline.preventDefault(event);\n                    links.Timeline.stopPropagation(event);\n                    timeline.move(0.2);\n                    timeline.trigger(\"rangechange\");\n                    timeline.trigger(\"rangechanged\");\n                };\n                links.Timeline.addEventListener(navBar.moveRightButton, \"mousedown\", onMoveRight);\n                navBar.appendChild(navBar.moveRightButton);\n            }\n        }\n    }\n};\n\n\n/**\n * Set current time. This function can be used to set the time in the client\n * timeline equal with the time on a server.\n * @param {Date} time\n */\nlinks.Timeline.prototype.setCurrentTime = function(time) {\n    var now = new Date();\n    this.clientTimeOffset = (time.valueOf() - now.valueOf());\n\n    this.repaintCurrentTime();\n};\n\n/**\n * Get current time. The time can have an offset from the real time, when\n * the current time has been changed via the method setCurrentTime.\n * @return {Date} time\n */\nlinks.Timeline.prototype.getCurrentTime = function() {\n    var now = new Date();\n    return new Date(now.valueOf() + this.clientTimeOffset);\n};\n\n\n/**\n * Set custom time.\n * The custom time bar can be used to display events in past or future.\n * @param {Date} time\n */\nlinks.Timeline.prototype.setCustomTime = function(time) {\n    this.customTime = new Date(time.valueOf());\n    this.repaintCustomTime();\n};\n\n/**\n * Retrieve the current custom time.\n * @return {Date} customTime\n */\nlinks.Timeline.prototype.getCustomTime = function() {\n    return new Date(this.customTime.valueOf());\n};\n\n/**\n * Set a custom scale. Autoscaling will be disabled.\n * For example setScale(SCALE.MINUTES, 5) will result\n * in minor steps of 5 minutes, and major steps of an hour.\n *\n * @param {links.Timeline.StepDate.SCALE} scale\n *                               A scale. Choose from SCALE.MILLISECOND,\n *                               SCALE.SECOND, SCALE.MINUTE, SCALE.HOUR,\n *                               SCALE.WEEKDAY, SCALE.DAY, SCALE.MONTH,\n *                               SCALE.YEAR.\n * @param {int}        step   A step size, by default 1. Choose for\n *                               example 1, 2, 5, or 10.\n */\nlinks.Timeline.prototype.setScale = function(scale, step) {\n    this.step.setScale(scale, step);\n    this.render(); // TODO: optimize: only reflow/repaint axis\n};\n\n/**\n * Enable or disable autoscaling\n * @param {boolean} enable  If true or not defined, autoscaling is enabled.\n *                          If false, autoscaling is disabled.\n */\nlinks.Timeline.prototype.setAutoScale = function(enable) {\n    this.step.setAutoScale(enable);\n    this.render(); // TODO: optimize: only reflow/repaint axis\n};\n\n/**\n * Redraw the timeline\n * Reloads the (linked) data table and redraws the timeline when resized.\n * See also the method checkResize\n */\nlinks.Timeline.prototype.redraw = function() {\n    this.setData(this.data);\n};\n\n\n/**\n * Check if the timeline is resized, and if so, redraw the timeline.\n * Useful when the webpage is resized.\n */\nlinks.Timeline.prototype.checkResize = function() {\n    // TODO: re-implement the method checkResize, or better, make it redundant as this.render will be smarter\n    this.render();\n};\n\n/**\n * Check whether a given item is editable\n * @param {links.Timeline.Item} item\n * @return {boolean} editable\n */\nlinks.Timeline.prototype.isEditable = function (item) {\n    if (item) {\n        if (item.editable != undefined) {\n            return item.editable;\n        }\n        else {\n            return this.options.editable;\n        }\n    }\n    return false;\n};\n\n/**\n * Calculate the factor and offset to convert a position on screen to the\n * corresponding date and vice versa.\n * After the method calcConversionFactor is executed once, the methods screenToTime and\n * timeToScreen can be used.\n */\nlinks.Timeline.prototype.recalcConversion = function() {\n    this.conversion.offset = this.start.valueOf();\n    this.conversion.factor = this.size.contentWidth /\n        (this.end.valueOf() - this.start.valueOf());\n};\n\n\n/**\n * Convert a position on screen (pixels) to a datetime\n * Before this method can be used, the method calcConversionFactor must be\n * executed once.\n * @param {int}     x    Position on the screen in pixels\n * @return {Date}   time The datetime the corresponds with given position x\n */\nlinks.Timeline.prototype.screenToTime = function(x) {\n    var conversion = this.conversion;\n    return new Date(x / conversion.factor + conversion.offset);\n};\n\n/**\n * Convert a datetime (Date object) into a position on the screen\n * Before this method can be used, the method calcConversionFactor must be\n * executed once.\n * @param {Date}   time A date\n * @return {int}   x    The position on the screen in pixels which corresponds\n *                      with the given date.\n */\nlinks.Timeline.prototype.timeToScreen = function(time) {\n    var conversion = this.conversion;\n    return (time.valueOf() - conversion.offset) * conversion.factor;\n};\n\n\n\n/**\n * Event handler for touchstart event on mobile devices\n */\nlinks.Timeline.prototype.onTouchStart = function(event) {\n    var params = this.eventParams,\n        me = this;\n\n    if (params.touchDown) {\n        // if already moving, return\n        return;\n    }\n\n    params.touchDown = true;\n    params.zoomed = false;\n\n    this.onMouseDown(event);\n\n    if (!params.onTouchMove) {\n        params.onTouchMove = function (event) {me.onTouchMove(event);};\n        links.Timeline.addEventListener(document, \"touchmove\", params.onTouchMove);\n    }\n    if (!params.onTouchEnd) {\n        params.onTouchEnd  = function (event) {me.onTouchEnd(event);};\n        links.Timeline.addEventListener(document, \"touchend\",  params.onTouchEnd);\n    }\n\n    /* TODO\n     // check for double tap event\n     var delta = 500; // ms\n     var doubleTapStart = (new Date()).valueOf();\n     var target = links.Timeline.getTarget(event);\n     var doubleTapItem = this.getItemIndex(target);\n     if (params.doubleTapStart &&\n     (doubleTapStart - params.doubleTapStart) < delta &&\n     doubleTapItem == params.doubleTapItem) {\n     delete params.doubleTapStart;\n     delete params.doubleTapItem;\n     me.onDblClick(event);\n     params.touchDown = false;\n     }\n     params.doubleTapStart = doubleTapStart;\n     params.doubleTapItem = doubleTapItem;\n     */\n    // store timing for double taps\n    var target = links.Timeline.getTarget(event);\n    var item = this.getItemIndex(target);\n    params.doubleTapStartPrev = params.doubleTapStart;\n    params.doubleTapStart = (new Date()).valueOf();\n    params.doubleTapItemPrev = params.doubleTapItem;\n    params.doubleTapItem = item;\n\n    links.Timeline.preventDefault(event);\n};\n\n/**\n * Event handler for touchmove event on mobile devices\n */\nlinks.Timeline.prototype.onTouchMove = function(event) {\n    var params = this.eventParams;\n\n    if (event.scale && event.scale !== 1) {\n        params.zoomed = true;\n    }\n\n    if (!params.zoomed) {\n        // move \n        this.onMouseMove(event);\n    }\n    else {\n        if (this.options.zoomable) {\n            // pinch\n            // TODO: pinch only supported on iPhone/iPad. Create something manually for Android?\n            params.zoomed = true;\n\n            var scale = event.scale,\n                oldWidth = (params.end.valueOf() - params.start.valueOf()),\n                newWidth = oldWidth / scale,\n                diff = newWidth - oldWidth,\n                start = new Date(parseInt(params.start.valueOf() - diff/2)),\n                end = new Date(parseInt(params.end.valueOf() + diff/2));\n\n            // TODO: determine zoom-around-date from touch positions?\n\n            this.setVisibleChartRange(start, end);\n            this.trigger(\"rangechange\");\n        }\n    }\n\n    links.Timeline.preventDefault(event);\n};\n\n/**\n * Event handler for touchend event on mobile devices\n */\nlinks.Timeline.prototype.onTouchEnd = function(event) {\n    var params = this.eventParams;\n    var me = this;\n    params.touchDown = false;\n\n    if (params.zoomed) {\n        this.trigger(\"rangechanged\");\n    }\n\n    if (params.onTouchMove) {\n        links.Timeline.removeEventListener(document, \"touchmove\", params.onTouchMove);\n        delete params.onTouchMove;\n\n    }\n    if (params.onTouchEnd) {\n        links.Timeline.removeEventListener(document, \"touchend\",  params.onTouchEnd);\n        delete params.onTouchEnd;\n    }\n\n    this.onMouseUp(event);\n\n    // check for double tap event\n    var delta = 500; // ms\n    var doubleTapEnd = (new Date()).valueOf();\n    var target = links.Timeline.getTarget(event);\n    var doubleTapItem = this.getItemIndex(target);\n    if (params.doubleTapStartPrev &&\n        (doubleTapEnd - params.doubleTapStartPrev) < delta &&\n        params.doubleTapItem == params.doubleTapItemPrev) {\n        params.touchDown = true;\n        me.onDblClick(event);\n        params.touchDown = false;\n    }\n\n    links.Timeline.preventDefault(event);\n};\n\n\n/**\n * Start a moving operation inside the provided parent element\n * @param {Event} event       The event that occurred (required for\n *                             retrieving the  mouse position)\n */\nlinks.Timeline.prototype.onMouseDown = function(event) {\n    event = event || window.event;\n\n    var params = this.eventParams,\n        options = this.options,\n        dom = this.dom;\n\n    // only react on left mouse button down\n    var leftButtonDown = event.which ? (event.which == 1) : (event.button == 1);\n    if (!leftButtonDown && !params.touchDown) {\n        return;\n    }\n\n    // get mouse position\n    params.mouseX = links.Timeline.getPageX(event);\n    params.mouseY = links.Timeline.getPageY(event);\n    params.frameLeft = links.Timeline.getAbsoluteLeft(this.dom.content);\n    params.frameTop = links.Timeline.getAbsoluteTop(this.dom.content);\n    params.previousLeft = 0;\n    params.previousOffset = 0;\n\n    params.moved = false;\n    params.start = new Date(this.start.valueOf());\n    params.end = new Date(this.end.valueOf());\n\n    params.target = links.Timeline.getTarget(event);\n    var dragLeft = (dom.items && dom.items.dragLeft) ? dom.items.dragLeft : undefined;\n    var dragRight = (dom.items && dom.items.dragRight) ? dom.items.dragRight : undefined;\n    params.itemDragLeft = (params.target === dragLeft);\n    params.itemDragRight = (params.target === dragRight);\n\n    if (params.itemDragLeft || params.itemDragRight) {\n        params.itemIndex = this.selection ? this.selection.index : undefined;\n    }\n    else {\n        params.itemIndex = this.getItemIndex(params.target);\n    }\n\n    params.customTime = (params.target === dom.customTime ||\n        params.target.parentNode === dom.customTime) ?\n        this.customTime :\n        undefined;\n\n    params.addItem = (options.editable && event.ctrlKey);\n    if (params.addItem) {\n        // create a new event at the current mouse position\n        var x = params.mouseX - params.frameLeft;\n        var y = params.mouseY - params.frameTop;\n\n        var xstart = this.screenToTime(x);\n        if (options.snapEvents) {\n            this.step.snap(xstart);\n        }\n        var xend = new Date(xstart.valueOf());\n        var content = options.NEW;\n        var group = this.getGroupFromHeight(y);\n        this.addItem({\n            'start': xstart,\n            'end': xend,\n            'content': content,\n            'group': this.getGroupName(group)\n        });\n        params.itemIndex = (this.items.length - 1);\n        this.selectItem(params.itemIndex);\n        params.itemDragRight = true;\n    }\n\n    var item = this.items[params.itemIndex];\n    var isSelected = this.isSelected(params.itemIndex);\n    params.editItem = isSelected && this.isEditable(item);\n    if (params.editItem) {\n        params.itemStart = item.start;\n        params.itemEnd = item.end;\n        params.itemGroup = item.group;\n        params.itemLeft = item.start ? this.timeToScreen(item.start) : undefined;\n        params.itemRight = item.end ? this.timeToScreen(item.end) : undefined;\n    }\n    else {\n        this.dom.frame.style.cursor = 'move';\n    }\n    if (!params.touchDown) {\n        // add event listeners to handle moving the contents\n        // we store the function onmousemove and onmouseup in the timeline, so we can\n        // remove the eventlisteners lateron in the function mouseUp()\n        var me = this;\n        if (!params.onMouseMove) {\n            params.onMouseMove = function (event) {me.onMouseMove(event);};\n            links.Timeline.addEventListener(document, \"mousemove\", params.onMouseMove);\n        }\n        if (!params.onMouseUp) {\n            params.onMouseUp = function (event) {me.onMouseUp(event);};\n            links.Timeline.addEventListener(document, \"mouseup\", params.onMouseUp);\n        }\n\n        links.Timeline.preventDefault(event);\n    }\n};\n\n\n/**\n * Perform moving operating.\n * This function activated from within the funcion links.Timeline.onMouseDown().\n * @param {Event}   event  Well, eehh, the event\n */\nlinks.Timeline.prototype.onMouseMove = function (event) {\n    event = event || window.event;\n\n    var params = this.eventParams,\n        size = this.size,\n        dom = this.dom,\n        options = this.options;\n\n    // calculate change in mouse position\n    var mouseX = links.Timeline.getPageX(event);\n    var mouseY = links.Timeline.getPageY(event);\n\n    if (params.mouseX == undefined) {\n        params.mouseX = mouseX;\n    }\n    if (params.mouseY == undefined) {\n        params.mouseY = mouseY;\n    }\n\n    var diffX = mouseX - params.mouseX;\n    var diffY = mouseY - params.mouseY;\n\n    // if mouse movement is big enough, register it as a \"moved\" event\n    if (Math.abs(diffX) >= 1) {\n        params.moved = true;\n    }\n\n    if (params.customTime) {\n        var x = this.timeToScreen(params.customTime);\n        var xnew = x + diffX;\n        this.customTime = this.screenToTime(xnew);\n        this.repaintCustomTime();\n\n        // fire a timechange event\n        this.trigger('timechange');\n    }\n    else if (params.editItem) {\n        var item = this.items[params.itemIndex],\n            left,\n            right;\n\n        if (params.itemDragLeft) {\n            // move the start of the item\n            left = params.itemLeft + diffX;\n            right = params.itemRight;\n\n            item.start = this.screenToTime(left);\n            if (options.snapEvents) {\n                this.step.snap(item.start);\n                left = this.timeToScreen(item.start);\n            }\n\n            if (left > right) {\n                left = right;\n                item.start = this.screenToTime(left);\n            }\n        }\n        else if (params.itemDragRight) {\n            // move the end of the item\n            left = params.itemLeft;\n            right = params.itemRight + diffX;\n\n            item.end = this.screenToTime(right);\n            if (options.snapEvents) {\n                this.step.snap(item.end);\n                right = this.timeToScreen(item.end);\n            }\n\n            if (right < left) {\n                right = left;\n                item.end = this.screenToTime(right);\n            }\n        }\n        else {\n            // move the item\n            left = params.itemLeft + diffX;\n            item.start = this.screenToTime(left);\n            if (options.snapEvents) {\n                this.step.snap(item.start);\n                left = this.timeToScreen(item.start);\n            }\n\n            if (item.end) {\n                right = left + (params.itemRight - params.itemLeft);\n                item.end = this.screenToTime(right);\n            }\n        }\n\n        item.setPosition(left, right);\n\n        var dragging = params.itemDragLeft || params.itemDragRight;\n        if (this.groups.length && !dragging) {\n            // move item from one group to another when needed\n            var y = mouseY - params.frameTop;\n            var group = this.getGroupFromHeight(y);\n            if (options.groupsChangeable && item.group !== group) {\n                // move item to the other group\n                var index = this.items.indexOf(item);\n                this.changeItem(index, {'group': this.getGroupName(group)});\n            }\n            else {\n                this.repaintDeleteButton();\n                this.repaintDragAreas();\n            }\n        }\n        else {\n            // TODO: does not work well in FF, forces redraw with every mouse move it seems\n            this.render(); // TODO: optimize, only redraw the items?\n            // Note: when animate==true, no redraw is needed here, its done by stackItems animation\n        }\n    }\n    else if (options.moveable) {\n        var interval = (params.end.valueOf() - params.start.valueOf());\n        var diffMillisecs = Math.round((-diffX) / size.contentWidth * interval);\n        var newStart = new Date(params.start.valueOf() + diffMillisecs);\n        var newEnd = new Date(params.end.valueOf() + diffMillisecs);\n        this.applyRange(newStart, newEnd);\n        // if the applied range is moved due to a fixed min or max,\n        // change the diffMillisecs accordingly\n        var appliedDiff = (this.start.valueOf() - newStart.valueOf());\n        if (appliedDiff) {\n            diffMillisecs += appliedDiff;\n        }\n\n        this.recalcConversion();\n\n        // move the items by changing the left position of their frame.\n        // this is much faster than repositioning all elements individually via the \n        // repaintFrame() function (which is done once at mouseup)\n        // note that we round diffX to prevent wrong positioning on millisecond scale\n        var previousLeft = params.previousLeft || 0;\n        var currentLeft = parseFloat(dom.items.frame.style.left) || 0;\n        var previousOffset = params.previousOffset || 0;\n        var frameOffset = previousOffset + (currentLeft - previousLeft);\n        var frameLeft = -diffMillisecs / interval * size.contentWidth + frameOffset;\n\n        dom.items.frame.style.left = (frameLeft) + \"px\";\n\n        // read the left again from DOM (IE8- rounds the value)\n        params.previousOffset = frameOffset;\n        params.previousLeft = parseFloat(dom.items.frame.style.left) || frameLeft;\n\n        this.repaintCurrentTime();\n        this.repaintCustomTime();\n        this.repaintAxis();\n\n        // fire a rangechange event\n        this.trigger('rangechange');\n    }\n\n    links.Timeline.preventDefault(event);\n};\n\n\n/**\n * Stop moving operating.\n * This function activated from within the funcion links.Timeline.onMouseDown().\n * @param {event}  event   The event\n */\nlinks.Timeline.prototype.onMouseUp = function (event) {\n    var params = this.eventParams,\n        options = this.options;\n\n    event = event || window.event;\n\n    this.dom.frame.style.cursor = 'auto';\n\n    // remove event listeners here, important for Safari\n    if (params.onMouseMove) {\n        links.Timeline.removeEventListener(document, \"mousemove\", params.onMouseMove);\n        delete params.onMouseMove;\n    }\n    if (params.onMouseUp) {\n        links.Timeline.removeEventListener(document, \"mouseup\",   params.onMouseUp);\n        delete params.onMouseUp;\n    }\n    //links.Timeline.preventDefault(event);\n\n    if (params.customTime) {\n        // fire a timechanged event\n        this.trigger('timechanged');\n    }\n    else if (params.editItem) {\n        var item = this.items[params.itemIndex];\n\n        if (params.moved || params.addItem) {\n            this.applyChange = true;\n            this.applyAdd = true;\n\n            this.updateData(params.itemIndex, {\n                'start': item.start,\n                'end': item.end\n            });\n\n            // fire an add or change event. \n            // Note that the change can be canceled from within an event listener if \n            // this listener calls the method cancelChange().\n            this.trigger(params.addItem ? 'add' : 'change');\n\n            if (params.addItem) {\n                if (this.applyAdd) {\n                    this.updateData(params.itemIndex, {\n                        'start': item.start,\n                        'end': item.end,\n                        'content': item.content,\n                        'group': this.getGroupName(item.group)\n                    });\n                }\n                else {\n                    // undo an add\n                    this.deleteItem(params.itemIndex);\n                }\n            }\n            else {\n                if (this.applyChange) {\n                    this.updateData(params.itemIndex, {\n                        'start': item.start,\n                        'end': item.end\n                    });\n                }\n                else {\n                    // undo a change\n                    delete this.applyChange;\n                    delete this.applyAdd;\n\n                    var item = this.items[params.itemIndex],\n                        domItem = item.dom;\n\n                    item.start = params.itemStart;\n                    item.end = params.itemEnd;\n                    item.group = params.itemGroup;\n                    // TODO: original group should be restored too\n                    item.setPosition(params.itemLeft, params.itemRight);\n                }\n            }\n\n            // prepare data for clustering, by filtering and sorting by type\n            if (this.options.cluster) {\n                this.clusterGenerator.updateData();\n            }\n\n            this.render();\n        }\n    }\n    else {\n        if (!params.moved && !params.zoomed) {\n            // mouse did not move -> user has selected an item\n\n            if (params.target === this.dom.items.deleteButton) {\n                // delete item\n                if (this.selection) {\n                    this.confirmDeleteItem(this.selection.index);\n                }\n            }\n            else if (options.selectable) {\n                // select/unselect item\n                if (params.itemIndex != undefined) {\n                    if (!this.isSelected(params.itemIndex)) {\n                        this.selectItem(params.itemIndex);\n                        this.trigger('select');\n                    }\n                }\n                else {\n                    if (options.unselectable) {\n                        this.unselectItem();\n                        this.trigger('select');\n                    }\n                }\n            }\n        }\n        else {\n            // timeline is moved\n            // TODO: optimize: no need to reflow and cluster again?\n            this.render();\n\n            if ((params.moved && options.moveable) || (params.zoomed && options.zoomable) ) {\n                // fire a rangechanged event\n                this.trigger('rangechanged');\n            }\n        }\n    }\n};\n\n/**\n * Double click event occurred for an item\n * @param {Event}  event\n */\nlinks.Timeline.prototype.onDblClick = function (event) {\n    var params = this.eventParams,\n        options = this.options,\n        dom = this.dom,\n        size = this.size;\n    event = event || window.event;\n\n    if (params.itemIndex != undefined) {\n        var item = this.items[params.itemIndex];\n        if (item && this.isEditable(item)) {\n            // fire the edit event\n            this.trigger('edit');\n        }\n    }\n    else {\n        if (options.editable) {\n            // create a new item\n\n            // get mouse position\n            params.mouseX = links.Timeline.getPageX(event);\n            params.mouseY = links.Timeline.getPageY(event);\n            var x = params.mouseX - links.Timeline.getAbsoluteLeft(dom.content);\n            var y = params.mouseY - links.Timeline.getAbsoluteTop(dom.content);\n\n            // create a new event at the current mouse position\n            var xstart = this.screenToTime(x);\n            var xend = this.screenToTime(x  + size.frameWidth / 10); // add 10% of timeline width\n            if (options.snapEvents) {\n                this.step.snap(xstart);\n                this.step.snap(xend);\n            }\n\n            var content = options.NEW;\n            var group = this.getGroupFromHeight(y);   // (group may be undefined)\n            var preventRender = true;\n            this.addItem({\n                'start': xstart,\n                'end': xend,\n                'content': content,\n                'group': this.getGroupName(group)\n            }, preventRender);\n            params.itemIndex = (this.items.length - 1);\n            this.selectItem(params.itemIndex);\n\n            this.applyAdd = true;\n\n            // fire an add event.\n            // Note that the change can be canceled from within an event listener if\n            // this listener calls the method cancelAdd().\n            this.trigger('add');\n\n            if (this.applyAdd) {\n                // render and select the item\n                this.render({animate: false});\n                this.selectItem(params.itemIndex);\n            }\n            else {\n                // undo an add\n                this.deleteItem(params.itemIndex);\n            }\n        }\n    }\n\n    links.Timeline.preventDefault(event);\n};\n\n\n/**\n * Event handler for mouse wheel event, used to zoom the timeline\n * Code from http://adomas.org/javascript-mouse-wheel/\n * @param {Event}  event   The event\n */\nlinks.Timeline.prototype.onMouseWheel = function(event) {\n    if (!this.options.zoomable)\n        return;\n\n    if (!event) { /* For IE. */\n        event = window.event;\n    }\n\n    // retrieve delta    \n    var delta = 0;\n    if (event.wheelDelta) { /* IE/Opera. */\n        delta = event.wheelDelta/120;\n    } else if (event.detail) { /* Mozilla case. */\n        // In Mozilla, sign of delta is different than in IE.\n        // Also, delta is multiple of 3.\n        delta = -event.detail/3;\n    }\n\n    // If delta is nonzero, handle it.\n    // Basically, delta is now positive if wheel was scrolled up,\n    // and negative, if wheel was scrolled down.\n    if (delta) {\n        // TODO: on FireFox, the window is not redrawn within repeated scroll-events \n        // -> use a delayed redraw? Make a zoom queue?\n\n        var timeline = this;\n        var zoom = function () {\n            // perform the zoom action. Delta is normally 1 or -1\n            var zoomFactor = delta / 5.0;\n            var frameLeft = links.Timeline.getAbsoluteLeft(timeline.dom.content);\n            var mouseX = links.Timeline.getPageX(event);\n            var zoomAroundDate =\n                (mouseX != undefined && frameLeft != undefined) ?\n                    timeline.screenToTime(mouseX - frameLeft) :\n                    undefined;\n\n            timeline.zoom(zoomFactor, zoomAroundDate);\n\n            // fire a rangechange and a rangechanged event\n            timeline.trigger(\"rangechange\");\n            timeline.trigger(\"rangechanged\");\n        };\n\n        var scroll = function () {\n            // Scroll the timeline\n            timeline.move(delta * -0.2);\n            timeline.trigger(\"rangechange\");\n            timeline.trigger(\"rangechanged\");\n        };\n\n        if (event.shiftKey) {\n            scroll();\n        }\n        else {\n            zoom();\n        }\n    }\n\n    // Prevent default actions caused by mouse wheel.\n    // That might be ugly, but we handle scrolls somehow\n    // anyway, so don't bother here...\n    links.Timeline.preventDefault(event);\n};\n\n\n/**\n * Zoom the timeline the given zoomfactor in or out. Start and end date will\n * be adjusted, and the timeline will be redrawn. You can optionally give a\n * date around which to zoom.\n * For example, try zoomfactor = 0.1 or -0.1\n * @param {Number} zoomFactor      Zooming amount. Positive value will zoom in,\n *                                 negative value will zoom out\n * @param {Date}   zoomAroundDate  Date around which will be zoomed. Optional\n */\nlinks.Timeline.prototype.zoom = function(zoomFactor, zoomAroundDate) {\n    // if zoomAroundDate is not provided, take it half between start Date and end Date\n    if (zoomAroundDate == undefined) {\n        zoomAroundDate = new Date((this.start.valueOf() + this.end.valueOf()) / 2);\n    }\n\n    // prevent zoom factor larger than 1 or smaller than -1 (larger than 1 will\n    // result in a start>=end )\n    if (zoomFactor >= 1) {\n        zoomFactor = 0.9;\n    }\n    if (zoomFactor <= -1) {\n        zoomFactor = -0.9;\n    }\n\n    // adjust a negative factor such that zooming in with 0.1 equals zooming\n    // out with a factor -0.1\n    if (zoomFactor < 0) {\n        zoomFactor = zoomFactor / (1 + zoomFactor);\n    }\n\n    // zoom start Date and end Date relative to the zoomAroundDate\n    var startDiff = (this.start.valueOf() - zoomAroundDate);\n    var endDiff = (this.end.valueOf() - zoomAroundDate);\n\n    // calculate new dates\n    var newStart = new Date(this.start.valueOf() - startDiff * zoomFactor);\n    var newEnd   = new Date(this.end.valueOf() - endDiff * zoomFactor);\n\n    // only zoom in when interval is larger than minimum interval (to prevent\n    // sliding to left/right when having reached the minimum zoom level)\n    var interval = (newEnd.valueOf() - newStart.valueOf());\n    var zoomMin = Number(this.options.zoomMin) || 10;\n    if (zoomMin < 10) {\n        zoomMin = 10;\n    }\n    if (interval >= zoomMin) {\n        this.applyRange(newStart, newEnd, zoomAroundDate);\n        this.render({\n            animate: this.options.animate && this.options.animateZoom\n        });\n    }\n};\n\n/**\n * Move the timeline the given movefactor to the left or right. Start and end\n * date will be adjusted, and the timeline will be redrawn.\n * For example, try moveFactor = 0.1 or -0.1\n * @param {Number}  moveFactor      Moving amount. Positive value will move right,\n *                                 negative value will move left\n */\nlinks.Timeline.prototype.move = function(moveFactor) {\n    // zoom start Date and end Date relative to the zoomAroundDate\n    var diff = (this.end.valueOf() - this.start.valueOf());\n\n    // apply new dates\n    var newStart = new Date(this.start.valueOf() + diff * moveFactor);\n    var newEnd   = new Date(this.end.valueOf() + diff * moveFactor);\n    this.applyRange(newStart, newEnd);\n\n    this.render(); // TODO: optimize, no need to reflow, only to recalc conversion and repaint\n};\n\n/**\n * Apply a visible range. The range is limited to feasible maximum and minimum\n * range.\n * @param {Date} start\n * @param {Date} end\n * @param {Date}   zoomAroundDate  Optional. Date around which will be zoomed.\n */\nlinks.Timeline.prototype.applyRange = function (start, end, zoomAroundDate) {\n    // calculate new start and end value\n    var startValue = start.valueOf(); // number\n    var endValue = end.valueOf();     // number\n    var interval = (endValue - startValue);\n\n    // determine maximum and minimum interval\n    var options = this.options;\n    var year = 1000 * 60 * 60 * 24 * 365;\n    var zoomMin = Number(options.zoomMin) || 10;\n    if (zoomMin < 10) {\n        zoomMin = 10;\n    }\n    var zoomMax = Number(options.zoomMax) || 10000 * year;\n    if (zoomMax > 10000 * year) {\n        zoomMax = 10000 * year;\n    }\n    if (zoomMax < zoomMin) {\n        zoomMax = zoomMin;\n    }\n\n    // determine min and max date value\n    var min = options.min ? options.min.valueOf() : undefined; // number\n    var max = options.max ? options.max.valueOf() : undefined; // number\n    if (min != undefined && max != undefined) {\n        if (min >= max) {\n            // empty range\n            var day = 1000 * 60 * 60 * 24;\n            max = min + day;\n        }\n        if (zoomMax > (max - min)) {\n            zoomMax = (max - min);\n        }\n        if (zoomMin > (max - min)) {\n            zoomMin = (max - min);\n        }\n    }\n\n    // prevent empty interval\n    if (startValue >= endValue) {\n        endValue += 1000 * 60 * 60 * 24;\n    }\n\n    // prevent too small scale\n    // TODO: IE has problems with milliseconds\n    if (interval < zoomMin) {\n        var diff = (zoomMin - interval);\n        var f = zoomAroundDate ? (zoomAroundDate.valueOf() - startValue) / interval : 0.5;\n        startValue -= Math.round(diff * f);\n        endValue   += Math.round(diff * (1 - f));\n    }\n\n    // prevent too large scale\n    if (interval > zoomMax) {\n        var diff = (interval - zoomMax);\n        var f = zoomAroundDate ? (zoomAroundDate.valueOf() - startValue) / interval : 0.5;\n        startValue += Math.round(diff * f);\n        endValue   -= Math.round(diff * (1 - f));\n    }\n\n    // prevent to small start date\n    if (min != undefined) {\n        var diff = (startValue - min);\n        if (diff < 0) {\n            startValue -= diff;\n            endValue -= diff;\n        }\n    }\n\n    // prevent to large end date\n    if (max != undefined) {\n        var diff = (max - endValue);\n        if (diff < 0) {\n            startValue += diff;\n            endValue += diff;\n        }\n    }\n\n    // apply new dates\n    this.start = new Date(startValue);\n    this.end = new Date(endValue);\n};\n\n/**\n * Delete an item after a confirmation.\n * The deletion can be cancelled by executing .cancelDelete() during the\n * triggered event 'delete'.\n * @param {int} index   Index of the item to be deleted\n */\nlinks.Timeline.prototype.confirmDeleteItem = function(index) {\n    this.applyDelete = true;\n\n    // select the event to be deleted\n    if (!this.isSelected(index)) {\n        this.selectItem(index);\n    }\n\n    // fire a delete event trigger. \n    // Note that the delete event can be canceled from within an event listener if \n    // this listener calls the method cancelChange().\n    this.trigger('delete');\n\n    if (this.applyDelete) {\n        this.deleteItem(index);\n    }\n\n    delete this.applyDelete;\n};\n\n/**\n * Delete an item\n * @param {int} index   Index of the item to be deleted\n * @param {boolean} [preventRender=false]   Do not re-render timeline if true\n *                                          (optimization for multiple delete)\n */\nlinks.Timeline.prototype.deleteItem = function(index, preventRender) {\n    if (index >= this.items.length) {\n        throw \"Cannot delete row, index out of range\";\n    }\n\n    if (this.selection) {\n        // adjust the selection\n        if (this.selection.index == index) {\n            // item to be deleted is selected\n            this.unselectItem();\n        }\n        else if (this.selection.index > index) {\n            // update selection index\n            this.selection.index--;\n        }\n    }\n\n    // actually delete the item and remove it from the DOM\n    var item = this.items.splice(index, 1)[0];\n    this.renderQueue.hide.push(item);\n\n    // delete the row in the original data table\n    if (this.data) {\n        if (google && google.visualization &&\n            this.data instanceof google.visualization.DataTable) {\n            this.data.removeRow(index);\n        }\n        else if (links.Timeline.isArray(this.data)) {\n            this.data.splice(index, 1);\n        }\n        else {\n            throw \"Cannot delete row from data, unknown data type\";\n        }\n    }\n\n    // prepare data for clustering, by filtering and sorting by type\n    if (this.options.cluster) {\n        this.clusterGenerator.updateData();\n    }\n\n    if (!preventRender) {\n        this.render();\n    }\n};\n\n\n/**\n * Delete all items\n */\nlinks.Timeline.prototype.deleteAllItems = function() {\n    this.unselectItem();\n\n    // delete the loaded items\n    this.clearItems();\n\n    // delete the groups\n    this.deleteGroups();\n\n    // empty original data table\n    if (this.data) {\n        if (google && google.visualization &&\n            this.data instanceof google.visualization.DataTable) {\n            this.data.removeRows(0, this.data.getNumberOfRows());\n        }\n        else if (links.Timeline.isArray(this.data)) {\n            this.data.splice(0, this.data.length);\n        }\n        else {\n            throw \"Cannot delete row from data, unknown data type\";\n        }\n    }\n\n    // prepare data for clustering, by filtering and sorting by type\n    if (this.options.cluster) {\n        this.clusterGenerator.updateData();\n    }\n\n    this.render();\n};\n\n\n/**\n * Find the group from a given height in the timeline\n * @param {Number} height   Height in the timeline\n * @return {Object | undefined} group   The group object, or undefined if out\n *                                      of range\n */\nlinks.Timeline.prototype.getGroupFromHeight = function(height) {\n    var i,\n        group,\n        groups = this.groups;\n\n    if (groups.length) {\n        if (this.options.axisOnTop) {\n            for (i = groups.length - 1; i >= 0; i--) {\n                group = groups[i];\n                if (height > group.top) {\n                    return group;\n                }\n            }\n        }\n        else {\n            for (i = 0; i < groups.length; i++) {\n                group = groups[i];\n                if (height > group.top) {\n                    return group;\n                }\n            }\n        }\n\n        return group; // return the last group\n    }\n\n    return undefined;\n};\n\n/**\n * @constructor links.Timeline.Item\n * @param {Object} data       Object containing parameters start, end\n *                            content, group, type, editable.\n * @param {Object} [options]  Options to set initial property values\n *                                {Number} top\n *                                {Number} left\n *                                {Number} width\n *                                {Number} height\n */\nlinks.Timeline.Item = function (data, options) {\n    if (data) {\n        /* TODO: use parseJSONDate as soon as it is tested and working (in two directions)\n         this.start = links.Timeline.parseJSONDate(data.start);\n         this.end = links.Timeline.parseJSONDate(data.end);\n         */\n        this.start = data.start;\n        this.end = data.end;\n        this.content = data.content;\n        this.className = data.className;\n        this.editable = data.editable;\n        this.group = data.group;\n        this.type = data.type;\n    }\n    this.top = 0;\n    this.left = 0;\n    this.width = 0;\n    this.height = 0;\n    this.lineWidth = 0;\n    this.dotWidth = 0;\n    this.dotHeight = 0;\n\n    this.rendered = false; // true when the item is draw in the Timeline DOM\n\n    if (options) {\n        // override the default properties\n        for (var option in options) {\n            if (options.hasOwnProperty(option)) {\n                this[option] = options[option];\n            }\n        }\n    }\n\n};\n\n\n\n/**\n * Reflow the Item: retrieve its actual size from the DOM\n * @return {boolean} resized    returns true if the axis is resized\n */\nlinks.Timeline.Item.prototype.reflow = function () {\n    // Should be implemented by sub-prototype\n    return false;\n};\n\n/**\n * Append all image urls present in the items DOM to the provided array\n * @param {String[]} imageUrls\n */\nlinks.Timeline.Item.prototype.getImageUrls = function (imageUrls) {\n    if (this.dom) {\n        links.imageloader.filterImageUrls(this.dom, imageUrls);\n    }\n};\n\n/**\n * Select the item\n */\nlinks.Timeline.Item.prototype.select = function () {\n    // Should be implemented by sub-prototype\n};\n\n/**\n * Unselect the item\n */\nlinks.Timeline.Item.prototype.unselect = function () {\n    // Should be implemented by sub-prototype\n};\n\n/**\n * Creates the DOM for the item, depending on its type\n * @return {Element | undefined}\n */\nlinks.Timeline.Item.prototype.createDOM = function () {\n    // Should be implemented by sub-prototype\n};\n\n/**\n * Append the items DOM to the given HTML container. If items DOM does not yet\n * exist, it will be created first.\n * @param {Element} container\n */\nlinks.Timeline.Item.prototype.showDOM = function (container) {\n    // Should be implemented by sub-prototype\n};\n\n/**\n * Remove the items DOM from the current HTML container\n * @param {Element} container\n */\nlinks.Timeline.Item.prototype.hideDOM = function (container) {\n    // Should be implemented by sub-prototype\n};\n\n/**\n * Update the DOM of the item. This will update the content and the classes\n * of the item\n */\nlinks.Timeline.Item.prototype.updateDOM = function () {\n    // Should be implemented by sub-prototype\n};\n\n/**\n * Reposition the item, recalculate its left, top, and width, using the current\n * range of the timeline and the timeline options.\n * @param {links.Timeline} timeline\n */\nlinks.Timeline.Item.prototype.updatePosition = function (timeline) {\n    // Should be implemented by sub-prototype\n};\n\n/**\n * Check if the item is drawn in the timeline (i.e. the DOM of the item is\n * attached to the frame. You may also just request the parameter item.rendered\n * @return {boolean} rendered\n */\nlinks.Timeline.Item.prototype.isRendered = function () {\n    return this.rendered;\n};\n\n/**\n * Check if the item is located in the visible area of the timeline, and\n * not part of a cluster\n * @param {Date} start\n * @param {Date} end\n * @return {boolean} visible\n */\nlinks.Timeline.Item.prototype.isVisible = function (start, end) {\n    // Should be implemented by sub-prototype\n    return false;\n};\n\n/**\n * Reposition the item\n * @param {Number} left\n * @param {Number} right\n */\nlinks.Timeline.Item.prototype.setPosition = function (left, right) {\n    // Should be implemented by sub-prototype\n};\n\n/**\n * Calculate the right position of the item\n * @param {links.Timeline} timeline\n * @return {Number} right\n */\nlinks.Timeline.Item.prototype.getRight = function (timeline) {\n    // Should be implemented by sub-prototype\n    return 0;\n};\n\n/**\n * Calculate the width of the item\n * @param {links.Timeline} timeline\n * @return {Number} width\n */\nlinks.Timeline.Item.prototype.getWidth = function (timeline) {\n    // Should be implemented by sub-prototype\n    return this.width || 0; // last rendered width\n};\n\n\n/**\n * @constructor links.Timeline.ItemBox\n * @extends links.Timeline.Item\n * @param {Object} data       Object containing parameters start, end\n *                            content, group, type, className, editable.\n * @param {Object} [options]  Options to set initial property values\n *                                {Number} top\n *                                {Number} left\n *                                {Number} width\n *                                {Number} height\n */\nlinks.Timeline.ItemBox = function (data, options) {\n    links.Timeline.Item.call(this, data, options);\n};\n\nlinks.Timeline.ItemBox.prototype = new links.Timeline.Item();\n\n/**\n * Reflow the Item: retrieve its actual size from the DOM\n * @return {boolean} resized    returns true if the axis is resized\n * @override\n */\nlinks.Timeline.ItemBox.prototype.reflow = function () {\n    var dom = this.dom,\n        dotHeight = dom.dot.offsetHeight,\n        dotWidth = dom.dot.offsetWidth,\n        lineWidth = dom.line.offsetWidth,\n        resized = (\n            (this.dotHeight != dotHeight) ||\n                (this.dotWidth != dotWidth) ||\n                (this.lineWidth != lineWidth)\n            );\n\n    this.dotHeight = dotHeight;\n    this.dotWidth = dotWidth;\n    this.lineWidth = lineWidth;\n\n    return resized;\n};\n\n/**\n * Select the item\n * @override\n */\nlinks.Timeline.ItemBox.prototype.select = function () {\n    var dom = this.dom;\n    links.Timeline.addClassName(dom, 'timeline-event-selected ui-state-active');\n    links.Timeline.addClassName(dom.line, 'timeline-event-selected ui-state-active');\n    links.Timeline.addClassName(dom.dot, 'timeline-event-selected ui-state-active');\n};\n\n/**\n * Unselect the item\n * @override\n */\nlinks.Timeline.ItemBox.prototype.unselect = function () {\n    var dom = this.dom;\n    links.Timeline.removeClassName(dom, 'timeline-event-selected ui-state-active');\n    links.Timeline.removeClassName(dom.line, 'timeline-event-selected ui-state-active');\n    links.Timeline.removeClassName(dom.dot, 'timeline-event-selected ui-state-active');\n};\n\n/**\n * Creates the DOM for the item, depending on its type\n * @return {Element | undefined}\n * @override\n */\nlinks.Timeline.ItemBox.prototype.createDOM = function () {\n    // background box\n    var divBox = document.createElement(\"DIV\");\n    divBox.style.position = \"absolute\";\n    divBox.style.left = this.left + \"px\";\n    divBox.style.top = this.top + \"px\";\n\n    // contents box (inside the background box). used for making margins\n    var divContent = document.createElement(\"DIV\");\n    divContent.className = \"timeline-event-content\";\n    divContent.innerHTML = this.content;\n    divBox.appendChild(divContent);\n\n    // line to axis\n    var divLine = document.createElement(\"DIV\");\n    divLine.style.position = \"absolute\";\n    divLine.style.width = \"0px\";\n    // important: the vertical line is added at the front of the list of elements,\n    // so it will be drawn behind all boxes and ranges\n    divBox.line = divLine;\n\n    // dot on axis\n    var divDot = document.createElement(\"DIV\");\n    divDot.style.position = \"absolute\";\n    divDot.style.width  = \"0px\";\n    divDot.style.height = \"0px\";\n    divBox.dot = divDot;\n\n    this.dom = divBox;\n    this.updateDOM();\n\n    return divBox;\n};\n\n/**\n * Append the items DOM to the given HTML container. If items DOM does not yet\n * exist, it will be created first.\n * @param {Element} container\n * @override\n */\nlinks.Timeline.ItemBox.prototype.showDOM = function (container) {\n    var dom = this.dom;\n    if (!dom) {\n        dom = this.createDOM();\n    }\n\n    if (dom.parentNode != container) {\n        if (dom.parentNode) {\n            // container is changed. remove from old container\n            this.hideDOM();\n        }\n\n        // append to this container\n        container.appendChild(dom);\n        container.insertBefore(dom.line, container.firstChild);\n        // Note: line must be added in front of the this,\n        //       such that it stays below all this\n        container.appendChild(dom.dot);\n        this.rendered = true;\n    }\n};\n\n/**\n * Remove the items DOM from the current HTML container, but keep the DOM in\n * memory\n * @override\n */\nlinks.Timeline.ItemBox.prototype.hideDOM = function () {\n    var dom = this.dom;\n    if (dom) {\n        if (dom.parentNode) {\n            dom.parentNode.removeChild(dom);\n        }\n        if (dom.line && dom.line.parentNode) {\n            dom.line.parentNode.removeChild(dom.line);\n        }\n        if (dom.dot && dom.dot.parentNode) {\n            dom.dot.parentNode.removeChild(dom.dot);\n        }\n        this.rendered = false;\n    }\n};\n\n/**\n * Update the DOM of the item. This will update the content and the classes\n * of the item\n * @override\n */\nlinks.Timeline.ItemBox.prototype.updateDOM = function () {\n    var divBox = this.dom;\n    if (divBox) {\n        var divLine = divBox.line;\n        var divDot = divBox.dot;\n\n        // update contents\n        divBox.firstChild.innerHTML = this.content;\n\n        // update class\n        divBox.className = \"timeline-event timeline-event-box ui-widget ui-state-default\";\n        divLine.className = \"timeline-event timeline-event-line ui-widget ui-state-default\";\n        divDot.className  = \"timeline-event timeline-event-dot ui-widget ui-state-default\";\n\n        if (this.isCluster) {\n            links.Timeline.addClassName(divBox, 'timeline-event-cluster ui-widget-header');\n            links.Timeline.addClassName(divLine, 'timeline-event-cluster ui-widget-header');\n            links.Timeline.addClassName(divDot, 'timeline-event-cluster ui-widget-header');\n        }\n\n        // add item specific class name when provided\n        if (this.className) {\n            links.Timeline.addClassName(divBox, this.className);\n            links.Timeline.addClassName(divLine, this.className);\n            links.Timeline.addClassName(divDot, this.className);\n        }\n\n        // TODO: apply selected className?\n    }\n};\n\n/**\n * Reposition the item, recalculate its left, top, and width, using the current\n * range of the timeline and the timeline options.\n * @param {links.Timeline} timeline\n * @override\n */\nlinks.Timeline.ItemBox.prototype.updatePosition = function (timeline) {\n    var dom = this.dom;\n    if (dom) {\n        var left = timeline.timeToScreen(this.start),\n            axisOnTop = timeline.options.axisOnTop,\n            axisTop = timeline.size.axis.top,\n            axisHeight = timeline.size.axis.height,\n            boxAlign = (timeline.options.box && timeline.options.box.align) ?\n                timeline.options.box.align : undefined;\n\n        dom.style.top = this.top + \"px\";\n        if (boxAlign == 'right') {\n            dom.style.left = (left - this.width) + \"px\";\n        }\n        else if (boxAlign == 'left') {\n            dom.style.left = (left) + \"px\";\n        }\n        else { // default or 'center'\n            dom.style.left = (left - this.width/2) + \"px\";\n        }\n\n        var line = dom.line;\n        var dot = dom.dot;\n        line.style.left = (left - this.lineWidth/2) + \"px\";\n        dot.style.left = (left - this.dotWidth/2) + \"px\";\n        if (axisOnTop) {\n            line.style.top = axisHeight + \"px\";\n            line.style.height = Math.max(this.top - axisHeight, 0) + \"px\";\n            dot.style.top = (axisHeight - this.dotHeight/2) + \"px\";\n        }\n        else {\n            line.style.top = (this.top + this.height) + \"px\";\n            line.style.height = Math.max(axisTop - this.top - this.height, 0) + \"px\";\n            dot.style.top = (axisTop - this.dotHeight/2) + \"px\";\n        }\n    }\n};\n\n/**\n * Check if the item is visible in the timeline, and not part of a cluster\n * @param {Date} start\n * @param {Date} end\n * @return {Boolean} visible\n * @override\n */\nlinks.Timeline.ItemBox.prototype.isVisible = function (start, end) {\n    if (this.cluster) {\n        return false;\n    }\n\n    return (this.start > start) && (this.start < end);\n};\n\n/**\n * Reposition the item\n * @param {Number} left\n * @param {Number} right\n * @override\n */\nlinks.Timeline.ItemBox.prototype.setPosition = function (left, right) {\n    var dom = this.dom;\n\n    dom.style.left = (left - this.width / 2) + \"px\";\n    dom.line.style.left = (left - this.lineWidth / 2) + \"px\";\n    dom.dot.style.left = (left - this.dotWidth / 2) + \"px\";\n\n    if (this.group) {\n        this.top = this.group.top;\n        dom.style.top = this.top + 'px';\n    }\n};\n\n/**\n * Calculate the right position of the item\n * @param {links.Timeline} timeline\n * @return {Number} right\n * @override\n */\nlinks.Timeline.ItemBox.prototype.getRight = function (timeline) {\n    var boxAlign = (timeline.options.box && timeline.options.box.align) ?\n        timeline.options.box.align : undefined;\n\n    var left = timeline.timeToScreen(this.start);\n    var right;\n    if (boxAlign == 'right') {\n        right = left;\n    }\n    else if (boxAlign == 'left') {\n        right = (left + this.width);\n    }\n    else { // default or 'center'\n        right = (left + this.width / 2);\n    }\n\n    return right;\n};\n\n/**\n * @constructor links.Timeline.ItemRange\n * @extends links.Timeline.Item\n * @param {Object} data       Object containing parameters start, end\n *                            content, group, type, className, editable.\n * @param {Object} [options]  Options to set initial property values\n *                                {Number} top\n *                                {Number} left\n *                                {Number} width\n *                                {Number} height\n */\nlinks.Timeline.ItemRange = function (data, options) {\n    links.Timeline.Item.call(this, data, options);\n};\n\nlinks.Timeline.ItemRange.prototype = new links.Timeline.Item();\n\n/**\n * Select the item\n * @override\n */\nlinks.Timeline.ItemRange.prototype.select = function () {\n    var dom = this.dom;\n    links.Timeline.addClassName(dom, 'timeline-event-selected ui-state-active');\n};\n\n/**\n * Unselect the item\n * @override\n */\nlinks.Timeline.ItemRange.prototype.unselect = function () {\n    var dom = this.dom;\n    links.Timeline.removeClassName(dom, 'timeline-event-selected ui-state-active');\n};\n\n/**\n * Creates the DOM for the item, depending on its type\n * @return {Element | undefined}\n * @override\n */\nlinks.Timeline.ItemRange.prototype.createDOM = function () {\n    // background box\n    var divBox = document.createElement(\"DIV\");\n    divBox.style.position = \"absolute\";\n\n    // contents box\n    var divContent = document.createElement(\"DIV\");\n    divContent.className = \"timeline-event-content\";\n    divBox.appendChild(divContent);\n\n    this.dom = divBox;\n    this.updateDOM();\n\n    return divBox;\n};\n\n/**\n * Append the items DOM to the given HTML container. If items DOM does not yet\n * exist, it will be created first.\n * @param {Element} container\n * @override\n */\nlinks.Timeline.ItemRange.prototype.showDOM = function (container) {\n    var dom = this.dom;\n    if (!dom) {\n        dom = this.createDOM();\n    }\n\n    if (dom.parentNode != container) {\n        if (dom.parentNode) {\n            // container changed. remove the item from the old container\n            this.hideDOM();\n        }\n\n        // append to the new container\n        container.appendChild(dom);\n        this.rendered = true;\n    }\n};\n\n/**\n * Remove the items DOM from the current HTML container\n * The DOM will be kept in memory\n * @override\n */\nlinks.Timeline.ItemRange.prototype.hideDOM = function () {\n    var dom = this.dom;\n    if (dom) {\n        if (dom.parentNode) {\n            dom.parentNode.removeChild(dom);\n        }\n        this.rendered = false;\n    }\n};\n\n/**\n * Update the DOM of the item. This will update the content and the classes\n * of the item\n * @override\n */\nlinks.Timeline.ItemRange.prototype.updateDOM = function () {\n    var divBox = this.dom;\n    if (divBox) {\n        // update contents\n        divBox.firstChild.innerHTML = this.content;\n\n        // update class\n        divBox.className = \"timeline-event timeline-event-range ui-widget ui-state-default\";\n\n        if (this.isCluster) {\n            links.Timeline.addClassName(divBox, 'timeline-event-cluster ui-widget-header');\n        }\n\n        // add item specific class name when provided\n        if (this.className) {\n            links.Timeline.addClassName(divBox, this.className);\n        }\n\n        // TODO: apply selected className?\n    }\n};\n\n/**\n * Reposition the item, recalculate its left, top, and width, using the current\n * range of the timeline and the timeline options. *\n * @param {links.Timeline} timeline\n * @override\n */\nlinks.Timeline.ItemRange.prototype.updatePosition = function (timeline) {\n    var dom = this.dom;\n    if (dom) {\n        var contentWidth = timeline.size.contentWidth,\n            left = timeline.timeToScreen(this.start),\n            right = timeline.timeToScreen(this.end);\n\n        // limit the width of the this, as browsers cannot draw very wide divs\n        if (left < -contentWidth) {\n            left = -contentWidth;\n        }\n        if (right > 2 * contentWidth) {\n            right = 2 * contentWidth;\n        }\n\n        dom.style.top = this.top + \"px\";\n        dom.style.left = left + \"px\";\n        //dom.style.width = Math.max(right - left - 2 * this.borderWidth, 1) + \"px\"; // TODO: borderWidth\n        dom.style.width = Math.max(right - left, 1) + \"px\";\n    }\n};\n\n/**\n * Check if the item is visible in the timeline, and not part of a cluster\n * @param {Number} start\n * @param {Number} end\n * @return {boolean} visible\n * @override\n */\nlinks.Timeline.ItemRange.prototype.isVisible = function (start, end) {\n    if (this.cluster) {\n        return false;\n    }\n\n    return (this.end > start)\n        && (this.start < end);\n};\n\n/**\n * Reposition the item\n * @param {Number} left\n * @param {Number} right\n * @override\n */\nlinks.Timeline.ItemRange.prototype.setPosition = function (left, right) {\n    var dom = this.dom;\n\n    dom.style.left = left + 'px';\n    dom.style.width = (right - left) + 'px';\n\n    if (this.group) {\n        this.top = this.group.top;\n        dom.style.top = this.top + 'px';\n    }\n};\n\n/**\n * Calculate the right position of the item\n * @param {links.Timeline} timeline\n * @return {Number} right\n * @override\n */\nlinks.Timeline.ItemRange.prototype.getRight = function (timeline) {\n    return timeline.timeToScreen(this.end);\n};\n\n/**\n * Calculate the width of the item\n * @param {links.Timeline} timeline\n * @return {Number} width\n * @override\n */\nlinks.Timeline.ItemRange.prototype.getWidth = function (timeline) {\n    return timeline.timeToScreen(this.end) - timeline.timeToScreen(this.start);\n};\n\n/**\n * @constructor links.Timeline.ItemDot\n * @extends links.Timeline.Item\n * @param {Object} data       Object containing parameters start, end\n *                            content, group, type, className, editable.\n * @param {Object} [options]  Options to set initial property values\n *                                {Number} top\n *                                {Number} left\n *                                {Number} width\n *                                {Number} height\n */\nlinks.Timeline.ItemDot = function (data, options) {\n    links.Timeline.Item.call(this, data, options);\n};\n\nlinks.Timeline.ItemDot.prototype = new links.Timeline.Item();\n\n/**\n * Reflow the Item: retrieve its actual size from the DOM\n * @return {boolean} resized    returns true if the axis is resized\n * @override\n */\nlinks.Timeline.ItemDot.prototype.reflow = function () {\n    var dom = this.dom,\n        dotHeight = dom.dot.offsetHeight,\n        dotWidth = dom.dot.offsetWidth,\n        contentHeight = dom.content.offsetHeight,\n        resized = (\n            (this.dotHeight != dotHeight) ||\n                (this.dotWidth != dotWidth) ||\n                (this.contentHeight != contentHeight)\n            );\n\n    this.dotHeight = dotHeight;\n    this.dotWidth = dotWidth;\n    this.contentHeight = contentHeight;\n\n    return resized;\n};\n\n/**\n * Select the item\n * @override\n */\nlinks.Timeline.ItemDot.prototype.select = function () {\n    var dom = this.dom;\n    links.Timeline.addClassName(dom, 'timeline-event-selected ui-state-active');\n};\n\n/**\n * Unselect the item\n * @override\n */\nlinks.Timeline.ItemDot.prototype.unselect = function () {\n    var dom = this.dom;\n    links.Timeline.removeClassName(dom, 'timeline-event-selected ui-state-active');\n};\n\n/**\n * Creates the DOM for the item, depending on its type\n * @return {Element | undefined}\n * @override\n */\nlinks.Timeline.ItemDot.prototype.createDOM = function () {\n    // background box\n    var divBox = document.createElement(\"DIV\");\n    divBox.style.position = \"absolute\";\n\n    // contents box, right from the dot\n    var divContent = document.createElement(\"DIV\");\n    divContent.className = \"timeline-event-content\";\n    divBox.appendChild(divContent);\n\n    // dot at start\n    var divDot = document.createElement(\"DIV\");\n    divDot.style.position = \"absolute\";\n    divDot.style.width = \"0px\";\n    divDot.style.height = \"0px\";\n    divBox.appendChild(divDot);\n\n    divBox.content = divContent;\n    divBox.dot = divDot;\n\n    this.dom = divBox;\n    this.updateDOM();\n\n    return divBox;\n};\n\n/**\n * Append the items DOM to the given HTML container. If items DOM does not yet\n * exist, it will be created first.\n * @param {Element} container\n * @override\n */\nlinks.Timeline.ItemDot.prototype.showDOM = function (container) {\n    var dom = this.dom;\n    if (!dom) {\n        dom = this.createDOM();\n    }\n\n    if (dom.parentNode != container) {\n        if (dom.parentNode) {\n            // container changed. remove it from old container first\n            this.hideDOM();\n        }\n\n        // append to container\n        container.appendChild(dom);\n        this.rendered = true;\n    }\n};\n\n/**\n * Remove the items DOM from the current HTML container\n * @override\n */\nlinks.Timeline.ItemDot.prototype.hideDOM = function () {\n    var dom = this.dom;\n    if (dom) {\n        if (dom.parentNode) {\n            dom.parentNode.removeChild(dom);\n        }\n        this.rendered = false;\n    }\n};\n\n/**\n * Update the DOM of the item. This will update the content and the classes\n * of the item\n * @override\n */\nlinks.Timeline.ItemDot.prototype.updateDOM = function () {\n    if (this.dom) {\n        var divBox = this.dom;\n        var divDot = divBox.dot;\n\n        // update contents\n        divBox.firstChild.innerHTML = this.content;\n\n        // update classes\n        divBox.className = \"timeline-event-dot-container\";\n        divDot.className  = \"timeline-event timeline-event-dot ui-widget ui-state-default\";\n\n        if (this.isCluster) {\n            links.Timeline.addClassName(divBox, 'timeline-event-cluster ui-widget-header');\n            links.Timeline.addClassName(divDot, 'timeline-event-cluster ui-widget-header');\n        }\n\n        // add item specific class name when provided\n        if (this.className) {\n            links.Timeline.addClassName(divBox, this.className);\n            links.Timeline.addClassName(divDot, this.className);\n        }\n\n        // TODO: apply selected className?\n    }\n};\n\n/**\n * Reposition the item, recalculate its left, top, and width, using the current\n * range of the timeline and the timeline options. *\n * @param {links.Timeline} timeline\n * @override\n */\nlinks.Timeline.ItemDot.prototype.updatePosition = function (timeline) {\n    var dom = this.dom;\n    if (dom) {\n        var left = timeline.timeToScreen(this.start);\n\n        dom.style.top = this.top + \"px\";\n        dom.style.left = (left - this.dotWidth / 2) + \"px\";\n\n        dom.content.style.marginLeft = (1.5 * this.dotWidth) + \"px\";\n        //dom.content.style.marginRight = (0.5 * this.dotWidth) + \"px\"; // TODO\n        dom.dot.style.top = ((this.height - this.dotHeight) / 2) + \"px\";\n    }\n};\n\n/**\n * Check if the item is visible in the timeline, and not part of a cluster.\n * @param {Date} start\n * @param {Date} end\n * @return {boolean} visible\n * @override\n */\nlinks.Timeline.ItemDot.prototype.isVisible = function (start, end) {\n    if (this.cluster) {\n        return false;\n    }\n\n    return (this.start > start)\n        && (this.start < end);\n};\n\n/**\n * Reposition the item\n * @param {Number} left\n * @param {Number} right\n * @override\n */\nlinks.Timeline.ItemDot.prototype.setPosition = function (left, right) {\n    var dom = this.dom;\n\n    dom.style.left = (left - this.dotWidth / 2) + \"px\";\n\n    if (this.group) {\n        this.top = this.group.top;\n        dom.style.top = this.top + 'px';\n    }\n};\n\n/**\n * Calculate the right position of the item\n * @param {links.Timeline} timeline\n * @return {Number} right\n * @override\n */\nlinks.Timeline.ItemDot.prototype.getRight = function (timeline) {\n    return timeline.timeToScreen(this.start) + this.width;\n};\n\n/**\n * Retrieve the properties of an item.\n * @param {Number} index\n * @return {Object} properties  Object containing item properties:<br>\n *                              {Date} start (required),\n *                              {Date} end (optional),\n *                              {String} content (required),\n *                              {String} group (optional),\n *                              {String} className (optional)\n *                              {boolean} editable (optional)\n *                              {String} type (optional)\n */\nlinks.Timeline.prototype.getItem = function (index) {\n    if (index >= this.items.length) {\n        throw \"Cannot get item, index out of range\";\n    }\n\n    var item = this.items[index];\n\n    var properties = {};\n    properties.start = new Date(item.start.valueOf());\n    if (item.end) {\n        properties.end = new Date(item.end.valueOf());\n    }\n    properties.content = item.content;\n    if (item.group) {\n        properties.group = this.getGroupName(item.group);\n    }\n    if ('className' in item) {\n        properties.className = this.getGroupName(item.className);\n    }\n    if (item.hasOwnProperty('editable') && (typeof item.editable != 'undefined')) {\n        properties.editable = item.editable;\n    }\n    if (item.type) {\n        properties.type = item.type;\n    }\n\n    return properties;\n};\n\n/**\n * Add a new item.\n * @param {Object} itemData     Object containing item properties:<br>\n *                              {Date} start (required),\n *                              {Date} end (optional),\n *                              {String} content (required),\n *                              {String} group (optional)\n *                              {String} className (optional)\n *                              {Boolean} editable (optional)\n *                              {String} type (optional)\n * @param {boolean} [preventRender=false]   Do not re-render timeline if true\n */\nlinks.Timeline.prototype.addItem = function (itemData, preventRender) {\n    var itemsData = [\n        itemData\n    ];\n\n    this.addItems(itemsData, preventRender);\n};\n\n/**\n * Add new items.\n * @param {Array} itemsData An array containing Objects.\n *                          The objects must have the following parameters:\n *                            {Date} start,\n *                            {Date} end,\n *                            {String} content with text or HTML code,\n *                            {String} group (optional)\n *                            {String} className (optional)\n *                            {String} editable (optional)\n *                            {String} type (optional)\n * @param {boolean} [preventRender=false]   Do not re-render timeline if true\n */\nlinks.Timeline.prototype.addItems = function (itemsData, preventRender) {\n    var timeline = this,\n        items = this.items;\n\n    // append the items\n    itemsData.forEach(function (itemData) {\n        var index = items.length;\n        items.push(timeline.createItem(itemData));\n        timeline.updateData(index, itemData);\n\n        // note: there is no need to add the item to the renderQueue, that\n        // will be done when this.render() is executed and all items are\n        // filtered again.\n    });\n\n    // prepare data for clustering, by filtering and sorting by type\n    if (this.options.cluster) {\n        this.clusterGenerator.updateData();\n    }\n\n    if (!preventRender) {\n        this.render({\n            animate: false\n        });\n    }\n};\n\n/**\n * Create an item object, containing all needed parameters\n * @param {Object} itemData  Object containing parameters start, end\n *                           content, group.\n * @return {Object} item\n */\nlinks.Timeline.prototype.createItem = function(itemData) {\n    var type = itemData.type || (itemData.end ? 'range' : this.options.style);\n    var data = {\n        start: itemData.start,\n        end: itemData.end,\n        content: itemData.content,\n        className: itemData.className,\n        editable: itemData.editable,\n        group: this.getGroup(itemData.group),\n        type: type\n    };\n    // TODO: optimize this, when creating an item, all data is copied twice...\n\n    // TODO: is initialTop needed?\n    var initialTop,\n        options = this.options;\n    if (options.axisOnTop) {\n        initialTop = this.size.axis.height + options.eventMarginAxis + options.eventMargin / 2;\n    }\n    else {\n        initialTop = this.size.contentHeight - options.eventMarginAxis - options.eventMargin / 2;\n    }\n\n    if (type in this.itemTypes) {\n        return new this.itemTypes[type](data, {'top': initialTop})\n    }\n\n    console.log('ERROR: Unknown event style \"' + type + '\"');\n    return new links.Timeline.Item(data, {\n        'top': initialTop\n    });\n};\n\n/**\n * Edit an item\n * @param {Number} index\n * @param {Object} itemData     Object containing item properties:<br>\n *                              {Date} start (required),\n *                              {Date} end (optional),\n *                              {String} content (required),\n *                              {String} group (optional)\n * @param {boolean} [preventRender=false]   Do not re-render timeline if true\n */\nlinks.Timeline.prototype.changeItem = function (index, itemData, preventRender) {\n    var oldItem = this.items[index];\n    if (!oldItem) {\n        throw \"Cannot change item, index out of range\";\n    }\n\n    // replace item, merge the changes\n    var newItem = this.createItem({\n        'start':     itemData.hasOwnProperty('start') ?     itemData.start :     oldItem.start,\n        'end':       itemData.hasOwnProperty('end') ?       itemData.end :       oldItem.end,\n        'content':   itemData.hasOwnProperty('content') ?   itemData.content :   oldItem.content,\n        'group':     itemData.hasOwnProperty('group') ?     itemData.group :     this.getGroupName(oldItem.group),\n        'className': itemData.hasOwnProperty('className') ? itemData.className : oldItem.className,\n        'editable':  itemData.hasOwnProperty('editable') ?  itemData.editable :  oldItem.editable,\n        'type':      itemData.hasOwnProperty('type') ?      itemData.type :      oldItem.type\n    });\n    this.items[index] = newItem;\n\n    // append the changes to the render queue\n    this.renderQueue.hide.push(oldItem);\n    this.renderQueue.show.push(newItem);\n\n    // update the original data table\n    this.updateData(index, itemData);\n\n    // prepare data for clustering, by filtering and sorting by type\n    if (this.options.cluster) {\n        this.clusterGenerator.updateData();\n    }\n\n    if (!preventRender) {\n        // redraw timeline\n        this.render({\n            animate: false\n        });\n\n        if (this.selection && this.selection.index == index) {\n            newItem.select();\n        }\n    }\n};\n\n/**\n * Delete all groups\n */\nlinks.Timeline.prototype.deleteGroups = function () {\n    this.groups = [];\n    this.groupIndexes = {};\n};\n\n\n/**\n * Get a group by the group name. When the group does not exist,\n * it will be created.\n * @param {String} groupName   the name of the group\n * @return {Object} groupObject\n */\nlinks.Timeline.prototype.getGroup = function (groupName) {\n    var groups = this.groups,\n        groupIndexes = this.groupIndexes,\n        groupObj = undefined;\n\n    var groupIndex = groupIndexes[groupName];\n    if (groupIndex == undefined && groupName != undefined) { // not null or undefined\n        groupObj = {\n            'content': groupName,\n            'labelTop': 0,\n            'lineTop': 0\n            // note: this object will lateron get addition information, \n            //       such as height and width of the group         \n        };\n        groups.push(groupObj);\n        // sort the groups\n        groups = groups.sort(function (a, b) {\n            if (a.content > b.content) {\n                return 1;\n            }\n            if (a.content < b.content) {\n                return -1;\n            }\n            return 0;\n        });\n\n        // rebuilt the groupIndexes\n        for (var i = 0, iMax = groups.length; i < iMax; i++) {\n            groupIndexes[groups[i].content] = i;\n        }\n    }\n    else {\n        groupObj = groups[groupIndex];\n    }\n\n    return groupObj;\n};\n\n/**\n * Get the group name from a group object.\n * @param {Object} groupObj\n * @return {String} groupName   the name of the group, or undefined when group\n *                              was not provided\n */\nlinks.Timeline.prototype.getGroupName = function (groupObj) {\n    return groupObj ? groupObj.content : undefined;\n};\n\n/**\n * Cancel a change item\n * This method can be called insed an event listener which catches the \"change\"\n * event. The changed event position will be undone.\n */\nlinks.Timeline.prototype.cancelChange = function () {\n    this.applyChange = false;\n};\n\n/**\n * Cancel deletion of an item\n * This method can be called insed an event listener which catches the \"delete\"\n * event. Deletion of the event will be undone.\n */\nlinks.Timeline.prototype.cancelDelete = function () {\n    this.applyDelete = false;\n};\n\n\n/**\n * Cancel creation of a new item\n * This method can be called insed an event listener which catches the \"new\"\n * event. Creation of the new the event will be undone.\n */\nlinks.Timeline.prototype.cancelAdd = function () {\n    this.applyAdd = false;\n};\n\n\n/**\n * Select an event. The visible chart range will be moved such that the selected\n * event is placed in the middle.\n * For example selection = [{row: 5}];\n * @param {Array} selection   An array with a column row, containing the row\n *                           number (the id) of the event to be selected.\n * @return {boolean}         true if selection is succesfully set, else false.\n */\nlinks.Timeline.prototype.setSelection = function(selection) {\n    if (selection != undefined && selection.length > 0) {\n        if (selection[0].row != undefined) {\n            var index = selection[0].row;\n            if (this.items[index]) {\n                var item = this.items[index];\n                this.selectItem(index);\n\n                // move the visible chart range to the selected event.\n                var start = item.start;\n                var end = item.end;\n                var middle; // number\n                if (end != undefined) {\n                    middle = (end.valueOf() + start.valueOf()) / 2;\n                } else {\n                    middle = start.valueOf();\n                }\n                var diff = (this.end.valueOf() - this.start.valueOf()),\n                    newStart = new Date(middle - diff/2),\n                    newEnd = new Date(middle + diff/2);\n\n                this.setVisibleChartRange(newStart, newEnd);\n\n                return true;\n            }\n        }\n    }\n    else {\n        // unselect current selection\n        this.unselectItem();\n    }\n    return false;\n};\n\n/**\n * Retrieve the currently selected event\n * @return {Array} sel  An array with a column row, containing the row number\n *                      of the selected event. If there is no selection, an\n *                      empty array is returned.\n */\nlinks.Timeline.prototype.getSelection = function() {\n    var sel = [];\n    if (this.selection) {\n        sel.push({\"row\": this.selection.index});\n    }\n    return sel;\n};\n\n\n/**\n * Select an item by its index\n * @param {Number} index\n */\nlinks.Timeline.prototype.selectItem = function(index) {\n    this.unselectItem();\n\n    this.selection = undefined;\n\n    if (this.items[index] != undefined) {\n        var item = this.items[index],\n            domItem = item.dom;\n\n        this.selection = {\n            'index': index\n        };\n\n        if (item && item.dom) {\n            // TODO: move adjusting the domItem to the item itself\n            if (this.isEditable(item)) {\n                item.dom.style.cursor = 'move';\n            }\n            item.select();\n        }\n        this.repaintDeleteButton();\n        this.repaintDragAreas();\n    }\n};\n\n/**\n * Check if an item is currently selected\n * @param {Number} index\n * @return {boolean} true if row is selected, else false\n */\nlinks.Timeline.prototype.isSelected = function (index) {\n    return (this.selection && this.selection.index == index);\n};\n\n/**\n * Unselect the currently selected event (if any)\n */\nlinks.Timeline.prototype.unselectItem = function() {\n    if (this.selection) {\n        var item = this.items[this.selection.index];\n\n        if (item && item.dom) {\n            var domItem = item.dom;\n            domItem.style.cursor = '';\n            item.unselect();\n        }\n\n        this.selection = undefined;\n        this.repaintDeleteButton();\n        this.repaintDragAreas();\n    }\n};\n\n\n/**\n * Stack the items such that they don't overlap. The items will have a minimal\n * distance equal to options.eventMargin.\n * @param {boolean | undefined} animate    if animate is true, the items are\n *                                         moved to their new position animated\n *                                         defaults to false.\n */\nlinks.Timeline.prototype.stackItems = function(animate) {\n    if (this.groups.length > 0) {\n        // under this conditions we refuse to stack the events\n        // TODO: implement support for stacking items per group\n        return;\n    }\n\n    if (animate == undefined) {\n        animate = false;\n    }\n\n    // calculate the order and final stack position of the items\n    var stack = this.stack;\n    if (!stack) {\n        stack = {};\n        this.stack = stack;\n    }\n    stack.sortedItems = this.stackOrder(this.renderedItems);\n    stack.finalItems = this.stackCalculateFinal(stack.sortedItems);\n\n    if (animate || stack.timer) {\n        // move animated to the final positions\n        var timeline = this;\n        var step = function () {\n            var arrived = timeline.stackMoveOneStep(stack.sortedItems,\n                stack.finalItems);\n\n            timeline.repaint();\n\n            if (!arrived) {\n                stack.timer = setTimeout(step, 30);\n            }\n            else {\n                delete stack.timer;\n            }\n        };\n\n        if (!stack.timer) {\n            stack.timer = setTimeout(step, 30);\n        }\n    }\n    else {\n        // move immediately to the final positions\n        this.stackMoveToFinal(stack.sortedItems, stack.finalItems);\n    }\n};\n\n/**\n * Cancel any running animation\n */\nlinks.Timeline.prototype.stackCancelAnimation = function() {\n    if (this.stack && this.stack.timer) {\n        clearTimeout(this.stack.timer);\n        delete this.stack.timer;\n    }\n};\n\n\n/**\n * Order the items in the array this.items. The default order is determined via:\n * - Ranges go before boxes and dots.\n * - The item with the oldest start time goes first\n * If a custom function has been provided via the stackorder option, then this will be used.\n * @param {Array} items        Array with items\n * @return {Array} sortedItems Array with sorted items\n */\nlinks.Timeline.prototype.stackOrder = function(items) {\n    // TODO: store the sorted items, to have less work later on\n    var sortedItems = items.concat([]);\n\n    //if a customer stack order function exists, use it. \n    var f = this.options.customStackOrder && (typeof this.options.customStackOrder === 'function') ? this.options.customStackOrder : function (a, b)\n    {\n        if ((a instanceof links.Timeline.ItemRange) &&\n            !(b instanceof links.Timeline.ItemRange)) {\n            return -1;\n        }\n\n        if (!(a instanceof links.Timeline.ItemRange) &&\n            (b instanceof links.Timeline.ItemRange)) {\n            return 1;\n        }\n\n        return (a.left - b.left);\n    };\n\n    sortedItems.sort(f);\n\n    return sortedItems;\n};\n\n/**\n * Adjust vertical positions of the events such that they don't overlap each\n * other.\n * @param {timeline.Item[]} items\n * @return {Object[]} finalItems\n */\nlinks.Timeline.prototype.stackCalculateFinal = function(items) {\n    var i,\n        iMax,\n        size = this.size,\n        axisTop = size.axis.top,\n        axisHeight = size.axis.height,\n        options = this.options,\n        axisOnTop = options.axisOnTop,\n        eventMargin = options.eventMargin,\n        eventMarginAxis = options.eventMarginAxis,\n        finalItems = [];\n\n    // initialize final positions\n    for (i = 0, iMax = items.length; i < iMax; i++) {\n        var item = items[i],\n            top,\n            bottom,\n            height = item.height,\n            width = item.getWidth(this),\n            right = item.getRight(this),\n            left = right - width;\n\n        if (axisOnTop) {\n            top = axisHeight + eventMarginAxis + eventMargin / 2;\n        }\n        else {\n            top = axisTop - height - eventMarginAxis - eventMargin / 2;\n        }\n        bottom = top + height;\n\n        finalItems[i] = {\n            'left': left,\n            'top': top,\n            'right': right,\n            'bottom': bottom,\n            'height': height,\n            'item': item\n        };\n    }\n\n    if (this.options.stackEvents) {\n        // calculate new, non-overlapping positions\n        //var items = sortedItems;\n        for (i = 0, iMax = finalItems.length; i < iMax; i++) {\n            //for (var i = finalItems.length - 1; i >= 0; i--) {\n            var finalItem = finalItems[i];\n            var collidingItem = null;\n            do {\n                // TODO: optimize checking for overlap. when there is a gap without items,\n                //  you only need to check for items from the next item on, not from zero\n                collidingItem = this.stackItemsCheckOverlap(finalItems, i, 0, i-1);\n                if (collidingItem != null) {\n                    // There is a collision. Reposition the event above the colliding element\n                    if (axisOnTop) {\n                        finalItem.top = collidingItem.top + collidingItem.height + eventMargin;\n                    }\n                    else {\n                        finalItem.top = collidingItem.top - finalItem.height - eventMargin;\n                    }\n                    finalItem.bottom = finalItem.top + finalItem.height;\n                }\n            } while (collidingItem);\n        }\n    }\n\n    return finalItems;\n};\n\n\n/**\n * Move the events one step in the direction of their final positions\n * @param {Array} currentItems   Array with the real items and their current\n *                               positions\n * @param {Array} finalItems     Array with objects containing the final\n *                               positions of the items\n * @return {boolean} arrived     True if all items have reached their final\n *                               location, else false\n */\nlinks.Timeline.prototype.stackMoveOneStep = function(currentItems, finalItems) {\n    var arrived = true;\n\n    // apply new positions animated\n    for (i = 0, iMax = finalItems.length; i < iMax; i++) {\n        var finalItem = finalItems[i],\n            item = finalItem.item;\n\n        var topNow = parseInt(item.top);\n        var topFinal = parseInt(finalItem.top);\n        var diff = (topFinal - topNow);\n        if (diff) {\n            var step = (topFinal == topNow) ? 0 : ((topFinal > topNow) ? 1 : -1);\n            if (Math.abs(diff) > 4) step = diff / 4;\n            var topNew = parseInt(topNow + step);\n\n            if (topNew != topFinal) {\n                arrived = false;\n            }\n\n            item.top = topNew;\n            item.bottom = item.top + item.height;\n        }\n        else {\n            item.top = finalItem.top;\n            item.bottom = finalItem.bottom;\n        }\n\n        item.left = finalItem.left;\n        item.right = finalItem.right;\n    }\n\n    return arrived;\n};\n\n\n\n/**\n * Move the events from their current position to the final position\n * @param {Array} currentItems   Array with the real items and their current\n *                               positions\n * @param {Array} finalItems     Array with objects containing the final\n *                               positions of the items\n */\nlinks.Timeline.prototype.stackMoveToFinal = function(currentItems, finalItems) {\n    // Put the events directly at there final position\n    for (i = 0, iMax = finalItems.length; i < iMax; i++) {\n        var finalItem = finalItems[i],\n            current = finalItem.item;\n\n        current.left = finalItem.left;\n        current.top = finalItem.top;\n        current.right = finalItem.right;\n        current.bottom = finalItem.bottom;\n    }\n};\n\n\n\n/**\n * Check if the destiny position of given item overlaps with any\n * of the other items from index itemStart to itemEnd.\n * @param {Array} items      Array with items\n * @param {int}  itemIndex   Number of the item to be checked for overlap\n * @param {int}  itemStart   First item to be checked.\n * @param {int}  itemEnd     Last item to be checked.\n * @return {Object}          colliding item, or undefined when no collisions\n */\nlinks.Timeline.prototype.stackItemsCheckOverlap = function(items, itemIndex,\n                                                           itemStart, itemEnd) {\n    var eventMargin = this.options.eventMargin,\n        collision = this.collision;\n\n    // we loop from end to start, as we suppose that the chance of a \n    // collision is larger for items at the end, so check these first.\n    var item1 = items[itemIndex];\n    for (var i = itemEnd; i >= itemStart; i--) {\n        var item2 = items[i];\n        if (collision(item1, item2, eventMargin)) {\n            if (i != itemIndex) {\n                return item2;\n            }\n        }\n    }\n\n    return undefined;\n};\n\n/**\n * Test if the two provided items collide\n * The items must have parameters left, right, top, and bottom.\n * @param {Element} item1       The first item\n * @param {Element} item2       The second item\n * @param {Number}              margin  A minimum required margin. Optional.\n *                              If margin is provided, the two items will be\n *                              marked colliding when they overlap or\n *                              when the margin between the two is smaller than\n *                              the requested margin.\n * @return {boolean}            true if item1 and item2 collide, else false\n */\nlinks.Timeline.prototype.collision = function(item1, item2, margin) {\n    // set margin if not specified \n    if (margin == undefined) {\n        margin = 0;\n    }\n\n    // calculate if there is overlap (collision)\n    return (item1.left - margin < item2.right &&\n        item1.right + margin > item2.left &&\n        item1.top - margin < item2.bottom &&\n        item1.bottom + margin > item2.top);\n};\n\n\n/**\n * fire an event\n * @param {String} event   The name of an event, for example \"rangechange\" or \"edit\"\n */\nlinks.Timeline.prototype.trigger = function (event) {\n    // built up properties\n    var properties = null;\n    switch (event) {\n        case 'rangechange':\n        case 'rangechanged':\n            properties = {\n                'start': new Date(this.start.valueOf()),\n                'end': new Date(this.end.valueOf())\n            };\n            break;\n\n        case 'timechange':\n        case 'timechanged':\n            properties = {\n                'time': new Date(this.customTime.valueOf())\n            };\n            break;\n    }\n\n    // trigger the links event bus\n    links.events.trigger(this, event, properties);\n\n    // trigger the google event bus\n    if (google && google.visualization) {\n        google.visualization.events.trigger(this, event, properties);\n    }\n};\n\n\n/**\n * Cluster the events\n */\nlinks.Timeline.prototype.clusterItems = function () {\n    if (!this.options.cluster) {\n        return;\n    }\n\n    var clusters = this.clusterGenerator.getClusters(this.conversion.factor);\n    if (this.clusters != clusters) {\n        // cluster level changed\n        var queue = this.renderQueue;\n\n        // remove the old clusters from the scene\n        if (this.clusters) {\n            this.clusters.forEach(function (cluster) {\n                queue.hide.push(cluster);\n\n                // unlink the items\n                cluster.items.forEach(function (item) {\n                    item.cluster = undefined;\n                });\n            });\n        }\n\n        // append the new clusters\n        clusters.forEach(function (cluster) {\n            // don't add to the queue.show here, will be done in .filterItems()\n\n            // link all items to the cluster\n            cluster.items.forEach(function (item) {\n                item.cluster = cluster;\n            });\n        });\n\n        this.clusters = clusters;\n    }\n};\n\n/**\n * Filter the visible events\n */\nlinks.Timeline.prototype.filterItems = function () {\n    var queue = this.renderQueue,\n        window = (this.end - this.start),\n        start = new Date(this.start.valueOf() - window),\n        end = new Date(this.end.valueOf() + window);\n\n    function filter (arr) {\n        arr.forEach(function (item) {\n            var rendered = item.rendered;\n            var visible = item.isVisible(start, end);\n            if (rendered != visible) {\n                if (rendered) {\n                    queue.hide.push(item); // item is rendered but no longer visible\n                }\n                if (visible && (queue.show.indexOf(item) == -1)) {\n                    queue.show.push(item); // item is visible but neither rendered nor queued up to be rendered\n                }\n            }\n        });\n    }\n\n    // filter all items and all clusters\n    filter(this.items);\n    if (this.clusters) {\n        filter(this.clusters);\n    }\n};\n\n/** ------------------------------------------------------------------------ **/\n\n/**\n * @constructor links.Timeline.ClusterGenerator\n * Generator which creates clusters of items, based on the visible range in\n * the Timeline. There is a set of cluster levels which is cached.\n * @param {links.Timeline} timeline\n */\nlinks.Timeline.ClusterGenerator = function (timeline) {\n    this.timeline = timeline;\n    this.clear();\n};\n\n/**\n * Clear all cached clusters and data, and initialize all variables\n */\nlinks.Timeline.ClusterGenerator.prototype.clear = function () {\n    // cache containing created clusters for each cluster level\n    this.items = [];\n    this.groups = {};\n    this.clearCache();\n};\n\n/**\n * Clear the cached clusters\n */\nlinks.Timeline.ClusterGenerator.prototype.clearCache = function () {\n    // cache containing created clusters for each cluster level\n    this.cache = {};\n    this.cacheLevel = -1;\n    this.cache[this.cacheLevel] = [];\n};\n\n/**\n * Set the items to be clustered.\n * This will clear cached clusters.\n * @param {Item[]} items\n * @param {Object} [options]  Available options:\n *                            {boolean} applyOnChangedLevel\n *                                If true (default), the changed data is applied\n *                                as soon the cluster level changes. If false,\n *                                The changed data is applied immediately\n */\nlinks.Timeline.ClusterGenerator.prototype.setData = function (items, options) {\n    this.items = items || [];\n    this.dataChanged = true;\n    this.applyOnChangedLevel = true;\n    if (options && options.applyOnChangedLevel) {\n        this.applyOnChangedLevel = options.applyOnChangedLevel;\n    }\n    // console.log('clustergenerator setData applyOnChangedLevel=' + this.applyOnChangedLevel); // TODO: cleanup\n};\n\n/**\n * Update the current data set: clear cache, and recalculate the clustering for\n * the current level\n */\nlinks.Timeline.ClusterGenerator.prototype.updateData = function () {\n    this.dataChanged = true;\n    this.applyOnChangedLevel = false;\n};\n\n/**\n * Filter the items per group.\n * @private\n */\nlinks.Timeline.ClusterGenerator.prototype.filterData = function () {\n    // filter per group\n    var items = this.items || [];\n    var groups = {};\n    this.groups = groups;\n\n    // split the items per group\n    items.forEach(function (item) {\n        // put the item in the correct group\n        var groupName = item.group ? item.group.content : '';\n        var group = groups[groupName];\n        if (!group) {\n            group = [];\n            groups[groupName] = group;\n        }\n        group.push(item);\n\n        // calculate the center of the item\n        if (item.start) {\n            if (item.end) {\n                // range\n                item.center = (item.start.valueOf() + item.end.valueOf()) / 2;\n            }\n            else {\n                // box, dot\n                item.center = item.start.valueOf();\n            }\n        }\n    });\n\n    // sort the items per group\n    for (var groupName in groups) {\n        if (groups.hasOwnProperty(groupName)) {\n            groups[groupName].sort(function (a, b) {\n                return (a.center - b.center);\n            });\n        }\n    }\n\n    this.dataChanged = false;\n};\n\n/**\n * Cluster the events which are too close together\n * @param {Number} scale     The scale of the current window,\n *                           defined as (windowWidth / (endDate - startDate))\n * @return {Item[]} clusters\n */\nlinks.Timeline.ClusterGenerator.prototype.getClusters = function (scale) {\n    var level = -1,\n        granularity = 2, // TODO: what granularity is needed for the cluster levels?\n        timeWindow = 0,  // milliseconds\n        maxItems = 5;    // TODO: do not hard code maxItems\n\n    if (scale > 0) {\n        level = Math.round(Math.log(100 / scale) / Math.log(granularity));\n        timeWindow = Math.pow(granularity, level);\n\n        // groups must have a larger time window, as the items will not be stacked\n        if (this.timeline.groups && this.timeline.groups.length) {\n            timeWindow *= 4;\n        }\n    }\n\n    // clear the cache when and re-filter the data when needed.\n    if (this.dataChanged) {\n        var levelChanged = (level != this.cacheLevel);\n        var applyDataNow = this.applyOnChangedLevel ? levelChanged : true;\n        if (applyDataNow) {\n            // TODO: currently drawn clusters should be removed! mark them as invisible?\n            this.clearCache();\n            this.filterData();\n            // console.log('clustergenerator: cache cleared...'); // TODO: cleanup\n        }\n    }\n\n    this.cacheLevel = level;\n    var clusters = this.cache[level];\n    if (!clusters) {\n        // console.log('clustergenerator: create cluster level ' + level); // TODO: cleanup\n        clusters = [];\n\n        // TODO: spit this method, it is too large\n        for (var groupName in this.groups) {\n            if (this.groups.hasOwnProperty(groupName)) {\n                var items = this.groups[groupName];\n                var iMax = items.length;\n                var i = 0;\n                while (i < iMax) {\n                    // find all items around current item, within the timeWindow\n                    var item = items[i];\n                    var neighbors = 1;  // start at 1, to include itself)\n\n                    // loop through items left from the current item\n                    var j = i - 1;\n                    while (j >= 0 && (item.center - items[j].center) < timeWindow / 2) {\n                        if (!items[j].cluster) {\n                            neighbors++;\n                        }\n                        j--;\n                    }\n\n                    // loop through items right from the current item\n                    var k = i + 1;\n                    while (k < items.length && (items[k].center - item.center) < timeWindow / 2) {\n                        neighbors++;\n                        k++;\n                    }\n\n                    // loop through the created clusters\n                    var l = clusters.length - 1;\n                    while (l >= 0 && (item.center - clusters[l].center) < timeWindow / 2) {\n                        if (item.group == clusters[l].group) {\n                            neighbors++;\n                        }\n                        l--;\n                    }\n\n                    // aggregate until the number of items is within maxItems\n                    if (neighbors > maxItems) {\n                        // too busy in this window.\n                        var num = neighbors - maxItems + 1;\n                        var clusterItems = [];\n\n                        // append the items to the cluster,\n                        // and calculate the average start for the cluster\n                        var avg = undefined;  // number. average of all start dates\n                        var min = undefined;  // number. minimum of all start dates\n                        var max = undefined;  // number. maximum of all start and end dates\n                        var containsRanges = false;\n                        var count = 0;\n                        var m = i;\n                        while (clusterItems.length < num && m < items.length) {\n                            var p = items[m];\n                            var start = p.start.valueOf();\n                            var end = p.end ? p.end.valueOf() : p.start.valueOf();\n                            clusterItems.push(p);\n                            if (count) {\n                                // calculate new average (use fractions to prevent overflow)\n                                avg = (count / (count + 1)) * avg + (1 / (count + 1)) * p.center;\n                            }\n                            else {\n                                avg = p.center;\n                            }\n                            min = (min != undefined) ? Math.min(min, start) : start;\n                            max = (max != undefined) ? Math.max(max, end) : end;\n                            containsRanges = containsRanges || (p instanceof links.Timeline.ItemRange);\n                            count++;\n                            m++;\n                        }\n\n                        var cluster;\n                        var title = 'Cluster containing ' + count +\n                            ' events. Zoom in to see the individual events.';\n                        var content = '<div title=\"' + title + '\">' + count + ' events</div>';\n                        var group = item.group ? item.group.content : undefined;\n                        if (containsRanges) {\n                            // boxes and/or ranges\n                            cluster = this.timeline.createItem({\n                                'start': new Date(min),\n                                'end': new Date(max),\n                                'content': content,\n                                'group': group\n                            });\n                        }\n                        else {\n                            // boxes only\n                            cluster = this.timeline.createItem({\n                                'start': new Date(avg),\n                                'content': content,\n                                'group': group\n                            });\n                        }\n                        cluster.isCluster = true;\n                        cluster.items = clusterItems;\n                        cluster.items.forEach(function (item) {\n                            item.cluster = cluster;\n                        });\n\n                        clusters.push(cluster);\n                        i += num;\n                    }\n                    else {\n                        delete item.cluster;\n                        i += 1;\n                    }\n                }\n            }\n        }\n\n        this.cache[level] = clusters;\n    }\n\n    return clusters;\n};\n\n\n/** ------------------------------------------------------------------------ **/\n\n\n/**\n * Event listener (singleton)\n */\nlinks.events = links.events || {\n    'listeners': [],\n\n    /**\n     * Find a single listener by its object\n     * @param {Object} object\n     * @return {Number} index  -1 when not found\n     */\n    'indexOf': function (object) {\n        var listeners = this.listeners;\n        for (var i = 0, iMax = this.listeners.length; i < iMax; i++) {\n            var listener = listeners[i];\n            if (listener && listener.object == object) {\n                return i;\n            }\n        }\n        return -1;\n    },\n\n    /**\n     * Add an event listener\n     * @param {Object} object\n     * @param {String} event       The name of an event, for example 'select'\n     * @param {function} callback  The callback method, called when the\n     *                             event takes place\n     */\n    'addListener': function (object, event, callback) {\n        var index = this.indexOf(object);\n        var listener = this.listeners[index];\n        if (!listener) {\n            listener = {\n                'object': object,\n                'events': {}\n            };\n            this.listeners.push(listener);\n        }\n\n        var callbacks = listener.events[event];\n        if (!callbacks) {\n            callbacks = [];\n            listener.events[event] = callbacks;\n        }\n\n        // add the callback if it does not yet exist\n        if (callbacks.indexOf(callback) == -1) {\n            callbacks.push(callback);\n        }\n    },\n\n    /**\n     * Remove an event listener\n     * @param {Object} object\n     * @param {String} event       The name of an event, for example 'select'\n     * @param {function} callback  The registered callback method\n     */\n    'removeListener': function (object, event, callback) {\n        var index = this.indexOf(object);\n        var listener = this.listeners[index];\n        if (listener) {\n            var callbacks = listener.events[event];\n            if (callbacks) {\n                var index = callbacks.indexOf(callback);\n                if (index != -1) {\n                    callbacks.splice(index, 1);\n                }\n\n                // remove the array when empty\n                if (callbacks.length == 0) {\n                    delete listener.events[event];\n                }\n            }\n\n            // count the number of registered events. remove listener when empty\n            var count = 0;\n            var events = listener.events;\n            for (var e in events) {\n                if (events.hasOwnProperty(e)) {\n                    count++;\n                }\n            }\n            if (count == 0) {\n                delete this.listeners[index];\n            }\n        }\n    },\n\n    /**\n     * Remove all registered event listeners\n     */\n    'removeAllListeners': function () {\n        this.listeners = [];\n    },\n\n    /**\n     * Trigger an event. All registered event handlers will be called\n     * @param {Object} object\n     * @param {String} event\n     * @param {Object} properties (optional)\n     */\n    'trigger': function (object, event, properties) {\n        var index = this.indexOf(object);\n        var listener = this.listeners[index];\n        if (listener) {\n            var callbacks = listener.events[event];\n            if (callbacks) {\n                for (var i = 0, iMax = callbacks.length; i < iMax; i++) {\n                    callbacks[i](properties);\n                }\n            }\n        }\n    }\n};\n\n\n/** ------------------------------------------------------------------------ **/\n\n/**\n * @constructor  links.Timeline.StepDate\n * The class StepDate is an iterator for dates. You provide a start date and an\n * end date. The class itself determines the best scale (step size) based on the\n * provided start Date, end Date, and minimumStep.\n *\n * If minimumStep is provided, the step size is chosen as close as possible\n * to the minimumStep but larger than minimumStep. If minimumStep is not\n * provided, the scale is set to 1 DAY.\n * The minimumStep should correspond with the onscreen size of about 6 characters\n *\n * Alternatively, you can set a scale by hand.\n * After creation, you can initialize the class by executing start(). Then you\n * can iterate from the start date to the end date via next(). You can check if\n * the end date is reached with the function end(). After each step, you can\n * retrieve the current date via get().\n * The class step has scales ranging from milliseconds, seconds, minutes, hours,\n * days, to years.\n *\n * Version: 1.2\n *\n * @param {Date} start          The start date, for example new Date(2010, 9, 21)\n *                              or new Date(2010, 9, 21, 23, 45, 00)\n * @param {Date} end            The end date\n * @param {Number}  minimumStep Optional. Minimum step size in milliseconds\n */\nlinks.Timeline.StepDate = function(start, end, minimumStep) {\n\n    // variables\n    this.current = new Date();\n    this._start = new Date();\n    this._end = new Date();\n\n    this.autoScale  = true;\n    this.scale = links.Timeline.StepDate.SCALE.DAY;\n    this.step = 1;\n\n    // initialize the range\n    this.setRange(start, end, minimumStep);\n};\n\n/// enum scale\nlinks.Timeline.StepDate.SCALE = {\n    MILLISECOND: 1,\n    SECOND: 2,\n    MINUTE: 3,\n    HOUR: 4,\n    DAY: 5,\n    WEEKDAY: 6,\n    MONTH: 7,\n    YEAR: 8\n};\n\n\n/**\n * Set a new range\n * If minimumStep is provided, the step size is chosen as close as possible\n * to the minimumStep but larger than minimumStep. If minimumStep is not\n * provided, the scale is set to 1 DAY.\n * The minimumStep should correspond with the onscreen size of about 6 characters\n * @param {Date} start        The start date and time.\n * @param {Date} end          The end date and time.\n * @param {int}  minimumStep  Optional. Minimum step size in milliseconds\n */\nlinks.Timeline.StepDate.prototype.setRange = function(start, end, minimumStep) {\n    if (!(start instanceof Date) || !(end instanceof Date)) {\n        //throw  \"No legal start or end date in method setRange\";\n        return;\n    }\n\n    this._start = (start != undefined) ? new Date(start.valueOf()) : new Date();\n    this._end = (end != undefined) ? new Date(end.valueOf()) : new Date();\n\n    if (this.autoScale) {\n        this.setMinimumStep(minimumStep);\n    }\n};\n\n/**\n * Set the step iterator to the start date.\n */\nlinks.Timeline.StepDate.prototype.start = function() {\n    this.current = new Date(this._start.valueOf());\n    this.roundToMinor();\n};\n\n/**\n * Round the current date to the first minor date value\n * This must be executed once when the current date is set to start Date\n */\nlinks.Timeline.StepDate.prototype.roundToMinor = function() {\n    // round to floor\n    // IMPORTANT: we have no breaks in this switch! (this is no bug)\n    //noinspection FallthroughInSwitchStatementJS\n    switch (this.scale) {\n        case links.Timeline.StepDate.SCALE.YEAR:\n            this.current.setFullYear(this.step * Math.floor(this.current.getFullYear() / this.step));\n            this.current.setMonth(0);\n        case links.Timeline.StepDate.SCALE.MONTH:        this.current.setDate(1);\n        case links.Timeline.StepDate.SCALE.DAY:          // intentional fall through\n        case links.Timeline.StepDate.SCALE.WEEKDAY:      this.current.setHours(0);\n        case links.Timeline.StepDate.SCALE.HOUR:         this.current.setMinutes(0);\n        case links.Timeline.StepDate.SCALE.MINUTE:       this.current.setSeconds(0);\n        case links.Timeline.StepDate.SCALE.SECOND:       this.current.setMilliseconds(0);\n        //case links.Timeline.StepDate.SCALE.MILLISECOND: // nothing to do for milliseconds\n    }\n\n    if (this.step != 1) {\n        // round down to the first minor value that is a multiple of the current step size\n        switch (this.scale) {\n            case links.Timeline.StepDate.SCALE.MILLISECOND:  this.current.setMilliseconds(this.current.getMilliseconds() - this.current.getMilliseconds() % this.step);  break;\n            case links.Timeline.StepDate.SCALE.SECOND:       this.current.setSeconds(this.current.getSeconds() - this.current.getSeconds() % this.step); break;\n            case links.Timeline.StepDate.SCALE.MINUTE:       this.current.setMinutes(this.current.getMinutes() - this.current.getMinutes() % this.step); break;\n            case links.Timeline.StepDate.SCALE.HOUR:         this.current.setHours(this.current.getHours() - this.current.getHours() % this.step); break;\n            case links.Timeline.StepDate.SCALE.WEEKDAY:      // intentional fall through\n            case links.Timeline.StepDate.SCALE.DAY:          this.current.setDate((this.current.getDate()-1) - (this.current.getDate()-1) % this.step + 1); break;\n            case links.Timeline.StepDate.SCALE.MONTH:        this.current.setMonth(this.current.getMonth() - this.current.getMonth() % this.step);  break;\n            case links.Timeline.StepDate.SCALE.YEAR:         this.current.setFullYear(this.current.getFullYear() - this.current.getFullYear() % this.step); break;\n            default: break;\n        }\n    }\n};\n\n/**\n * Check if the end date is reached\n * @return {boolean}  true if the current date has passed the end date\n */\nlinks.Timeline.StepDate.prototype.end = function () {\n    return (this.current.valueOf() > this._end.valueOf());\n};\n\n/**\n * Do the next step\n */\nlinks.Timeline.StepDate.prototype.next = function() {\n    var prev = this.current.valueOf();\n\n    // Two cases, needed to prevent issues with switching daylight savings \n    // (end of March and end of October)\n    if (this.current.getMonth() < 6)   {\n        switch (this.scale) {\n            case links.Timeline.StepDate.SCALE.MILLISECOND:\n\n                this.current = new Date(this.current.valueOf() + this.step); break;\n            case links.Timeline.StepDate.SCALE.SECOND:       this.current = new Date(this.current.valueOf() + this.step * 1000); break;\n            case links.Timeline.StepDate.SCALE.MINUTE:       this.current = new Date(this.current.valueOf() + this.step * 1000 * 60); break;\n            case links.Timeline.StepDate.SCALE.HOUR:\n                this.current = new Date(this.current.valueOf() + this.step * 1000 * 60 * 60);\n                // in case of skipping an hour for daylight savings, adjust the hour again (else you get: 0h 5h 9h ... instead of 0h 4h 8h ...)\n                var h = this.current.getHours();\n                this.current.setHours(h - (h % this.step));\n                break;\n            case links.Timeline.StepDate.SCALE.WEEKDAY:      // intentional fall through\n            case links.Timeline.StepDate.SCALE.DAY:          this.current.setDate(this.current.getDate() + this.step); break;\n            case links.Timeline.StepDate.SCALE.MONTH:        this.current.setMonth(this.current.getMonth() + this.step); break;\n            case links.Timeline.StepDate.SCALE.YEAR:         this.current.setFullYear(this.current.getFullYear() + this.step); break;\n            default:                      break;\n        }\n    }\n    else {\n        switch (this.scale) {\n            case links.Timeline.StepDate.SCALE.MILLISECOND:  this.current = new Date(this.current.valueOf() + this.step); break;\n            case links.Timeline.StepDate.SCALE.SECOND:       this.current.setSeconds(this.current.getSeconds() + this.step); break;\n            case links.Timeline.StepDate.SCALE.MINUTE:       this.current.setMinutes(this.current.getMinutes() + this.step); break;\n            case links.Timeline.StepDate.SCALE.HOUR:         this.current.setHours(this.current.getHours() + this.step); break;\n            case links.Timeline.StepDate.SCALE.WEEKDAY:      // intentional fall through\n            case links.Timeline.StepDate.SCALE.DAY:          this.current.setDate(this.current.getDate() + this.step); break;\n            case links.Timeline.StepDate.SCALE.MONTH:        this.current.setMonth(this.current.getMonth() + this.step); break;\n            case links.Timeline.StepDate.SCALE.YEAR:         this.current.setFullYear(this.current.getFullYear() + this.step); break;\n            default:                      break;\n        }\n    }\n\n    if (this.step != 1) {\n        // round down to the correct major value\n        switch (this.scale) {\n            case links.Timeline.StepDate.SCALE.MILLISECOND:  if(this.current.getMilliseconds() < this.step) this.current.setMilliseconds(0);  break;\n            case links.Timeline.StepDate.SCALE.SECOND:       if(this.current.getSeconds() < this.step) this.current.setSeconds(0);  break;\n            case links.Timeline.StepDate.SCALE.MINUTE:       if(this.current.getMinutes() < this.step) this.current.setMinutes(0);  break;\n            case links.Timeline.StepDate.SCALE.HOUR:         if(this.current.getHours() < this.step) this.current.setHours(0);  break;\n            case links.Timeline.StepDate.SCALE.WEEKDAY:      // intentional fall through\n            case links.Timeline.StepDate.SCALE.DAY:          if(this.current.getDate() < this.step+1) this.current.setDate(1); break;\n            case links.Timeline.StepDate.SCALE.MONTH:        if(this.current.getMonth() < this.step) this.current.setMonth(0);  break;\n            case links.Timeline.StepDate.SCALE.YEAR:         break; // nothing to do for year\n            default:                break;\n        }\n    }\n\n    // safety mechanism: if current time is still unchanged, move to the end\n    if (this.current.valueOf() == prev) {\n        this.current = new Date(this._end.valueOf());\n    }\n};\n\n\n/**\n * Get the current datetime\n * @return {Date}  current The current date\n */\nlinks.Timeline.StepDate.prototype.getCurrent = function() {\n    return this.current;\n};\n\n/**\n * Set a custom scale. Autoscaling will be disabled.\n * For example setScale(SCALE.MINUTES, 5) will result\n * in minor steps of 5 minutes, and major steps of an hour.\n *\n * @param {links.Timeline.StepDate.SCALE} newScale\n *                               A scale. Choose from SCALE.MILLISECOND,\n *                               SCALE.SECOND, SCALE.MINUTE, SCALE.HOUR,\n *                               SCALE.WEEKDAY, SCALE.DAY, SCALE.MONTH,\n *                               SCALE.YEAR.\n * @param {Number}     newStep   A step size, by default 1. Choose for\n *                               example 1, 2, 5, or 10.\n */\nlinks.Timeline.StepDate.prototype.setScale = function(newScale, newStep) {\n    this.scale = newScale;\n\n    if (newStep > 0) {\n        this.step = newStep;\n    }\n\n    this.autoScale = false;\n};\n\n/**\n * Enable or disable autoscaling\n * @param {boolean} enable  If true, autoascaling is set true\n */\nlinks.Timeline.StepDate.prototype.setAutoScale = function (enable) {\n    this.autoScale = enable;\n};\n\n\n/**\n * Automatically determine the scale that bests fits the provided minimum step\n * @param {Number} minimumStep  The minimum step size in milliseconds\n */\nlinks.Timeline.StepDate.prototype.setMinimumStep = function(minimumStep) {\n    if (minimumStep == undefined) {\n        return;\n    }\n\n    var stepYear       = (1000 * 60 * 60 * 24 * 30 * 12);\n    var stepMonth      = (1000 * 60 * 60 * 24 * 30);\n    var stepDay        = (1000 * 60 * 60 * 24);\n    var stepHour       = (1000 * 60 * 60);\n    var stepMinute     = (1000 * 60);\n    var stepSecond     = (1000);\n    var stepMillisecond= (1);\n\n    // find the smallest step that is larger than the provided minimumStep\n    if (stepYear*1000 > minimumStep)        {this.scale = links.Timeline.StepDate.SCALE.YEAR;        this.step = 1000;}\n    if (stepYear*500 > minimumStep)         {this.scale = links.Timeline.StepDate.SCALE.YEAR;        this.step = 500;}\n    if (stepYear*100 > minimumStep)         {this.scale = links.Timeline.StepDate.SCALE.YEAR;        this.step = 100;}\n    if (stepYear*50 > minimumStep)          {this.scale = links.Timeline.StepDate.SCALE.YEAR;        this.step = 50;}\n    if (stepYear*10 > minimumStep)          {this.scale = links.Timeline.StepDate.SCALE.YEAR;        this.step = 10;}\n    if (stepYear*5 > minimumStep)           {this.scale = links.Timeline.StepDate.SCALE.YEAR;        this.step = 5;}\n    if (stepYear > minimumStep)             {this.scale = links.Timeline.StepDate.SCALE.YEAR;        this.step = 1;}\n    if (stepMonth*3 > minimumStep)          {this.scale = links.Timeline.StepDate.SCALE.MONTH;       this.step = 3;}\n    if (stepMonth > minimumStep)            {this.scale = links.Timeline.StepDate.SCALE.MONTH;       this.step = 1;}\n    if (stepDay*5 > minimumStep)            {this.scale = links.Timeline.StepDate.SCALE.DAY;         this.step = 5;}\n    if (stepDay*2 > minimumStep)            {this.scale = links.Timeline.StepDate.SCALE.DAY;         this.step = 2;}\n    if (stepDay > minimumStep)              {this.scale = links.Timeline.StepDate.SCALE.DAY;         this.step = 1;}\n    if (stepDay/2 > minimumStep)            {this.scale = links.Timeline.StepDate.SCALE.WEEKDAY;     this.step = 1;}\n    if (stepHour*4 > minimumStep)           {this.scale = links.Timeline.StepDate.SCALE.HOUR;        this.step = 4;}\n    if (stepHour > minimumStep)             {this.scale = links.Timeline.StepDate.SCALE.HOUR;        this.step = 1;}\n    if (stepMinute*15 > minimumStep)        {this.scale = links.Timeline.StepDate.SCALE.MINUTE;      this.step = 15;}\n    if (stepMinute*10 > minimumStep)        {this.scale = links.Timeline.StepDate.SCALE.MINUTE;      this.step = 10;}\n    if (stepMinute*5 > minimumStep)         {this.scale = links.Timeline.StepDate.SCALE.MINUTE;      this.step = 5;}\n    if (stepMinute > minimumStep)           {this.scale = links.Timeline.StepDate.SCALE.MINUTE;      this.step = 1;}\n    if (stepSecond*15 > minimumStep)        {this.scale = links.Timeline.StepDate.SCALE.SECOND;      this.step = 15;}\n    if (stepSecond*10 > minimumStep)        {this.scale = links.Timeline.StepDate.SCALE.SECOND;      this.step = 10;}\n    if (stepSecond*5 > minimumStep)         {this.scale = links.Timeline.StepDate.SCALE.SECOND;      this.step = 5;}\n    if (stepSecond > minimumStep)           {this.scale = links.Timeline.StepDate.SCALE.SECOND;      this.step = 1;}\n    if (stepMillisecond*200 > minimumStep)  {this.scale = links.Timeline.StepDate.SCALE.MILLISECOND; this.step = 200;}\n    if (stepMillisecond*100 > minimumStep)  {this.scale = links.Timeline.StepDate.SCALE.MILLISECOND; this.step = 100;}\n    if (stepMillisecond*50 > minimumStep)   {this.scale = links.Timeline.StepDate.SCALE.MILLISECOND; this.step = 50;}\n    if (stepMillisecond*10 > minimumStep)   {this.scale = links.Timeline.StepDate.SCALE.MILLISECOND; this.step = 10;}\n    if (stepMillisecond*5 > minimumStep)    {this.scale = links.Timeline.StepDate.SCALE.MILLISECOND; this.step = 5;}\n    if (stepMillisecond > minimumStep)      {this.scale = links.Timeline.StepDate.SCALE.MILLISECOND; this.step = 1;}\n};\n\n/**\n * Snap a date to a rounded value. The snap intervals are dependent on the\n * current scale and step.\n * @param {Date} date   the date to be snapped\n */\nlinks.Timeline.StepDate.prototype.snap = function(date) {\n    if (this.scale == links.Timeline.StepDate.SCALE.YEAR) {\n        var year = date.getFullYear() + Math.round(date.getMonth() / 12);\n        date.setFullYear(Math.round(year / this.step) * this.step);\n        date.setMonth(0);\n        date.setDate(0);\n        date.setHours(0);\n        date.setMinutes(0);\n        date.setSeconds(0);\n        date.setMilliseconds(0);\n    }\n    else if (this.scale == links.Timeline.StepDate.SCALE.MONTH) {\n        if (date.getDate() > 15) {\n            date.setDate(1);\n            date.setMonth(date.getMonth() + 1);\n            // important: first set Date to 1, after that change the month.      \n        }\n        else {\n            date.setDate(1);\n        }\n\n        date.setHours(0);\n        date.setMinutes(0);\n        date.setSeconds(0);\n        date.setMilliseconds(0);\n    }\n    else if (this.scale == links.Timeline.StepDate.SCALE.DAY ||\n        this.scale == links.Timeline.StepDate.SCALE.WEEKDAY) {\n        switch (this.step) {\n            case 5:\n            case 2:\n                date.setHours(Math.round(date.getHours() / 24) * 24); break;\n            default:\n                date.setHours(Math.round(date.getHours() / 12) * 12); break;\n        }\n        date.setMinutes(0);\n        date.setSeconds(0);\n        date.setMilliseconds(0);\n    }\n    else if (this.scale == links.Timeline.StepDate.SCALE.HOUR) {\n        switch (this.step) {\n            case 4:\n                date.setMinutes(Math.round(date.getMinutes() / 60) * 60); break;\n            default:\n                date.setMinutes(Math.round(date.getMinutes() / 30) * 30); break;\n        }\n        date.setSeconds(0);\n        date.setMilliseconds(0);\n    } else if (this.scale == links.Timeline.StepDate.SCALE.MINUTE) {\n        switch (this.step) {\n            case 15:\n            case 10:\n                date.setMinutes(Math.round(date.getMinutes() / 5) * 5);\n                date.setSeconds(0);\n                break;\n            case 5:\n                date.setSeconds(Math.round(date.getSeconds() / 60) * 60); break;\n            default:\n                date.setSeconds(Math.round(date.getSeconds() / 30) * 30); break;\n        }\n        date.setMilliseconds(0);\n    }\n    else if (this.scale == links.Timeline.StepDate.SCALE.SECOND) {\n        switch (this.step) {\n            case 15:\n            case 10:\n                date.setSeconds(Math.round(date.getSeconds() / 5) * 5);\n                date.setMilliseconds(0);\n                break;\n            case 5:\n                date.setMilliseconds(Math.round(date.getMilliseconds() / 1000) * 1000); break;\n            default:\n                date.setMilliseconds(Math.round(date.getMilliseconds() / 500) * 500); break;\n        }\n    }\n    else if (this.scale == links.Timeline.StepDate.SCALE.MILLISECOND) {\n        var step = this.step > 5 ? this.step / 2 : 1;\n        date.setMilliseconds(Math.round(date.getMilliseconds() / step) * step);\n    }\n};\n\n/**\n * Check if the current step is a major step (for example when the step\n * is DAY, a major step is each first day of the MONTH)\n * @return {boolean} true if current date is major, else false.\n */\nlinks.Timeline.StepDate.prototype.isMajor = function() {\n    switch (this.scale) {\n        case links.Timeline.StepDate.SCALE.MILLISECOND:\n            return (this.current.getMilliseconds() == 0);\n        case links.Timeline.StepDate.SCALE.SECOND:\n            return (this.current.getSeconds() == 0);\n        case links.Timeline.StepDate.SCALE.MINUTE:\n            return (this.current.getHours() == 0) && (this.current.getMinutes() == 0);\n        // Note: this is no bug. Major label is equal for both minute and hour scale\n        case links.Timeline.StepDate.SCALE.HOUR:\n            return (this.current.getHours() == 0);\n        case links.Timeline.StepDate.SCALE.WEEKDAY: // intentional fall through\n        case links.Timeline.StepDate.SCALE.DAY:\n            return (this.current.getDate() == 1);\n        case links.Timeline.StepDate.SCALE.MONTH:\n            return (this.current.getMonth() == 0);\n        case links.Timeline.StepDate.SCALE.YEAR:\n            return false;\n        default:\n            return false;\n    }\n};\n\n\n/**\n * Returns formatted text for the minor axislabel, depending on the current\n * date and the scale. For example when scale is MINUTE, the current time is\n * formatted as \"hh:mm\".\n * @param {Object} options\n * @param {Date} [date] custom date. if not provided, current date is taken\n */\nlinks.Timeline.StepDate.prototype.getLabelMinor = function(options, date) {\n    if (date == undefined) {\n        date = this.current;\n    }\n\n    switch (this.scale) {\n        case links.Timeline.StepDate.SCALE.MILLISECOND:  return String(date.getMilliseconds());\n        case links.Timeline.StepDate.SCALE.SECOND:       return String(date.getSeconds());\n        case links.Timeline.StepDate.SCALE.MINUTE:\n            return this.addZeros(date.getHours(), 2) + \":\" + this.addZeros(date.getMinutes(), 2);\n        case links.Timeline.StepDate.SCALE.HOUR:\n            return this.addZeros(date.getHours(), 2) + \":\" + this.addZeros(date.getMinutes(), 2);\n        case links.Timeline.StepDate.SCALE.WEEKDAY:      return options.DAYS_SHORT[date.getDay()] + ' ' + date.getDate();\n        case links.Timeline.StepDate.SCALE.DAY:          return String(date.getDate());\n        case links.Timeline.StepDate.SCALE.MONTH:        return options.MONTHS_SHORT[date.getMonth()];   // month is zero based\n        case links.Timeline.StepDate.SCALE.YEAR:         return String(date.getFullYear());\n        default:                                         return \"\";\n    }\n};\n\n\n/**\n * Returns formatted text for the major axislabel, depending on the current\n * date and the scale. For example when scale is MINUTE, the major scale is\n * hours, and the hour will be formatted as \"hh\".\n * @param {Object} options\n * @param {Date} [date] custom date. if not provided, current date is taken\n */\nlinks.Timeline.StepDate.prototype.getLabelMajor = function(options, date) {\n    if (date == undefined) {\n        date = this.current;\n    }\n\n    switch (this.scale) {\n        case links.Timeline.StepDate.SCALE.MILLISECOND:\n            return  this.addZeros(date.getHours(), 2) + \":\" +\n                this.addZeros(date.getMinutes(), 2) + \":\" +\n                this.addZeros(date.getSeconds(), 2);\n        case links.Timeline.StepDate.SCALE.SECOND:\n            return  date.getDate() + \" \" +\n                options.MONTHS[date.getMonth()] + \" \" +\n                this.addZeros(date.getHours(), 2) + \":\" +\n                this.addZeros(date.getMinutes(), 2);\n        case links.Timeline.StepDate.SCALE.MINUTE:\n            return  options.DAYS[date.getDay()] + \" \" +\n                date.getDate() + \" \" +\n                options.MONTHS[date.getMonth()] + \" \" +\n                date.getFullYear();\n        case links.Timeline.StepDate.SCALE.HOUR:\n            return  options.DAYS[date.getDay()] + \" \" +\n                date.getDate() + \" \" +\n                options.MONTHS[date.getMonth()] + \" \" +\n                date.getFullYear();\n        case links.Timeline.StepDate.SCALE.WEEKDAY:\n        case links.Timeline.StepDate.SCALE.DAY:\n            return  options.MONTHS[date.getMonth()] + \" \" +\n                date.getFullYear();\n        case links.Timeline.StepDate.SCALE.MONTH:\n            return String(date.getFullYear());\n        default:\n            return \"\";\n    }\n};\n\n/**\n * Add leading zeros to the given value to match the desired length.\n * For example addZeros(123, 5) returns \"00123\"\n * @param {int} value   A value\n * @param {int} len     Desired final length\n * @return {string}     value with leading zeros\n */\nlinks.Timeline.StepDate.prototype.addZeros = function(value, len) {\n    var str = \"\" + value;\n    while (str.length < len) {\n        str = \"0\" + str;\n    }\n    return str;\n};\n\n\n\n/** ------------------------------------------------------------------------ **/\n\n/**\n * Image Loader service.\n * can be used to get a callback when a certain image is loaded\n *\n */\nlinks.imageloader = (function () {\n    var urls = {};  // the loaded urls\n    var callbacks = {}; // the urls currently being loaded. Each key contains \n    // an array with callbacks\n\n    /**\n     * Check if an image url is loaded\n     * @param {String} url\n     * @return {boolean} loaded   True when loaded, false when not loaded\n     *                            or when being loaded\n     */\n    function isLoaded (url) {\n        if (urls[url] == true) {\n            return true;\n        }\n\n        var image = new Image();\n        image.src = url;\n        if (image.complete) {\n            return true;\n        }\n\n        return false;\n    }\n\n    /**\n     * Check if an image url is being loaded\n     * @param {String} url\n     * @return {boolean} loading   True when being loaded, false when not loading\n     *                             or when already loaded\n     */\n    function isLoading (url) {\n        return (callbacks[url] != undefined);\n    }\n\n    /**\n     * Load given image url\n     * @param {String} url\n     * @param {function} callback\n     * @param {boolean} sendCallbackWhenAlreadyLoaded  optional\n     */\n    function load (url, callback, sendCallbackWhenAlreadyLoaded) {\n        if (sendCallbackWhenAlreadyLoaded == undefined) {\n            sendCallbackWhenAlreadyLoaded = true;\n        }\n\n        if (isLoaded(url)) {\n            if (sendCallbackWhenAlreadyLoaded) {\n                callback(url);\n            }\n            return;\n        }\n\n        if (isLoading(url) && !sendCallbackWhenAlreadyLoaded) {\n            return;\n        }\n\n        var c = callbacks[url];\n        if (!c) {\n            var image = new Image();\n            image.src = url;\n\n            c = [];\n            callbacks[url] = c;\n\n            image.onload = function (event) {\n                urls[url] = true;\n                delete callbacks[url];\n\n                for (var i = 0; i < c.length; i++) {\n                    c[i](url);\n                }\n            }\n        }\n\n        if (c.indexOf(callback) == -1) {\n            c.push(callback);\n        }\n    }\n\n    /**\n     * Load a set of images, and send a callback as soon as all images are\n     * loaded\n     * @param {String[]} urls\n     * @param {function } callback\n     * @param {boolean} sendCallbackWhenAlreadyLoaded\n     */\n    function loadAll (urls, callback, sendCallbackWhenAlreadyLoaded) {\n        // list all urls which are not yet loaded\n        var urlsLeft = [];\n        urls.forEach(function (url) {\n            if (!isLoaded(url)) {\n                urlsLeft.push(url);\n            }\n        });\n\n        if (urlsLeft.length) {\n            // there are unloaded images\n            var countLeft = urlsLeft.length;\n            urlsLeft.forEach(function (url) {\n                load(url, function () {\n                    countLeft--;\n                    if (countLeft == 0) {\n                        // done!\n                        callback();\n                    }\n                }, sendCallbackWhenAlreadyLoaded);\n            });\n        }\n        else {\n            // we are already done!\n            if (sendCallbackWhenAlreadyLoaded) {\n                callback();\n            }\n        }\n    }\n\n    /**\n     * Recursively retrieve all image urls from the images located inside a given\n     * HTML element\n     * @param {Node} elem\n     * @param {String[]} urls   Urls will be added here (no duplicates)\n     */\n    function filterImageUrls (elem, urls) {\n        var child = elem.firstChild;\n        while (child) {\n            if (child.tagName == 'IMG') {\n                var url = child.src;\n                if (urls.indexOf(url) == -1) {\n                    urls.push(url);\n                }\n            }\n\n            filterImageUrls(child, urls);\n\n            child = child.nextSibling;\n        }\n    }\n\n    return {\n        'isLoaded': isLoaded,\n        'isLoading': isLoading,\n        'load': load,\n        'loadAll': loadAll,\n        'filterImageUrls': filterImageUrls\n    };\n})();\n\n\n/** ------------------------------------------------------------------------ **/\n\n\n/**\n * Add and event listener. Works for all browsers\n * @param {Element} element    An html element\n * @param {string}      action     The action, for example \"click\",\n *                                 without the prefix \"on\"\n * @param {function}    listener   The callback function to be executed\n * @param {boolean}     useCapture\n */\nlinks.Timeline.addEventListener = function (element, action, listener, useCapture) {\n    if (element.addEventListener) {\n        if (useCapture === undefined)\n            useCapture = false;\n\n        if (action === \"mousewheel\" && navigator.userAgent.indexOf(\"Firefox\") >= 0) {\n            action = \"DOMMouseScroll\";  // For Firefox\n        }\n\n        element.addEventListener(action, listener, useCapture);\n    } else {\n        element.attachEvent(\"on\" + action, listener);  // IE browsers\n    }\n};\n\n/**\n * Remove an event listener from an element\n * @param {Element}  element   An html dom element\n * @param {string}       action    The name of the event, for example \"mousedown\"\n * @param {function}     listener  The listener function\n * @param {boolean}      useCapture\n */\nlinks.Timeline.removeEventListener = function(element, action, listener, useCapture) {\n    if (element.removeEventListener) {\n        // non-IE browsers\n        if (useCapture === undefined)\n            useCapture = false;\n\n        if (action === \"mousewheel\" && navigator.userAgent.indexOf(\"Firefox\") >= 0) {\n            action = \"DOMMouseScroll\";  // For Firefox\n        }\n\n        element.removeEventListener(action, listener, useCapture);\n    } else {\n        // IE browsers\n        element.detachEvent(\"on\" + action, listener);\n    }\n};\n\n\n/**\n * Get HTML element which is the target of the event\n * @param {Event} event\n * @return {Element} target element\n */\nlinks.Timeline.getTarget = function (event) {\n    // code from http://www.quirksmode.org/js/events_properties.html\n    if (!event) {\n        event = window.event;\n    }\n\n    var target;\n\n    if (event.target) {\n        target = event.target;\n    }\n    else if (event.srcElement) {\n        target = event.srcElement;\n    }\n\n    if (target.nodeType != undefined && target.nodeType == 3) {\n        // defeat Safari bug\n        target = target.parentNode;\n    }\n\n    return target;\n};\n\n/**\n * Stop event propagation\n */\nlinks.Timeline.stopPropagation = function (event) {\n    if (!event)\n        event = window.event;\n\n    if (event.stopPropagation) {\n        event.stopPropagation();  // non-IE browsers\n    }\n    else {\n        event.cancelBubble = true;  // IE browsers\n    }\n};\n\n\n/**\n * Cancels the event if it is cancelable, without stopping further propagation of the event.\n */\nlinks.Timeline.preventDefault = function (event) {\n    if (!event)\n        event = window.event;\n\n    if (event.preventDefault) {\n        event.preventDefault();  // non-IE browsers\n    }\n    else {\n        event.returnValue = false;  // IE browsers\n    }\n};\n\n\n/**\n * Retrieve the absolute left value of a DOM element\n * @param {Element} elem        A dom element, for example a div\n * @return {number} left        The absolute left position of this element\n *                              in the browser page.\n */\nlinks.Timeline.getAbsoluteLeft = function(elem) {\n    var doc = document.documentElement;\n    var body = document.body;\n\n    var left = elem.offsetLeft;\n    var e = elem.offsetParent;\n    while (e != null && e != body && e != doc) {\n        left += e.offsetLeft;\n        left -= e.scrollLeft;\n        e = e.offsetParent;\n    }\n    return left;\n};\n\n/**\n * Retrieve the absolute top value of a DOM element\n * @param {Element} elem        A dom element, for example a div\n * @return {number} top        The absolute top position of this element\n *                              in the browser page.\n */\nlinks.Timeline.getAbsoluteTop = function(elem) {\n    var doc = document.documentElement;\n    var body = document.body;\n\n    var top = elem.offsetTop;\n    var e = elem.offsetParent;\n    while (e != null && e != body && e != doc) {\n        top += e.offsetTop;\n        top -= e.scrollTop;\n        e = e.offsetParent;\n    }\n    return top;\n};\n\n/**\n * Get the absolute, vertical mouse position from an event.\n * @param {Event} event\n * @return {Number} pageY\n */\nlinks.Timeline.getPageY = function (event) {\n    if (('targetTouches' in event) && event.targetTouches.length) {\n        event = event.targetTouches[0];\n    }\n\n    if ('pageY' in event) {\n        return event.pageY;\n    }\n\n    // calculate pageY from clientY\n    var clientY = event.clientY;\n    var doc = document.documentElement;\n    var body = document.body;\n    return clientY +\n        ( doc && doc.scrollTop || body && body.scrollTop || 0 ) -\n        ( doc && doc.clientTop || body && body.clientTop || 0 );\n};\n\n/**\n * Get the absolute, horizontal mouse position from an event.\n * @param {Event} event\n * @return {Number} pageX\n */\nlinks.Timeline.getPageX = function (event) {\n    if (('targetTouches' in event) && event.targetTouches.length) {\n        event = event.targetTouches[0];\n    }\n\n    if ('pageX' in event) {\n        return event.pageX;\n    }\n\n    // calculate pageX from clientX\n    var clientX = event.clientX;\n    var doc = document.documentElement;\n    var body = document.body;\n    return clientX +\n        ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -\n        ( doc && doc.clientLeft || body && body.clientLeft || 0 );\n};\n\n/**\n * Adds one or more className's to the given elements style\n * @param {Element} elem\n * @param {String} className\n */\nlinks.Timeline.addClassName = function(elem, className) {\n    var classes = elem.className.split(' ');\n    var classesToAdd = className.split(' ');\n    \n    var added = false;\n    for (var i=0; i<classesToAdd.length; i++) {\n        if (classes.indexOf(classesToAdd[i]) == -1) {\n            classes.push(classesToAdd[i]); // add the class to the array\n            added = true;\n        }\n    }\n    \n    if (added) {\n        elem.className = classes.join(' ');\n    }\n};\n\n/**\n * Removes one or more className's from the given elements style\n * @param {Element} elem\n * @param {String} className\n */\nlinks.Timeline.removeClassName = function(elem, className) {\n    var classes = elem.className.split(' ');\n    var classesToRemove = className.split(' ');\n    \n    var removed = false;\n    for (var i=0; i<classesToRemove.length; i++) {\n        var index = classes.indexOf(classesToRemove[i]);\n        if (index != -1) {\n            classes.splice(index, 1); // remove the class from the array\n            removed = true;\n        }\n    }\n    \n    if (removed) {\n        elem.className = classes.join(' ');\n    }\n};\n\n/**\n * Check if given object is a Javascript Array\n * @param {*} obj\n * @return {Boolean} isArray    true if the given object is an array\n */\n// See http://stackoverflow.com/questions/2943805/javascript-instanceof-typeof-in-gwt-jsni\nlinks.Timeline.isArray = function (obj) {\n    if (obj instanceof Array) {\n        return true;\n    }\n    return (Object.prototype.toString.call(obj) === '[object Array]');\n};\n\n/**\n * parse a JSON date\n * @param {Date | String | Number} date    Date object to be parsed. Can be:\n *                                         - a Date object like new Date(),\n *                                         - a long like 1356970529389,\n *                                         an ISO String like \"2012-12-31T16:16:07.213Z\",\n *                                         or a .Net Date string like\n *                                         \"\\/Date(1356970529389)\\/\"\n * @return {Date} parsedDate\n */\nlinks.Timeline.parseJSONDate = function (date) {\n    if (date == undefined) {\n        return undefined;\n    }\n\n    //test for date\n    if (date instanceof Date) {\n        return date;\n    }\n\n    // test for MS format.\n    // FIXME: will fail on a Number\n    var m = date.match(/\\/Date\\((-?\\d+)([-\\+]?\\d{2})?(\\d{2})?\\)\\//i);\n    if (m) {\n        var offset = m[2]\n            ? (3600000 * m[2]) // hrs offset\n            + (60000 * m[3] * (m[2] / Math.abs(m[2]))) // mins offset\n            : 0;\n\n        return new Date(\n            (1 * m[1]) // ticks\n                + offset\n        );\n    }\n\n    // failing that, try to parse whatever we've got.\n    return Date.parse(date);\n};\n"
  },
  {
    "path": "sample_dashboards/timezones.json",
    "content": "{\n  \"title\": \"Timezone Dashboard\",\n  \"description\": \"Shows off the dashboard feature of Php Reports\",\n  \"reports\": [\n    {\n      \"report\": \"php/timezones.php\",\n      \"title\": \"ACST Timezone\",\n      \"macros\": {\n        \"region\": \"acst\"\n      },\n      \"format\": \"html\",\n      \"newRow\": false,\n      \"style\": \"max-height: 400px; overflow-y: auto; overflow-x: hidden;\",\n      \"class\": \"col-md-6\"\n    },\n    {\n      \"report\": \"php/timezones.php\",\n      \"title\": \"CDT Timezone\",\n      \"macros\": {\n        \"region\": \"cdt\"\n      },\n      \"format\": \"chart\",\n      \"newRow\": false,\n      \"class\": \"col-md-6\"\n    }\n  ]\n}\n"
  },
  {
    "path": "sample_reports/ado/README.txt",
    "content": "Reports written in SQL. \nAdoDB library is responsible for making and maintaining the DB connectivity. Some additional extensions for PHP can be neccessary in order to work with certain databases.\n"
  },
  {
    "path": "sample_reports/ado/TITLE.txt",
    "content": "AdoDB based Reports\n"
  },
  {
    "path": "sample_reports/ado/names.ado",
    "content": "-- Registration times\n--\n-- VARIABLE: { \n--      name: \"range\", \n--      display: \"Report Range\",\n--      type: \"daterange\", \n--      default: { start: \"-1 year\", end: \"yesterday\" }\n-- }\n-- VARIABLE: {\n--      name: \"batch\",\n--      type: \"select\",\n--      database_options: {\n--          table: \"blocked_accounts\",\n--          column: \"batch\",\n--          all: false\n--      }\n-- }\n\nSELECT \n\tDATE_FORMAT(registraTion_date, '%Y-%m-%d') AS czas, \n\tCOUNT(*) AS liczba\nFROM \n\tblocked_accounts\nWHERE \n\tregistration_date BETWEEN '{{ range.start }}' AND '{{ range.end }}'\n\tAND batch='{{batch}}'\nGROUP BY \n\tczas\nORDER BY \n\tczas DESC;\n"
  },
  {
    "path": "sample_reports/ado/names.pivot",
    "content": "-- Registration types per day\n--\n-- INFO: {\n--      created: \"2013-08-14\"\n-- }\n-- OPTIONS: {\n--      database: \"ado\"\n-- }\n-- VARIABLE: { \n--      name: \"range\", \n--      display: \"Report Range\",\n--      type: \"daterange\", \n--      default: { start: \"-120 day\", end: \"yesterday\" }\n-- }\n\ntables: blocked_accounts\nrows: DATE_FORMAT(registration_date, '%Y-%m-%d') AS \"Registration date\"\ncolumns: batch\nwhere: registration_date BETWEEN \"{{ range.start }}\" AND \"{{ range.end }}\"\n#agg_field: uid\n#agg_label: Number of\nagg_fun: SUM\nshow_count: true\n"
  },
  {
    "path": "sample_reports/mongodb/README.txt",
    "content": "Reports run in the MongoDB Shell.  mongo-client is required for these reports, but the PHP extension is not.\n"
  },
  {
    "path": "sample_reports/mongodb/TITLE.txt",
    "content": "MongoDB Reports\n"
  },
  {
    "path": "sample_reports/mongodb/log-events.js",
    "content": "// Last 50 Log Events\n// OPTIONS: { mongodatabase: \"Logs\" }\n\nvar result = db.logs.find({}).limit(50).sort({date: -1});\n\n// Build report rows\nvar rows = [];\nresult.forEach(function(el) {\n    rows.push({\n        'Date': el.date,\n        'Description': el.description\n    });\n});\n\n// Print out the rows\nprintjson(rows);\n"
  },
  {
    "path": "sample_reports/mysql/README.txt",
    "content": "Reports written in SQL.  The mysql or mysqli PHP extension is required for these reports.\n"
  },
  {
    "path": "sample_reports/mysql/TITLE.txt",
    "content": "MySQL Reports\n"
  },
  {
    "path": "sample_reports/mysql/all-orders.sql",
    "content": "-- All Orders\n-- This report lets you view all orders within a specified time period.\n-- You can click on a customer name to drill down into all orders for that customer.\n-- VARIABLE: { \n--      name: \"range\", \n--      display: \"Report Range\",\n--      type: \"daterange\", \n--      default: { start: \"yesterday\", end: \"yesterday\" }\n-- }\n-- FILTER: { \n--      column: \"Customer Name\", \n--      filter: \"drilldown\",\n--      params: {\n--          macros: { \"id\": { column: \"Customer Id\" } },\n--          report: \"drilldown/customer-orders.sql\"\n--      }\n-- }\n\nSELECT\n    order_id as `Order Id`,\n    created_at as `Order Date`,\n    CONCAT(customer_fname, \" \", customer_lname) as `Customer Name`,\n    customer_id as `Customer Id`,\n    grand_total as `Grand Total`,\n    status as `Order Status`\nFROM\n    orders\nWHERE\n    created_at BETWEEN \"{{ range.start }}\" AND \"{{ range.end }}\"\n"
  },
  {
    "path": "sample_reports/mysql/drilldown/customer-orders.sql",
    "content": "-- All Orders For a Customer\n-- This is a drilldown report that lists all orders for a given customer\n-- VARIABLE: { name: \"id\", display: \"Customer Id\" }\n\nSELECT\n    order_id as `Order Id`,\n    created_at as `Order Date`,\n    grand_total as `Grand Total`,\n    status as `Order Status`\nFROM\n    orders\nWHERE\n    customer_id = \"{{ id }}\"\n"
  },
  {
    "path": "sample_reports/php/README.txt",
    "content": "Reports written in PHP.  \nThis is useful for merging data between different sources, \npulling in data from APIs, \nand doing complex processing that is out of the scope of SQL.\n"
  },
  {
    "path": "sample_reports/php/TITLE.txt",
    "content": "PHP Reports\n"
  },
  {
    "path": "sample_reports/php/functions.php",
    "content": "<?php\n// Helper PHP Functions\n// This report is never run on it's own.\n// It is only ever used when it's included from within other reports\n// OPTIONS: { ignore: true }\n\n/**\n * Gets the mean and median from an array\n * @param $array array An array of associative arrays.\n * @param $key string The key of numeric data for each element of $array\n * @return array An associative array containing the keys: \"sum\", \"mean\", and \"median\"\n */\nfunction array_stats($array, $key) {\n    $numbers = array();\n    foreach($array as $el) {\n        if(isset($el[$key]) && is_numeric($el[$key])) {\n            $numbers[] = $el[$key];\n        }\n    }\n    \n    if(!$numbers) return array(\n        'sum'=>0,\n        'mean'=>0,\n        'median'=>0\n    );\n    \n    // This is horribly inefficient, but that's ok for demo purposes\n    return array(\n        'sum'=>array_sum($numbers),\n        'median'=>(count($numbers)%2)? \n            ($numbers[count($numbers)/2] + $numbers[count($numbers)/2+1])/2 : \n            $numbers[ceil(count($numbers)/2)],\n        'mean'=>(array_sum($numbers) / count($numbers))\n    );\n}\n"
  },
  {
    "path": "sample_reports/php/timezones.php",
    "content": "<?php\n// Get Timezones Contained In a Region\n// INCLUDE: {report: \"functions.php\"}\n// VARIABLE: {\n//      name: \"region\",\n//      display: \"Region Code\",\n//      type: \"select\",\n//      options: [\"cdt\",\"acst\",\"pdt\"],\n//      default: \"acst\"\n// }\n// CHART: {type: \"LineChart\"}\n\n$timezone_abbreviations = DateTimeZone::listAbbreviations();\n\n// If an invalid timezone abbreviation is passed in, show an error to the user\nif(!isset($timezone_abbreviations[$region])) throw new Exception(\"Invalid region - \".$region);\n\n// Build report rows\n$rows = array();\nforeach($timezone_abbreviations[$region] as $timezone) {\n    $rows[] = array(\n        'Timezone'=>$timezone['timezone_id'],\n        'Offset'=>$timezone['offset']/3600\n    );\n}\n\n// Add an AVERAGE Row at the bottom\n// The array_stats function is defined in the included report functions.php\n// This is just a demo.  Normally, you would just use the ROLLUP header for something like this\n$stats = array_stats($rows, 'Offset');\n$rows[] = array(\n    'Timezone'=>'AVERAGE',\n    'Offset'=>$stats['mean']\n);\n\n// Output the rows\necho json_encode($rows);\n"
  },
  {
    "path": "sample_reports/php/timezones_multiple.php",
    "content": "<?php\n// Get All Timezones By Region\n// VARIABLE: {\n//      name: \"regions\",\n//      multiple: true,\n//      display: \"Region Code\",\n//      type: \"select\",\n//      options: [\"cdt\",\"acst\",\"pdt\"],\n//      default: \"acst\"\n// }\n// OPTIONS: selectable=Timezone\n// ROLLUP: {columns: {Timezone: \"AVERAGE\", Offset: \"{{mean}}\"}, dataset: true}\n\n$timezone_abbreviations = DateTimeZone::listAbbreviations();\n\n// Build report dataset\n$datasets = array();\n$limit = 5;\n$i=0;\nforeach($regions as $region) {\n    $timezones = $timezone_abbreviations[$region];\n    \n    $dataset = array(\n        'rows'=>array(),\n        'title'=>$region\n    );\n    foreach($timezones as $timezone) {\n        $dataset['rows'][] = array(\n            'Timezone'=>$timezone['timezone_id'],\n            'Offset'=>$timezone['offset']/3600\n        );\n    }\n    \n    $datasets[] = $dataset;\n}\n\n// Output the rows\necho json_encode($datasets);\n"
  },
  {
    "path": "templates/default/csv/report.twig",
    "content": "{% for value in DataSets[dataset].rows[0].values %}{% if not loop.first %},{% endif %}\"{{value.key}}\"{% endfor %}\n\n{% for row in DataSets[dataset].rows %}{% for value in row.values %}{% if not loop.first %},{% endif %}\n\"{{ value.getValue()|replace({'\"':'\"\"'})|raw }}\"{% endfor %}\n\n{% endfor %}\n"
  },
  {
    "path": "templates/default/html/blank_page.twig",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\">\n    <title>{% block title %}{{ title }}{% endblock %}</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    {% block stylesheets %}{% endblock %}\n    {% block javascripts %}{% endblock %}\n  </head>\n\n  <body>\n    <div class=\"container\">\n\t\t<div class='header'>\n\t\t{% block header %}\n\t\t\t{{ header|raw }}\n\t\t{% endblock %}\n\t\t</div>\n\n\t\t{% block notice_area %}\n\t\t\t{% if error %}\n\t\t\t\t<pre class='alert alert-danger'>\n\t\t\t\t\t{%- if error.message is defined -%}\n\t\t\t\t\t\t{{error.message|raw}}\n\t\t\t\t\t{%- else -%}\n\t\t\t\t\t\t{{error|raw}}\n\t\t\t\t\t{%- endif -%}\n\t\t\t\t</pre>\n\t\t\t{% endif %}\n\n\t\t\t{% if notice %}\n\t\t\t\t<div class='alert alert-info'>\n\t\t\t\t\t{{notice}}\n\t\t\t\t</div>\n\t\t\t{% endif %}\n\t\t{% endblock %}\n\n\t\t<div id='content'>\n\t\t{% block content %}\n\t\t\t{{content|raw}}\n\t\t{% endblock %}\n\t\t</div>\n    </div> <!-- /container -->\n  </body>\n</html>\n"
  },
  {
    "path": "templates/default/html/chart_page.twig",
    "content": "{% extends \"html/blank_page.twig\" %}\n{% block javascripts %}\n\t<script type=\"text/javascript\" src=\"https://www.gstatic.com/charts/loader.js\"></script>\n    <script src=\"{{base}}/public/js/jquery-2.0.3.min.js\"></script>\n\t<script>\n  google.charts.load('current', {packages:[\"corechart\",\"geochart\",\"annotatedtimeline\",\"gauge\",\"gantt\",\"bar\",\"line\"]});\n\t</script>\n    <script src=\"{{ base }}/public/js/timeline.js\"></script>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"{{ base }}/public/css/timeline.css\">\n    <style>\n\t#content > div > table {\n\t    margin-left: auto !important;\n\t    margin-right: auto !important;\n\t}\n    </style>\n{% endblock %}\n{% block stylesheets %}\n{{ parent() }}\n<style>\nbody {\n    padding: 0;\n    margin: 0;\n}\n</style>\n{% endblock %}\n"
  },
  {
    "path": "templates/default/html/chart_report.twig",
    "content": "{% extends \"html/chart_page.twig\" %}\n\n{% block content %}\n\t{% for chart in Charts %}\n\t<div id='chart_div_{{chart.num}}' style='{% if chart.width %}width:{{chart.width}};{% endif %}{% if chart.height %}height:{{chart.height}};{% endif %}'></div>\n\t{% endfor %}\n\t\n\t<script type=\"text/javascript\">\n\tfunction drawCharts() {\n\t\t{% for chart in Charts %}\n\t\t\tvar data_{{chart.num}} = new google.visualization.DataTable();\n\t\t\t\t\t\n\t\t\t{% for key,value in chart.Rows[0].values %}\n                {% if chart.roles[key] %} \n                    data_{{chart.num}}.addColumn({{chart.roles[key]|json_encode|raw}});\n                {% else %}\n                    data_{{chart.num}}.addColumn(\"{{chart.datatypes[key]}}\",\"{{chart.Rows[0].values[key].key}}\");\n                {% endif %}\n\t\t\t{% endfor %}\n\t\t\n\t\t\tvar rows = [\n\t\t\t\t{% for row in chart.Rows %}[\n\t\t\t\t\t{% for value in row.values %}\n\t\t\t\t\t\t{%- if value.datatype == \"date\" or value.datatype == \"datetime\" -%}\n\t\t\t\t\t\tnew Date(\"{{ value.getValue()|replace({'\\\\':'\\\\\\\\','\"':'\\\\\"' })|raw }}\")\n\t\t\t\t\t\t{%- elseif value.datatype == \"timeofday\" -%}\n\t\t\t\t\t\t[{{ (value.getValue()|slice(0,2))*1 }}, {{ (value.getValue()|slice(3,2))*1 }}, {{ (value.getValue()|slice(6,2))*1 }}, 0]\n\t\t\t\t\t\t{%- elseif value.datatype == \"null\" -%}\n\t\t\t\t\t\tnull\n\t\t\t\t\t\t{%- elseif value.datatype == \"number\" -%}\n\t\t\t\t\t\t{{ value.getValue() }}\n\t\t\t\t\t\t{%- else -%}\n\t\t\t\t\t\t\"{{ value.getValue()|replace({'\\\\':'\\\\\\\\','\"':'\\\\\"' })|raw }}\"\n\t\t\t\t\t\t{%- endif %}\n\t\t\t\t\t\t{%- if not loop.last %},{% endif -%}\n\t\t\t\t\t{% endfor %}\n\t\t\t\t\t\n\t\t\t\t]{% if not loop.last %},{% endif %}\n\n\t\t\t\t{% endfor %}];\n\n\t\t\n\t\t\tdata_{{chart.num}}.addRows(rows);\n\n            // create columns array\n            var columns_{{chart.num}} = [];\n            var series_{{chart.num}} = {};\n            for (var i = 0; i < data_{{chart.num}}.getNumberOfColumns(); i++) {\n                columns_{{chart.num}}.push(i);\n                if (i > 0) {\n                    series_{{chart.num}}[i - 1] = {};\n                }\n            }\n\n            var options_{{chart.num}} = {\n\t\t\t\ttitle: '{{chart.title}}',\n\t\t\t\t{% if chart.markers %}\n\t\t\t\t\tdisplayMode: 'markers',\n\t\t\t\t\tcolorAxis: {colors: ['blue', 'red']},\n\t\t\t\t\tsizeAxis: {minValue: 1,  maxSize:  10},\n\t\t\t\t{% endif %}\n\t\t\t\tdisplayAnnotations: true,\n                series: series_{{chart.num}},\n\t\t\t\tcolors: [],\n\t\t\t\twmode: 'transparent'\n\t\t\t};\n\n        {% if chart.options %}\n        {% for k,v in chart.options %}\n            options_{{ chart.num}}[\"{{ k }}\"] = {{ v|json_encode|raw }};\n        {% endfor %}\n        {% endif %}\n\t\t\t\n\t\t\t{% for color in chart.colors %}\n\t\t\t\toptions_{{chart.num}}.colors.push('{{color}}');\n\t\t\t{% endfor %}\n\n\t\t\tif(!options_{{chart.num}}.colors.length) {\n\t\t\t\tdelete options_{{chart.num}}.colors;\n\t\t\t}\n\n\t\tif(Array.isArray(options_{{ chart.num }}.series)) {\n\t\t\tvar t = options_{{ chart.num }}.series;\n\t\t\tvar n = {};\n\t\t\tfor(var i=0;i<t.length;i++) {\n\t\t\t    n[i+''] = t[i];\n\t\t\t}\n\t\t\toptions_{{ chart.num }}.series = n;\n\t\t}\n\n\n        {% if chart.type == \"Timeline\" %}\n            var chart_{{chart.num}} = new links.Timeline(document.getElementById('chart_div_{{chart.num}}'));\n        {% elseif chart.type == \"Bar\" or chart.type == \"Line\" %}\n          var chart_{{chart.num}} = new google.charts.{{chart.type}}(document.getElementById('chart_div_{{chart.num}}'));\n          options_{{chart.num}} = google.charts.{{chart.type}}.convertOptions(options_{{chart.num}});\n        {% else %}\n          var chart_{{chart.num}} = new google.visualization.{{chart.type}}(document.getElementById('chart_div_{{chart.num}}'));\n        {% endif %}\n\n        chart_{{chart.num}}.draw(data_{{chart.num}}, options_{{chart.num}});\n\t\t{% endfor %}\n\t}\n\n\tgoogle.charts.setOnLoadCallback(drawCharts);\n\t</script>\n{% endblock %}\n"
  },
  {
    "path": "templates/default/html/content_only.twig",
    "content": "{% block notice_area %}\n\t{% if error %}\n\t\t<div class='alert alert-danger'>\n\t\t\t{{error}}\n\t\t</div>\n\t{% endif %}\n\n\t{% if notice %}\n\t\t<div class='alert alert-info'>\n\t\t\t{{notice}}\n\t\t</div>\n\t{% endif %}\n{% endblock %}\n\n{% block content %}\n\t{% if not error %}\n\t\t{% include \"html/report_content.twig\" %}\n\t{% endif %}\n{% endblock %}\n"
  },
  {
    "path": "templates/default/html/dashboard.twig",
    "content": "{% extends \"html/page.twig\" %}\n\n{% block title %}{{dashboard.title | default('Dashboard')}}{% endblock %}\n\n{% block header %}\n<h2>{{dashboard.title}}</h2>\n{% if dashboard.description %}<p>{{dashboard.description|raw}}</p>{% endif %}\n{% endblock %}\n\n{% block content %}\n<div id='reports_holder'>\n\n</div>\n{% endblock %}\n\n{% block stylesheets %}\n  {{ parent() }}\n  <style>\n  #content {\n   width: auto;\n  }\n  #reports_holder {\n    margin-top: 20px;\n  }\n  .rendered {\n    font-size: .7em;\n    padding-left: 8px;\n  }\n  h2.report-title {\n    margin: 0;\n    padding: 0;\n  }\n  </style>\n  {% if dashboard.style %}\n  <style type=\"text/css\">\n    {{ dashboard.style|raw }}\n  </style>\n  {% endif %}\n{% endblock %}\n\n{% block javascripts %}\n{{ parent() }}\n<script type='text/javascript' src='{{base}}/public/js/jquery.dataTables.min.js'></script>\n<script type=\"text/javascript\" src=\"{{base}}/public/js/moment-with-langs-2.5.1.min.js\"></script>\n<script type=\"text/javascript\" src=\"{{base}}/public/js/daterangepicker-1.3.2.js\"></script>\n<script type=\"text/javascript\" src=\"{{base}}/public/js/bootstrap-datepicker.js\"></script>\n<script type=\"text/javascript\" src=\"{{base}}/public/js/bootstrap-multiselect.js\"></script>\n<script type=\"text/javascript\" src=\"{{base}}/public/js/prettify.js\"></script>\n<script type=\"text/javascript\" src=\"{{base}}/public/js/lang-sql.js\"></script>\n<script type=\"text/javascript\" src=\"{{base}}/public/js/jquery.browser.js\"></script>\n<script type=\"text/javascript\" src=\"{{base}}/public/js/jquery.iframe-auto-height.plugin.1.9.3.js\"></script>\n<script type=\"text/javascript\">\n    $(\"#content\").on('click','a[data-role=\"button\"]',function(e) {\n        e.preventDefault();\n    });\n</script>\n<script>\nvar dashboard = {{ dashboard|json_encode|raw }};\n\nvar last_row = $(\"<div class='row'>\").appendTo($(\"#reports_holder\"));\n\nif(dashboard.refresh) {\n  window.setTimeout(function() {\n    window.location.reload(true);\n  },dashboard.refresh*1000);\n}\n\n$.each(dashboard.reports, function(i,report) {\n  if(i && report.newRow) {\n    last_row = $(\"<div class='row'>\").appendTo($(\"#reports_holder\"));\n  }\n  \n  var container = $(\"<div class='report-holder'>\").appendTo(last_row);\n  \n  if(report.class) container.addClass(report.class);  \n  \n  var report_data = {\n    macros: report.macros || {},\n    report: report.report\n  };\n  \n  \n  if(report.title) {\n    container.append($(\"<h2 class='report-title'>\").text(report.title));\n  }\n  container.append(\"<div class='info'><a class='full-link' href='{{base}}/report/html/?\"+$.param(report_data)+\"'>View full report</a><span class='rendered'></span></div>\");\n  \n  if(report.description) {\n    container.append($(\"<p class='description'>\").text(report.description));\n  }\n\n  var holder;\n\n  var render = function() {\n    if(!report.format || report.format === 'html' || report.format === 'table') {\n      var report_url = \"{{base}}/report/html\";\n      \n      // Loading message\n      holder.html(\"<p>Loading...</p>\");\n      \n      $.get(report_url,report_data,function(response) {\n        holder.empty().html(response);\n      });\n    }\n    else {\n      holder.attr('src',\"{{base}}/report/\"+report.format+\"?\"+$.param(report_data));\n    }\n  };\n      \n  if(!report.format || report.format === 'html' || report.format === 'table') {\n    holder = $(\"<div>\").appendTo(container);    \n    report_data.content_only = true;\n    report_data.no_charts = true;\n    \n    if(report.style) holder.attr('style',report.style);\n  }\n  else {\n    holder = $(\"<iframe>\").appendTo(container).css({\n      border: 0,\n      width: '100%'\n    }).on('load',function() {\n\t$(this).height($(this).get(0).contentWindow.document.body.scrollHeight);\n\t$(this).width($(this).get(0).contentWindow.document.body.scrollWidth);\n    });\n    \n    if(report.style) holder.attr('style',holder.attr('style')+';'+report.style);\n  }\n  \n\n  var render_date = new Date();\n  var rendered_span = $('.rendered',container);\n  if(report.refresh) {\n    window.setInterval(function() {\n      render();\n      render_date = new Date();\n      rendered_span.attr('title','refreshed at '+render_date.toTimeString().substr(0,8)).text('last refreshed 0 seconds ago');\n    },report.refresh*1000);\n\n    var refreshRenderDate = function() {\n      var date = new Date();\n      var diff = Math.floor((date.getTime() - render_date.getTime())/1000);\n      console.log(diff);\n\n      if(diff < 60) {\n        rendered_span.text('last refreshed '+diff+' seconds ago');\n        window.setTimeout(refreshRenderDate,5000);\n      }\n      else if(diff < 300) {\n        rendered_span.text('last refreshed '+Math.floor(diff/60)+' minute'+(diff>=120?'s':'')+((diff%60)?' '+diff%60+' second'+((diff%60 !== 1)?'s':'') : '')+' ago');\n        window.setTimeout(refreshRenderDate,20000);\n      }\n      else if(diff < 3600) {\n        rendered_span.text('last refreshed '+Math.floor(diff/60)+' minutes ago');\n        window.setTimeout(refreshRenderDate,60000);\n      }\n      else if(diff < 84600){\n        rendered_span.text('last refreshed '+Math.floor(diff/3600)+' hour'+(diff>=7200?'s':'')+' ago');\n        window.setTimeout(refreshRenderDate,600000);\n      }\n      else {\n        rendered_span.text('last refreshed more than 1 day ago');\n      }\n    };\n    window.setTimeout(refreshRenderDate,5000);\n  }\n  render();\n\n  \n});\n\n\n</script>\n{% endblock %}\n"
  },
  {
    "path": "templates/default/html/dashboard_list.twig",
    "content": "{% extends \"html/page.twig\" %}\n\n{% block title %}Dashboard List{% endblock %}\n\n{% set breadcrumb = {\"Dashboard List\": true} %}\n\n{% block header %}\n<h2>Dashboards</h2>\n{% endblock %}\n\n{% block content %}\n<div class=\"row\">\n<ul>\n  {% for key, dashboard in dashboards %}\n  <li><a href='{{base}}/dashboard/{{key}}'>{{dashboard.title}}</a></li>\n  {% endfor %}\n</ul>\n</div>\n{% endblock %}\n"
  },
  {
    "path": "templates/default/html/page.twig",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\">\n    <title>{% block title %}{{ title }}{% endblock %}</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\n    <!-- Le styles -->\n    {% block stylesheets %}\n    <link id=\"bootstrap\" href=\"{{base}}/public/css/bootstrap.{{theme}}.min.css\" rel=\"stylesheet\">\n    <link href=\"{{ base }}/public/css/typeahead.js-bootstrap.css\" rel=\"stylesheet\">\n    <style>\n      body {\n        padding-top: 80px; /* 60px to make the container go all the way to the bottom of the topbar */\n      }\n      .container {\n          max-width: 100% !important;\n          padding: 0 20px;\n      }\n      table {\n        max-width: none !important;\n      }\n      #content {\n        width: 98%;\n      }\n      form input, form textarea, form select {\n        max-width: 100%;\n      }\n    </style>\n\t{% endblock %}\n\n\t<script>\n\t\t//this allows us to create onReady functions in the body before loading jquery\n\t\twindow.queued_jquery_calls = [];\n\t\twindow.$ = function(func) {\n\t\t\twindow.queued_jquery_calls.push(func);\n\t\t}\n\t</script>\n\n    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->\n    <!--[if lt IE 9]>\n      <script src=\"{{base}}/public/js/html5shiv.js\"></script>\n      <script src=\"{{base}}/public/js/respond.min.js\"></script>\n    <![endif]-->\n\n    <!-- Fav and touch icons -->\n    <!--\n    <link rel=\"apple-touch-icon-precomposed\" sizes=\"144x144\" href=\"../assets/ico/apple-touch-icon-144-precomposed.png\">\n    <link rel=\"apple-touch-icon-precomposed\" sizes=\"114x114\" href=\"../assets/ico/apple-touch-icon-114-precomposed.png\">\n      <link rel=\"apple-touch-icon-precomposed\" sizes=\"72x72\" href=\"../assets/ico/apple-touch-icon-72-precomposed.png\">\n                    <link rel=\"apple-touch-icon-precomposed\" href=\"../assets/ico/apple-touch-icon-57-precomposed.png\">\n                                   <link rel=\"shortcut icon\" href=\"../assets/ico/favicon.png\">\n\t -->\n  </head>\n\n  <body>\t\n    <div class=\"navbar navbar-default navbar-fixed-top\">\n        <div class=\"container\">\n            <div class=\"navbar-header\">\n                <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-collapse\">\n                    <span class=\"icon-bar\"></span>\n                    <span class=\"icon-bar\"></span>\n                    <span class=\"icon-bar\"></span>\n                </button>\n                <a class=\"navbar-brand\" href=\"{{base}}\">{% block brand %}PHP Reports{% endblock %}</a>\n            </div>\n            <div class=\"navbar-collapse collapse\">\n                <ul class=\"nav navbar-nav\">\n                {% block navdropdown %}\n                    {% if recent_reports %}\n                    <li class=\"dropdown\">\n                        <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">Recently Run <b class=\"caret\"></b></a>\n                        <ul class=\"dropdown-menu\">\n                            {% for recent_report in recent_reports %}\n                                <li><a href=\"{{ recent_report.url }}\">{{ recent_report.Name }}</a></li>\n                            {% endfor %}\n                        </ul>\n                    </li>\n                    {% endif %}\n                {% endblock %}\n                </ul>\n                {% block searchbar %}\n                <form class=\"navbar-form navbar-left\" role=\"search\">\n                    <div class=\"form-group\">\n                        <input type=\"text\" class=\"form-control search-query\" placeholder=\"Find Report...\">\n                    </div>\n                </form>\n                {% endblock %}\n\n                {% block navbar %}{% endblock %}\n\n                {% block environment_chooser %}\n                    {% if config.environments|length > 1 %}\n                    <script type=\"text/javascript\">\n                    function change_environment(environment) {\n                        $.getJSON('{{ base }}/set-environment', {\n                            environment: environment\n                        })\n                        .success(function() {\n                            $('#environment > strong').text(environment);\n                            $('ul#environments-list li').each(function() {\n                                if ($(this).hasClass('active') && $(this).children().text() != environment) {\n                                    $(this).removeClass('active');\n                                }\n                                if ($(this).children().text() == environment) {\n                                    $(this).addClass('active');\n                                }\n                            });\n                        });\n                    }\n                    </script>\n                    <ul class=\"nav navbar-nav navbar-right\">\n                        <li class=\"dropdown\">\n                            <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" id=\"environment\">Environment: <strong>{{ environment }}</strong> <b class=\"caret\"></b></a>\n                            <ul class=\"dropdown-menu\" id=\"environments-list\">\n                            {% for option in config.environments|keys %}\n                                <li{% if option == environment %} class=\"active\"{% endif %}><a href=\"#\" onclick=\"change_environment('{{option}}')\">{{option}}</a></li>\n                            {% endfor %}\n                            </ul>\n                        </li>\n                    </ul>\n                    {% endif %}\n            {% endblock %}\n            {% block theme_switcher %}\n                {% if config.bootstrap_themelist|length > 1 %}\n                    <script type=\"text/javascript\">\n                        function changeTheme(theme) {\n                            $('#bootstrap').attr('href', '{{ base }}/public/css/bootstrap.' + theme + '.min.css');\n                            $.cookie('reports-theme', theme, {path: '{{path}}', expires: 365});\n                            $('#theme-swtich > strong').text(theme);\n                            $('ul#themes-list li').each(function(){\n                                if ($(this).hasClass('active') && $(this).children().text() != theme) {\n                                    $(this).removeClass('active');\n                                }\n                                if ($(this).children().text() == theme) {\n                                    $(this).addClass('active');\n                                }\n                            });\n                        }\n                    </script>\n                    <ul class=\"nav navbar-nav navbar-right\">\n                        <li class=\"dropdown\">\n                            <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" id=\"theme-swtich\">Theme: <strong>{{ theme }}</strong> <b class=\"caret\"></b></a>\n                            <ul class=\"dropdown-menu\" id=\"themes-list\">\n                                {% for option in config.bootstrap_themelist %}\n                                    <li{% if option == theme %} class=\"active\"{% endif %}><a href=\"#\" onclick=\"changeTheme('{{option}}')\">{{option}}</a></li>\n                                {% endfor %}\n                            </ul>\n                        </li>\n                    </ul>\n                {% endif %}\n            {% endblock %}\n        </div>\n      </div>\n    </div>\n\n    <div class=\"container\">\n\t\t<div class=\"header\">\n\t\t{% block header %}\n\t\t\t{{ header|raw }}\n\t\t{% endblock %}\n\t\t</div>\n\t\t\n\n\t\t{% block notice_area %}\n\t\t\t{% if error %}\n\t\t\t\t<div class=\"alert alert-danger\">\n\t\t\t\t\t{% if error.message is defined %}\n\t\t\t\t\t\t{{error.message}}\n\t\t\t\t\t{% else %}\n\t\t\t\t\t\t{{error}}\n\t\t\t\t\t{% endif %}\n\t\t\t\t</div>\n\t\t\t{% endif %}\n\n\t\t\t{% if notice %}\n\t\t\t\t<div class=\"alert alert-info\">\n\t\t\t\t\t{{notice}}\n\t\t\t\t</div>\n\t\t\t{% endif %}\n\t\t{% endblock %}\n\n\t\t<div id=\"content\">\n\t\t{% block content %}\n\t\t\t{{content|raw}}\n\t\t{% endblock %}\n\t\t</div>\n    </div> <!-- /container -->\n\n    <!-- Le javascript\n    ================================================== -->\n    <!-- Placed at the end of the document so the pages load faster -->\n    {% block javascripts %}\n    <!--[if lt IE 9]>\n    <script src=\"{{base}}/public/js/jquery-1.10.2.min.js\"></script>\n    <![endif]-->\n    <!--[if (gte IE 9) | (!IE)]><!-->\n    <script src=\"{{base}}/public/js/jquery-2.0.3.min.js\"></script>\n    <!--<![endif]-->\n    <script src=\"{{base}}/public/js/bootstrap-3.0.min.js\"></script>\n    <script src=\"{{base}}/public/js/jquery.cookie.js\"></script>\n    <script src=\"{{base}}/public/js/typeahead.min.js\"></script>\n\t<script src=\"{{base}}/public/js/scripts.js\"></script>\n    <script>\n\t\t//typeahead report search\n\t\t(function() {\n            var data = new Dataset({\n                prefetch: {\n                    url: '{{ base }}/report-list-json',\n                    ttl: 0\n                },\n                valueKey: 'name',\n                sorter: function(a,b) {\n                    var val = $('form[role=\"search\"] input.search-query').typeahead('val')[0];\n\n                    //beginning of title match\n                    var beg = new RegExp('^'+val,'i');\n                    //word boundary match\n                    var word = new RegExp('\\b'+val,'i');\n\n                    //weights for components of the sort algorithm\n                    var popweight = 2;\n                    var wordweight = 10;\n                    var begweight = 15;\n\n                    //popularity\n                    var popa = a.popularity;\n                    var popb = b.popularity;\n\n                    //beginning of string match\n                    var bega = beg.test(a.name);\n                    var begb = beg.test(b.name);\n\n                    //beginning of word match\n                    var worda = !bega && word.test(a.name);\n                    var wordb = !begb && word.test(b.name);\n\n                    //determine score\n                    var scorea = popa*popweight + bega*begweight + worda*wordweight;\n                    var scoreb = popb*popweight + begb*begweight + wordb*wordweight;\n\n                    return scoreb - scorea;\n                }\n            });\n\n            $('form[role=\"search\"] input.search-query').typeahead({\n                sections: [{\n                    source: data,\n                    highlight: true\n                }]\n            }).on('typeahead:selected',function(e,obj) {\n                window.location.href = obj.url;\n            });\n\t\t})();\n    </script>\n\t{% endblock %}\n\t<script>\n\t\t//run any queued on-ready scripts\n\t\tfor(var i in queued_jquery_calls) {\n\t\t\t$(queued_jquery_calls[i]);\n\t\t}\n\t</script>\n  </body>\n</html>\n"
  },
  {
    "path": "templates/default/html/report.twig",
    "content": "{% extends \"html/page.twig\" %}\n\n{% set collapse_configuration = is_ready %}\n\n{% block title %}{{ Name }}{% endblock %}\n\n{% block stylesheets %}\n    {{ parent() }}\n    <link rel='stylesheet' href='{{base}}/public/css/report.css' />\n    {% if not nodata %}\n        <link rel='stylesheet' href='{{base}}/public/css/jquery.dataTables.css' />\n    {% endif %}\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"{{base}}/public/css/daterangepicker-bs3.css\" />\n    <link rel=\"stylesheet\" media=\"screen\" type=\"text/css\" href=\"{{base}}/public/css/datepicker.css\" />\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"{{base}}/public/css/bootstrap-multiselect.css\" />\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"{{base}}/public/css/prettify.css\" />\n    <style>\n    /*.daterangepicker_holder {\n        background: white;\n        -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .25), inset 0 -1px 0 rgba(0, 0, 0, .1);\n        -moz-box-shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);\n        box-shadow: 0 1px 3px rgba(0, 0, 0, .25), inset 0 -1px 0 rgba(0, 0, 0, .1);\n        color: #333;\n        padding: 8px;\n        line-height: 18px;\n        cursor: pointer;\n    }\n    .daterangepicker_holder .caret {\n        margin-top: 8px;\n        margin-left: 2px;\n    }*/\n    </style>\n{% endblock %}\n\n{% block javascripts %}\n    {{ parent() }}\n    {% if has_charts %}\n        <script type=\"text/javascript\" src=\"{{base}}/public/js/jquery.browser.js\"></script>\n        <script type=\"text/javascript\" src=\"{{base}}/public/js/jquery.iframe-auto-height.plugin.1.9.3.js\"></script>\n    {% endif %}\n    {% if not nodata %}\n        <script type='text/javascript' src='{{base}}/public/js/jquery.dataTables.min.js'></script>\n    {% endif %}\n    <script type=\"text/javascript\" src=\"{{base}}/public/js/moment-with-langs-2.5.1.min.js\"></script>\n    <script type=\"text/javascript\" src=\"{{base}}/public/js/daterangepicker-1.3.2.js\"></script>\n    <script type=\"text/javascript\" src=\"{{base}}/public/js/bootstrap-datepicker.js\"></script>\n    <script type=\"text/javascript\" src=\"{{base}}/public/js/bootstrap-multiselect.js\"></script>\n    <script type=\"text/javascript\" src=\"{{base}}/public/js/jquery.stickytableheaders.js\"></script>\n    <script type=\"text/javascript\" src=\"{{base}}/public/js/prettify.js\"></script>\n    <script type=\"text/javascript\" src=\"{{base}}/public/js/lang-sql.js\"></script>\n    <script type=\"text/javascript\">\n        $(\"#content\").on('click','a[data-role=\"button\"]',function(e) {\n            e.preventDefault();\n        });\n    </script>\n{% endblock %}\n\n{% block header %}\n    <h1>{{Name}}</h1>\n    {% if Description %}\n        <p id='report_description'>{{Description|raw}}</p>\n    {% endif %}\n    \n    {% if Variables is not empty %}\n        {% include \"html/variable_form.twig\" %}\n    {% endif %}\n{% endblock %}\n\n{% block content %}\n    {% if is_ready %}\n        <div class='row export_links' style='margin: 10px 0;'>\n        {% block export_links %}\n            {% block download_link %}\n                {% if config.report_formats|length > 1 %}\n                    {% if DataSets|length > 1 %}All Report Tables:{% endif %}\n                    <div class=\"btn-group\">\n                        <button type=\"button\" class=\"btn btn-primary btn-sm dropdown-toggle\" data-toggle=\"dropdown\">\n                            <i class='icon-download'></i> Download/show as <span class=\"caret\"></span>\n                        </button>\n                        <ul class=\"dropdown-menu\" role=\"menu\">\n                        {% for format in config.report_formats|keys %}\n                            {% if config.report_formats[format] == 'divider' %}\n                            <li class=\"divider\"></li>\n                            {% elseif DataSets|length <= 1 or format != 'csv' %}\n                                <li><a href='{{base}}/report/{{format}}/?{% if DataSets|length > 1 %}datasets=all&{% endif %}{{report_querystring}}' class='report_link'>{{config.report_formats[format]}}</a></li>\n                            {% endif %}\n                        {% endfor %}\n                        </ul>\n                    </div>\n                {% else %}\n                    <a href='{{base}}/report/{{config.report_formats|keys[0]}}/?{{report_querystring}}' class='report_link btn'>\n                        <i class='icon-download'></i> Download {{config.report_formats[config.report_formats|keys[0]]}}\n                    </a>\n                {% endif %}\n            {% endblock %}\n            {% if config.mail_settings.enabled %}\n                {% block email_report_button %}\n                    <a data-toggle=\"modal\" href=\"#email-modal\" class=\"btn btn-primary btn-sm\"><i class='icon-envelope'></i> Email Report</a>\n                    <div class=\"modal fade\" id=\"email-modal\">\n                        <div class=\"modal-dialog\">\n                            <div class=\"modal-content\">\n                                <div class=\"modal-header\">\n                                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\n                                    <h4 class=\"modal-title\">Email Report</h4>\n                                </div>\n                                <div class=\"modal-body\">\n                                    <div class=\"alert alert-danger\" id=\"email-report-modal-alert\" style=\"display: none;\"></div>\n                                    <p>A CSV file will be attached and a link will be sent</p>\n\n                                    <form class=\"form-horizontal\" role=\"form\">\n                                        <div class=\"form-group\">\n                                            <label class=\"col-lg-5\" for='email-report-modal-email'>Recipient Email Address</label>\n                                            <div class=\"col-lg-7\">\n                                                <input type='email' id='email-report-modal-email' class='form-control' value='' />\n                                            </div>\n                                        </div>\n                                        <div class=\"form-group\">\n                                            <label class=\"col-lg-5\" for='email-report-modal-subject'>Subject</label>\n                                            <div class=\"col-lg-7\">\n                                                <input type='text' id='email-report-modal-subject' class='form-control' value=\"Database Report - {{Name}}\" />\n                                            </div>\n                                        </div>\n                                        <div class=\"form-group\">\n                                            <label class=\"col-lg-5\" for='email-report-modal-message'>Message (optional)</label>\n                                            <div class=\"col-lg-7\">\n                                                <textarea rows='4' id='email-report-modal-message' class='form-control'></textarea>\n                                            </div>\n                                        </div>\n                                    </form>\n                                </div>\n                                <div class=\"modal-footer\">\n                                    <button type=\"button\" class=\"btn\" data-dismiss=\"modal\">Cancel</button>\n                                    <button type=\"submit\" id=\"sendReport\" class=\"btn btn-primary submit-button\" data-loading-text=\"Sending\">Send Email</button>\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                    <script>\n                        $(function() {\n                            $('#sendReport').on('click', function() {\n                                var button = $(this);\n                                button.button('loading');\n\n                                var data = {\n                                    email: $('#email-report-modal-email').val(),\n                                    subject: $('#email-report-modal-subject').val(),\n                                    message: $('#email-report-modal-message').val(),\n                                    url: window.location.href\n                                };\n\n                                $.getJSON('{{base}}/email',data,function(response) {\n                                    if(response && response.success) {\n                                        $('#email-modal').modal('hide');\n\n                                        //show success message\n                                        $('#email-report-success-message').show(300).delay(5000).hide(300);\n                                    }\n                                    else {\n                                        var error = (response && response.error)? response.error : \"There was a problem sending the email\";\n                                        $('#email-report-modal-alert').text(error).show(300);\n                                    }\n                                    button.button('reset');\n                                })\n                                .error(function() {\n                                    $('#email-report-modal-alert').text(\"There was an error while sending the email\").show(300);\n                                });\n\n                                return false;\n                            });\n                        });\n                    </script>\n                {% endblock %}\n            {% endif %}\n        {% endblock %}\n        </div>\n    \n        {% if config.mail_settings.enabled %}\n            <div class='alert alert-success' style='display: none;' id='email-report-success-message'>\n                {% block email_report_success_message %}\n                    Email Sent Successfully\n                {% endblock %}\n            </div>\n        {% endif %}\n    {% endif %}\n\n    <div id='report_content'>\n        {% if not is_ready %}\n            <div class='alert alert-info'>\n            This report needs more information before running.\n            </div>\n        {% elseif async %}\n            {% include \"html/report_ajax_loading.twig\" %}\n        {% else %}\n            {% include \"html/report_content.twig\" %}\n        {% endif %}\n    </div>\n\n    {% block time_estimate %}\n        {% if time_estimate %}\n            <div style='margin-top: 20px;'>\n                <a data-role=\"button\" data-toggle=\"collapse\" data-target=\"#time_estimate_holder\" href=\"#time_estimate_holder\">show time estimate data</a>\n                <div style='font-size: .8em; padding-left: 20px;' id='time_estimate_holder' class='collapse'>\n                    <div><strong>Number of Samples: </strong> {{time_estimate.count}}</div>\n                    <div><strong>Minimum Time: </strong> {{time_estimate.min}}</div>\n                    <div><strong>Maximum Time: </strong> {{time_estimate.max}}</div>\n                    <div><strong>Median: </strong> {{time_estimate.median}}</div>\n                    <div><strong>Average: </strong> {{time_estimate.average}}</div>\n                    <div><strong>Standard Deviation: </strong> {{time_estimate.stdev}}</div>    \n                </div>\n            </div>\n        {% endif %}\n    {% endblock %}\n{% endblock %}\n"
  },
  {
    "path": "templates/default/html/report_ajax_loading.twig",
    "content": "<div class='alert alert-block alert-info' id='async_notice' style='text-align: center;'>\n\t<div>\n\t\tYour report is running.\n\t\t{% if time_estimate %}\n\t\t\t{% if time_estimate.median %}\n\t\t\t\tThis report usually takes {{time_estimate.median}} seconds.\n\t\t\t{% endif %}\n\t\t{% endif %}\n\t</div>\n\t<div class=\"progress progress-striped active\" style=\"width: 50%; margin: 20px auto 0;\">\n        <div class=\"progress-bar\"  role=\"progressbar\" aria-valuenow=\"45\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 100%\">\n            <span class=\"sr-only\">Working</span>\n        </div>\n\t</div>\n</div>\n<script>\n$(function() {\n\t$.ajax({\n\t\t'url': '{{report_url|raw}}',\n\t\t'dataType': 'html',\n\t\t'data': {'content_only': true},\n\t\t'success': function(data) {\n\t\t\t$('#report_content').html(data);\n\t\t\tprettyPrint();\n\t\t}\n\t});\n});\n</script>\n"
  },
  {
    "path": "templates/default/html/report_content.twig",
    "content": "{% block chart_area %}\n    {% if has_charts and not no_charts %}\n\t\t\t\t<iframe src=\"{{base}}/report/chart/?{{report_querystring}}\" id='chart_container' class=\"auto-height\" scrolling=\"no\" style='width:100%;' frameborder=\"0\"></iframe>\n        <script>\n            $(function() {\n                $('iframe#chart_container').iframeAutoHeight();\n            });\n        </script>\n    {% endif %}\n{% endblock %}\n\n{% include \"html/table.twig\" %}\n\n{% if not nodata %}\n<script type='text/javascript'>\n$(function() {\n{% for dataset in DataSets %} \n    {% if not dataset.vertical %}\n\t$('#result_table_{{loop.index}}').DataTable({\n\t\tbPaginate: false,\n\t\taaSorting: [],\n\t\t\"sDom\": \"<'row'<'col-md-6'fi>r>t\"\n\t});\n\t$('#result_table_{{loop.index}}').stickyTableHeaders({\n\t\tfixedOffset: $('.navbar-fixed-top')\n\t});\n\t{% endif %}\n\t\n\t{% if dataset.selectable %}\n\t$('#result_table_{{loop.index}}').on('change','input.selectable',function() {\n\t\t//determine selected inputs\n\t\tvar selected_inputs = $(\"input.selectable:checked\",$(this).closest('table'));\n\t\t\n\t\tvar selected = [];\n\t\t\n\t\tselected_inputs.each(function() {\n\t\t\tvar id = $.trim($(this).closest('tr').find('td.selectable').text());\n\t\t\n\t\t\tselected.push(id);\n\t\t});\n\t\t\n\t\t$(\".report_link\").each(function() {\n\t\t\tvar url = $(this).attr('href');\n\t\t\tvar query_string = {};\n\t\t\t\n\t\t\tif(url.indexOf('?') != -1) {\n\t\t\t\tquery_string = $.queryStringToJSON(decodeURIComponent($(this).attr('href').split('?')[1]).replace(/\\+/g,' '));\n\t\t\t\turl = url.split('?')[0];\n\t\t\t}\n\t\t\t\n\t\t\tif(selected.length)\n\t\t\t\tquery_string.selected_{{loop.index-1}} = selected;\n\t\t\telse\n\t\t\t\tdelete query_string.selected_{{loop.index-1}};\n\t\t\t\n\t\t\t$(this).attr('href',url+'?'+$.param(query_string));\n\t\t});\n\t})\n\t.on('click','.filldown',function() {\n\t\tvar input = $(this).closest('td').find('input.selectable');\n\t\n\t\t$(this).closest('tr').nextAll('tr').find('input.selectable').prop('checked',input.prop('checked'));\n\t\tinput.trigger('change');\n\t\treturn false;\n\t});\n\t{% endif %}\n{% endfor %}\n});\n</script>\n{% endif %}\n\n<div class=\"row\">\n    <div class=\"col-md-12\">Query took {{Time}} seconds</div>\n</div>\n\n{% block show_query %}\n\t{% if Query_Formatted %}\n\t\t<a data-role=\"button\" data-toggle=\"collapse\" data-target=\"#query_holder\" href=\"#query_holder\">show query</a>\n\t\t<div id='query_holder' class='collapse' style='padding-left: 20px;'>\n\t\t\t{{Query_Formatted|raw}}\n\t\t</div>\n\t\t<script>\n\t\t$(function() {\n\t\t\t$('.included_report').each(function() {\n\t\t\t\tvar self = $(this);\n\t\t\t\tself.css('display','none');\n\n\t\t\t\tvar name = self.data('name');\n\t\t\t\tif(name == \"Variables\") {\n\t\t\t\t\tvar linktext = \"Included Variables\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar linktext = \"Included Report - \"+name;\n\t\t\t\t}\n\n\t\t\t\tvar link = $('<a>').attr('href','#').text(linktext).css('display','block').click(function() {\n\t\t\t\t\tself.toggle(200);\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\n\t\t\t\tself.before(link);\n\t\t\t});\n\t\t});\n\t\t</script>\n\t{% endif %}\n{% endblock %}\n"
  },
  {
    "path": "templates/default/html/report_editor.twig",
    "content": "{% extends \"html/page.twig\" %}\n\n{% if options.Name %}\n\t{% set Name = options.Name %}\n{% else %}\n\t{% set Name = report %}\n{% endif %}\n\t\n{% block title %}\n\t{{ Name }}\n{% endblock %}\n\n{% block stylesheets %}\n{{ parent() }}\n<style>\n#editor * {\n\tfont-family:\"Courier New\", Courier, monospace;\n}\n\n#preview_holder {\n\tborder-top: 1px solid #999;\n\tmargin-top: 30px;\n\tdisplay:none;\n}\n#preview_holder h3 a {\n\tfont-size: .8em;\n\tfont-weight:normal;\n\tmargin-left: 20px;\n}\n\n#preview_area .section {\n\tmargin: 10px;\n}\n#preview_area .section .line_number {\n\tcolor: #999;\n\tmargin-left: -10px;\n\tfont-style: italic;\n}\n#preview_area ins {\n\ttext-decoration:none;\n\tbackground-color: #55ff55;\n}\n#preview_area del {\n\ttext-decoration:none;\n\tbackground-color: #ff5555;\n}\n</style>\n{% endblock %}\n\n{% block javascripts %}\n{{ parent() }}\n<script src=\"{{ base }}/public/js/ace/ace.js\" type=\"text/javascript\" charset=\"utf-8\"></script>\n<script>\n\tvar editor = ace.edit(\"editor\");    \n\teditor.setTheme(\"ace/theme/eclipse\");\n\t\n\t//set the mode\n\t{% if options.Type == 'Mysql' %}\n    editor.getSession().setMode(\"ace/mode/sql\");\n    {% elseif options.Type == 'Mongo' %}\n    editor.getSession().setMode(\"ace/mode/javascript\");\n    {% elseif options.Type == 'Php' %}\n    editor.getSession().setMode(\"ace/mode/php\");\n    {% else %}\n\teditor.getSession().setMode(\"ace/mode/{{extension}}\");\n    {% endif %}\n    \n    $(\"#preview_button\").click(function() {\n\t\t//open a modal with diff output\n\t\t$.post(\n\t\t\t\"{{ base }}/edit/?{{ querystring }}\",\n\t\t\t{\n\t\t\t\tcontents: editor.getSession().getDocument().getAllLines().join(\"\\n\"),\n\t\t\t\tpreview: true\n\t\t\t},\n\t\t\tfunction(data) {\n\t\t\t\t$(\"#preview_area\").html(data);\n\t\t\t\t$(\"#preview_holder\").show(200);\n\t\t\t\twindow.location.href = '#preview_changes';\n\t\t\t},\n\t\t\t'html'\n\t\t);\n\t\t\n\t\treturn false;\n    });\n    \n    $(\"#save_button\").click(function() {\n\t\t//save report\n\t\t$.post(\n\t\t\t\"{{ base }}/edit/?{{ querystring }}\",\n\t\t\t{\n\t\t\t\tcontents: editor.getSession().getDocument().getAllLines().join(\"\\n\"),\n\t\t\t\tsave: true\n\t\t\t},\n\t\t\tfunction(data) {\n\t\t\t\t$(\"#notice_holder\").html(\"Report File Saved Successfully\").show(200).delay(3000).hide(200);\n\t\t\t},\n\t\t\t'html'\n\t\t).error(function() {\n\t\t\t$(\"#error_holder\").html(\"There was a problem saving the report.\").show(200).delay(3000).hide(200);\n\t\t});\n\t\t\n\t\treturn false;\n    });\n    \n    $(\"#close_preview\").click(function() {\n\t\t$(\"#preview_holder\").hide(200);\n\t\treturn false;\n    });\n</script>\n{% endblock %}\n\n{% block breadcrumb %}\n\t{% set report_url = \"report/html/?\" ~ querystring %}\n\t{% set breadcrumb = {\"Report List\": \"\", (Name): report_url, \"Edit\": true} %}\n\t{{ parent() }}\n{% endblock %}\n\n{% block content %}\n<h2>Edit Report: {{Name}}</h2>\n\n<div id='notice_holder' class='alert alert-success' style='display:none;'></div>\n<div id='error_holder' class='alert alert-danger' style='display:none;'></div>\n\n<div id=\"editor\" style='position:relative; width: 100%; height: 600px;'>{{contents}}</div>\n\n<div style='margin: 20px 0;'>\n\t<a href='#' class='btn' id='preview_button'>Preview</a>\n\t<a href='#' class='btn btn-primary' id='save_button'>Save Changes</a>\n\t<a href='{{ url }}' class='btn btn-link'>Cancel</a>\n</div>\n\n<div id='preview_holder'>\n\t<h3>\n\t\tPreview Changes\n\t\t<a name='preview_changes'></a>\n\t\t<a href='#' id='close_preview'>hide</a>\n\t</h3>\n\t\n\t<div id='preview_area'></div>\n</div>\n{% endblock %}\n"
  },
  {
    "path": "templates/default/html/report_list.twig",
    "content": "{% extends \"html/page.twig\" %}\n\n{% block title %}Report List{% endblock %}\n\n{% set breadcrumb = {\"Report List\": true} %}\n\n{% block stylesheets %}\n\t{{ parent() }}\n\t<link rel=\"stylesheet\" href=\"{{base}}/public/css/report_list.css\" />\n{% endblock %}\n\n{% block header %}\n{% endblock %}\n\n{% block content %}\n<div class=\"row\">\n\t<div id=\"table_of_contents\" class=\"col-lg-2 col-md-3 hidden-xs hidden-sm bs-sidebar\">\n\t{% block table_of_contents %}\n\t\t<ul class=\"nav bs-sidenav\">\n\t\t\t{% for item in reports %}\n\t\t\t\t{% include \"html/report_list_table_of_contents_item.twig\" %}\n\t\t\t{% endfor %}\n\t\t</ul>\n\t{% endblock %}\n\t</div>\n\n\t<div id=\"report_list\" class=\"col-lg-10 col-md-9 col-xs-12 col-lg-offset-2 col-md-offset-3\">\n        <h1 class=\"visible-phone\">All Reports</h1>\n\t\t{% block report_errors %}\n\t\t\t{% if report_errors is not empty %}\n                <div class=\"well well-small\">\n                    <div>\n                        <img src=\"{{base}}/public/images/errorIcon.gif\" />\n                        {{ report_errors|length }} reports contain errors\n                        <button type=\"button\" class=\"btn btn-link\" data-toggle=\"collapse\" data-target=\"#report_errors_holder\">See all errors</button>\n                    </div>\n                    <div class=\"collapse\" id=\"report_errors_holder\">\n                        <div class=\"alert alert-danger alert-block\">\n                            {% for error in report_errors %}\n                                <div>\n                                    <strong>{{ error.report }}</strong> - {{ error.exception.message }}\n                                    <span style=\"padding-left: 20px;\">\n                                        <a href=\"{{base}}/report/raw/?report={{error.report}}\" style=\"margin-right: 10px;\" target=\"_blank\">view source</a>\n                                        <a href=\"{{base}}/edit/?report={{error.report}}\" target=\"_blank\">edit</a>\n                                    </span>\n                                </div>\n                            {% endfor %}\n                        </div>\n                    </div>\n                </div>\n\t\t\t{% endif %}\n\t\t{% endblock %}\n\n\t\t{% block report_list %}\n\t\t\t<a name=\"reportlist\"></a>\n\t\t\t{% for item in reports %}\n\t\t\t<div class=\"report_list\">\n\t\t\t\t{% if not loop.first %}\n\t\t\t\t\t<a href=\"#\" class=\"pull-right\" style=\"font-size: 12px; font-weight:normal;\">top</a>\n\t\t\t\t{% endif %}\n\t\t\t\t{% include \"html/report_list_item.twig\" %}\n\t\t\t</div>\n\t\t\t{% endfor %}\n\t\t{% endblock %}\n\t</div>\n</div>\n{% endblock %}\n"
  },
  {
    "path": "templates/default/html/report_list_item.twig",
    "content": "{% if item.is_dir %}\n\t{% if h is not defined %}\n\t\t{% set h = 2 %}\n\t{% endif %}\n\t{% if item.children %}\n\t\t<a name=\"report_{{item.Id}}\" href='#'>.</a>\n\t\t<h{{h < 5 ? h : 5}} class=\"{% if not item.Title %}no_title{% endif %}\">\n\t\t\t{% if item.Title %}{{item.Title}}{% else %}{{item.Name}}{% endif %}\n\t\t\t<button type='button' class='btn' data-toggle=\"collapse\" data-target=\"#report_{{item.Id}}_children\"><span class='caret'></span></button>\n\t\t</h{{h < 5 ? h : 5}}>\n\t\t<div class='collapse {% if item.Title %}in{% endif %}' id='report_{{item.Id}}_children'>\n            {% if item.Description %}\n                <p>{{ item.Description|raw }}</p>\n            {% endif %}\n            \n\t\t\t<ul class='nav nav-list well'>\n\t\t\t\t{% for item in item.children %}\n\t\t\t\t\t<li>\t\t\n\t\t\t\t\t\t{% set h = h + 1 %}\n\t\t\t\t\t\t{% include \"html/report_list_item.twig\" %}\n\t\t\t\t\t\t{% set h = h - 1 %}\n\t\t\t\t\t</li>\n\t\t\t\t{% endfor %}\n\t\t\t</ul>\n\t\t</div>\n\t{% endif %}\n{% elseif not item.ignore %}\n\t<a class='pull-right' href='{{item.url | replace({\"report/html/?\":\"report/csv/?\"})}}' style='margin-left: 5px; opacity:.6;'><img alt='Export CSV File' title='Export CSV File' src='{{base}}/public/images/document-excel-csv.png' /></a>\n\t<a href='{{item.url}}' id='report_{{item.Id}}'>\n\t\t{{item.Name}}\n\t\t{% if item.stop %}\n\t\t\t<img alt='Stop!' title='Stop!' src='{{base}}/public/images/traffic-light-red.png' />\n\t\t{% endif %}\n\t\t{% if item.Caution or item.warning %}\n\t\t\t<img alt='Caution!' title='Caution!' src='{{base}}/public/images/prohibition.png' />\n\t\t{% endif %}\n\t\t{% if item.Variables %}\n\t\t\t<img alt='Configurable' title='Configurable' src='{{base}}/public/images/wrench.png' />\n\t\t{% endif %}\n\t\t{% if item.Charts %}\n\t\t\t<img alt='Contains graphs/charts' title='Contains graphs/charts' src='{{base}}/public/images/chart.png' />\n\t\t{% endif %}\n\t\t{% if item.Detail %}\n\t\t\t<img alt='Contains drill down links' title='Contains drill down links' src='{{base}}/public/images/drill.png' />\n\t\t{% endif %}\n\t\t{% if item.expensive %}\n\t\t\t<img alt='Expensive to run' title='Expensive to run' src='{{base}}/public/images/money_dollar.png' />\n\t\t{% endif %}\n\t\t{% if item.Created and item.Created|slice(0,10)|date('U') > date(\"-2 weeks\")|date('U') %}\n\t\t\t<img alt='Created on {{item.Created|slice(0,10)|date('Y-m-d')}}' title='Created on {{item.Created|slice(0,10)|date('Y-m-d')}}' src='{{base}}/public/images/new_icon.gif' />\n\t\t{% endif %}\n\t</a>\n{% endif %}\n"
  },
  {
    "path": "templates/default/html/report_list_table_of_contents_item.twig",
    "content": "{% if item.is_dir and item.Title %}\n\t<li>\n\t\t<a href='#report_{{item.Id}}'>{{item.Title}}</a>\n\t\t{% if item.children %}\n\t\t\t<ul class=\"nav nav-list\">\n\t\t\t\t{% for item in item.children %}\n\t\t\t\t\t{% include \"html/report_list_table_of_contents_item.twig\" %}\n\t\t\t\t{% endfor %}\n\t\t\t</ul>\n\t\t{% endif %}\n\t</li>\n{% endif %}\n"
  },
  {
    "path": "templates/default/html/table.twig",
    "content": "{% for dataset in DataSets %}\n    {% if dataset.title %}<h3>{{dataset.title}}</h3>{% endif %}\n\t{% if DataSets|length > 1 %}\n\t\t{% block table_download_link %}\n\t\t\t{% set dataset_id = loop.index - 1 %}\n\t\t\t{% if config.report_formats|length > 1 %}\n\t\t\t\t<div class=\"btn-group\">\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-primary btn-sm dropdown-toggle\" data-toggle=\"dropdown\">\n\t\t\t\t\t\t<i class='icon-download'></i> Download/show as <span class=\"caret\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<ul class=\"dropdown-menu\" role=\"menu\">\n\t\t\t\t\t\t{% for format in config.report_formats|keys %}\n\t\t\t\t\t\t\t{% if config.report_formats[format] == 'divider' %}\n\t\t\t\t\t\t\t\t<li class=\"divider\"></li>\n\t\t\t\t\t\t\t{% else %}\n\t\t\t\t\t\t\t\t<li><a href='{{base}}/report/{{format}}/?dataset={{ dataset_id }}&{{report_querystring}}' class='report_link'>{{config.report_formats[format]}}</a></li>\n\t\t\t\t\t\t\t{% endif %}\n\t\t\t\t\t\t{% endfor %}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t{% else %}\n\t\t\t\t<a href='{{base}}/report/{{config.report_formats|keys[0]}}/?{{report_querystring}}' class='report_link btn'>\n\t\t\t\t\t<i class='icon-download'></i> Download {{config.report_formats[config.report_formats|keys[0]]}}\n\t\t\t\t</a>\n\t\t\t{% endif %}\n\t\t{% endblock %}\n\t{% endif %}\n\t{% if not Formatting[loop.index-1].nodata %}\n\t<table{% if not inline_email %} id='result_table_{{loop.index}}' class='result_table table table-bordered table-striped'{% else %} border=\"1\" cellspacing=\"0\"{% endif %}>\n\t\t{% if dataset.vertical %}\n\t\t<thead>\n\t\t\t<tr class='header'>\n\t\t\t\t{% for value in dataset.vertical[0].values %}\n\t\t\t\t<th class=\"{{ value.class }}\">\n\t\t\t\t\t{% if loop.first %}Key{% else %}Value {{ loop.index -1 }}{% endif %}\n\t\t\t\t</th>\n\t\t\t\t{% endfor %}\n\t\t\t</tr>\n\t\t</thead>\n\t\t{% if dataset.footer %}\n\t\t<tfoot>\n\t\t\t{% for row in dataset.footer %}\n\t\t\t\t<tr>\n\t\t\t\t\t{% for value in row.values %}\n\t\t\t\t\t\t<td>{{ value.getValue(true)|raw }}</td>\n\t\t\t\t\t{% endfor %}\n\t\t\t\t</tr>\n\t\t\t{% endfor %}\n\t\t</tfoot>\n\t\t{% endif %}\n\t\t<tbody>\n\t\t\t{% for row in dataset.vertical %}\n\t\t\t<tr>\n\t\t\t\t{% for value in row.values %}\n\t\t\t\t{% if value.is_header is defined and value.is_header %}{% set tag = 'th' %}{% else %}{% set tag = 'td' %}{% endif %}\n\t\t\t\t<{{ tag }} class=\"{{ value.class }}\">\n                    {{ value.getValue(true)|raw }}\n\t\t\t\t</{{ tag }}>\n\t\t\t\t{% endfor %}\n\t\t\t</tr>\n\t\t\t{% endfor %}\n\t\t</tbody>\n\t\t{% else %}\n\t\t<thead>\n\t\t\t<tr class='header'>\n\t\t\t{% if dataset.selectable and not inline_email %}\n\t\t\t\t<th> </th>\n\t\t\t{% endif %}\n\t\t\t{% for value in dataset.rows[0].values %}\n\t\t\t\t<th class=\"{{value.class}}\">{{value.key}}</th>\n\t\t\t{% endfor %}\n\t\t\t</tr>\n\t\t</thead>\n\t\t{% if dataset.footer %}\n\t\t<tfoot>\n\t\t\t{% for row in dataset.footer %}\n\t\t\t\t<tr>\n\t\t\t\t\t{% if dataset.selectable and not inline_email %}\n\t\t\t\t\t\t<td> </td>\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t{% for value in row.values %}\n\t\t\t\t\t\t<td>{{ value.getValue(true)|raw }}</td>\n\t\t\t\t\t{% endfor %}\n\t\t\t\t</tr>\n\t\t\t{% endfor %}\n\t\t</tfoot>\n\t\t{% endif %}\n\t\t<tbody>\n\t\t\t{% for row in dataset.rows %}\n\t\t\t<tr>\n\t\t\t\t{% if dataset.selectable and not inline_email %}\n\t\t\t\t\t<td style='padding: 0;'>\n\t\t\t\t\t\t<div style='width:40px;'>\n\t\t\t\t\t\t\t<input type='checkbox' class='selectable' style=' vertical-align:middle;' />\n\t\t\t\t\t\t\t{% if not loop.last %}\n\t\t\t\t\t\t\t<a href='#' class='filldown' title='Fill Down - copy this value to all rows below this' style='text-decoration:none;'>&darr;</a>\n\t\t\t\t\t\t\t{% endif %}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t{% endif %}\n                {% for value in row.values %}\n                <td class=\"{{value.class}}{% if dataset.selectable and value.key == dataset.selectable %} selectable{% endif %}\">\n                    {{ value.getValue(true)|raw }}\n                </td>\n                {% endfor %}\n\t\t\t</tr>\n\t\t\t{% endfor %}\n\t\t</tbody>\n\t\t{% endif %}\n\t</table>\n\t{% endif %}\n{% endfor %}\n"
  },
  {
    "path": "templates/default/html/variable_form.twig",
    "content": "<form class=\"form-horizontal well well-sm\" role=\"form\" method=\"get\" id=\"variable_form\">\n\t<input type='hidden' name='report' value='{{report}}' />\n\n    <div class=\"row\">\n        <div class=\"col-sm-12\" id=\"variables-header\">\n            <a class=\"accordion-toggle\" data-toggle=\"collapse\" data-parent=\"#variable_form\" href=\"#variables-fieldset\">\n            <span class=\"glyphicon glyphicon-chevron-down\"></span> <strong>{% block variable_form_title %}Report configuration{% endblock %}</strong></a>\n            <span id=\"variables-holder\"></span>\n        </div>\n    </div>\n    <div class=\"row\">\n        <fieldset id=\"variables-fieldset\" class=\"collapse {% if not collapse_configuration %}in{% endif %}\">\n            {% for var in vars %}\n                {% block variable_form_row %}\n                    <div class='form-group variable'>\n                        {% block variable_form_row_label %}\n                        <label for='var_{{var.key}}' class='col-sm-2 control-label'>{{var.display}}</label>\n                        {% endblock %}\n                        <div class='col-sm-10 controls'>\n                            {% block variable_form_row_modifier_input %}\n                                {% if var.modifier_options %}\n                                    <select name='macros[{{var.key}}_modifier]' id='var_{{var.key}}_modifier' class='input'>\n                                    {% for option in var.modifier_options %}\n                                        <option value=\"{{option.value}}\" {% if option.selected %}selected=\"selected\"{% endif %}>{{option.display}}</option>\n                                    {% endfor %}\n                                    </select>\n                                {% endif %}\n                            {% endblock %}\n                            {% block variable_form_row_input %}\n                                {% if var.is_select %}\n                                    <select\n                                        name='macros[{{var.key}}]{% if var.is_multiselect %}[]{% endif %}'\n                                        id='var_{{var.key}}'\n                                        {% if var.is_multiselect %}multiple=true size={{var.choices}}{% endif %}\n                                    >\n                                    {% for option in var.options %}\n                                        <option value=\"{{option.value}}\" {% if option.selected %}selected=\"selected\"{% endif %}>{{option.display}}</option>\n                                    {% endfor %}\n                                    </select>\n                                {% elseif var.is_textarea %}\n                                    <textarea name='macros[{{var.key}}]' id='var_{{var.key}}' style='vertical-align:top; width: 500px; height: 80px;'>{{var.value|join(\"\\n\")}}</textarea>\n                                {% elseif var.type == \"daterange\" %}\n                                    <input type='hidden' name='macros[{{var.key}}][start]' id='var_{{var.key}}_start' value='{{var.value.start|date('Y-m-d H:i:s')}}' />\n                                    <input type='hidden' name='macros[{{var.key}}][end]' id='var_{{var.key}}_end' value='{{var.value.end|date('Y-m-d H:i:s')}}' />\n                                    <div class=\"daterangepicker_holder btn btn-default pull-left\" data-var=\"{{var.key}}\">\n                                            <i class=\"glyphicon glyphicon-calendar\"></i>\n                                            <span>\n                                                {% if var.value.start and var.value.end %}\n                                                    {{ var.value.start|date('F j, Y') }} - {{ var.value.end|date('F j, Y') }}\n                                                {% else %}\n                                                    <em>no date range selected</em>\n                                                {% endif %}\n                                            </span> <b class=\"caret\"></b>\n                                    </div>\n                                {% elseif var.type == \"date\" %}\n                                    <div class=\"input-append date datepicker_holder\" data-date=\"{{var.value|date('Y-m-d')}}\" data-date-format=\"yyyy-mm-dd\">\n                                        <input type='text' name='macros[{{var.key}}]' id=\"var_{{ var.key }}\" value='{{var.value|date('Y-m-d H:i:s')}}' />\n                                        <i class=\"add-on glyphicon glyphicon-calendar\"></i>\n                                    </div>\n                                {% else %}\n                                    <input type='text' name='macros[{{var.key}}]' id=\"var_{{ var.key }}\" value='{{var.value}}' />\n                                {% endif %}\n                            {% endblock %}\n                            {% block variable_form_row_description %}\n                                {% if var.description %}\n                                    <span class='help-inline'>{{ var.description|raw }}</span>\n                                {% endif %}\n                            {% endblock %}\n                        </div>\n                    </div>\n                {% endblock %}\n            {% endfor %}\n            <div class=\"form-group\">\n                <div class=\"col-sm-offset-2 col-sm-10\">\n                    <button type=\"submit\" class=\"btn btn-primary\">Run Report</button>\n                </div>\n            </div>\n        </fieldset>\n    </div>\n</form>\n<script>\n$(function() {\n    $('#variables-fieldset').on('hide.bs.collapse', function () {\n        var t = new Array();\n        $('#variables-fieldset .variable').each(function() {\n\t\t\t\t\t\tvar inputs = $(this).find('input,select,textarea');\n\t\t\t\t\t\tvar label = $(this).find('label.control-label').text();\n\t\t\t\t\t\tvar values = [];\n\t\t\t\t\t\tinputs.each(function() {\n\t\t\t\t\t\t\tif(($(this).attr('name')||'').match(/^macros/)) {\n\t\t\t\t\t\t\t    // For dropdowns, use the display name instead of the value\n\t\t\t\t\t\t\t    if($('option:selected',$(this)).length) {\n\t\t\t\t\t\t\t\tvar t = [];\n\t\t\t\t\t\t\t\t$('option:selected',$(this)).each(function() {\n\t\t\t\t\t\t\t\t    t.push($(this).text());\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tvalues.push(t.join(' | '));\n\t\t\t\t\t\t\t    }\n\t\t\t\t\t\t\t    // Otherwise, show the value\n\t\t\t\t\t\t\t    else {\n\t\t\t\t\t\t\t\tvalues.push($(this).val());\n\t\t\t\t\t\t\t    }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif(values.length) {\n\t\t\t\t\t\t\tt.push('<strong>'+label+'</strong>: <em>'+values.join(' - ')+'</em>');\n\t\t\t\t\t\t}\n\t\t\t\t});\n        var text = ' : '+t.join(', ');\n        $('#variables-holder').html(text);\n        $('#variables-header span.glyphicon').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-right');\n    }).on('show.bs.collapse', function() {\n        $('#variables-selected').collapse('hide');\n        $('#variables-holder').text('');\n        $('#variables-header span.glyphicon').removeClass('glyphicon-chevron-right').addClass('glyphicon-chevron-down');\n    })\n\t\t{% if collapse_configuration %}\n\t\t.trigger('hide.bs.collapse')\n\t\t{% endif %};\n\n\t$('.daterangepicker_holder',$('#variable_form')).each(function() {\n        moment.lang(window.navigator.language);\n\n\t\tvar range_holder = $(this);\n\t\trange_holder.daterangepicker(\n\t\t\t{\n\t\t\t\tranges: {\n                    'Today': [moment(), moment()],\n                    'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],\n                    'Last 7 Days': [moment().subtract('days', 6), moment()],\n                    'Last 30 Days': [moment().subtract('days', 29), moment()],\n                    'This Month': [moment().startOf('month'), moment().endOf('month')],\n                    'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]\n\t\t\t\t},\n                showWeekNumbers: true,\n                showDropdowns: true,\n                locale: {\n                    firstDay: moment.langData()._week.dow\n                }\n\t\t\t},\n\t\t\tfunction(start, end) {\n\t\t\t\t$('#var_'+range_holder.data('var')+'_start').val(start.format('YYYY-MM-DD')+\" 00:00:00\");\n\t\t\t\t$('#var_'+range_holder.data('var')+'_end').val(end.format('YYYY-MM-DD')+\" 23:59:59\");\n\t\t\t\t\n\t\t\t\t$('span',range_holder).html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));\n\t\t\t}\n\t\t);\n\t});\n\t$('.datepicker_holder',$('#variable_form')).each(function() {\n\t\t$(this).datepicker();\n\t});\n\n    $('#variable_form select').multiselect({\n        buttonClass: 'btn btn-default',\n        buttonWidth: 'auto',\n        includeSelectAllOption: true,\n        maxHeight: '300px',\n        buttonText: function(options, select) {\n            if (options.length == 0) {\n                return 'None selected <b class=\"caret\"></b>';\n            } else if (options.length > 8) {\n                return options.length + ' selected  <b class=\"caret\"></b>';\n            } else {\n                var selected = '';\n                options.each(function() {\n                    selected += $(this).text() + ', ';\n                });\n                return selected.substr(0, selected.length -2) + ' <b class=\"caret\"></b>';\n            }\n        }\n    });\n\t\t\n});\n</script>\n"
  },
  {
    "path": "templates/default/sql/report.twig",
    "content": "{% for dataset in DataSets %}{% if not loop.first %}\n\n{% endif %}INSERT INTO `{{Name}}_{{loop.index}}`\n\t({% for value in dataset.rows[0].values %}{% if not loop.first %},{% endif %}`{{value.key}}`{% endfor %})\nVALUES\n{% for row in dataset.rows %}{% if not loop.first %},\n{% endif %}\t({% for value in row.values %}{% if not loop.first %},{% endif %}\n\"{{ value.getValue()|replace({'\\\\':'\\\\\\\\','\"':'\\\\\"' })|raw }}\"{% endfor %}){% endfor %};\n{%endfor%}\n"
  },
  {
    "path": "templates/default/xml/page.twig",
    "content": "<?xml version=\"1.0\"?>\n\n{% block content %}\n\t{{content|raw}}\n{% endblock %}\n"
  },
  {
    "path": "templates/default/xml/report.twig",
    "content": "{% extends \"xml/page.twig\" %}\n\n{% block content %}\n{% if dataset_format %}\n<Results>\n{% for dataset in datasets %}\n\t<Dataset>\n\t\t{% if DataSets[dataset].title %}<Title>{{ DataSets[dataset].title }}</Title>{% endif %}\n\t\t<Rows>\n\t\t{% for row in DataSets[dataset].rows %}\n\t\t\t<Row>\n\t\t\t{% for value in row.values %}\n\t\t\t\t<{{value.keyCollapsed}}>{{ value.getValue()|raw }}</{{value.keyCollapsed}}>\n\t\t\t{% endfor %}\n\t\t\t</Row>\n\t\t{% endfor %}\n\t\t</Rows>\n\t</Dataset>\n{% endfor %}\n</Results>\n{% else %}\n<Results>\n{% for row in DataSets[datasets[0]].rows %}\n\t<Row>\n\t{% for value in row.values %}\n\t\t<{{value.keyCollapsed}}>{{ value.getValue()|raw }}</{{value.keyCollapsed}}>\n\t{% endfor %}\n\t</Row>\n{% endfor %}\n</Results>\n{% endif %}\n{% endblock %}\n"
  }
]