From 9b9b63fc12ecbeb1a04686a13d6f4fde0ba67a76 Mon Sep 17 00:00:00 2001 From: Craig Yamato Date: Mon, 24 Sep 2018 06:42:23 +0000 Subject: [PATCH] Added Docs --- docs/coverage/coverage-final.json | 2 + docs/coverage/lcov-report/base.css | 212 + docs/coverage/lcov-report/index.html | 93 + docs/coverage/lcov-report/index.js.html | 7010 +++++++++++++++++ docs/coverage/lcov-report/prettify.css | 1 + docs/coverage/lcov-report/prettify.js | 1 + .../lcov-report/sort-arrow-sprite.png | Bin 0 -> 209 bytes docs/coverage/lcov-report/sorter.js | 158 + docs/coverage/lcov.info | 1346 ++++ docs/index.html | 161 + docs/index.js.html | 2384 ++++++ docs/module-SyslogPro-CEF.html | 1619 ++++ docs/module-SyslogPro-LEEF.html | 1376 ++++ docs/module-SyslogPro-RFC3164.html | 5478 +++++++++++++ docs/module-SyslogPro-RFC5424.html | 6059 ++++++++++++++ docs/module-SyslogPro-Syslog.html | 2679 +++++++ docs/module-SyslogPro.html | 402 + docs/scripts/collapse.js | 11 + docs/scripts/jquery-3.1.1.min.js | 4 + docs/scripts/linenumber.js | 25 + docs/scripts/prettify/Apache-License-2.0.txt | 202 + docs/scripts/prettify/lang-css.js | 2 + docs/scripts/prettify/prettify.js | 28 + docs/scripts/search.js | 42 + docs/styles/jsdoc.css | 654 ++ docs/styles/prettify.css | 79 + index.js | 5 +- package.json | 21 +- readme.md | 108 +- 29 files changed, 30133 insertions(+), 29 deletions(-) create mode 100644 docs/coverage/coverage-final.json create mode 100644 docs/coverage/lcov-report/base.css create mode 100644 docs/coverage/lcov-report/index.html create mode 100644 docs/coverage/lcov-report/index.js.html create mode 100644 docs/coverage/lcov-report/prettify.css create mode 100644 docs/coverage/lcov-report/prettify.js create mode 100644 docs/coverage/lcov-report/sort-arrow-sprite.png create mode 100644 docs/coverage/lcov-report/sorter.js create mode 100644 docs/coverage/lcov.info create mode 100644 docs/index.html create mode 100644 docs/index.js.html create mode 100644 docs/module-SyslogPro-CEF.html create mode 100644 docs/module-SyslogPro-LEEF.html create mode 100644 docs/module-SyslogPro-RFC3164.html create mode 100644 docs/module-SyslogPro-RFC5424.html create mode 100644 docs/module-SyslogPro-Syslog.html create mode 100644 docs/module-SyslogPro.html create mode 100644 docs/scripts/collapse.js create mode 100644 docs/scripts/jquery-3.1.1.min.js create mode 100644 docs/scripts/linenumber.js create mode 100644 docs/scripts/prettify/Apache-License-2.0.txt create mode 100644 docs/scripts/prettify/lang-css.js create mode 100644 docs/scripts/prettify/prettify.js create mode 100644 docs/scripts/search.js create mode 100644 docs/styles/jsdoc.css create mode 100644 docs/styles/prettify.css diff --git a/docs/coverage/coverage-final.json b/docs/coverage/coverage-final.json new file mode 100644 index 0000000..83c0c5f --- /dev/null +++ b/docs/coverage/coverage-final.json @@ -0,0 +1,2 @@ +{"/home/ubuntu/workspace/glue/transport/syslog/index.js": {"path":"/home/ubuntu/workspace/glue/transport/syslog/index.js","statementMap":{"0":{"start":{"line":15,"column":15},"end":{"line":15,"column":32}},"1":{"start":{"line":16,"column":11},"end":{"line":16,"column":24}},"2":{"start":{"line":17,"column":12},"end":{"line":17,"column":26}},"3":{"start":{"line":18,"column":18},"end":{"line":18,"column":30}},"4":{"start":{"line":19,"column":11},"end":{"line":19,"column":24}},"5":{"start":{"line":30,"column":2},"end":{"line":86,"column":5}},"6":{"start":{"line":31,"column":20},"end":{"line":31,"column":21}},"7":{"start":{"line":33,"column":21},"end":{"line":33,"column":74}},"8":{"start":{"line":34,"column":4},"end":{"line":85,"column":5}},"9":{"start":{"line":35,"column":6},"end":{"line":79,"column":7}},"10":{"start":{"line":36,"column":8},"end":{"line":42,"column":9}},"11":{"start":{"line":37,"column":10},"end":{"line":37,"column":23}},"12":{"start":{"line":38,"column":15},"end":{"line":42,"column":9}},"13":{"start":{"line":39,"column":10},"end":{"line":39,"column":23}},"14":{"start":{"line":41,"column":10},"end":{"line":41,"column":70}},"15":{"start":{"line":44,"column":18},"end":{"line":44,"column":43}},"16":{"start":{"line":45,"column":18},"end":{"line":45,"column":43}},"17":{"start":{"line":46,"column":18},"end":{"line":46,"column":43}},"18":{"start":{"line":47,"column":8},"end":{"line":78,"column":9}},"19":{"start":{"line":48,"column":10},"end":{"line":62,"column":11}},"20":{"start":{"line":50,"column":11},"end":{"line":56,"column":12}},"21":{"start":{"line":51,"column":12},"end":{"line":51,"column":27}},"22":{"start":{"line":52,"column":18},"end":{"line":56,"column":12}},"23":{"start":{"line":53,"column":12},"end":{"line":53,"column":28}},"24":{"start":{"line":55,"column":13},"end":{"line":55,"column":64}},"25":{"start":{"line":58,"column":12},"end":{"line":61,"column":41}},"26":{"start":{"line":64,"column":10},"end":{"line":64,"column":25}},"27":{"start":{"line":65,"column":22},"end":{"line":65,"column":29}},"28":{"start":{"line":66,"column":24},"end":{"line":66,"column":31}},"29":{"start":{"line":67,"column":23},"end":{"line":67,"column":30}},"30":{"start":{"line":68,"column":18},"end":{"line":68,"column":50}},"31":{"start":{"line":69,"column":10},"end":{"line":69,"column":33}},"32":{"start":{"line":70,"column":10},"end":{"line":74,"column":11}},"33":{"start":{"line":71,"column":12},"end":{"line":73,"column":39}},"34":{"start":{"line":75,"column":10},"end":{"line":77,"column":11}},"35":{"start":{"line":76,"column":12},"end":{"line":76,"column":28}},"36":{"start":{"line":80,"column":6},"end":{"line":80,"column":25}},"37":{"start":{"line":81,"column":6},"end":{"line":81,"column":13}},"38":{"start":{"line":83,"column":6},"end":{"line":83,"column":74}},"39":{"start":{"line":84,"column":6},"end":{"line":84,"column":13}},"40":{"start":{"line":141,"column":4},"end":{"line":141,"column":30}},"41":{"start":{"line":142,"column":4},"end":{"line":144,"column":5}},"42":{"start":{"line":143,"column":6},"end":{"line":143,"column":19}},"43":{"start":{"line":147,"column":4},"end":{"line":147,"column":48}},"44":{"start":{"line":149,"column":4},"end":{"line":149,"column":46}},"45":{"start":{"line":150,"column":4},"end":{"line":150,"column":48}},"46":{"start":{"line":152,"column":4},"end":{"line":152,"column":36}},"47":{"start":{"line":154,"column":4},"end":{"line":154,"column":50}},"48":{"start":{"line":155,"column":4},"end":{"line":162,"column":5}},"49":{"start":{"line":158,"column":6},"end":{"line":158,"column":53}},"50":{"start":{"line":161,"column":6},"end":{"line":161,"column":31}},"51":{"start":{"line":163,"column":4},"end":{"line":166,"column":5}},"52":{"start":{"line":165,"column":6},"end":{"line":165,"column":49}},"53":{"start":{"line":167,"column":4},"end":{"line":170,"column":5}},"54":{"start":{"line":169,"column":6},"end":{"line":169,"column":47}},"55":{"start":{"line":172,"column":4},"end":{"line":177,"column":5}},"56":{"start":{"line":174,"column":6},"end":{"line":174,"column":49}},"57":{"start":{"line":176,"column":6},"end":{"line":176,"column":45}},"58":{"start":{"line":178,"column":4},"end":{"line":185,"column":5}},"59":{"start":{"line":179,"column":6},"end":{"line":184,"column":7}},"60":{"start":{"line":181,"column":8},"end":{"line":181,"column":39}},"61":{"start":{"line":183,"column":8},"end":{"line":183,"column":44}},"62":{"start":{"line":186,"column":4},"end":{"line":193,"column":5}},"63":{"start":{"line":187,"column":6},"end":{"line":192,"column":7}},"64":{"start":{"line":189,"column":8},"end":{"line":189,"column":39}},"65":{"start":{"line":191,"column":8},"end":{"line":191,"column":44}},"66":{"start":{"line":194,"column":4},"end":{"line":201,"column":5}},"67":{"start":{"line":195,"column":6},"end":{"line":200,"column":7}},"68":{"start":{"line":197,"column":8},"end":{"line":197,"column":33}},"69":{"start":{"line":199,"column":8},"end":{"line":199,"column":38}},"70":{"start":{"line":202,"column":4},"end":{"line":209,"column":5}},"71":{"start":{"line":203,"column":6},"end":{"line":208,"column":7}},"72":{"start":{"line":205,"column":8},"end":{"line":205,"column":31}},"73":{"start":{"line":207,"column":8},"end":{"line":207,"column":36}},"74":{"start":{"line":210,"column":4},"end":{"line":212,"column":5}},"75":{"start":{"line":211,"column":6},"end":{"line":211,"column":35}},"76":{"start":{"line":213,"column":4},"end":{"line":215,"column":5}},"77":{"start":{"line":214,"column":6},"end":{"line":214,"column":35}},"78":{"start":{"line":216,"column":4},"end":{"line":218,"column":5}},"79":{"start":{"line":217,"column":6},"end":{"line":217,"column":29}},"80":{"start":{"line":219,"column":4},"end":{"line":221,"column":5}},"81":{"start":{"line":220,"column":6},"end":{"line":220,"column":27}},"82":{"start":{"line":236,"column":4},"end":{"line":248,"column":7}},"83":{"start":{"line":237,"column":6},"end":{"line":246,"column":7}},"84":{"start":{"line":239,"column":8},"end":{"line":239,"column":36}},"85":{"start":{"line":240,"column":13},"end":{"line":246,"column":7}},"86":{"start":{"line":241,"column":8},"end":{"line":241,"column":38}},"87":{"start":{"line":243,"column":21},"end":{"line":243,"column":79}},"88":{"start":{"line":244,"column":8},"end":{"line":244,"column":41}},"89":{"start":{"line":245,"column":8},"end":{"line":245,"column":34}},"90":{"start":{"line":247,"column":6},"end":{"line":247,"column":20}},"91":{"start":{"line":258,"column":4},"end":{"line":277,"column":7}},"92":{"start":{"line":259,"column":20},"end":{"line":259,"column":36}},"93":{"start":{"line":260,"column":25},"end":{"line":262,"column":7}},"94":{"start":{"line":263,"column":6},"end":{"line":276,"column":13}},"95":{"start":{"line":265,"column":28},"end":{"line":265,"column":65}},"96":{"start":{"line":266,"column":25},"end":{"line":266,"column":52}},"97":{"start":{"line":268,"column":28},"end":{"line":268,"column":52}},"98":{"start":{"line":269,"column":12},"end":{"line":272,"column":15}},"99":{"start":{"line":270,"column":14},"end":{"line":270,"column":29}},"100":{"start":{"line":271,"column":14},"end":{"line":271,"column":27}},"101":{"start":{"line":275,"column":12},"end":{"line":275,"column":26}},"102":{"start":{"line":288,"column":4},"end":{"line":323,"column":7}},"103":{"start":{"line":289,"column":18},"end":{"line":289,"column":32}},"104":{"start":{"line":290,"column":25},"end":{"line":292,"column":7}},"105":{"start":{"line":293,"column":6},"end":{"line":322,"column":13}},"106":{"start":{"line":295,"column":31},"end":{"line":299,"column":13}},"107":{"start":{"line":300,"column":27},"end":{"line":306,"column":14}},"108":{"start":{"line":302,"column":30},"end":{"line":302,"column":54}},"109":{"start":{"line":303,"column":14},"end":{"line":305,"column":17}},"110":{"start":{"line":304,"column":16},"end":{"line":304,"column":29}},"111":{"start":{"line":307,"column":12},"end":{"line":307,"column":47}},"112":{"start":{"line":308,"column":12},"end":{"line":310,"column":15}},"113":{"start":{"line":309,"column":14},"end":{"line":309,"column":27}},"114":{"start":{"line":311,"column":12},"end":{"line":314,"column":15}},"115":{"start":{"line":312,"column":14},"end":{"line":312,"column":27}},"116":{"start":{"line":313,"column":14},"end":{"line":313,"column":76}},"117":{"start":{"line":315,"column":12},"end":{"line":318,"column":15}},"118":{"start":{"line":316,"column":14},"end":{"line":316,"column":31}},"119":{"start":{"line":317,"column":14},"end":{"line":317,"column":28}},"120":{"start":{"line":321,"column":12},"end":{"line":321,"column":26}},"121":{"start":{"line":334,"column":4},"end":{"line":394,"column":7}},"122":{"start":{"line":335,"column":18},"end":{"line":335,"column":32}},"123":{"start":{"line":336,"column":25},"end":{"line":339,"column":7}},"124":{"start":{"line":341,"column":6},"end":{"line":357,"column":7}},"125":{"start":{"line":343,"column":8},"end":{"line":343,"column":60}},"126":{"start":{"line":344,"column":8},"end":{"line":344,"column":62}},"127":{"start":{"line":345,"column":13},"end":{"line":357,"column":7}},"128":{"start":{"line":347,"column":21},"end":{"line":347,"column":63}},"129":{"start":{"line":348,"column":8},"end":{"line":348,"column":36}},"130":{"start":{"line":349,"column":8},"end":{"line":349,"column":34}},"131":{"start":{"line":350,"column":8},"end":{"line":350,"column":15}},"132":{"start":{"line":351,"column":13},"end":{"line":357,"column":7}},"133":{"start":{"line":353,"column":21},"end":{"line":353,"column":64}},"134":{"start":{"line":354,"column":8},"end":{"line":354,"column":36}},"135":{"start":{"line":355,"column":8},"end":{"line":355,"column":34}},"136":{"start":{"line":356,"column":8},"end":{"line":356,"column":15}},"137":{"start":{"line":359,"column":21},"end":{"line":359,"column":47}},"138":{"start":{"line":360,"column":6},"end":{"line":373,"column":7}},"139":{"start":{"line":361,"column":30},"end":{"line":361,"column":32}},"140":{"start":{"line":362,"column":8},"end":{"line":370,"column":9}},"141":{"start":{"line":363,"column":10},"end":{"line":367,"column":11}},"142":{"start":{"line":364,"column":25},"end":{"line":364,"column":68}},"143":{"start":{"line":365,"column":12},"end":{"line":365,"column":40}},"144":{"start":{"line":366,"column":12},"end":{"line":366,"column":38}},"145":{"start":{"line":368,"column":21},"end":{"line":368,"column":68}},"146":{"start":{"line":369,"column":10},"end":{"line":369,"column":37}},"147":{"start":{"line":371,"column":8},"end":{"line":371,"column":40}},"148":{"start":{"line":372,"column":8},"end":{"line":372,"column":45}},"149":{"start":{"line":374,"column":21},"end":{"line":380,"column":8}},"150":{"start":{"line":376,"column":24},"end":{"line":376,"column":48}},"151":{"start":{"line":377,"column":8},"end":{"line":379,"column":11}},"152":{"start":{"line":378,"column":10},"end":{"line":378,"column":23}},"153":{"start":{"line":381,"column":6},"end":{"line":381,"column":41}},"154":{"start":{"line":383,"column":6},"end":{"line":385,"column":9}},"155":{"start":{"line":384,"column":8},"end":{"line":384,"column":21}},"156":{"start":{"line":386,"column":6},"end":{"line":389,"column":9}},"157":{"start":{"line":387,"column":8},"end":{"line":387,"column":21}},"158":{"start":{"line":388,"column":8},"end":{"line":388,"column":70}},"159":{"start":{"line":390,"column":6},"end":{"line":393,"column":9}},"160":{"start":{"line":391,"column":8},"end":{"line":391,"column":25}},"161":{"start":{"line":392,"column":8},"end":{"line":392,"column":22}},"162":{"start":{"line":406,"column":4},"end":{"line":441,"column":7}},"163":{"start":{"line":407,"column":6},"end":{"line":410,"column":7}},"164":{"start":{"line":408,"column":8},"end":{"line":408,"column":73}},"165":{"start":{"line":409,"column":8},"end":{"line":409,"column":15}},"166":{"start":{"line":411,"column":6},"end":{"line":411,"column":50}},"167":{"start":{"line":412,"column":6},"end":{"line":440,"column":7}},"168":{"start":{"line":413,"column":8},"end":{"line":419,"column":15}},"169":{"start":{"line":415,"column":14},"end":{"line":415,"column":30}},"170":{"start":{"line":418,"column":14},"end":{"line":418,"column":28}},"171":{"start":{"line":420,"column":13},"end":{"line":440,"column":7}},"172":{"start":{"line":421,"column":8},"end":{"line":427,"column":15}},"173":{"start":{"line":423,"column":14},"end":{"line":423,"column":30}},"174":{"start":{"line":426,"column":14},"end":{"line":426,"column":28}},"175":{"start":{"line":428,"column":13},"end":{"line":440,"column":7}},"176":{"start":{"line":429,"column":8},"end":{"line":435,"column":15}},"177":{"start":{"line":431,"column":14},"end":{"line":431,"column":30}},"178":{"start":{"line":434,"column":14},"end":{"line":434,"column":28}},"179":{"start":{"line":437,"column":23},"end":{"line":437,"column":73}},"180":{"start":{"line":438,"column":8},"end":{"line":438,"column":34}},"181":{"start":{"line":439,"column":8},"end":{"line":439,"column":36}},"182":{"start":{"line":497,"column":4},"end":{"line":497,"column":30}},"183":{"start":{"line":498,"column":4},"end":{"line":498,"column":28}},"184":{"start":{"line":499,"column":4},"end":{"line":499,"column":54}},"185":{"start":{"line":500,"column":4},"end":{"line":500,"column":57}},"186":{"start":{"line":501,"column":4},"end":{"line":501,"column":43}},"187":{"start":{"line":502,"column":4},"end":{"line":507,"column":5}},"188":{"start":{"line":504,"column":6},"end":{"line":504,"column":24}},"189":{"start":{"line":506,"column":6},"end":{"line":506,"column":25}},"190":{"start":{"line":508,"column":4},"end":{"line":513,"column":5}},"191":{"start":{"line":510,"column":6},"end":{"line":510,"column":32}},"192":{"start":{"line":512,"column":6},"end":{"line":512,"column":33}},"193":{"start":{"line":514,"column":4},"end":{"line":521,"column":5}},"194":{"start":{"line":515,"column":6},"end":{"line":520,"column":7}},"195":{"start":{"line":517,"column":8},"end":{"line":517,"column":49}},"196":{"start":{"line":519,"column":8},"end":{"line":519,"column":37}},"197":{"start":{"line":522,"column":4},"end":{"line":548,"column":5}},"198":{"start":{"line":524,"column":6},"end":{"line":524,"column":30}},"199":{"start":{"line":526,"column":6},"end":{"line":526,"column":28}},"200":{"start":{"line":528,"column":6},"end":{"line":528,"column":31}},"201":{"start":{"line":530,"column":6},"end":{"line":530,"column":28}},"202":{"start":{"line":532,"column":6},"end":{"line":532,"column":30}},"203":{"start":{"line":534,"column":6},"end":{"line":534,"column":29}},"204":{"start":{"line":536,"column":6},"end":{"line":536,"column":35}},"205":{"start":{"line":538,"column":6},"end":{"line":538,"column":27}},"206":{"start":{"line":540,"column":6},"end":{"line":540,"column":31}},"207":{"start":{"line":541,"column":6},"end":{"line":541,"column":27}},"208":{"start":{"line":542,"column":6},"end":{"line":542,"column":30}},"209":{"start":{"line":543,"column":6},"end":{"line":543,"column":27}},"210":{"start":{"line":544,"column":6},"end":{"line":544,"column":29}},"211":{"start":{"line":545,"column":6},"end":{"line":545,"column":28}},"212":{"start":{"line":546,"column":6},"end":{"line":546,"column":35}},"213":{"start":{"line":547,"column":6},"end":{"line":547,"column":27}},"214":{"start":{"line":549,"column":4},"end":{"line":551,"column":5}},"215":{"start":{"line":550,"column":6},"end":{"line":550,"column":56}},"216":{"start":{"line":583,"column":4},"end":{"line":720,"column":7}},"217":{"start":{"line":584,"column":26},"end":{"line":584,"column":28}},"218":{"start":{"line":585,"column":6},"end":{"line":600,"column":7}},"219":{"start":{"line":586,"column":8},"end":{"line":599,"column":12}},"220":{"start":{"line":588,"column":14},"end":{"line":598,"column":21}},"221":{"start":{"line":590,"column":20},"end":{"line":590,"column":49}},"222":{"start":{"line":591,"column":20},"end":{"line":591,"column":34}},"223":{"start":{"line":594,"column":20},"end":{"line":594,"column":51}},"224":{"start":{"line":595,"column":20},"end":{"line":595,"column":54}},"225":{"start":{"line":596,"column":20},"end":{"line":596,"column":75}},"226":{"start":{"line":597,"column":20},"end":{"line":597,"column":34}},"227":{"start":{"line":601,"column":6},"end":{"line":616,"column":7}},"228":{"start":{"line":602,"column":8},"end":{"line":615,"column":12}},"229":{"start":{"line":604,"column":14},"end":{"line":614,"column":21}},"230":{"start":{"line":606,"column":20},"end":{"line":606,"column":45}},"231":{"start":{"line":607,"column":20},"end":{"line":607,"column":34}},"232":{"start":{"line":610,"column":20},"end":{"line":610,"column":51}},"233":{"start":{"line":611,"column":20},"end":{"line":611,"column":50}},"234":{"start":{"line":612,"column":20},"end":{"line":612,"column":75}},"235":{"start":{"line":613,"column":20},"end":{"line":613,"column":34}},"236":{"start":{"line":617,"column":6},"end":{"line":632,"column":7}},"237":{"start":{"line":618,"column":8},"end":{"line":631,"column":12}},"238":{"start":{"line":620,"column":14},"end":{"line":630,"column":21}},"239":{"start":{"line":622,"column":20},"end":{"line":622,"column":48}},"240":{"start":{"line":623,"column":20},"end":{"line":623,"column":34}},"241":{"start":{"line":626,"column":20},"end":{"line":626,"column":51}},"242":{"start":{"line":627,"column":20},"end":{"line":627,"column":53}},"243":{"start":{"line":628,"column":20},"end":{"line":628,"column":75}},"244":{"start":{"line":629,"column":20},"end":{"line":629,"column":34}},"245":{"start":{"line":633,"column":6},"end":{"line":648,"column":7}},"246":{"start":{"line":634,"column":8},"end":{"line":647,"column":12}},"247":{"start":{"line":636,"column":14},"end":{"line":646,"column":21}},"248":{"start":{"line":638,"column":20},"end":{"line":638,"column":45}},"249":{"start":{"line":639,"column":20},"end":{"line":639,"column":34}},"250":{"start":{"line":642,"column":20},"end":{"line":642,"column":51}},"251":{"start":{"line":643,"column":20},"end":{"line":643,"column":50}},"252":{"start":{"line":644,"column":20},"end":{"line":644,"column":75}},"253":{"start":{"line":645,"column":20},"end":{"line":645,"column":34}},"254":{"start":{"line":649,"column":6},"end":{"line":664,"column":7}},"255":{"start":{"line":650,"column":8},"end":{"line":663,"column":12}},"256":{"start":{"line":652,"column":14},"end":{"line":662,"column":21}},"257":{"start":{"line":654,"column":20},"end":{"line":654,"column":47}},"258":{"start":{"line":655,"column":20},"end":{"line":655,"column":34}},"259":{"start":{"line":658,"column":20},"end":{"line":658,"column":51}},"260":{"start":{"line":659,"column":20},"end":{"line":659,"column":52}},"261":{"start":{"line":660,"column":20},"end":{"line":660,"column":75}},"262":{"start":{"line":661,"column":20},"end":{"line":661,"column":34}},"263":{"start":{"line":665,"column":6},"end":{"line":680,"column":7}},"264":{"start":{"line":666,"column":8},"end":{"line":679,"column":12}},"265":{"start":{"line":668,"column":14},"end":{"line":678,"column":21}},"266":{"start":{"line":670,"column":20},"end":{"line":670,"column":46}},"267":{"start":{"line":671,"column":20},"end":{"line":671,"column":34}},"268":{"start":{"line":674,"column":20},"end":{"line":674,"column":51}},"269":{"start":{"line":675,"column":20},"end":{"line":675,"column":51}},"270":{"start":{"line":676,"column":20},"end":{"line":676,"column":75}},"271":{"start":{"line":677,"column":20},"end":{"line":677,"column":34}},"272":{"start":{"line":681,"column":6},"end":{"line":696,"column":7}},"273":{"start":{"line":682,"column":8},"end":{"line":695,"column":12}},"274":{"start":{"line":684,"column":14},"end":{"line":694,"column":21}},"275":{"start":{"line":686,"column":20},"end":{"line":686,"column":53}},"276":{"start":{"line":687,"column":20},"end":{"line":687,"column":34}},"277":{"start":{"line":690,"column":20},"end":{"line":690,"column":51}},"278":{"start":{"line":691,"column":20},"end":{"line":691,"column":58}},"279":{"start":{"line":692,"column":20},"end":{"line":692,"column":75}},"280":{"start":{"line":693,"column":20},"end":{"line":693,"column":34}},"281":{"start":{"line":697,"column":6},"end":{"line":712,"column":7}},"282":{"start":{"line":698,"column":8},"end":{"line":711,"column":12}},"283":{"start":{"line":700,"column":14},"end":{"line":710,"column":21}},"284":{"start":{"line":702,"column":20},"end":{"line":702,"column":45}},"285":{"start":{"line":703,"column":20},"end":{"line":703,"column":34}},"286":{"start":{"line":706,"column":20},"end":{"line":706,"column":51}},"287":{"start":{"line":707,"column":20},"end":{"line":707,"column":50}},"288":{"start":{"line":708,"column":20},"end":{"line":708,"column":75}},"289":{"start":{"line":709,"column":20},"end":{"line":709,"column":34}},"290":{"start":{"line":713,"column":6},"end":{"line":719,"column":13}},"291":{"start":{"line":715,"column":12},"end":{"line":715,"column":26}},"292":{"start":{"line":718,"column":12},"end":{"line":718,"column":26}},"293":{"start":{"line":734,"column":4},"end":{"line":782,"column":7}},"294":{"start":{"line":735,"column":6},"end":{"line":735,"column":30}},"295":{"start":{"line":736,"column":21},"end":{"line":737,"column":30}},"296":{"start":{"line":738,"column":6},"end":{"line":743,"column":7}},"297":{"start":{"line":739,"column":21},"end":{"line":739,"column":68}},"298":{"start":{"line":740,"column":8},"end":{"line":740,"column":66}},"299":{"start":{"line":741,"column":8},"end":{"line":741,"column":34}},"300":{"start":{"line":742,"column":8},"end":{"line":742,"column":15}},"301":{"start":{"line":744,"column":19},"end":{"line":744,"column":21}},"302":{"start":{"line":745,"column":22},"end":{"line":745,"column":26}},"303":{"start":{"line":746,"column":27},"end":{"line":746,"column":43}},"304":{"start":{"line":747,"column":25},"end":{"line":747,"column":33}},"305":{"start":{"line":748,"column":25},"end":{"line":748,"column":36}},"306":{"start":{"line":750,"column":18},"end":{"line":750,"column":48}},"307":{"start":{"line":752,"column":6},"end":{"line":752,"column":42}},"308":{"start":{"line":754,"column":6},"end":{"line":767,"column":7}},"309":{"start":{"line":755,"column":8},"end":{"line":755,"column":50}},"310":{"start":{"line":756,"column":24},"end":{"line":756,"column":27}},"311":{"start":{"line":757,"column":8},"end":{"line":759,"column":9}},"312":{"start":{"line":758,"column":10},"end":{"line":758,"column":31}},"313":{"start":{"line":760,"column":8},"end":{"line":765,"column":9}},"314":{"start":{"line":761,"column":10},"end":{"line":761,"column":40}},"315":{"start":{"line":762,"column":10},"end":{"line":762,"column":27}},"316":{"start":{"line":764,"column":10},"end":{"line":764,"column":29}},"317":{"start":{"line":766,"column":8},"end":{"line":766,"column":56}},"318":{"start":{"line":770,"column":31},"end":{"line":770,"column":109}},"319":{"start":{"line":771,"column":24},"end":{"line":773,"column":45}},"320":{"start":{"line":775,"column":6},"end":{"line":775,"column":31}},"321":{"start":{"line":776,"column":6},"end":{"line":776,"column":26}},"322":{"start":{"line":777,"column":6},"end":{"line":777,"column":36}},"323":{"start":{"line":778,"column":6},"end":{"line":778,"column":43}},"324":{"start":{"line":779,"column":6},"end":{"line":779,"column":26}},"325":{"start":{"line":780,"column":6},"end":{"line":780,"column":24}},"326":{"start":{"line":781,"column":6},"end":{"line":781,"column":22}},"327":{"start":{"line":798,"column":4},"end":{"line":815,"column":7}},"328":{"start":{"line":799,"column":6},"end":{"line":801,"column":7}},"329":{"start":{"line":800,"column":8},"end":{"line":800,"column":35}},"330":{"start":{"line":802,"column":6},"end":{"line":814,"column":11}},"331":{"start":{"line":804,"column":10},"end":{"line":810,"column":15}},"332":{"start":{"line":806,"column":14},"end":{"line":806,"column":34}},"333":{"start":{"line":809,"column":14},"end":{"line":809,"column":28}},"334":{"start":{"line":813,"column":10},"end":{"line":813,"column":24}},"335":{"start":{"line":825,"column":4},"end":{"line":828,"column":7}},"336":{"start":{"line":838,"column":4},"end":{"line":838,"column":31}},"337":{"start":{"line":848,"column":4},"end":{"line":851,"column":7}},"338":{"start":{"line":861,"column":4},"end":{"line":864,"column":7}},"339":{"start":{"line":874,"column":4},"end":{"line":874,"column":30}},"340":{"start":{"line":884,"column":4},"end":{"line":887,"column":7}},"341":{"start":{"line":897,"column":4},"end":{"line":897,"column":27}},"342":{"start":{"line":907,"column":4},"end":{"line":910,"column":7}},"343":{"start":{"line":920,"column":4},"end":{"line":920,"column":29}},"344":{"start":{"line":930,"column":4},"end":{"line":933,"column":7}},"345":{"start":{"line":943,"column":4},"end":{"line":943,"column":28}},"346":{"start":{"line":953,"column":4},"end":{"line":956,"column":7}},"347":{"start":{"line":966,"column":4},"end":{"line":966,"column":35}},"348":{"start":{"line":976,"column":4},"end":{"line":976,"column":35}},"349":{"start":{"line":986,"column":4},"end":{"line":989,"column":7}},"350":{"start":{"line":1052,"column":4},"end":{"line":1052,"column":30}},"351":{"start":{"line":1053,"column":4},"end":{"line":1053,"column":28}},"352":{"start":{"line":1054,"column":4},"end":{"line":1054,"column":54}},"353":{"start":{"line":1055,"column":4},"end":{"line":1055,"column":57}},"354":{"start":{"line":1056,"column":4},"end":{"line":1061,"column":5}},"355":{"start":{"line":1058,"column":6},"end":{"line":1058,"column":28}},"356":{"start":{"line":1060,"column":6},"end":{"line":1060,"column":29}},"357":{"start":{"line":1062,"column":4},"end":{"line":1067,"column":5}},"358":{"start":{"line":1064,"column":6},"end":{"line":1064,"column":31}},"359":{"start":{"line":1066,"column":6},"end":{"line":1066,"column":32}},"360":{"start":{"line":1068,"column":4},"end":{"line":1073,"column":5}},"361":{"start":{"line":1070,"column":6},"end":{"line":1070,"column":30}},"362":{"start":{"line":1072,"column":6},"end":{"line":1072,"column":31}},"363":{"start":{"line":1074,"column":4},"end":{"line":1079,"column":5}},"364":{"start":{"line":1076,"column":6},"end":{"line":1076,"column":30}},"365":{"start":{"line":1078,"column":6},"end":{"line":1078,"column":31}},"366":{"start":{"line":1080,"column":4},"end":{"line":1085,"column":5}},"367":{"start":{"line":1082,"column":6},"end":{"line":1082,"column":40}},"368":{"start":{"line":1084,"column":6},"end":{"line":1084,"column":41}},"369":{"start":{"line":1086,"column":4},"end":{"line":1091,"column":5}},"370":{"start":{"line":1088,"column":6},"end":{"line":1088,"column":26}},"371":{"start":{"line":1090,"column":6},"end":{"line":1090,"column":27}},"372":{"start":{"line":1092,"column":4},"end":{"line":1097,"column":5}},"373":{"start":{"line":1094,"column":6},"end":{"line":1094,"column":24}},"374":{"start":{"line":1096,"column":6},"end":{"line":1096,"column":25}},"375":{"start":{"line":1098,"column":4},"end":{"line":1103,"column":5}},"376":{"start":{"line":1100,"column":6},"end":{"line":1100,"column":32}},"377":{"start":{"line":1102,"column":6},"end":{"line":1102,"column":33}},"378":{"start":{"line":1104,"column":4},"end":{"line":1111,"column":5}},"379":{"start":{"line":1105,"column":6},"end":{"line":1110,"column":7}},"380":{"start":{"line":1107,"column":8},"end":{"line":1107,"column":49}},"381":{"start":{"line":1109,"column":8},"end":{"line":1109,"column":37}},"382":{"start":{"line":1112,"column":4},"end":{"line":1138,"column":5}},"383":{"start":{"line":1114,"column":6},"end":{"line":1114,"column":30}},"384":{"start":{"line":1116,"column":6},"end":{"line":1116,"column":28}},"385":{"start":{"line":1118,"column":6},"end":{"line":1118,"column":31}},"386":{"start":{"line":1120,"column":6},"end":{"line":1120,"column":28}},"387":{"start":{"line":1122,"column":6},"end":{"line":1122,"column":30}},"388":{"start":{"line":1124,"column":6},"end":{"line":1124,"column":29}},"389":{"start":{"line":1126,"column":6},"end":{"line":1126,"column":35}},"390":{"start":{"line":1128,"column":6},"end":{"line":1128,"column":27}},"391":{"start":{"line":1130,"column":6},"end":{"line":1130,"column":31}},"392":{"start":{"line":1131,"column":6},"end":{"line":1131,"column":27}},"393":{"start":{"line":1132,"column":6},"end":{"line":1132,"column":30}},"394":{"start":{"line":1133,"column":6},"end":{"line":1133,"column":27}},"395":{"start":{"line":1134,"column":6},"end":{"line":1134,"column":29}},"396":{"start":{"line":1135,"column":6},"end":{"line":1135,"column":28}},"397":{"start":{"line":1136,"column":6},"end":{"line":1136,"column":35}},"398":{"start":{"line":1137,"column":6},"end":{"line":1137,"column":27}},"399":{"start":{"line":1139,"column":4},"end":{"line":1141,"column":5}},"400":{"start":{"line":1140,"column":6},"end":{"line":1140,"column":56}},"401":{"start":{"line":1173,"column":4},"end":{"line":1310,"column":7}},"402":{"start":{"line":1174,"column":26},"end":{"line":1174,"column":28}},"403":{"start":{"line":1175,"column":6},"end":{"line":1190,"column":7}},"404":{"start":{"line":1176,"column":8},"end":{"line":1189,"column":12}},"405":{"start":{"line":1178,"column":14},"end":{"line":1188,"column":21}},"406":{"start":{"line":1180,"column":20},"end":{"line":1180,"column":49}},"407":{"start":{"line":1181,"column":20},"end":{"line":1181,"column":34}},"408":{"start":{"line":1184,"column":20},"end":{"line":1184,"column":51}},"409":{"start":{"line":1185,"column":20},"end":{"line":1185,"column":54}},"410":{"start":{"line":1186,"column":20},"end":{"line":1186,"column":75}},"411":{"start":{"line":1187,"column":20},"end":{"line":1187,"column":34}},"412":{"start":{"line":1191,"column":6},"end":{"line":1206,"column":7}},"413":{"start":{"line":1192,"column":8},"end":{"line":1205,"column":12}},"414":{"start":{"line":1194,"column":14},"end":{"line":1204,"column":21}},"415":{"start":{"line":1196,"column":20},"end":{"line":1196,"column":45}},"416":{"start":{"line":1197,"column":20},"end":{"line":1197,"column":34}},"417":{"start":{"line":1200,"column":20},"end":{"line":1200,"column":51}},"418":{"start":{"line":1201,"column":20},"end":{"line":1201,"column":50}},"419":{"start":{"line":1202,"column":20},"end":{"line":1202,"column":75}},"420":{"start":{"line":1203,"column":20},"end":{"line":1203,"column":34}},"421":{"start":{"line":1207,"column":6},"end":{"line":1222,"column":7}},"422":{"start":{"line":1208,"column":8},"end":{"line":1221,"column":12}},"423":{"start":{"line":1210,"column":14},"end":{"line":1220,"column":21}},"424":{"start":{"line":1212,"column":20},"end":{"line":1212,"column":48}},"425":{"start":{"line":1213,"column":20},"end":{"line":1213,"column":34}},"426":{"start":{"line":1216,"column":20},"end":{"line":1216,"column":51}},"427":{"start":{"line":1217,"column":20},"end":{"line":1217,"column":53}},"428":{"start":{"line":1218,"column":20},"end":{"line":1218,"column":75}},"429":{"start":{"line":1219,"column":20},"end":{"line":1219,"column":34}},"430":{"start":{"line":1223,"column":6},"end":{"line":1238,"column":7}},"431":{"start":{"line":1224,"column":8},"end":{"line":1237,"column":12}},"432":{"start":{"line":1226,"column":14},"end":{"line":1236,"column":21}},"433":{"start":{"line":1228,"column":20},"end":{"line":1228,"column":45}},"434":{"start":{"line":1229,"column":20},"end":{"line":1229,"column":34}},"435":{"start":{"line":1232,"column":20},"end":{"line":1232,"column":51}},"436":{"start":{"line":1233,"column":20},"end":{"line":1233,"column":50}},"437":{"start":{"line":1234,"column":20},"end":{"line":1234,"column":75}},"438":{"start":{"line":1235,"column":20},"end":{"line":1235,"column":34}},"439":{"start":{"line":1239,"column":6},"end":{"line":1254,"column":7}},"440":{"start":{"line":1240,"column":8},"end":{"line":1253,"column":12}},"441":{"start":{"line":1242,"column":14},"end":{"line":1252,"column":21}},"442":{"start":{"line":1244,"column":20},"end":{"line":1244,"column":47}},"443":{"start":{"line":1245,"column":20},"end":{"line":1245,"column":34}},"444":{"start":{"line":1248,"column":20},"end":{"line":1248,"column":51}},"445":{"start":{"line":1249,"column":20},"end":{"line":1249,"column":52}},"446":{"start":{"line":1250,"column":20},"end":{"line":1250,"column":75}},"447":{"start":{"line":1251,"column":20},"end":{"line":1251,"column":34}},"448":{"start":{"line":1255,"column":6},"end":{"line":1270,"column":7}},"449":{"start":{"line":1256,"column":8},"end":{"line":1269,"column":12}},"450":{"start":{"line":1258,"column":14},"end":{"line":1268,"column":21}},"451":{"start":{"line":1260,"column":20},"end":{"line":1260,"column":46}},"452":{"start":{"line":1261,"column":20},"end":{"line":1261,"column":34}},"453":{"start":{"line":1264,"column":20},"end":{"line":1264,"column":51}},"454":{"start":{"line":1265,"column":20},"end":{"line":1265,"column":51}},"455":{"start":{"line":1266,"column":20},"end":{"line":1266,"column":75}},"456":{"start":{"line":1267,"column":20},"end":{"line":1267,"column":34}},"457":{"start":{"line":1271,"column":6},"end":{"line":1286,"column":7}},"458":{"start":{"line":1272,"column":8},"end":{"line":1285,"column":12}},"459":{"start":{"line":1274,"column":14},"end":{"line":1284,"column":21}},"460":{"start":{"line":1276,"column":20},"end":{"line":1276,"column":53}},"461":{"start":{"line":1277,"column":20},"end":{"line":1277,"column":34}},"462":{"start":{"line":1280,"column":20},"end":{"line":1280,"column":51}},"463":{"start":{"line":1281,"column":20},"end":{"line":1281,"column":58}},"464":{"start":{"line":1282,"column":20},"end":{"line":1282,"column":75}},"465":{"start":{"line":1283,"column":20},"end":{"line":1283,"column":34}},"466":{"start":{"line":1287,"column":6},"end":{"line":1302,"column":7}},"467":{"start":{"line":1288,"column":8},"end":{"line":1301,"column":12}},"468":{"start":{"line":1290,"column":14},"end":{"line":1300,"column":21}},"469":{"start":{"line":1292,"column":20},"end":{"line":1292,"column":45}},"470":{"start":{"line":1293,"column":20},"end":{"line":1293,"column":34}},"471":{"start":{"line":1296,"column":20},"end":{"line":1296,"column":51}},"472":{"start":{"line":1297,"column":20},"end":{"line":1297,"column":50}},"473":{"start":{"line":1298,"column":20},"end":{"line":1298,"column":75}},"474":{"start":{"line":1299,"column":20},"end":{"line":1299,"column":34}},"475":{"start":{"line":1303,"column":6},"end":{"line":1309,"column":13}},"476":{"start":{"line":1305,"column":12},"end":{"line":1305,"column":26}},"477":{"start":{"line":1308,"column":12},"end":{"line":1308,"column":26}},"478":{"start":{"line":1333,"column":4},"end":{"line":1451,"column":7}},"479":{"start":{"line":1334,"column":6},"end":{"line":1334,"column":30}},"480":{"start":{"line":1335,"column":21},"end":{"line":1336,"column":30}},"481":{"start":{"line":1337,"column":6},"end":{"line":1342,"column":7}},"482":{"start":{"line":1338,"column":21},"end":{"line":1338,"column":68}},"483":{"start":{"line":1339,"column":8},"end":{"line":1339,"column":66}},"484":{"start":{"line":1340,"column":8},"end":{"line":1340,"column":34}},"485":{"start":{"line":1341,"column":8},"end":{"line":1341,"column":15}},"486":{"start":{"line":1343,"column":21},"end":{"line":1343,"column":43}},"487":{"start":{"line":1344,"column":16},"end":{"line":1344,"column":34}},"488":{"start":{"line":1345,"column":15},"end":{"line":1345,"column":32}},"489":{"start":{"line":1346,"column":30},"end":{"line":1346,"column":61}},"490":{"start":{"line":1347,"column":19},"end":{"line":1347,"column":21}},"491":{"start":{"line":1348,"column":22},"end":{"line":1348,"column":26}},"492":{"start":{"line":1349,"column":27},"end":{"line":1349,"column":43}},"493":{"start":{"line":1350,"column":25},"end":{"line":1350,"column":33}},"494":{"start":{"line":1351,"column":25},"end":{"line":1351,"column":36}},"495":{"start":{"line":1353,"column":18},"end":{"line":1353,"column":43}},"496":{"start":{"line":1355,"column":6},"end":{"line":1355,"column":42}},"497":{"start":{"line":1357,"column":6},"end":{"line":1370,"column":7}},"498":{"start":{"line":1358,"column":8},"end":{"line":1358,"column":50}},"499":{"start":{"line":1359,"column":24},"end":{"line":1359,"column":27}},"500":{"start":{"line":1360,"column":8},"end":{"line":1362,"column":9}},"501":{"start":{"line":1361,"column":10},"end":{"line":1361,"column":31}},"502":{"start":{"line":1363,"column":8},"end":{"line":1368,"column":9}},"503":{"start":{"line":1364,"column":10},"end":{"line":1364,"column":40}},"504":{"start":{"line":1365,"column":10},"end":{"line":1365,"column":27}},"505":{"start":{"line":1367,"column":10},"end":{"line":1367,"column":29}},"506":{"start":{"line":1369,"column":8},"end":{"line":1369,"column":56}},"507":{"start":{"line":1372,"column":22},"end":{"line":1372,"column":25}},"508":{"start":{"line":1373,"column":6},"end":{"line":1413,"column":7}},"509":{"start":{"line":1374,"column":26},"end":{"line":1374,"column":40}},"510":{"start":{"line":1375,"column":8},"end":{"line":1410,"column":9}},"511":{"start":{"line":1376,"column":10},"end":{"line":1376,"column":38}},"512":{"start":{"line":1377,"column":10},"end":{"line":1389,"column":11}},"513":{"start":{"line":1378,"column":12},"end":{"line":1382,"column":13}},"514":{"start":{"line":1379,"column":14},"end":{"line":1379,"column":79}},"515":{"start":{"line":1381,"column":14},"end":{"line":1381,"column":78}},"516":{"start":{"line":1384,"column":12},"end":{"line":1388,"column":13}},"517":{"start":{"line":1385,"column":14},"end":{"line":1385,"column":72}},"518":{"start":{"line":1387,"column":14},"end":{"line":1387,"column":71}},"519":{"start":{"line":1391,"column":10},"end":{"line":1409,"column":11}},"520":{"start":{"line":1392,"column":12},"end":{"line":1392,"column":40}},"521":{"start":{"line":1393,"column":12},"end":{"line":1399,"column":13}},"522":{"start":{"line":1394,"column":14},"end":{"line":1394,"column":43}},"523":{"start":{"line":1395,"column":14},"end":{"line":1395,"column":47}},"524":{"start":{"line":1396,"column":14},"end":{"line":1396,"column":73}},"525":{"start":{"line":1398,"column":14},"end":{"line":1398,"column":66}},"526":{"start":{"line":1401,"column":12},"end":{"line":1401,"column":40}},"527":{"start":{"line":1402,"column":12},"end":{"line":1408,"column":13}},"528":{"start":{"line":1403,"column":14},"end":{"line":1403,"column":43}},"529":{"start":{"line":1404,"column":14},"end":{"line":1404,"column":47}},"530":{"start":{"line":1405,"column":14},"end":{"line":1405,"column":72}},"531":{"start":{"line":1407,"column":14},"end":{"line":1407,"column":65}},"532":{"start":{"line":1411,"column":8},"end":{"line":1411,"column":27}},"533":{"start":{"line":1412,"column":8},"end":{"line":1412,"column":44}},"534":{"start":{"line":1415,"column":27},"end":{"line":1415,"column":30}},"535":{"start":{"line":1416,"column":29},"end":{"line":1416,"column":53}},"536":{"start":{"line":1417,"column":6},"end":{"line":1434,"column":7}},"537":{"start":{"line":1418,"column":29},"end":{"line":1418,"column":31}},"538":{"start":{"line":1419,"column":25},"end":{"line":1419,"column":27}},"539":{"start":{"line":1420,"column":35},"end":{"line":1420,"column":53}},"540":{"start":{"line":1422,"column":8},"end":{"line":1432,"column":9}},"541":{"start":{"line":1426,"column":12},"end":{"line":1427,"column":41}},"542":{"start":{"line":1428,"column":10},"end":{"line":1431,"column":11}},"543":{"start":{"line":1429,"column":12},"end":{"line":1429,"column":45}},"544":{"start":{"line":1430,"column":12},"end":{"line":1430,"column":61}},"545":{"start":{"line":1433,"column":8},"end":{"line":1433,"column":45}},"546":{"start":{"line":1436,"column":6},"end":{"line":1436,"column":31}},"547":{"start":{"line":1437,"column":6},"end":{"line":1437,"column":20}},"548":{"start":{"line":1438,"column":6},"end":{"line":1438,"column":32}},"549":{"start":{"line":1439,"column":6},"end":{"line":1439,"column":36}},"550":{"start":{"line":1440,"column":6},"end":{"line":1440,"column":43}},"551":{"start":{"line":1441,"column":6},"end":{"line":1441,"column":26}},"552":{"start":{"line":1442,"column":6},"end":{"line":1442,"column":25}},"553":{"start":{"line":1443,"column":6},"end":{"line":1443,"column":37}},"554":{"start":{"line":1444,"column":6},"end":{"line":1448,"column":7}},"555":{"start":{"line":1445,"column":8},"end":{"line":1445,"column":31}},"556":{"start":{"line":1447,"column":8},"end":{"line":1447,"column":28}},"557":{"start":{"line":1449,"column":6},"end":{"line":1449,"column":24}},"558":{"start":{"line":1450,"column":6},"end":{"line":1450,"column":22}},"559":{"start":{"line":1464,"column":4},"end":{"line":1481,"column":7}},"560":{"start":{"line":1465,"column":6},"end":{"line":1467,"column":7}},"561":{"start":{"line":1466,"column":8},"end":{"line":1466,"column":35}},"562":{"start":{"line":1468,"column":6},"end":{"line":1480,"column":11}},"563":{"start":{"line":1470,"column":10},"end":{"line":1476,"column":15}},"564":{"start":{"line":1472,"column":14},"end":{"line":1472,"column":34}},"565":{"start":{"line":1475,"column":14},"end":{"line":1475,"column":28}},"566":{"start":{"line":1479,"column":10},"end":{"line":1479,"column":24}},"567":{"start":{"line":1491,"column":4},"end":{"line":1494,"column":7}},"568":{"start":{"line":1504,"column":4},"end":{"line":1504,"column":31}},"569":{"start":{"line":1514,"column":4},"end":{"line":1517,"column":7}},"570":{"start":{"line":1527,"column":4},"end":{"line":1530,"column":7}},"571":{"start":{"line":1540,"column":4},"end":{"line":1540,"column":30}},"572":{"start":{"line":1550,"column":4},"end":{"line":1553,"column":7}},"573":{"start":{"line":1563,"column":4},"end":{"line":1563,"column":27}},"574":{"start":{"line":1573,"column":4},"end":{"line":1576,"column":7}},"575":{"start":{"line":1586,"column":4},"end":{"line":1586,"column":29}},"576":{"start":{"line":1596,"column":4},"end":{"line":1599,"column":7}},"577":{"start":{"line":1609,"column":4},"end":{"line":1609,"column":28}},"578":{"start":{"line":1619,"column":4},"end":{"line":1622,"column":7}},"579":{"start":{"line":1632,"column":4},"end":{"line":1632,"column":35}},"580":{"start":{"line":1642,"column":4},"end":{"line":1642,"column":35}},"581":{"start":{"line":1652,"column":4},"end":{"line":1655,"column":7}},"582":{"start":{"line":1690,"column":4},"end":{"line":1690,"column":30}},"583":{"start":{"line":1691,"column":4},"end":{"line":1691,"column":28}},"584":{"start":{"line":1693,"column":4},"end":{"line":1693,"column":46}},"585":{"start":{"line":1695,"column":4},"end":{"line":1695,"column":48}},"586":{"start":{"line":1697,"column":4},"end":{"line":1697,"column":48}},"587":{"start":{"line":1699,"column":4},"end":{"line":1699,"column":48}},"588":{"start":{"line":1701,"column":4},"end":{"line":1702,"column":38}},"589":{"start":{"line":1704,"column":4},"end":{"line":1751,"column":6}},"590":{"start":{"line":1752,"column":4},"end":{"line":1759,"column":5}},"591":{"start":{"line":1753,"column":6},"end":{"line":1758,"column":7}},"592":{"start":{"line":1755,"column":8},"end":{"line":1755,"column":37}},"593":{"start":{"line":1757,"column":8},"end":{"line":1757,"column":49}},"594":{"start":{"line":1767,"column":4},"end":{"line":1785,"column":7}},"595":{"start":{"line":1768,"column":19},"end":{"line":1768,"column":29}},"596":{"start":{"line":1769,"column":6},"end":{"line":1769,"column":34}},"597":{"start":{"line":1770,"column":6},"end":{"line":1770,"column":35}},"598":{"start":{"line":1771,"column":6},"end":{"line":1771,"column":35}},"599":{"start":{"line":1772,"column":6},"end":{"line":1772,"column":35}},"600":{"start":{"line":1773,"column":6},"end":{"line":1773,"column":20}},"601":{"start":{"line":1776,"column":18},"end":{"line":1776,"column":24}},"602":{"start":{"line":1777,"column":26},"end":{"line":1777,"column":57}},"603":{"start":{"line":1778,"column":29},"end":{"line":1778,"column":47}},"604":{"start":{"line":1779,"column":6},"end":{"line":1783,"column":7}},"605":{"start":{"line":1780,"column":8},"end":{"line":1782,"column":9}},"606":{"start":{"line":1781,"column":10},"end":{"line":1781,"column":80}},"607":{"start":{"line":1784,"column":6},"end":{"line":1784,"column":22}},"608":{"start":{"line":1795,"column":4},"end":{"line":1809,"column":7}},"609":{"start":{"line":1796,"column":6},"end":{"line":1808,"column":11}},"610":{"start":{"line":1798,"column":10},"end":{"line":1800,"column":11}},"611":{"start":{"line":1799,"column":12},"end":{"line":1799,"column":46}},"612":{"start":{"line":1801,"column":10},"end":{"line":1807,"column":15}},"613":{"start":{"line":1803,"column":14},"end":{"line":1803,"column":34}},"614":{"start":{"line":1806,"column":14},"end":{"line":1806,"column":28}},"615":{"start":{"line":1846,"column":4},"end":{"line":1846,"column":30}},"616":{"start":{"line":1847,"column":4},"end":{"line":1847,"column":28}},"617":{"start":{"line":1849,"column":4},"end":{"line":1849,"column":58}},"618":{"start":{"line":1851,"column":4},"end":{"line":1851,"column":60}},"619":{"start":{"line":1853,"column":4},"end":{"line":1853,"column":60}},"620":{"start":{"line":1855,"column":4},"end":{"line":1855,"column":70}},"621":{"start":{"line":1857,"column":4},"end":{"line":1857,"column":42}},"622":{"start":{"line":1859,"column":4},"end":{"line":1859,"column":50}},"623":{"start":{"line":1861,"column":4},"end":{"line":2019,"column":6}},"624":{"start":{"line":2020,"column":4},"end":{"line":2027,"column":5}},"625":{"start":{"line":2021,"column":6},"end":{"line":2026,"column":7}},"626":{"start":{"line":2023,"column":8},"end":{"line":2023,"column":37}},"627":{"start":{"line":2025,"column":8},"end":{"line":2025,"column":49}},"628":{"start":{"line":2036,"column":4},"end":{"line":2256,"column":7}},"629":{"start":{"line":2037,"column":25},"end":{"line":2195,"column":7}},"630":{"start":{"line":2196,"column":6},"end":{"line":2201,"column":7}},"631":{"start":{"line":2200,"column":8},"end":{"line":2200,"column":74}},"632":{"start":{"line":2202,"column":6},"end":{"line":2224,"column":7}},"633":{"start":{"line":2223,"column":8},"end":{"line":2223,"column":72}},"634":{"start":{"line":2225,"column":22},"end":{"line":2225,"column":53}},"635":{"start":{"line":2226,"column":25},"end":{"line":2226,"column":39}},"636":{"start":{"line":2227,"column":6},"end":{"line":2254,"column":7}},"637":{"start":{"line":2228,"column":8},"end":{"line":2253,"column":9}},"638":{"start":{"line":2229,"column":10},"end":{"line":2252,"column":11}},"639":{"start":{"line":2230,"column":12},"end":{"line":2251,"column":13}},"640":{"start":{"line":2233,"column":14},"end":{"line":2243,"column":15}},"641":{"start":{"line":2236,"column":29},"end":{"line":2236,"column":44}},"642":{"start":{"line":2237,"column":16},"end":{"line":2237,"column":47}},"643":{"start":{"line":2238,"column":16},"end":{"line":2238,"column":48}},"644":{"start":{"line":2239,"column":16},"end":{"line":2239,"column":54}},"645":{"start":{"line":2240,"column":16},"end":{"line":2240,"column":43}},"646":{"start":{"line":2241,"column":16},"end":{"line":2241,"column":64}},"647":{"start":{"line":2242,"column":16},"end":{"line":2242,"column":42}},"648":{"start":{"line":2245,"column":27},"end":{"line":2245,"column":40}},"649":{"start":{"line":2246,"column":14},"end":{"line":2246,"column":35}},"650":{"start":{"line":2247,"column":14},"end":{"line":2247,"column":46}},"651":{"start":{"line":2248,"column":14},"end":{"line":2248,"column":57}},"652":{"start":{"line":2249,"column":14},"end":{"line":2249,"column":77}},"653":{"start":{"line":2250,"column":14},"end":{"line":2250,"column":40}},"654":{"start":{"line":2255,"column":6},"end":{"line":2255,"column":20}},"655":{"start":{"line":2264,"column":4},"end":{"line":2282,"column":7}},"656":{"start":{"line":2265,"column":19},"end":{"line":2265,"column":26}},"657":{"start":{"line":2266,"column":6},"end":{"line":2266,"column":40}},"658":{"start":{"line":2267,"column":6},"end":{"line":2267,"column":41}},"659":{"start":{"line":2268,"column":6},"end":{"line":2268,"column":41}},"660":{"start":{"line":2269,"column":6},"end":{"line":2269,"column":46}},"661":{"start":{"line":2270,"column":6},"end":{"line":2270,"column":32}},"662":{"start":{"line":2271,"column":6},"end":{"line":2271,"column":36}},"663":{"start":{"line":2272,"column":6},"end":{"line":2272,"column":20}},"664":{"start":{"line":2274,"column":22},"end":{"line":2274,"column":53}},"665":{"start":{"line":2275,"column":25},"end":{"line":2275,"column":39}},"666":{"start":{"line":2276,"column":6},"end":{"line":2280,"column":7}},"667":{"start":{"line":2277,"column":8},"end":{"line":2279,"column":9}},"668":{"start":{"line":2278,"column":10},"end":{"line":2278,"column":66}},"669":{"start":{"line":2281,"column":6},"end":{"line":2281,"column":22}},"670":{"start":{"line":2291,"column":4},"end":{"line":2305,"column":7}},"671":{"start":{"line":2292,"column":6},"end":{"line":2304,"column":11}},"672":{"start":{"line":2294,"column":10},"end":{"line":2296,"column":11}},"673":{"start":{"line":2295,"column":12},"end":{"line":2295,"column":46}},"674":{"start":{"line":2297,"column":10},"end":{"line":2303,"column":15}},"675":{"start":{"line":2299,"column":14},"end":{"line":2299,"column":34}},"676":{"start":{"line":2302,"column":14},"end":{"line":2302,"column":28}},"677":{"start":{"line":2309,"column":0},"end":{"line":2316,"column":2}}},"fnMap":{"0":{"name":"rgbToAnsi","decl":{"start":{"line":29,"column":9},"end":{"line":29,"column":18}},"loc":{"start":{"line":29,"column":40},"end":{"line":87,"column":1}},"line":29},"1":{"name":"(anonymous_1)","decl":{"start":{"line":30,"column":21},"end":{"line":30,"column":22}},"loc":{"start":{"line":30,"column":42},"end":{"line":86,"column":3}},"line":30},"2":{"name":"(anonymous_2)","decl":{"start":{"line":140,"column":2},"end":{"line":140,"column":3}},"loc":{"start":{"line":140,"column":24},"end":{"line":222,"column":3}},"line":140},"3":{"name":"(anonymous_3)","decl":{"start":{"line":235,"column":2},"end":{"line":235,"column":3}},"loc":{"start":{"line":235,"column":28},"end":{"line":249,"column":3}},"line":235},"4":{"name":"(anonymous_4)","decl":{"start":{"line":236,"column":23},"end":{"line":236,"column":24}},"loc":{"start":{"line":236,"column":44},"end":{"line":248,"column":5}},"line":236},"5":{"name":"(anonymous_5)","decl":{"start":{"line":257,"column":2},"end":{"line":257,"column":3}},"loc":{"start":{"line":257,"column":19},"end":{"line":278,"column":3}},"line":257},"6":{"name":"(anonymous_6)","decl":{"start":{"line":258,"column":23},"end":{"line":258,"column":24}},"loc":{"start":{"line":258,"column":44},"end":{"line":277,"column":5}},"line":258},"7":{"name":"(anonymous_7)","decl":{"start":{"line":264,"column":16},"end":{"line":264,"column":17}},"loc":{"start":{"line":264,"column":28},"end":{"line":273,"column":11}},"line":264},"8":{"name":"(anonymous_8)","decl":{"start":{"line":269,"column":59},"end":{"line":269,"column":60}},"loc":{"start":{"line":269,"column":70},"end":{"line":272,"column":13}},"line":269},"9":{"name":"(anonymous_9)","decl":{"start":{"line":274,"column":17},"end":{"line":274,"column":18}},"loc":{"start":{"line":274,"column":28},"end":{"line":276,"column":11}},"line":274},"10":{"name":"(anonymous_10)","decl":{"start":{"line":287,"column":2},"end":{"line":287,"column":3}},"loc":{"start":{"line":287,"column":19},"end":{"line":324,"column":3}},"line":287},"11":{"name":"(anonymous_11)","decl":{"start":{"line":288,"column":23},"end":{"line":288,"column":24}},"loc":{"start":{"line":288,"column":44},"end":{"line":323,"column":5}},"line":288},"12":{"name":"(anonymous_12)","decl":{"start":{"line":294,"column":16},"end":{"line":294,"column":17}},"loc":{"start":{"line":294,"column":28},"end":{"line":319,"column":11}},"line":294},"13":{"name":"(anonymous_13)","decl":{"start":{"line":300,"column":60},"end":{"line":300,"column":61}},"loc":{"start":{"line":300,"column":66},"end":{"line":306,"column":13}},"line":300},"14":{"name":"(anonymous_14)","decl":{"start":{"line":303,"column":38},"end":{"line":303,"column":39}},"loc":{"start":{"line":303,"column":44},"end":{"line":305,"column":15}},"line":303},"15":{"name":"(anonymous_15)","decl":{"start":{"line":308,"column":29},"end":{"line":308,"column":30}},"loc":{"start":{"line":308,"column":35},"end":{"line":310,"column":13}},"line":308},"16":{"name":"(anonymous_16)","decl":{"start":{"line":311,"column":33},"end":{"line":311,"column":34}},"loc":{"start":{"line":311,"column":39},"end":{"line":314,"column":13}},"line":311},"17":{"name":"(anonymous_17)","decl":{"start":{"line":315,"column":31},"end":{"line":315,"column":32}},"loc":{"start":{"line":315,"column":42},"end":{"line":318,"column":13}},"line":315},"18":{"name":"(anonymous_18)","decl":{"start":{"line":320,"column":17},"end":{"line":320,"column":18}},"loc":{"start":{"line":320,"column":28},"end":{"line":322,"column":11}},"line":320},"19":{"name":"(anonymous_19)","decl":{"start":{"line":333,"column":2},"end":{"line":333,"column":3}},"loc":{"start":{"line":333,"column":19},"end":{"line":395,"column":3}},"line":333},"20":{"name":"(anonymous_20)","decl":{"start":{"line":334,"column":23},"end":{"line":334,"column":24}},"loc":{"start":{"line":334,"column":44},"end":{"line":394,"column":5}},"line":334},"21":{"name":"(anonymous_21)","decl":{"start":{"line":374,"column":45},"end":{"line":374,"column":46}},"loc":{"start":{"line":374,"column":51},"end":{"line":380,"column":7}},"line":374},"22":{"name":"(anonymous_22)","decl":{"start":{"line":377,"column":32},"end":{"line":377,"column":33}},"loc":{"start":{"line":377,"column":38},"end":{"line":379,"column":9}},"line":377},"23":{"name":"(anonymous_23)","decl":{"start":{"line":383,"column":23},"end":{"line":383,"column":24}},"loc":{"start":{"line":383,"column":29},"end":{"line":385,"column":7}},"line":383},"24":{"name":"(anonymous_24)","decl":{"start":{"line":386,"column":27},"end":{"line":386,"column":28}},"loc":{"start":{"line":386,"column":33},"end":{"line":389,"column":7}},"line":386},"25":{"name":"(anonymous_25)","decl":{"start":{"line":390,"column":25},"end":{"line":390,"column":26}},"loc":{"start":{"line":390,"column":36},"end":{"line":393,"column":7}},"line":390},"26":{"name":"(anonymous_26)","decl":{"start":{"line":405,"column":2},"end":{"line":405,"column":3}},"loc":{"start":{"line":405,"column":13},"end":{"line":442,"column":3}},"line":405},"27":{"name":"(anonymous_27)","decl":{"start":{"line":406,"column":23},"end":{"line":406,"column":24}},"loc":{"start":{"line":406,"column":44},"end":{"line":441,"column":5}},"line":406},"28":{"name":"(anonymous_28)","decl":{"start":{"line":414,"column":18},"end":{"line":414,"column":19}},"loc":{"start":{"line":414,"column":30},"end":{"line":416,"column":13}},"line":414},"29":{"name":"(anonymous_29)","decl":{"start":{"line":417,"column":19},"end":{"line":417,"column":20}},"loc":{"start":{"line":417,"column":30},"end":{"line":419,"column":13}},"line":417},"30":{"name":"(anonymous_30)","decl":{"start":{"line":422,"column":18},"end":{"line":422,"column":19}},"loc":{"start":{"line":422,"column":30},"end":{"line":424,"column":13}},"line":422},"31":{"name":"(anonymous_31)","decl":{"start":{"line":425,"column":19},"end":{"line":425,"column":20}},"loc":{"start":{"line":425,"column":30},"end":{"line":427,"column":13}},"line":425},"32":{"name":"(anonymous_32)","decl":{"start":{"line":430,"column":18},"end":{"line":430,"column":19}},"loc":{"start":{"line":430,"column":30},"end":{"line":432,"column":13}},"line":430},"33":{"name":"(anonymous_33)","decl":{"start":{"line":433,"column":19},"end":{"line":433,"column":20}},"loc":{"start":{"line":433,"column":30},"end":{"line":435,"column":13}},"line":433},"34":{"name":"(anonymous_34)","decl":{"start":{"line":495,"column":2},"end":{"line":495,"column":3}},"loc":{"start":{"line":495,"column":24},"end":{"line":552,"column":3}},"line":495},"35":{"name":"(anonymous_35)","decl":{"start":{"line":582,"column":2},"end":{"line":582,"column":3}},"loc":{"start":{"line":582,"column":35},"end":{"line":721,"column":3}},"line":582},"36":{"name":"(anonymous_36)","decl":{"start":{"line":583,"column":23},"end":{"line":583,"column":24}},"loc":{"start":{"line":583,"column":44},"end":{"line":720,"column":5}},"line":583},"37":{"name":"(anonymous_37)","decl":{"start":{"line":587,"column":24},"end":{"line":587,"column":25}},"loc":{"start":{"line":587,"column":44},"end":{"line":599,"column":9}},"line":587},"38":{"name":"(anonymous_38)","decl":{"start":{"line":589,"column":24},"end":{"line":589,"column":25}},"loc":{"start":{"line":589,"column":36},"end":{"line":592,"column":19}},"line":589},"39":{"name":"(anonymous_39)","decl":{"start":{"line":593,"column":25},"end":{"line":593,"column":26}},"loc":{"start":{"line":593,"column":36},"end":{"line":598,"column":19}},"line":593},"40":{"name":"(anonymous_40)","decl":{"start":{"line":603,"column":24},"end":{"line":603,"column":25}},"loc":{"start":{"line":603,"column":44},"end":{"line":615,"column":9}},"line":603},"41":{"name":"(anonymous_41)","decl":{"start":{"line":605,"column":24},"end":{"line":605,"column":25}},"loc":{"start":{"line":605,"column":36},"end":{"line":608,"column":19}},"line":605},"42":{"name":"(anonymous_42)","decl":{"start":{"line":609,"column":25},"end":{"line":609,"column":26}},"loc":{"start":{"line":609,"column":36},"end":{"line":614,"column":19}},"line":609},"43":{"name":"(anonymous_43)","decl":{"start":{"line":619,"column":24},"end":{"line":619,"column":25}},"loc":{"start":{"line":619,"column":44},"end":{"line":631,"column":9}},"line":619},"44":{"name":"(anonymous_44)","decl":{"start":{"line":621,"column":24},"end":{"line":621,"column":25}},"loc":{"start":{"line":621,"column":36},"end":{"line":624,"column":19}},"line":621},"45":{"name":"(anonymous_45)","decl":{"start":{"line":625,"column":25},"end":{"line":625,"column":26}},"loc":{"start":{"line":625,"column":36},"end":{"line":630,"column":19}},"line":625},"46":{"name":"(anonymous_46)","decl":{"start":{"line":635,"column":24},"end":{"line":635,"column":25}},"loc":{"start":{"line":635,"column":44},"end":{"line":647,"column":9}},"line":635},"47":{"name":"(anonymous_47)","decl":{"start":{"line":637,"column":24},"end":{"line":637,"column":25}},"loc":{"start":{"line":637,"column":36},"end":{"line":640,"column":19}},"line":637},"48":{"name":"(anonymous_48)","decl":{"start":{"line":641,"column":25},"end":{"line":641,"column":26}},"loc":{"start":{"line":641,"column":36},"end":{"line":646,"column":19}},"line":641},"49":{"name":"(anonymous_49)","decl":{"start":{"line":651,"column":24},"end":{"line":651,"column":25}},"loc":{"start":{"line":651,"column":44},"end":{"line":663,"column":9}},"line":651},"50":{"name":"(anonymous_50)","decl":{"start":{"line":653,"column":24},"end":{"line":653,"column":25}},"loc":{"start":{"line":653,"column":36},"end":{"line":656,"column":19}},"line":653},"51":{"name":"(anonymous_51)","decl":{"start":{"line":657,"column":25},"end":{"line":657,"column":26}},"loc":{"start":{"line":657,"column":36},"end":{"line":662,"column":19}},"line":657},"52":{"name":"(anonymous_52)","decl":{"start":{"line":667,"column":24},"end":{"line":667,"column":25}},"loc":{"start":{"line":667,"column":44},"end":{"line":679,"column":9}},"line":667},"53":{"name":"(anonymous_53)","decl":{"start":{"line":669,"column":24},"end":{"line":669,"column":25}},"loc":{"start":{"line":669,"column":36},"end":{"line":672,"column":19}},"line":669},"54":{"name":"(anonymous_54)","decl":{"start":{"line":673,"column":25},"end":{"line":673,"column":26}},"loc":{"start":{"line":673,"column":36},"end":{"line":678,"column":19}},"line":673},"55":{"name":"(anonymous_55)","decl":{"start":{"line":683,"column":24},"end":{"line":683,"column":25}},"loc":{"start":{"line":683,"column":44},"end":{"line":695,"column":9}},"line":683},"56":{"name":"(anonymous_56)","decl":{"start":{"line":685,"column":24},"end":{"line":685,"column":25}},"loc":{"start":{"line":685,"column":36},"end":{"line":688,"column":19}},"line":685},"57":{"name":"(anonymous_57)","decl":{"start":{"line":689,"column":25},"end":{"line":689,"column":26}},"loc":{"start":{"line":689,"column":36},"end":{"line":694,"column":19}},"line":689},"58":{"name":"(anonymous_58)","decl":{"start":{"line":699,"column":24},"end":{"line":699,"column":25}},"loc":{"start":{"line":699,"column":44},"end":{"line":711,"column":9}},"line":699},"59":{"name":"(anonymous_59)","decl":{"start":{"line":701,"column":24},"end":{"line":701,"column":25}},"loc":{"start":{"line":701,"column":36},"end":{"line":704,"column":19}},"line":701},"60":{"name":"(anonymous_60)","decl":{"start":{"line":705,"column":25},"end":{"line":705,"column":26}},"loc":{"start":{"line":705,"column":36},"end":{"line":710,"column":19}},"line":705},"61":{"name":"(anonymous_61)","decl":{"start":{"line":714,"column":16},"end":{"line":714,"column":17}},"loc":{"start":{"line":714,"column":29},"end":{"line":716,"column":11}},"line":714},"62":{"name":"(anonymous_62)","decl":{"start":{"line":717,"column":17},"end":{"line":717,"column":18}},"loc":{"start":{"line":717,"column":28},"end":{"line":719,"column":11}},"line":717},"63":{"name":"(anonymous_63)","decl":{"start":{"line":733,"column":2},"end":{"line":733,"column":3}},"loc":{"start":{"line":733,"column":30},"end":{"line":783,"column":3}},"line":733},"64":{"name":"(anonymous_64)","decl":{"start":{"line":734,"column":23},"end":{"line":734,"column":24}},"loc":{"start":{"line":734,"column":44},"end":{"line":782,"column":5}},"line":734},"65":{"name":"(anonymous_65)","decl":{"start":{"line":797,"column":2},"end":{"line":797,"column":3}},"loc":{"start":{"line":797,"column":22},"end":{"line":816,"column":3}},"line":797},"66":{"name":"(anonymous_66)","decl":{"start":{"line":798,"column":23},"end":{"line":798,"column":24}},"loc":{"start":{"line":798,"column":44},"end":{"line":815,"column":5}},"line":798},"67":{"name":"(anonymous_67)","decl":{"start":{"line":803,"column":14},"end":{"line":803,"column":15}},"loc":{"start":{"line":803,"column":26},"end":{"line":811,"column":9}},"line":803},"68":{"name":"(anonymous_68)","decl":{"start":{"line":805,"column":18},"end":{"line":805,"column":19}},"loc":{"start":{"line":805,"column":34},"end":{"line":807,"column":13}},"line":805},"69":{"name":"(anonymous_69)","decl":{"start":{"line":808,"column":19},"end":{"line":808,"column":20}},"loc":{"start":{"line":808,"column":30},"end":{"line":810,"column":13}},"line":808},"70":{"name":"(anonymous_70)","decl":{"start":{"line":812,"column":15},"end":{"line":812,"column":16}},"loc":{"start":{"line":812,"column":26},"end":{"line":814,"column":9}},"line":812},"71":{"name":"(anonymous_71)","decl":{"start":{"line":824,"column":2},"end":{"line":824,"column":3}},"loc":{"start":{"line":824,"column":18},"end":{"line":829,"column":3}},"line":824},"72":{"name":"(anonymous_72)","decl":{"start":{"line":837,"column":2},"end":{"line":837,"column":3}},"loc":{"start":{"line":837,"column":13},"end":{"line":839,"column":3}},"line":837},"73":{"name":"(anonymous_73)","decl":{"start":{"line":847,"column":2},"end":{"line":847,"column":3}},"loc":{"start":{"line":847,"column":14},"end":{"line":852,"column":3}},"line":847},"74":{"name":"(anonymous_74)","decl":{"start":{"line":860,"column":2},"end":{"line":860,"column":3}},"loc":{"start":{"line":860,"column":17},"end":{"line":865,"column":3}},"line":860},"75":{"name":"(anonymous_75)","decl":{"start":{"line":873,"column":2},"end":{"line":873,"column":3}},"loc":{"start":{"line":873,"column":13},"end":{"line":875,"column":3}},"line":873},"76":{"name":"(anonymous_76)","decl":{"start":{"line":883,"column":2},"end":{"line":883,"column":3}},"loc":{"start":{"line":883,"column":14},"end":{"line":888,"column":3}},"line":883},"77":{"name":"(anonymous_77)","decl":{"start":{"line":896,"column":2},"end":{"line":896,"column":3}},"loc":{"start":{"line":896,"column":12},"end":{"line":898,"column":3}},"line":896},"78":{"name":"(anonymous_78)","decl":{"start":{"line":906,"column":2},"end":{"line":906,"column":3}},"loc":{"start":{"line":906,"column":16},"end":{"line":911,"column":3}},"line":906},"79":{"name":"(anonymous_79)","decl":{"start":{"line":919,"column":2},"end":{"line":919,"column":3}},"loc":{"start":{"line":919,"column":13},"end":{"line":921,"column":3}},"line":919},"80":{"name":"(anonymous_80)","decl":{"start":{"line":929,"column":2},"end":{"line":929,"column":3}},"loc":{"start":{"line":929,"column":15},"end":{"line":934,"column":3}},"line":929},"81":{"name":"(anonymous_81)","decl":{"start":{"line":942,"column":2},"end":{"line":942,"column":3}},"loc":{"start":{"line":942,"column":13},"end":{"line":944,"column":3}},"line":942},"82":{"name":"(anonymous_82)","decl":{"start":{"line":952,"column":2},"end":{"line":952,"column":3}},"loc":{"start":{"line":952,"column":22},"end":{"line":957,"column":3}},"line":952},"83":{"name":"(anonymous_83)","decl":{"start":{"line":965,"column":2},"end":{"line":965,"column":3}},"loc":{"start":{"line":965,"column":13},"end":{"line":967,"column":3}},"line":965},"84":{"name":"(anonymous_84)","decl":{"start":{"line":975,"column":2},"end":{"line":975,"column":3}},"loc":{"start":{"line":975,"column":12},"end":{"line":977,"column":3}},"line":975},"85":{"name":"(anonymous_85)","decl":{"start":{"line":985,"column":2},"end":{"line":985,"column":3}},"loc":{"start":{"line":985,"column":14},"end":{"line":990,"column":3}},"line":985},"86":{"name":"(anonymous_86)","decl":{"start":{"line":1050,"column":2},"end":{"line":1050,"column":3}},"loc":{"start":{"line":1050,"column":24},"end":{"line":1142,"column":3}},"line":1050},"87":{"name":"(anonymous_87)","decl":{"start":{"line":1172,"column":2},"end":{"line":1172,"column":3}},"loc":{"start":{"line":1172,"column":35},"end":{"line":1311,"column":3}},"line":1172},"88":{"name":"(anonymous_88)","decl":{"start":{"line":1173,"column":23},"end":{"line":1173,"column":24}},"loc":{"start":{"line":1173,"column":44},"end":{"line":1310,"column":5}},"line":1173},"89":{"name":"(anonymous_89)","decl":{"start":{"line":1177,"column":24},"end":{"line":1177,"column":25}},"loc":{"start":{"line":1177,"column":44},"end":{"line":1189,"column":9}},"line":1177},"90":{"name":"(anonymous_90)","decl":{"start":{"line":1179,"column":24},"end":{"line":1179,"column":25}},"loc":{"start":{"line":1179,"column":36},"end":{"line":1182,"column":19}},"line":1179},"91":{"name":"(anonymous_91)","decl":{"start":{"line":1183,"column":25},"end":{"line":1183,"column":26}},"loc":{"start":{"line":1183,"column":36},"end":{"line":1188,"column":19}},"line":1183},"92":{"name":"(anonymous_92)","decl":{"start":{"line":1193,"column":24},"end":{"line":1193,"column":25}},"loc":{"start":{"line":1193,"column":44},"end":{"line":1205,"column":9}},"line":1193},"93":{"name":"(anonymous_93)","decl":{"start":{"line":1195,"column":24},"end":{"line":1195,"column":25}},"loc":{"start":{"line":1195,"column":36},"end":{"line":1198,"column":19}},"line":1195},"94":{"name":"(anonymous_94)","decl":{"start":{"line":1199,"column":25},"end":{"line":1199,"column":26}},"loc":{"start":{"line":1199,"column":36},"end":{"line":1204,"column":19}},"line":1199},"95":{"name":"(anonymous_95)","decl":{"start":{"line":1209,"column":24},"end":{"line":1209,"column":25}},"loc":{"start":{"line":1209,"column":44},"end":{"line":1221,"column":9}},"line":1209},"96":{"name":"(anonymous_96)","decl":{"start":{"line":1211,"column":24},"end":{"line":1211,"column":25}},"loc":{"start":{"line":1211,"column":36},"end":{"line":1214,"column":19}},"line":1211},"97":{"name":"(anonymous_97)","decl":{"start":{"line":1215,"column":25},"end":{"line":1215,"column":26}},"loc":{"start":{"line":1215,"column":36},"end":{"line":1220,"column":19}},"line":1215},"98":{"name":"(anonymous_98)","decl":{"start":{"line":1225,"column":24},"end":{"line":1225,"column":25}},"loc":{"start":{"line":1225,"column":44},"end":{"line":1237,"column":9}},"line":1225},"99":{"name":"(anonymous_99)","decl":{"start":{"line":1227,"column":24},"end":{"line":1227,"column":25}},"loc":{"start":{"line":1227,"column":36},"end":{"line":1230,"column":19}},"line":1227},"100":{"name":"(anonymous_100)","decl":{"start":{"line":1231,"column":25},"end":{"line":1231,"column":26}},"loc":{"start":{"line":1231,"column":36},"end":{"line":1236,"column":19}},"line":1231},"101":{"name":"(anonymous_101)","decl":{"start":{"line":1241,"column":24},"end":{"line":1241,"column":25}},"loc":{"start":{"line":1241,"column":44},"end":{"line":1253,"column":9}},"line":1241},"102":{"name":"(anonymous_102)","decl":{"start":{"line":1243,"column":24},"end":{"line":1243,"column":25}},"loc":{"start":{"line":1243,"column":36},"end":{"line":1246,"column":19}},"line":1243},"103":{"name":"(anonymous_103)","decl":{"start":{"line":1247,"column":25},"end":{"line":1247,"column":26}},"loc":{"start":{"line":1247,"column":36},"end":{"line":1252,"column":19}},"line":1247},"104":{"name":"(anonymous_104)","decl":{"start":{"line":1257,"column":24},"end":{"line":1257,"column":25}},"loc":{"start":{"line":1257,"column":44},"end":{"line":1269,"column":9}},"line":1257},"105":{"name":"(anonymous_105)","decl":{"start":{"line":1259,"column":24},"end":{"line":1259,"column":25}},"loc":{"start":{"line":1259,"column":36},"end":{"line":1262,"column":19}},"line":1259},"106":{"name":"(anonymous_106)","decl":{"start":{"line":1263,"column":25},"end":{"line":1263,"column":26}},"loc":{"start":{"line":1263,"column":36},"end":{"line":1268,"column":19}},"line":1263},"107":{"name":"(anonymous_107)","decl":{"start":{"line":1273,"column":24},"end":{"line":1273,"column":25}},"loc":{"start":{"line":1273,"column":44},"end":{"line":1285,"column":9}},"line":1273},"108":{"name":"(anonymous_108)","decl":{"start":{"line":1275,"column":24},"end":{"line":1275,"column":25}},"loc":{"start":{"line":1275,"column":36},"end":{"line":1278,"column":19}},"line":1275},"109":{"name":"(anonymous_109)","decl":{"start":{"line":1279,"column":25},"end":{"line":1279,"column":26}},"loc":{"start":{"line":1279,"column":36},"end":{"line":1284,"column":19}},"line":1279},"110":{"name":"(anonymous_110)","decl":{"start":{"line":1289,"column":24},"end":{"line":1289,"column":25}},"loc":{"start":{"line":1289,"column":44},"end":{"line":1301,"column":9}},"line":1289},"111":{"name":"(anonymous_111)","decl":{"start":{"line":1291,"column":24},"end":{"line":1291,"column":25}},"loc":{"start":{"line":1291,"column":36},"end":{"line":1294,"column":19}},"line":1291},"112":{"name":"(anonymous_112)","decl":{"start":{"line":1295,"column":25},"end":{"line":1295,"column":26}},"loc":{"start":{"line":1295,"column":36},"end":{"line":1300,"column":19}},"line":1295},"113":{"name":"(anonymous_113)","decl":{"start":{"line":1304,"column":16},"end":{"line":1304,"column":17}},"loc":{"start":{"line":1304,"column":29},"end":{"line":1306,"column":11}},"line":1304},"114":{"name":"(anonymous_114)","decl":{"start":{"line":1307,"column":17},"end":{"line":1307,"column":18}},"loc":{"start":{"line":1307,"column":28},"end":{"line":1309,"column":11}},"line":1307},"115":{"name":"(anonymous_115)","decl":{"start":{"line":1332,"column":2},"end":{"line":1332,"column":3}},"loc":{"start":{"line":1332,"column":30},"end":{"line":1452,"column":3}},"line":1332},"116":{"name":"(anonymous_116)","decl":{"start":{"line":1333,"column":23},"end":{"line":1333,"column":24}},"loc":{"start":{"line":1333,"column":44},"end":{"line":1451,"column":5}},"line":1333},"117":{"name":"(anonymous_117)","decl":{"start":{"line":1463,"column":2},"end":{"line":1463,"column":3}},"loc":{"start":{"line":1463,"column":22},"end":{"line":1482,"column":3}},"line":1463},"118":{"name":"(anonymous_118)","decl":{"start":{"line":1464,"column":23},"end":{"line":1464,"column":24}},"loc":{"start":{"line":1464,"column":44},"end":{"line":1481,"column":5}},"line":1464},"119":{"name":"(anonymous_119)","decl":{"start":{"line":1469,"column":14},"end":{"line":1469,"column":15}},"loc":{"start":{"line":1469,"column":26},"end":{"line":1477,"column":9}},"line":1469},"120":{"name":"(anonymous_120)","decl":{"start":{"line":1471,"column":18},"end":{"line":1471,"column":19}},"loc":{"start":{"line":1471,"column":34},"end":{"line":1473,"column":13}},"line":1471},"121":{"name":"(anonymous_121)","decl":{"start":{"line":1474,"column":19},"end":{"line":1474,"column":20}},"loc":{"start":{"line":1474,"column":30},"end":{"line":1476,"column":13}},"line":1474},"122":{"name":"(anonymous_122)","decl":{"start":{"line":1478,"column":15},"end":{"line":1478,"column":16}},"loc":{"start":{"line":1478,"column":26},"end":{"line":1480,"column":9}},"line":1478},"123":{"name":"(anonymous_123)","decl":{"start":{"line":1490,"column":2},"end":{"line":1490,"column":3}},"loc":{"start":{"line":1490,"column":18},"end":{"line":1495,"column":3}},"line":1490},"124":{"name":"(anonymous_124)","decl":{"start":{"line":1503,"column":2},"end":{"line":1503,"column":3}},"loc":{"start":{"line":1503,"column":13},"end":{"line":1505,"column":3}},"line":1503},"125":{"name":"(anonymous_125)","decl":{"start":{"line":1513,"column":2},"end":{"line":1513,"column":3}},"loc":{"start":{"line":1513,"column":14},"end":{"line":1518,"column":3}},"line":1513},"126":{"name":"(anonymous_126)","decl":{"start":{"line":1526,"column":2},"end":{"line":1526,"column":3}},"loc":{"start":{"line":1526,"column":17},"end":{"line":1531,"column":3}},"line":1526},"127":{"name":"(anonymous_127)","decl":{"start":{"line":1539,"column":2},"end":{"line":1539,"column":3}},"loc":{"start":{"line":1539,"column":13},"end":{"line":1541,"column":3}},"line":1539},"128":{"name":"(anonymous_128)","decl":{"start":{"line":1549,"column":2},"end":{"line":1549,"column":3}},"loc":{"start":{"line":1549,"column":14},"end":{"line":1554,"column":3}},"line":1549},"129":{"name":"(anonymous_129)","decl":{"start":{"line":1562,"column":2},"end":{"line":1562,"column":3}},"loc":{"start":{"line":1562,"column":12},"end":{"line":1564,"column":3}},"line":1562},"130":{"name":"(anonymous_130)","decl":{"start":{"line":1572,"column":2},"end":{"line":1572,"column":3}},"loc":{"start":{"line":1572,"column":16},"end":{"line":1577,"column":3}},"line":1572},"131":{"name":"(anonymous_131)","decl":{"start":{"line":1585,"column":2},"end":{"line":1585,"column":3}},"loc":{"start":{"line":1585,"column":13},"end":{"line":1587,"column":3}},"line":1585},"132":{"name":"(anonymous_132)","decl":{"start":{"line":1595,"column":2},"end":{"line":1595,"column":3}},"loc":{"start":{"line":1595,"column":15},"end":{"line":1600,"column":3}},"line":1595},"133":{"name":"(anonymous_133)","decl":{"start":{"line":1608,"column":2},"end":{"line":1608,"column":3}},"loc":{"start":{"line":1608,"column":13},"end":{"line":1610,"column":3}},"line":1608},"134":{"name":"(anonymous_134)","decl":{"start":{"line":1618,"column":2},"end":{"line":1618,"column":3}},"loc":{"start":{"line":1618,"column":22},"end":{"line":1623,"column":3}},"line":1618},"135":{"name":"(anonymous_135)","decl":{"start":{"line":1631,"column":2},"end":{"line":1631,"column":3}},"loc":{"start":{"line":1631,"column":13},"end":{"line":1633,"column":3}},"line":1631},"136":{"name":"(anonymous_136)","decl":{"start":{"line":1641,"column":2},"end":{"line":1641,"column":3}},"loc":{"start":{"line":1641,"column":12},"end":{"line":1643,"column":3}},"line":1641},"137":{"name":"(anonymous_137)","decl":{"start":{"line":1651,"column":2},"end":{"line":1651,"column":3}},"loc":{"start":{"line":1651,"column":14},"end":{"line":1656,"column":3}},"line":1651},"138":{"name":"(anonymous_138)","decl":{"start":{"line":1688,"column":2},"end":{"line":1688,"column":3}},"loc":{"start":{"line":1688,"column":24},"end":{"line":1760,"column":3}},"line":1688},"139":{"name":"(anonymous_139)","decl":{"start":{"line":1766,"column":2},"end":{"line":1766,"column":3}},"loc":{"start":{"line":1766,"column":18},"end":{"line":1786,"column":3}},"line":1766},"140":{"name":"(anonymous_140)","decl":{"start":{"line":1767,"column":23},"end":{"line":1767,"column":24}},"loc":{"start":{"line":1767,"column":44},"end":{"line":1785,"column":5}},"line":1767},"141":{"name":"(anonymous_141)","decl":{"start":{"line":1794,"column":2},"end":{"line":1794,"column":3}},"loc":{"start":{"line":1794,"column":17},"end":{"line":1810,"column":3}},"line":1794},"142":{"name":"(anonymous_142)","decl":{"start":{"line":1795,"column":23},"end":{"line":1795,"column":24}},"loc":{"start":{"line":1795,"column":44},"end":{"line":1809,"column":5}},"line":1795},"143":{"name":"(anonymous_143)","decl":{"start":{"line":1797,"column":14},"end":{"line":1797,"column":15}},"loc":{"start":{"line":1797,"column":26},"end":{"line":1808,"column":9}},"line":1797},"144":{"name":"(anonymous_144)","decl":{"start":{"line":1802,"column":18},"end":{"line":1802,"column":19}},"loc":{"start":{"line":1802,"column":34},"end":{"line":1804,"column":13}},"line":1802},"145":{"name":"(anonymous_145)","decl":{"start":{"line":1805,"column":19},"end":{"line":1805,"column":20}},"loc":{"start":{"line":1805,"column":30},"end":{"line":1807,"column":13}},"line":1805},"146":{"name":"(anonymous_146)","decl":{"start":{"line":1844,"column":2},"end":{"line":1844,"column":3}},"loc":{"start":{"line":1844,"column":24},"end":{"line":2028,"column":3}},"line":1844},"147":{"name":"(anonymous_147)","decl":{"start":{"line":2035,"column":2},"end":{"line":2035,"column":3}},"loc":{"start":{"line":2035,"column":14},"end":{"line":2257,"column":3}},"line":2035},"148":{"name":"(anonymous_148)","decl":{"start":{"line":2036,"column":24},"end":{"line":2036,"column":25}},"loc":{"start":{"line":2036,"column":45},"end":{"line":2256,"column":5}},"line":2036},"149":{"name":"(anonymous_149)","decl":{"start":{"line":2263,"column":2},"end":{"line":2263,"column":3}},"loc":{"start":{"line":2263,"column":18},"end":{"line":2283,"column":3}},"line":2263},"150":{"name":"(anonymous_150)","decl":{"start":{"line":2264,"column":23},"end":{"line":2264,"column":24}},"loc":{"start":{"line":2264,"column":44},"end":{"line":2282,"column":5}},"line":2264},"151":{"name":"(anonymous_151)","decl":{"start":{"line":2290,"column":2},"end":{"line":2290,"column":3}},"loc":{"start":{"line":2290,"column":17},"end":{"line":2306,"column":3}},"line":2290},"152":{"name":"(anonymous_152)","decl":{"start":{"line":2291,"column":23},"end":{"line":2291,"column":24}},"loc":{"start":{"line":2291,"column":44},"end":{"line":2305,"column":5}},"line":2291},"153":{"name":"(anonymous_153)","decl":{"start":{"line":2293,"column":14},"end":{"line":2293,"column":15}},"loc":{"start":{"line":2293,"column":26},"end":{"line":2304,"column":9}},"line":2293},"154":{"name":"(anonymous_154)","decl":{"start":{"line":2298,"column":18},"end":{"line":2298,"column":19}},"loc":{"start":{"line":2298,"column":34},"end":{"line":2300,"column":13}},"line":2298},"155":{"name":"(anonymous_155)","decl":{"start":{"line":2301,"column":19},"end":{"line":2301,"column":20}},"loc":{"start":{"line":2301,"column":30},"end":{"line":2303,"column":13}},"line":2301}},"branchMap":{"0":{"loc":{"start":{"line":34,"column":4},"end":{"line":85,"column":5}},"type":"if","locations":[{"start":{"line":34,"column":4},"end":{"line":85,"column":5}},{"start":{"line":34,"column":4},"end":{"line":85,"column":5}}],"line":34},"1":{"loc":{"start":{"line":34,"column":8},"end":{"line":34,"column":43}},"type":"binary-expr","locations":[{"start":{"line":34,"column":8},"end":{"line":34,"column":16}},{"start":{"line":34,"column":20},"end":{"line":34,"column":43}}],"line":34},"2":{"loc":{"start":{"line":35,"column":6},"end":{"line":79,"column":7}},"type":"if","locations":[{"start":{"line":35,"column":6},"end":{"line":79,"column":7}},{"start":{"line":35,"column":6},"end":{"line":79,"column":7}}],"line":35},"3":{"loc":{"start":{"line":36,"column":8},"end":{"line":42,"column":9}},"type":"if","locations":[{"start":{"line":36,"column":8},"end":{"line":42,"column":9}},{"start":{"line":36,"column":8},"end":{"line":42,"column":9}}],"line":36},"4":{"loc":{"start":{"line":36,"column":12},"end":{"line":36,"column":38}},"type":"binary-expr","locations":[{"start":{"line":36,"column":12},"end":{"line":36,"column":25}},{"start":{"line":36,"column":29},"end":{"line":36,"column":38}}],"line":36},"5":{"loc":{"start":{"line":38,"column":15},"end":{"line":42,"column":9}},"type":"if","locations":[{"start":{"line":38,"column":15},"end":{"line":42,"column":9}},{"start":{"line":38,"column":15},"end":{"line":42,"column":9}}],"line":38},"6":{"loc":{"start":{"line":38,"column":19},"end":{"line":38,"column":67}},"type":"binary-expr","locations":[{"start":{"line":38,"column":20},"end":{"line":38,"column":28}},{"start":{"line":38,"column":32},"end":{"line":38,"column":40}},{"start":{"line":38,"column":46},"end":{"line":38,"column":54}},{"start":{"line":38,"column":58},"end":{"line":38,"column":66}}],"line":38},"7":{"loc":{"start":{"line":47,"column":8},"end":{"line":78,"column":9}},"type":"if","locations":[{"start":{"line":47,"column":8},"end":{"line":78,"column":9}},{"start":{"line":47,"column":8},"end":{"line":78,"column":9}}],"line":47},"8":{"loc":{"start":{"line":48,"column":10},"end":{"line":62,"column":11}},"type":"if","locations":[{"start":{"line":48,"column":10},"end":{"line":62,"column":11}},{"start":{"line":48,"column":10},"end":{"line":62,"column":11}}],"line":48},"9":{"loc":{"start":{"line":48,"column":14},"end":{"line":48,"column":32}},"type":"binary-expr","locations":[{"start":{"line":48,"column":14},"end":{"line":48,"column":21}},{"start":{"line":48,"column":25},"end":{"line":48,"column":32}}],"line":48},"10":{"loc":{"start":{"line":50,"column":11},"end":{"line":56,"column":12}},"type":"if","locations":[{"start":{"line":50,"column":11},"end":{"line":56,"column":12}},{"start":{"line":50,"column":11},"end":{"line":56,"column":12}}],"line":50},"11":{"loc":{"start":{"line":52,"column":18},"end":{"line":56,"column":12}},"type":"if","locations":[{"start":{"line":52,"column":18},"end":{"line":56,"column":12}},{"start":{"line":52,"column":18},"end":{"line":56,"column":12}}],"line":52},"12":{"loc":{"start":{"line":70,"column":10},"end":{"line":74,"column":11}},"type":"if","locations":[{"start":{"line":70,"column":10},"end":{"line":74,"column":11}},{"start":{"line":70,"column":10},"end":{"line":74,"column":11}}],"line":70},"13":{"loc":{"start":{"line":75,"column":10},"end":{"line":77,"column":11}},"type":"if","locations":[{"start":{"line":75,"column":10},"end":{"line":77,"column":11}},{"start":{"line":75,"column":10},"end":{"line":77,"column":11}}],"line":75},"14":{"loc":{"start":{"line":142,"column":4},"end":{"line":144,"column":5}},"type":"if","locations":[{"start":{"line":142,"column":4},"end":{"line":144,"column":5}},{"start":{"line":142,"column":4},"end":{"line":144,"column":5}}],"line":142},"15":{"loc":{"start":{"line":147,"column":18},"end":{"line":147,"column":47}},"type":"binary-expr","locations":[{"start":{"line":147,"column":18},"end":{"line":147,"column":32}},{"start":{"line":147,"column":36},"end":{"line":147,"column":47}}],"line":147},"16":{"loc":{"start":{"line":149,"column":20},"end":{"line":149,"column":45}},"type":"binary-expr","locations":[{"start":{"line":149,"column":20},"end":{"line":149,"column":36}},{"start":{"line":149,"column":40},"end":{"line":149,"column":45}}],"line":149},"17":{"loc":{"start":{"line":152,"column":16},"end":{"line":152,"column":35}},"type":"binary-expr","locations":[{"start":{"line":152,"column":16},"end":{"line":152,"column":28}},{"start":{"line":152,"column":32},"end":{"line":152,"column":35}}],"line":152},"18":{"loc":{"start":{"line":154,"column":22},"end":{"line":154,"column":49}},"type":"binary-expr","locations":[{"start":{"line":154,"column":22},"end":{"line":154,"column":40}},{"start":{"line":154,"column":44},"end":{"line":154,"column":49}}],"line":154},"19":{"loc":{"start":{"line":155,"column":4},"end":{"line":162,"column":5}},"type":"if","locations":[{"start":{"line":155,"column":4},"end":{"line":162,"column":5}},{"start":{"line":155,"column":4},"end":{"line":162,"column":5}}],"line":155},"20":{"loc":{"start":{"line":155,"column":8},"end":{"line":157,"column":53}},"type":"binary-expr","locations":[{"start":{"line":155,"column":9},"end":{"line":155,"column":51}},{"start":{"line":156,"column":11},"end":{"line":156,"column":48}},{"start":{"line":157,"column":11},"end":{"line":157,"column":53}}],"line":155},"21":{"loc":{"start":{"line":163,"column":4},"end":{"line":166,"column":5}},"type":"if","locations":[{"start":{"line":163,"column":4},"end":{"line":166,"column":5}},{"start":{"line":163,"column":4},"end":{"line":166,"column":5}}],"line":163},"22":{"loc":{"start":{"line":167,"column":4},"end":{"line":170,"column":5}},"type":"if","locations":[{"start":{"line":167,"column":4},"end":{"line":170,"column":5}},{"start":{"line":167,"column":4},"end":{"line":170,"column":5}}],"line":167},"23":{"loc":{"start":{"line":172,"column":4},"end":{"line":177,"column":5}},"type":"if","locations":[{"start":{"line":172,"column":4},"end":{"line":177,"column":5}},{"start":{"line":172,"column":4},"end":{"line":177,"column":5}}],"line":172},"24":{"loc":{"start":{"line":176,"column":20},"end":{"line":176,"column":44}},"type":"binary-expr","locations":[{"start":{"line":176,"column":20},"end":{"line":176,"column":34}},{"start":{"line":176,"column":38},"end":{"line":176,"column":44}}],"line":176},"25":{"loc":{"start":{"line":178,"column":4},"end":{"line":185,"column":5}},"type":"if","locations":[{"start":{"line":178,"column":4},"end":{"line":185,"column":5}},{"start":{"line":178,"column":4},"end":{"line":185,"column":5}}],"line":178},"26":{"loc":{"start":{"line":179,"column":6},"end":{"line":184,"column":7}},"type":"if","locations":[{"start":{"line":179,"column":6},"end":{"line":184,"column":7}},{"start":{"line":179,"column":6},"end":{"line":184,"column":7}}],"line":179},"27":{"loc":{"start":{"line":186,"column":4},"end":{"line":193,"column":5}},"type":"if","locations":[{"start":{"line":186,"column":4},"end":{"line":193,"column":5}},{"start":{"line":186,"column":4},"end":{"line":193,"column":5}}],"line":186},"28":{"loc":{"start":{"line":187,"column":6},"end":{"line":192,"column":7}},"type":"if","locations":[{"start":{"line":187,"column":6},"end":{"line":192,"column":7}},{"start":{"line":187,"column":6},"end":{"line":192,"column":7}}],"line":187},"29":{"loc":{"start":{"line":194,"column":4},"end":{"line":201,"column":5}},"type":"if","locations":[{"start":{"line":194,"column":4},"end":{"line":201,"column":5}},{"start":{"line":194,"column":4},"end":{"line":201,"column":5}}],"line":194},"30":{"loc":{"start":{"line":195,"column":6},"end":{"line":200,"column":7}},"type":"if","locations":[{"start":{"line":195,"column":6},"end":{"line":200,"column":7}},{"start":{"line":195,"column":6},"end":{"line":200,"column":7}}],"line":195},"31":{"loc":{"start":{"line":202,"column":4},"end":{"line":209,"column":5}},"type":"if","locations":[{"start":{"line":202,"column":4},"end":{"line":209,"column":5}},{"start":{"line":202,"column":4},"end":{"line":209,"column":5}}],"line":202},"32":{"loc":{"start":{"line":203,"column":6},"end":{"line":208,"column":7}},"type":"if","locations":[{"start":{"line":203,"column":6},"end":{"line":208,"column":7}},{"start":{"line":203,"column":6},"end":{"line":208,"column":7}}],"line":203},"33":{"loc":{"start":{"line":210,"column":4},"end":{"line":212,"column":5}},"type":"if","locations":[{"start":{"line":210,"column":4},"end":{"line":212,"column":5}},{"start":{"line":210,"column":4},"end":{"line":212,"column":5}}],"line":210},"34":{"loc":{"start":{"line":210,"column":8},"end":{"line":210,"column":50}},"type":"binary-expr","locations":[{"start":{"line":210,"column":8},"end":{"line":210,"column":33}},{"start":{"line":210,"column":37},"end":{"line":210,"column":50}}],"line":210},"35":{"loc":{"start":{"line":213,"column":4},"end":{"line":215,"column":5}},"type":"if","locations":[{"start":{"line":213,"column":4},"end":{"line":215,"column":5}},{"start":{"line":213,"column":4},"end":{"line":215,"column":5}}],"line":213},"36":{"loc":{"start":{"line":213,"column":8},"end":{"line":213,"column":50}},"type":"binary-expr","locations":[{"start":{"line":213,"column":8},"end":{"line":213,"column":33}},{"start":{"line":213,"column":37},"end":{"line":213,"column":50}}],"line":213},"37":{"loc":{"start":{"line":216,"column":4},"end":{"line":218,"column":5}},"type":"if","locations":[{"start":{"line":216,"column":4},"end":{"line":218,"column":5}},{"start":{"line":216,"column":4},"end":{"line":218,"column":5}}],"line":216},"38":{"loc":{"start":{"line":216,"column":8},"end":{"line":216,"column":44}},"type":"binary-expr","locations":[{"start":{"line":216,"column":8},"end":{"line":216,"column":30}},{"start":{"line":216,"column":34},"end":{"line":216,"column":44}}],"line":216},"39":{"loc":{"start":{"line":219,"column":4},"end":{"line":221,"column":5}},"type":"if","locations":[{"start":{"line":219,"column":4},"end":{"line":221,"column":5}},{"start":{"line":219,"column":4},"end":{"line":221,"column":5}}],"line":219},"40":{"loc":{"start":{"line":219,"column":8},"end":{"line":219,"column":42}},"type":"binary-expr","locations":[{"start":{"line":219,"column":8},"end":{"line":219,"column":29}},{"start":{"line":219,"column":33},"end":{"line":219,"column":42}}],"line":219},"41":{"loc":{"start":{"line":237,"column":6},"end":{"line":246,"column":7}},"type":"if","locations":[{"start":{"line":237,"column":6},"end":{"line":246,"column":7}},{"start":{"line":237,"column":6},"end":{"line":246,"column":7}}],"line":237},"42":{"loc":{"start":{"line":237,"column":10},"end":{"line":237,"column":59}},"type":"binary-expr","locations":[{"start":{"line":237,"column":10},"end":{"line":237,"column":35}},{"start":{"line":237,"column":39},"end":{"line":237,"column":59}}],"line":237},"43":{"loc":{"start":{"line":240,"column":13},"end":{"line":246,"column":7}},"type":"if","locations":[{"start":{"line":240,"column":13},"end":{"line":246,"column":7}},{"start":{"line":240,"column":13},"end":{"line":246,"column":7}}],"line":240},"44":{"loc":{"start":{"line":265,"column":28},"end":{"line":265,"column":65}},"type":"cond-expr","locations":[{"start":{"line":265,"column":50},"end":{"line":265,"column":56}},{"start":{"line":265,"column":59},"end":{"line":265,"column":65}}],"line":265},"45":{"loc":{"start":{"line":341,"column":6},"end":{"line":357,"column":7}},"type":"if","locations":[{"start":{"line":341,"column":6},"end":{"line":357,"column":7}},{"start":{"line":341,"column":6},"end":{"line":357,"column":7}}],"line":341},"46":{"loc":{"start":{"line":341,"column":10},"end":{"line":342,"column":51}},"type":"binary-expr","locations":[{"start":{"line":341,"column":10},"end":{"line":341,"column":47}},{"start":{"line":342,"column":13},"end":{"line":342,"column":51}}],"line":341},"47":{"loc":{"start":{"line":345,"column":13},"end":{"line":357,"column":7}},"type":"if","locations":[{"start":{"line":345,"column":13},"end":{"line":357,"column":7}},{"start":{"line":345,"column":13},"end":{"line":357,"column":7}}],"line":345},"48":{"loc":{"start":{"line":345,"column":17},"end":{"line":346,"column":53}},"type":"binary-expr","locations":[{"start":{"line":345,"column":17},"end":{"line":345,"column":54}},{"start":{"line":346,"column":13},"end":{"line":346,"column":53}}],"line":345},"49":{"loc":{"start":{"line":351,"column":13},"end":{"line":357,"column":7}},"type":"if","locations":[{"start":{"line":351,"column":13},"end":{"line":357,"column":7}},{"start":{"line":351,"column":13},"end":{"line":357,"column":7}}],"line":351},"50":{"loc":{"start":{"line":351,"column":17},"end":{"line":352,"column":54}},"type":"binary-expr","locations":[{"start":{"line":351,"column":17},"end":{"line":351,"column":55}},{"start":{"line":352,"column":13},"end":{"line":352,"column":54}}],"line":351},"51":{"loc":{"start":{"line":360,"column":6},"end":{"line":373,"column":7}},"type":"if","locations":[{"start":{"line":360,"column":6},"end":{"line":373,"column":7}},{"start":{"line":360,"column":6},"end":{"line":373,"column":7}}],"line":360},"52":{"loc":{"start":{"line":363,"column":10},"end":{"line":367,"column":11}},"type":"if","locations":[{"start":{"line":363,"column":10},"end":{"line":367,"column":11}},{"start":{"line":363,"column":10},"end":{"line":367,"column":11}}],"line":363},"53":{"loc":{"start":{"line":407,"column":6},"end":{"line":410,"column":7}},"type":"if","locations":[{"start":{"line":407,"column":6},"end":{"line":410,"column":7}},{"start":{"line":407,"column":6},"end":{"line":410,"column":7}}],"line":407},"54":{"loc":{"start":{"line":412,"column":6},"end":{"line":440,"column":7}},"type":"if","locations":[{"start":{"line":412,"column":6},"end":{"line":440,"column":7}},{"start":{"line":412,"column":6},"end":{"line":440,"column":7}}],"line":412},"55":{"loc":{"start":{"line":420,"column":13},"end":{"line":440,"column":7}},"type":"if","locations":[{"start":{"line":420,"column":13},"end":{"line":440,"column":7}},{"start":{"line":420,"column":13},"end":{"line":440,"column":7}}],"line":420},"56":{"loc":{"start":{"line":428,"column":13},"end":{"line":440,"column":7}},"type":"if","locations":[{"start":{"line":428,"column":13},"end":{"line":440,"column":7}},{"start":{"line":428,"column":13},"end":{"line":440,"column":7}}],"line":428},"57":{"loc":{"start":{"line":498,"column":14},"end":{"line":498,"column":27}},"type":"binary-expr","locations":[{"start":{"line":498,"column":14},"end":{"line":498,"column":21}},{"start":{"line":498,"column":25},"end":{"line":498,"column":27}}],"line":498},"58":{"loc":{"start":{"line":499,"column":20},"end":{"line":499,"column":53}},"type":"binary-expr","locations":[{"start":{"line":499,"column":20},"end":{"line":499,"column":36}},{"start":{"line":499,"column":40},"end":{"line":499,"column":53}}],"line":499},"59":{"loc":{"start":{"line":500,"column":27},"end":{"line":500,"column":56}},"type":"binary-expr","locations":[{"start":{"line":500,"column":27},"end":{"line":500,"column":50}},{"start":{"line":500,"column":54},"end":{"line":500,"column":56}}],"line":500},"60":{"loc":{"start":{"line":501,"column":20},"end":{"line":501,"column":42}},"type":"binary-expr","locations":[{"start":{"line":501,"column":20},"end":{"line":501,"column":36}},{"start":{"line":501,"column":40},"end":{"line":501,"column":42}}],"line":501},"61":{"loc":{"start":{"line":502,"column":4},"end":{"line":507,"column":5}},"type":"if","locations":[{"start":{"line":502,"column":4},"end":{"line":507,"column":5}},{"start":{"line":502,"column":4},"end":{"line":507,"column":5}}],"line":502},"62":{"loc":{"start":{"line":508,"column":4},"end":{"line":513,"column":5}},"type":"if","locations":[{"start":{"line":508,"column":4},"end":{"line":513,"column":5}},{"start":{"line":508,"column":4},"end":{"line":513,"column":5}}],"line":508},"63":{"loc":{"start":{"line":514,"column":4},"end":{"line":521,"column":5}},"type":"if","locations":[{"start":{"line":514,"column":4},"end":{"line":521,"column":5}},{"start":{"line":514,"column":4},"end":{"line":521,"column":5}}],"line":514},"64":{"loc":{"start":{"line":515,"column":6},"end":{"line":520,"column":7}},"type":"if","locations":[{"start":{"line":515,"column":6},"end":{"line":520,"column":7}},{"start":{"line":515,"column":6},"end":{"line":520,"column":7}}],"line":515},"65":{"loc":{"start":{"line":522,"column":4},"end":{"line":548,"column":5}},"type":"if","locations":[{"start":{"line":522,"column":4},"end":{"line":548,"column":5}},{"start":{"line":522,"column":4},"end":{"line":548,"column":5}}],"line":522},"66":{"loc":{"start":{"line":549,"column":4},"end":{"line":551,"column":5}},"type":"if","locations":[{"start":{"line":549,"column":4},"end":{"line":551,"column":5}},{"start":{"line":549,"column":4},"end":{"line":551,"column":5}}],"line":549},"67":{"loc":{"start":{"line":585,"column":6},"end":{"line":600,"column":7}},"type":"if","locations":[{"start":{"line":585,"column":6},"end":{"line":600,"column":7}},{"start":{"line":585,"column":6},"end":{"line":600,"column":7}}],"line":585},"68":{"loc":{"start":{"line":601,"column":6},"end":{"line":616,"column":7}},"type":"if","locations":[{"start":{"line":601,"column":6},"end":{"line":616,"column":7}},{"start":{"line":601,"column":6},"end":{"line":616,"column":7}}],"line":601},"69":{"loc":{"start":{"line":617,"column":6},"end":{"line":632,"column":7}},"type":"if","locations":[{"start":{"line":617,"column":6},"end":{"line":632,"column":7}},{"start":{"line":617,"column":6},"end":{"line":632,"column":7}}],"line":617},"70":{"loc":{"start":{"line":633,"column":6},"end":{"line":648,"column":7}},"type":"if","locations":[{"start":{"line":633,"column":6},"end":{"line":648,"column":7}},{"start":{"line":633,"column":6},"end":{"line":648,"column":7}}],"line":633},"71":{"loc":{"start":{"line":649,"column":6},"end":{"line":664,"column":7}},"type":"if","locations":[{"start":{"line":649,"column":6},"end":{"line":664,"column":7}},{"start":{"line":649,"column":6},"end":{"line":664,"column":7}}],"line":649},"72":{"loc":{"start":{"line":665,"column":6},"end":{"line":680,"column":7}},"type":"if","locations":[{"start":{"line":665,"column":6},"end":{"line":680,"column":7}},{"start":{"line":665,"column":6},"end":{"line":680,"column":7}}],"line":665},"73":{"loc":{"start":{"line":681,"column":6},"end":{"line":696,"column":7}},"type":"if","locations":[{"start":{"line":681,"column":6},"end":{"line":696,"column":7}},{"start":{"line":681,"column":6},"end":{"line":696,"column":7}}],"line":681},"74":{"loc":{"start":{"line":697,"column":6},"end":{"line":712,"column":7}},"type":"if","locations":[{"start":{"line":697,"column":6},"end":{"line":712,"column":7}},{"start":{"line":697,"column":6},"end":{"line":712,"column":7}}],"line":697},"75":{"loc":{"start":{"line":735,"column":16},"end":{"line":735,"column":29}},"type":"binary-expr","locations":[{"start":{"line":735,"column":16},"end":{"line":735,"column":23}},{"start":{"line":735,"column":27},"end":{"line":735,"column":29}}],"line":735},"76":{"loc":{"start":{"line":736,"column":21},"end":{"line":737,"column":30}},"type":"cond-expr","locations":[{"start":{"line":737,"column":10},"end":{"line":737,"column":26}},{"start":{"line":737,"column":29},"end":{"line":737,"column":30}}],"line":736},"77":{"loc":{"start":{"line":738,"column":6},"end":{"line":743,"column":7}},"type":"if","locations":[{"start":{"line":738,"column":6},"end":{"line":743,"column":7}},{"start":{"line":738,"column":6},"end":{"line":743,"column":7}}],"line":738},"78":{"loc":{"start":{"line":738,"column":10},"end":{"line":738,"column":60}},"type":"binary-expr","locations":[{"start":{"line":738,"column":10},"end":{"line":738,"column":33}},{"start":{"line":738,"column":37},"end":{"line":738,"column":60}}],"line":738},"79":{"loc":{"start":{"line":754,"column":6},"end":{"line":767,"column":7}},"type":"if","locations":[{"start":{"line":754,"column":6},"end":{"line":767,"column":7}},{"start":{"line":754,"column":6},"end":{"line":767,"column":7}}],"line":754},"80":{"loc":{"start":{"line":755,"column":27},"end":{"line":755,"column":49}},"type":"binary-expr","locations":[{"start":{"line":755,"column":27},"end":{"line":755,"column":43}},{"start":{"line":755,"column":47},"end":{"line":755,"column":49}}],"line":755},"81":{"loc":{"start":{"line":757,"column":8},"end":{"line":759,"column":9}},"type":"if","locations":[{"start":{"line":757,"column":8},"end":{"line":759,"column":9}},{"start":{"line":757,"column":8},"end":{"line":759,"column":9}}],"line":757},"82":{"loc":{"start":{"line":760,"column":8},"end":{"line":765,"column":9}},"type":"if","locations":[{"start":{"line":760,"column":8},"end":{"line":765,"column":9}},{"start":{"line":760,"column":8},"end":{"line":765,"column":9}}],"line":760},"83":{"loc":{"start":{"line":799,"column":6},"end":{"line":801,"column":7}},"type":"if","locations":[{"start":{"line":799,"column":6},"end":{"line":801,"column":7}},{"start":{"line":799,"column":6},"end":{"line":801,"column":7}}],"line":799},"84":{"loc":{"start":{"line":1053,"column":14},"end":{"line":1053,"column":27}},"type":"binary-expr","locations":[{"start":{"line":1053,"column":14},"end":{"line":1053,"column":21}},{"start":{"line":1053,"column":25},"end":{"line":1053,"column":27}}],"line":1053},"85":{"loc":{"start":{"line":1054,"column":20},"end":{"line":1054,"column":53}},"type":"binary-expr","locations":[{"start":{"line":1054,"column":20},"end":{"line":1054,"column":36}},{"start":{"line":1054,"column":40},"end":{"line":1054,"column":53}}],"line":1054},"86":{"loc":{"start":{"line":1055,"column":27},"end":{"line":1055,"column":56}},"type":"binary-expr","locations":[{"start":{"line":1055,"column":27},"end":{"line":1055,"column":50}},{"start":{"line":1055,"column":54},"end":{"line":1055,"column":56}}],"line":1055},"87":{"loc":{"start":{"line":1056,"column":4},"end":{"line":1061,"column":5}},"type":"if","locations":[{"start":{"line":1056,"column":4},"end":{"line":1061,"column":5}},{"start":{"line":1056,"column":4},"end":{"line":1061,"column":5}}],"line":1056},"88":{"loc":{"start":{"line":1056,"column":8},"end":{"line":1056,"column":69}},"type":"binary-expr","locations":[{"start":{"line":1056,"column":8},"end":{"line":1056,"column":48}},{"start":{"line":1056,"column":52},"end":{"line":1056,"column":69}}],"line":1056},"89":{"loc":{"start":{"line":1062,"column":4},"end":{"line":1067,"column":5}},"type":"if","locations":[{"start":{"line":1062,"column":4},"end":{"line":1067,"column":5}},{"start":{"line":1062,"column":4},"end":{"line":1067,"column":5}}],"line":1062},"90":{"loc":{"start":{"line":1068,"column":4},"end":{"line":1073,"column":5}},"type":"if","locations":[{"start":{"line":1068,"column":4},"end":{"line":1073,"column":5}},{"start":{"line":1068,"column":4},"end":{"line":1073,"column":5}}],"line":1068},"91":{"loc":{"start":{"line":1068,"column":8},"end":{"line":1068,"column":73}},"type":"binary-expr","locations":[{"start":{"line":1068,"column":8},"end":{"line":1068,"column":50}},{"start":{"line":1068,"column":54},"end":{"line":1068,"column":73}}],"line":1068},"92":{"loc":{"start":{"line":1074,"column":4},"end":{"line":1079,"column":5}},"type":"if","locations":[{"start":{"line":1074,"column":4},"end":{"line":1079,"column":5}},{"start":{"line":1074,"column":4},"end":{"line":1079,"column":5}}],"line":1074},"93":{"loc":{"start":{"line":1080,"column":4},"end":{"line":1085,"column":5}},"type":"if","locations":[{"start":{"line":1080,"column":4},"end":{"line":1085,"column":5}},{"start":{"line":1080,"column":4},"end":{"line":1085,"column":5}}],"line":1080},"94":{"loc":{"start":{"line":1086,"column":4},"end":{"line":1091,"column":5}},"type":"if","locations":[{"start":{"line":1086,"column":4},"end":{"line":1091,"column":5}},{"start":{"line":1086,"column":4},"end":{"line":1091,"column":5}}],"line":1086},"95":{"loc":{"start":{"line":1086,"column":8},"end":{"line":1086,"column":65}},"type":"binary-expr","locations":[{"start":{"line":1086,"column":8},"end":{"line":1086,"column":46}},{"start":{"line":1086,"column":50},"end":{"line":1086,"column":65}}],"line":1086},"96":{"loc":{"start":{"line":1092,"column":4},"end":{"line":1097,"column":5}},"type":"if","locations":[{"start":{"line":1092,"column":4},"end":{"line":1097,"column":5}},{"start":{"line":1092,"column":4},"end":{"line":1097,"column":5}}],"line":1092},"97":{"loc":{"start":{"line":1098,"column":4},"end":{"line":1103,"column":5}},"type":"if","locations":[{"start":{"line":1098,"column":4},"end":{"line":1103,"column":5}},{"start":{"line":1098,"column":4},"end":{"line":1103,"column":5}}],"line":1098},"98":{"loc":{"start":{"line":1104,"column":4},"end":{"line":1111,"column":5}},"type":"if","locations":[{"start":{"line":1104,"column":4},"end":{"line":1111,"column":5}},{"start":{"line":1104,"column":4},"end":{"line":1111,"column":5}}],"line":1104},"99":{"loc":{"start":{"line":1105,"column":6},"end":{"line":1110,"column":7}},"type":"if","locations":[{"start":{"line":1105,"column":6},"end":{"line":1110,"column":7}},{"start":{"line":1105,"column":6},"end":{"line":1110,"column":7}}],"line":1105},"100":{"loc":{"start":{"line":1112,"column":4},"end":{"line":1138,"column":5}},"type":"if","locations":[{"start":{"line":1112,"column":4},"end":{"line":1138,"column":5}},{"start":{"line":1112,"column":4},"end":{"line":1138,"column":5}}],"line":1112},"101":{"loc":{"start":{"line":1139,"column":4},"end":{"line":1141,"column":5}},"type":"if","locations":[{"start":{"line":1139,"column":4},"end":{"line":1141,"column":5}},{"start":{"line":1139,"column":4},"end":{"line":1141,"column":5}}],"line":1139},"102":{"loc":{"start":{"line":1175,"column":6},"end":{"line":1190,"column":7}},"type":"if","locations":[{"start":{"line":1175,"column":6},"end":{"line":1190,"column":7}},{"start":{"line":1175,"column":6},"end":{"line":1190,"column":7}}],"line":1175},"103":{"loc":{"start":{"line":1191,"column":6},"end":{"line":1206,"column":7}},"type":"if","locations":[{"start":{"line":1191,"column":6},"end":{"line":1206,"column":7}},{"start":{"line":1191,"column":6},"end":{"line":1206,"column":7}}],"line":1191},"104":{"loc":{"start":{"line":1207,"column":6},"end":{"line":1222,"column":7}},"type":"if","locations":[{"start":{"line":1207,"column":6},"end":{"line":1222,"column":7}},{"start":{"line":1207,"column":6},"end":{"line":1222,"column":7}}],"line":1207},"105":{"loc":{"start":{"line":1223,"column":6},"end":{"line":1238,"column":7}},"type":"if","locations":[{"start":{"line":1223,"column":6},"end":{"line":1238,"column":7}},{"start":{"line":1223,"column":6},"end":{"line":1238,"column":7}}],"line":1223},"106":{"loc":{"start":{"line":1239,"column":6},"end":{"line":1254,"column":7}},"type":"if","locations":[{"start":{"line":1239,"column":6},"end":{"line":1254,"column":7}},{"start":{"line":1239,"column":6},"end":{"line":1254,"column":7}}],"line":1239},"107":{"loc":{"start":{"line":1255,"column":6},"end":{"line":1270,"column":7}},"type":"if","locations":[{"start":{"line":1255,"column":6},"end":{"line":1270,"column":7}},{"start":{"line":1255,"column":6},"end":{"line":1270,"column":7}}],"line":1255},"108":{"loc":{"start":{"line":1271,"column":6},"end":{"line":1286,"column":7}},"type":"if","locations":[{"start":{"line":1271,"column":6},"end":{"line":1286,"column":7}},{"start":{"line":1271,"column":6},"end":{"line":1286,"column":7}}],"line":1271},"109":{"loc":{"start":{"line":1287,"column":6},"end":{"line":1302,"column":7}},"type":"if","locations":[{"start":{"line":1287,"column":6},"end":{"line":1302,"column":7}},{"start":{"line":1287,"column":6},"end":{"line":1302,"column":7}}],"line":1287},"110":{"loc":{"start":{"line":1334,"column":16},"end":{"line":1334,"column":29}},"type":"binary-expr","locations":[{"start":{"line":1334,"column":16},"end":{"line":1334,"column":23}},{"start":{"line":1334,"column":27},"end":{"line":1334,"column":29}}],"line":1334},"111":{"loc":{"start":{"line":1335,"column":21},"end":{"line":1336,"column":30}},"type":"cond-expr","locations":[{"start":{"line":1336,"column":10},"end":{"line":1336,"column":26}},{"start":{"line":1336,"column":29},"end":{"line":1336,"column":30}}],"line":1335},"112":{"loc":{"start":{"line":1337,"column":6},"end":{"line":1342,"column":7}},"type":"if","locations":[{"start":{"line":1337,"column":6},"end":{"line":1342,"column":7}},{"start":{"line":1337,"column":6},"end":{"line":1342,"column":7}}],"line":1337},"113":{"loc":{"start":{"line":1337,"column":10},"end":{"line":1337,"column":57}},"type":"binary-expr","locations":[{"start":{"line":1337,"column":10},"end":{"line":1337,"column":33}},{"start":{"line":1337,"column":37},"end":{"line":1337,"column":57}}],"line":1337},"114":{"loc":{"start":{"line":1343,"column":21},"end":{"line":1343,"column":43}},"type":"binary-expr","locations":[{"start":{"line":1343,"column":21},"end":{"line":1343,"column":37}},{"start":{"line":1343,"column":41},"end":{"line":1343,"column":43}}],"line":1343},"115":{"loc":{"start":{"line":1344,"column":16},"end":{"line":1344,"column":34}},"type":"binary-expr","locations":[{"start":{"line":1344,"column":16},"end":{"line":1344,"column":27}},{"start":{"line":1344,"column":31},"end":{"line":1344,"column":34}}],"line":1344},"116":{"loc":{"start":{"line":1345,"column":15},"end":{"line":1345,"column":32}},"type":"binary-expr","locations":[{"start":{"line":1345,"column":15},"end":{"line":1345,"column":25}},{"start":{"line":1345,"column":29},"end":{"line":1345,"column":32}}],"line":1345},"117":{"loc":{"start":{"line":1346,"column":30},"end":{"line":1346,"column":61}},"type":"binary-expr","locations":[{"start":{"line":1346,"column":30},"end":{"line":1346,"column":55}},{"start":{"line":1346,"column":59},"end":{"line":1346,"column":61}}],"line":1346},"118":{"loc":{"start":{"line":1357,"column":6},"end":{"line":1370,"column":7}},"type":"if","locations":[{"start":{"line":1357,"column":6},"end":{"line":1370,"column":7}},{"start":{"line":1357,"column":6},"end":{"line":1370,"column":7}}],"line":1357},"119":{"loc":{"start":{"line":1358,"column":27},"end":{"line":1358,"column":49}},"type":"binary-expr","locations":[{"start":{"line":1358,"column":27},"end":{"line":1358,"column":43}},{"start":{"line":1358,"column":47},"end":{"line":1358,"column":49}}],"line":1358},"120":{"loc":{"start":{"line":1360,"column":8},"end":{"line":1362,"column":9}},"type":"if","locations":[{"start":{"line":1360,"column":8},"end":{"line":1362,"column":9}},{"start":{"line":1360,"column":8},"end":{"line":1362,"column":9}}],"line":1360},"121":{"loc":{"start":{"line":1363,"column":8},"end":{"line":1368,"column":9}},"type":"if","locations":[{"start":{"line":1363,"column":8},"end":{"line":1368,"column":9}},{"start":{"line":1363,"column":8},"end":{"line":1368,"column":9}}],"line":1363},"122":{"loc":{"start":{"line":1373,"column":6},"end":{"line":1413,"column":7}},"type":"if","locations":[{"start":{"line":1373,"column":6},"end":{"line":1413,"column":7}},{"start":{"line":1373,"column":6},"end":{"line":1413,"column":7}}],"line":1373},"123":{"loc":{"start":{"line":1375,"column":8},"end":{"line":1410,"column":9}},"type":"if","locations":[{"start":{"line":1375,"column":8},"end":{"line":1410,"column":9}},{"start":{"line":1375,"column":8},"end":{"line":1410,"column":9}}],"line":1375},"124":{"loc":{"start":{"line":1377,"column":10},"end":{"line":1389,"column":11}},"type":"if","locations":[{"start":{"line":1377,"column":10},"end":{"line":1389,"column":11}},{"start":{"line":1377,"column":10},"end":{"line":1389,"column":11}}],"line":1377},"125":{"loc":{"start":{"line":1378,"column":12},"end":{"line":1382,"column":13}},"type":"if","locations":[{"start":{"line":1378,"column":12},"end":{"line":1382,"column":13}},{"start":{"line":1378,"column":12},"end":{"line":1382,"column":13}}],"line":1378},"126":{"loc":{"start":{"line":1384,"column":12},"end":{"line":1388,"column":13}},"type":"if","locations":[{"start":{"line":1384,"column":12},"end":{"line":1388,"column":13}},{"start":{"line":1384,"column":12},"end":{"line":1388,"column":13}}],"line":1384},"127":{"loc":{"start":{"line":1391,"column":10},"end":{"line":1409,"column":11}},"type":"if","locations":[{"start":{"line":1391,"column":10},"end":{"line":1409,"column":11}},{"start":{"line":1391,"column":10},"end":{"line":1409,"column":11}}],"line":1391},"128":{"loc":{"start":{"line":1393,"column":12},"end":{"line":1399,"column":13}},"type":"if","locations":[{"start":{"line":1393,"column":12},"end":{"line":1399,"column":13}},{"start":{"line":1393,"column":12},"end":{"line":1399,"column":13}}],"line":1393},"129":{"loc":{"start":{"line":1402,"column":12},"end":{"line":1408,"column":13}},"type":"if","locations":[{"start":{"line":1402,"column":12},"end":{"line":1408,"column":13}},{"start":{"line":1402,"column":12},"end":{"line":1408,"column":13}}],"line":1402},"130":{"loc":{"start":{"line":1417,"column":6},"end":{"line":1434,"column":7}},"type":"if","locations":[{"start":{"line":1417,"column":6},"end":{"line":1434,"column":7}},{"start":{"line":1417,"column":6},"end":{"line":1434,"column":7}}],"line":1417},"131":{"loc":{"start":{"line":1417,"column":10},"end":{"line":1417,"column":58}},"type":"binary-expr","locations":[{"start":{"line":1417,"column":10},"end":{"line":1417,"column":36}},{"start":{"line":1417,"column":40},"end":{"line":1417,"column":58}}],"line":1417},"132":{"loc":{"start":{"line":1428,"column":10},"end":{"line":1431,"column":11}},"type":"if","locations":[{"start":{"line":1428,"column":10},"end":{"line":1431,"column":11}},{"start":{"line":1428,"column":10},"end":{"line":1431,"column":11}}],"line":1428},"133":{"loc":{"start":{"line":1444,"column":6},"end":{"line":1448,"column":7}},"type":"if","locations":[{"start":{"line":1444,"column":6},"end":{"line":1448,"column":7}},{"start":{"line":1444,"column":6},"end":{"line":1448,"column":7}}],"line":1444},"134":{"loc":{"start":{"line":1465,"column":6},"end":{"line":1467,"column":7}},"type":"if","locations":[{"start":{"line":1465,"column":6},"end":{"line":1467,"column":7}},{"start":{"line":1465,"column":6},"end":{"line":1467,"column":7}}],"line":1465},"135":{"loc":{"start":{"line":1691,"column":14},"end":{"line":1691,"column":27}},"type":"binary-expr","locations":[{"start":{"line":1691,"column":14},"end":{"line":1691,"column":21}},{"start":{"line":1691,"column":25},"end":{"line":1691,"column":27}}],"line":1691},"136":{"loc":{"start":{"line":1693,"column":18},"end":{"line":1693,"column":45}},"type":"binary-expr","locations":[{"start":{"line":1693,"column":18},"end":{"line":1693,"column":32}},{"start":{"line":1693,"column":36},"end":{"line":1693,"column":45}}],"line":1693},"137":{"loc":{"start":{"line":1695,"column":19},"end":{"line":1695,"column":47}},"type":"binary-expr","locations":[{"start":{"line":1695,"column":19},"end":{"line":1695,"column":34}},{"start":{"line":1695,"column":38},"end":{"line":1695,"column":47}}],"line":1695},"138":{"loc":{"start":{"line":1697,"column":19},"end":{"line":1697,"column":47}},"type":"binary-expr","locations":[{"start":{"line":1697,"column":19},"end":{"line":1697,"column":34}},{"start":{"line":1697,"column":38},"end":{"line":1697,"column":47}}],"line":1697},"139":{"loc":{"start":{"line":1699,"column":19},"end":{"line":1699,"column":47}},"type":"binary-expr","locations":[{"start":{"line":1699,"column":19},"end":{"line":1699,"column":34}},{"start":{"line":1699,"column":38},"end":{"line":1699,"column":47}}],"line":1699},"140":{"loc":{"start":{"line":1701,"column":24},"end":{"line":1702,"column":37}},"type":"cond-expr","locations":[{"start":{"line":1702,"column":10},"end":{"line":1702,"column":30}},{"start":{"line":1702,"column":33},"end":{"line":1702,"column":37}}],"line":1701},"141":{"loc":{"start":{"line":1704,"column":22},"end":{"line":1751,"column":5}},"type":"binary-expr","locations":[{"start":{"line":1704,"column":22},"end":{"line":1704,"column":40}},{"start":{"line":1704,"column":44},"end":{"line":1751,"column":5}}],"line":1704},"142":{"loc":{"start":{"line":1752,"column":4},"end":{"line":1759,"column":5}},"type":"if","locations":[{"start":{"line":1752,"column":4},"end":{"line":1759,"column":5}},{"start":{"line":1752,"column":4},"end":{"line":1759,"column":5}}],"line":1752},"143":{"loc":{"start":{"line":1753,"column":6},"end":{"line":1758,"column":7}},"type":"if","locations":[{"start":{"line":1753,"column":6},"end":{"line":1758,"column":7}},{"start":{"line":1753,"column":6},"end":{"line":1758,"column":7}}],"line":1753},"144":{"loc":{"start":{"line":1780,"column":8},"end":{"line":1782,"column":9}},"type":"if","locations":[{"start":{"line":1780,"column":8},"end":{"line":1782,"column":9}},{"start":{"line":1780,"column":8},"end":{"line":1782,"column":9}}],"line":1780},"145":{"loc":{"start":{"line":1798,"column":10},"end":{"line":1800,"column":11}},"type":"if","locations":[{"start":{"line":1798,"column":10},"end":{"line":1800,"column":11}},{"start":{"line":1798,"column":10},"end":{"line":1800,"column":11}}],"line":1798},"146":{"loc":{"start":{"line":1847,"column":14},"end":{"line":1847,"column":27}},"type":"binary-expr","locations":[{"start":{"line":1847,"column":14},"end":{"line":1847,"column":21}},{"start":{"line":1847,"column":25},"end":{"line":1847,"column":27}}],"line":1847},"147":{"loc":{"start":{"line":1849,"column":24},"end":{"line":1849,"column":57}},"type":"binary-expr","locations":[{"start":{"line":1849,"column":24},"end":{"line":1849,"column":44}},{"start":{"line":1849,"column":48},"end":{"line":1849,"column":57}}],"line":1849},"148":{"loc":{"start":{"line":1851,"column":25},"end":{"line":1851,"column":59}},"type":"binary-expr","locations":[{"start":{"line":1851,"column":25},"end":{"line":1851,"column":46}},{"start":{"line":1851,"column":50},"end":{"line":1851,"column":59}}],"line":1851},"149":{"loc":{"start":{"line":1853,"column":25},"end":{"line":1853,"column":59}},"type":"binary-expr","locations":[{"start":{"line":1853,"column":25},"end":{"line":1853,"column":46}},{"start":{"line":1853,"column":50},"end":{"line":1853,"column":59}}],"line":1853},"150":{"loc":{"start":{"line":1855,"column":30},"end":{"line":1855,"column":69}},"type":"binary-expr","locations":[{"start":{"line":1855,"column":30},"end":{"line":1855,"column":56}},{"start":{"line":1855,"column":60},"end":{"line":1855,"column":69}}],"line":1855},"151":{"loc":{"start":{"line":1857,"column":16},"end":{"line":1857,"column":41}},"type":"binary-expr","locations":[{"start":{"line":1857,"column":16},"end":{"line":1857,"column":28}},{"start":{"line":1857,"column":32},"end":{"line":1857,"column":41}}],"line":1857},"152":{"loc":{"start":{"line":1859,"column":20},"end":{"line":1859,"column":49}},"type":"binary-expr","locations":[{"start":{"line":1859,"column":20},"end":{"line":1859,"column":36}},{"start":{"line":1859,"column":40},"end":{"line":1859,"column":49}}],"line":1859},"153":{"loc":{"start":{"line":1861,"column":22},"end":{"line":2019,"column":5}},"type":"binary-expr","locations":[{"start":{"line":1861,"column":22},"end":{"line":1861,"column":40}},{"start":{"line":1861,"column":44},"end":{"line":2019,"column":5}}],"line":1861},"154":{"loc":{"start":{"line":2020,"column":4},"end":{"line":2027,"column":5}},"type":"if","locations":[{"start":{"line":2020,"column":4},"end":{"line":2027,"column":5}},{"start":{"line":2020,"column":4},"end":{"line":2027,"column":5}}],"line":2020},"155":{"loc":{"start":{"line":2021,"column":6},"end":{"line":2026,"column":7}},"type":"if","locations":[{"start":{"line":2021,"column":6},"end":{"line":2026,"column":7}},{"start":{"line":2021,"column":6},"end":{"line":2026,"column":7}}],"line":2021},"156":{"loc":{"start":{"line":2196,"column":6},"end":{"line":2201,"column":7}},"type":"if","locations":[{"start":{"line":2196,"column":6},"end":{"line":2201,"column":7}},{"start":{"line":2196,"column":6},"end":{"line":2201,"column":7}}],"line":2196},"157":{"loc":{"start":{"line":2196,"column":10},"end":{"line":2198,"column":51}},"type":"binary-expr","locations":[{"start":{"line":2196,"column":10},"end":{"line":2196,"column":47}},{"start":{"line":2197,"column":13},"end":{"line":2197,"column":51}},{"start":{"line":2198,"column":13},"end":{"line":2198,"column":51}}],"line":2196},"158":{"loc":{"start":{"line":2202,"column":6},"end":{"line":2224,"column":7}},"type":"if","locations":[{"start":{"line":2202,"column":6},"end":{"line":2224,"column":7}},{"start":{"line":2202,"column":6},"end":{"line":2224,"column":7}}],"line":2202},"159":{"loc":{"start":{"line":2202,"column":10},"end":{"line":2221,"column":11}},"type":"binary-expr","locations":[{"start":{"line":2202,"column":10},"end":{"line":2202,"column":23}},{"start":{"line":2205,"column":14},"end":{"line":2205,"column":47}},{"start":{"line":2207,"column":16},"end":{"line":2207,"column":43}},{"start":{"line":2208,"column":19},"end":{"line":2208,"column":42}},{"start":{"line":2209,"column":19},"end":{"line":2209,"column":45}},{"start":{"line":2210,"column":19},"end":{"line":2210,"column":43}},{"start":{"line":2211,"column":19},"end":{"line":2211,"column":48}},{"start":{"line":2215,"column":14},"end":{"line":2215,"column":47}},{"start":{"line":2217,"column":16},"end":{"line":2217,"column":33}},{"start":{"line":2218,"column":19},"end":{"line":2218,"column":37}}],"line":2202},"160":{"loc":{"start":{"line":2228,"column":8},"end":{"line":2253,"column":9}},"type":"if","locations":[{"start":{"line":2228,"column":8},"end":{"line":2253,"column":9}},{"start":{"line":2228,"column":8},"end":{"line":2253,"column":9}}],"line":2228},"161":{"loc":{"start":{"line":2229,"column":10},"end":{"line":2252,"column":11}},"type":"if","locations":[{"start":{"line":2229,"column":10},"end":{"line":2252,"column":11}},{"start":{"line":2229,"column":10},"end":{"line":2252,"column":11}}],"line":2229},"162":{"loc":{"start":{"line":2230,"column":12},"end":{"line":2251,"column":13}},"type":"if","locations":[{"start":{"line":2230,"column":12},"end":{"line":2251,"column":13}},{"start":{"line":2230,"column":12},"end":{"line":2251,"column":13}}],"line":2230},"163":{"loc":{"start":{"line":2233,"column":14},"end":{"line":2243,"column":15}},"type":"if","locations":[{"start":{"line":2233,"column":14},"end":{"line":2243,"column":15}},{"start":{"line":2233,"column":14},"end":{"line":2243,"column":15}}],"line":2233},"164":{"loc":{"start":{"line":2233,"column":18},"end":{"line":2235,"column":77}},"type":"binary-expr","locations":[{"start":{"line":2233,"column":18},"end":{"line":2233,"column":53}},{"start":{"line":2234,"column":21},"end":{"line":2234,"column":56}},{"start":{"line":2235,"column":21},"end":{"line":2235,"column":77}}],"line":2233},"165":{"loc":{"start":{"line":2277,"column":8},"end":{"line":2279,"column":9}},"type":"if","locations":[{"start":{"line":2277,"column":8},"end":{"line":2279,"column":9}},{"start":{"line":2277,"column":8},"end":{"line":2279,"column":9}}],"line":2277},"166":{"loc":{"start":{"line":2294,"column":10},"end":{"line":2296,"column":11}},"type":"if","locations":[{"start":{"line":2294,"column":10},"end":{"line":2296,"column":11}},{"start":{"line":2294,"column":10},"end":{"line":2296,"column":11}}],"line":2294}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":57,"6":57,"7":57,"8":57,"9":41,"10":34,"11":1,"12":33,"13":32,"14":1,"15":7,"16":7,"17":7,"18":7,"19":4,"20":3,"21":1,"22":2,"23":1,"24":1,"25":1,"26":3,"27":3,"28":3,"29":3,"30":3,"31":3,"32":3,"33":1,"34":3,"35":1,"36":41,"37":41,"38":16,"39":16,"40":32,"41":32,"42":6,"43":32,"44":32,"45":32,"46":32,"47":32,"48":32,"49":6,"50":26,"51":32,"52":3,"53":32,"54":3,"55":32,"56":4,"57":28,"58":32,"59":2,"60":1,"61":1,"62":32,"63":2,"64":1,"65":1,"66":32,"67":2,"68":1,"69":1,"70":32,"71":2,"72":1,"73":1,"74":32,"75":1,"76":32,"77":1,"78":32,"79":1,"80":32,"81":1,"82":7,"83":7,"84":5,"85":2,"86":1,"87":1,"88":1,"89":1,"90":7,"91":20,"92":20,"93":20,"94":20,"95":19,"96":19,"97":19,"98":19,"99":19,"100":19,"101":1,"102":7,"103":7,"104":7,"105":7,"106":6,"107":6,"108":2,"109":2,"110":2,"111":6,"112":6,"113":2,"114":6,"115":1,"116":1,"117":6,"118":3,"119":3,"120":1,"121":7,"122":7,"123":7,"124":7,"125":1,"126":1,"127":6,"128":1,"129":1,"130":1,"131":1,"132":5,"133":1,"134":1,"135":1,"136":1,"137":5,"138":5,"139":4,"140":4,"141":4,"142":1,"143":1,"144":1,"145":4,"146":3,"147":3,"148":3,"149":4,"150":3,"151":3,"152":3,"153":4,"154":4,"155":2,"156":4,"157":1,"158":1,"159":4,"160":2,"161":2,"162":36,"163":36,"164":1,"165":1,"166":35,"167":35,"168":20,"169":19,"170":1,"171":15,"172":7,"173":2,"174":5,"175":8,"176":7,"177":2,"178":5,"179":1,"180":1,"181":1,"182":10,"183":10,"184":10,"185":10,"186":10,"187":10,"188":1,"189":9,"190":10,"191":1,"192":9,"193":10,"194":2,"195":1,"196":1,"197":10,"198":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"205":1,"206":9,"207":9,"208":9,"209":9,"210":9,"211":9,"212":9,"213":9,"214":10,"215":1,"216":10,"217":10,"218":10,"219":3,"220":3,"221":2,"222":2,"223":1,"224":1,"225":1,"226":1,"227":10,"228":3,"229":3,"230":2,"231":2,"232":1,"233":1,"234":1,"235":1,"236":10,"237":3,"238":3,"239":2,"240":2,"241":1,"242":1,"243":1,"244":1,"245":10,"246":3,"247":3,"248":2,"249":2,"250":1,"251":1,"252":1,"253":1,"254":10,"255":3,"256":3,"257":2,"258":2,"259":1,"260":1,"261":1,"262":1,"263":10,"264":3,"265":3,"266":2,"267":2,"268":1,"269":1,"270":1,"271":1,"272":10,"273":3,"274":3,"275":2,"276":2,"277":1,"278":1,"279":1,"280":1,"281":10,"282":3,"283":3,"284":2,"285":2,"286":1,"287":1,"288":1,"289":1,"290":10,"291":2,"292":8,"293":14,"294":14,"295":14,"296":14,"297":1,"298":1,"299":1,"300":1,"301":13,"302":13,"303":13,"304":13,"305":13,"306":13,"307":13,"308":13,"309":3,"310":3,"311":3,"312":1,"313":3,"314":2,"315":2,"316":1,"317":3,"318":13,"319":13,"320":13,"321":13,"322":13,"323":13,"324":13,"325":13,"326":13,"327":11,"328":11,"329":2,"330":11,"331":10,"332":9,"333":1,"334":1,"335":1,"336":1,"337":1,"338":1,"339":1,"340":1,"341":1,"342":1,"343":1,"344":1,"345":1,"346":2,"347":1,"348":1,"349":1,"350":19,"351":19,"352":19,"353":19,"354":19,"355":18,"356":1,"357":19,"358":5,"359":14,"360":19,"361":13,"362":6,"363":19,"364":5,"365":14,"366":19,"367":2,"368":17,"369":19,"370":18,"371":1,"372":19,"373":4,"374":15,"375":19,"376":2,"377":17,"378":19,"379":2,"380":1,"381":1,"382":19,"383":2,"384":2,"385":2,"386":2,"387":2,"388":2,"389":2,"390":2,"391":17,"392":17,"393":17,"394":17,"395":17,"396":17,"397":17,"398":17,"399":19,"400":1,"401":10,"402":10,"403":10,"404":3,"405":3,"406":2,"407":2,"408":1,"409":1,"410":1,"411":1,"412":10,"413":3,"414":3,"415":2,"416":2,"417":1,"418":1,"419":1,"420":1,"421":10,"422":3,"423":3,"424":2,"425":2,"426":1,"427":1,"428":1,"429":1,"430":10,"431":3,"432":3,"433":2,"434":2,"435":1,"436":1,"437":1,"438":1,"439":10,"440":3,"441":3,"442":2,"443":2,"444":1,"445":1,"446":1,"447":1,"448":10,"449":3,"450":3,"451":2,"452":2,"453":1,"454":1,"455":1,"456":1,"457":10,"458":3,"459":3,"460":2,"461":2,"462":1,"463":1,"464":1,"465":1,"466":10,"467":3,"468":3,"469":2,"470":2,"471":1,"472":1,"473":1,"474":1,"475":10,"476":2,"477":8,"478":22,"479":22,"480":22,"481":22,"482":1,"483":1,"484":1,"485":1,"486":21,"487":21,"488":21,"489":21,"490":21,"491":21,"492":21,"493":21,"494":21,"495":21,"496":21,"497":21,"498":5,"499":5,"500":5,"501":2,"502":5,"503":4,"504":4,"505":1,"506":5,"507":21,"508":21,"509":20,"510":20,"511":5,"512":5,"513":3,"514":1,"515":2,"516":2,"517":1,"518":1,"519":15,"520":13,"521":13,"522":1,"523":1,"524":1,"525":12,"526":2,"527":2,"528":1,"529":1,"530":1,"531":1,"532":20,"533":20,"534":21,"535":21,"536":21,"537":2,"538":2,"539":2,"540":2,"541":4,"542":4,"543":3,"544":3,"545":2,"546":21,"547":21,"548":21,"549":21,"550":21,"551":21,"552":21,"553":21,"554":21,"555":20,"556":1,"557":21,"558":21,"559":11,"560":11,"561":2,"562":11,"563":10,"564":9,"565":1,"566":1,"567":1,"568":1,"569":1,"570":1,"571":1,"572":1,"573":1,"574":1,"575":1,"576":1,"577":1,"578":2,"579":1,"580":1,"581":1,"582":6,"583":6,"584":6,"585":6,"586":6,"587":6,"588":6,"589":6,"590":6,"591":2,"592":1,"593":1,"594":3,"595":3,"596":3,"597":3,"598":3,"599":3,"600":3,"601":3,"602":3,"603":3,"604":3,"605":93,"606":1,"607":3,"608":3,"609":3,"610":3,"611":1,"612":3,"613":2,"614":1,"615":9,"616":9,"617":9,"618":9,"619":9,"620":9,"621":9,"622":9,"623":9,"624":9,"625":2,"626":1,"627":1,"628":5,"629":5,"630":5,"631":1,"632":5,"633":1,"634":5,"635":5,"636":5,"637":318,"638":4,"639":3,"640":2,"641":1,"642":1,"643":1,"644":1,"645":1,"646":1,"647":1,"648":1,"649":1,"650":1,"651":1,"652":1,"653":1,"654":5,"655":2,"656":2,"657":2,"658":2,"659":2,"660":2,"661":2,"662":2,"663":2,"664":2,"665":2,"666":2,"667":158,"668":1,"669":2,"670":2,"671":2,"672":2,"673":1,"674":2,"675":1,"676":1,"677":1},"f":{"0":57,"1":57,"2":32,"3":7,"4":7,"5":20,"6":20,"7":19,"8":19,"9":1,"10":7,"11":7,"12":6,"13":2,"14":2,"15":2,"16":1,"17":3,"18":1,"19":7,"20":7,"21":3,"22":3,"23":2,"24":1,"25":2,"26":36,"27":36,"28":19,"29":1,"30":2,"31":5,"32":2,"33":5,"34":10,"35":10,"36":10,"37":3,"38":2,"39":1,"40":3,"41":2,"42":1,"43":3,"44":2,"45":1,"46":3,"47":2,"48":1,"49":3,"50":2,"51":1,"52":3,"53":2,"54":1,"55":3,"56":2,"57":1,"58":3,"59":2,"60":1,"61":2,"62":8,"63":14,"64":14,"65":11,"66":11,"67":10,"68":9,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":2,"83":1,"84":1,"85":1,"86":19,"87":10,"88":10,"89":3,"90":2,"91":1,"92":3,"93":2,"94":1,"95":3,"96":2,"97":1,"98":3,"99":2,"100":1,"101":3,"102":2,"103":1,"104":3,"105":2,"106":1,"107":3,"108":2,"109":1,"110":3,"111":2,"112":1,"113":2,"114":8,"115":22,"116":22,"117":11,"118":11,"119":10,"120":9,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":2,"135":1,"136":1,"137":1,"138":6,"139":3,"140":3,"141":3,"142":3,"143":3,"144":2,"145":1,"146":9,"147":5,"148":5,"149":2,"150":2,"151":2,"152":2,"153":2,"154":1,"155":1},"b":{"0":[41,16],"1":[57,50],"2":[34,7],"3":[1,33],"4":[34,2],"5":[32,1],"6":[33,33,1,1],"7":[4,3],"8":[3,1],"9":[4,3],"10":[1,2],"11":[1,1],"12":[1,2],"13":[1,2],"14":[6,26],"15":[32,22],"16":[32,13],"17":[32,14],"18":[32,26],"19":[6,26],"20":[32,5,27],"21":[3,29],"22":[3,29],"23":[4,28],"24":[28,28],"25":[2,30],"26":[1,1],"27":[2,30],"28":[1,1],"29":[2,30],"30":[1,1],"31":[2,30],"32":[1,1],"33":[1,31],"34":[32,1],"35":[1,31],"36":[32,1],"37":[1,31],"38":[32,1],"39":[1,31],"40":[32,1],"41":[5,2],"42":[7,5],"43":[1,1],"44":[1,18],"45":[1,6],"46":[7,2],"47":[1,5],"48":[6,5],"49":[1,4],"50":[5,5],"51":[4,1],"52":[1,3],"53":[1,35],"54":[20,15],"55":[7,8],"56":[7,1],"57":[10,6],"58":[10,10],"59":[10,10],"60":[10,10],"61":[1,9],"62":[1,9],"63":[2,8],"64":[1,1],"65":[1,9],"66":[1,9],"67":[3,7],"68":[3,7],"69":[3,7],"70":[3,7],"71":[3,7],"72":[3,7],"73":[3,7],"74":[3,7],"75":[14,2],"76":[9,5],"77":[1,13],"78":[14,13],"79":[3,10],"80":[3,1],"81":[1,2],"82":[2,1],"83":[2,9],"84":[19,6],"85":[19,19],"86":[19,19],"87":[18,1],"88":[19,9],"89":[5,14],"90":[13,6],"91":[19,10],"92":[5,14],"93":[2,17],"94":[18,1],"95":[19,1],"96":[4,15],"97":[2,17],"98":[2,17],"99":[1,1],"100":[2,17],"101":[1,18],"102":[3,7],"103":[3,7],"104":[3,7],"105":[3,7],"106":[3,7],"107":[3,7],"108":[3,7],"109":[3,7],"110":[22,9],"111":[9,13],"112":[1,21],"113":[22,21],"114":[21,21],"115":[21,21],"116":[21,21],"117":[21,20],"118":[5,16],"119":[5,1],"120":[2,3],"121":[4,1],"122":[20,1],"123":[5,15],"124":[3,2],"125":[1,2],"126":[1,1],"127":[13,2],"128":[1,12],"129":[1,1],"130":[2,19],"131":[21,2],"132":[3,1],"133":[20,1],"134":[2,9],"135":[6,3],"136":[6,5],"137":[6,5],"138":[6,5],"139":[6,5],"140":[1,5],"141":[6,5],"142":[2,4],"143":[1,1],"144":[1,92],"145":[1,2],"146":[9,4],"147":[9,9],"148":[9,9],"149":[9,9],"150":[9,9],"151":[9,9],"152":[9,8],"153":[9,6],"154":[2,7],"155":[1,1],"156":[1,4],"157":[5,5,4],"158":[1,4],"159":[5,5,4,1,1,1,1,4,1,1],"160":[4,314],"161":[3,1],"162":[2,1],"163":[1,1],"164":[2,2,2],"165":[1,157],"166":[1,1]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"1f37405e2bd24e517bee2a8af9733dd6a4c28f5a"} +} diff --git a/docs/coverage/lcov-report/base.css b/docs/coverage/lcov-report/base.css new file mode 100644 index 0000000..417c7ad --- /dev/null +++ b/docs/coverage/lcov-report/base.css @@ -0,0 +1,212 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } + + +.medium .chart { border:1px solid #666; } +.medium .cover-fill { background: #666; } + +.cbranch-no { background: yellow !important; color: #111; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +span.cline-neutral { background: #eaeaea; } +.medium { background: #eaeaea; } + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/docs/coverage/lcov-report/index.html b/docs/coverage/lcov-report/index.html new file mode 100644 index 0000000..8cc8cad --- /dev/null +++ b/docs/coverage/lcov-report/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for All files + + + + + + + +
+
+

+ All files +

+
+
+ 100% + Statements + 678/678 +
+
+ 100% + Branches + 347/347 +
+
+ 100% + Functions + 156/156 +
+
+ 100% + Lines + 678/678 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js
100%678/678100%347/347100%156/156100%678/678
+
+
+ + + + + + + diff --git a/docs/coverage/lcov-report/index.js.html b/docs/coverage/lcov-report/index.js.html new file mode 100644 index 0000000..89027c5 --- /dev/null +++ b/docs/coverage/lcov-report/index.js.html @@ -0,0 +1,7010 @@ + + + + Code coverage report for index.js + + + + + + + +
+
+

+ All files index.js +

+
+
+ 100% + Statements + 678/678 +
+
+ 100% + Branches + 347/347 +
+
+ 100% + Functions + 156/156 +
+
+ 100% + Lines + 678/678 +
+
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +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 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 +999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1234 +1235 +1236 +1237 +1238 +1239 +1240 +1241 +1242 +1243 +1244 +1245 +1246 +1247 +1248 +1249 +1250 +1251 +1252 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278 +1279 +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1310 +1311 +1312 +1313 +1314 +1315 +1316 +1317 +1318 +1319 +1320 +1321 +1322 +1323 +1324 +1325 +1326 +1327 +1328 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1348 +1349 +1350 +1351 +1352 +1353 +1354 +1355 +1356 +1357 +1358 +1359 +1360 +1361 +1362 +1363 +1364 +1365 +1366 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +1376 +1377 +1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386 +1387 +1388 +1389 +1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398 +1399 +1400 +1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +1420 +1421 +1422 +1423 +1424 +1425 +1426 +1427 +1428 +1429 +1430 +1431 +1432 +1433 +1434 +1435 +1436 +1437 +1438 +1439 +1440 +1441 +1442 +1443 +1444 +1445 +1446 +1447 +1448 +1449 +1450 +1451 +1452 +1453 +1454 +1455 +1456 +1457 +1458 +1459 +1460 +1461 +1462 +1463 +1464 +1465 +1466 +1467 +1468 +1469 +1470 +1471 +1472 +1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481 +1482 +1483 +1484 +1485 +1486 +1487 +1488 +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528 +1529 +1530 +1531 +1532 +1533 +1534 +1535 +1536 +1537 +1538 +1539 +1540 +1541 +1542 +1543 +1544 +1545 +1546 +1547 +1548 +1549 +1550 +1551 +1552 +1553 +1554 +1555 +1556 +1557 +1558 +1559 +1560 +1561 +1562 +1563 +1564 +1565 +1566 +1567 +1568 +1569 +1570 +1571 +1572 +1573 +1574 +1575 +1576 +1577 +1578 +1579 +1580 +1581 +1582 +1583 +1584 +1585 +1586 +1587 +1588 +1589 +1590 +1591 +1592 +1593 +1594 +1595 +1596 +1597 +1598 +1599 +1600 +1601 +1602 +1603 +1604 +1605 +1606 +1607 +1608 +1609 +1610 +1611 +1612 +1613 +1614 +1615 +1616 +1617 +1618 +1619 +1620 +1621 +1622 +1623 +1624 +1625 +1626 +1627 +1628 +1629 +1630 +1631 +1632 +1633 +1634 +1635 +1636 +1637 +1638 +1639 +1640 +1641 +1642 +1643 +1644 +1645 +1646 +1647 +1648 +1649 +1650 +1651 +1652 +1653 +1654 +1655 +1656 +1657 +1658 +1659 +1660 +1661 +1662 +1663 +1664 +1665 +1666 +1667 +1668 +1669 +1670 +1671 +1672 +1673 +1674 +1675 +1676 +1677 +1678 +1679 +1680 +1681 +1682 +1683 +1684 +1685 +1686 +1687 +1688 +1689 +1690 +1691 +1692 +1693 +1694 +1695 +1696 +1697 +1698 +1699 +1700 +1701 +1702 +1703 +1704 +1705 +1706 +1707 +1708 +1709 +1710 +1711 +1712 +1713 +1714 +1715 +1716 +1717 +1718 +1719 +1720 +1721 +1722 +1723 +1724 +1725 +1726 +1727 +1728 +1729 +1730 +1731 +1732 +1733 +1734 +1735 +1736 +1737 +1738 +1739 +1740 +1741 +1742 +1743 +1744 +1745 +1746 +1747 +1748 +1749 +1750 +1751 +1752 +1753 +1754 +1755 +1756 +1757 +1758 +1759 +1760 +1761 +1762 +1763 +1764 +1765 +1766 +1767 +1768 +1769 +1770 +1771 +1772 +1773 +1774 +1775 +1776 +1777 +1778 +1779 +1780 +1781 +1782 +1783 +1784 +1785 +1786 +1787 +1788 +1789 +1790 +1791 +1792 +1793 +1794 +1795 +1796 +1797 +1798 +1799 +1800 +1801 +1802 +1803 +1804 +1805 +1806 +1807 +1808 +1809 +1810 +1811 +1812 +1813 +1814 +1815 +1816 +1817 +1818 +1819 +1820 +1821 +1822 +1823 +1824 +1825 +1826 +1827 +1828 +1829 +1830 +1831 +1832 +1833 +1834 +1835 +1836 +1837 +1838 +1839 +1840 +1841 +1842 +1843 +1844 +1845 +1846 +1847 +1848 +1849 +1850 +1851 +1852 +1853 +1854 +1855 +1856 +1857 +1858 +1859 +1860 +1861 +1862 +1863 +1864 +1865 +1866 +1867 +1868 +1869 +1870 +1871 +1872 +1873 +1874 +1875 +1876 +1877 +1878 +1879 +1880 +1881 +1882 +1883 +1884 +1885 +1886 +1887 +1888 +1889 +1890 +1891 +1892 +1893 +1894 +1895 +1896 +1897 +1898 +1899 +1900 +1901 +1902 +1903 +1904 +1905 +1906 +1907 +1908 +1909 +1910 +1911 +1912 +1913 +1914 +1915 +1916 +1917 +1918 +1919 +1920 +1921 +1922 +1923 +1924 +1925 +1926 +1927 +1928 +1929 +1930 +1931 +1932 +1933 +1934 +1935 +1936 +1937 +1938 +1939 +1940 +1941 +1942 +1943 +1944 +1945 +1946 +1947 +1948 +1949 +1950 +1951 +1952 +1953 +1954 +1955 +1956 +1957 +1958 +1959 +1960 +1961 +1962 +1963 +1964 +1965 +1966 +1967 +1968 +1969 +1970 +1971 +1972 +1973 +1974 +1975 +1976 +1977 +1978 +1979 +1980 +1981 +1982 +1983 +1984 +1985 +1986 +1987 +1988 +1989 +1990 +1991 +1992 +1993 +1994 +1995 +1996 +1997 +1998 +1999 +2000 +2001 +2002 +2003 +2004 +2005 +2006 +2007 +2008 +2009 +2010 +2011 +2012 +2013 +2014 +2015 +2016 +2017 +2018 +2019 +2020 +2021 +2022 +2023 +2024 +2025 +2026 +2027 +2028 +2029 +2030 +2031 +2032 +2033 +2034 +2035 +2036 +2037 +2038 +2039 +2040 +2041 +2042 +2043 +2044 +2045 +2046 +2047 +2048 +2049 +2050 +2051 +2052 +2053 +2054 +2055 +2056 +2057 +2058 +2059 +2060 +2061 +2062 +2063 +2064 +2065 +2066 +2067 +2068 +2069 +2070 +2071 +2072 +2073 +2074 +2075 +2076 +2077 +2078 +2079 +2080 +2081 +2082 +2083 +2084 +2085 +2086 +2087 +2088 +2089 +2090 +2091 +2092 +2093 +2094 +2095 +2096 +2097 +2098 +2099 +2100 +2101 +2102 +2103 +2104 +2105 +2106 +2107 +2108 +2109 +2110 +2111 +2112 +2113 +2114 +2115 +2116 +2117 +2118 +2119 +2120 +2121 +2122 +2123 +2124 +2125 +2126 +2127 +2128 +2129 +2130 +2131 +2132 +2133 +2134 +2135 +2136 +2137 +2138 +2139 +2140 +2141 +2142 +2143 +2144 +2145 +2146 +2147 +2148 +2149 +2150 +2151 +2152 +2153 +2154 +2155 +2156 +2157 +2158 +2159 +2160 +2161 +2162 +2163 +2164 +2165 +2166 +2167 +2168 +2169 +2170 +2171 +2172 +2173 +2174 +2175 +2176 +2177 +2178 +2179 +2180 +2181 +2182 +2183 +2184 +2185 +2186 +2187 +2188 +2189 +2190 +2191 +2192 +2193 +2194 +2195 +2196 +2197 +2198 +2199 +2200 +2201 +2202 +2203 +2204 +2205 +2206 +2207 +2208 +2209 +2210 +2211 +2212 +2213 +2214 +2215 +2216 +2217 +2218 +2219 +2220 +2221 +2222 +2223 +2224 +2225 +2226 +2227 +2228 +2229 +2230 +2231 +2232 +2233 +2234 +2235 +2236 +2237 +2238 +2239 +2240 +2241 +2242 +2243 +2244 +2245 +2246 +2247 +2248 +2249 +2250 +2251 +2252 +2253 +2254 +2255 +2256 +2257 +2258 +2259 +2260 +2261 +2262 +2263 +2264 +2265 +2266 +2267 +2268 +2269 +2270 +2271 +2272 +2273 +2274 +2275 +2276 +2277 +2278 +2279 +2280 +2281 +2282 +2283 +2284 +2285 +2286 +2287 +2288 +2289 +2290 +2291 +2292 +2293 +2294 +2295 +2296 +2297 +2298 +2299 +2300 +2301 +2302 +2303 +2304 +2305 +2306 +2307 +2308 +2309 +2310 +2311 +2312 +2313 +2314 +2315 +2316  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +1x +1x +1x +1x +  +  +  +  +  +  +  +  +  +  +57x +57x +  +57x +57x +41x +34x +1x +33x +32x +  +1x +  +  +7x +7x +7x +7x +4x +  +3x +1x +2x +1x +  +1x +  +  +1x +  +  +  +  +  +3x +3x +3x +3x +3x +3x +3x +1x +  +  +  +3x +1x +  +  +  +41x +41x +  +16x +16x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +32x +32x +6x +  +  +  +32x +  +32x +32x +  +32x +  +32x +32x +  +  +6x +  +  +26x +  +32x +  +3x +  +32x +  +3x +  +  +32x +  +4x +  +28x +  +32x +2x +  +1x +  +1x +  +  +32x +2x +  +1x +  +1x +  +  +32x +2x +  +1x +  +1x +  +  +32x +2x +  +1x +  +1x +  +  +32x +1x +  +32x +1x +  +32x +1x +  +32x +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +7x +7x +  +5x +2x +1x +  +1x +1x +1x +  +7x +  +  +  +  +  +  +  +  +  +  +20x +20x +20x +  +  +20x +  +19x +19x +  +19x +19x +19x +19x +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +7x +7x +7x +  +  +7x +  +6x +  +  +  +  +6x +  +2x +2x +2x +  +  +6x +6x +2x +  +6x +1x +1x +  +6x +3x +3x +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +7x +7x +7x +  +  +  +  +7x +  +1x +1x +6x +  +1x +1x +1x +1x +5x +  +1x +1x +1x +1x +  +  +5x +5x +4x +4x +4x +1x +1x +1x +  +4x +3x +  +3x +3x +  +4x +  +3x +3x +3x +  +  +4x +  +4x +2x +  +4x +1x +1x +  +4x +2x +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +36x +36x +1x +1x +  +35x +35x +20x +  +19x +  +  +1x +  +15x +7x +  +2x +  +  +5x +  +8x +7x +  +2x +  +  +5x +  +  +1x +1x +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +10x +10x +10x +10x +10x +10x +  +1x +  +9x +  +10x +  +1x +  +9x +  +10x +2x +  +1x +  +1x +  +  +10x +  +1x +  +1x +  +1x +  +1x +  +1x +  +1x +  +1x +  +1x +  +9x +9x +9x +9x +9x +9x +9x +9x +  +10x +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +10x +10x +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +  +2x +  +  +8x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +14x +14x +14x +  +14x +1x +1x +1x +1x +  +13x +13x +13x +13x +13x +  +13x +  +13x +  +13x +3x +3x +3x +1x +  +3x +2x +2x +  +1x +  +3x +  +  +  +13x +13x +  +  +  +13x +13x +13x +13x +13x +13x +13x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +11x +11x +2x +  +11x +  +10x +  +9x +  +  +1x +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +2x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +19x +19x +19x +19x +19x +  +18x +  +1x +  +19x +  +5x +  +14x +  +19x +  +13x +  +6x +  +19x +  +5x +  +14x +  +19x +  +2x +  +17x +  +19x +  +18x +  +1x +  +19x +  +4x +  +15x +  +19x +  +2x +  +17x +  +19x +2x +  +1x +  +1x +  +  +19x +  +2x +  +2x +  +2x +  +2x +  +2x +  +2x +  +2x +  +2x +  +17x +17x +17x +17x +17x +17x +17x +17x +  +19x +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +10x +10x +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +3x +  +3x +  +2x +2x +  +  +1x +1x +1x +1x +  +  +  +10x +  +2x +  +  +8x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +22x +22x +22x +  +22x +1x +1x +1x +1x +  +21x +21x +21x +21x +21x +21x +21x +21x +21x +  +21x +  +21x +  +21x +5x +5x +5x +2x +  +5x +4x +4x +  +1x +  +5x +  +  +21x +21x +20x +20x +5x +5x +3x +1x +  +2x +  +  +2x +1x +  +1x +  +  +  +15x +13x +13x +1x +1x +1x +  +12x +  +  +2x +2x +1x +1x +1x +  +1x +  +  +  +20x +20x +  +  +21x +21x +21x +2x +2x +2x +  +2x +  +  +  +4x +  +4x +3x +3x +  +  +2x +  +  +21x +21x +21x +21x +21x +21x +21x +21x +21x +20x +  +1x +  +21x +21x +  +  +  +  +  +  +  +  +  +  +  +  +  +11x +11x +2x +  +11x +  +10x +  +9x +  +  +1x +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +2x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +6x +6x +  +6x +  +6x +  +6x +  +6x +  +6x +  +  +6x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +6x +2x +  +1x +  +1x +  +  +  +  +  +  +  +  +  +3x +3x +3x +3x +3x +3x +3x +  +  +3x +3x +3x +3x +93x +1x +  +  +3x +  +  +  +  +  +  +  +  +  +  +3x +3x +  +3x +1x +  +3x +  +2x +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +9x +9x +  +9x +  +9x +  +9x +  +9x +  +9x +  +9x +  +9x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +9x +2x +  +1x +  +1x +  +  +  +  +  +  +  +  +  +  +5x +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +1x +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +5x +5x +5x +318x +4x +3x +  +  +2x +  +  +1x +1x +1x +1x +1x +1x +1x +  +  +1x +1x +1x +1x +1x +1x +  +  +  +  +5x +  +  +  +  +  +  +  +  +2x +2x +2x +2x +2x +2x +2x +2x +2x +  +2x +2x +2x +158x +1x +  +  +2x +  +  +  +  +  +  +  +  +  +2x +2x +  +2x +1x +  +2x +  +1x +  +  +1x +  +  +  +  +  +  +1x +  +  +  +  +  +  + 
/** Copyright (c) 2018 Craig Yamato */
+ 
+/**
+ * @fileoverview The SyslogPro class for sending syslog messages
+ * @author Craig Yamato <craig@kentik.com>
+ * @copyright (c) 2018 - Craig Yamato
+ * @version 0.0.0
+ * @since 0.0.0
+ * @exports Syslog
+ * @exports LEEF
+ * @exports CEF
+ * @module SyslogPro
+ */
+"use strict";
+const moment = require('moment');
+const os = require("os");
+const dns = require('dns');
+let dnsPromises = dns.promises;
+const fs = require("fs");
+ 
+/**
+ * Format the ANSI foreground color code from a RGB hex code or ANSI color code
+ * @private
+ * @param {string} hex - The color hex code in the form of #FFFFFF or Number of
+ *     the ANSI color code (30-37 Standard & 0-255 Extended)
+ * @returns {Promise} - The formated ANSI color code
+ * @throws {Error} - A Format Error
+ */
+function rgbToAnsi (hex, extendedColor) {
+  return new Promise((resolve, reject) => {
+    let colorCode = 0;  // Var to hold color code
+    // Break HEX Code up into RGB
+    const hexParts = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
+    if (hexParts || typeof hex === 'number') {
+      if (typeof hex === 'number') {
+        if (extendedColor && hex < 256) {
+          resolve(hex);
+        } else if ((hex > 29 && hex < 38) || (hex > 89 && hex < 98)) {
+          resolve(hex);
+        } else {
+          reject (new Error('FORMAT ERROR: Color code not in range')); 
+        }
+      } else {
+        const r = parseInt(hexParts[1], 16);
+        const g = parseInt(hexParts[2], 16);
+        const b = parseInt(hexParts[3], 16);
+        if (extendedColor) {
+          if (r === g && g === b) {
+            // Gray Scale Color
+  	        if (r < 8) {
+  		        colorCode = 16;
+  	        } else if (r > 248) {
+  		        colorCode = 231;
+  	        } else {
+  	          colorCode = Math.round(((r - 8) / 247) * 24) + 232;
+  	        }
+          } else {
+            colorCode = 16
+  	            + (36 * Math.round(r / 255 * 5))
+  	            + (6 * Math.round(g / 255 * 5))
+  	            + Math.round(b / 255 * 5);
+          }
+        } else {
+          colorCode = 30;
+          const red = r / 255;
+          const green = g / 255;
+          const blue = b / 255;
+          let v = Math.max(red, green, blue) * 100;
+          v = Math.round(v / 50);
+          if (v === 1) {
+            colorCode += ((Math.round(b / 255) << 2)
+                | (Math.round(g / 255) << 1)
+                | Math.round(r / 255));
+          }
+          if (v === 2) {
+            colorCode += 60;
+          }
+        }
+      }
+      resolve(colorCode);
+      return;
+    } else {
+      reject(new Error('TYPE ERROR: Not in RGB color hex or color code'));
+      return;
+    }
+  });
+}
+ 
+/**
+ * A class to work with syslog messages using UDP, TCP, or TLS transport.  
+ * There is suport for Syslog message formating RFC-3164, RFC-5424 including 
+ * Structured Data, IBM LEEF (Log Event Extended Format), and HP CEF (Common
+ * Event Format). The meesaging is fully configurabule and Ansi foreground 
+ * colors can be added.  Both ANSI 8 and ANSI 256 color are fully suported.
+ * @requires moment
+ * @version 0.0.0
+ * @since 0.0.0
+ */
+class Syslog {
+  /**
+   * Construct a new Syslog object with user options 
+   * @public
+   * @version 0.0.0
+   * @since 0.0.0
+   * @this Syslog
+   * @param {object} [options] - Options object
+   * >>>Transport Configuraton
+   * @param {string} [options.target='127.0.0.1'] - The IP Address|FQDN of the 
+   *    Syslog Server, this option if set will take prasdents over any target 
+   *    set in a formating object
+   * @param {string} [options.protocol='udp'] - L4 transport portocol 
+   *    (udp|tcp|tls), this option if set will take prasdents over any transport 
+   *    set in a formating object
+   * @param {number} [options.port=514] - IP port, this option if set will take 
+   *    prasdents over any IP Port set in a formating object
+   * @param {number} [options.tcpTimeout=10000] - Ignored for all other 
+   *    transports, this option if set will take prasdents over any timeout 
+   *    set in a formating object
+   * @param {string[]} [options.tlsServerCerts] - Array of authrized TLS server
+   *    certificates file locations, this option if set will take prasdents 
+   *    over any certificates set in a formating object
+   * @param {string} [options.tlsClientCert] - Client TLS certificate file 
+   *    location that this client should use, this option if set will take 
+   *    prasdents over any certificates set in a formating object
+   * @param {string} [options.tlsClientKey] - Client TLS key file 
+   *    location that this client should use, this option if set will take 
+   *    prasdents over any certificates set in a formating object
+   * >>>Syslog Format Settings
+   * @param {string} [options.format='none'] - Valid syslog format options for 
+   *    this module are 'none', 'rfc3164', 'rfc5424', 'leef', 'cef'
+   * @param {RFC3164} [options.rfc5424] - {@link module:SyslogPro~RFC5424|
+   *    RFC5424 related settings}
+   * @param {RFC5424} [options.rfc5424] - {@link module:SyslogPro~RFC5424|
+   *    RFC5424 related settings}
+   * @param {LEEF} [options.leef] - {@link module:SyslogPro~LEEF|IBM LEEF 
+   *    (Log Event Extended Format) object} 
+   * @param {CEF} [options.cef] - {@link module:SyslogPro~CEF|HP CEF 
+   *    (Common Event Format) formating object} 
+   */
+  constructor (options) {
+    this.constructor__ = true;
+    if (!options) {
+      options = {};
+    }
+    // Basic transport setup
+    /** @type {string} */
+    this.target = options.target || 'localhost';
+    /** @type {string} */
+    this.protocol = options.protocol || 'udp';
+    this.protocol = this.protocol.toLowerCase();
+    /** @type {number} */
+    this.port = options.port || 514;
+    /** @type {number} */
+    this.tcpTimeout = options.tcpTimeout || 10000;
+    if ((typeof options.tlsServerCerts === 'object' 
+        && Array.isArray(options.tlsServerCerts))
+        || typeof options.tlsServerCerts === 'string') {
+      this.addTlsServerCerts(options.tlsServerCerts);  
+    } else {
+      /** @type {string[]} */
+      this.tlsServerCerts = [];
+    }
+    if (options.tlsClientCert) {
+      /** @type {string} */
+      this.tlsClientCert = options.tlsClientCert; 
+    }
+    if (options.tlsClientKey) {
+      /** @type {string} */
+      this.tlsClientKey = options.tlsClientKey; 
+    }
+    // Syslog Format
+    if (typeof options.format === 'string') {
+      /** @type {string} */
+      this.format = options.format.toLowerCase();
+    } else {
+      this.format = options.format || 'none';
+    }
+    if (options.rfc3164) {
+      if (options.rfc3164.constructor__) {
+        /** @type {RFC3164} */
+        this.rfc3164 = options.rfc3164;
+      } else {
+        this.rfc3164 = new RFC3164(options);
+      }
+    }
+    if (options.rfc5424) {
+      if (options.rfc5424.constructor__) {
+        /** @type {RFC5424} */
+        this.rfc5424 = options.rfc5424;
+      } else {
+        this.rfc5424 = new RFC5424(options);
+      }
+    }
+    if (options.leef) {
+      if (options.leef.constructor__) {
+        /** @type {LEEF} */
+        this.leef = options.leef;
+      } else {
+        this.leef = new LEEF(options);
+      }
+    }
+    if (options.cef) {
+      if (options.cef.constructor__) {
+        /** @type {CEF} */
+        this.cef = options.cef;
+      } else {
+        this.cef = new CEF(options);
+      }
+    }
+    if (this.format === 'rfc3164' && !this.rfc3164) {
+      this.rfc3164 = new RFC3164();
+    }
+    if (this.format === 'rfc5424' && !this.rfc5424) {
+      this.rfc5424 = new RFC5424();
+    }
+    if (this.format === 'leef' && !this.leef) {
+      this.leef = new LEEF();
+    }
+    if (this.format === 'cef' && !this.cef) {
+      this.cef = new CEF();
+    }
+  }
+  
+  /**
+   * Add a TLS server certificate which can be used to authentacat the server 
+   * this syslog client is connecting too.  This function will valadate the
+   * input as a file location straing and add it to an array of certificates
+   * @private
+   * @version 0.0.0
+   * @since 0.0.0
+   * @param {string|string[]} certs - File location of the certificate(s)
+   * @returns {Promise} - True
+   * @throws {Error} - A Type Error
+   */
+  addTlsServerCerts (certs) {
+    return new Promise((resolve, reject) => {
+      if (typeof certs === 'object' && Array.isArray(certs)) {
+        /** @private @type {string[]} */
+        this.tlsServerCerts = certs;
+      } else if (typeof certs === 'string') {
+        this.tlsServerCerts = [certs];
+      } else {
+        let errMsg = 'TYPE ERROR: Server Cert file loctions shoudl be a string';
+        errMsg += ' or array of strings';
+        reject(new Error(errMsg));
+      }
+      resolve(true);
+    });
+  }
+  /**
+   * Send the Syslog message over UDP
+   * @private
+   * @param {string} msg - The formated Syslog Message
+   * @returns {Promise} - The Syslog formated string sent
+   * @throws {Error} - Network Error
+   */
+  udpMessage (msg) {
+    return new Promise((resolve, reject) => {
+      const dgram = require('dgram');// Test for target DNS and Address Family (IPv4/6) by looking up the DNS
+      const dnsOptions = {
+        verbatim: true
+      };
+      dnsPromises.lookup(this.target, dnsOptions)
+          .then((result) => {
+            const udpType = result.family === 4 ? 'udp4' : 'udp6';
+            let client = dgram.createSocket(udpType);
+            // Turn msg in to a UTF8 buffer
+            let msgBuffer = Buffer.from(msg, 'utf8');
+            client.send(msgBuffer, this.port, this.target, (error) => {
+              client.close();
+              resolve(msg);
+            });
+          })
+          .catch((error) => {
+            reject(error); // Reject out of the sendMessage function promise
+          });
+    });
+  }
+  /**
+   * Send the Syslog message over TCP
+   * @private
+   * @param {string} msg - The formated Syslog Message
+   * @returns {Promise} - The Syslog formated string sent
+   * @throws {Error} - Timeout error for TCP and TLS connections
+   * @throws {Error} - Network Error
+   */
+  tcpMessage (msg) {
+    return new Promise((resolve, reject) => {
+      const net = require('net');
+      const dnsOptions = {
+        verbatim: true
+      };
+      dnsPromises.lookup(this.target, dnsOptions)
+          .then((result) => {
+            const tcpOptions = {
+              host: this.target,
+              port: this.port,
+              family: result.family
+            };
+            const client = net.createConnection(tcpOptions, () => {
+              // Turn msg in to a UTF8 buffer
+              let msgBuffer = Buffer.from(msg, 'utf8');
+              client.write(msgBuffer, () => {
+                client.end();
+              });
+            });
+            client.setTimeout(this.tcpTimeout);
+            client.on('end', () => {
+              resolve(msg);
+            });
+            client.on('timeout', () => {
+              client.end();
+              reject(new Error('TIMEOUT ERROR: Syslog server TCP timeout'));
+            });
+            client.on('error', (error) => {
+              client.destroy();
+              reject(error);
+            });
+          })
+          .catch((error) => {
+            reject(error);
+          });
+    });
+  }
+  /**
+   * Send the Syslog message over TLS
+   * @private
+   * @param {string} msg - The formated Syslog Message
+   * @returns {Promise} - The Syslog formated string sent
+   * @throws {Error} - Timeout error for TCP and TLS connections
+   * @throws {Error} - Network Error
+   */
+  tlsMessage (msg) {
+    return new Promise((resolve, reject) => {
+      const tls = require('tls');
+      const tlsOptions = {
+        host: this.target,
+        port: this.port,
+      };
+      // Load client cert and key if requested
+      if (typeof this.tlsClientKey === 'string' 
+          && typeof this.tlsClientCert === 'string') {
+        tlsOptions.key = fs.readFileSync(this.tlsClientKey);
+        tlsOptions.cert = fs.readFileSync(this.tlsClientCert);      
+      } else if (typeof this.tlsClientKey !== 'string' 
+          && typeof this.tlsClientKey !== 'undefined') {
+        let errMsg = 'TYPE ERROR: TLS Client Key is not a file';
+        errMsg += 'location string';
+        reject(new Error(errMsg));
+        return;
+      } else if (typeof this.tlsClientCert !== 'string' 
+          && typeof this.tlsClientCert !== 'undefined') {
+        let errMsg = 'TYPE ERROR: TLS Client Cert is not a file';
+        errMsg += 'location string';
+        reject(new Error(errMsg));
+        return;
+      }
+      // Load any server certs if provided
+      let tlsCerts = this.tlsServerCerts.length;
+      if (tlsCerts > 0) {
+        let tlsOptionsCerts = [];
+        for (let certIndex=0; certIndex<tlsCerts; certIndex++) {
+          if (typeof this.tlsServerCerts[certIndex] !== 'string') {
+            let errMsg = 'TYPE ERROR: TLS Server Cert is not a file';
+            errMsg += 'location string';
+            reject(new Error(errMsg));
+          }
+          let cert = fs.readFileSync(this.tlsServerCerts[certIndex]);
+          tlsOptionsCerts.push(cert);
+        }
+        tlsOptions.ca = tlsOptionsCerts;
+        tlsOptions.rejectUnauthorized = true;
+      }
+      const client = tls.connect(tlsOptions, () => { 
+        // Turn msg in to a UTF8 buffer
+        let msgBuffer = Buffer.from(msg, 'utf8');
+        client.write(msgBuffer, () => {
+          client.end();
+        });
+      });
+      client.setTimeout(this.tcpTimeout);
+      // client.on('data', (data) => {});
+      client.on('end', () => {
+        resolve(msg);
+      });
+      client.on('timeout', () => {
+        client.end();
+        reject(new Error('TIMEOUT ERROR: Syslog server TLS timeout'));
+      });
+      client.on('error', (error) => {
+        client.destroy();
+        reject(error);
+      });   
+    });
+  }
+  /**
+   * Send the Syslog message to the selected target Syslog server using the 
+   * selected transport.
+   * @private
+   * @param {string} msg - The formated Syslog Message
+   * @returns {Promise} - The Syslog formated string sent
+   * @throws {Error} - Timeout error for TCP and TLS connections
+   * @throws {Error} - Network Error
+   */
+  send (msg) {
+    return new Promise((resolve, reject) => {
+      if (typeof msg !== 'string') {
+        reject(new Error("TYPE ERROR: Syslog message must be a string"));
+        return;
+      }
+      this.protocol = this.protocol.toLowerCase();
+      if (this.protocol === 'udp') {
+        this.udpMessage(msg)
+            .then((result) => {
+              resolve(result);
+            })
+            .catch((reson) => {
+              reject(reson);
+            });
+      } else if (this.protocol === 'tcp') {
+        this.tcpMessage(msg)
+            .then((result) => {
+              resolve(result);
+            })
+            .catch((reson) => {
+              reject(reson);
+            });
+      } else if (this.protocol === 'tls') {
+        this.tlsMessage(msg)
+            .then((result) => {
+              resolve(result);
+            })
+            .catch((reson) => {
+              reject(reson);
+            });
+      } else {
+        let errorMsg = 'FORMAT ERROR: Protocol not reconized, should be ';
+        errorMsg += 'udp|tcp|tls';
+        reject(new Error(errorMsg));
+      }
+    });
+  }
+}
+ 
+/**
+ * A class to work with RFC3164 formated syslog messages.
+ * @requires moment
+ * @version 0.0.0
+ * @since 0.0.0
+ */
+class RFC3164 {
+  /**
+   * Construct a new RFC3164 formated Syslog object with user options 
+   * @public
+   * @this RFC3164
+   * @param {object} [options] - Options object
+   * @param {string} [options.applacationName='NodeJSLogger'] - Applacation
+   * @param {string} [options.hostname=os.hostname] - The name of this server
+   * @param {number} [options.facility=23] - Facility code to use sending this 
+   *    message 
+   * @param {boolean} [options.color=false] - Apply color coding encoding tag 
+   *    with syslog message text 
+   * @param {boolean} [options.extendedColor=false] - Use the extedned ANSI 
+   *    color set encoding tag with syslog message text 
+   * @param {object} [options.colors] - User defended colors for 
+   *    severites
+   * @param {string} [options.colors.emergencyColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.alertColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.criticalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.errorColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.warningColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.noticeColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.informationalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.debugColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {Syslog} [options.server=false] - A {@link module:SyslogPro~Syslog|
+   *    Syslog server connection} that should be used to send messages directly 
+   *    from this class. @see SyslogPro~Syslog
+   */
+  constructor (options) {
+    /** @private @type {boolean} */
+    this.constructor__ = true;
+    options = options || {};
+    this.hostname = options.hostname || os.hostname();
+    this.applacationName = options.applacationName || '';
+    this.facility = options.facility || 23;
+    if (options.color) {
+      /** @type {boolean} */
+      this.color = true;
+    } else {
+      this.color = false;
+    }
+    if (options.extendedColor) {
+      /** @type {boolean} */
+      this.extendedColor = true;
+    } else {
+      this.extendedColor = false;
+    }
+    if (options.server) {
+      if (!options.server.constructor__) {
+        /** @private @type {Syslog} */
+        this.server = new Syslog(options.server);
+      } else {
+        this.server = options.server;
+      }
+    }
+    if (this.extendedColor) {
+      /** @private @type {number} */
+      this.emergencyColor = 1; // Red foreground color
+      /** @private @type {number} */
+      this.alertColor = 202; // Dark Orange foreground color
+      /** @private @type {number} */
+      this.criticalColor = 208; // Orange foreground color
+      /** @private @type {number} */
+      this.errorColor = 178; // Light Orange foreground color
+      /** @private @type {number} */
+      this.warningColor = 226; // Yellow foreground color
+      /** @private @type {number} */
+      this.noticeColor = 117; // Light Blue foreground color
+      /** @private @type {number} */
+      this.informationalColor = 45; // Blue foreground color
+      /** @private @type {number} */
+      this.debugColor = 27; // Dark Blue foreground color
+    } else {
+      this.emergencyColor = 31; // Red foreground color
+      this.alertColor = 31; // Red foreground color
+      this.criticalColor = 31; // Red foreground color
+      this.errorColor = 33; // Yellow foreground color
+      this.warningColor = 33; // Yellow foreground color
+      this.noticeColor = 36; // Blue foreground color
+      this.informationalColor = 36; // Blue foreground color
+      this.debugColor = 34; // Dark Blue foreground color
+    }
+    if (typeof options.colors === 'object') {
+      this.setColor(options.colors, this.extendedColor);
+    }
+  }
+  /**
+   * Sets the color to be used for messages at a set priority
+   * @public   
+   * @param {string} [colors.emergencyColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.alertColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.criticalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.errorColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.warningColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.noticeColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.informationalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.debugColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @throws {Error} A standard error object
+   */
+  setColor (colors, extendedColor) {
+    return new Promise((resolve, reject) => {
+      let colorPromises = [];
+      if (colors.emergencyColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.emergencyColor, this.extendedColor)
+                  .then((result) => {
+                    this.emergencyColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'emergencyColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.alertColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.alertColor, this.extendedColor)
+                  .then((result) => {
+                    this.alertColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'alertColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.criticalColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.criticalColor, this.extendedColor)
+                  .then((result) => {
+                    this.criticalColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'criticalColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.errorColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.errorColor, this.extendedColor)
+                  .then((result) => {
+                    this.errorColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'errorColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.warningColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.warningColor, this.extendedColor)
+                  .then((result) => {
+                    this.warningColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'warningColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.noticeColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.noticeColor, this.extendedColor)
+                  .then((result) => {
+                    this.noticeColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'noticeColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.informationalColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.informationalColor, this.extendedColor)
+                  .then((result) => {
+                    this.informationalColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'informationalColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.debugColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.debugColor, this.extendedColor)
+                  .then((result) => {
+                    this.debugColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'debugColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      Promise.all(colorPromises)
+          .then((results) => {
+            resolve(true);
+          })
+          .catch((reson) => {
+            reject(reson);
+          });
+    });
+  }
+  /**
+   * Building a formated message.  Returns a promise with a formated message 
+   * @public
+   * @param {string} msg - The Syslog Message
+   * @param {object} [options] - Options object
+   * @param {number} [options.severity=7] - An array of structure 
+   * @param {number} [options.colorCode=36] - The ANSI color code to use if 
+   *    message coloration is selected
+   * @returns {Promise} A Syslog formated string acording to the selected RFC
+   * @throws {Error} A standard error object
+   */
+  buildMessage (msg, options) {
+    return new Promise((resolve, reject) => {
+      options = options || {};
+      let severity = typeof options.severity === 'number' ? 
+          options.severity : 6;
+      if (typeof msg !== 'string' || options.msgSeverity > 7) {
+        let errMsg = 'FORMAT ERROR: Syslog message must be a string';
+        errMsg += ' msgSeverity must be a number between 0 and 7';
+        reject(new Error(errMsg));
+        return;
+      }
+      let fmtMsg = ''; // Formated Syslog message string var
+      const newLine = '\n';
+      const newLineRegEx = /(\r|\n|(\r\n))/;
+      const escapeCode = '\u001B';
+      const resetColor = '\u001B[0m';
+      // The PRI is common to both RFC formats
+      const pri = (this.facility * 8) + severity;
+      // Remove any newline character
+      msg = msg.replace(newLineRegEx, ''); 
+      // Add requested color
+      if (this.color) {
+        options.msgColor = options.msgColor || 36;
+        let colorCode = '[';
+        if (this.extendedColor) {
+          colorCode += '38;5;'; // Extended 256 Colors ANSI Code
+        }
+        if (typeof options.msgColor === 'number') {
+          colorCode += options.msgColor;
+          colorCode += 'm'; // ANSI Color Closer
+        } else {
+          colorCode = '[39m';  // Use terminal's defualt color
+        }
+        msg = escapeCode + colorCode + msg + resetColor;
+      }
+      // RegEx to find a leading 0 in the day of a DateTime for RFC3164
+      // RFC3164 uses BSD timeformat
+      const rfc3164DateRegEx = /((A|D|F|J|M|N|O|S)(a|c|e|p|o|u)(b|c|g|l|n|p|r|t|v|y)\s)0(\d\s\d\d:\d\d:\d\d)/;
+      const timestamp = moment()
+          .format('MMM DD hh:mm:ss')
+          .replace(rfc3164DateRegEx, '$1 $5');
+      // Build message    
+      fmtMsg = '<' + pri + '>';
+      fmtMsg += timestamp;
+      fmtMsg += ' ' + this.hostname;
+      fmtMsg += ' ' + this.applacationName;
+      fmtMsg += ' ' + msg;
+      fmtMsg += newLine;
+      resolve(fmtMsg);
+    });
+  }
+  /**
+   * send a RFC5424 formated message.  Returns a promise with the formated 
+   *    message that was sent.  If no server connection was defined when the 
+   *    class was created a defualt Syslog connector will be used.  
+   *    @see SyslogPro~Syslog
+   * @public
+   * @param {string} msg - The unformated Syslog message to send
+   * @param {object} [options] - Options object
+   * @param {number} [options.severity=7] - An array of structure 
+   * @param {number} [options.colorCode=36] - The ANSI color code to use if 
+   * @returns {Promise} A Syslog formated string acording to the selected RFC
+   * @throws {Error} A standard error object
+   */
+  send (msg, options) {
+    return new Promise((resolve, reject) => {
+      if (!this.server) {
+        this.server = new Syslog();
+      }
+      this.buildMessage(msg, options)
+        .then((result) => {
+          this.server.send(result)
+            .then((sendResult) => {
+              resolve(sendResult);
+            })
+            .catch((error) => {
+              reject(error);
+            });
+        })
+        .catch((error) => {
+          reject(error);
+        });
+    });
+  } 
+  /**
+   * Send a syslog message with a secerity level of 0 (Emergency)
+   * @public
+   * @param {string} msg - The emergancy message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  emergency (msg) {
+    return this.send(msg, {
+      severity: 0, 
+      colorCode: this.emergencyColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 0 (Emergency)
+   * @public
+   * @param {string} msg - The emergancy message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  emer (msg) {
+    return this.emergency(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 1 (Alert)
+   * @public
+   * @param {string} msg - The alert message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  alert (msg) {
+    return this.send(msg, {
+      severity: 1, 
+      colorCode: this.alertColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 2 (Critical)
+   * @public
+   * @param {string} msg - The critical message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  critical (msg) {
+    return this.send(msg, {
+      severity: 2, 
+      colorCode: this.criticalColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 2 (Critical)
+   * @public
+   * @param {string} msg - The critical message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  crit (msg) {
+    return this.critical(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 3 (Error)
+   * @public
+   * @param {string} msg - The error message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  error (msg) {
+    return this.send(msg, {
+      severity: 3, 
+      colorCode: this.errorColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 3 (Error)
+   * @public
+   * @param {string} msg - The error message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  err (msg) {
+    return this.error(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 4 (Warning)
+   * @public
+   * @param {string} msg - The warning message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  warning (msg) {
+    return this.send(msg, {
+      severity: 4, 
+      colorCode: this.warningColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 4 (Warning)
+   * @public
+   * @param {string} msg - The warning message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  warn (msg) {
+    return this.warning(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 5 (Notice)
+   * @public
+   * @param {string} msg - The notice message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  notice (msg) {
+    return this.send(msg, {
+      severity: 5, 
+      colorCode: this.noticeColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 5 (Notice)
+   * @public
+   * @param {string} msg - The notice message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  note (msg) {
+    return this.notice(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 6 (Informational)
+   * @public
+   * @param {string} msg - The informational message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  informational (msg) {
+    return this.send(msg, {
+      severity: 6, 
+      colorCode: this.informationalColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 6 (Informational)
+   * @public
+   * @param {string} msg - The informational message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  info (msg) {
+    return this.informational(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 6 (Informational)
+   * @public
+   * @param {string} msg - The informational message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  log (msg) {
+    return this.informational(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 7 (Debug)
+   * @public
+   * @param {string} msg - The debug message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  debug (msg) {
+    return this.send(msg, {
+      severity: 7, 
+      colorCode: this.debugColor
+    });
+  }
+}
+ 
+/**
+ * A class to work with RFC5424 formated syslog messages.
+ * @requires moment
+ * @version 0.0.0
+ * @since 0.0.0
+ */
+class RFC5424 {
+  /**
+   * Construct a new RFC5424 formated Syslog object with user options 
+   * @public
+   * @this RFC5424
+   * @param {object} [options] - Options object
+   * @param {string} [options.applacationName='NodeJSLogger'] - Applacation
+   * @param {string} [options.hostname=os.hostname] - The name of this server
+   * @param {boolean} [options.timestamp=false] - Included a Timestamp
+   * @param {boolean} [options.timestampUTC=false] - RFC tandard is for 
+   *    local time
+   * @param {boolean} [options.timestampMS=false] - Timestamp with ms 
+   *    resoltuion
+   * @param {boolean} [options.timestampTZ=true] - Should the timestamp
+   *    included timezone
+   * @param {boolean} [options.encludeStructuredData=false] - Included 
+   *    any provided structured data
+   * @param {boolean} [options.utf8BOM=true] - Included the UTF8 
+   * @param {boolean} [options.color=false] - Included the UTF8 
+   * @param {boolean} [options.extendedColor=false] - Included the UTF8 
+   *    encoding tag with syslog message text 
+   * @param {object} [options.colors] - User defended colors for 
+   *    severites
+   * @param {string} [options.colors.emergencyColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.alertColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.criticalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.errorColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.warningColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.noticeColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.informationalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.debugColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {Syslog} [options.server=false] - A {@link module:SyslogPro~Syslog|
+   *    Syslog server connection} that should be used to send messages directly 
+   *    from this class. @see SyslogPro~Syslog
+   */
+  constructor (options) {
+    /** @private @type {boolean} */
+    this.constructor__ = true;
+    options = options || {};
+    this.hostname = options.hostname || os.hostname();
+    this.applacationName = options.applacationName || '';
+    if (typeof options.timestamp === 'undefined' || options.timestamp) {
+      /** @type {boolean} */
+      this.timestamp = true;
+    } else {
+      this.timestamp = false;
+    }
+    if (options.timestampUTC) {
+      /** @type {boolean} */
+      this.timestampUTC = true;
+    } else {
+      this.timestampUTC = false;
+    }
+    if (typeof options.timestampTZ === 'undefined' || options.timestampTZ) {
+      /** @type {boolean} */
+      this.timestampTZ = true;
+    } else {
+      this.timestampTZ = false;
+    }
+    if (options.timestampMS) {
+      /** @type {boolean} */
+      this.timestampMS = true;
+    } else {
+      this.timestampMS = false;
+    }
+    if (options.encludeStructuredData) {
+      /** @type {boolean} */
+      this.encludeStructuredData = true;
+    } else {
+      this.encludeStructuredData = false;
+    }
+    if (typeof options.utf8BOM === 'undefined' || options.utf8BOM) {
+      /** @type {boolean} */
+      this.utf8BOM = true;
+    } else {
+      this.utf8BOM = false;
+    }
+    if (options.color) {
+      /** @type {boolean} */
+      this.color = true;
+    } else {
+      this.color = false;
+    }
+    if (options.extendedColor) {
+      /** @type {boolean} */
+      this.extendedColor = true;
+    } else {
+      this.extendedColor = false;
+    }
+    if (options.server) {
+      if (!options.server.constructor__) {
+        /** @private @type {Syslog} */
+        this.server = new Syslog(options.server);
+      } else {
+        this.server = options.server;
+      }
+    }
+    if (this.extendedColor) {
+      /** @private @type {number} */
+      this.emergencyColor = 1; // Red foreground color
+      /** @private @type {number} */
+      this.alertColor = 202; // Dark Orange foreground color
+      /** @private @type {number} */
+      this.criticalColor = 208; // Orange foreground color
+      /** @private @type {number} */
+      this.errorColor = 178; // Light Orange foreground color
+      /** @private @type {number} */
+      this.warningColor = 226; // Yellow foreground color
+      /** @private @type {number} */
+      this.noticeColor = 117; // Light Blue foreground color
+      /** @private @type {number} */
+      this.informationalColor = 45; // Blue foreground color
+      /** @private @type {number} */
+      this.debugColor = 27; // Dark Blue foreground color
+    } else {
+      this.emergencyColor = 31; // Red foreground color
+      this.alertColor = 31; // Red foreground color
+      this.criticalColor = 31; // Red foreground color
+      this.errorColor = 33; // Yellow foreground color
+      this.warningColor = 33; // Yellow foreground color
+      this.noticeColor = 36; // Blue foreground color
+      this.informationalColor = 36; // Blue foreground color
+      this.debugColor = 34; // Dark Blue foreground color
+    }
+    if (typeof options.colors === 'object') {
+      this.setColor(options.colors, this.extendedColor);
+    }
+  }
+  /**
+   * Sets the color to be used for messages at a set priority
+   * @public   
+   * @param {string} [colors.emergencyColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.alertColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.criticalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.errorColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.warningColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.noticeColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.informationalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.debugColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @throws {Error} A standard error object
+   */
+  setColor (colors, extendedColor) {
+    return new Promise((resolve, reject) => {
+      let colorPromises = [];
+      if (colors.emergencyColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.emergencyColor, this.extendedColor)
+                  .then((result) => {
+                    this.emergencyColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'emergencyColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.alertColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.alertColor, this.extendedColor)
+                  .then((result) => {
+                    this.alertColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'alertColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.criticalColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.criticalColor, this.extendedColor)
+                  .then((result) => {
+                    this.criticalColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'criticalColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.errorColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.errorColor, this.extendedColor)
+                  .then((result) => {
+                    this.errorColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'errorColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.warningColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.warningColor, this.extendedColor)
+                  .then((result) => {
+                    this.warningColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'warningColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.noticeColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.noticeColor, this.extendedColor)
+                  .then((result) => {
+                    this.noticeColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'noticeColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.informationalColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.informationalColor, this.extendedColor)
+                  .then((result) => {
+                    this.informationalColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'informationalColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.debugColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.debugColor, this.extendedColor)
+                  .then((result) => {
+                    this.debugColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'debugColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      Promise.all(colorPromises)
+          .then((results) => {
+            resolve(true);
+          })
+          .catch((reson) => {
+            reject(reson);
+          });
+    });
+  }
+  /**
+   * Building a formated message.  Returns a promise with a formated message 
+   * @public
+   * @param {string} msg - The Syslog Message
+   * @param {object} [options] - Options object
+   * @param {number} [options.severity=7] - An array of structure 
+   * @param {number} [options.facility=23] - Facility code to use sending this 
+   *    message 
+   * @param {string} [options.pid='-'] - The process id of the service sending 
+   *    this message 
+   * @param {string[]} [options.structuredData] - An array of structure 
+   *    data strings conforming to the IETF/IANA defined SD-IDs or IANA 
+   *    registred SMI Network Management Private Enterprise Code SD-ID 
+   *    conforming to the format 
+   *    [name@<private enterprise number> parameter=value] 
+   * @param {number} [options.colorCode=36] - The ANSI color code to use if 
+   *    message coloration is selected
+   * @returns {Promise} A Syslog formated string acording to the selected RFC
+   * @throws {Error} A standard error object
+   */
+  buildMessage (msg, options) {
+    return new Promise((resolve, reject) => {
+      options = options || {};
+      let severity = typeof options.severity === 'number' ? 
+          options.severity : 6;
+      if (typeof msg !== 'string' || options.severity > 7) {
+        let errMsg = 'FORMAT ERROR: Syslog message must be a string';
+        errMsg += ' msgSeverity must be a number between 0 and 7';
+        reject(new Error(errMsg));
+        return;
+      }
+      let facility = options.facility || 23;
+      let pid = options.pid || '-';
+      let id = options.id || '-';
+      let msgStructuredData = options.msgStructuredData || [];
+      let fmtMsg = ''; // Formated Syslog message string var
+      const newLine = '\n';
+      const newLineRegEx = /(\r|\n|(\r\n))/;
+      const escapeCode = '\u001B';
+      const resetColor = '\u001B[0m';
+      // The PRI is common to both RFC formats
+      const pri = (facility * 8) + severity;
+      // Remove any newline character
+      msg = msg.replace(newLineRegEx, ''); 
+      // Add requested color
+      if (this.color) {
+        options.msgColor = options.msgColor || 36;
+        let colorCode = '[';
+        if (this.extendedColor) {
+          colorCode += '38;5;'; // Extended 256 Colors ANSI Code
+        }
+        if (typeof options.msgColor === 'number') {
+          colorCode += options.msgColor;
+          colorCode += 'm'; // ANSI Color Closer
+        } else {
+          colorCode = '[39m';  // Use terminal's defualt color
+        }
+        msg = escapeCode + colorCode + msg + resetColor;
+      }
+      // RFC5424 timestamp formating
+      let timestamp = '-';
+      if (this.timestamp) {
+        let timeQuality = '[timeQuality';
+        if (this.timestampUTC) {
+          timeQuality += ' tzKnown=1';
+          if (this.timestampMS) {
+            if (this.timestampTZ) {
+              timestamp = moment().utc().format('YYYY-MM-DDThh:mm:ss.SSSSSSZ');
+            } else {
+              timestamp = moment().utc().format('YYYY-MM-DDThh:mm:ss.SSSSSS');
+            }
+          } else {
+            if (this.timestampTZ) {
+              timestamp = moment().utc().format('YYYY-MM-DDThh:mm:ssZ');
+            } else {
+              timestamp = moment().utc().format('YYYY-MM-DDThh:mm:ss');
+            }
+          }
+        } else {
+          if (this.timestampTZ) {
+            timeQuality += ' tzKnown=1';
+            if (this.timestampMS) {
+              timeQuality += ' isSynced=1';
+              timeQuality += ' syncAccuracy=0';
+              timestamp = moment().format('YYYY-MM-DDThh:mm:ss.SSSSSSZ');
+            } else {
+              timestamp = moment().format('YYYY-MM-DDThh:mm:ssZ');
+            }
+          } else {
+            timeQuality += ' tzKnown=0';
+            if (this.timestampMS) {
+              timeQuality += ' isSynced=1';
+              timeQuality += ' syncAccuracy=0';
+              timestamp = moment().format('YYYY-MM-DDThh:mm:ss.SSSSSS');
+            } else {
+              timestamp = moment().format('YYYY-MM-DDThh:mm:ss');
+            }
+          }
+        }
+        timeQuality += ']';
+        msgStructuredData.push(timeQuality);
+      }
+      // Build Structured Data string
+      let structuredData = '-';
+      const sdElementCount = msgStructuredData.length;
+      if (this.encludeStructuredData && sdElementCount > 0) {
+        let sdElementNames = [];
+        let sdElements = [];
+        const sdElementNameRegEx = /(\[)(\S*)(\s|\])/;
+        // Loop to drop duplicates of the same SD Element name
+        for (let elementIndex=0; 
+            elementIndex<sdElementCount; 
+            elementIndex++) {
+          let elementName = 
+            msgStructuredData[elementIndex]
+            .match(sdElementNameRegEx)[2];
+          if (!sdElementNames.includes(elementName)) {
+            sdElementNames.push(elementName);
+            sdElements.push(msgStructuredData[elementIndex]);
+          }
+        }
+        structuredData = sdElements.join('');
+      }
+      // Build the message
+      fmtMsg = '<' + pri + '>';
+      fmtMsg += '1'; // Version number
+      fmtMsg += ' ' + timestamp;
+      fmtMsg += ' ' + this.hostname;
+      fmtMsg += ' ' + this.applacationName;
+      fmtMsg += ' ' + pid;
+      fmtMsg += ' ' + id;
+      fmtMsg += ' ' + structuredData;
+      if (this.utf8BOM) {
+        fmtMsg += ' BOM' + msg;
+      } else {
+        fmtMsg += ' ' + msg;
+      }
+      fmtMsg += newLine;
+      resolve(fmtMsg);
+    });
+  }
+  /**
+   * send a RFC5424 formated message.  Returns a promise with the formated 
+   *    message that was sent.  If no server connection was defined when the 
+   *    class was created a defualt Syslog connector will be used.  
+   *    @see SyslogPro~Syslog
+   * @public
+   * @param {string} msg - The unformated Syslog message to send
+   * @returns {Promise} A Syslog formated string acording to the selected RFC
+   * @throws {Error} A standard error object
+   */
+  send (msg, options) {
+    return new Promise((resolve, reject) => {
+      if (!this.server) {
+        this.server = new Syslog();
+      }
+      this.buildMessage(msg, options)
+        .then((result) => {
+          this.server.send(result)
+            .then((sendResult) => {
+              resolve(sendResult);
+            })
+            .catch((error) => {
+              reject(error);
+            });
+        })
+        .catch((error) => {
+          reject(error);
+        });
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 0 (Emergency)
+   * @public
+   * @param {string} msg - The emergancy message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  emergency (msg) {
+    return this.send(msg, {
+      severity: 0, 
+      colorCode: this.emergencyColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 0 (Emergency)
+   * @public
+   * @param {string} msg - The emergancy message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  emer (msg) {
+    return this.emergency(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 1 (Alert)
+   * @public
+   * @param {string} msg - The alert message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  alert (msg) {
+    return this.send(msg, {
+      severity: 1, 
+      colorCode: this.alertColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 2 (Critical)
+   * @public
+   * @param {string} msg - The critical message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  critical (msg) {
+    return this.send(msg, {
+      severity: 2, 
+      colorCode: this.criticalColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 2 (Critical)
+   * @public
+   * @param {string} msg - The critical message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  crit (msg) {
+    return this.critical(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 3 (Error)
+   * @public
+   * @param {string} msg - The error message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  error (msg) {
+    return this.send(msg, {
+      severity: 3, 
+      colorCode: this.errorColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 3 (Error)
+   * @public
+   * @param {string} msg - The error message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  err (msg) {
+    return this.error(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 4 (Warning)
+   * @public
+   * @param {string} msg - The warning message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  warning (msg) {
+    return this.send(msg, {
+      severity: 4, 
+      colorCode: this.warningColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 4 (Warning)
+   * @public
+   * @param {string} msg - The warning message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  warn (msg) {
+    return this.warning(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 5 (Notice)
+   * @public
+   * @param {string} msg - The notice message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  notice (msg) {
+    return this.send(msg, {
+      severity: 5, 
+      colorCode: this.noticeColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 5 (Notice)
+   * @public
+   * @param {string} msg - The notice message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  note (msg) {
+    return this.notice(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 6 (Informational)
+   * @public
+   * @param {string} msg - The informational message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  informational (msg) {
+    return this.send(msg, {
+      severity: 6, 
+      colorCode: this.informationalColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 6 (Informational)
+   * @public
+   * @param {string} msg - The informational message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  info (msg) {
+    return this.informational(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 6 (Informational)
+   * @public
+   * @param {string} msg - The informational message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  log (msg) {
+    return this.informational(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 7 (Debug)
+   * @public
+   * @param {string} msg - The debug message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  debug (msg) {
+    return this.send(msg, {
+      severity: 7, 
+      colorCode: this.debugColor
+    });
+  }
+}
+ 
+/**
+ * A class to work with IBM LEEF (Log Event Extended Format) messages this form
+ * of system messages are designed to work with security systems.  Messages can
+ * be saved to file (Saving to file if not part of this module but a LEEF 
+ * formated mesage produced by this module can be saved externaly to it) or 
+ * sent via Syslog.
+ * @requires moment
+ * @version 0.0.0
+ * @since 0.0.0
+ */
+class LEEF {
+  /**
+   * Construct a new LEEF object with user options 
+   * @public
+   * @param {object} [options] - Options object
+   * @param {string} [options.vendor='unknown'] - The vendor of the system that
+   *    genrated the event being reported
+   * @param {string} [options.product='unknown'] - The product name of the 
+   *    system that genrated the event being reported
+   * @param {string} [options.version='unknown'] - The version name of the 
+   *    system that genrated the event being reported
+   * @param {string} [options.eventId='unknown'] - The eventId of the 
+   *    system that genrated the event being reported
+   * @param {boolean} [options.syslogHeader='true'] - Should the LEEF message 
+   *    include a Syslog header with Timestamp and source
+   * @param {Syslog} [options.server=false] - A {@link module:SyslogPro~Syslog|
+   *    Syslog server connection} that should be used to send messages directly 
+   *    from this class. @see SyslogPro~Syslog
+   */
+  constructor (options) {
+    /** @private @type {boolean} */
+    this.constructor__ = true;
+    options = options || {};
+    /** @type {string} */
+    this.vendor = options.vendor || 'unknown';
+    /** @type {string} */
+    this.product = options.product || 'unknown';
+    /** @type {string} */
+    this.version = options.version || 'unknown';
+    /** @type {string} */
+    this.eventId = options.eventId || 'unknown';
+    /** @type {boolean} */
+    this.syslogHeader = typeof options.syslogHeader === 'boolean' 
+        ? options.syslogHeader : true;
+    /** @type {object} */
+    this.attrabutes = options.attrabutes || {
+      cat: null,
+      devTime: null,
+      devTimeFormat: null,
+      proto: null,
+      sev: null,
+      src: null,
+      dst: null,
+      srcPort: null,
+      dstPort: null,
+      srcPreNAT: null,
+      dstPreNAT: null,
+      srcPostNAT: null,
+      dstPostNAT: null,
+      usrName: null,
+      srcMAC: null,
+      dstMAC: null,
+      srcPreNATPort: null,
+      dstPreNATPort: null,
+      srcPostNATPort: null,
+      dstPostNATPort: null,
+      identSrc: null,
+      identHostName: null,
+      identNetBios: null,
+      identGrpName: null,
+      identMAC: null,
+      vSrc: null,
+      vSrcName: null,
+      accountName: null,
+      srcBytes: null,
+      dstBytes: null,
+      srcPackets: null,
+      dstPackets: null,
+      totalPackets: null,
+      role: null,
+      realm: null,
+      policy: null,
+      resource: null,
+      url: null,
+      groupID: null,
+      domain: null,
+      isLoginEvent: null,
+      isLogoutEvent: null,
+      identSecondlp: null,
+      calLanguage: null,
+      AttributeLimits: null,
+      calCountryOrRegion: null,
+    };
+    if (options.server) {
+      if (options.server.constructor__) {
+        /** @private @type {Syslog} */
+        this.server = options.server;
+      } else {
+        this.server = new Syslog(options.server);
+      }
+    }
+  }
+  /**
+   *Build a formated message
+   * @public
+   * @return {Promise} - string with formated message
+   */
+  buildMessage () {
+    return new Promise((resolve, reject) => {
+      let fmtMsg = 'LEEF:2.0';
+      fmtMsg += '|' + this.vendor;
+      fmtMsg += '|' + this.product;
+      fmtMsg += '|' + this.version;
+      fmtMsg += '|' + this.eventId;
+      fmtMsg += '|';
+      
+      // Build LEEF Attrabuites
+      const Tab = '\x09';
+      const leefAttribs = Object.entries(this.attrabutes);
+      const leefAttribsLen = leefAttribs.length;
+      for (let attrib = 0; attrib < leefAttribsLen; attrib++) {
+        if (leefAttribs[attrib][1] !== null) {
+          fmtMsg += leefAttribs[attrib][0] + '=' + leefAttribs[attrib][1] + Tab;
+        }
+      }
+      resolve(fmtMsg);
+    });
+  }
+  
+  /**
+   * @public
+   * @param {Syslog} [options=false] - A {@link module:SyslogPro~Syslog|
+   *    Syslog server connection} that should be used to send messages directly 
+   *    from this class. @see SyslogPro~Syslog
+   */
+  send (options) {
+    return new Promise((resolve, reject) => {
+      this.buildMessage()
+        .then((result) => {
+          if (!this.server) {
+            this.server = new Syslog(options);
+          }
+          this.server.send(result)
+            .then((sendResult) => {
+              resolve(sendResult);
+            })
+            .catch((reson) => {
+              reject(reson);
+            });
+        });
+    });
+  }
+}
+ 
+/**
+ * A class to work with HP CEF (Common Event Format) messages. This form
+ * of system messages are designed to work with security systems.  Messages can
+ * be saved to file (Saving to file if not part of this module but a CEF 
+ * formated mesage produced by this module can be saved externaly to it) or 
+ * sent via Syslog.
+ * @requires moment
+ * @version 0.0.0
+ * @since 0.0.0
+ */
+class CEF {
+  /**
+   * Construct a new CEF object with user options 
+   * @public
+   * @param {object} [options] - Options object
+   * @param {string} [options.deviceVendor='unknown'] - The vendor of the system 
+   *    that genrated the event being reported
+   * @param {string} [options.deviceProduct='unknown'] - The product name of the 
+   *    system that genrated the event being reported
+   * @param {string} [options.deviceVersion='unknown'] - The version name of the 
+   *    system that genrated the event being reported
+   * @param {string} [options.deviceEventClassId='unknown'] - The eventId of the 
+   *    system that genrated the event being reported
+   * @param {string} [options.name='unknown'] - Name of the service genrating 
+   *    the notice
+   * @param {string} [options.severity='unknown'] - Severity of the notification
+   * @param {string} [options.extensions={}] - Any CEF Key=Value extentions
+   * @param {Syslog} [options.server=false] - A {@link module:SyslogPro~Syslog|
+   *    Syslog server connection} that should be used to send messages directly 
+   *    from this class. @see SyslogPro~Syslog
+   */
+  constructor (options) {
+    /** @private @type {boolean} */
+    this.constructor__ = true;
+    options = options || {};
+    /** @type {string} */
+    this.deviceVendor = options.deviceVendor || 'Unknown';
+    /** @type {string} */
+    this.deviceProduct = options.deviceProduct || 'Unknown';
+    /** @type {string} */
+    this.deviceVersion = options.deviceVersion || 'Unknown';
+    /** @type {string} */
+    this.deviceEventClassId = options.deviceEventClassId || 'Unknown';
+    /** @type {string} */
+    this.name = options.name || 'Unknown';
+    /** @type {string} */
+    this.severity = options.severity || 'Unknown';
+    /** @type {object} */
+    this.extensions = options.extensions || {
+      'deviceAction': null,
+      'applicationProtocol': null,
+      'deviceCustomIPv6Address1': null,
+      'deviceCustomIPv6 Address1Label': null,
+      'deviceCustomIPv6Address3': null,
+      'deviceCustomIPv6Address3 Label': null,
+      'deviceCustomIPv6 Address4': null,
+      'deviceCustomIPv6 Address4Label': null,
+      'deviceEventCategory': null,
+      'deviceCustomFloatingPoint1': null,
+      'deviceCustom FloatingPoint1Label': null,
+      'deviceCustomFloatingPoint2': null,
+      'deviceCustomFloatingPoint2 Label': null,
+      'deviceCustomFloatingPoint3': null,
+      'deviceCustom FloatingPoint3Label': null,
+      'deviceCustomFloatingPoint4': null,
+      'deviceCustom FloatingPoint4Label': null,
+      'deviceCustomNumber1': null,
+      'deviceCustomNumber1Label': null,
+      'DeviceCustomNumber2': null,
+      'deviceCustomNumber2Label': null,
+      'deviceCustomNumber3': null,
+      'deviceCustomNumber3Label': null,
+      'baseEventCount': null,
+      'deviceCustomString1': null,
+      'deviceCustomString1Label': null,
+      'deviceCustomString2': null,
+      'deviceCustomString2Label': null,
+      'deviceCustomString3': null,
+      'deviceCustomString3Label': null,
+      'deviceCustomString4': null,
+      'deviceCustomString4Label': null,
+      'deviceCustomString5': null,
+      'deviceCustomString5Label': null,
+      'deviceCustomString6': null,
+      'deviceCustomString6Label': null,
+      'destinationDnsDomain': null,
+      'destinationServiceName': null,
+      'destinationTranslated Address': null,
+      'destinationTranslatedPort': null,
+      'deviceCustomDate1': null,
+      'deviceCustomDate1Label': null,
+      'deviceCustomDate2': null,
+      'deviceCustomDate2Label': null,
+      'deviceDirection': null,
+      'deviceDnsDomain': null,
+      'deviceExternalId': null,
+      'deviceFacility': null,
+      'deviceInboundInterface': null,
+      'deviceNtDomain': null,
+      'deviceOutboundInterface': null,
+      'devicePayloadId': null,
+      'deviceProcessName': null,
+      'deviceTranslatedAddress': null,
+      'destinationHostName': null,
+      'destinationMacAddress': null,
+      'destinationNtDomain': null,
+      'destinationProcessId': null,
+      'destinationUserPrivileges': null,
+      'destinationProcessName': null,
+      'destinationPort': null,
+      'destinationAddress': null,
+      'deviceTimeZone': null,
+      'destinationUserId': null,
+      'destinationUserName': null,
+      'deviceAddress': null,
+      'deviceHostName': null,
+      'deviceMacAddress': null,
+      'deviceProcessId': null,
+      'endTime': null,
+      'externalId': null,
+      'fileCreateTime': null,
+      'fileHash': null,
+      'fileId': null,
+      'fileModificationTime': null,
+      'filePath': null,
+      'filePermission': null,
+      'fileType': null,
+      'flexDate1': null,
+      'flexDate1Label': null,
+      'flexString1': null,
+      'flexString1Label': null,
+      'flexString2': null,
+      'flexString2Label': null,
+      'filename': null,
+      'fileSize': null,
+      'bytesIn': null,
+      'message': null,
+      'oldFileCreateTime': null,
+      'oldFileHash': null,
+      'oldFileId': null,
+      'oldFileModificationTime': null,
+      'oldFileName': null,
+      'oldFilePath': null,
+      'oldFileSize': null,
+      'oldFileType': null,
+      'bytesOut': null,
+      'eventOutcome': null,
+      'transportProtocol': null,
+      'Reason': null,
+      'requestUrl': null,
+      'requestClientApplication': null,
+      'requestContext': null,
+      'requestCookies': null,
+      'requestMethod': null,
+      'deviceReceiptTime': null,
+      'sourceHostName': null,
+      'sourceMacAddress': null,
+      'sourceNtDomain': null,
+      'sourceDnsDomain': null,
+      'sourceServiceName': null,
+      'sourceTranslatedAddress': null,
+      'sourceTranslatedPort': null,
+      'sourceProcessId': null,
+      'sourceUserPrivileges': null,
+      'sourceProcessName': null,
+      'sourcePort': null,
+      'sourceAddress': null,
+      'startTime': null,
+      'sourceUserId': null,
+      'sourceUserName': null,
+      'type': null,
+      'agentDnsDomain': null,
+      'agentNtDomain': null,
+      'agentTranslatedAddress': null,
+      'agentTranslatedZone ExternalID': null,
+      'agentTranslatedZoneURI': null,
+      'agentZoneExternalID': null,
+      'agentZoneURI': null,
+      'agentAddress': null,
+      'agentHostName': null,
+      'agentId': null,
+      'agentMacAddress': null,
+      'agentReceiptTime': null,
+      'agentType': null,
+      'agentTimeZone': null,
+      'agentVersion': null,
+      'customerExternalID': null,
+      'customerURI': null,
+      'destinationTranslated ZoneExternalID': null,
+      'destinationTranslated ZoneURI': null,
+      'destinationZoneExternalID': null,
+      'destinationZoneURI': null,
+      'deviceTranslatedZone ExternalID': null,
+      'deviceTranslatedZoneURI': null,
+      'deviceZoneExternalID': null,
+      'deviceZoneURI': null,
+      'destinationGeoLatitude': null,
+      'destinationGeoLongitude': null,
+      'eventId': null,
+      'rawEvent': null,
+      'sourceGeoLatitude': null,
+      'sourceGeoLongitude': null,
+      'sourceTranslatedZone ExternalID': null,
+      'sourceTranslatedZoneURI': null,
+      'sourceZoneExternalID': null,
+      'sourceZoneURI': null,
+    };
+    if (options.server) {
+      if (options.server.constructor__) {
+        /** @private @type {Syslog} */
+        this.server = options.server;
+      } else {
+        this.server = new Syslog(options.server);
+      }
+    }
+  }
+  /**
+   * Validate this CEF object
+   * @public
+   * @return {Promise} - True if valadated
+   * @throws {Error} - First element to fail valadation
+   */  
+  validate () {
+    return new Promise ((resolve, reject) => {
+      const Extensions = {
+        'deviceAction': {key: 'act', type:'String', len:63,  discription: 'Action taken by the device.'},
+        'applicationProtocol': {key: 'app', type:'String', len:31,  discription: 'Application level protocol, example values are HTTP, HTTPS, SSHv2, Telnet, POP, IMPA, IMAPS, and so on.'},
+        'deviceCustomIPv6Address1': {key: 'c6a1', type:'String', len:null,  discription: 'One of four IPv6 address fields available to map fields that do not apply to any other in this dictionary. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomIPv6 Address1Label': {key: 'c6a1Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomIPv6Address3': {key: 'c6a3', type:'String', len:null,  discription: 'One of four IPv6 address fields available to map fields that do not apply to any other in this dictionary. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomIPv6Address3 Label': {key: 'c6a3Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomIPv6 Address4': {key: 'c6a4', type:'String', len:null,  discription: 'One of four IPv6 address fields available to map fields that do not apply to any other in this dictionary. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomIPv6 Address4Label': {key: 'C6a4Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceEventCategory': {key: 'cat', type:'String', len:1023,  discription: 'Represents the category assigned by the originating device. Devices often use their own categorization schema to classify event. Example: “/Monitor/Disk/Read”'},
+        'deviceCustomFloatingPoint1': {key: 'cfp1', type:'Number', len:null,  discription: 'One of four floating point fields available to map fields that do not apply to any other in this dictionary.'},
+        'deviceCustom FloatingPoint1Label': {key: 'cfp1Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomFloatingPoint2': {key: 'cfp2', type:'Number', len:null,  discription: 'One of four floating point fields available to map fields that do not apply to any other in this dictionary.'},
+        'deviceCustomFloatingPoint2 Label': {key: 'cfp2Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomFloatingPoint3': {key: 'cfp3', type:'Number', len:null,  discription: 'One of four floating point fields available to map fields that do not apply to any other in this dictionary.'},
+        'deviceCustom FloatingPoint3Label': {key: 'cfp3Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomFloatingPoint4': {key: 'cfp4', type:'Number', len:null,  discription: 'One of four floating point fields available to map fields that do not apply to any other in this dictionary.'},
+        'deviceCustom FloatingPoint4Label': {key: 'cfp4Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomNumber1': {key: 'cn1', type:'Number', len:null,  discription: 'One of three number fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible.'},
+        'deviceCustomNumber1Label': {key: 'cn1Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'DeviceCustomNumber2': {key: 'cn2', type:'Number', len:null,  discription: 'One of three number fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible.'},
+        'deviceCustomNumber2Label': {key: 'cn2Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomNumber3': {key: 'cn3', type:'Number', len:null,  discription: 'One of three number fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible.'},
+        'deviceCustomNumber3Label': {key: 'cn3Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'baseEventCount': {key: 'cnt', type:'Number', len:null,  discription: 'A count associated with this event. How many times was this same event observed? Count can be omitted if it is 1.'},
+        'deviceCustomString1': {key: 'cs1', type:'String', len:4000,  discription: 'One of six strings available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomString1Label': {key: 'cs1Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomString2': {key: 'cs2', type:'String', len:4000,  discription: 'One of six strings available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomString2Label': {key: 'cs2Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomString3': {key: 'cs3', type:'String', len:4000,  discription: 'One of six strings available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomString3Label': {key: 'cs3Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomString4': {key: 'cs4', type:'String', len:4000,  discription: 'One of six strings available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomString4Label': {key: 'cs4Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomString5': {key: 'cs5', type:'String', len:4000,  discription: 'One of six strings available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomString5Label': {key: 'cs5Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomString6': {key: 'cs6', type:'String', len:4000,  discription: 'One of six strings available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomString6Label': {key: 'cs6Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'destinationDnsDomain': {key: 'destination DnsDomain', type:'String', len:255,  discription: 'The DNS domain part of the complete fully qualified domain name (FQDN).'},
+        'destinationServiceName': {key: 'destination ServiceName', type:'String', len:1023,  discription: 'The service targeted by this event. Example: “sshd”'},
+        'destinationTranslated Address': {key: 'Destination Translated Address', type:'String', len:null,  discription: 'Identifies the translated destination that the event refers to in an IP network. The format is an IPv4 address. Example: “192.168.10.1”'},
+        'destinationTranslatedPort': {key: 'Destination TranslatedPort', type:'Number', len:null,  discription: 'Port after it was translated; for example, a firewall. Valid port numbers are 0 to 65535.'},
+        'deviceCustomDate1': {key: 'deviceCustom Date1', type:'String', len:null,  discription: 'One of two timestamp fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomDate1Label': {key: 'deviceCustom Date1Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomDate2': {key: 'deviceCustom Date2', type:'String', len:null,  discription: 'One of two timestamp fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomDate2Label': {key: 'deviceCustom Date2Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceDirection': {key: 'deviceDirection', type:'Number', len:null,  discription: 'Any information about what direction the observed communication has taken. The following values are supported: “0” for inbound or “1” for outbound'},
+        'deviceDnsDomain': {key: 'deviceDns Domain', type:'String', len:255,  discription: 'The DNS domain part of the complete fully qualified domain name (FQDN).'},
+        'deviceExternalId': {key: 'device ExternalId', type:'String', len:255,  discription: 'A name that uniquely identifies the device generating this event.'},
+        'deviceFacility': {key: 'deviceFacility', type:'String', len:1023,  discription: 'The facility generating this event. For example, Syslog has an explicit facility associated with every event.'},
+        'deviceInboundInterface': {key: 'deviceInbound Interface', type:'String', len:128,  discription: 'Interface on which the packet or data entered the device.'},
+        'deviceNtDomain': {key: 'deviceNt Domain', type:'String', len:255,  discription: 'The Windows domain name of the device address.'},
+        'deviceOutboundInterface': {key: 'Device Outbound Interface', type:'String', len:128,  discription: 'Interface on which the packet or data left the device.'},
+        'devicePayloadId': {key: 'Device PayloadId', type:'String', len:128,  discription: 'Unique identifier for the payload associated with the event.'},
+        'deviceProcessName': {key: 'deviceProcess Name', type:'String', len:1023,  discription: 'Process name associated with the event. An example might be the process generating the syslog entry in UNIX.'},
+        'deviceTranslatedAddress': {key: 'device Translated Address', type:'String', len:null,  discription: 'Identifies the translated device address that the event refers to in an IP network. The format is an IPv4 address. Example: “192.168.10.1”'},
+        'destinationHostName': {key: 'dhost', type:'String', len:1023,  discription: 'Identifies the destination that an event refers to in an IP network. The format should be a fully qualified domain name (FQDN) associated with the destination node, when a node is available. Examples: “host.domain.com” or “host”.'},
+        'destinationMacAddress': {key: 'dmac', type:'String', len:null,  discription: 'Six colon-seperated hexadecimal numbers. Example: “00:0D:60:AF:1B:61”'},
+        'destinationNtDomain': {key: 'dntdom', type:'String', len:255,  discription: 'The Windows domain name of the destination address.'},
+        'destinationProcessId': {key: 'dpid', type:'Number', len:null,  discription: 'Provides the ID of the destination process associated with the event. For example, if an event contains process ID 105, “105” is the process ID.'},
+        'destinationUserPrivileges': {key: 'dpriv', type:'String', len:1023,  discription: 'The typical values are “Administrator”, “User”, and “Guest”. This identifies the destination user’s privileges. In UNIX, for example, activity executed on the root user would be identified with destinationUser Privileges of “Administrator”.'},
+        'destinationProcessName': {key: 'dproc', type:'String', len:1023,  discription: 'The name of the event’s destination process. Example: “telnetd” or “sshd”.'},
+        'destinationPort': {key: 'dpt', type:'Number', len:null,  discription: 'The valid port numbers are between 0 and 65535.'},
+        'destinationAddress': {key: 'dst', type:'String', len:null,  discription: 'Identifies the destination address that the event refers to in an IP network. The format is an IPv4 address. Example: “192.168.10.1”'},
+        'deviceTimeZone': {key: 'dtz', type:'String', len:255,  discription: 'The timezone for the device generating the event.'},
+        'destinationUserId': {key: 'duid', type:'String', len:1023,  discription: 'Identifies the destination user by ID. For example, in UNIX, the root user is generally associated with user ID 0.'},
+        'destinationUserName': {key: 'duser', type:'String', len:1023,  discription: 'Identifies the destination user by name. This is the user associated with the event’s destination. Email addresses are often mapped into the UserName fields. The recipient is a candidate to put into this field.'},
+        'deviceAddress': {key: 'dvc', type:'String', len:null,  discription: 'Identifies the device address that an event refers to in an IP network. The format is an IPv4 address. Example: “192.168.10.1”.'},
+        'deviceHostName': {key: 'dvchost', type:'String', len:100,  discription: 'The format should be a fully qualified domain name (FQDN) associated with the device node, when a node is available. Example: “host.domain.com” or “host”.'},
+        'deviceMacAddress': {key: 'dvcmac', type:'String', len:null,  discription: 'Six colon-separated hexadecimal numbers. Example: “00:0D:60:AF:1B:61”'},
+        'deviceProcessId': {key: 'dvcpid', type:'Number', len:null,  discription: 'Provides the ID of the process on the device generating the event.'},
+        'endTime': {key: 'end', type:'String', len:null,  discription: 'The time at which the activity related to the event ended. The format is MMM dd yyyy HH:mm:ss or milliseconds since epoch (Jan 1st1970). An example would be reporting the end of a session.'},
+        'externalId': {key: 'externalId', type:'String', len:40,  discription: 'The ID used by an originating device. They are usually increasing numbers, associated with events.'},
+        'fileCreateTime': {key: 'fileCreateTime', type:'String', len:null,  discription: 'Time when the file was created.'},
+        'fileHash': {key: 'fileHash', type:'String', len:255,  discription: 'Hash of a file.'},
+        'fileId': {key: 'fileId', type:'String', len:1023,  discription: 'An ID associated with a file could be the inode.'},
+        'fileModificationTime': {key: 'fileModification Time', type:'String', len:null,  discription: 'Time when the file was last modified.'},
+        'filePath': {key: 'filePath', type:'String', len:1023,  discription: 'Full path to the file, including file name itself. Example: C:\Program Files \WindowsNT\Accessories\ wordpad.exe or /usr/bin/zip'},
+        'filePermission': {key: 'filePermission', type:'String', len:1023,  discription: 'Permissions of the file.'},
+        'fileType': {key: 'fileType', type:'String', len:1023,  discription: 'Type of file (pipe, socket, etc.)'},
+        'flexDate1': {key: 'flexDate1', type:'String', len:null,  discription: 'A timestamp field available to map a timestamp that does not apply to any other defined timestamp field in this dictionary. Use all flex fields sparingly and seek a more specific, dictionary supplied field when possible. These fields are typically reserved for customer use and should not be set by vendors unless necessary.'},
+        'flexDate1Label': {key: 'flexDate1Label', type:'String', len:128,  discription: 'The label field is a string and describes the purpose of the flex field.'},
+        'flexString1': {key: 'flexString1', type:'String', len:1023,  discription: 'One of four floating point fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. These fields are typically reserved for customer use and should not be set by vendors unless necessary.'},
+        'flexString1Label': {key: 'flexString1 Label', type:'String', len:128,  discription: 'The label field is a string and describes the purpose of the flex field.'},
+        'flexString2': {key: 'flexString2', type:'String', len:1023,  discription: 'One of four floating point fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. These fields are typically reserved for customer use and should not be set by vendors unless necessary.'},
+        'flexString2Label': {key: 'flex String2Label', type:'String', len:128,  discription: 'The label field is a string and describes the purpose of the flex field.'},
+        'filename': {key: 'fname', type:'String', len:1023,  discription: 'Name of the file only (without its path).'},
+        'fileSize': {key: 'fsize', type:'Number', len:null,  discription: 'Size of the file.'},
+        'bytesIn': {key: 'in', type:'Number', len:null,  discription: 'Number of bytes transferred inbound, relative to the source to destination relationship, meaning that data was flowing from source to destination.'},
+        'message': {key: 'msg', type:'String', len:1023,  discription: 'An arbitrary message giving more details about the event. Multi-line entries can be produced by using \n as the new line separator.'},
+        'oldFileCreateTime': {key: 'oldFileCreate Time', type:'String', len:null,  discription: 'Time when old file was created.'},
+        'oldFileHash': {key: 'oldFileHash', type:'String', len:255,  discription: 'Hash of the old file.'},
+        'oldFileId': {key: 'oldFileId', type:'String', len:1023,  discription: 'An ID associated with the old file could be the inode.'},
+        'oldFileModificationTime': {key: 'oldFile Modification Time', type:'String', len:null,  discription: 'Time when old file was last modified.'},
+        'oldFileName': {key: 'oldFileName', type:'String', len:1023,  discription: 'Name of the old file.'},
+        'oldFilePath': {key: 'oldFilePath', type:'String', len:1023,  discription: 'Full path to the old fiWindowsNT\Accessories le, including the file name itself. Examples: c:\Program Files\wordpad.exe or /usr/bin/zip'},
+        'oldFileSize': {key: 'oldFileSize', type:'Number', len:null,  discription: 'Size of the old file.'},
+        'oldFileType': {key: 'oldFileType', type:'String', len:1023,  discription: 'Type of the old file (pipe, socket, etc.)'},
+        'bytesOut': {key: 'out', type:'Number', len:null,  discription: 'Number of bytes transferred outbound relative to the source to destination relationship. For example, the byte number of data flowing from the destination to the source.'},
+        'eventOutcome': {key: 'outcome', type:'String', len:63,  discription: 'Displays the outcome, usually as ‘success’ or ‘failure’.'},
+        'transportProtocol': {key: 'proto', type:'String', len:31,  discription: 'Identifies the Layer-4 protocol used. The possible values are protocols such as TCP or UDP.'},
+        'Reason': {key: 'reason', type:'String', len:1023,  discription: 'The reason an audit event was generated. For example “badd password” or “unknown user”. This could also be an error or return code. Example: “0x1234”'},
+        'requestUrl': {key: 'request', type:'String', len:1023,  discription: 'In the case of an HTTP request, this field contains the URL accessed. The URL should contain the protocol as well. Example: “http://www/secure.com”'},
+        'requestClientApplication': {key: 'requestClient Application', type:'String', len:1023,  discription: 'The User-Agent associated with the request.'},
+        'requestContext': {key: 'requestContext', type:'String', len:2048,  discription: 'Description of the content from which the request originated (for example, HTTP Referrer)'},
+        'requestCookies': {key: 'requestCookies', type:'String', len:1023,  discription: 'Cookies associated with the request.'},
+        'requestMethod': {key: 'requestMethod', type:'String', len:1023,  discription: 'The method used to access a URL. Possible values: “POST”, “GET”, etc.'},
+        'deviceReceiptTime': {key: 'rt', type:'String', len:null,  discription: 'The time at which the event related to the activity was received. The format is MMM dd yyyy HH:mm:ss or milliseconds since epoch (Jan 1st 1970)'},
+        'sourceHostName': {key: 'shost', type:'String', len:1023,  discription: 'Identifies the source that an event refers to in an IP network. The format should be a fully qualified domain name (DQDN) associated with the source node, when a mode is available. Examples: “host” or “host.domain.com”.'},
+        'sourceMacAddress': {key: 'smac', type:'String', len:null,  discription: 'Six colon-separated hexadecimal numbers. Example: “00:0D:60:AF:1B:61”'},
+        'sourceNtDomain': {key: 'sntdom', type:'String', len:255,  discription: 'The Windows domain name for the source address.'},
+        'sourceDnsDomain': {key: 'sourceDns Domain', type:'String', len:255,  discription: 'The DNS domain part of the complete fully qualified domain name (FQDN).'},
+        'sourceServiceName': {key: 'source ServiceName', type:'String', len:1023,  discription: 'The service that is responsible for generating this event.'},
+        'sourceTranslatedAddress': {key: 'source Translated Address', type:'String', len:null,  discription: 'Identifies the translated source that the event refers to in an IP network. The format is an IPv4 address. Example: “192.168.10.1”.'},
+        'sourceTranslatedPort': {key: 'source TranslatedPort', type:'Number', len:null,  discription: 'A port number after being translated by, for example, a firewall. Valid port numbers are 0 to 65535.'},
+        'sourceProcessId': {key: 'spid', type:'Number', len:null,  discription: 'The ID of the source process associated with the event.'},
+        'sourceUserPrivileges': {key: 'spriv', type:'String', len:1023,  discription: 'The typical values are “Administrator”, “User”, and “Guest”. It identifies the source user’s privileges. In UNIX, for example, activity executed by the root user would be identified with “Administrator”.'},
+        'sourceProcessName': {key: 'sproc', type:'String', len:1023,  discription: 'The name of the event’s source process.'},
+        'sourcePort': {key: 'spt', type:'Number', len:null,  discription: 'The valid port numbers are 0 to 65535.'},
+        'sourceAddress': {key: 'src', type:'String', len:null,  discription: 'Identifies the source that an event refers to in an IP network. The format is an IPv4 address. Example: “192.168.10.1”.'},
+        'startTime': {key: 'start', type:'String', len:null,  discription: 'The time when the activity the event referred to started. The format is MMM dd yyyy HH:mm:ss or milliseconds since epoch (Jan 1st 1970)'},
+        'sourceUserId': {key: 'suid', type:'String', len:1023,  discription: 'Identifies the source user by ID. This is the user associated with the source of the event. For example, in UNIX, the root user is generally associated with user ID 0.'},
+        'sourceUserName': {key: 'suser', type:'String', len:1023,  discription: 'Identifies the source user by name. Email addresses are also mapped into the UserName fields. The sender is a candidate to put into this field.'},
+        'type': {key: 'type', type:'Number', len:null,  discription: '0 means base event, 1 means aggregated, 2 means correlation, and 3 means action. This field can be omitted for base events (type 0).'},
+        'agentDnsDomain': {key: 'agentDns Domain', type:'String', len:255,  discription: 'The DNS domain name of the ArcSight connector that processed the event.'},
+        'agentNtDomain': {key: 'agentNtDomain', type:'String', len:255,  discription: ''},
+        'agentTranslatedAddress': {key: 'agentTranslated Address', type:'String', len:null,  discription: ''},
+        'agentTranslatedZone ExternalID': {key: 'agentTranslated ZoneExternalID', type:'String', len:200,  discription: ''},
+        'agentTranslatedZoneURI': {key: 'agentTranslated Zone URI', type:'String', len:2048,  discription: ''},
+        'agentZoneExternalID': {key: 'agentZone ExternalID', type:'String', len:200,  discription: ''},
+        'agentZoneURI': {key: 'agentZoneURI', type:'String', len:2048,  discription: ''},
+        'agentAddress': {key: 'agt', type:'String', len:null,  discription: 'The IP address of the ArcSight connector that processed the event.'},
+        'agentHostName': {key: 'ahost', type:'String', len:1023,  discription: 'The hostname of the ArcSight connector that processed the event.'},
+        'agentId': {key: 'aid', type:'String', len:40,  discription: 'The agent ID of the ArcSight connector that processed the event.'},
+        'agentMacAddress': {key: 'amac', type:'String', len:null,  discription: 'The MAC address of the ArcSight connector that processed the event.'},
+        'agentReceiptTime': {key: 'art', type:'String', len:null,  discription: 'The time at which information about the event was received by the ArcSight connector.'},
+        'agentType': {key: 'at', type:'String', len:63,  discription: 'The agent type of the ArcSight connector that processed the event'},
+        'agentTimeZone': {key: 'atz', type:'String', len:255,  discription: 'The agent time zone of the ArcSight connector that processed the event.'},
+        'agentVersion': {key: 'av', type:'String', len:31,  discription: 'The version of the ArcSight connector that processed the event.'},
+        'customerExternalID': {key: 'customer ExternalID', type:'String', len:200,  discription: ''},
+        'customerURI': {key: 'customerURI', type:'String', len:2048,  discription: ''},
+        'destinationTranslated ZoneExternalID': {key: 'destination TranslatedZone ExternalID', type:'String', len:200,  discription: ''},
+        'destinationTranslated ZoneURI': {key: 'destination Translated ZoneURI', type:'String', len:2048,  discription: 'The URI for the Translated Zone that the destination asset has been assigned to in ArcSight.'},
+        'destinationZoneExternalID': {key: 'destinationZone ExternalID', type:'String', len:200,  discription: ''},
+        'destinationZoneURI': {key: 'destinationZone URI', type:'String', len:2048,  discription: 'The URI for the Zone that the destination asset has been assigned to in ArcSight.'},
+        'deviceTranslatedZone ExternalID': {key: 'device TranslatedZone ExternalID', type:'String', len:200,  discription: ''},
+        'deviceTranslatedZoneURI': {key: 'device TranslatedZone URI', type:'String', len:2048,  discription: 'The URI for the Translated Zone that the device asset has been assigned to in ArcSight.'},
+        'deviceZoneExternalID': {key: 'deviceZone ExternalID', type:'String', len:200,  discription: ''},
+        'deviceZoneURI': {key: 'deviceZoneURI', type:'String', len:2048,  discription: 'Thee URI for the Zone that the device asset has been assigned to in ArcSight.'},
+        'destinationGeoLatitude': {key: 'dlat', type:'Number', len:null,  discription: 'The latitudinal value from which the destination’s IP address belongs.'},
+        'destinationGeoLongitude': {key: 'dlong', type:'Number', len:null,  discription: 'The longitudinal value from which the destination’s IP address belongs.'},
+        'eventId': {key: 'eventId', type:'Number', len:null,  discription: 'This is a unique ID that ArcSight assigns to each event.'},
+        'rawEvent': {key: 'rawEvent', type:'String', len:4000,  discription: ''},
+        'sourceGeoLatitude': {key: 'slat', type:'Number', len:null,  discription: ''},
+        'sourceGeoLongitude': {key: 'slong', type:'Number', len:null,  discription: ''},
+        'sourceTranslatedZone ExternalID': {key: 'source TranslatedZone ExternalID', type:'String', len:200,  discription: ''},
+        'sourceTranslatedZoneURI': {key: 'source TranslatedZone URI', type:'String', len:2048,  discription: 'The URI for the Translated Zone that the destination asset has been assigned to in ArcSight.'},
+        'sourceZoneExternalID': {key: 'sourceZone ExternalID', type:'String', len:200,  discription: ''},
+        'sourceZoneURI': {key: 'sourceZoneURI', type:'String', len:2048,  discription: 'The URI for the Zone that the source asset has been assigned to in ArcSight.'},
+      };
+      if (typeof this.deviceVendor !== 'string'
+          || typeof this.deviceProduct !== 'string'
+          || typeof this.deviceVersion !== 'string'
+      ) {
+        reject(new Error('TYPE ERROR: CEF Device Info must be a string'));
+      }
+      if (this.severity
+          && (
+            (
+              typeof this.severity === 'string'
+              && (
+                this.severity !== 'Unknown'
+                && this.severity !== 'Low'
+                && this.severity !== 'Medium'
+                && this.severity !== 'High'
+                && this.severity !== 'Very-High'
+              )
+            )
+            || (
+              typeof this.severity === 'number'
+              && (
+                this.severity < 0
+                || this.severity > 10
+              )
+            )
+          )
+      ) {
+        reject(new Error('TYPE ERROR: CEF Severity not set correctly'));
+      }
+      const cefExts = Object.entries(this.extensions);
+      const cefExtsLen = cefExts.length;
+      for (let ext = 0; ext < cefExtsLen; ext++) {
+        if (cefExts[ext][1] !== null) {
+          if(Extensions[cefExts[ext][0]]) {
+            if (typeof cefExts[ext][1] === Extensions[cefExts[ext][0]]
+                .type
+                .toLowerCase()) {
+              if (Extensions[cefExts[ext][0]].len > 0
+                  && typeof cefExts[ext][1] === 'string'
+                  && cefExts[ext][1].length > Extensions[cefExts[ext][0]].len){
+                let errMsg = 'FORMAT ERROR:';
+                errMsg += ' CEF Extention Key';
+                errMsg += ' ' + cefExts[ext][0];
+                errMsg += ' value length is to long;';
+                errMsg += ' max length is';
+                errMsg += ' ' + Extensions[cefExts[ext][0]].len;
+                reject(new Error(errMsg));
+              }
+            } else {
+              let errMsg = 'TYPE ERROR:';
+              errMsg += ' CEF Key';
+              errMsg += ' ' + cefExts[ext][0];
+              errMsg += ' value type was expected to be';
+              errMsg += ' ' + Extensions[cefExts[ext][0]].type.toLowerCase();
+              reject(new Error(errMsg));
+            }
+          }
+        }
+      }
+      resolve(true);
+    });
+  }
+  /**
+   * Build a CEF formated string
+   * @public
+   * @return {Promise} - String with formated message
+   */    
+  buildMessage () {
+    return new Promise((resolve, reject) => {
+      let fmtMsg = 'CEF:0';
+      fmtMsg += '|' + this.deviceVendor;
+      fmtMsg += '|' + this.deviceProduct;
+      fmtMsg += '|' + this.deviceVersion;
+      fmtMsg += '|' + this.deviceEventClassId;
+      fmtMsg += '|' + this.name;
+      fmtMsg += '|' + this.severity;
+      fmtMsg += '|';
+      
+      const cefExts = Object.entries(this.extensions);
+      const cefExtsLen = cefExts.length;
+      for (let ext = 0; ext < cefExtsLen; ext++) {
+        if (cefExts[ext][1] !== null) {
+          fmtMsg += cefExts[ext][0] + '=' + cefExts[ext][1] + ' ';
+        }
+      }
+      resolve(fmtMsg);
+    });
+  }
+  /**
+   * @public
+   * @param {Syslog} [options=false] - A {@link module:SyslogPro~Syslog|
+   *    Syslog server connection} that should be used to send messages directly 
+   *    from this class. @see SyslogPro~Syslog
+   */
+  send (options) {
+    return new Promise((resolve, reject) => {
+      this.buildMessage()
+        .then((result) => {
+          if (!this.server) {
+            this.server = new Syslog(options);
+          }
+          this.server.send(result)
+            .then((sendResult) => {
+              resolve(sendResult);
+            })
+            .catch((reson) => {
+              reject(reson);
+            });
+        });
+    });
+  }
+}
+ 
+module.exports = {
+  RgbToAnsi: rgbToAnsi,
+  RFC3164: RFC3164,
+  RFC5424:RFC5424,
+  LEEF: LEEF,
+  CEF: CEF,
+  Syslog: Syslog
+};
+
+
+ + + + + + + diff --git a/docs/coverage/lcov-report/prettify.css b/docs/coverage/lcov-report/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/docs/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/docs/coverage/lcov-report/prettify.js b/docs/coverage/lcov-report/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/docs/coverage/lcov-report/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"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"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"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"];var r="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";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="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";var I=[h,"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"];var f=[h,"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"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["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",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/docs/coverage/lcov-report/sort-arrow-sprite.png b/docs/coverage/lcov-report/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..03f704a609c6fd0dbfdac63466a7d7c958b5cbf3 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jii$m5978H@?Fn+^JD|Y9yzj{W`447Gxa{7*dM7nnnD-Lb z6^}Hx2)'; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function (a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function (a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function () { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i =0 ; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function () { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(cols); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/docs/coverage/lcov.info b/docs/coverage/lcov.info new file mode 100644 index 0000000..52db49a --- /dev/null +++ b/docs/coverage/lcov.info @@ -0,0 +1,1346 @@ +TN: +SF:/home/ubuntu/workspace/glue/transport/syslog/index.js +FN:29,rgbToAnsi +FN:30,(anonymous_1) +FN:140,(anonymous_2) +FN:235,(anonymous_3) +FN:236,(anonymous_4) +FN:257,(anonymous_5) +FN:258,(anonymous_6) +FN:264,(anonymous_7) +FN:269,(anonymous_8) +FN:274,(anonymous_9) +FN:287,(anonymous_10) +FN:288,(anonymous_11) +FN:294,(anonymous_12) +FN:300,(anonymous_13) +FN:303,(anonymous_14) +FN:308,(anonymous_15) +FN:311,(anonymous_16) +FN:315,(anonymous_17) +FN:320,(anonymous_18) +FN:333,(anonymous_19) +FN:334,(anonymous_20) +FN:374,(anonymous_21) +FN:377,(anonymous_22) +FN:383,(anonymous_23) +FN:386,(anonymous_24) +FN:390,(anonymous_25) +FN:405,(anonymous_26) +FN:406,(anonymous_27) +FN:414,(anonymous_28) +FN:417,(anonymous_29) +FN:422,(anonymous_30) +FN:425,(anonymous_31) +FN:430,(anonymous_32) +FN:433,(anonymous_33) +FN:495,(anonymous_34) +FN:582,(anonymous_35) +FN:583,(anonymous_36) +FN:587,(anonymous_37) +FN:589,(anonymous_38) +FN:593,(anonymous_39) +FN:603,(anonymous_40) +FN:605,(anonymous_41) +FN:609,(anonymous_42) +FN:619,(anonymous_43) +FN:621,(anonymous_44) +FN:625,(anonymous_45) +FN:635,(anonymous_46) +FN:637,(anonymous_47) +FN:641,(anonymous_48) +FN:651,(anonymous_49) +FN:653,(anonymous_50) +FN:657,(anonymous_51) +FN:667,(anonymous_52) +FN:669,(anonymous_53) +FN:673,(anonymous_54) +FN:683,(anonymous_55) +FN:685,(anonymous_56) +FN:689,(anonymous_57) +FN:699,(anonymous_58) +FN:701,(anonymous_59) +FN:705,(anonymous_60) +FN:714,(anonymous_61) +FN:717,(anonymous_62) +FN:733,(anonymous_63) +FN:734,(anonymous_64) +FN:797,(anonymous_65) +FN:798,(anonymous_66) +FN:803,(anonymous_67) +FN:805,(anonymous_68) +FN:808,(anonymous_69) +FN:812,(anonymous_70) +FN:824,(anonymous_71) +FN:837,(anonymous_72) +FN:847,(anonymous_73) +FN:860,(anonymous_74) +FN:873,(anonymous_75) +FN:883,(anonymous_76) +FN:896,(anonymous_77) +FN:906,(anonymous_78) +FN:919,(anonymous_79) +FN:929,(anonymous_80) +FN:942,(anonymous_81) +FN:952,(anonymous_82) +FN:965,(anonymous_83) +FN:975,(anonymous_84) +FN:985,(anonymous_85) +FN:1050,(anonymous_86) +FN:1172,(anonymous_87) +FN:1173,(anonymous_88) +FN:1177,(anonymous_89) +FN:1179,(anonymous_90) +FN:1183,(anonymous_91) +FN:1193,(anonymous_92) +FN:1195,(anonymous_93) +FN:1199,(anonymous_94) +FN:1209,(anonymous_95) +FN:1211,(anonymous_96) +FN:1215,(anonymous_97) +FN:1225,(anonymous_98) +FN:1227,(anonymous_99) +FN:1231,(anonymous_100) +FN:1241,(anonymous_101) +FN:1243,(anonymous_102) +FN:1247,(anonymous_103) +FN:1257,(anonymous_104) +FN:1259,(anonymous_105) +FN:1263,(anonymous_106) +FN:1273,(anonymous_107) +FN:1275,(anonymous_108) +FN:1279,(anonymous_109) +FN:1289,(anonymous_110) +FN:1291,(anonymous_111) +FN:1295,(anonymous_112) +FN:1304,(anonymous_113) +FN:1307,(anonymous_114) +FN:1332,(anonymous_115) +FN:1333,(anonymous_116) +FN:1463,(anonymous_117) +FN:1464,(anonymous_118) +FN:1469,(anonymous_119) +FN:1471,(anonymous_120) +FN:1474,(anonymous_121) +FN:1478,(anonymous_122) +FN:1490,(anonymous_123) +FN:1503,(anonymous_124) +FN:1513,(anonymous_125) +FN:1526,(anonymous_126) +FN:1539,(anonymous_127) +FN:1549,(anonymous_128) +FN:1562,(anonymous_129) +FN:1572,(anonymous_130) +FN:1585,(anonymous_131) +FN:1595,(anonymous_132) +FN:1608,(anonymous_133) +FN:1618,(anonymous_134) +FN:1631,(anonymous_135) +FN:1641,(anonymous_136) +FN:1651,(anonymous_137) +FN:1688,(anonymous_138) +FN:1766,(anonymous_139) +FN:1767,(anonymous_140) +FN:1794,(anonymous_141) +FN:1795,(anonymous_142) +FN:1797,(anonymous_143) +FN:1802,(anonymous_144) +FN:1805,(anonymous_145) +FN:1844,(anonymous_146) +FN:2035,(anonymous_147) +FN:2036,(anonymous_148) +FN:2263,(anonymous_149) +FN:2264,(anonymous_150) +FN:2290,(anonymous_151) +FN:2291,(anonymous_152) +FN:2293,(anonymous_153) +FN:2298,(anonymous_154) +FN:2301,(anonymous_155) +FNF:156 +FNH:156 +FNDA:57,rgbToAnsi +FNDA:57,(anonymous_1) +FNDA:32,(anonymous_2) +FNDA:7,(anonymous_3) +FNDA:7,(anonymous_4) +FNDA:20,(anonymous_5) +FNDA:20,(anonymous_6) +FNDA:19,(anonymous_7) +FNDA:19,(anonymous_8) +FNDA:1,(anonymous_9) +FNDA:7,(anonymous_10) +FNDA:7,(anonymous_11) +FNDA:6,(anonymous_12) +FNDA:2,(anonymous_13) +FNDA:2,(anonymous_14) +FNDA:2,(anonymous_15) +FNDA:1,(anonymous_16) +FNDA:3,(anonymous_17) +FNDA:1,(anonymous_18) +FNDA:7,(anonymous_19) +FNDA:7,(anonymous_20) +FNDA:3,(anonymous_21) +FNDA:3,(anonymous_22) +FNDA:2,(anonymous_23) +FNDA:1,(anonymous_24) +FNDA:2,(anonymous_25) +FNDA:36,(anonymous_26) +FNDA:36,(anonymous_27) +FNDA:19,(anonymous_28) +FNDA:1,(anonymous_29) +FNDA:2,(anonymous_30) +FNDA:5,(anonymous_31) +FNDA:2,(anonymous_32) +FNDA:5,(anonymous_33) +FNDA:10,(anonymous_34) +FNDA:10,(anonymous_35) +FNDA:10,(anonymous_36) +FNDA:3,(anonymous_37) +FNDA:2,(anonymous_38) +FNDA:1,(anonymous_39) +FNDA:3,(anonymous_40) +FNDA:2,(anonymous_41) +FNDA:1,(anonymous_42) +FNDA:3,(anonymous_43) +FNDA:2,(anonymous_44) +FNDA:1,(anonymous_45) +FNDA:3,(anonymous_46) +FNDA:2,(anonymous_47) +FNDA:1,(anonymous_48) +FNDA:3,(anonymous_49) +FNDA:2,(anonymous_50) +FNDA:1,(anonymous_51) +FNDA:3,(anonymous_52) +FNDA:2,(anonymous_53) +FNDA:1,(anonymous_54) +FNDA:3,(anonymous_55) +FNDA:2,(anonymous_56) +FNDA:1,(anonymous_57) +FNDA:3,(anonymous_58) +FNDA:2,(anonymous_59) +FNDA:1,(anonymous_60) +FNDA:2,(anonymous_61) +FNDA:8,(anonymous_62) +FNDA:14,(anonymous_63) +FNDA:14,(anonymous_64) +FNDA:11,(anonymous_65) +FNDA:11,(anonymous_66) +FNDA:10,(anonymous_67) +FNDA:9,(anonymous_68) +FNDA:1,(anonymous_69) +FNDA:1,(anonymous_70) +FNDA:1,(anonymous_71) +FNDA:1,(anonymous_72) +FNDA:1,(anonymous_73) +FNDA:1,(anonymous_74) +FNDA:1,(anonymous_75) +FNDA:1,(anonymous_76) +FNDA:1,(anonymous_77) +FNDA:1,(anonymous_78) +FNDA:1,(anonymous_79) +FNDA:1,(anonymous_80) +FNDA:1,(anonymous_81) +FNDA:2,(anonymous_82) +FNDA:1,(anonymous_83) +FNDA:1,(anonymous_84) +FNDA:1,(anonymous_85) +FNDA:19,(anonymous_86) +FNDA:10,(anonymous_87) +FNDA:10,(anonymous_88) +FNDA:3,(anonymous_89) +FNDA:2,(anonymous_90) +FNDA:1,(anonymous_91) +FNDA:3,(anonymous_92) +FNDA:2,(anonymous_93) +FNDA:1,(anonymous_94) +FNDA:3,(anonymous_95) +FNDA:2,(anonymous_96) +FNDA:1,(anonymous_97) +FNDA:3,(anonymous_98) +FNDA:2,(anonymous_99) +FNDA:1,(anonymous_100) +FNDA:3,(anonymous_101) +FNDA:2,(anonymous_102) +FNDA:1,(anonymous_103) +FNDA:3,(anonymous_104) +FNDA:2,(anonymous_105) +FNDA:1,(anonymous_106) +FNDA:3,(anonymous_107) +FNDA:2,(anonymous_108) +FNDA:1,(anonymous_109) +FNDA:3,(anonymous_110) +FNDA:2,(anonymous_111) +FNDA:1,(anonymous_112) +FNDA:2,(anonymous_113) +FNDA:8,(anonymous_114) +FNDA:22,(anonymous_115) +FNDA:22,(anonymous_116) +FNDA:11,(anonymous_117) +FNDA:11,(anonymous_118) +FNDA:10,(anonymous_119) +FNDA:9,(anonymous_120) +FNDA:1,(anonymous_121) +FNDA:1,(anonymous_122) +FNDA:1,(anonymous_123) +FNDA:1,(anonymous_124) +FNDA:1,(anonymous_125) +FNDA:1,(anonymous_126) +FNDA:1,(anonymous_127) +FNDA:1,(anonymous_128) +FNDA:1,(anonymous_129) +FNDA:1,(anonymous_130) +FNDA:1,(anonymous_131) +FNDA:1,(anonymous_132) +FNDA:1,(anonymous_133) +FNDA:2,(anonymous_134) +FNDA:1,(anonymous_135) +FNDA:1,(anonymous_136) +FNDA:1,(anonymous_137) +FNDA:6,(anonymous_138) +FNDA:3,(anonymous_139) +FNDA:3,(anonymous_140) +FNDA:3,(anonymous_141) +FNDA:3,(anonymous_142) +FNDA:3,(anonymous_143) +FNDA:2,(anonymous_144) +FNDA:1,(anonymous_145) +FNDA:9,(anonymous_146) +FNDA:5,(anonymous_147) +FNDA:5,(anonymous_148) +FNDA:2,(anonymous_149) +FNDA:2,(anonymous_150) +FNDA:2,(anonymous_151) +FNDA:2,(anonymous_152) +FNDA:2,(anonymous_153) +FNDA:1,(anonymous_154) +FNDA:1,(anonymous_155) +DA:15,1 +DA:16,1 +DA:17,1 +DA:18,1 +DA:19,1 +DA:30,57 +DA:31,57 +DA:33,57 +DA:34,57 +DA:35,41 +DA:36,34 +DA:37,1 +DA:38,33 +DA:39,32 +DA:41,1 +DA:44,7 +DA:45,7 +DA:46,7 +DA:47,7 +DA:48,4 +DA:50,3 +DA:51,1 +DA:52,2 +DA:53,1 +DA:55,1 +DA:58,1 +DA:64,3 +DA:65,3 +DA:66,3 +DA:67,3 +DA:68,3 +DA:69,3 +DA:70,3 +DA:71,1 +DA:75,3 +DA:76,1 +DA:80,41 +DA:81,41 +DA:83,16 +DA:84,16 +DA:141,32 +DA:142,32 +DA:143,6 +DA:147,32 +DA:149,32 +DA:150,32 +DA:152,32 +DA:154,32 +DA:155,32 +DA:158,6 +DA:161,26 +DA:163,32 +DA:165,3 +DA:167,32 +DA:169,3 +DA:172,32 +DA:174,4 +DA:176,28 +DA:178,32 +DA:179,2 +DA:181,1 +DA:183,1 +DA:186,32 +DA:187,2 +DA:189,1 +DA:191,1 +DA:194,32 +DA:195,2 +DA:197,1 +DA:199,1 +DA:202,32 +DA:203,2 +DA:205,1 +DA:207,1 +DA:210,32 +DA:211,1 +DA:213,32 +DA:214,1 +DA:216,32 +DA:217,1 +DA:219,32 +DA:220,1 +DA:236,7 +DA:237,7 +DA:239,5 +DA:240,2 +DA:241,1 +DA:243,1 +DA:244,1 +DA:245,1 +DA:247,7 +DA:258,20 +DA:259,20 +DA:260,20 +DA:263,20 +DA:265,19 +DA:266,19 +DA:268,19 +DA:269,19 +DA:270,19 +DA:271,19 +DA:275,1 +DA:288,7 +DA:289,7 +DA:290,7 +DA:293,7 +DA:295,6 +DA:300,6 +DA:302,2 +DA:303,2 +DA:304,2 +DA:307,6 +DA:308,6 +DA:309,2 +DA:311,6 +DA:312,1 +DA:313,1 +DA:315,6 +DA:316,3 +DA:317,3 +DA:321,1 +DA:334,7 +DA:335,7 +DA:336,7 +DA:341,7 +DA:343,1 +DA:344,1 +DA:345,6 +DA:347,1 +DA:348,1 +DA:349,1 +DA:350,1 +DA:351,5 +DA:353,1 +DA:354,1 +DA:355,1 +DA:356,1 +DA:359,5 +DA:360,5 +DA:361,4 +DA:362,4 +DA:363,4 +DA:364,1 +DA:365,1 +DA:366,1 +DA:368,4 +DA:369,3 +DA:371,3 +DA:372,3 +DA:374,4 +DA:376,3 +DA:377,3 +DA:378,3 +DA:381,4 +DA:383,4 +DA:384,2 +DA:386,4 +DA:387,1 +DA:388,1 +DA:390,4 +DA:391,2 +DA:392,2 +DA:406,36 +DA:407,36 +DA:408,1 +DA:409,1 +DA:411,35 +DA:412,35 +DA:413,20 +DA:415,19 +DA:418,1 +DA:420,15 +DA:421,7 +DA:423,2 +DA:426,5 +DA:428,8 +DA:429,7 +DA:431,2 +DA:434,5 +DA:437,1 +DA:438,1 +DA:439,1 +DA:497,10 +DA:498,10 +DA:499,10 +DA:500,10 +DA:501,10 +DA:502,10 +DA:504,1 +DA:506,9 +DA:508,10 +DA:510,1 +DA:512,9 +DA:514,10 +DA:515,2 +DA:517,1 +DA:519,1 +DA:522,10 +DA:524,1 +DA:526,1 +DA:528,1 +DA:530,1 +DA:532,1 +DA:534,1 +DA:536,1 +DA:538,1 +DA:540,9 +DA:541,9 +DA:542,9 +DA:543,9 +DA:544,9 +DA:545,9 +DA:546,9 +DA:547,9 +DA:549,10 +DA:550,1 +DA:583,10 +DA:584,10 +DA:585,10 +DA:586,3 +DA:588,3 +DA:590,2 +DA:591,2 +DA:594,1 +DA:595,1 +DA:596,1 +DA:597,1 +DA:601,10 +DA:602,3 +DA:604,3 +DA:606,2 +DA:607,2 +DA:610,1 +DA:611,1 +DA:612,1 +DA:613,1 +DA:617,10 +DA:618,3 +DA:620,3 +DA:622,2 +DA:623,2 +DA:626,1 +DA:627,1 +DA:628,1 +DA:629,1 +DA:633,10 +DA:634,3 +DA:636,3 +DA:638,2 +DA:639,2 +DA:642,1 +DA:643,1 +DA:644,1 +DA:645,1 +DA:649,10 +DA:650,3 +DA:652,3 +DA:654,2 +DA:655,2 +DA:658,1 +DA:659,1 +DA:660,1 +DA:661,1 +DA:665,10 +DA:666,3 +DA:668,3 +DA:670,2 +DA:671,2 +DA:674,1 +DA:675,1 +DA:676,1 +DA:677,1 +DA:681,10 +DA:682,3 +DA:684,3 +DA:686,2 +DA:687,2 +DA:690,1 +DA:691,1 +DA:692,1 +DA:693,1 +DA:697,10 +DA:698,3 +DA:700,3 +DA:702,2 +DA:703,2 +DA:706,1 +DA:707,1 +DA:708,1 +DA:709,1 +DA:713,10 +DA:715,2 +DA:718,8 +DA:734,14 +DA:735,14 +DA:736,14 +DA:738,14 +DA:739,1 +DA:740,1 +DA:741,1 +DA:742,1 +DA:744,13 +DA:745,13 +DA:746,13 +DA:747,13 +DA:748,13 +DA:750,13 +DA:752,13 +DA:754,13 +DA:755,3 +DA:756,3 +DA:757,3 +DA:758,1 +DA:760,3 +DA:761,2 +DA:762,2 +DA:764,1 +DA:766,3 +DA:770,13 +DA:771,13 +DA:775,13 +DA:776,13 +DA:777,13 +DA:778,13 +DA:779,13 +DA:780,13 +DA:781,13 +DA:798,11 +DA:799,11 +DA:800,2 +DA:802,11 +DA:804,10 +DA:806,9 +DA:809,1 +DA:813,1 +DA:825,1 +DA:838,1 +DA:848,1 +DA:861,1 +DA:874,1 +DA:884,1 +DA:897,1 +DA:907,1 +DA:920,1 +DA:930,1 +DA:943,1 +DA:953,2 +DA:966,1 +DA:976,1 +DA:986,1 +DA:1052,19 +DA:1053,19 +DA:1054,19 +DA:1055,19 +DA:1056,19 +DA:1058,18 +DA:1060,1 +DA:1062,19 +DA:1064,5 +DA:1066,14 +DA:1068,19 +DA:1070,13 +DA:1072,6 +DA:1074,19 +DA:1076,5 +DA:1078,14 +DA:1080,19 +DA:1082,2 +DA:1084,17 +DA:1086,19 +DA:1088,18 +DA:1090,1 +DA:1092,19 +DA:1094,4 +DA:1096,15 +DA:1098,19 +DA:1100,2 +DA:1102,17 +DA:1104,19 +DA:1105,2 +DA:1107,1 +DA:1109,1 +DA:1112,19 +DA:1114,2 +DA:1116,2 +DA:1118,2 +DA:1120,2 +DA:1122,2 +DA:1124,2 +DA:1126,2 +DA:1128,2 +DA:1130,17 +DA:1131,17 +DA:1132,17 +DA:1133,17 +DA:1134,17 +DA:1135,17 +DA:1136,17 +DA:1137,17 +DA:1139,19 +DA:1140,1 +DA:1173,10 +DA:1174,10 +DA:1175,10 +DA:1176,3 +DA:1178,3 +DA:1180,2 +DA:1181,2 +DA:1184,1 +DA:1185,1 +DA:1186,1 +DA:1187,1 +DA:1191,10 +DA:1192,3 +DA:1194,3 +DA:1196,2 +DA:1197,2 +DA:1200,1 +DA:1201,1 +DA:1202,1 +DA:1203,1 +DA:1207,10 +DA:1208,3 +DA:1210,3 +DA:1212,2 +DA:1213,2 +DA:1216,1 +DA:1217,1 +DA:1218,1 +DA:1219,1 +DA:1223,10 +DA:1224,3 +DA:1226,3 +DA:1228,2 +DA:1229,2 +DA:1232,1 +DA:1233,1 +DA:1234,1 +DA:1235,1 +DA:1239,10 +DA:1240,3 +DA:1242,3 +DA:1244,2 +DA:1245,2 +DA:1248,1 +DA:1249,1 +DA:1250,1 +DA:1251,1 +DA:1255,10 +DA:1256,3 +DA:1258,3 +DA:1260,2 +DA:1261,2 +DA:1264,1 +DA:1265,1 +DA:1266,1 +DA:1267,1 +DA:1271,10 +DA:1272,3 +DA:1274,3 +DA:1276,2 +DA:1277,2 +DA:1280,1 +DA:1281,1 +DA:1282,1 +DA:1283,1 +DA:1287,10 +DA:1288,3 +DA:1290,3 +DA:1292,2 +DA:1293,2 +DA:1296,1 +DA:1297,1 +DA:1298,1 +DA:1299,1 +DA:1303,10 +DA:1305,2 +DA:1308,8 +DA:1333,22 +DA:1334,22 +DA:1335,22 +DA:1337,22 +DA:1338,1 +DA:1339,1 +DA:1340,1 +DA:1341,1 +DA:1343,21 +DA:1344,21 +DA:1345,21 +DA:1346,21 +DA:1347,21 +DA:1348,21 +DA:1349,21 +DA:1350,21 +DA:1351,21 +DA:1353,21 +DA:1355,21 +DA:1357,21 +DA:1358,5 +DA:1359,5 +DA:1360,5 +DA:1361,2 +DA:1363,5 +DA:1364,4 +DA:1365,4 +DA:1367,1 +DA:1369,5 +DA:1372,21 +DA:1373,21 +DA:1374,20 +DA:1375,20 +DA:1376,5 +DA:1377,5 +DA:1378,3 +DA:1379,1 +DA:1381,2 +DA:1384,2 +DA:1385,1 +DA:1387,1 +DA:1391,15 +DA:1392,13 +DA:1393,13 +DA:1394,1 +DA:1395,1 +DA:1396,1 +DA:1398,12 +DA:1401,2 +DA:1402,2 +DA:1403,1 +DA:1404,1 +DA:1405,1 +DA:1407,1 +DA:1411,20 +DA:1412,20 +DA:1415,21 +DA:1416,21 +DA:1417,21 +DA:1418,2 +DA:1419,2 +DA:1420,2 +DA:1422,2 +DA:1426,4 +DA:1428,4 +DA:1429,3 +DA:1430,3 +DA:1433,2 +DA:1436,21 +DA:1437,21 +DA:1438,21 +DA:1439,21 +DA:1440,21 +DA:1441,21 +DA:1442,21 +DA:1443,21 +DA:1444,21 +DA:1445,20 +DA:1447,1 +DA:1449,21 +DA:1450,21 +DA:1464,11 +DA:1465,11 +DA:1466,2 +DA:1468,11 +DA:1470,10 +DA:1472,9 +DA:1475,1 +DA:1479,1 +DA:1491,1 +DA:1504,1 +DA:1514,1 +DA:1527,1 +DA:1540,1 +DA:1550,1 +DA:1563,1 +DA:1573,1 +DA:1586,1 +DA:1596,1 +DA:1609,1 +DA:1619,2 +DA:1632,1 +DA:1642,1 +DA:1652,1 +DA:1690,6 +DA:1691,6 +DA:1693,6 +DA:1695,6 +DA:1697,6 +DA:1699,6 +DA:1701,6 +DA:1704,6 +DA:1752,6 +DA:1753,2 +DA:1755,1 +DA:1757,1 +DA:1767,3 +DA:1768,3 +DA:1769,3 +DA:1770,3 +DA:1771,3 +DA:1772,3 +DA:1773,3 +DA:1776,3 +DA:1777,3 +DA:1778,3 +DA:1779,3 +DA:1780,93 +DA:1781,1 +DA:1784,3 +DA:1795,3 +DA:1796,3 +DA:1798,3 +DA:1799,1 +DA:1801,3 +DA:1803,2 +DA:1806,1 +DA:1846,9 +DA:1847,9 +DA:1849,9 +DA:1851,9 +DA:1853,9 +DA:1855,9 +DA:1857,9 +DA:1859,9 +DA:1861,9 +DA:2020,9 +DA:2021,2 +DA:2023,1 +DA:2025,1 +DA:2036,5 +DA:2037,5 +DA:2196,5 +DA:2200,1 +DA:2202,5 +DA:2223,1 +DA:2225,5 +DA:2226,5 +DA:2227,5 +DA:2228,318 +DA:2229,4 +DA:2230,3 +DA:2233,2 +DA:2236,1 +DA:2237,1 +DA:2238,1 +DA:2239,1 +DA:2240,1 +DA:2241,1 +DA:2242,1 +DA:2245,1 +DA:2246,1 +DA:2247,1 +DA:2248,1 +DA:2249,1 +DA:2250,1 +DA:2255,5 +DA:2264,2 +DA:2265,2 +DA:2266,2 +DA:2267,2 +DA:2268,2 +DA:2269,2 +DA:2270,2 +DA:2271,2 +DA:2272,2 +DA:2274,2 +DA:2275,2 +DA:2276,2 +DA:2277,158 +DA:2278,1 +DA:2281,2 +DA:2291,2 +DA:2292,2 +DA:2294,2 +DA:2295,1 +DA:2297,2 +DA:2299,1 +DA:2302,1 +DA:2309,1 +LF:678 +LH:678 +BRDA:34,0,0,41 +BRDA:34,0,1,16 +BRDA:34,1,0,57 +BRDA:34,1,1,50 +BRDA:35,2,0,34 +BRDA:35,2,1,7 +BRDA:36,3,0,1 +BRDA:36,3,1,33 +BRDA:36,4,0,34 +BRDA:36,4,1,2 +BRDA:38,5,0,32 +BRDA:38,5,1,1 +BRDA:38,6,0,33 +BRDA:38,6,1,33 +BRDA:38,6,2,1 +BRDA:38,6,3,1 +BRDA:47,7,0,4 +BRDA:47,7,1,3 +BRDA:48,8,0,3 +BRDA:48,8,1,1 +BRDA:48,9,0,4 +BRDA:48,9,1,3 +BRDA:50,10,0,1 +BRDA:50,10,1,2 +BRDA:52,11,0,1 +BRDA:52,11,1,1 +BRDA:70,12,0,1 +BRDA:70,12,1,2 +BRDA:75,13,0,1 +BRDA:75,13,1,2 +BRDA:142,14,0,6 +BRDA:142,14,1,26 +BRDA:147,15,0,32 +BRDA:147,15,1,22 +BRDA:149,16,0,32 +BRDA:149,16,1,13 +BRDA:152,17,0,32 +BRDA:152,17,1,14 +BRDA:154,18,0,32 +BRDA:154,18,1,26 +BRDA:155,19,0,6 +BRDA:155,19,1,26 +BRDA:155,20,0,32 +BRDA:155,20,1,5 +BRDA:155,20,2,27 +BRDA:163,21,0,3 +BRDA:163,21,1,29 +BRDA:167,22,0,3 +BRDA:167,22,1,29 +BRDA:172,23,0,4 +BRDA:172,23,1,28 +BRDA:176,24,0,28 +BRDA:176,24,1,28 +BRDA:178,25,0,2 +BRDA:178,25,1,30 +BRDA:179,26,0,1 +BRDA:179,26,1,1 +BRDA:186,27,0,2 +BRDA:186,27,1,30 +BRDA:187,28,0,1 +BRDA:187,28,1,1 +BRDA:194,29,0,2 +BRDA:194,29,1,30 +BRDA:195,30,0,1 +BRDA:195,30,1,1 +BRDA:202,31,0,2 +BRDA:202,31,1,30 +BRDA:203,32,0,1 +BRDA:203,32,1,1 +BRDA:210,33,0,1 +BRDA:210,33,1,31 +BRDA:210,34,0,32 +BRDA:210,34,1,1 +BRDA:213,35,0,1 +BRDA:213,35,1,31 +BRDA:213,36,0,32 +BRDA:213,36,1,1 +BRDA:216,37,0,1 +BRDA:216,37,1,31 +BRDA:216,38,0,32 +BRDA:216,38,1,1 +BRDA:219,39,0,1 +BRDA:219,39,1,31 +BRDA:219,40,0,32 +BRDA:219,40,1,1 +BRDA:237,41,0,5 +BRDA:237,41,1,2 +BRDA:237,42,0,7 +BRDA:237,42,1,5 +BRDA:240,43,0,1 +BRDA:240,43,1,1 +BRDA:265,44,0,1 +BRDA:265,44,1,18 +BRDA:341,45,0,1 +BRDA:341,45,1,6 +BRDA:341,46,0,7 +BRDA:341,46,1,2 +BRDA:345,47,0,1 +BRDA:345,47,1,5 +BRDA:345,48,0,6 +BRDA:345,48,1,5 +BRDA:351,49,0,1 +BRDA:351,49,1,4 +BRDA:351,50,0,5 +BRDA:351,50,1,5 +BRDA:360,51,0,4 +BRDA:360,51,1,1 +BRDA:363,52,0,1 +BRDA:363,52,1,3 +BRDA:407,53,0,1 +BRDA:407,53,1,35 +BRDA:412,54,0,20 +BRDA:412,54,1,15 +BRDA:420,55,0,7 +BRDA:420,55,1,8 +BRDA:428,56,0,7 +BRDA:428,56,1,1 +BRDA:498,57,0,10 +BRDA:498,57,1,6 +BRDA:499,58,0,10 +BRDA:499,58,1,10 +BRDA:500,59,0,10 +BRDA:500,59,1,10 +BRDA:501,60,0,10 +BRDA:501,60,1,10 +BRDA:502,61,0,1 +BRDA:502,61,1,9 +BRDA:508,62,0,1 +BRDA:508,62,1,9 +BRDA:514,63,0,2 +BRDA:514,63,1,8 +BRDA:515,64,0,1 +BRDA:515,64,1,1 +BRDA:522,65,0,1 +BRDA:522,65,1,9 +BRDA:549,66,0,1 +BRDA:549,66,1,9 +BRDA:585,67,0,3 +BRDA:585,67,1,7 +BRDA:601,68,0,3 +BRDA:601,68,1,7 +BRDA:617,69,0,3 +BRDA:617,69,1,7 +BRDA:633,70,0,3 +BRDA:633,70,1,7 +BRDA:649,71,0,3 +BRDA:649,71,1,7 +BRDA:665,72,0,3 +BRDA:665,72,1,7 +BRDA:681,73,0,3 +BRDA:681,73,1,7 +BRDA:697,74,0,3 +BRDA:697,74,1,7 +BRDA:735,75,0,14 +BRDA:735,75,1,2 +BRDA:736,76,0,9 +BRDA:736,76,1,5 +BRDA:738,77,0,1 +BRDA:738,77,1,13 +BRDA:738,78,0,14 +BRDA:738,78,1,13 +BRDA:754,79,0,3 +BRDA:754,79,1,10 +BRDA:755,80,0,3 +BRDA:755,80,1,1 +BRDA:757,81,0,1 +BRDA:757,81,1,2 +BRDA:760,82,0,2 +BRDA:760,82,1,1 +BRDA:799,83,0,2 +BRDA:799,83,1,9 +BRDA:1053,84,0,19 +BRDA:1053,84,1,6 +BRDA:1054,85,0,19 +BRDA:1054,85,1,19 +BRDA:1055,86,0,19 +BRDA:1055,86,1,19 +BRDA:1056,87,0,18 +BRDA:1056,87,1,1 +BRDA:1056,88,0,19 +BRDA:1056,88,1,9 +BRDA:1062,89,0,5 +BRDA:1062,89,1,14 +BRDA:1068,90,0,13 +BRDA:1068,90,1,6 +BRDA:1068,91,0,19 +BRDA:1068,91,1,10 +BRDA:1074,92,0,5 +BRDA:1074,92,1,14 +BRDA:1080,93,0,2 +BRDA:1080,93,1,17 +BRDA:1086,94,0,18 +BRDA:1086,94,1,1 +BRDA:1086,95,0,19 +BRDA:1086,95,1,1 +BRDA:1092,96,0,4 +BRDA:1092,96,1,15 +BRDA:1098,97,0,2 +BRDA:1098,97,1,17 +BRDA:1104,98,0,2 +BRDA:1104,98,1,17 +BRDA:1105,99,0,1 +BRDA:1105,99,1,1 +BRDA:1112,100,0,2 +BRDA:1112,100,1,17 +BRDA:1139,101,0,1 +BRDA:1139,101,1,18 +BRDA:1175,102,0,3 +BRDA:1175,102,1,7 +BRDA:1191,103,0,3 +BRDA:1191,103,1,7 +BRDA:1207,104,0,3 +BRDA:1207,104,1,7 +BRDA:1223,105,0,3 +BRDA:1223,105,1,7 +BRDA:1239,106,0,3 +BRDA:1239,106,1,7 +BRDA:1255,107,0,3 +BRDA:1255,107,1,7 +BRDA:1271,108,0,3 +BRDA:1271,108,1,7 +BRDA:1287,109,0,3 +BRDA:1287,109,1,7 +BRDA:1334,110,0,22 +BRDA:1334,110,1,9 +BRDA:1335,111,0,9 +BRDA:1335,111,1,13 +BRDA:1337,112,0,1 +BRDA:1337,112,1,21 +BRDA:1337,113,0,22 +BRDA:1337,113,1,21 +BRDA:1343,114,0,21 +BRDA:1343,114,1,21 +BRDA:1344,115,0,21 +BRDA:1344,115,1,21 +BRDA:1345,116,0,21 +BRDA:1345,116,1,21 +BRDA:1346,117,0,21 +BRDA:1346,117,1,20 +BRDA:1357,118,0,5 +BRDA:1357,118,1,16 +BRDA:1358,119,0,5 +BRDA:1358,119,1,1 +BRDA:1360,120,0,2 +BRDA:1360,120,1,3 +BRDA:1363,121,0,4 +BRDA:1363,121,1,1 +BRDA:1373,122,0,20 +BRDA:1373,122,1,1 +BRDA:1375,123,0,5 +BRDA:1375,123,1,15 +BRDA:1377,124,0,3 +BRDA:1377,124,1,2 +BRDA:1378,125,0,1 +BRDA:1378,125,1,2 +BRDA:1384,126,0,1 +BRDA:1384,126,1,1 +BRDA:1391,127,0,13 +BRDA:1391,127,1,2 +BRDA:1393,128,0,1 +BRDA:1393,128,1,12 +BRDA:1402,129,0,1 +BRDA:1402,129,1,1 +BRDA:1417,130,0,2 +BRDA:1417,130,1,19 +BRDA:1417,131,0,21 +BRDA:1417,131,1,2 +BRDA:1428,132,0,3 +BRDA:1428,132,1,1 +BRDA:1444,133,0,20 +BRDA:1444,133,1,1 +BRDA:1465,134,0,2 +BRDA:1465,134,1,9 +BRDA:1691,135,0,6 +BRDA:1691,135,1,3 +BRDA:1693,136,0,6 +BRDA:1693,136,1,5 +BRDA:1695,137,0,6 +BRDA:1695,137,1,5 +BRDA:1697,138,0,6 +BRDA:1697,138,1,5 +BRDA:1699,139,0,6 +BRDA:1699,139,1,5 +BRDA:1701,140,0,1 +BRDA:1701,140,1,5 +BRDA:1704,141,0,6 +BRDA:1704,141,1,5 +BRDA:1752,142,0,2 +BRDA:1752,142,1,4 +BRDA:1753,143,0,1 +BRDA:1753,143,1,1 +BRDA:1780,144,0,1 +BRDA:1780,144,1,92 +BRDA:1798,145,0,1 +BRDA:1798,145,1,2 +BRDA:1847,146,0,9 +BRDA:1847,146,1,4 +BRDA:1849,147,0,9 +BRDA:1849,147,1,9 +BRDA:1851,148,0,9 +BRDA:1851,148,1,9 +BRDA:1853,149,0,9 +BRDA:1853,149,1,9 +BRDA:1855,150,0,9 +BRDA:1855,150,1,9 +BRDA:1857,151,0,9 +BRDA:1857,151,1,9 +BRDA:1859,152,0,9 +BRDA:1859,152,1,8 +BRDA:1861,153,0,9 +BRDA:1861,153,1,6 +BRDA:2020,154,0,2 +BRDA:2020,154,1,7 +BRDA:2021,155,0,1 +BRDA:2021,155,1,1 +BRDA:2196,156,0,1 +BRDA:2196,156,1,4 +BRDA:2196,157,0,5 +BRDA:2196,157,1,5 +BRDA:2196,157,2,4 +BRDA:2202,158,0,1 +BRDA:2202,158,1,4 +BRDA:2202,159,0,5 +BRDA:2202,159,1,5 +BRDA:2202,159,2,4 +BRDA:2202,159,3,1 +BRDA:2202,159,4,1 +BRDA:2202,159,5,1 +BRDA:2202,159,6,1 +BRDA:2202,159,7,4 +BRDA:2202,159,8,1 +BRDA:2202,159,9,1 +BRDA:2228,160,0,4 +BRDA:2228,160,1,314 +BRDA:2229,161,0,3 +BRDA:2229,161,1,1 +BRDA:2230,162,0,2 +BRDA:2230,162,1,1 +BRDA:2233,163,0,1 +BRDA:2233,163,1,1 +BRDA:2233,164,0,2 +BRDA:2233,164,1,2 +BRDA:2233,164,2,2 +BRDA:2277,165,0,1 +BRDA:2277,165,1,157 +BRDA:2294,166,0,1 +BRDA:2294,166,1,1 +BRF:347 +BRH:347 +end_of_record diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..9520683 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,161 @@ + + + + + + Home - Documentation + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+

SyslogPro

A pure Javascript Syslog module with support for RFC3164, RFC5424, IBM LEEF +(Log Event Extended Format), and HP CEF (Common Event Format) formatted +messages. SyslogPro has transport options of UDP, TCP, and TLS. TLS includes +support for Server and Client certificate authrization. For unformatedm and +RFC messages there is support for Basic and Extended ANSI coloring. RFC5424 +Strucutred Data is also encluded in the module. All 28 standard CEF Extentions +are included in the defualt CEF class. All 45 standard LEEF Atrabutes are +included in the defualt LEEF class. It is the goal of this project is for every +relase to offer full code covrage unit testing and documentation. Please see +the full documation for usage and options.

+

Installation

npm install SyslogPro

+

Usage

const SyslogPro = require('syslogpro');
+
+let syslog = new SyslogPro.Syslog({
+  target: 'localhost',
+  protocol: 'udp',
+  format: 'rfc5424'
+});
+
+syslog.rfc5424.info('My Message');
+
+// Optionaly you can create each class or class options to pass to SyslogPro
+// to create formated messages or use directly
+
+let rfc3164 = new SyslogPro.RFC3164({
+  applacationName: 'MyApp',
+  color: true,
+  extendedColor: true,
+  server: {
+    target: 'myServer.fqdn'
+  }
+});
+
+rfc3164.info('My Message');
+
+let rfc5424 = new SyslogPro.RFC5424({
+  applacationName: 'MyApp',
+  timestamp: true,
+  encludeStructuredData: true
+  color: true,
+  extendedColor: true,
+  server: {
+    target: 'myServer.fqdn'
+  }
+});
+
+rfc5424.info('My Message');
+
+let leef = new SyslogPro.LEEF({
+  vendor: 'acme',
+  product: 'doohickey1000',
+  version: 'alpha',
+  eventId: 'hack',
+  attrabutes: {
+    cat: 'CC Databreach'
+  },
+  server: {
+    target: 'myServer.fqdn'
+  }
+})
+    .send()
+        .then((result) => {})
+        .catch((error) => {
+          console.log(error);
+        });
+
+let cef = new SyslogPro.CEF({
+  deviceVendor: 'acme',
+  deviceProduct: 'doohickey1000',
+  deviceVersion: 'alpha',
+  deviceEventClassId: 'hack',
+  name: 'My Reporting Service',
+  severity: 'High',
+  extensions: {
+    rawEvent: 'CC Databreach'
+  },
+  server: {
+    target: 'myServer.fqdn'
+  }
+})
+    .send()
+        .then((result) => {})
+        .catch((error) => {
+          console.log(error);
+        });

Tests

npm test

+

Contributing

Please try to stay close to the Google JS Style Guid, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

+
+ + + + + + + + +
+ +
+ +
+ Documentation generated by JSDoc 3.5.5 on Mon Sep 24 2018 06:41:35 GMT+0000 (Coordinated Universal Time) using the docdash theme. +
+ + + + + + + \ No newline at end of file diff --git a/docs/index.js.html b/docs/index.js.html new file mode 100644 index 0000000..629bd2d --- /dev/null +++ b/docs/index.js.html @@ -0,0 +1,2384 @@ + + + + + + index.js - Documentation + + + + + + + + + + + + + + + + + + +
+ +

index.js

+ + + + + + + +
+
+
/** Copyright (c) 2018 Craig Yamato */
+
+/**
+ * @fileoverview The SyslogPro class for sending syslog messages
+ * @author Craig Yamato <craig@kentik.com>
+ * @copyright (c) 2018 - Craig Yamato
+ * @version 0.0.0
+ * @since 0.0.0
+ * @exports Syslog
+ * @exports LEEF
+ * @exports CEF
+ * @module SyslogPro
+ */
+"use strict";
+const moment = require('moment');
+const os = require("os");
+const dns = require('dns');
+let dnsPromises = dns.promises;
+const fs = require("fs");
+
+/**
+ * Format the ANSI foreground color code from a RGB hex code or ANSI color code
+ * @private
+ * @param {string} hex - The color hex code in the form of #FFFFFF or Number of
+ *     the ANSI color code (30-37 Standard & 0-255 Extended)
+ * @returns {Promise} - The formated ANSI color code
+ * @throws {Error} - A Format Error
+ */
+function rgbToAnsi (hex, extendedColor) {
+  return new Promise((resolve, reject) => {
+    let colorCode = 0;  // Var to hold color code
+    // Break HEX Code up into RGB
+    const hexParts = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
+    if (hexParts || typeof hex === 'number') {
+      if (typeof hex === 'number') {
+        if (extendedColor && hex < 256) {
+          resolve(hex);
+        } else if ((hex > 29 && hex < 38) || (hex > 89 && hex < 98)) {
+          resolve(hex);
+        } else {
+          reject (new Error('FORMAT ERROR: Color code not in range')); 
+        }
+      } else {
+        const r = parseInt(hexParts[1], 16);
+        const g = parseInt(hexParts[2], 16);
+        const b = parseInt(hexParts[3], 16);
+        if (extendedColor) {
+          if (r === g && g === b) {
+            // Gray Scale Color
+  	        if (r < 8) {
+  		        colorCode = 16;
+  	        } else if (r > 248) {
+  		        colorCode = 231;
+  	        } else {
+  	          colorCode = Math.round(((r - 8) / 247) * 24) + 232;
+  	        }
+          } else {
+            colorCode = 16
+  	            + (36 * Math.round(r / 255 * 5))
+  	            + (6 * Math.round(g / 255 * 5))
+  	            + Math.round(b / 255 * 5);
+          }
+        } else {
+          colorCode = 30;
+          const red = r / 255;
+          const green = g / 255;
+          const blue = b / 255;
+          let v = Math.max(red, green, blue) * 100;
+          v = Math.round(v / 50);
+          if (v === 1) {
+            colorCode += ((Math.round(b / 255) << 2)
+                | (Math.round(g / 255) << 1)
+                | Math.round(r / 255));
+          }
+          if (v === 2) {
+            colorCode += 60;
+          }
+        }
+      }
+      resolve(colorCode);
+      return;
+    } else {
+      reject(new Error('TYPE ERROR: Not in RGB color hex or color code'));
+      return;
+    }
+  });
+}
+
+/**
+ * A class to work with syslog messages using UDP, TCP, or TLS transport.  
+ * There is suport for Syslog message formating RFC-3164, RFC-5424 including 
+ * Structured Data, IBM LEEF (Log Event Extended Format), and HP CEF (Common
+ * Event Format). The meesaging is fully configurabule and Ansi foreground 
+ * colors can be added.  Both ANSI 8 and ANSI 256 color are fully suported.
+ * @requires moment
+ * @version 0.0.0
+ * @since 0.0.0
+ */
+class Syslog {
+  /**
+   * Construct a new Syslog object with user options 
+   * @public
+   * @version 0.0.0
+   * @since 0.0.0
+   * @this Syslog
+   * @param {object} [options] - Options object
+   * >>>Transport Configuraton
+   * @param {string} [options.target='localhost'] - The IP Address|FQDN of the 
+   *    Syslog Server, this option if set will take prasdents over any target 
+   *    set in a formating object
+   * @param {string} [options.protocol='udp'] - L4 transport portocol 
+   *    (udp|tcp|tls), this option if set will take prasdents over any transport 
+   *    set in a formating object
+   * @param {number} [options.port=514] - IP port, this option if set will take 
+   *    prasdents over any IP Port set in a formating object
+   * @param {number} [options.tcpTimeout=10000] - Ignored for all other 
+   *    transports, this option if set will take prasdents over any timeout 
+   *    set in a formating object
+   * @param {string[]} [options.tlsServerCerts] - Array of authrized TLS server
+   *    certificates file locations, this option if set will take prasdents 
+   *    over any certificates set in a formating object
+   * @param {string} [options.tlsClientCert] - Client TLS certificate file 
+   *    location that this client should use, this option if set will take 
+   *    prasdents over any certificates set in a formating object
+   * @param {string} [options.tlsClientKey] - Client TLS key file 
+   *    location that this client should use, this option if set will take 
+   *    prasdents over any certificates set in a formating object
+   * >>>Syslog Format Settings
+   * @param {string} [options.format='none'] - Valid syslog format options for 
+   *    this module are 'none', 'rfc3164', 'rfc5424', 'leef', 'cef'
+   * @param {RFC3164} [options.rfc5424] - {@link module:SyslogPro~RFC5424|
+   *    RFC5424 related settings}
+   * @param {RFC5424} [options.rfc5424] - {@link module:SyslogPro~RFC5424|
+   *    RFC5424 related settings}
+   * @param {LEEF} [options.leef] - {@link module:SyslogPro~LEEF|IBM LEEF 
+   *    (Log Event Extended Format) object} 
+   * @param {CEF} [options.cef] - {@link module:SyslogPro~CEF|HP CEF 
+   *    (Common Event Format) formating object} 
+   */
+  constructor (options) {
+    this.constructor__ = true;
+    if (!options) {
+      options = {};
+    }
+    // Basic transport setup
+    /** @type {string} */
+    this.target = options.target || 'localhost';
+    /** @type {string} */
+    this.protocol = options.protocol || 'udp';
+    this.protocol = this.protocol.toLowerCase();
+    /** @type {number} */
+    this.port = options.port || 514;
+    /** @type {number} */
+    this.tcpTimeout = options.tcpTimeout || 10000;
+    if ((typeof options.tlsServerCerts === 'object' 
+        && Array.isArray(options.tlsServerCerts))
+        || typeof options.tlsServerCerts === 'string') {
+      this.addTlsServerCerts(options.tlsServerCerts);  
+    } else {
+      /** @type {string[]} */
+      this.tlsServerCerts = [];
+    }
+    if (options.tlsClientCert) {
+      /** @type {string} */
+      this.tlsClientCert = options.tlsClientCert; 
+    }
+    if (options.tlsClientKey) {
+      /** @type {string} */
+      this.tlsClientKey = options.tlsClientKey; 
+    }
+    // Syslog Format
+    if (typeof options.format === 'string') {
+      /** @type {string} */
+      this.format = options.format.toLowerCase();
+    } else {
+      this.format = options.format || 'none';
+    }
+    if (options.rfc3164) {
+      if (options.rfc3164.constructor__) {
+        /** @type {RFC3164} */
+        this.rfc3164 = options.rfc3164;
+      } else {
+        this.rfc3164 = new RFC3164(options);
+      }
+    }
+    if (options.rfc5424) {
+      if (options.rfc5424.constructor__) {
+        /** @type {RFC5424} */
+        this.rfc5424 = options.rfc5424;
+      } else {
+        this.rfc5424 = new RFC5424(options);
+      }
+    }
+    if (options.leef) {
+      if (options.leef.constructor__) {
+        /** @type {LEEF} */
+        this.leef = options.leef;
+      } else {
+        this.leef = new LEEF(options);
+      }
+    }
+    if (options.cef) {
+      if (options.cef.constructor__) {
+        /** @type {CEF} */
+        this.cef = options.cef;
+      } else {
+        this.cef = new CEF(options);
+      }
+    }
+    if (this.format === 'rfc3164' && !this.rfc3164) {
+      this.rfc3164 = new RFC3164();
+    }
+    if (this.format === 'rfc5424' && !this.rfc5424) {
+      this.rfc5424 = new RFC5424();
+    }
+    if (this.format === 'leef' && !this.leef) {
+      this.leef = new LEEF();
+    }
+    if (this.format === 'cef' && !this.cef) {
+      this.cef = new CEF();
+    }
+  }
+  
+  /**
+   * Add a TLS server certificate which can be used to authentacat the server 
+   * this syslog client is connecting too.  This function will valadate the
+   * input as a file location straing and add it to an array of certificates
+   * @private
+   * @version 0.0.0
+   * @since 0.0.0
+   * @param {string|string[]} certs - File location of the certificate(s)
+   * @returns {Promise} - True
+   * @throws {Error} - A Type Error
+   */
+  addTlsServerCerts (certs) {
+    return new Promise((resolve, reject) => {
+      if (typeof certs === 'object' && Array.isArray(certs)) {
+        /** @private @type {string[]} */
+        this.tlsServerCerts = certs;
+      } else if (typeof certs === 'string') {
+        this.tlsServerCerts = [certs];
+      } else {
+        let errMsg = 'TYPE ERROR: Server Cert file loctions shoudl be a string';
+        errMsg += ' or array of strings';
+        reject(new Error(errMsg));
+      }
+      resolve(true);
+    });
+  }
+  /**
+   * Send the Syslog message over UDP
+   * @private
+   * @param {string} msg - The formated Syslog Message
+   * @returns {Promise} - The Syslog formated string sent
+   * @throws {Error} - Network Error
+   */
+  udpMessage (msg) {
+    return new Promise((resolve, reject) => {
+      const dgram = require('dgram');// Test for target DNS and Address Family (IPv4/6) by looking up the DNS
+      const dnsOptions = {
+        verbatim: true
+      };
+      dnsPromises.lookup(this.target, dnsOptions)
+          .then((result) => {
+            const udpType = result.family === 4 ? 'udp4' : 'udp6';
+            let client = dgram.createSocket(udpType);
+            // Turn msg in to a UTF8 buffer
+            let msgBuffer = Buffer.from(msg, 'utf8');
+            client.send(msgBuffer, this.port, this.target, (error) => {
+              client.close();
+              resolve(msg);
+            });
+          })
+          .catch((error) => {
+            reject(error); // Reject out of the sendMessage function promise
+          });
+    });
+  }
+  /**
+   * Send the Syslog message over TCP
+   * @private
+   * @param {string} msg - The formated Syslog Message
+   * @returns {Promise} - The Syslog formated string sent
+   * @throws {Error} - Timeout error for TCP and TLS connections
+   * @throws {Error} - Network Error
+   */
+  tcpMessage (msg) {
+    return new Promise((resolve, reject) => {
+      const net = require('net');
+      const dnsOptions = {
+        verbatim: true
+      };
+      dnsPromises.lookup(this.target, dnsOptions)
+          .then((result) => {
+            const tcpOptions = {
+              host: this.target,
+              port: this.port,
+              family: result.family
+            };
+            const client = net.createConnection(tcpOptions, () => {
+              // Turn msg in to a UTF8 buffer
+              let msgBuffer = Buffer.from(msg, 'utf8');
+              client.write(msgBuffer, () => {
+                client.end();
+              });
+            });
+            client.setTimeout(this.tcpTimeout);
+            client.on('end', () => {
+              resolve(msg);
+            });
+            client.on('timeout', () => {
+              client.end();
+              reject(new Error('TIMEOUT ERROR: Syslog server TCP timeout'));
+            });
+            client.on('error', (error) => {
+              client.destroy();
+              reject(error);
+            });
+          })
+          .catch((error) => {
+            reject(error);
+          });
+    });
+  }
+  /**
+   * Send the Syslog message over TLS
+   * @private
+   * @param {string} msg - The formated Syslog Message
+   * @returns {Promise} - The Syslog formated string sent
+   * @throws {Error} - Timeout error for TCP and TLS connections
+   * @throws {Error} - Network Error
+   */
+  tlsMessage (msg) {
+    return new Promise((resolve, reject) => {
+      const tls = require('tls');
+      const tlsOptions = {
+        host: this.target,
+        port: this.port,
+      };
+      // Load client cert and key if requested
+      if (typeof this.tlsClientKey === 'string' 
+          && typeof this.tlsClientCert === 'string') {
+        tlsOptions.key = fs.readFileSync(this.tlsClientKey);
+        tlsOptions.cert = fs.readFileSync(this.tlsClientCert);      
+      } else if (typeof this.tlsClientKey !== 'string' 
+          && typeof this.tlsClientKey !== 'undefined') {
+        let errMsg = 'TYPE ERROR: TLS Client Key is not a file';
+        errMsg += 'location string';
+        reject(new Error(errMsg));
+        return;
+      } else if (typeof this.tlsClientCert !== 'string' 
+          && typeof this.tlsClientCert !== 'undefined') {
+        let errMsg = 'TYPE ERROR: TLS Client Cert is not a file';
+        errMsg += 'location string';
+        reject(new Error(errMsg));
+        return;
+      }
+      // Load any server certs if provided
+      let tlsCerts = this.tlsServerCerts.length;
+      if (tlsCerts > 0) {
+        let tlsOptionsCerts = [];
+        for (let certIndex=0; certIndex<tlsCerts; certIndex++) {
+          if (typeof this.tlsServerCerts[certIndex] !== 'string') {
+            let errMsg = 'TYPE ERROR: TLS Server Cert is not a file';
+            errMsg += 'location string';
+            reject(new Error(errMsg));
+          }
+          let cert = fs.readFileSync(this.tlsServerCerts[certIndex]);
+          tlsOptionsCerts.push(cert);
+        }
+        tlsOptions.ca = tlsOptionsCerts;
+        tlsOptions.rejectUnauthorized = true;
+      }
+      const client = tls.connect(tlsOptions, () => { 
+        // Turn msg in to a UTF8 buffer
+        let msgBuffer = Buffer.from(msg, 'utf8');
+        client.write(msgBuffer, () => {
+          client.end();
+        });
+      });
+      client.setTimeout(this.tcpTimeout);
+      // client.on('data', (data) => {});
+      client.on('end', () => {
+        resolve(msg);
+      });
+      client.on('timeout', () => {
+        client.end();
+        reject(new Error('TIMEOUT ERROR: Syslog server TLS timeout'));
+      });
+      client.on('error', (error) => {
+        client.destroy();
+        reject(error);
+      });   
+    });
+  }
+  /**
+   * Send the Syslog message to the selected target Syslog server using the 
+   * selected transport.
+   * @private
+   * @param {string} msg - The formated Syslog Message
+   * @returns {Promise} - The Syslog formated string sent
+   * @throws {Error} - Timeout error for TCP and TLS connections
+   * @throws {Error} - Network Error
+   */
+  send (msg) {
+    return new Promise((resolve, reject) => {
+      if (typeof msg !== 'string') {
+        reject(new Error("TYPE ERROR: Syslog message must be a string"));
+        return;
+      }
+      this.protocol = this.protocol.toLowerCase();
+      if (this.protocol === 'udp') {
+        this.udpMessage(msg)
+            .then((result) => {
+              resolve(result);
+            })
+            .catch((reson) => {
+              reject(reson);
+            });
+      } else if (this.protocol === 'tcp') {
+        this.tcpMessage(msg)
+            .then((result) => {
+              resolve(result);
+            })
+            .catch((reson) => {
+              reject(reson);
+            });
+      } else if (this.protocol === 'tls') {
+        this.tlsMessage(msg)
+            .then((result) => {
+              resolve(result);
+            })
+            .catch((reson) => {
+              reject(reson);
+            });
+      } else {
+        let errorMsg = 'FORMAT ERROR: Protocol not reconized, should be ';
+        errorMsg += 'udp|tcp|tls';
+        reject(new Error(errorMsg));
+      }
+    });
+  }
+}
+ 
+/**
+ * A class to work with RFC3164 formated syslog messages.
+ * @requires moment
+ * @version 0.0.0
+ * @since 0.0.0
+ */
+class RFC3164 {
+  /**
+   * Construct a new RFC3164 formated Syslog object with user options 
+   * @public
+   * @this RFC3164
+   * @param {object} [options] - Options object
+   * @param {string} [options.applacationName='NodeJSLogger'] - Applacation
+   * @param {string} [options.hostname=os.hostname] - The name of this server
+   * @param {number} [options.facility=23] - Facility code to use sending this 
+   *    message 
+   * @param {boolean} [options.color=false] - Apply color coding encoding tag 
+   *    with syslog message text 
+   * @param {boolean} [options.extendedColor=false] - Use the extedned ANSI 
+   *    color set encoding tag with syslog message text 
+   * @param {object} [options.colors] - User defended colors for 
+   *    severites
+   * @param {string} [options.colors.emergencyColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.alertColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.criticalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.errorColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.warningColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.noticeColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.informationalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.debugColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {Syslog} [options.server=false] - A {@link module:SyslogPro~Syslog|
+   *    Syslog server connection} that should be used to send messages directly 
+   *    from this class. @see SyslogPro~Syslog
+   */
+  constructor (options) {
+    /** @private @type {boolean} */
+    this.constructor__ = true;
+    options = options || {};
+    this.hostname = options.hostname || os.hostname();
+    this.applacationName = options.applacationName || '';
+    this.facility = options.facility || 23;
+    if (options.color) {
+      /** @type {boolean} */
+      this.color = true;
+    } else {
+      this.color = false;
+    }
+    if (options.extendedColor) {
+      /** @type {boolean} */
+      this.extendedColor = true;
+    } else {
+      this.extendedColor = false;
+    }
+    if (options.server) {
+      if (!options.server.constructor__) {
+        /** @private @type {Syslog} */
+        this.server = new Syslog(options.server);
+      } else {
+        this.server = options.server;
+      }
+    }
+    if (this.extendedColor) {
+      /** @private @type {number} */
+      this.emergencyColor = 1; // Red foreground color
+      /** @private @type {number} */
+      this.alertColor = 202; // Dark Orange foreground color
+      /** @private @type {number} */
+      this.criticalColor = 208; // Orange foreground color
+      /** @private @type {number} */
+      this.errorColor = 178; // Light Orange foreground color
+      /** @private @type {number} */
+      this.warningColor = 226; // Yellow foreground color
+      /** @private @type {number} */
+      this.noticeColor = 117; // Light Blue foreground color
+      /** @private @type {number} */
+      this.informationalColor = 45; // Blue foreground color
+      /** @private @type {number} */
+      this.debugColor = 27; // Dark Blue foreground color
+    } else {
+      this.emergencyColor = 31; // Red foreground color
+      this.alertColor = 31; // Red foreground color
+      this.criticalColor = 31; // Red foreground color
+      this.errorColor = 33; // Yellow foreground color
+      this.warningColor = 33; // Yellow foreground color
+      this.noticeColor = 36; // Blue foreground color
+      this.informationalColor = 36; // Blue foreground color
+      this.debugColor = 34; // Dark Blue foreground color
+    }
+    if (typeof options.colors === 'object') {
+      this.setColor(options.colors, this.extendedColor);
+    }
+  }
+  /**
+   * Sets the color to be used for messages at a set priority
+   * @public   
+   * @param {string} [colors.emergencyColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.alertColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.criticalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.errorColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.warningColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.noticeColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.informationalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.debugColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @throws {Error} A standard error object
+   */
+  setColor (colors, extendedColor) {
+    return new Promise((resolve, reject) => {
+      let colorPromises = [];
+      if (colors.emergencyColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.emergencyColor, this.extendedColor)
+                  .then((result) => {
+                    this.emergencyColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'emergencyColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.alertColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.alertColor, this.extendedColor)
+                  .then((result) => {
+                    this.alertColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'alertColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.criticalColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.criticalColor, this.extendedColor)
+                  .then((result) => {
+                    this.criticalColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'criticalColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.errorColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.errorColor, this.extendedColor)
+                  .then((result) => {
+                    this.errorColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'errorColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.warningColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.warningColor, this.extendedColor)
+                  .then((result) => {
+                    this.warningColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'warningColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.noticeColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.noticeColor, this.extendedColor)
+                  .then((result) => {
+                    this.noticeColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'noticeColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.informationalColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.informationalColor, this.extendedColor)
+                  .then((result) => {
+                    this.informationalColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'informationalColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.debugColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.debugColor, this.extendedColor)
+                  .then((result) => {
+                    this.debugColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'debugColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      Promise.all(colorPromises)
+          .then((results) => {
+            resolve(true);
+          })
+          .catch((reson) => {
+            reject(reson);
+          });
+    });
+  }
+  /**
+   * Building a formated message.  Returns a promise with a formated message 
+   * @public
+   * @param {string} msg - The Syslog Message
+   * @param {object} [options] - Options object
+   * @param {number} [options.severity=7] - An array of structure 
+   * @param {number} [options.colorCode=36] - The ANSI color code to use if 
+   *    message coloration is selected
+   * @returns {Promise} A Syslog formated string acording to the selected RFC
+   * @throws {Error} A standard error object
+   */
+  buildMessage (msg, options) {
+    return new Promise((resolve, reject) => {
+      options = options || {};
+      let severity = typeof options.severity === 'number' ? 
+          options.severity : 6;
+      if (typeof msg !== 'string' || options.msgSeverity > 7) {
+        let errMsg = 'FORMAT ERROR: Syslog message must be a string';
+        errMsg += ' msgSeverity must be a number between 0 and 7';
+        reject(new Error(errMsg));
+        return;
+      }
+      let fmtMsg = ''; // Formated Syslog message string var
+      const newLine = '\n';
+      const newLineRegEx = /(\r|\n|(\r\n))/;
+      const escapeCode = '\u001B';
+      const resetColor = '\u001B[0m';
+      // The PRI is common to both RFC formats
+      const pri = (this.facility * 8) + severity;
+      // Remove any newline character
+      msg = msg.replace(newLineRegEx, ''); 
+      // Add requested color
+      if (this.color) {
+        options.msgColor = options.msgColor || 36;
+        let colorCode = '[';
+        if (this.extendedColor) {
+          colorCode += '38;5;'; // Extended 256 Colors ANSI Code
+        }
+        if (typeof options.msgColor === 'number') {
+          colorCode += options.msgColor;
+          colorCode += 'm'; // ANSI Color Closer
+        } else {
+          colorCode = '[39m';  // Use terminal's defualt color
+        }
+        msg = escapeCode + colorCode + msg + resetColor;
+      }
+      // RegEx to find a leading 0 in the day of a DateTime for RFC3164
+      // RFC3164 uses BSD timeformat
+      const rfc3164DateRegEx = /((A|D|F|J|M|N|O|S)(a|c|e|p|o|u)(b|c|g|l|n|p|r|t|v|y)\s)0(\d\s\d\d:\d\d:\d\d)/;
+      const timestamp = moment()
+          .format('MMM DD hh:mm:ss')
+          .replace(rfc3164DateRegEx, '$1 $5');
+      // Build message    
+      fmtMsg = '<' + pri + '>';
+      fmtMsg += timestamp;
+      fmtMsg += ' ' + this.hostname;
+      fmtMsg += ' ' + this.applacationName;
+      fmtMsg += ' ' + msg;
+      fmtMsg += newLine;
+      resolve(fmtMsg);
+    });
+  }
+  /**
+   * send a RFC5424 formated message.  Returns a promise with the formated 
+   *    message that was sent.  If no server connection was defined when the 
+   *    class was created a defualt Syslog connector will be used.  
+   *    @see SyslogPro~Syslog
+   * @public
+   * @param {string} msg - The unformated Syslog message to send
+   * @param {object} [options] - Options object
+   * @param {number} [options.severity=7] - An array of structure 
+   * @param {number} [options.colorCode=36] - The ANSI color code to use if 
+   * @returns {Promise} A Syslog formated string acording to the selected RFC
+   * @throws {Error} A standard error object
+   */
+  send (msg, options) {
+    return new Promise((resolve, reject) => {
+      if (!this.server) {
+        this.server = new Syslog();
+      }
+      this.buildMessage(msg, options)
+        .then((result) => {
+          this.server.send(result)
+            .then((sendResult) => {
+              resolve(sendResult);
+            })
+            .catch((error) => {
+              reject(error);
+            });
+        })
+        .catch((error) => {
+          reject(error);
+        });
+    });
+  } 
+  /**
+   * Send a syslog message with a secerity level of 0 (Emergency)
+   * @public
+   * @param {string} msg - The emergancy message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  emergency (msg) {
+    return this.send(msg, {
+      severity: 0, 
+      colorCode: this.emergencyColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 0 (Emergency)
+   * @public
+   * @param {string} msg - The emergancy message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  emer (msg) {
+    return this.emergency(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 1 (Alert)
+   * @public
+   * @param {string} msg - The alert message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  alert (msg) {
+    return this.send(msg, {
+      severity: 1, 
+      colorCode: this.alertColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 2 (Critical)
+   * @public
+   * @param {string} msg - The critical message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  critical (msg) {
+    return this.send(msg, {
+      severity: 2, 
+      colorCode: this.criticalColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 2 (Critical)
+   * @public
+   * @param {string} msg - The critical message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  crit (msg) {
+    return this.critical(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 3 (Error)
+   * @public
+   * @param {string} msg - The error message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  error (msg) {
+    return this.send(msg, {
+      severity: 3, 
+      colorCode: this.errorColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 3 (Error)
+   * @public
+   * @param {string} msg - The error message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  err (msg) {
+    return this.error(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 4 (Warning)
+   * @public
+   * @param {string} msg - The warning message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  warning (msg) {
+    return this.send(msg, {
+      severity: 4, 
+      colorCode: this.warningColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 4 (Warning)
+   * @public
+   * @param {string} msg - The warning message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  warn (msg) {
+    return this.warning(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 5 (Notice)
+   * @public
+   * @param {string} msg - The notice message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  notice (msg) {
+    return this.send(msg, {
+      severity: 5, 
+      colorCode: this.noticeColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 5 (Notice)
+   * @public
+   * @param {string} msg - The notice message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  note (msg) {
+    return this.notice(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 6 (Informational)
+   * @public
+   * @param {string} msg - The informational message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  informational (msg) {
+    return this.send(msg, {
+      severity: 6, 
+      colorCode: this.informationalColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 6 (Informational)
+   * @public
+   * @param {string} msg - The informational message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  info (msg) {
+    return this.informational(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 6 (Informational)
+   * @public
+   * @param {string} msg - The informational message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  log (msg) {
+    return this.informational(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 7 (Debug)
+   * @public
+   * @param {string} msg - The debug message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  debug (msg) {
+    return this.send(msg, {
+      severity: 7, 
+      colorCode: this.debugColor
+    });
+  }
+}
+
+/**
+ * A class to work with RFC5424 formated syslog messages.
+ * @requires moment
+ * @version 0.0.0
+ * @since 0.0.0
+ */
+class RFC5424 {
+  /**
+   * Construct a new RFC5424 formated Syslog object with user options 
+   * @public
+   * @this RFC5424
+   * @param {object} [options] - Options object
+   * @param {string} [options.applacationName='NodeJSLogger'] - Applacation
+   * @param {string} [options.hostname=os.hostname] - The name of this server
+   * @param {boolean} [options.timestamp=false] - Included a Timestamp
+   * @param {boolean} [options.timestampUTC=false] - RFC tandard is for 
+   *    local time
+   * @param {boolean} [options.timestampMS=false] - Timestamp with ms 
+   *    resoltuion
+   * @param {boolean} [options.timestampTZ=true] - Should the timestamp
+   *    included timezone
+   * @param {boolean} [options.encludeStructuredData=false] - Included 
+   *    any provided structured data
+   * @param {boolean} [options.utf8BOM=true] - Included the UTF8 
+   * @param {boolean} [options.color=false] - Included the UTF8 
+   * @param {boolean} [options.extendedColor=false] - Included the UTF8 
+   *    encoding tag with syslog message text 
+   * @param {object} [options.colors] - User defended colors for 
+   *    severites
+   * @param {string} [options.colors.emergencyColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.alertColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.criticalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.errorColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.warningColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.noticeColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.informationalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [options.colors.debugColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {Syslog} [options.server=false] - A {@link module:SyslogPro~Syslog|
+   *    Syslog server connection} that should be used to send messages directly 
+   *    from this class. @see SyslogPro~Syslog
+   */
+  constructor (options) {
+    /** @private @type {boolean} */
+    this.constructor__ = true;
+    options = options || {};
+    this.hostname = options.hostname || os.hostname();
+    this.applacationName = options.applacationName || '';
+    if (typeof options.timestamp === 'undefined' || options.timestamp) {
+      /** @type {boolean} */
+      this.timestamp = true;
+    } else {
+      this.timestamp = false;
+    }
+    if (options.timestampUTC) {
+      /** @type {boolean} */
+      this.timestampUTC = true;
+    } else {
+      this.timestampUTC = false;
+    }
+    if (typeof options.timestampTZ === 'undefined' || options.timestampTZ) {
+      /** @type {boolean} */
+      this.timestampTZ = true;
+    } else {
+      this.timestampTZ = false;
+    }
+    if (options.timestampMS) {
+      /** @type {boolean} */
+      this.timestampMS = true;
+    } else {
+      this.timestampMS = false;
+    }
+    if (options.encludeStructuredData) {
+      /** @type {boolean} */
+      this.encludeStructuredData = true;
+    } else {
+      this.encludeStructuredData = false;
+    }
+    if (typeof options.utf8BOM === 'undefined' || options.utf8BOM) {
+      /** @type {boolean} */
+      this.utf8BOM = true;
+    } else {
+      this.utf8BOM = false;
+    }
+    if (options.color) {
+      /** @type {boolean} */
+      this.color = true;
+    } else {
+      this.color = false;
+    }
+    if (options.extendedColor) {
+      /** @type {boolean} */
+      this.extendedColor = true;
+    } else {
+      this.extendedColor = false;
+    }
+    if (options.server) {
+      if (!options.server.constructor__) {
+        /** @private @type {Syslog} */
+        this.server = new Syslog(options.server);
+      } else {
+        this.server = options.server;
+      }
+    }
+    if (this.extendedColor) {
+      /** @private @type {number} */
+      this.emergencyColor = 1; // Red foreground color
+      /** @private @type {number} */
+      this.alertColor = 202; // Dark Orange foreground color
+      /** @private @type {number} */
+      this.criticalColor = 208; // Orange foreground color
+      /** @private @type {number} */
+      this.errorColor = 178; // Light Orange foreground color
+      /** @private @type {number} */
+      this.warningColor = 226; // Yellow foreground color
+      /** @private @type {number} */
+      this.noticeColor = 117; // Light Blue foreground color
+      /** @private @type {number} */
+      this.informationalColor = 45; // Blue foreground color
+      /** @private @type {number} */
+      this.debugColor = 27; // Dark Blue foreground color
+    } else {
+      this.emergencyColor = 31; // Red foreground color
+      this.alertColor = 31; // Red foreground color
+      this.criticalColor = 31; // Red foreground color
+      this.errorColor = 33; // Yellow foreground color
+      this.warningColor = 33; // Yellow foreground color
+      this.noticeColor = 36; // Blue foreground color
+      this.informationalColor = 36; // Blue foreground color
+      this.debugColor = 34; // Dark Blue foreground color
+    }
+    if (typeof options.colors === 'object') {
+      this.setColor(options.colors, this.extendedColor);
+    }
+  }
+  /**
+   * Sets the color to be used for messages at a set priority
+   * @public   
+   * @param {string} [colors.emergencyColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.alertColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.criticalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.errorColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.warningColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.noticeColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.informationalColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @param {string} [colors.debugColor] - A RGB Hex coded color in the form 
+   *    of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 
+   *    Extended)
+   * @throws {Error} A standard error object
+   */
+  setColor (colors, extendedColor) {
+    return new Promise((resolve, reject) => {
+      let colorPromises = [];
+      if (colors.emergencyColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.emergencyColor, this.extendedColor)
+                  .then((result) => {
+                    this.emergencyColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'emergencyColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.alertColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.alertColor, this.extendedColor)
+                  .then((result) => {
+                    this.alertColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'alertColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.criticalColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.criticalColor, this.extendedColor)
+                  .then((result) => {
+                    this.criticalColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'criticalColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.errorColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.errorColor, this.extendedColor)
+                  .then((result) => {
+                    this.errorColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'errorColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.warningColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.warningColor, this.extendedColor)
+                  .then((result) => {
+                    this.warningColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'warningColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.noticeColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.noticeColor, this.extendedColor)
+                  .then((result) => {
+                    this.noticeColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'noticeColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.informationalColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.informationalColor, this.extendedColor)
+                  .then((result) => {
+                    this.informationalColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'informationalColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      if (colors.debugColor) {
+        colorPromises.push(
+            new Promise((resolve,reject) => {
+              rgbToAnsi(colors.debugColor, this.extendedColor)
+                  .then((result) => {
+                    this.debugColor = result;
+                    resolve(true);
+                  })
+                  .catch((reson) => {
+                    reson.message = 'TYPE ERROR: '; 
+                    reson.message += 'debugColor';
+                    reson.message += ' Not in RGB color hex or color code';
+                    reject(reson);
+                  });
+        }));
+      }
+      Promise.all(colorPromises)
+          .then((results) => {
+            resolve(true);
+          })
+          .catch((reson) => {
+            reject(reson);
+          });
+    });
+  }
+  /**
+   * Building a formated message.  Returns a promise with a formated message 
+   * @public
+   * @param {string} msg - The Syslog Message
+   * @param {object} [options] - Options object
+   * @param {number} [options.severity=7] - An array of structure 
+   * @param {number} [options.facility=23] - Facility code to use sending this 
+   *    message 
+   * @param {string} [options.pid='-'] - The process id of the service sending 
+   *    this message 
+   * @param {string[]} [options.structuredData] - An array of structure 
+   *    data strings conforming to the IETF/IANA defined SD-IDs or IANA 
+   *    registred SMI Network Management Private Enterprise Code SD-ID 
+   *    conforming to the format 
+   *    [name@<private enterprise number> parameter=value] 
+   * @param {number} [options.colorCode=36] - The ANSI color code to use if 
+   *    message coloration is selected
+   * @returns {Promise} A Syslog formated string acording to the selected RFC
+   * @throws {Error} A standard error object
+   */
+  buildMessage (msg, options) {
+    return new Promise((resolve, reject) => {
+      options = options || {};
+      let severity = typeof options.severity === 'number' ? 
+          options.severity : 6;
+      if (typeof msg !== 'string' || options.severity > 7) {
+        let errMsg = 'FORMAT ERROR: Syslog message must be a string';
+        errMsg += ' msgSeverity must be a number between 0 and 7';
+        reject(new Error(errMsg));
+        return;
+      }
+      let facility = options.facility || 23;
+      let pid = options.pid || '-';
+      let id = options.id || '-';
+      let msgStructuredData = options.msgStructuredData || [];
+      let fmtMsg = ''; // Formated Syslog message string var
+      const newLine = '\n';
+      const newLineRegEx = /(\r|\n|(\r\n))/;
+      const escapeCode = '\u001B';
+      const resetColor = '\u001B[0m';
+      // The PRI is common to both RFC formats
+      const pri = (facility * 8) + severity;
+      // Remove any newline character
+      msg = msg.replace(newLineRegEx, ''); 
+      // Add requested color
+      if (this.color) {
+        options.msgColor = options.msgColor || 36;
+        let colorCode = '[';
+        if (this.extendedColor) {
+          colorCode += '38;5;'; // Extended 256 Colors ANSI Code
+        }
+        if (typeof options.msgColor === 'number') {
+          colorCode += options.msgColor;
+          colorCode += 'm'; // ANSI Color Closer
+        } else {
+          colorCode = '[39m';  // Use terminal's defualt color
+        }
+        msg = escapeCode + colorCode + msg + resetColor;
+      }
+      // RFC5424 timestamp formating
+      let timestamp = '-';
+      if (this.timestamp) {
+        let timeQuality = '[timeQuality';
+        if (this.timestampUTC) {
+          timeQuality += ' tzKnown=1';
+          if (this.timestampMS) {
+            if (this.timestampTZ) {
+              timestamp = moment().utc().format('YYYY-MM-DDThh:mm:ss.SSSSSSZ');
+            } else {
+              timestamp = moment().utc().format('YYYY-MM-DDThh:mm:ss.SSSSSS');
+            }
+          } else {
+            if (this.timestampTZ) {
+              timestamp = moment().utc().format('YYYY-MM-DDThh:mm:ssZ');
+            } else {
+              timestamp = moment().utc().format('YYYY-MM-DDThh:mm:ss');
+            }
+          }
+        } else {
+          if (this.timestampTZ) {
+            timeQuality += ' tzKnown=1';
+            if (this.timestampMS) {
+              timeQuality += ' isSynced=1';
+              timeQuality += ' syncAccuracy=0';
+              timestamp = moment().format('YYYY-MM-DDThh:mm:ss.SSSSSSZ');
+            } else {
+              timestamp = moment().format('YYYY-MM-DDThh:mm:ssZ');
+            }
+          } else {
+            timeQuality += ' tzKnown=0';
+            if (this.timestampMS) {
+              timeQuality += ' isSynced=1';
+              timeQuality += ' syncAccuracy=0';
+              timestamp = moment().format('YYYY-MM-DDThh:mm:ss.SSSSSS');
+            } else {
+              timestamp = moment().format('YYYY-MM-DDThh:mm:ss');
+            }
+          }
+        }
+        timeQuality += ']';
+        msgStructuredData.push(timeQuality);
+      }
+      // Build Structured Data string
+      let structuredData = '-';
+      const sdElementCount = msgStructuredData.length;
+      if (this.encludeStructuredData && sdElementCount > 0) {
+        let sdElementNames = [];
+        let sdElements = [];
+        const sdElementNameRegEx = /(\[)(\S*)(\s|\])/;
+        // Loop to drop duplicates of the same SD Element name
+        for (let elementIndex=0; 
+            elementIndex<sdElementCount; 
+            elementIndex++) {
+          let elementName = 
+            msgStructuredData[elementIndex]
+            .match(sdElementNameRegEx)[2];
+          if (!sdElementNames.includes(elementName)) {
+            sdElementNames.push(elementName);
+            sdElements.push(msgStructuredData[elementIndex]);
+          }
+        }
+        structuredData = sdElements.join('');
+      }
+      // Build the message
+      fmtMsg = '<' + pri + '>';
+      fmtMsg += '1'; // Version number
+      fmtMsg += ' ' + timestamp;
+      fmtMsg += ' ' + this.hostname;
+      fmtMsg += ' ' + this.applacationName;
+      fmtMsg += ' ' + pid;
+      fmtMsg += ' ' + id;
+      fmtMsg += ' ' + structuredData;
+      if (this.utf8BOM) {
+        fmtMsg += ' BOM' + msg;
+      } else {
+        fmtMsg += ' ' + msg;
+      }
+      fmtMsg += newLine;
+      resolve(fmtMsg);
+    });
+  }
+  /**
+   * send a RFC5424 formated message.  Returns a promise with the formated 
+   *    message that was sent.  If no server connection was defined when the 
+   *    class was created a defualt Syslog connector will be used.  
+   *    @see SyslogPro~Syslog
+   * @public
+   * @param {string} msg - The unformated Syslog message to send
+   * @returns {Promise} A Syslog formated string acording to the selected RFC
+   * @throws {Error} A standard error object
+   */
+  send (msg, options) {
+    return new Promise((resolve, reject) => {
+      if (!this.server) {
+        this.server = new Syslog();
+      }
+      this.buildMessage(msg, options)
+        .then((result) => {
+          this.server.send(result)
+            .then((sendResult) => {
+              resolve(sendResult);
+            })
+            .catch((error) => {
+              reject(error);
+            });
+        })
+        .catch((error) => {
+          reject(error);
+        });
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 0 (Emergency)
+   * @public
+   * @param {string} msg - The emergancy message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  emergency (msg) {
+    return this.send(msg, {
+      severity: 0, 
+      colorCode: this.emergencyColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 0 (Emergency)
+   * @public
+   * @param {string} msg - The emergancy message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  emer (msg) {
+    return this.emergency(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 1 (Alert)
+   * @public
+   * @param {string} msg - The alert message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  alert (msg) {
+    return this.send(msg, {
+      severity: 1, 
+      colorCode: this.alertColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 2 (Critical)
+   * @public
+   * @param {string} msg - The critical message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  critical (msg) {
+    return this.send(msg, {
+      severity: 2, 
+      colorCode: this.criticalColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 2 (Critical)
+   * @public
+   * @param {string} msg - The critical message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  crit (msg) {
+    return this.critical(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 3 (Error)
+   * @public
+   * @param {string} msg - The error message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  error (msg) {
+    return this.send(msg, {
+      severity: 3, 
+      colorCode: this.errorColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 3 (Error)
+   * @public
+   * @param {string} msg - The error message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  err (msg) {
+    return this.error(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 4 (Warning)
+   * @public
+   * @param {string} msg - The warning message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  warning (msg) {
+    return this.send(msg, {
+      severity: 4, 
+      colorCode: this.warningColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 4 (Warning)
+   * @public
+   * @param {string} msg - The warning message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  warn (msg) {
+    return this.warning(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 5 (Notice)
+   * @public
+   * @param {string} msg - The notice message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  notice (msg) {
+    return this.send(msg, {
+      severity: 5, 
+      colorCode: this.noticeColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 5 (Notice)
+   * @public
+   * @param {string} msg - The notice message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  note (msg) {
+    return this.notice(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 6 (Informational)
+   * @public
+   * @param {string} msg - The informational message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  informational (msg) {
+    return this.send(msg, {
+      severity: 6, 
+      colorCode: this.informationalColor
+    });
+  }
+  /**
+   * Send a syslog message with a secerity level of 6 (Informational)
+   * @public
+   * @param {string} msg - The informational message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  info (msg) {
+    return this.informational(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 6 (Informational)
+   * @public
+   * @param {string} msg - The informational message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  log (msg) {
+    return this.informational(msg);
+  }
+  /**
+   * Send a syslog message with a secerity level of 7 (Debug)
+   * @public
+   * @param {string} msg - The debug message to send to the Syslog server
+   * @returns {Promise} - The formated syslog message sent to the Syslog server
+   * @throws {Error} - Any bubbled up error
+   */
+  debug (msg) {
+    return this.send(msg, {
+      severity: 7, 
+      colorCode: this.debugColor
+    });
+  }
+}
+ 
+/**
+ * A class to work with IBM LEEF (Log Event Extended Format) messages this form
+ * of system messages are designed to work with security systems.  Messages can
+ * be saved to file (Saving to file if not part of this module but a LEEF 
+ * formated mesage produced by this module can be saved externaly to it) or 
+ * sent via Syslog.
+ * @requires moment
+ * @version 0.0.0
+ * @since 0.0.0
+ */
+class LEEF {
+  /**
+   * Construct a new LEEF object with user options 
+   * @public
+   * @param {object} [options] - Options object
+   * @param {string} [options.vendor='unknown'] - The vendor of the system that
+   *    genrated the event being reported
+   * @param {string} [options.product='unknown'] - The product name of the 
+   *    system that genrated the event being reported
+   * @param {string} [options.version='unknown'] - The version name of the 
+   *    system that genrated the event being reported
+   * @param {string} [options.eventId='unknown'] - The eventId of the 
+   *    system that genrated the event being reported
+   * @param {object} [options.attrabute] - LEEF message attrabutes which 
+   *    defualts to all base attrabutes with null values, new attrabutes should
+   *    be added as new elements to this object
+   * @param {boolean} [options.syslogHeader='true'] - Should the LEEF message 
+   *    include a Syslog header with Timestamp and source
+   * @param {Syslog} [options.server=false] - A {@link module:SyslogPro~Syslog|
+   *    Syslog server connection} that should be used to send messages directly 
+   *    from this class. @see SyslogPro~Syslog
+   */
+  constructor (options) {
+    /** @private @type {boolean} */
+    this.constructor__ = true;
+    options = options || {};
+    /** @type {string} */
+    this.vendor = options.vendor || 'unknown';
+    /** @type {string} */
+    this.product = options.product || 'unknown';
+    /** @type {string} */
+    this.version = options.version || 'unknown';
+    /** @type {string} */
+    this.eventId = options.eventId || 'unknown';
+    /** @type {boolean} */
+    this.syslogHeader = typeof options.syslogHeader === 'boolean' 
+        ? options.syslogHeader : true;
+    /** @type {object} */
+    this.attrabutes = options.attrabutes || {
+      cat: null,
+      devTime: null,
+      devTimeFormat: null,
+      proto: null,
+      sev: null,
+      src: null,
+      dst: null,
+      srcPort: null,
+      dstPort: null,
+      srcPreNAT: null,
+      dstPreNAT: null,
+      srcPostNAT: null,
+      dstPostNAT: null,
+      usrName: null,
+      srcMAC: null,
+      dstMAC: null,
+      srcPreNATPort: null,
+      dstPreNATPort: null,
+      srcPostNATPort: null,
+      dstPostNATPort: null,
+      identSrc: null,
+      identHostName: null,
+      identNetBios: null,
+      identGrpName: null,
+      identMAC: null,
+      vSrc: null,
+      vSrcName: null,
+      accountName: null,
+      srcBytes: null,
+      dstBytes: null,
+      srcPackets: null,
+      dstPackets: null,
+      totalPackets: null,
+      role: null,
+      realm: null,
+      policy: null,
+      resource: null,
+      url: null,
+      groupID: null,
+      domain: null,
+      isLoginEvent: null,
+      isLogoutEvent: null,
+      identSecondlp: null,
+      calLanguage: null,
+      AttributeLimits: null,
+      calCountryOrRegion: null,
+    };
+    if (options.server) {
+      if (options.server.constructor__) {
+        /** @private @type {Syslog} */
+        this.server = options.server;
+      } else {
+        this.server = new Syslog(options.server);
+      }
+    }
+  }
+  /**
+   *Build a formated message
+   * @public
+   * @return {Promise} - string with formated message
+   */
+  buildMessage () {
+    return new Promise((resolve, reject) => {
+      let fmtMsg = 'LEEF:2.0';
+      fmtMsg += '|' + this.vendor;
+      fmtMsg += '|' + this.product;
+      fmtMsg += '|' + this.version;
+      fmtMsg += '|' + this.eventId;
+      fmtMsg += '|';
+      
+      // Build LEEF Attrabuites
+      const Tab = '\x09';
+      const leefAttribs = Object.entries(this.attrabutes);
+      const leefAttribsLen = leefAttribs.length;
+      for (let attrib = 0; attrib < leefAttribsLen; attrib++) {
+        if (leefAttribs[attrib][1] !== null) {
+          fmtMsg += leefAttribs[attrib][0] + '=' + leefAttribs[attrib][1] + Tab;
+        }
+      }
+      resolve(fmtMsg);
+    });
+  }
+  
+  /**
+   * @public
+   * @param {Syslog} [options=false] - A {@link module:SyslogPro~Syslog|
+   *    Syslog server connection} that should be used to send messages directly 
+   *    from this class. @see SyslogPro~Syslog
+   */
+  send (options) {
+    return new Promise((resolve, reject) => {
+      this.buildMessage()
+        .then((result) => {
+          if (!this.server) {
+            this.server = new Syslog(options);
+          }
+          this.server.send(result)
+            .then((sendResult) => {
+              resolve(sendResult);
+            })
+            .catch((reson) => {
+              reject(reson);
+            });
+        });
+    });
+  }
+}
+
+/**
+ * A class to work with HP CEF (Common Event Format) messages. This form
+ * of system messages are designed to work with security systems.  Messages can
+ * be saved to file (Saving to file if not part of this module but a CEF 
+ * formated mesage produced by this module can be saved externaly to it) or 
+ * sent via Syslog.
+ * @requires moment
+ * @version 0.0.0
+ * @since 0.0.0
+ */
+class CEF {
+  /**
+   * Construct a new CEF object with user options 
+   * @public
+   * @param {object} [options] - Options object
+   * @param {string} [options.deviceVendor='unknown'] - The vendor of the system 
+   *    that genrated the event being reported
+   * @param {string} [options.deviceProduct='unknown'] - The product name of the 
+   *    system that genrated the event being reported
+   * @param {string} [options.deviceVersion='unknown'] - The version name of the 
+   *    system that genrated the event being reported
+   * @param {string} [options.deviceEventClassId='unknown'] - The eventId of the 
+   *    system that genrated the event being reported
+   * @param {string} [options.name='unknown'] - Name of the service genrating 
+   *    the notice
+   * @param {string} [options.severity='unknown'] - Severity of the notification
+   * @param {string} [options.extensions={}] - Any CEF Key=Value extentions
+   * @param {Syslog} [options.server=false] - A {@link module:SyslogPro~Syslog|
+   *    Syslog server connection} that should be used to send messages directly 
+   *    from this class. @see SyslogPro~Syslog
+   */
+  constructor (options) {
+    /** @private @type {boolean} */
+    this.constructor__ = true;
+    options = options || {};
+    /** @type {string} */
+    this.deviceVendor = options.deviceVendor || 'Unknown';
+    /** @type {string} */
+    this.deviceProduct = options.deviceProduct || 'Unknown';
+    /** @type {string} */
+    this.deviceVersion = options.deviceVersion || 'Unknown';
+    /** @type {string} */
+    this.deviceEventClassId = options.deviceEventClassId || 'Unknown';
+    /** @type {string} */
+    this.name = options.name || 'Unknown';
+    /** @type {string} */
+    this.severity = options.severity || 'Unknown';
+    /** @type {object} */
+    this.extensions = options.extensions || {
+      'deviceAction': null,
+      'applicationProtocol': null,
+      'deviceCustomIPv6Address1': null,
+      'deviceCustomIPv6 Address1Label': null,
+      'deviceCustomIPv6Address3': null,
+      'deviceCustomIPv6Address3 Label': null,
+      'deviceCustomIPv6 Address4': null,
+      'deviceCustomIPv6 Address4Label': null,
+      'deviceEventCategory': null,
+      'deviceCustomFloatingPoint1': null,
+      'deviceCustom FloatingPoint1Label': null,
+      'deviceCustomFloatingPoint2': null,
+      'deviceCustomFloatingPoint2 Label': null,
+      'deviceCustomFloatingPoint3': null,
+      'deviceCustom FloatingPoint3Label': null,
+      'deviceCustomFloatingPoint4': null,
+      'deviceCustom FloatingPoint4Label': null,
+      'deviceCustomNumber1': null,
+      'deviceCustomNumber1Label': null,
+      'DeviceCustomNumber2': null,
+      'deviceCustomNumber2Label': null,
+      'deviceCustomNumber3': null,
+      'deviceCustomNumber3Label': null,
+      'baseEventCount': null,
+      'deviceCustomString1': null,
+      'deviceCustomString1Label': null,
+      'deviceCustomString2': null,
+      'deviceCustomString2Label': null,
+      'deviceCustomString3': null,
+      'deviceCustomString3Label': null,
+      'deviceCustomString4': null,
+      'deviceCustomString4Label': null,
+      'deviceCustomString5': null,
+      'deviceCustomString5Label': null,
+      'deviceCustomString6': null,
+      'deviceCustomString6Label': null,
+      'destinationDnsDomain': null,
+      'destinationServiceName': null,
+      'destinationTranslated Address': null,
+      'destinationTranslatedPort': null,
+      'deviceCustomDate1': null,
+      'deviceCustomDate1Label': null,
+      'deviceCustomDate2': null,
+      'deviceCustomDate2Label': null,
+      'deviceDirection': null,
+      'deviceDnsDomain': null,
+      'deviceExternalId': null,
+      'deviceFacility': null,
+      'deviceInboundInterface': null,
+      'deviceNtDomain': null,
+      'deviceOutboundInterface': null,
+      'devicePayloadId': null,
+      'deviceProcessName': null,
+      'deviceTranslatedAddress': null,
+      'destinationHostName': null,
+      'destinationMacAddress': null,
+      'destinationNtDomain': null,
+      'destinationProcessId': null,
+      'destinationUserPrivileges': null,
+      'destinationProcessName': null,
+      'destinationPort': null,
+      'destinationAddress': null,
+      'deviceTimeZone': null,
+      'destinationUserId': null,
+      'destinationUserName': null,
+      'deviceAddress': null,
+      'deviceHostName': null,
+      'deviceMacAddress': null,
+      'deviceProcessId': null,
+      'endTime': null,
+      'externalId': null,
+      'fileCreateTime': null,
+      'fileHash': null,
+      'fileId': null,
+      'fileModificationTime': null,
+      'filePath': null,
+      'filePermission': null,
+      'fileType': null,
+      'flexDate1': null,
+      'flexDate1Label': null,
+      'flexString1': null,
+      'flexString1Label': null,
+      'flexString2': null,
+      'flexString2Label': null,
+      'filename': null,
+      'fileSize': null,
+      'bytesIn': null,
+      'message': null,
+      'oldFileCreateTime': null,
+      'oldFileHash': null,
+      'oldFileId': null,
+      'oldFileModificationTime': null,
+      'oldFileName': null,
+      'oldFilePath': null,
+      'oldFileSize': null,
+      'oldFileType': null,
+      'bytesOut': null,
+      'eventOutcome': null,
+      'transportProtocol': null,
+      'Reason': null,
+      'requestUrl': null,
+      'requestClientApplication': null,
+      'requestContext': null,
+      'requestCookies': null,
+      'requestMethod': null,
+      'deviceReceiptTime': null,
+      'sourceHostName': null,
+      'sourceMacAddress': null,
+      'sourceNtDomain': null,
+      'sourceDnsDomain': null,
+      'sourceServiceName': null,
+      'sourceTranslatedAddress': null,
+      'sourceTranslatedPort': null,
+      'sourceProcessId': null,
+      'sourceUserPrivileges': null,
+      'sourceProcessName': null,
+      'sourcePort': null,
+      'sourceAddress': null,
+      'startTime': null,
+      'sourceUserId': null,
+      'sourceUserName': null,
+      'type': null,
+      'agentDnsDomain': null,
+      'agentNtDomain': null,
+      'agentTranslatedAddress': null,
+      'agentTranslatedZone ExternalID': null,
+      'agentTranslatedZoneURI': null,
+      'agentZoneExternalID': null,
+      'agentZoneURI': null,
+      'agentAddress': null,
+      'agentHostName': null,
+      'agentId': null,
+      'agentMacAddress': null,
+      'agentReceiptTime': null,
+      'agentType': null,
+      'agentTimeZone': null,
+      'agentVersion': null,
+      'customerExternalID': null,
+      'customerURI': null,
+      'destinationTranslated ZoneExternalID': null,
+      'destinationTranslated ZoneURI': null,
+      'destinationZoneExternalID': null,
+      'destinationZoneURI': null,
+      'deviceTranslatedZone ExternalID': null,
+      'deviceTranslatedZoneURI': null,
+      'deviceZoneExternalID': null,
+      'deviceZoneURI': null,
+      'destinationGeoLatitude': null,
+      'destinationGeoLongitude': null,
+      'eventId': null,
+      'rawEvent': null,
+      'sourceGeoLatitude': null,
+      'sourceGeoLongitude': null,
+      'sourceTranslatedZone ExternalID': null,
+      'sourceTranslatedZoneURI': null,
+      'sourceZoneExternalID': null,
+      'sourceZoneURI': null,
+    };
+    if (options.server) {
+      if (options.server.constructor__) {
+        /** @private @type {Syslog} */
+        this.server = options.server;
+      } else {
+        this.server = new Syslog(options.server);
+      }
+    }
+  }
+  /**
+   * Validate this CEF object
+   * @public
+   * @return {Promise} - True if valadated
+   * @throws {Error} - First element to fail valadation
+   */  
+  validate () {
+    return new Promise ((resolve, reject) => {
+      const Extensions = {
+        'deviceAction': {key: 'act', type:'String', len:63,  discription: 'Action taken by the device.'},
+        'applicationProtocol': {key: 'app', type:'String', len:31,  discription: 'Application level protocol, example values are HTTP, HTTPS, SSHv2, Telnet, POP, IMPA, IMAPS, and so on.'},
+        'deviceCustomIPv6Address1': {key: 'c6a1', type:'String', len:null,  discription: 'One of four IPv6 address fields available to map fields that do not apply to any other in this dictionary. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomIPv6 Address1Label': {key: 'c6a1Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomIPv6Address3': {key: 'c6a3', type:'String', len:null,  discription: 'One of four IPv6 address fields available to map fields that do not apply to any other in this dictionary. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomIPv6Address3 Label': {key: 'c6a3Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomIPv6 Address4': {key: 'c6a4', type:'String', len:null,  discription: 'One of four IPv6 address fields available to map fields that do not apply to any other in this dictionary. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomIPv6 Address4Label': {key: 'C6a4Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceEventCategory': {key: 'cat', type:'String', len:1023,  discription: 'Represents the category assigned by the originating device. Devices often use their own categorization schema to classify event. Example: “/Monitor/Disk/Read”'},
+        'deviceCustomFloatingPoint1': {key: 'cfp1', type:'Number', len:null,  discription: 'One of four floating point fields available to map fields that do not apply to any other in this dictionary.'},
+        'deviceCustom FloatingPoint1Label': {key: 'cfp1Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomFloatingPoint2': {key: 'cfp2', type:'Number', len:null,  discription: 'One of four floating point fields available to map fields that do not apply to any other in this dictionary.'},
+        'deviceCustomFloatingPoint2 Label': {key: 'cfp2Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomFloatingPoint3': {key: 'cfp3', type:'Number', len:null,  discription: 'One of four floating point fields available to map fields that do not apply to any other in this dictionary.'},
+        'deviceCustom FloatingPoint3Label': {key: 'cfp3Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomFloatingPoint4': {key: 'cfp4', type:'Number', len:null,  discription: 'One of four floating point fields available to map fields that do not apply to any other in this dictionary.'},
+        'deviceCustom FloatingPoint4Label': {key: 'cfp4Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomNumber1': {key: 'cn1', type:'Number', len:null,  discription: 'One of three number fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible.'},
+        'deviceCustomNumber1Label': {key: 'cn1Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'DeviceCustomNumber2': {key: 'cn2', type:'Number', len:null,  discription: 'One of three number fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible.'},
+        'deviceCustomNumber2Label': {key: 'cn2Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomNumber3': {key: 'cn3', type:'Number', len:null,  discription: 'One of three number fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible.'},
+        'deviceCustomNumber3Label': {key: 'cn3Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'baseEventCount': {key: 'cnt', type:'Number', len:null,  discription: 'A count associated with this event. How many times was this same event observed? Count can be omitted if it is 1.'},
+        'deviceCustomString1': {key: 'cs1', type:'String', len:4000,  discription: 'One of six strings available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomString1Label': {key: 'cs1Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomString2': {key: 'cs2', type:'String', len:4000,  discription: 'One of six strings available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomString2Label': {key: 'cs2Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomString3': {key: 'cs3', type:'String', len:4000,  discription: 'One of six strings available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomString3Label': {key: 'cs3Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomString4': {key: 'cs4', type:'String', len:4000,  discription: 'One of six strings available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomString4Label': {key: 'cs4Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomString5': {key: 'cs5', type:'String', len:4000,  discription: 'One of six strings available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomString5Label': {key: 'cs5Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomString6': {key: 'cs6', type:'String', len:4000,  discription: 'One of six strings available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomString6Label': {key: 'cs6Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'destinationDnsDomain': {key: 'destination DnsDomain', type:'String', len:255,  discription: 'The DNS domain part of the complete fully qualified domain name (FQDN).'},
+        'destinationServiceName': {key: 'destination ServiceName', type:'String', len:1023,  discription: 'The service targeted by this event. Example: “sshd”'},
+        'destinationTranslated Address': {key: 'Destination Translated Address', type:'String', len:null,  discription: 'Identifies the translated destination that the event refers to in an IP network. The format is an IPv4 address. Example: “192.168.10.1”'},
+        'destinationTranslatedPort': {key: 'Destination TranslatedPort', type:'Number', len:null,  discription: 'Port after it was translated; for example, a firewall. Valid port numbers are 0 to 65535.'},
+        'deviceCustomDate1': {key: 'deviceCustom Date1', type:'String', len:null,  discription: 'One of two timestamp fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomDate1Label': {key: 'deviceCustom Date1Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceCustomDate2': {key: 'deviceCustom Date2', type:'String', len:null,  discription: 'One of two timestamp fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. TIP: See the guidelines under “User-Defined Extensions” for tips on using these fields.'},
+        'deviceCustomDate2Label': {key: 'deviceCustom Date2Label', type:'String', len:1023,  discription: 'All custom fields have a corresponding label field. Each of these fields is a string and describes the purpose of the custom field.'},
+        'deviceDirection': {key: 'deviceDirection', type:'Number', len:null,  discription: 'Any information about what direction the observed communication has taken. The following values are supported: “0” for inbound or “1” for outbound'},
+        'deviceDnsDomain': {key: 'deviceDns Domain', type:'String', len:255,  discription: 'The DNS domain part of the complete fully qualified domain name (FQDN).'},
+        'deviceExternalId': {key: 'device ExternalId', type:'String', len:255,  discription: 'A name that uniquely identifies the device generating this event.'},
+        'deviceFacility': {key: 'deviceFacility', type:'String', len:1023,  discription: 'The facility generating this event. For example, Syslog has an explicit facility associated with every event.'},
+        'deviceInboundInterface': {key: 'deviceInbound Interface', type:'String', len:128,  discription: 'Interface on which the packet or data entered the device.'},
+        'deviceNtDomain': {key: 'deviceNt Domain', type:'String', len:255,  discription: 'The Windows domain name of the device address.'},
+        'deviceOutboundInterface': {key: 'Device Outbound Interface', type:'String', len:128,  discription: 'Interface on which the packet or data left the device.'},
+        'devicePayloadId': {key: 'Device PayloadId', type:'String', len:128,  discription: 'Unique identifier for the payload associated with the event.'},
+        'deviceProcessName': {key: 'deviceProcess Name', type:'String', len:1023,  discription: 'Process name associated with the event. An example might be the process generating the syslog entry in UNIX.'},
+        'deviceTranslatedAddress': {key: 'device Translated Address', type:'String', len:null,  discription: 'Identifies the translated device address that the event refers to in an IP network. The format is an IPv4 address. Example: “192.168.10.1”'},
+        'destinationHostName': {key: 'dhost', type:'String', len:1023,  discription: 'Identifies the destination that an event refers to in an IP network. The format should be a fully qualified domain name (FQDN) associated with the destination node, when a node is available. Examples: “host.domain.com” or “host”.'},
+        'destinationMacAddress': {key: 'dmac', type:'String', len:null,  discription: 'Six colon-seperated hexadecimal numbers. Example: “00:0D:60:AF:1B:61”'},
+        'destinationNtDomain': {key: 'dntdom', type:'String', len:255,  discription: 'The Windows domain name of the destination address.'},
+        'destinationProcessId': {key: 'dpid', type:'Number', len:null,  discription: 'Provides the ID of the destination process associated with the event. For example, if an event contains process ID 105, “105” is the process ID.'},
+        'destinationUserPrivileges': {key: 'dpriv', type:'String', len:1023,  discription: 'The typical values are “Administrator”, “User”, and “Guest”. This identifies the destination user’s privileges. In UNIX, for example, activity executed on the root user would be identified with destinationUser Privileges of “Administrator”.'},
+        'destinationProcessName': {key: 'dproc', type:'String', len:1023,  discription: 'The name of the event’s destination process. Example: “telnetd” or “sshd”.'},
+        'destinationPort': {key: 'dpt', type:'Number', len:null,  discription: 'The valid port numbers are between 0 and 65535.'},
+        'destinationAddress': {key: 'dst', type:'String', len:null,  discription: 'Identifies the destination address that the event refers to in an IP network. The format is an IPv4 address. Example: “192.168.10.1”'},
+        'deviceTimeZone': {key: 'dtz', type:'String', len:255,  discription: 'The timezone for the device generating the event.'},
+        'destinationUserId': {key: 'duid', type:'String', len:1023,  discription: 'Identifies the destination user by ID. For example, in UNIX, the root user is generally associated with user ID 0.'},
+        'destinationUserName': {key: 'duser', type:'String', len:1023,  discription: 'Identifies the destination user by name. This is the user associated with the event’s destination. Email addresses are often mapped into the UserName fields. The recipient is a candidate to put into this field.'},
+        'deviceAddress': {key: 'dvc', type:'String', len:null,  discription: 'Identifies the device address that an event refers to in an IP network. The format is an IPv4 address. Example: “192.168.10.1”.'},
+        'deviceHostName': {key: 'dvchost', type:'String', len:100,  discription: 'The format should be a fully qualified domain name (FQDN) associated with the device node, when a node is available. Example: “host.domain.com” or “host”.'},
+        'deviceMacAddress': {key: 'dvcmac', type:'String', len:null,  discription: 'Six colon-separated hexadecimal numbers. Example: “00:0D:60:AF:1B:61”'},
+        'deviceProcessId': {key: 'dvcpid', type:'Number', len:null,  discription: 'Provides the ID of the process on the device generating the event.'},
+        'endTime': {key: 'end', type:'String', len:null,  discription: 'The time at which the activity related to the event ended. The format is MMM dd yyyy HH:mm:ss or milliseconds since epoch (Jan 1st1970). An example would be reporting the end of a session.'},
+        'externalId': {key: 'externalId', type:'String', len:40,  discription: 'The ID used by an originating device. They are usually increasing numbers, associated with events.'},
+        'fileCreateTime': {key: 'fileCreateTime', type:'String', len:null,  discription: 'Time when the file was created.'},
+        'fileHash': {key: 'fileHash', type:'String', len:255,  discription: 'Hash of a file.'},
+        'fileId': {key: 'fileId', type:'String', len:1023,  discription: 'An ID associated with a file could be the inode.'},
+        'fileModificationTime': {key: 'fileModification Time', type:'String', len:null,  discription: 'Time when the file was last modified.'},
+        'filePath': {key: 'filePath', type:'String', len:1023,  discription: 'Full path to the file, including file name itself. Example: C:\Program Files \WindowsNT\Accessories\ wordpad.exe or /usr/bin/zip'},
+        'filePermission': {key: 'filePermission', type:'String', len:1023,  discription: 'Permissions of the file.'},
+        'fileType': {key: 'fileType', type:'String', len:1023,  discription: 'Type of file (pipe, socket, etc.)'},
+        'flexDate1': {key: 'flexDate1', type:'String', len:null,  discription: 'A timestamp field available to map a timestamp that does not apply to any other defined timestamp field in this dictionary. Use all flex fields sparingly and seek a more specific, dictionary supplied field when possible. These fields are typically reserved for customer use and should not be set by vendors unless necessary.'},
+        'flexDate1Label': {key: 'flexDate1Label', type:'String', len:128,  discription: 'The label field is a string and describes the purpose of the flex field.'},
+        'flexString1': {key: 'flexString1', type:'String', len:1023,  discription: 'One of four floating point fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. These fields are typically reserved for customer use and should not be set by vendors unless necessary.'},
+        'flexString1Label': {key: 'flexString1 Label', type:'String', len:128,  discription: 'The label field is a string and describes the purpose of the flex field.'},
+        'flexString2': {key: 'flexString2', type:'String', len:1023,  discription: 'One of four floating point fields available to map fields that do not apply to any other in this dictionary. Use sparingly and seek a more specific, dictionary supplied field when possible. These fields are typically reserved for customer use and should not be set by vendors unless necessary.'},
+        'flexString2Label': {key: 'flex String2Label', type:'String', len:128,  discription: 'The label field is a string and describes the purpose of the flex field.'},
+        'filename': {key: 'fname', type:'String', len:1023,  discription: 'Name of the file only (without its path).'},
+        'fileSize': {key: 'fsize', type:'Number', len:null,  discription: 'Size of the file.'},
+        'bytesIn': {key: 'in', type:'Number', len:null,  discription: 'Number of bytes transferred inbound, relative to the source to destination relationship, meaning that data was flowing from source to destination.'},
+        'message': {key: 'msg', type:'String', len:1023,  discription: 'An arbitrary message giving more details about the event. Multi-line entries can be produced by using \n as the new line separator.'},
+        'oldFileCreateTime': {key: 'oldFileCreate Time', type:'String', len:null,  discription: 'Time when old file was created.'},
+        'oldFileHash': {key: 'oldFileHash', type:'String', len:255,  discription: 'Hash of the old file.'},
+        'oldFileId': {key: 'oldFileId', type:'String', len:1023,  discription: 'An ID associated with the old file could be the inode.'},
+        'oldFileModificationTime': {key: 'oldFile Modification Time', type:'String', len:null,  discription: 'Time when old file was last modified.'},
+        'oldFileName': {key: 'oldFileName', type:'String', len:1023,  discription: 'Name of the old file.'},
+        'oldFilePath': {key: 'oldFilePath', type:'String', len:1023,  discription: 'Full path to the old fiWindowsNT\Accessories le, including the file name itself. Examples: c:\Program Files\wordpad.exe or /usr/bin/zip'},
+        'oldFileSize': {key: 'oldFileSize', type:'Number', len:null,  discription: 'Size of the old file.'},
+        'oldFileType': {key: 'oldFileType', type:'String', len:1023,  discription: 'Type of the old file (pipe, socket, etc.)'},
+        'bytesOut': {key: 'out', type:'Number', len:null,  discription: 'Number of bytes transferred outbound relative to the source to destination relationship. For example, the byte number of data flowing from the destination to the source.'},
+        'eventOutcome': {key: 'outcome', type:'String', len:63,  discription: 'Displays the outcome, usually as ‘success’ or ‘failure’.'},
+        'transportProtocol': {key: 'proto', type:'String', len:31,  discription: 'Identifies the Layer-4 protocol used. The possible values are protocols such as TCP or UDP.'},
+        'Reason': {key: 'reason', type:'String', len:1023,  discription: 'The reason an audit event was generated. For example “badd password” or “unknown user”. This could also be an error or return code. Example: “0x1234”'},
+        'requestUrl': {key: 'request', type:'String', len:1023,  discription: 'In the case of an HTTP request, this field contains the URL accessed. The URL should contain the protocol as well. Example: “http://www/secure.com”'},
+        'requestClientApplication': {key: 'requestClient Application', type:'String', len:1023,  discription: 'The User-Agent associated with the request.'},
+        'requestContext': {key: 'requestContext', type:'String', len:2048,  discription: 'Description of the content from which the request originated (for example, HTTP Referrer)'},
+        'requestCookies': {key: 'requestCookies', type:'String', len:1023,  discription: 'Cookies associated with the request.'},
+        'requestMethod': {key: 'requestMethod', type:'String', len:1023,  discription: 'The method used to access a URL. Possible values: “POST”, “GET”, etc.'},
+        'deviceReceiptTime': {key: 'rt', type:'String', len:null,  discription: 'The time at which the event related to the activity was received. The format is MMM dd yyyy HH:mm:ss or milliseconds since epoch (Jan 1st 1970)'},
+        'sourceHostName': {key: 'shost', type:'String', len:1023,  discription: 'Identifies the source that an event refers to in an IP network. The format should be a fully qualified domain name (DQDN) associated with the source node, when a mode is available. Examples: “host” or “host.domain.com”.'},
+        'sourceMacAddress': {key: 'smac', type:'String', len:null,  discription: 'Six colon-separated hexadecimal numbers. Example: “00:0D:60:AF:1B:61”'},
+        'sourceNtDomain': {key: 'sntdom', type:'String', len:255,  discription: 'The Windows domain name for the source address.'},
+        'sourceDnsDomain': {key: 'sourceDns Domain', type:'String', len:255,  discription: 'The DNS domain part of the complete fully qualified domain name (FQDN).'},
+        'sourceServiceName': {key: 'source ServiceName', type:'String', len:1023,  discription: 'The service that is responsible for generating this event.'},
+        'sourceTranslatedAddress': {key: 'source Translated Address', type:'String', len:null,  discription: 'Identifies the translated source that the event refers to in an IP network. The format is an IPv4 address. Example: “192.168.10.1”.'},
+        'sourceTranslatedPort': {key: 'source TranslatedPort', type:'Number', len:null,  discription: 'A port number after being translated by, for example, a firewall. Valid port numbers are 0 to 65535.'},
+        'sourceProcessId': {key: 'spid', type:'Number', len:null,  discription: 'The ID of the source process associated with the event.'},
+        'sourceUserPrivileges': {key: 'spriv', type:'String', len:1023,  discription: 'The typical values are “Administrator”, “User”, and “Guest”. It identifies the source user’s privileges. In UNIX, for example, activity executed by the root user would be identified with “Administrator”.'},
+        'sourceProcessName': {key: 'sproc', type:'String', len:1023,  discription: 'The name of the event’s source process.'},
+        'sourcePort': {key: 'spt', type:'Number', len:null,  discription: 'The valid port numbers are 0 to 65535.'},
+        'sourceAddress': {key: 'src', type:'String', len:null,  discription: 'Identifies the source that an event refers to in an IP network. The format is an IPv4 address. Example: “192.168.10.1”.'},
+        'startTime': {key: 'start', type:'String', len:null,  discription: 'The time when the activity the event referred to started. The format is MMM dd yyyy HH:mm:ss or milliseconds since epoch (Jan 1st 1970)'},
+        'sourceUserId': {key: 'suid', type:'String', len:1023,  discription: 'Identifies the source user by ID. This is the user associated with the source of the event. For example, in UNIX, the root user is generally associated with user ID 0.'},
+        'sourceUserName': {key: 'suser', type:'String', len:1023,  discription: 'Identifies the source user by name. Email addresses are also mapped into the UserName fields. The sender is a candidate to put into this field.'},
+        'type': {key: 'type', type:'Number', len:null,  discription: '0 means base event, 1 means aggregated, 2 means correlation, and 3 means action. This field can be omitted for base events (type 0).'},
+        'agentDnsDomain': {key: 'agentDns Domain', type:'String', len:255,  discription: 'The DNS domain name of the ArcSight connector that processed the event.'},
+        'agentNtDomain': {key: 'agentNtDomain', type:'String', len:255,  discription: ''},
+        'agentTranslatedAddress': {key: 'agentTranslated Address', type:'String', len:null,  discription: ''},
+        'agentTranslatedZone ExternalID': {key: 'agentTranslated ZoneExternalID', type:'String', len:200,  discription: ''},
+        'agentTranslatedZoneURI': {key: 'agentTranslated Zone URI', type:'String', len:2048,  discription: ''},
+        'agentZoneExternalID': {key: 'agentZone ExternalID', type:'String', len:200,  discription: ''},
+        'agentZoneURI': {key: 'agentZoneURI', type:'String', len:2048,  discription: ''},
+        'agentAddress': {key: 'agt', type:'String', len:null,  discription: 'The IP address of the ArcSight connector that processed the event.'},
+        'agentHostName': {key: 'ahost', type:'String', len:1023,  discription: 'The hostname of the ArcSight connector that processed the event.'},
+        'agentId': {key: 'aid', type:'String', len:40,  discription: 'The agent ID of the ArcSight connector that processed the event.'},
+        'agentMacAddress': {key: 'amac', type:'String', len:null,  discription: 'The MAC address of the ArcSight connector that processed the event.'},
+        'agentReceiptTime': {key: 'art', type:'String', len:null,  discription: 'The time at which information about the event was received by the ArcSight connector.'},
+        'agentType': {key: 'at', type:'String', len:63,  discription: 'The agent type of the ArcSight connector that processed the event'},
+        'agentTimeZone': {key: 'atz', type:'String', len:255,  discription: 'The agent time zone of the ArcSight connector that processed the event.'},
+        'agentVersion': {key: 'av', type:'String', len:31,  discription: 'The version of the ArcSight connector that processed the event.'},
+        'customerExternalID': {key: 'customer ExternalID', type:'String', len:200,  discription: ''},
+        'customerURI': {key: 'customerURI', type:'String', len:2048,  discription: ''},
+        'destinationTranslated ZoneExternalID': {key: 'destination TranslatedZone ExternalID', type:'String', len:200,  discription: ''},
+        'destinationTranslated ZoneURI': {key: 'destination Translated ZoneURI', type:'String', len:2048,  discription: 'The URI for the Translated Zone that the destination asset has been assigned to in ArcSight.'},
+        'destinationZoneExternalID': {key: 'destinationZone ExternalID', type:'String', len:200,  discription: ''},
+        'destinationZoneURI': {key: 'destinationZone URI', type:'String', len:2048,  discription: 'The URI for the Zone that the destination asset has been assigned to in ArcSight.'},
+        'deviceTranslatedZone ExternalID': {key: 'device TranslatedZone ExternalID', type:'String', len:200,  discription: ''},
+        'deviceTranslatedZoneURI': {key: 'device TranslatedZone URI', type:'String', len:2048,  discription: 'The URI for the Translated Zone that the device asset has been assigned to in ArcSight.'},
+        'deviceZoneExternalID': {key: 'deviceZone ExternalID', type:'String', len:200,  discription: ''},
+        'deviceZoneURI': {key: 'deviceZoneURI', type:'String', len:2048,  discription: 'Thee URI for the Zone that the device asset has been assigned to in ArcSight.'},
+        'destinationGeoLatitude': {key: 'dlat', type:'Number', len:null,  discription: 'The latitudinal value from which the destination’s IP address belongs.'},
+        'destinationGeoLongitude': {key: 'dlong', type:'Number', len:null,  discription: 'The longitudinal value from which the destination’s IP address belongs.'},
+        'eventId': {key: 'eventId', type:'Number', len:null,  discription: 'This is a unique ID that ArcSight assigns to each event.'},
+        'rawEvent': {key: 'rawEvent', type:'String', len:4000,  discription: ''},
+        'sourceGeoLatitude': {key: 'slat', type:'Number', len:null,  discription: ''},
+        'sourceGeoLongitude': {key: 'slong', type:'Number', len:null,  discription: ''},
+        'sourceTranslatedZone ExternalID': {key: 'source TranslatedZone ExternalID', type:'String', len:200,  discription: ''},
+        'sourceTranslatedZoneURI': {key: 'source TranslatedZone URI', type:'String', len:2048,  discription: 'The URI for the Translated Zone that the destination asset has been assigned to in ArcSight.'},
+        'sourceZoneExternalID': {key: 'sourceZone ExternalID', type:'String', len:200,  discription: ''},
+        'sourceZoneURI': {key: 'sourceZoneURI', type:'String', len:2048,  discription: 'The URI for the Zone that the source asset has been assigned to in ArcSight.'},
+      };
+      if (typeof this.deviceVendor !== 'string'
+          || typeof this.deviceProduct !== 'string'
+          || typeof this.deviceVersion !== 'string'
+      ) {
+        reject(new Error('TYPE ERROR: CEF Device Info must be a string'));
+      }
+      if (this.severity
+          && (
+            (
+              typeof this.severity === 'string'
+              && (
+                this.severity !== 'Unknown'
+                && this.severity !== 'Low'
+                && this.severity !== 'Medium'
+                && this.severity !== 'High'
+                && this.severity !== 'Very-High'
+              )
+            )
+            || (
+              typeof this.severity === 'number'
+              && (
+                this.severity < 0
+                || this.severity > 10
+              )
+            )
+          )
+      ) {
+        reject(new Error('TYPE ERROR: CEF Severity not set correctly'));
+      }
+      const cefExts = Object.entries(this.extensions);
+      const cefExtsLen = cefExts.length;
+      for (let ext = 0; ext < cefExtsLen; ext++) {
+        if (cefExts[ext][1] !== null) {
+          if(Extensions[cefExts[ext][0]]) {
+            if (typeof cefExts[ext][1] === Extensions[cefExts[ext][0]]
+                .type
+                .toLowerCase()) {
+              if (Extensions[cefExts[ext][0]].len > 0
+                  && typeof cefExts[ext][1] === 'string'
+                  && cefExts[ext][1].length > Extensions[cefExts[ext][0]].len){
+                let errMsg = 'FORMAT ERROR:';
+                errMsg += ' CEF Extention Key';
+                errMsg += ' ' + cefExts[ext][0];
+                errMsg += ' value length is to long;';
+                errMsg += ' max length is';
+                errMsg += ' ' + Extensions[cefExts[ext][0]].len;
+                reject(new Error(errMsg));
+              }
+            } else {
+              let errMsg = 'TYPE ERROR:';
+              errMsg += ' CEF Key';
+              errMsg += ' ' + cefExts[ext][0];
+              errMsg += ' value type was expected to be';
+              errMsg += ' ' + Extensions[cefExts[ext][0]].type.toLowerCase();
+              reject(new Error(errMsg));
+            }
+          }
+        }
+      }
+      resolve(true);
+    });
+  }
+  /**
+   * Build a CEF formated string
+   * @public
+   * @return {Promise} - String with formated message
+   */    
+  buildMessage () {
+    return new Promise((resolve, reject) => {
+      let fmtMsg = 'CEF:0';
+      fmtMsg += '|' + this.deviceVendor;
+      fmtMsg += '|' + this.deviceProduct;
+      fmtMsg += '|' + this.deviceVersion;
+      fmtMsg += '|' + this.deviceEventClassId;
+      fmtMsg += '|' + this.name;
+      fmtMsg += '|' + this.severity;
+      fmtMsg += '|';
+      
+      const cefExts = Object.entries(this.extensions);
+      const cefExtsLen = cefExts.length;
+      for (let ext = 0; ext < cefExtsLen; ext++) {
+        if (cefExts[ext][1] !== null) {
+          fmtMsg += cefExts[ext][0] + '=' + cefExts[ext][1] + ' ';
+        }
+      }
+      resolve(fmtMsg);
+    });
+  }
+  /**
+   * @public
+   * @param {Syslog} [options=false] - A {@link module:SyslogPro~Syslog|
+   *    Syslog server connection} that should be used to send messages directly 
+   *    from this class. @see SyslogPro~Syslog
+   */
+  send (options) {
+    return new Promise((resolve, reject) => {
+      this.buildMessage()
+        .then((result) => {
+          if (!this.server) {
+            this.server = new Syslog(options);
+          }
+          this.server.send(result)
+            .then((sendResult) => {
+              resolve(sendResult);
+            })
+            .catch((reson) => {
+              reject(reson);
+            });
+        });
+    });
+  }
+}
+
+module.exports = {
+  RgbToAnsi: rgbToAnsi,
+  RFC3164: RFC3164,
+  RFC5424:RFC5424,
+  LEEF: LEEF,
+  CEF: CEF,
+  Syslog: Syslog
+};
+
+
+ + + + + + +
+ +
+ +
+ Documentation generated by JSDoc 3.5.5 on Mon Sep 24 2018 06:41:35 GMT+0000 (Coordinated Universal Time) using the docdash theme. +
+ + + + + + + diff --git a/docs/module-SyslogPro-CEF.html b/docs/module-SyslogPro-CEF.html new file mode 100644 index 0000000..2ed9944 --- /dev/null +++ b/docs/module-SyslogPro-CEF.html @@ -0,0 +1,1619 @@ + + + + + + CEF - Documentation + + + + + + + + + + + + + + + + + + +
+ +

CEF

+ + + + + + + +
+ +
+ +

+ SyslogPro~ + + CEF +

+ +
A class to work with HP CEF (Common Event Format) messages. This form +of system messages are designed to work with security systems. Messages can +be saved to file (Saving to file if not part of this module but a CEF +formated mesage produced by this module can be saved externaly to it) or +sent via Syslog.
+ + +
+ +
+ +
+ + + + +

Constructor

+ + +

new CEF(optionsopt)

+ + + + + + +
+ + +
Source:
+
+ + + +
Version:
+
  • 0.0.0
+ + + +
Since:
+
  • 0.0.0
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Construct a new CEF object with user options +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
Options object +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
deviceVendor + + +string + + + + + + <optional>
+ + + + + +
+ + 'unknown' + + The vendor of the system + that genrated the event being reported
deviceProduct + + +string + + + + + + <optional>
+ + + + + +
+ + 'unknown' + + The product name of the + system that genrated the event being reported
deviceVersion + + +string + + + + + + <optional>
+ + + + + +
+ + 'unknown' + + The version name of the + system that genrated the event being reported
deviceEventClassId + + +string + + + + + + <optional>
+ + + + + +
+ + 'unknown' + + The eventId of the + system that genrated the event being reported
name + + +string + + + + + + <optional>
+ + + + + +
+ + 'unknown' + + Name of the service genrating + the notice
severity + + +string + + + + + + <optional>
+ + + + + +
+ + 'unknown' + + Severity of the notification
extensions + + +string + + + + + + <optional>
+ + + + + +
+ + {} + + Any CEF Key=Value extentions
server + + +Syslog + + + + + + <optional>
+ + + + + +
+ + false + + A Syslog server connection that should be used to send messages directly + from this class. @see SyslogPro~Syslog
+ +
+ + + + +
Requires:
+
    +
  • module:moment
  • +
+ + + + + + + + + + + + + + +
+ + + + + +

Requires

+ +
    +
  • module:moment
  • +
+ + + + + + + + + +

Members

+ + + +

(private) constructor__

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

deviceEventClassId :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

deviceProduct :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

deviceVendor :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

deviceVersion :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

extensions :object

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +object + + +
  • +
+ + + + + + + + +

name :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

(private) server

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

severity :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + + + +

Methods

+ + + + + + +

buildMessage() → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Build a CEF formated string +
+ + + + + + + + + + + + + + + + + + + + + + + +
Returns:
+ + +
+ - String with formated message +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

send(optionsopt)

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
options + + +Syslog + + + + + + <optional>
+ + + + + +
+ + false + + A Syslog server connection that should be used to send messages directly + from this class. @see SyslogPro~Syslog
+ + + + + + + + + + + + + + + + + + + + + +

validate() → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Validate this CEF object +
+ + + + + + + + + + + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - First element to fail valadation +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - True if valadated +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + + +
+ +
+ + + + + + +
+ +
+ +
+ Documentation generated by JSDoc 3.5.5 on Mon Sep 24 2018 06:41:35 GMT+0000 (Coordinated Universal Time) using the docdash theme. +
+ + + + + + + \ No newline at end of file diff --git a/docs/module-SyslogPro-LEEF.html b/docs/module-SyslogPro-LEEF.html new file mode 100644 index 0000000..de36096 --- /dev/null +++ b/docs/module-SyslogPro-LEEF.html @@ -0,0 +1,1376 @@ + + + + + + LEEF - Documentation + + + + + + + + + + + + + + + + + + +
+ +

LEEF

+ + + + + + + +
+ +
+ +

+ SyslogPro~ + + LEEF +

+ +
A class to work with IBM LEEF (Log Event Extended Format) messages this form +of system messages are designed to work with security systems. Messages can +be saved to file (Saving to file if not part of this module but a LEEF +formated mesage produced by this module can be saved externaly to it) or +sent via Syslog.
+ + +
+ +
+ +
+ + + + +

Constructor

+ + +

new LEEF(optionsopt)

+ + + + + + +
+ + +
Source:
+
+ + + +
Version:
+
  • 0.0.0
+ + + +
Since:
+
  • 0.0.0
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Construct a new LEEF object with user options +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
Options object +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
vendor + + +string + + + + + + <optional>
+ + + + + +
+ + 'unknown' + + The vendor of the system that + genrated the event being reported
product + + +string + + + + + + <optional>
+ + + + + +
+ + 'unknown' + + The product name of the + system that genrated the event being reported
version + + +string + + + + + + <optional>
+ + + + + +
+ + 'unknown' + + The version name of the + system that genrated the event being reported
eventId + + +string + + + + + + <optional>
+ + + + + +
+ + 'unknown' + + The eventId of the + system that genrated the event being reported
attrabute + + +object + + + + + + <optional>
+ + + + + +
+ + LEEF message attrabutes which + defualts to all base attrabutes with null values, new attrabutes should + be added as new elements to this object
syslogHeader + + +boolean + + + + + + <optional>
+ + + + + +
+ + 'true' + + Should the LEEF message + include a Syslog header with Timestamp and source
server + + +Syslog + + + + + + <optional>
+ + + + + +
+ + false + + A Syslog server connection that should be used to send messages directly + from this class. @see SyslogPro~Syslog
+ +
+ + + + +
Requires:
+
    +
  • module:moment
  • +
+ + + + + + + + + + + + + + +
+ + + + + +

Requires

+ +
    +
  • module:moment
  • +
+ + + + + + + + + +

Members

+ + + +

attrabutes :object

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +object + + +
  • +
+ + + + + + + + +

(private) constructor__

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

eventId :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

product :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

(private) server

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

syslogHeader :boolean

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + + + + +

vendor :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

version :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + + + +

Methods

+ + + + + + +

buildMessage() → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Build a formated message +
+ + + + + + + + + + + + + + + + + + + + + + + +
Returns:
+ + +
+ - string with formated message +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

send(optionsopt)

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
options + + +Syslog + + + + + + <optional>
+ + + + + +
+ + false + + A Syslog server connection that should be used to send messages directly + from this class. @see SyslogPro~Syslog
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ +
+ +
+ Documentation generated by JSDoc 3.5.5 on Mon Sep 24 2018 06:41:35 GMT+0000 (Coordinated Universal Time) using the docdash theme. +
+ + + + + + + \ No newline at end of file diff --git a/docs/module-SyslogPro-RFC3164.html b/docs/module-SyslogPro-RFC3164.html new file mode 100644 index 0000000..dda9c08 --- /dev/null +++ b/docs/module-SyslogPro-RFC3164.html @@ -0,0 +1,5478 @@ + + + + + + RFC3164 - Documentation + + + + + + + + + + + + + + + + + + +
+ +

RFC3164

+ + + + + + + +
+ +
+ +

+ SyslogPro~ + + RFC3164 +

+ +
A class to work with RFC3164 formated syslog messages.
+ + +
+ +
+ +
+ + + + +

Constructor

+ + +

new RFC3164(optionsopt)

+ + + + + + +
+ + +
Source:
+
+ + + +
Version:
+
  • 0.0.0
+ + + +
Since:
+
  • 0.0.0
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Construct a new RFC3164 formated Syslog object with user options +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
Options object +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
applacationName + + +string + + + + + + <optional>
+ + + + + +
+ + 'NodeJSLogger' + + Applacation
hostname + + +string + + + + + + <optional>
+ + + + + +
+ + os.hostname + + The name of this server
facility + + +number + + + + + + <optional>
+ + + + + +
+ + 23 + + Facility code to use sending this + message
color + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Apply color coding encoding tag + with syslog message text
extendedColor + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Use the extedned ANSI + color set encoding tag with syslog message text
colors + + +object + + + + + + <optional>
+ + + + + +
+ + User defended colors for + severites +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
emergencyColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
alertColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
criticalColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
errorColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
warningColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
noticeColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
informationalColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
debugColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
+ +
server + + +Syslog + + + + + + <optional>
+ + + + + +
+ + false + + A Syslog server connection that should be used to send messages directly + from this class. @see SyslogPro~Syslog
+ +
+ + + + +
Requires:
+
    +
  • module:moment
  • +
+ + + + + + + + + + + + + + +
+ + + + + +

Requires

+ +
    +
  • module:moment
  • +
+ + + + + + + + + +

Members

+ + + +

(private) alertColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

color :boolean

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + + + + +

(private) constructor__

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

(private) criticalColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

(private) debugColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

(private) emergencyColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

(private) errorColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

extendedColor :boolean

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + + + + +

(private) informationalColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

(private) noticeColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

(private) server

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

(private) warningColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + +

alert(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 1 (Alert) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The alert message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

buildMessage(msg, optionsopt) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Building a formated message. Returns a promise with a formated message +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
msg + + +string + + + + + + + + + + The Syslog Message
options + + +object + + + + + + <optional>
+ + + + + +
Options object +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
severity + + +number + + + + + + <optional>
+ + + + + +
+ + 7 + + An array of structure
colorCode + + +number + + + + + + <optional>
+ + + + + +
+ + 36 + + The ANSI color code to use if + message coloration is selected
+ +
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ A standard error object +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ A Syslog formated string acording to the selected RFC +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

crit(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 2 (Critical) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The critical message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

critical(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 2 (Critical) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The critical message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

debug(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 7 (Debug) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The debug message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

emer(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 0 (Emergency) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The emergancy message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

emergency(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 0 (Emergency) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The emergancy message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

err(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 3 (Error) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The error message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

error(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 3 (Error) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The error message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

info(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 6 (Informational) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The informational message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

informational(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 6 (Informational) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The informational message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

log(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 6 (Informational) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The informational message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

note(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 5 (Notice) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The notice message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

notice(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 5 (Notice) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The notice message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

send(msg, optionsopt) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+
    +
  • SyslogPro~Syslog
  • +
+
+ + + +
+ + + + + +
+ send a RFC5424 formated message. Returns a promise with the formated + message that was sent. If no server connection was defined when the + class was created a defualt Syslog connector will be used. +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
msg + + +string + + + + + + + + + + The unformated Syslog message to send
options + + +object + + + + + + <optional>
+ + + + + +
Options object +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
severity + + +number + + + + + + <optional>
+ + + + + +
+ + 7 + + An array of structure
colorCode + + +number + + + + + + <optional>
+ + + + + +
+ + 36 + + The ANSI color code to use if
+ +
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ A standard error object +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ A Syslog formated string acording to the selected RFC +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

setColor()

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Sets the color to be used for messages at a set priority +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
colors.emergencyColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.alertColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.criticalColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.errorColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.warningColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.noticeColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.informationalColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.debugColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ A standard error object +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + + + + + + + + +

warn(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 4 (Warning) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The warning message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

warning(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 4 (Warning) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The warning message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + + +
+ +
+ + + + + + +
+ +
+ +
+ Documentation generated by JSDoc 3.5.5 on Mon Sep 24 2018 06:41:35 GMT+0000 (Coordinated Universal Time) using the docdash theme. +
+ + + + + + + \ No newline at end of file diff --git a/docs/module-SyslogPro-RFC5424.html b/docs/module-SyslogPro-RFC5424.html new file mode 100644 index 0000000..f4a7017 --- /dev/null +++ b/docs/module-SyslogPro-RFC5424.html @@ -0,0 +1,6059 @@ + + + + + + RFC5424 - Documentation + + + + + + + + + + + + + + + + + + +
+ +

RFC5424

+ + + + + + + +
+ +
+ +

+ SyslogPro~ + + RFC5424 +

+ +
A class to work with RFC5424 formated syslog messages.
+ + +
+ +
+ +
+ + + + +

Constructor

+ + +

new RFC5424(optionsopt)

+ + + + + + +
+ + +
Source:
+
+ + + +
Version:
+
  • 0.0.0
+ + + +
Since:
+
  • 0.0.0
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Construct a new RFC5424 formated Syslog object with user options +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
Options object +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
applacationName + + +string + + + + + + <optional>
+ + + + + +
+ + 'NodeJSLogger' + + Applacation
hostname + + +string + + + + + + <optional>
+ + + + + +
+ + os.hostname + + The name of this server
timestamp + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Included a Timestamp
timestampUTC + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + RFC tandard is for + local time
timestampMS + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Timestamp with ms + resoltuion
timestampTZ + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + Should the timestamp + included timezone
encludeStructuredData + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Included + any provided structured data
utf8BOM + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + Included the UTF8
color + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Included the UTF8
extendedColor + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Included the UTF8 + encoding tag with syslog message text
colors + + +object + + + + + + <optional>
+ + + + + +
+ + User defended colors for + severites +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
emergencyColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
alertColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
criticalColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
errorColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
warningColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
noticeColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
informationalColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
debugColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
+ +
server + + +Syslog + + + + + + <optional>
+ + + + + +
+ + false + + A Syslog server connection that should be used to send messages directly + from this class. @see SyslogPro~Syslog
+ +
+ + + + +
Requires:
+
    +
  • module:moment
  • +
+ + + + + + + + + + + + + + +
+ + + + + +

Requires

+ +
    +
  • module:moment
  • +
+ + + + + + + + + +

Members

+ + + +

(private) alertColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

color :boolean

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + + + + +

(private) constructor__

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

(private) criticalColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

(private) debugColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

(private) emergencyColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

encludeStructuredData :boolean

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + + + + +

(private) errorColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

extendedColor :boolean

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + + + + +

(private) informationalColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

(private) noticeColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

(private) server

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

timestamp :boolean

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + + + + +

timestampMS :boolean

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + + + + +

timestampTZ :boolean

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + + + + +

timestampUTC :boolean

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + + + + +

utf8BOM :boolean

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + + + + +

(private) warningColor

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + +

alert(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 1 (Alert) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The alert message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

buildMessage(msg, optionsopt) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Building a formated message. Returns a promise with a formated message +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
msg + + +string + + + + + + + + + + The Syslog Message
options + + +object + + + + + + <optional>
+ + + + + +
Options object +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
severity + + +number + + + + + + <optional>
+ + + + + +
+ + 7 + + An array of structure
facility + + +number + + + + + + <optional>
+ + + + + +
+ + 23 + + Facility code to use sending this + message
pid + + +string + + + + + + <optional>
+ + + + + +
+ + '-' + + The process id of the service sending + this message
structuredData + + +Array.<string> + + + + + + <optional>
+ + + + + +
+ + An array of structure + data strings conforming to the IETF/IANA defined SD-IDs or IANA + registred SMI Network Management Private Enterprise Code SD-ID + conforming to the format + [name@ parameter=value]
colorCode + + +number + + + + + + <optional>
+ + + + + +
+ + 36 + + The ANSI color code to use if + message coloration is selected
+ +
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ A standard error object +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ A Syslog formated string acording to the selected RFC +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

crit(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 2 (Critical) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The critical message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

critical(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 2 (Critical) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The critical message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

debug(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 7 (Debug) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The debug message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

emer(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 0 (Emergency) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The emergancy message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

emergency(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 0 (Emergency) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The emergancy message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

err(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 3 (Error) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The error message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

error(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 3 (Error) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The error message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

info(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 6 (Informational) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The informational message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

informational(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 6 (Informational) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The informational message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

log(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 6 (Informational) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The informational message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

note(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 5 (Notice) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The notice message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

notice(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 5 (Notice) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The notice message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

send(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+
    +
  • SyslogPro~Syslog
  • +
+
+ + + +
+ + + + + +
+ send a RFC5424 formated message. Returns a promise with the formated + message that was sent. If no server connection was defined when the + class was created a defualt Syslog connector will be used. +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The unformated Syslog message to send
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ A standard error object +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ A Syslog formated string acording to the selected RFC +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

setColor()

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Sets the color to be used for messages at a set priority +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
colors.emergencyColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.alertColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.criticalColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.errorColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.warningColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.noticeColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.informationalColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
colors.debugColor + + +string + + + + + + <optional>
+ + + + + +
A RGB Hex coded color in the form + of #FFFFFF or as or the ANSI color code number (30-37 Standard & 0-255 + Extended)
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ A standard error object +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + + + + + + + + +

warn(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 4 (Warning) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The warning message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

warning(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send a syslog message with a secerity level of 4 (Warning) +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The warning message to send to the Syslog server
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Any bubbled up error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated syslog message sent to the Syslog server +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + + +
+ +
+ + + + + + +
+ +
+ +
+ Documentation generated by JSDoc 3.5.5 on Mon Sep 24 2018 06:41:35 GMT+0000 (Coordinated Universal Time) using the docdash theme. +
+ + + + + + + \ No newline at end of file diff --git a/docs/module-SyslogPro-Syslog.html b/docs/module-SyslogPro-Syslog.html new file mode 100644 index 0000000..39932e5 --- /dev/null +++ b/docs/module-SyslogPro-Syslog.html @@ -0,0 +1,2679 @@ + + + + + + Syslog - Documentation + + + + + + + + + + + + + + + + + + +
+ +

Syslog

+ + + + + + + +
+ +
+ +

+ SyslogPro~ + + Syslog +

+ +
A class to work with syslog messages using UDP, TCP, or TLS transport. +There is suport for Syslog message formating RFC-3164, RFC-5424 including +Structured Data, IBM LEEF (Log Event Extended Format), and HP CEF (Common +Event Format). The meesaging is fully configurabule and Ansi foreground +colors can be added. Both ANSI 8 and ANSI 256 color are fully suported.
+ + +
+ +
+ +
+ + + + +

Constructor

+ + +

new Syslog(optionsopt)

+ + + + + + +
+ + +
Source:
+
+ + + +
Version:
+
  • 0.0.0
+ + + +
Since:
+
  • 0.0.0
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Construct a new Syslog object with user options +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
Options object +>>>Transport Configuraton +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
target + + +string + + + + + + <optional>
+ + + + + +
+ + 'localhost' + + The IP Address|FQDN of the + Syslog Server, this option if set will take prasdents over any target + set in a formating object
protocol + + +string + + + + + + <optional>
+ + + + + +
+ + 'udp' + + L4 transport portocol + (udp|tcp|tls), this option if set will take prasdents over any transport + set in a formating object
port + + +number + + + + + + <optional>
+ + + + + +
+ + 514 + + IP port, this option if set will take + prasdents over any IP Port set in a formating object
tcpTimeout + + +number + + + + + + <optional>
+ + + + + +
+ + 10000 + + Ignored for all other + transports, this option if set will take prasdents over any timeout + set in a formating object
tlsServerCerts + + +Array.<string> + + + + + + <optional>
+ + + + + +
+ + Array of authrized TLS server + certificates file locations, this option if set will take prasdents + over any certificates set in a formating object
tlsClientCert + + +string + + + + + + <optional>
+ + + + + +
+ + Client TLS certificate file + location that this client should use, this option if set will take + prasdents over any certificates set in a formating object
tlsClientKey + + +string + + + + + + <optional>
+ + + + + +
+ + Client TLS key file + location that this client should use, this option if set will take + prasdents over any certificates set in a formating object +>>>Syslog Format Settings
format + + +string + + + + + + <optional>
+ + + + + +
+ + 'none' + + Valid syslog format options for + this module are 'none', 'rfc3164', 'rfc5424', 'leef', 'cef'
rfc5424 + + +RFC3164 + + + + + + <optional>
+ + + + + +
+ + RFC5424 related settings
rfc5424 + + +RFC5424 + + + + + + <optional>
+ + + + + +
+ + RFC5424 related settings
leef + + +LEEF + + + + + + <optional>
+ + + + + +
+ + IBM LEEF (Log Event Extended Format) object
cef + + +CEF + + + + + + <optional>
+ + + + + +
+ + HP CEF (Common Event Format) formating object
+ +
+ + + + +
Requires:
+
    +
  • module:moment
  • +
+ + + + + + + + + + + + + + +
+ + + + + +

Requires

+ +
    +
  • module:moment
  • +
+ + + + + + + + + +

Members

+ + + +

cef :CEF

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +CEF + + +
  • +
+ + + + + + + + +

format :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

leef :LEEF

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +LEEF + + +
  • +
+ + + + + + + + +

port :number

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +number + + +
  • +
+ + + + + + + + +

protocol :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

rfc3164 :RFC3164

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +RFC3164 + + +
  • +
+ + + + + + + + +

rfc5424 :RFC5424

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +RFC5424 + + +
  • +
+ + + + + + + + +

target :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

tcpTimeout :number

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +number + + +
  • +
+ + + + + + + + +

tlsClientCert :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

tlsClientKey :string

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + + + + +

tlsServerCerts :Array.<string>

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
Type:
+
    +
  • + +Array.<string> + + +
  • +
+ + + + + + + + +

(private) tlsServerCerts

+ + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + +

(private) addTlsServerCerts(certs) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + +
Version:
+
  • 0.0.0
+ + + +
Since:
+
  • 0.0.0
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Add a TLS server certificate which can be used to authentacat the server +this syslog client is connecting too. This function will valadate the +input as a file location straing and add it to an array of certificates +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
certs + + +string +| + +Array.<string> + + + + File location of the certificate(s)
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - A Type Error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - True +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

(private) send(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send the Syslog message to the selected target Syslog server using the +selected transport. +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The formated Syslog Message
+ + + + + + + + + + + + +
Throws:
+
    +
  • + +
    +
    +
    + - Timeout error for TCP and TLS connections +
    +
    +
    +
    +
    +
    + Type +
    +
    + +Error + + +
    +
    +
    +
    +
    + +
  • + +
  • + +
    +
    +
    + - Network Error +
    +
    +
    +
    +
    +
    + Type +
    +
    + +Error + + +
    +
    +
    +
    +
    + +
  • +
+ + +
Returns:
+ + +
+ - The Syslog formated string sent +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

(private) tcpMessage(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send the Syslog message over TCP +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The formated Syslog Message
+ + + + + + + + + + + + +
Throws:
+
    +
  • + +
    +
    +
    + - Timeout error for TCP and TLS connections +
    +
    +
    +
    +
    +
    + Type +
    +
    + +Error + + +
    +
    +
    +
    +
    + +
  • + +
  • + +
    +
    +
    + - Network Error +
    +
    +
    +
    +
    +
    + Type +
    +
    + +Error + + +
    +
    +
    +
    +
    + +
  • +
+ + +
Returns:
+ + +
+ - The Syslog formated string sent +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

(private) tlsMessage(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send the Syslog message over TLS +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The formated Syslog Message
+ + + + + + + + + + + + +
Throws:
+
    +
  • + +
    +
    +
    + - Timeout error for TCP and TLS connections +
    +
    +
    +
    +
    +
    + Type +
    +
    + +Error + + +
    +
    +
    +
    +
    + +
  • + +
  • + +
    +
    +
    + - Network Error +
    +
    +
    +
    +
    +
    + Type +
    +
    + +Error + + +
    +
    +
    +
    +
    + +
  • +
+ + +
Returns:
+ + +
+ - The Syslog formated string sent +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + +

(private) udpMessage(msg) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Send the Syslog message over UDP +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +string + + + + The formated Syslog Message
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - Network Error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The Syslog formated string sent +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + + +
+ +
+ + + + + + +
+ +
+ +
+ Documentation generated by JSDoc 3.5.5 on Mon Sep 24 2018 06:41:36 GMT+0000 (Coordinated Universal Time) using the docdash theme. +
+ + + + + + + \ No newline at end of file diff --git a/docs/module-SyslogPro.html b/docs/module-SyslogPro.html new file mode 100644 index 0000000..ba55b56 --- /dev/null +++ b/docs/module-SyslogPro.html @@ -0,0 +1,402 @@ + + + + + + SyslogPro - Documentation + + + + + + + + + + + + + + + + + + +
+ +

SyslogPro

+ + + + + + + +
+ +
+ + + + + +
+ +
+ +
+ + +
The SyslogPro class for sending syslog messages
+ + + + + + + + +
+ + +
Source:
+
+ + + +
Version:
+
  • 0.0.0
+ + + +
Since:
+
  • 0.0.0
+ + + + + + + + + + + + + + + +
Author:
+
+ +
+ + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +

Classes

+ +
+
CEF
+
+ +
LEEF
+
+ +
RFC3164
+
+ +
RFC5424
+
+ +
Syslog
+
+
+ + + + + + + + + +

Methods

+ + + + + + +

(private, inner) rgbToAnsi(hex) → {Promise}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Format the ANSI foreground color code from a RGB hex code or ANSI color code +
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
hex + + +string + + + + The color hex code in the form of #FFFFFF or Number of + the ANSI color code (30-37 Standard & 0-255 Extended)
+ + + + + + + + + + + + +
Throws:
+ + + +
+
+
+ - A Format Error +
+
+
+
+
+
+ Type +
+
+ +Error + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+ - The formated ANSI color code +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + + +
+ +
+ + + + + + +
+ +
+ +
+ Documentation generated by JSDoc 3.5.5 on Mon Sep 24 2018 06:41:35 GMT+0000 (Coordinated Universal Time) using the docdash theme. +
+ + + + + + + \ No newline at end of file diff --git a/docs/scripts/collapse.js b/docs/scripts/collapse.js new file mode 100644 index 0000000..4525c17 --- /dev/null +++ b/docs/scripts/collapse.js @@ -0,0 +1,11 @@ +function hideAllButCurrent(){ + //by default all submenut items are hidden + $("nav > ul > li > ul li").hide(); + + //only current page (if it exists) should be opened + var file = window.location.pathname.split("/").pop(); + $("nav > ul > li > a[href^='"+file+"']").parent().find("> ul li").show(); +} +$( document ).ready(function() { + hideAllButCurrent(); +}); \ No newline at end of file diff --git a/docs/scripts/jquery-3.1.1.min.js b/docs/scripts/jquery-3.1.1.min.js new file mode 100644 index 0000000..4c5be4c --- /dev/null +++ b/docs/scripts/jquery-3.1.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v3.1.1 | (c) jQuery Foundation | jquery.org/license */ +!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):C.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/[^\x20\t\r\n\f]+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R), +a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,ka=/^$|\/(?:java|ecma)script/i,la={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};la.optgroup=la.option,la.tbody=la.tfoot=la.colgroup=la.caption=la.thead,la.th=la.td;function ma(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function na(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=ma(l.appendChild(f),"script"),j&&na(g),c){k=0;while(f=g[k++])ka.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var qa=d.documentElement,ra=/^key/,sa=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ta=/^([^.]*)(?:\.(.+)|)/;function ua(){return!0}function va(){return!1}function wa(){try{return d.activeElement}catch(a){}}function xa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)xa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=va;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(qa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,za=/\s*$/g;function Da(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Ea(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Fa(a){var b=Ba.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ga(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Aa.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ia(f,b,c,d)});if(m&&(e=pa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(ma(e,"script"),Ea),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=ma(h),f=ma(a),d=0,e=f.length;d0&&na(g,!i&&ma(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ja(this,a,!0)},remove:function(a){return Ja(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.appendChild(a)}})},prepend:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(ma(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!za.test(a)&&!la[(ja.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function Ya(a,b,c,d,e){return new Ya.prototype.init(a,b,c,d,e)}r.Tween=Ya,Ya.prototype={constructor:Ya,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Ya.propHooks[this.prop];return a&&a.get?a.get(this):Ya.propHooks._default.get(this)},run:function(a){var b,c=Ya.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ya.propHooks._default.set(this),this}},Ya.prototype.init.prototype=Ya.prototype,Ya.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Ya.propHooks.scrollTop=Ya.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Ya.prototype.init,r.fx.step={};var Za,$a,_a=/^(?:toggle|show|hide)$/,ab=/queueHooks$/;function bb(){$a&&(a.requestAnimationFrame(bb),r.fx.tick())}function cb(){return a.setTimeout(function(){Za=void 0}),Za=r.now()}function db(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ba[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function eb(a,b,c){for(var d,e=(hb.tweeners[b]||[]).concat(hb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?ib:void 0)), +void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),ib={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=jb[b]||r.find.attr;jb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=jb[g],jb[g]=e,e=null!=c(a,b,d)?g:null,jb[g]=f),e}});var kb=/^(?:input|select|textarea|button)$/i,lb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):kb.test(a.nodeName)||lb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function mb(a){var b=a.match(K)||[];return b.join(" ")}function nb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,nb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,nb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,nb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=nb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(nb(c))+" ").indexOf(b)>-1)return!0;return!1}});var ob=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ob,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:mb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ia.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,"$1"),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("