Last active
February 19, 2019 21:59
-
-
Save allquixotic/fef6944f0f04dba0ae1d23b7a1c379ba to your computer and use it in GitHub Desktop.
EsoLogFormatter created by SeanMcNamara1 - https://repl.it/@SeanMcNamara1/EsoLogFormatter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<title>ESO Log Formatter</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootswatch/4.3.1/united/bootstrap.min.css" crossorigin="anonymous"/> | |
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" crossorigin="anonymous"/> | |
<link href="style.css" rel="stylesheet" type="text/css" /> | |
</head> | |
<body> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" crossorigin="anonymous"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js" crossorigin="anonymous"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-daterangepicker/3.0.3/daterangepicker.min.js" crossorigin="anonymous"></script> | |
<script src="luxon.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script> | |
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" crossorigin="anonymous"></script> | |
<div id="step1"> | |
<h2>Step 1.</h2> <label id="customFileLabel" class="btn btn-primary btn-file"> | |
Choose Log File(s) <input type="file" id="customFile" style="display: none;" multiple> | |
</label> | |
Or drag and drop files below | |
<div class="upload-drop-zone" id="drop-zone"> | |
Just drag and drop files here | |
</div> | |
</div> | |
<div id="list"></div> | |
<div id="step2" style="display:none;"> | |
<br/> | |
<h2>Step 2. Options</h2> | |
<h3>General Options</h3> | |
<label for="timeformat">Time Format</label> | |
<select id="timeformat" class="form-control match-content" onchange="timeFormatChange()"> | |
<option value="friendly">US: [02/17/19 03:38pm UTC-5]</option> | |
<option value="friendlynotz">US without Timezone: [02/17/19 03:38pm]</option> | |
<option value="minfriendly">Minimal US: 2/17/19 3:38pm</option> | |
<option value="orig">Raw: 2019-02-17T15:38:15.052-05:00</option> | |
<option value="european">European (DD/MM/YY): 17/2/19 15:38 UTC-5</option> | |
<option value="none">None</option> | |
</select> | |
<label for="outputformat">Output Format</label> | |
<select id="outputformat" class="form-control match-content" onchange="outputFormatChange()"> | |
<option value="table">HTML Table</option> | |
<option value="plain">Plain Text</option> | |
</select> | |
<label for="sorttime" style="display: inline;">Sort by time?</label> | |
<input id="sorttime" type="checkbox" class="form-control match-content" style="display: inline;" onchange="sortTimeChange()"> | |
<h3>Identify and Select Channels</h3> | |
<div class="table-responsive"> | |
<table id="channelTable" class="table table-bordered"> | |
<thead class="thead-light"> | |
<tr id="headerRow"> | |
<th scope="col" style="display: table-cell;">Include in Output?</th> | |
<th scope="col" style="display: table-cell;">Channel Name</th> | |
<th scope="col" style="display: table-cell;">Channel # in Log</th> | |
<th scope="col" style="display: table-cell;">Example Chat Lines</th> | |
</tr> | |
</thead> | |
<tbody id="channelTableBody"> | |
</tbody> | |
</table> | |
</div> | |
<button id="goButton" class="btn-primary" onclick="doGenerate()">Generate</button> | |
</div> | |
<div class="border" id="debug"><h3>Debug Log</h3></div> | |
<div id="finalRender" style="display: none;"></div> | |
<script src="script.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var luxon=function(e){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function o(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t,n){return(u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&s(i,n.prototype),i}).apply(null,arguments)}function t(e){var r="function"==typeof Map?new Map:void 0;return(t=function(e){if(null===e||(t=e,-1===Function.toString.call(t).indexOf("[native code]")))return e;var t;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,n)}function n(){return u(e,arguments,a(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)})(e)}function F(e){return void 0===e}function Z(e){return"number"==typeof e}function f(){return"undefined"!=typeof Intl&&Intl.DateTimeFormat}function l(){return!F(Intl.DateTimeFormat.prototype.formatToParts)}function c(){return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}function d(e,r,i){if(0!==e.length)return e.reduce(function(e,t){var n=[r(t),t];return e&&i(e[0],n[0])===e[0]?e:n},null)[1]}function n(n,e){return e.reduce(function(e,t){return e[t]=n[t],e},{})}function x(e,t,n){return Z(e)&&t<=e&&e<=n}function h(e,t){return void 0===t&&(t=2),e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString()}function v(e){if(F(e))return NaN;var t=1e3*parseFloat("0."+e);return Math.floor(t)}function m(e,t,n){void 0===n&&(n=!1);var r=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*r)/r}function y(e){return e%4==0&&(e%100!=0||e%400==0)}function C(e){return y(e)?366:365}function g(e,t){var n,r,i=(n=t-1)-(r=12)*Math.floor(n/r)+1;return 2===i?y(e+(t-i)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function p(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function j(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===r?53:52}function w(e){return 99<e?e:60<e?1900+e:2e3+e}function k(e,t,n,r){void 0===r&&(r=null);var i=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);var a=Object.assign({timeZoneName:t},o),s=f();if(s&&l()){var u=new Intl.DateTimeFormat(n,a).formatToParts(i).find(function(e){return"timezonename"===e.type.toLowerCase()});return u?u.value:null}if(s){var c=new Intl.DateTimeFormat(n,o).format(i);return new Intl.DateTimeFormat(n,a).format(i).substring(c.length).replace(/^[, \u200e]+/,"")}return null}function S(e,t){var n=parseInt(e,10)||0,r=parseInt(t,10)||0;return 60*n+(n<0?-r:r)}function z(e,t,n){void 0===n&&(n=!1);var r={};for(var i in e)if(e.hasOwnProperty(i)){var o=e[i],a=Number(o);if(null!==o&&!Number.isNaN(a)){var s=t(i,n);s&&(r[s]=a)}}return r}function b(e){return n(e,["hour","minute","second","millisecond"])}var O=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/,T="numeric",N="short",M="long",I="2-digit",D={year:T,month:T,day:T},E={year:T,month:N,day:T},V={year:T,month:M,day:T},A={year:T,month:M,day:T,weekday:M},_={hour:T,minute:I},q={hour:T,minute:I,second:I},H={hour:T,minute:I,second:I,timeZoneName:N},U={hour:T,minute:I,second:I,timeZoneName:M},P={hour:T,minute:I,hour12:!1},R={hour:T,minute:I,second:I,hour12:!1},W={hour:T,minute:I,second:I,hour12:!1,timeZoneName:N},J={hour:T,minute:I,second:I,hour12:!1,timeZoneName:M},Y={year:T,month:T,day:T,hour:T,minute:I},G={year:T,month:T,day:T,hour:T,minute:I,second:I},$={year:T,month:N,day:T,hour:T,minute:I},B={year:T,month:N,day:T,hour:T,minute:I,second:I},Q={year:T,month:M,day:T,hour:T,minute:I,timeZoneName:N},X={year:T,month:M,day:T,hour:T,minute:I,second:I,timeZoneName:N},K={year:T,month:M,day:T,weekday:M,hour:T,minute:I,timeZoneName:M},ee={year:T,month:M,day:T,weekday:M,hour:T,minute:I,second:I,timeZoneName:M};function L(e){return JSON.stringify(e,Object.keys(e).sort())}var te=["January","February","March","April","May","June","July","August","September","October","November","December"],ne=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],re=["J","F","M","A","M","J","J","A","S","O","N","D"];function ie(e){switch(e){case"narrow":return re;case"short":return ne;case"long":return te;case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var oe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ae=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],se=["M","T","W","T","F","S","S"];function ue(e){switch(e){case"narrow":return se;case"short":return ae;case"long":return oe;case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var ce=["AM","PM"],le=["Before Christ","Anno Domini"],fe=["BC","AD"],de=["B","A"];function he(e){switch(e){case"narrow":return de;case"short":return fe;case"long":return le;default:return null}}var me=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(t(Error)),ye=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return o(e,t),e}(me),ve=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return o(e,t),e}(me),ge=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return o(e,t),e}(me),pe=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(me),we=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return o(e,t),e}(me),ke=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(me),Se=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return o(t,e),t}(me),be=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new Se},t.offset=function(e){throw new Se},t.equals=function(e){throw new Se},i(e,[{key:"type",get:function(){throw new Se}},{key:"name",get:function(){throw new Se}},{key:"universal",get:function(){throw new Se}},{key:"isValid",get:function(){throw new Se}}]),e}(),Oe=null,Te=function(e){function t(){return e.apply(this,arguments)||this}o(t,e);var n=t.prototype;return n.offsetName=function(e,t){return k(e,t.format,t.locale)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},i(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return f()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Oe&&(Oe=new t),Oe}}]),t}(be),Ne=RegExp("^"+O.source+"$"),Me={};var Ie={year:0,month:1,day:2,hour:3,minute:4,second:5};var De=function(n){function r(e){var t;return(t=n.call(this)||this).zoneName=e,t.valid=r.isValidZone(e),t}o(r,n),r.isValidSpecifier=function(e){return e&&e.match(Ne)},r.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},r.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var e=r.prototype;return e.offsetName=function(e,t){return k(e,t.format,t.locale,this.zoneName)},e.offset=function(e){var t,n,r,i,o,a,s=new Date(e),u=(a=this.zoneName,Me[a]||(Me[a]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:a,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Me[a]),c=u.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var o=n[i],a=o.type,s=o.value,u=Ie[a];F(u)||(r[u]=parseInt(s,10))}return r}(u,s):(t=s,n=u.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n),i=r[1],o=r[2],[r[3],i,o,r[4],r[5],r[6]]),l=p({year:c[0],month:c[1],day:c[2],hour:c[3],minute:c[4],second:c[5],millisecond:0}),f=s.valueOf();return(l-(f-=f%1e3))/6e4},e.equals=function(e){return"iana"===e.type&&e.zoneName===this.zoneName},i(r,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),r}(be),Ee=null;var Ve=function(n){function r(e){var t;return(t=n.call(this)||this).fixed=e,t}o(r,n),r.instance=function(e){return 0===e?r.utcInstance:new r(e)},r.parseSpecifier=function(e){if(e){var t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new r(S(t[1],t[2]))}return null},i(r,null,[{key:"utcInstance",get:function(){return null===Ee&&(Ee=new r(0)),Ee}}]);var e=r.prototype;return e.offsetName=function(){return this.name},e.offset=function(){return this.fixed},e.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},i(r,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+(e=this,t=Math.trunc(e.fixed/60),n=Math.abs(e.fixed%60),r=(0<t?"+":"-")+Math.abs(t),0<n?r+":"+h(n,2):r);var e,t,n,r}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),r}(be),Le=function(n){function e(e){var t;return(t=n.call(this)||this).zoneName=e,t}o(e,n);var t=e.prototype;return t.offsetName=function(){return null},t.offset=function(){return NaN},t.equals=function(){return!1},i(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(be);function Fe(e,t){var n;if(F(e)||null===e)return t;if(e instanceof be)return e;if("string"!=typeof e)return Z(e)?Ve.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new Le(e);var r=e.toLowerCase();return"local"===r?Te.instance:"utc"===r||"gmt"===r?Ve.utcInstance:null!=(n=De.parseGMTOffset(e))?Ve.instance(n):De.isValidSpecifier(r)?new De(e):Ve.parseSpecifier(r)||new Le(e)}var Ze=function(){return Date.now()},xe=null,Ce=null,je=null,ze=null,Ae=!1,_e=function(){function e(){}return e.resetCaches=function(){Xe.resetCache()},i(e,null,[{key:"now",get:function(){return Ze},set:function(e){Ze=e}},{key:"defaultZoneName",get:function(){return(xe||Te.instance).name},set:function(e){xe=e?Fe(e):null}},{key:"defaultZone",get:function(){return xe||Te.instance}},{key:"defaultLocale",get:function(){return Ce},set:function(e){Ce=e}},{key:"defaultNumberingSystem",get:function(){return je},set:function(e){je=e}},{key:"defaultOutputCalendar",get:function(){return ze},set:function(e){ze=e}},{key:"throwOnInvalid",get:function(){return Ae},set:function(e){Ae=e}}]),e}();function qe(e,t){var n="",r=e,i=Array.isArray(r),o=0;for(r=i?r:r[Symbol.iterator]();;){var a;if(i){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var s=a;s.literal?n+=s.val:n+=t(s.val)}return n}var He={D:D,DD:E,DDD:V,DDDD:A,t:_,tt:q,ttt:H,tttt:U,T:P,TT:R,TTT:W,TTTT:J,f:Y,ff:$,fff:Q,ffff:K,F:G,FF:B,FFF:X,FFFF:ee},Ue=function(){function d(e,t){this.opts=t,this.loc=e,this.systemLoc=null}d.create=function(e,t){return void 0===t&&(t={}),new d(e,t)},d.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],o=0;o<e.length;o++){var a=e.charAt(o);"'"===a?(0<n.length&&i.push({literal:r,val:n}),t=null,n="",r=!r):r?n+=a:a===t?n+=a:(0<n.length&&i.push({literal:!1,val:n}),t=n=a)}return 0<n.length&&i.push({literal:r,val:n}),i};var e=d.prototype;return e.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},e.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},e.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return h(e,t);var n=Object.assign({},this.opts);return 0<t&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},e.formatDateTimeFromString=function(o,e){var a=this,r="en"===this.loc.listingMode(),i=function(e,t){return a.loc.extract(o,e,t)},s=function(e){if(o.isOffsetFixed&&0===o.offset&&e.allowZ)return"Z";var t=Math.trunc(o.offset/60),n=Math.abs(o.offset%60),r=0<=t?"+":"-",i=""+r+Math.abs(t);switch(e.format){case"short":return""+r+a.num(Math.abs(t),2)+":"+a.num(n,2);case"narrow":return 0<n?i+":"+n:i;case"techie":return""+r+a.num(Math.abs(t),2)+a.num(n,2);default:throw new RangeError("Value format "+e.format+" is out of range for property format")}},u=function(){return r?ce[o.hour<12?0:1]:i({hour:"numeric",hour12:!0},"dayperiod")},c=function(e,t){return r?(n=o,ie(e)[n.month-1]):i(t?{month:e}:{month:e,day:"numeric"},"month");var n},l=function(e,t){return r?(n=o,ue(e)[n.weekday-1]):i(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday");var n},f=function(e){return r?(t=o,he(e)[t.year<0?0:1]):i({era:e},"era");var t};return qe(d.parseFormat(e),function(e){var t,n,r=a.loc.outputCalendar;switch(e){case"S":return a.num(o.millisecond);case"u":case"SSS":return a.num(o.millisecond,3);case"s":return a.num(o.second);case"ss":return a.num(o.second,2);case"m":return a.num(o.minute);case"mm":return a.num(o.minute,2);case"h":return a.num(o.hour%12==0?12:o.hour%12);case"hh":return a.num(o.hour%12==0?12:o.hour%12,2);case"H":return a.num(o.hour);case"HH":return a.num(o.hour,2);case"Z":return s({format:"narrow",allowZ:a.opts.allowZ});case"ZZ":return s({format:"short",allowZ:a.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:!1});case"ZZZZ":return o.offsetNameShort;case"ZZZZZ":return o.offsetNameLong;case"z":return o.zoneName;case"a":return u();case"d":return r?i({day:"numeric"},"day"):a.num(o.day);case"dd":return r?i({day:"2-digit"},"day"):a.num(o.day,2);case"c":return a.num(o.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return a.num(o.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):a.num(o.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):a.num(o.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return r?i({month:"numeric"},"month"):a.num(o.month);case"MM":return r?i({month:"2-digit"},"month"):a.num(o.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return r?i({year:"numeric"},"year"):a.num(o.year);case"yy":return r?i({year:"2-digit"},"year"):a.num(o.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):a.num(o.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):a.num(o.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return a.num(o.weekYear.toString().slice(-2),2);case"kkkk":return a.num(o.weekYear,4);case"W":return a.num(o.weekNumber);case"WW":return a.num(o.weekNumber,2);case"o":return a.num(o.ordinal);case"ooo":return a.num(o.ordinal,3);case"q":return a.num(o.quarter);case"qq":return a.num(o.quarter,2);case"X":return a.num(Math.floor(o.ts/1e3));case"x":return a.num(o.ts);default:return(n=He[t=e])?a.formatWithSystemDefault(o,n):t}})},e.formatDurationFromString=function(e,t){var n,r=this,i=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},o=d.parseFormat(t),a=o.reduce(function(e,t){var n=t.literal,r=t.val;return n?e:e.concat(r)},[]),s=e.shiftTo.apply(e,a.map(i).filter(function(e){return e}));return qe(o,(n=s,function(e){var t=i(e);return t?r.num(n.get(t),e.length):e}))},d}(),Pe={};function Re(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=Pe[n];return r||(r=new Intl.DateTimeFormat(e,t),Pe[n]=r),r}var We={};var Je={};var Ye=null;function Ge(e,t,n,r,i){var o=e.listingMode(n);return"error"===o?null:"en"===o?r(t):i(t)}var $e=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&f()){var r={useGrouping:!1};0<n.padTo&&(r.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=We[n];return r||(r=new Intl.NumberFormat(e,t),We[n]=r),r}(e,r)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return h(this.floor?Math.floor(e):m(e,3),this.padTo)},e}(),Be=function(){function e(e,t,n){var r;if(this.opts=n,this.hasIntl=f(),e.zone.universal&&this.hasIntl?(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:Cn.fromMillis(e.ts+60*e.offset*1e3)):"local"===e.zone.type?this.dt=e:r=(this.dt=e).zone.name,this.hasIntl){var i=Object.assign({},this.opts);r&&(i.timeZone=r),this.dtf=Re(t,i)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=function(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(L(n(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case L(D):return"M/d/yyyy";case L(E):return"LLL d, yyyy";case L(V):return"LLLL d, yyyy";case L(A):return"EEEE, LLLL d, yyyy";case L(_):return"h:mm a";case L(q):return"h:mm:ss a";case L(H):case L(U):return"h:mm a";case L(P):return"HH:mm";case L(R):return"HH:mm:ss";case L(W):case L(J):return"HH:mm";case L(Y):return"M/d/yyyy, h:mm a";case L($):return"LLL d, yyyy, h:mm a";case L(Q):return"LLLL d, yyyy, h:mm a";case L(K):return t;case L(G):return"M/d/yyyy, h:mm:ss a";case L(B):return"LLL d, yyyy, h:mm:ss a";case L(X):return"LLLL d, yyyy, h:mm:ss a";case L(ee):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}(this.opts),t=Xe.create("en-US");return Ue.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&l()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),Qe=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&c()&&(this.rtf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=Je[n];return r||(r=new Intl.RelativeTimeFormat(e,t),Je[n]=r),r}(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarer","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var a="days"===e;switch(t){case 1:return a?"tomorrow":"next "+i[e][0];case-1:return a?"yesterday":"last "+i[e][0];case 0:return a?"today":"this "+i[e][0]}}var s=Object.is(t,-0)||t<0,u=Math.abs(t),c=r?i[e][1]:1===u?i[e][0]:e;return s?u+" "+c+" ago":"in "+u+" "+c}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),Xe=function(){function o(e,t,n,r){var i,o,a,s=function(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,r=e.substring(0,t);try{n=Re(e).resolvedOptions()}catch(e){n=Re(r).resolvedOptions()}var i=n;return[r,i.numberingSystem,i.calendar]}(e),u=s[0],c=s[1],l=s[2];this.locale=u,this.numberingSystem=t||c||null,this.outputCalendar=n||l||null,this.intl=(i=this.locale,o=this.numberingSystem,a=this.outputCalendar,f()?((a||o)&&(i+="-u",a&&(i+="-ca-"+a),o&&(i+="-nu-"+o)),i):[]),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}o.fromOpts=function(e){return o.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},o.create=function(e,t,n,r){void 0===r&&(r=!1);var i=e||_e.defaultLocale;return new o(i||(r?"en-US":function(){if(Ye)return Ye;if(f()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return Ye="und"===e?"en-US":e}return Ye="en-US"}()),t||_e.defaultNumberingSystem,n||_e.defaultOutputCalendar,i)},o.resetCache=function(){Ye=null,Pe={},We={}},o.fromObject=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,i=t.outputCalendar;return o.create(n,r,i)};var e=o.prototype;return e.listingMode=function(e){void 0===e&&(e=!0);var t=f()&&l(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?o.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},e.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},e.months=function(n,r,e){var i=this;return void 0===r&&(r=!1),void 0===e&&(e=!0),Ge(this,n,e,ie,function(){var t=r?{month:n,day:"numeric"}:{month:n},e=r?"format":"standalone";return i.monthsCache[e][n]||(i.monthsCache[e][n]=function(e){for(var t=[],n=1;n<=12;n++){var r=Cn.utc(2016,n,1);t.push(e(r))}return t}(function(e){return i.extract(e,t,"month")})),i.monthsCache[e][n]})},e.weekdays=function(n,r,e){var i=this;return void 0===r&&(r=!1),void 0===e&&(e=!0),Ge(this,n,e,ue,function(){var t=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},e=r?"format":"standalone";return i.weekdaysCache[e][n]||(i.weekdaysCache[e][n]=function(e){for(var t=[],n=1;n<=7;n++){var r=Cn.utc(2016,11,13+n);t.push(e(r))}return t}(function(e){return i.extract(e,t,"weekday")})),i.weekdaysCache[e][n]})},e.meridiems=function(e){var n=this;return void 0===e&&(e=!0),Ge(this,void 0,e,function(){return ce},function(){if(!n.meridiemCache){var t={hour:"numeric",hour12:!0};n.meridiemCache=[Cn.utc(2016,11,13,9),Cn.utc(2016,11,13,19)].map(function(e){return n.extract(e,t,"dayperiod")})}return n.meridiemCache})},e.eras=function(e,t){var n=this;return void 0===t&&(t=!0),Ge(this,e,t,he,function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[Cn.utc(-40,1,1),Cn.utc(2017,1,1)].map(function(e){return n.extract(e,t,"era")})),n.eraCache[e]})},e.extract=function(e,t,n){var r=this.dtFormatter(e,t).formatToParts().find(function(e){return e.type.toLowerCase()===n});return r?r.value:null},e.numberFormatter=function(e){return void 0===e&&(e={}),new $e(this.intl,e.forceSimple||this.fastNumbers,e)},e.dtFormatter=function(e,t){return void 0===t&&(t={}),new Be(e,this.intl,t)},e.relFormatter=function(e){return void 0===e&&(e={}),new Qe(this.intl,this.isEnglish(),e)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||f()&&Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},i(o,[{key:"fastNumbers",get:function(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||f()&&"latn"===Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),o}();function Ke(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce(function(e,t){return e+t.source},"");return RegExp("^"+r+"$")}function et(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(c){return t.reduce(function(e,t){var n=e[0],r=e[1],i=e[2],o=t(c,i),a=o[0],s=o[1],u=o[2];return[Object.assign(n,a),r||s,u]},[{},null,1]).slice(0,2)}}function tt(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0;i<n.length;i++){var o=n[i],a=o[0],s=o[1],u=a.exec(e);if(u)return s(u)}return[null,null]}function nt(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];return function(e,t){var n,r={};for(n=0;n<i.length;n++)r[i[n]]=parseInt(e[t+n]);return[r,null,t+n]}}var rt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,it=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,9}))?)?)?/,ot=RegExp(""+it.source+rt.source+"?"),at=RegExp("(?:T"+ot.source+")?"),st=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ut=/(\d{4})-?W(\d\d)(?:-?(\d))?/,ct=/(\d{4})-?(\d{3})/,lt=nt("weekYear","weekNumber","weekDay"),ft=nt("year","ordinal"),dt=/(\d{4})-(\d\d)-(\d\d)/,ht=RegExp(it.source+" ?(?:"+rt.source+"|("+O.source+"))?"),mt=RegExp("(?: "+ht.source+")?");function yt(e,t){return[{year:parseInt(e[t]),month:parseInt(e[t+1])||1,day:parseInt(e[t+2])||1},null,t+3]}function vt(e,t){return[{hour:parseInt(e[t])||0,minute:parseInt(e[t+1])||0,second:parseInt(e[t+2])||0,millisecond:v(e[t+3])},null,t+4]}function gt(e,t){var n=!e[t]&&!e[t+1],r=S(e[t+1],e[t+2]);return[{},n?null:Ve.instance(r),t+3]}function pt(e,t){return[{},e[t]?new De(e[t]):null,t+1]}var wt=/^P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})(?:[.,](-?\d{1,9}))?S)?)?|(-?\d{1,9})W)$/;function kt(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],a=e[6],s=e[7],u=e[8];return[{years:parseInt(t),months:parseInt(n),weeks:parseInt(u),days:parseInt(r),hours:parseInt(i),minutes:parseInt(o),seconds:parseInt(a),milliseconds:v(s)}]}var St={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function bt(e,t,n,r,i,o,a){var s={year:2===t.length?w(parseInt(t)):parseInt(t),month:2===n.length?parseInt(n,10):ne.indexOf(n)+1,day:parseInt(r),hour:parseInt(i),minute:parseInt(o)};return a&&(s.second=parseInt(a)),e&&(s.weekday=3<e.length?oe.indexOf(e)+1:ae.indexOf(e)+1),s}var Ot=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Tt(e){var t,n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=e[9],f=e[10],d=e[11],h=bt(n,o,i,r,a,s,u);return t=c?St[c]:l?0:S(f,d),[h,new Ve(t)]}var Nt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Mt=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,It=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Dt(e){var t=e[1],n=e[2],r=e[3];return[bt(t,e[4],r,n,e[5],e[6],e[7]),Ve.utcInstance]}function Et(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],a=e[6];return[bt(t,e[7],n,r,i,o,a),Ve.utcInstance]}var Vt=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Lt={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Ft=Object.assign({years:{months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},Lt),Zt=365.2425,xt=30.436875,Ct=Object.assign({years:{months:12,weeks:Zt/7,days:Zt,hours:24*Zt,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:Zt/28,days:Zt/4,hours:24*Zt/4,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:xt/7,days:xt,hours:24*xt,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},Lt),jt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],zt=jt.slice(0).reverse();function At(e,t,n){void 0===n&&(n=!1);var r={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Ht(r)}function _t(e,t,n,r,i){var o,a=e[i][n],s=t[n]/a,u=!(Math.sign(s)===Math.sign(r[i]))&&0!==r[i]&&Math.abs(s)<=1?(o=s)<0?Math.floor(o):Math.ceil(o):Math.trunc(s);r[i]+=u,t[n]-=u*a}function qt(n,r){zt.reduce(function(e,t){return F(r[t])?e:(e&&_t(n,r,e,r,t),t)},null)}var Ht=function(){function m(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Xe.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Ct:Ft,this.isLuxonDuration=!0}m.fromMillis=function(e,t){return m.fromObject(Object.assign({milliseconds:e},t))},m.fromObject=function(e){if(null==e||"object"!=typeof e)throw new ke("Duration.fromObject: argument expected to be an object, got "+typeof e);return new m({values:z(e,m.normalizeUnit,!0),loc:Xe.fromObject(e),conversionAccuracy:e.conversionAccuracy})},m.fromISO=function(e,t){var n=tt(e,[wt,kt])[0];if(n){var r=Object.assign(n,t);return m.fromObject(r)}return m.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},m.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new ke("need to specify a reason the Duration is invalid");var n=e instanceof Vt?e:new Vt(e,t);if(_e.throwOnInvalid)throw new ge(n);return new m({invalid:n})},m.normalizeUnit=function(e,t){void 0===t&&(t=!1);var n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t&&!n)throw new we(e);return n},m.isDuration=function(e){return e&&e.isLuxonDuration||!1};var e=m.prototype;return e.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Ue.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0===this.days&&0===this.weeks||(e+=this.days+7*this.weeks+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=this.seconds+this.milliseconds/1e3+"S"),"P"===e&&(e+="T0S"),e},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.valueOf=function(){return this.as("milliseconds")},e.plus=function(e){if(!this.isValid)return this;for(var t=Ut(e),n={},r=0;r<jt.length;r++){var i=jt[r];(t.values.hasOwnProperty(i)||this.values.hasOwnProperty(i))&&(n[i]=t.get(i)+this.get(i))}return At(this,{values:n},!0)},e.minus=function(e){if(!this.isValid)return this;var t=Ut(e);return this.plus(t.negate())},e.get=function(e){return this[m.normalizeUnit(e)]},e.set=function(e){return At(this,{values:Object.assign(this.values,z(e,m.normalizeUnit))})},e.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,i=t.conversionAccuracy,o={loc:this.loc.clone({locale:n,numberingSystem:r})};return i&&(o.conversionAccuracy=i),At(this,o)},e.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},e.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return qt(this.matrix,e),m.fromObject(e)},e.shiftTo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!this.isValid)return this;if(0===t.length)return this;t=t.map(function(e){return m.normalizeUnit(e)});var r,i={},o={},a=this.toObject();qt(this.matrix,a);for(var s=0;s<jt.length;s++){var u=jt[s];if(0<=t.indexOf(u)){r=u;var c=0;for(var l in o)o.hasOwnProperty(l)&&(c+=this.matrix[l][u]*o[l],o[l]=0);Z(a[u])&&(c+=a[u]);var f=Math.trunc(c);for(var d in i[u]=f,o[u]=c-f,a)jt.indexOf(d)>jt.indexOf(u)&&_t(this.matrix,a,d,i,u)}else Z(a[u])&&(o[u]=a[u])}if(r)for(var h in o)o.hasOwnProperty(h)&&0!==o[h]&&(i[r]+=h===r?o[h]:o[h]/this.matrix[r][h]);return At(this,{values:i},!0)},e.negate=function(){if(!this.isValid)return this;for(var e={},t=Object.keys(this.values),n=0;n<t.length;n++){var r=t[n];e[r]=-this.values[r]}return At(this,{values:e},!0)},e.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t=0;t<jt.length;t++){var n=jt[t];if(this.values[n]!==e.values[n])return!1}return!0},i(m,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),m}();function Ut(e){if(Z(e))return Ht.fromMillis(e);if(Ht.isDuration(e))return e;if("object"==typeof e)return Ht.fromObject(e);throw new ke("Unknown duration argument "+e+" of type "+typeof e)}var Pt="Invalid Interval";var Rt=function(){function f(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}f.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new ke("need to specify a reason the Interval is invalid");var n=e instanceof Vt?e:new Vt(e,t);if(_e.throwOnInvalid)throw new ve(n);return new f({invalid:n})},f.fromDateTimes=function(e,t){var n,r,i=jn(e),o=jn(t);return new f({start:i,end:o,invalid:(n=i,r=o,n&&n.isValid?r&&r.isValid?r<n?new Vt("end before start","The end of an interval must be after its start, but you had start="+n.toISO()+" and end="+r.toISO()):null:new Vt("missing or invalid end"):new Vt("missing or invalid start"))})},f.after=function(e,t){var n=Ut(t),r=jn(e);return f.fromDateTimes(r,r.plus(n))},f.before=function(e,t){var n=Ut(t),r=jn(e);return f.fromDateTimes(r.minus(n),r)},f.fromISO=function(e,t){var n=(e||"").split("/",2),r=n[0],i=n[1];if(r&&i){var o=Cn.fromISO(r,t),a=Cn.fromISO(i,t);if(o.isValid&&a.isValid)return f.fromDateTimes(o,a);if(o.isValid){var s=Ht.fromISO(i,t);if(s.isValid)return f.after(o,s)}else if(a.isValid){var u=Ht.fromISO(r,t);if(u.isValid)return f.before(a,u)}}return f.invalid("unparsable",'the input "'+e+"\" can't be parsed asISO 8601")},f.isInterval=function(e){return e&&e.isLuxonInterval||!1};var e=f.prototype;return e.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},e.count=function(e){if(void 0===e&&(e="milliseconds"),!this.isValid)return NaN;var t=this.start.startOf(e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},e.hasSame=function(e){return!!this.isValid&&this.e.minus(1).hasSame(this.s,e)},e.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function(e){return!!this.isValid&&this.s>e},e.isBefore=function(e){return!!this.isValid&&this.e<=e},e.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},e.set=function(e){var t=void 0===e?{}:e,n=t.start,r=t.end;return this.isValid?f.fromDateTimes(n||this.s,r||this.e):this},e.splitAt=function(){if(!this.isValid)return[];for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=t.map(jn).sort(),i=[],o=this.s,a=0;o<this.e;){var s=r[a]||this.e,u=+s>+this.e?this.e:s;i.push(f.fromDateTimes(o,u)),o=u,a+=1}return i},e.splitBy=function(e){var t=Ut(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];for(var n,r,i=this.s,o=[];i<this.e;)r=+(n=i.plus(t))>+this.e?this.e:n,o.push(f.fromDateTimes(i,r)),i=r;return o},e.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},e.overlaps=function(e){return this.e>e.s&&this.s<e.e},e.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},e.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},e.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},e.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},e.intersection=function(e){if(!this.isValid)return this;var t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return n<t?null:f.fromDateTimes(t,n)},e.union=function(e){if(!this.isValid)return this;var t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return f.fromDateTimes(t,n)},f.merge=function(e){var t=e.sort(function(e,t){return e.s-t.s}).reduce(function(e,t){var n=e[0],r=e[1];return r?r.overlaps(t)||r.abutsStart(t)?[n,r.union(t)]:[n.concat([r]),t]:[n,t]},[[],null]),n=t[0],r=t[1];return r&&n.push(r),n},f.xor=function(e){var t,n=null,r=0,i=[],o=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),a=(t=Array.prototype).concat.apply(t,o).sort(function(e,t){return e.time-t.time}),s=Array.isArray(a),u=0;for(a=s?a:a[Symbol.iterator]();;){var c;if(s){if(u>=a.length)break;c=a[u++]}else{if((u=a.next()).done)break;c=u.value}var l=c;n=1===(r+="s"===l.type?1:-1)?l.time:(n&&+n!=+l.time&&i.push(f.fromDateTimes(n,l.time)),null)}return f.merge(i)},e.difference=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return f.xor([this].concat(n)).map(function(e){return t.intersection(e)}).filter(function(e){return e&&!e.isEmpty()})},e.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":Pt},e.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):Pt},e.toFormat=function(e,t){var n=(void 0===t?{}:t).separator,r=void 0===n?" – ":n;return this.isValid?""+this.s.toFormat(e)+r+this.e.toFormat(e):Pt},e.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Ht.invalid(this.invalidReason)},e.mapEndpoints=function(e){return f.fromDateTimes(e(this.s),e(this.e))},i(f,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),f}(),Wt=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=_e.defaultZone);var t=Cn.local().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return!!De.isValidSpecifier(e)&&De.isValidZone(e)},e.normalizeZone=function(e){return Fe(e,_e.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o,s=n.outputCalendar,u=void 0===s?"gregory":s;return Xe.create(i,a,u).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o,s=n.outputCalendar,u=void 0===s?"gregory":s;return Xe.create(i,a,u).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o;return Xe.create(i,a,null).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o;return Xe.create(i,a,null).weekdays(e,!0)},e.meridiems=function(e){var t=(void 0===e?{}:e).locale,n=void 0===t?null:t;return Xe.create(n).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");var n=(void 0===t?{}:t).locale,r=void 0===n?null:n;return Xe.create(r,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,r=c();if(f()){e=!0,t=l();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:r}},e}();function Jt(e,t){var n=function(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},r=n(t)-n(e);return Math.floor(Ht.fromMillis(r).as("days"))}function Yt(e,t,n,r){var i=function(e,t,n){for(var r,i,o=[["years",function(e,t){return t.year-e.year}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var n=Jt(e,t);return(n-n%7)/7}],["days",Jt]],a={},s=0;s<o.length;s++){var u=o[s],c=u[0],l=u[1];if(0<=n.indexOf(c)){var f;r=c;var d,h=l(e,t);t<(i=e.plus(((f={})[c]=h,f)))?(e=i.minus(((d={})[c]=1,d)),h-=1):e=i,a[c]=h}}return[e,a,i,r]}(e,t,n),o=i[0],a=i[1],s=i[2],u=i[3],c=t-o,l=n.filter(function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)});if(0===l.length){var f;if(s<t)s=o.plus(((f={})[u]=1,f));s!==o&&(a[u]=(a[u]||0)+c/(s-o))}var d,h=Ht.fromObject(Object.assign(a,r));return 0<l.length?(d=Ht.fromMillis(c,r)).shiftTo.apply(d,l).plus(h):h}var Gt="missing Intl.DateTimeFormat.formatToParts support";function $t(e,n){return void 0===n&&(n=function(e){return e}),{regex:e,deser:function(e){var t=e[0];return n(parseInt(t))}}}function Bt(e){return e.replace(/\./,"\\.?")}function Qt(e){return e.replace(/\./,"").toLowerCase()}function Xt(n,r){return null===n?null:{regex:RegExp(n.map(Bt).join("|")),deser:function(e){var t=e[0];return n.findIndex(function(e){return Qt(t)===Qt(e)})+r}}}function Kt(e,t){return{regex:e,deser:function(e){return S(e[1],e[2])},groups:t}}function en(e){return{regex:e,deser:function(e){return e[0]}}}function tn(d,e,t){var n=Ue.parseFormat(t),r=n.map(function(e){return n=d,r=/\d/,i=/\d{2}/,o=/\d{3}/,a=/\d{4}/,s=/\d{1,2}/,u=/\d{1,3}/,c=/\d{2,4}/,l=function(e){return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(e){return e[0]},literal:!0};var t},(f=function(e){if(t.literal)return l(e);switch(e.val){case"G":return Xt(n.eras("short",!1),0);case"GG":return Xt(n.eras("long",!1),0);case"y":return $t(/\d{1,6}/);case"yy":return $t(c,w);case"yyyy":return $t(a);case"yyyyy":return $t(/\d{4,6}/);case"yyyyyy":return $t(/\d{6}/);case"M":return $t(s);case"MM":return $t(i);case"MMM":return Xt(n.months("short",!1,!1),1);case"MMMM":return Xt(n.months("long",!1,!1),1);case"L":return $t(s);case"LL":return $t(i);case"LLL":return Xt(n.months("short",!0,!1),1);case"LLLL":return Xt(n.months("long",!0,!1),1);case"d":return $t(s);case"dd":return $t(i);case"o":return $t(u);case"ooo":return $t(o);case"HH":return $t(i);case"H":return $t(s);case"hh":return $t(i);case"h":return $t(s);case"mm":return $t(i);case"m":case"s":return $t(s);case"ss":return $t(i);case"S":return $t(u);case"SSS":return $t(o);case"u":return en(/\d{1,9}/);case"a":return Xt(n.meridiems(),0);case"kkkk":return $t(a);case"kk":return $t(c,w);case"W":return $t(s);case"WW":return $t(i);case"E":case"c":return $t(r);case"EEE":return Xt(n.weekdays("short",!1,!1),1);case"EEEE":return Xt(n.weekdays("long",!1,!1),1);case"ccc":return Xt(n.weekdays("short",!0,!1),1);case"cccc":return Xt(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Kt(/([+-]\d{1,2})(?::(\d{2}))?/,2);case"ZZZ":return Kt(/([+-]\d{1,2})(\d{2})?/,2);case"z":return en(/[a-z_+-]{1,256}(\/[a-z_+-]{1,256}(\/[a-z_+-]{1,256})?)?/i);default:return l(e)}}(t=e)||{invalidReason:Gt}).token=t,f;var t,n,r,i,o,a,s,u,c,l,f}),i=r.find(function(e){return e.invalidReason});if(i)return{input:e,tokens:n,invalidReason:i.invalidReason};var o,a,s,u=["^"+(s=r).map(function(e){return e.regex}).reduce(function(e,t){return e+"("+t.source+")"},"")+"$",s],c=u[1],l=RegExp(u[0],"i"),f=function(e,t,n){var r=e.match(t);if(r){var i={},o=1;for(var a in n)if(n.hasOwnProperty(a)){var s=n[a],u=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(r.slice(o,o+u))),o+=u}return[r,i]}return[r,{}]}(e,l,c),h=f[0],m=f[1],y=m?(a=F((o=m).Z)?F(o.z)?null:new De(o.z):new Ve(o.Z),F(o.h)||(o.h<12&&1===o.a?o.h+=12:12===o.h&&0===o.a&&(o.h=0)),0===o.G&&o.y&&(o.y=-o.y),F(o.u)||(o.S=v(o.u)),[Object.keys(o).reduce(function(e,t){var n=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";default:return null}}(t);return n&&(e[n]=o[t]),e},{}),a]):[null,null];return{input:e,tokens:n,regex:l,rawMatches:h,matches:m,result:y[0],zone:y[1]}}var nn=[0,31,59,90,120,151,181,212,243,273,304,334],rn=[0,31,60,91,121,152,182,213,244,274,305,335];function on(e,t){return new Vt("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function an(e,t,n){var r=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===r?7:r}function sn(e,t,n){return n+(y(e)?rn:nn)[t-1]}function un(e,t){var n=y(e)?rn:nn,r=n.findIndex(function(e){return e<t});return{month:r+1,day:t-n[r]}}function cn(e){var t,n=e.year,r=e.month,i=e.day,o=sn(n,r,i),a=an(n,r,i),s=Math.floor((o-a+10)/7);return s<1?s=j(t=n-1):s>j(n)?(t=n+1,s=1):t=n,Object.assign({weekYear:t,weekNumber:s,weekday:a},b(e))}function ln(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,o=an(n,1,4),a=C(n),s=7*r+i-o-3;s<1?s+=C(t=n-1):a<s?(t=n+1,s-=C(n)):t=n;var u=un(t,s),c=u.month,l=u.day;return Object.assign({year:t,month:c,day:l},b(e))}function fn(e){var t=e.year,n=sn(t,e.month,e.day);return Object.assign({year:t,ordinal:n},b(e))}function dn(e){var t=e.year,n=un(t,e.ordinal),r=n.month,i=n.day;return Object.assign({year:t,month:r,day:i},b(e))}function hn(e){var t=Z(e.year),n=x(e.month,1,12),r=x(e.day,1,g(e.year,e.month));return t?n?!r&&on("day",e.day):on("month",e.month):on("year",e.year)}function mn(e){var t=e.hour,n=e.minute,r=e.second,i=e.millisecond,o=x(t,0,23)||24===t&&0===n&&0===r&&0===i,a=x(n,0,59),s=x(r,0,59),u=x(i,0,999);return o?a?s?!u&&on("millisecond",i):on("second",r):on("minute",n):on("hour",t)}var yn="Invalid DateTime";function vn(e){return new Vt("unsupported zone",'the zone "'+e.name+'" is not supported')}function gn(e){return null===e.weekData&&(e.weekData=cn(e.c)),e.weekData}function pn(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Cn(Object.assign({},n,t,{old:n}))}function wn(e,t,n){var r=e-60*t*1e3,i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;var o=n.offset(r);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}function kn(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Sn(e,t,n){return wn(p(e),t,n)}function bn(e,t){var n=e.o,r=e.c.year+t.years,i=e.c.month+t.months+3*t.quarters,o=Object.assign({},e.c,{year:r,month:i,day:Math.min(e.c.day,g(r,i))+t.days+7*t.weeks}),a=Ht.fromObject({hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=wn(p(o),n,e.zone),u=s[0],c=s[1];return 0!==a&&(u+=a,c=e.zone.offset(u)),{ts:u,o:c}}function On(e,t,n,r,i){var o=n.setZone,a=n.zone;if(e&&0!==Object.keys(e).length){var s=t||a,u=Cn.fromObject(Object.assign(e,n,{zone:s}));return o?u:u.setZone(a)}return Cn.invalid(new Vt("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function Tn(e,t){return e.isValid?Ue.create(Xe.create("en-US"),{allowZ:!0,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Nn(e,t){var n=t.suppressSeconds,r=void 0!==n&&n,i=t.suppressMilliseconds,o=void 0!==i&&i,a=t.includeOffset,s=void 0===a||a,u=t.includeZone,c=void 0!==u&&u,l=t.spaceZone,f=void 0!==l&&l,d="HH:mm";return r&&0===e.second&&0===e.millisecond||(d+=":ss",o&&0===e.millisecond||(d+=".SSS")),(c||s)&&f&&(d+=" "),c?d+="z":s&&(d+="ZZ"),Tn(e,d)}var Mn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},In={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Dn={ordinal:1,hour:0,minute:0,second:0,millisecond:0},En=["year","month","day","hour","minute","second","millisecond"],Vn=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Ln=["year","ordinal","hour","minute","second","millisecond"];function Fn(e,t){void 0===t&&(t=!1);var n={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e?e.toLowerCase():e];if(!t&&!n)throw new we(e);return n}function Zn(e,t){for(var n=0;n<En.length;n++){var r=En[n];F(e[r])&&(e[r]=Mn[r])}var i=hn(e)||mn(e);if(i)return Cn.invalid(i);var o=_e.now(),a=Sn(e,t.offset(o),t),s=a[0],u=a[1];return new Cn({ts:s,zone:t,o:u})}function xn(t,n,r){var i=!!F(r.round)||r.round,e=function(e,t){return e=m(e,i||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(e,t)},o=function(e){return r.calendary?n.hasSame(t,e)?0:n.startOf(e).diff(t.startOf(e),e).get(e):n.diff(t,e).get(e)};if(r.unit)return e(o(r.unit),r.unit);var a=r.units,s=Array.isArray(a),u=0;for(a=s?a:a[Symbol.iterator]();;){var c;if(s){if(u>=a.length)break;c=a[u++]}else{if((u=a.next()).done)break;c=u.value}var l=c,f=o(l);if(1<=Math.abs(f))return e(f,l)}return e(0,r.units[r.units.length-1])}var Cn=function(){function L(e){var t=e.zone||_e.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Vt("invalid input"):null)||(t.isValid?null:vn(t));this.ts=F(e.ts)?_e.now():e.ts;var r=null,i=null;if(!n){var o=e.old&&e.old.ts===this.ts&&e.old.zone.equals(t);r=o?e.old.c:kn(this.ts,t.offset(this.ts)),i=o?e.old.o:t.offset(this.ts)}this._zone=t,this.loc=e.loc||Xe.create(),this.invalid=n,this.weekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}L.local=function(e,t,n,r,i,o,a){return F(e)?new L({ts:_e.now()}):Zn({year:e,month:t,day:n,hour:r,minute:i,second:o,millisecond:a},_e.defaultZone)},L.utc=function(e,t,n,r,i,o,a){return F(e)?new L({ts:_e.now(),zone:Ve.utcInstance}):Zn({year:e,month:t,day:n,hour:r,minute:i,second:o,millisecond:a},Ve.utcInstance)},L.fromJSDate=function(e,t){return void 0===t&&(t={}),new L({ts:(n=e,"[object Date]"===Object.prototype.toString.call(n)?e.valueOf():NaN),zone:Fe(t.zone,_e.defaultZone),loc:Xe.fromObject(t)});var n},L.fromMillis=function(e,t){if(void 0===t&&(t={}),Z(e))return new L({ts:e,zone:Fe(t.zone,_e.defaultZone),loc:Xe.fromObject(t)});throw new ke("fromMillis requires a numerical input")},L.fromSeconds=function(e,t){if(void 0===t&&(t={}),Z(e))return new L({ts:1e3*e,zone:Fe(t.zone,_e.defaultZone),loc:Xe.fromObject(t)});throw new ke("fromSeconds requires a numerical input")},L.fromObject=function(e){var t=Fe(e.zone,_e.defaultZone);if(!t.isValid)return L.invalid(vn(t));var n=_e.now(),r=t.offset(n),i=z(e,Fn,!0),o=!F(i.ordinal),a=!F(i.year),s=!F(i.month)||!F(i.day),u=a||s,c=i.weekYear||i.weekNumber,l=Xe.fromObject(e);if((u||o)&&c)throw new pe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&o)throw new pe("Can't mix ordinal dates with month/day");var f,d,h=c||i.weekday&&!u,m=kn(n,r);h?(f=Vn,d=In,m=cn(m)):o?(f=Ln,d=Dn,m=fn(m)):(f=En,d=Mn);var y=!1,v=f,g=Array.isArray(v),p=0;for(v=g?v:v[Symbol.iterator]();;){var w;if(g){if(p>=v.length)break;w=v[p++]}else{if((p=v.next()).done)break;w=p.value}var k=w;F(i[k])?i[k]=y?d[k]:m[k]:y=!0}var S,b,O,T,N,M,I,D=(h?(N=Z((T=i).weekYear),M=x(T.weekNumber,1,j(T.weekYear)),I=x(T.weekday,1,7),N?M?!I&&on("weekday",T.weekday):on("week",T.week):on("weekYear",T.weekYear)):o?(b=Z((S=i).year),O=x(S.ordinal,1,C(S.year)),b?!O&&on("ordinal",S.ordinal):on("year",S.year)):hn(i))||mn(i);if(D)return L.invalid(D);var E=Sn(h?ln(i):o?dn(i):i,r,t),V=new L({ts:E[0],zone:t,o:E[1],loc:l});return i.weekday&&u&&e.weekday!==V.weekday?L.invalid("mismatched weekday","you can't specify both a weekday of "+i.weekday+" and a date of "+V.toISO()):V},L.fromISO=function(e,t){void 0===t&&(t={});var n=tt(e,[Ke(st,at),et(yt,vt,gt)],[Ke(ut,at),et(lt,vt,gt)],[Ke(ct,at),et(ft,vt)],[Ke(ot),et(vt,gt)]);return On(n[0],n[1],t,"ISO 8601",e)},L.fromRFC2822=function(e,t){void 0===t&&(t={});var n=tt(e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim(),[Ot,Tt]);return On(n[0],n[1],t,"RFC 2822",e)},L.fromHTTP=function(e,t){void 0===t&&(t={});var n=tt(e,[Nt,Dt],[Mt,Dt],[It,Et]);return On(n[0],n[1],t,"HTTP",t)},L.fromFormat=function(e,t,n){if(void 0===n&&(n={}),F(e)||F(t))throw new ke("fromFormat requires an input string and a format");var r,i=n,o=i.locale,a=void 0===o?null:o,s=i.numberingSystem,u=void 0===s?null:s,c=Xe.fromOpts({locale:a,numberingSystem:u,defaultToEN:!0}),l=[(r=tn(c,e,t)).result,r.zone,r.invalidReason],f=l[0],d=l[1],h=l[2];return h?L.invalid(h):On(f,d,n,"format "+t,e)},L.fromString=function(e,t,n){return void 0===n&&(n={}),L.fromFormat(e,t,n)},L.fromSQL=function(e,t){void 0===t&&(t={});var n=tt(e,[Ke(dt,mt),et(yt,vt,gt,pt)],[Ke(ht),et(vt,gt,pt)]);return On(n[0],n[1],t,"SQL",e)},L.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new ke("need to specify a reason the DateTime is invalid");var n=e instanceof Vt?e:new Vt(e,t);if(_e.throwOnInvalid)throw new ye(n);return new L({invalid:n})},L.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var e=L.prototype;return e.get=function(e){return this[e]},e.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=Ue.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},e.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(Ve.instance(e),t)},e.toLocal=function(){return this.setZone(_e.defaultZone||new Te)},e.setZone=function(e,t){var n=void 0===t?{}:t,r=n.keepLocalTime,i=void 0!==r&&r,o=n.keepCalendarTime,a=void 0!==o&&o;return(e=Fe(e,_e.defaultZone)).equals(this.zone)?this:e.isValid?pn(this,{ts:i||a?this.ts+60*(this.o-e.offset(this.ts))*1e3:this.ts,zone:e}):L.invalid(vn(e))},e.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,i=t.outputCalendar;return pn(this,{loc:this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i})})},e.setLocale=function(e){return this.reconfigure({locale:e})},e.set=function(e){if(!this.isValid)return this;var t,n=z(e,Fn);!F(n.weekYear)||!F(n.weekNumber)||!F(n.weekday)?t=ln(Object.assign(cn(this.c),n)):F(n.ordinal)?(t=Object.assign(this.toObject(),n),F(n.day)&&(t.day=Math.min(g(t.year,t.month),t.day))):t=dn(Object.assign(fn(this.c),n));var r=Sn(t,this.o,this.zone);return pn(this,{ts:r[0],o:r[1]})},e.plus=function(e){return this.isValid?pn(this,bn(this,Ut(e))):this},e.minus=function(e){return this.isValid?pn(this,bn(this,Ut(e).negate())):this},e.startOf=function(e){if(!this.isValid)return this;var t={},n=Ht.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break;case"milliseconds":break;default:throw new we(e)}if("weeks"===n&&(t.weekday=1),"quarters"===n){var r=Math.ceil(this.month/3);t.month=3*(r-1)+1}return this.set(t)},e.endOf=function(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},e.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Ue.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):yn},e.toLocaleString=function(e){return void 0===e&&(e=D),this.isValid?Ue.create(this.loc.clone(e),e).formatDateTime(this):yn},e.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Ue.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},e.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate()+"T"+this.toISOTime(e):null},e.toISODate=function(){return Tn(this,"yyyy-MM-dd")},e.toISOWeekDate=function(){return Tn(this,"kkkk-'W'WW-c")},e.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,r=void 0!==n&&n,i=t.suppressSeconds,o=void 0!==i&&i,a=t.includeOffset;return Nn(this,{suppressSeconds:o,suppressMilliseconds:r,includeOffset:void 0===a||a})},e.toRFC2822=function(){return Tn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ")},e.toHTTP=function(){return Tn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return Tn(this,"yyyy-MM-dd")},e.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,r=void 0===n||n,i=t.includeZone;return Nn(this,{includeOffset:r,includeZone:void 0!==i&&i,spaceZone:!0})},e.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},e.toString=function(){return this.isValid?this.toISO():yn},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return Ht.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var r,i=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),o=(r=t,Array.isArray(r)?r:[r]).map(Ht.normalizeUnit),a=e.valueOf()>this.valueOf(),s=Yt(a?this:e,a?e:this,o,i);return a?s.negate():s},e.diffNow=function(e,t){return void 0===e&&(e="milliseconds"),void 0===t&&(t={}),this.diff(L.local(),e,t)},e.until=function(e){return this.isValid?Rt.fromDateTimes(this,e):this},e.hasSame=function(e,t){if(!this.isValid)return!1;if("millisecond"===t)return this.valueOf()===e.valueOf();var n=e.valueOf();return this.startOf(t)<=n&&n<=this.endOf(t)},e.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},e.toRelative=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=e.base||L.fromObject({zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;return xn(t,this.plus(n),Object.assign(e,{numeric:"always",units:["years","months","days","hours","minutes","seconds"]}))},e.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?xn(e.base||L.fromObject({zone:this.zone}),this,Object.assign(e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},L.min=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return d(t,function(e){return e.valueOf()},Math.min)},L.max=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return d(t,function(e){return e.valueOf()},Math.max)},L.fromFormatExplain=function(e,t,n){void 0===n&&(n={});var r=n,i=r.locale,o=void 0===i?null:i,a=r.numberingSystem,s=void 0===a?null:a;return tn(Xe.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0}),e,t)},L.fromStringExplain=function(e,t,n){return void 0===n&&(n={}),L.fromFormatExplain(e,t,n)},i(L,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?gn(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?gn(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?gn(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?fn(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Wt.months("short",{locale:this.locale})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Wt.months("long",{locale:this.locale})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Wt.weekdays("short",{locale:this.locale})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Wt.weekdays("long",{locale:this.locale})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?this.zone.offset(this.ts):NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return y(this.year)}},{key:"daysInMonth",get:function(){return g(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?C(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?j(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return D}},{key:"DATE_MED",get:function(){return E}},{key:"DATE_FULL",get:function(){return V}},{key:"DATE_HUGE",get:function(){return A}},{key:"TIME_SIMPLE",get:function(){return _}},{key:"TIME_WITH_SECONDS",get:function(){return q}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return H}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return U}},{key:"TIME_24_SIMPLE",get:function(){return P}},{key:"TIME_24_WITH_SECONDS",get:function(){return R}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return W}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return J}},{key:"DATETIME_SHORT",get:function(){return Y}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return G}},{key:"DATETIME_MED",get:function(){return $}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return B}},{key:"DATETIME_FULL",get:function(){return Q}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return X}},{key:"DATETIME_HUGE",get:function(){return K}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return ee}}]),L}();function jn(e){if(Cn.isDateTime(e))return e;if(e&&e.valueOf&&Z(e.valueOf()))return Cn.fromJSDate(e);if(e&&"object"==typeof e)return Cn.fromObject(e);throw new ke("Unknown datetime argument: "+e+", of type "+typeof e)}return e.DateTime=Cn,e.Duration=Ht,e.Interval=Rt,e.Info=Wt,e.Zone=be,e.FixedOffsetZone=Ve,e.IANAZone=De,e.InvalidZone=Le,e.LocalZone=Te,e.Settings=_e,e}({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fileHolder = []; | |
var outputList = null; | |
var allLines = []; | |
var channels = {}; | |
const linerx = new RegExp(/^((\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.(\d{3})-(\d{2}):(\d{2})) (\d{1,2}),([^,]+),(.*)$/, "gmi"); | |
//As of API 100025 (Murkmire/v4.2) | |
const minChannel = 0; | |
const maxChannel = 35; | |
const chatChannels = { | |
0 : "Say", | |
1 : "Yell", | |
2 : "Whisper", | |
3 : "Group", | |
4 : "Outgoing Whisper", | |
5 : "Unused 1", | |
6 : "Emote", | |
7 : "NPC Say", | |
8 : "NPC Yell", | |
9 : "NPC Whisper", | |
10 : "NPC Emote", | |
11 : "System", | |
12 : "Guild 1", | |
13 : "Guild 2", | |
14 : "Guild 3", | |
15 : "Guild 4", | |
16 : "Guild 5", | |
17 : "Officer 1", | |
18 : "Officer 2", | |
19 : "Officer 3", | |
20 : "Officer 4", | |
21 : "Officer 5", | |
22 : "Custom 1", | |
23 : "Custom 2", | |
24 : "Custom 3", | |
25 : "Custom 4", | |
26 : "Custom 5", | |
27 : "Custom 6", | |
28 : "Custom 7", | |
29 : "Custom 8", | |
30 : "Custom 9", | |
31 : "Zone", | |
32 : "Zone Intl 1", | |
33 : "Zone Intl 2", | |
34 : "Zone Intl 3", | |
35 : "Zone Intl 4" | |
}; | |
const chatChannelLabels = $.extend({}, chatChannels); | |
const readUploadedFileAsText = (inputFile) => { | |
const temporaryFileReader = new FileReader(); | |
return new Promise((resolve, reject) => { | |
temporaryFileReader.onerror = () => { | |
temporaryFileReader.abort(); | |
reject(new DOMException("Problem parsing input file.")); | |
}; | |
temporaryFileReader.onload = () => { | |
resolve(temporaryFileReader.result); | |
}; | |
temporaryFileReader.readAsText(inputFile); | |
}); | |
}; | |
function chatChannelsRev() { | |
let tmp = {}; | |
Object.keys(chatChannels).forEach((ez) => tmp[chatChannels[ez]] = ez); | |
return tmp; | |
} | |
function createOutputList() { | |
let ul = document.createElement("ul"); | |
ul.id = "outputList"; | |
return ul; | |
} | |
function getChannelNameFromId(elemen) { | |
return elemen.id.match(/\d+$/)[0]; | |
} | |
function getDropListItems() { | |
let retval = []; | |
Object.keys(chatChannelsRev()).forEach((elt) => { | |
let itm = document.createElement("option"); | |
itm.value = elt; | |
itm.textContent = elt; | |
retval.push(itm); | |
}); | |
return retval; | |
} | |
function channelNameChange(element) { | |
let channelNum = getChannelNameFromId(element); | |
let custText = document.getElementById(`channelCustText${channelNum}`).value; | |
if(custText == null || custText.trim() == "") { | |
chatChannelLabels[channelNum] = element.value; | |
} | |
else { | |
chatChannelLabels[channelNum] = custText; | |
} | |
recalcExamples(); | |
} | |
function channelNameDropdownChange() { | |
channelNameChange(this); | |
} | |
function timeFormatChange() { | |
recalcExamples(); | |
} | |
function outputFormatChange() { | |
recalcExamples(); | |
} | |
function sortTimeChange() { | |
//recalcExamples(); | |
} | |
function recalcExamples() { | |
document.getElementsByName("exampleTextTd").forEach((ett) => { | |
let channelNum = getChannelNameFromId(ett); | |
let resultList = channels[channelNum]; | |
ett = removeAllChildren(ett); | |
ett.appendChild(renderResultList(resultList, channelNum, 6)) | |
}); | |
} | |
function createFormField(tag, nameBase, channelNum) { | |
let fld = document.createElement(tag); | |
fld.id = `${nameBase}${channelNum}`; | |
fld.className = "form-control match-content"; | |
return fld; | |
} | |
function createCustField(channelNum) { | |
let div = document.createElement("div"); | |
div.id = `divChannelCustText${channelNum}`; | |
div.innerHTML = ` | |
<label for="channelCustText${channelNum}">Alias/Abbrev.</label> | |
<input type="text" id="channelCustText${channelNum}" class="form-control match-content"> | |
`.trim(); | |
return div; | |
} | |
function getTimeHeader() { | |
if(document.getElementById("timeformat").value == "none") { | |
return ""; | |
} | |
return "<td>Time</td>"; | |
} | |
function getTimeValue(origTimeString) { | |
if(document.getElementById("timeformat").value == "none") { | |
return ""; | |
} | |
if(document.getElementById("timeformat").value == "friendly") { | |
return luxon.DateTime.fromISO(origTimeString, {setZone: true}).setLocale('en-us').toFormat("LL/dd/yy hh:mm:ssa ZZZZ"); | |
} | |
else if(document.getElementById("timeformat").value == "friendlynotz") { | |
return luxon.DateTime.fromISO(origTimeString, {setZone: true}).setLocale('en-us').toFormat("LL/dd/yy hh:mm:ssa"); | |
} | |
else if(document.getElementById("timeformat").value == "minfriendly") { | |
return luxon.DateTime.fromISO(origTimeString, {setZone: true}).setLocale('en-us').toFormat("L/d/yy h:mm:ssa"); | |
} | |
else if(document.getElementById("timeformat").value == "european") { | |
return luxon.DateTime.fromISO(origTimeString, {setZone: true}).setLocale('en-us').toFormat("dd/LL/yy HH:mm:ss ZZZZ"); | |
} | |
return origTimeString; | |
} | |
function getTimeCell(origTimeString) { | |
if(document.getElementById("timeformat").value == "none") { | |
return ""; | |
} | |
return `<td>${getTimeValue(origTimeString)}</td>`; | |
} | |
function renderResultList(resultList, channelNum, howMany = null, prefix = "example") { | |
if(channelNum == null) channelNum = ""; | |
let retval = document.createElement("div"); | |
retval.style = "word-wrap: break-word;"; | |
if(document.getElementById("outputformat").value == "table") { | |
retval.innerHTML = ` | |
<table id="${prefix}TextTable${channelNum}" class="table table-bordered table-sm"> | |
<thead class='thead-light'> | |
<tr> | |
${getTimeHeader()} | |
<td>Channel</td> | |
<td>From</td> | |
<td>Message</td> | |
</tr> | |
</thead> | |
<tbody id='${prefix}TextTbody${channelNum}'> | |
</tbody> | |
</table> | |
`.trim(); | |
let tbody = retval.querySelector(`#${prefix}TextTbody${channelNum}`); | |
for(let i = 0; (howMany == null || i < Number(howMany)) && i < resultList.length; i++) { | |
if((channelNum != null && channelNum != "") || document.getElementById(`useChannelCheck${resultList[i][11]}`).checked) { | |
let row = document.createElement("tr"); | |
row.innerHTML = ` | |
${getTimeCell(resultList[i][1])} | |
<td>${chatChannelLabels[resultList[i][11]]}</td> | |
<td>${resultList[i][12]}</td> | |
<td style="word-wrap: break-word;">${resultList[i][13]}</td> | |
`.trim(); | |
tbody.appendChild(row); | |
} | |
} | |
} | |
else { | |
let tc = ""; | |
for(let i = 0; (howMany == null || i < Number(howMany)) && i < resultList.length; i++) { | |
if((channelNum != null && channelNum != "") || document.getElementById(`useChannelCheck${resultList[i][11]}`).checked) { | |
let tv = getTimeValue(resultList[i][1]); | |
if(tv != null && tv != "") tc += "[" + tv + "] "; | |
let cc = chatChannels[resultList[i][11]]; | |
if(cc == "Say") { | |
tc += resultList[i][12] + ": "; | |
} | |
else if(cc == "Emote") { | |
tc += resultList[i][12] + " "; | |
} | |
else if(cc == "Yell") { | |
tc += resultList[i][12] + " yells "; | |
} | |
else if(cc == "Whisper") { | |
tc += resultList[i][12] + ": " | |
} | |
else if(cc == "Outgoing Whisper") { | |
tc += "-> " + resultList[i][12] + ": " | |
} | |
else { | |
tc += "[" + chatChannelLabels[resultList[i][11]] + "] " + resultList[i][12] + ": "; | |
} | |
tc += resultList[i][13]; | |
tc += "<br>"; | |
} | |
} | |
retval.innerHTML = tc; | |
} | |
return retval; | |
} | |
function getTableRow(channelNum, resultList) { | |
let tr = document.createElement("tr"); | |
tr.id = `channelRow${channelNum}`; | |
tr.innerHTML = ` | |
<td style="display: table-cell;" id="useChannelTd${channelNum}"> | |
<input type="checkbox" id="useChannelCheck${channelNum}" name="useChannelCheck" checked class="form-control match-content"> | |
</td> | |
<td style="display: table-cell;" id="channelNameTd${channelNum}"> | |
<select id="channelTypeSelect${channelNum}" name="channelTypeSelect" class="form-control match-content"> | |
</select> | |
<div id="divChannelCustText${channelNum}" name="divChannelCustText"> | |
<br> | |
<label for="channelCustText${channelNum}">Alias/Abbrev.</label> | |
<input type="text" id="channelCustText${channelNum}" name="channelCustText" class="form-control match-content"> | |
</div> | |
</td> | |
<td style="display: table-cell;" id="channelNumTd${channelNum} name="channelNumTd"> | |
${channelNum} | |
</td> | |
<td style="display: table-cell;" id="exampleTextTd${channelNum}" name="exampleTextTd" style="word-wrap: break-word;"> | |
</td> | |
`.trim(); | |
let dd = tr.querySelector(`#channelTypeSelect${channelNum}`); | |
let dli = getDropListItems(); | |
dli.forEach((di) => { | |
dd.appendChild(di); | |
}); | |
dd.value = chatChannels[channelNum]; | |
dd.onchange = channelNameDropdownChange; | |
tr.querySelector(`#exampleTextTd${channelNum}`).appendChild(renderResultList(resultList, channelNum, 6)); | |
return tr; | |
} | |
async function handleFileSelect(evt) { | |
let files = evt.target.files; | |
outputList = createOutputList(); | |
for (let i = 0, f; f = files[i]; i++) { | |
await processFile(f); | |
} | |
runStepTwo(); | |
} | |
async function handleDrop(evt) { | |
evt.stopPropagation(); | |
evt.preventDefault(); | |
this.className = 'upload-drop-zone'; | |
outputList = createOutputList(); | |
let file = null; | |
if (evt.dataTransfer.items) { | |
for (let i = 0; i < evt.dataTransfer.items.length; i++) { | |
if (evt.dataTransfer.items[i].kind === 'file') { | |
file = evt.dataTransfer.items[i].getAsFile(); | |
processFile(file); | |
} | |
} | |
} | |
else { | |
for (let i = 0; i < ev.dataTransfer.files.length; i++) { | |
file = ev.dataTransfer.files[i]; | |
await processFile(file); | |
} | |
} | |
runStepTwo(); | |
} | |
async function processFile(f) { | |
let listItem = document.createElement('li'); | |
listItem.textContent = f.name; | |
outputList.appendChild(listItem); | |
let fileText = await readUploadedFileAsText(f); | |
let ff = { fileName: f.name, text: fileText.replace(/\r\n/g, "\n") }; | |
fileHolder.push(ff); | |
} | |
function dbg(txt) { | |
document.getElementById("debug").innerHTML += txt + "<br>"; | |
} | |
function sortLinesByTimestamp(lins) { | |
lins.sort(function(a, b) { | |
return (a[1] < b[1]) ? -1 : ((a[1] > b[1]) ? 1 : 0); | |
}); | |
} | |
function runStepTwo() { | |
document.getElementById('list').appendChild(outputList); | |
document.getElementById('step2').style.display = 'inline'; | |
document.getElementById('step1').style.display = 'none'; | |
fileHolder.forEach((fil) => { | |
let result; | |
while(result = linerx.exec(fil.text)) { | |
let listItem = document.createElement('li'); | |
let n11 = Number(result[11]); | |
if(!channels[n11]) { | |
channels[n11] = []; | |
} | |
channels[n11].push(result); | |
allLines.push(result); | |
} | |
let tabl = document.getElementById('channelTable'); | |
Object.keys(channels).forEach(function(key,index) { | |
tabl.appendChild(getTableRow(key, channels[key])); | |
}); | |
$(tabl).on('input', 'input[name=channelCustText]', (e) => { | |
channelNameChange(e.target); | |
}) | |
}); | |
} | |
function doGenerate() { | |
["step1", "list", "step2", "debug"].forEach((e) => document.getElementById(e).style.display = "none"); | |
let fr = document.getElementById("finalRender"); | |
fr.appendChild(renderResultList(allLines, null, null, "final")); | |
fr.style.display = "inline"; | |
} | |
function removeAllChildren(node) { | |
var cNode = node.cloneNode(false); | |
node.parentNode.replaceChild(cNode ,node); | |
return cNode; | |
} | |
function handleDragOver(evt) { | |
evt.stopPropagation(); | |
evt.preventDefault(); | |
evt.dataTransfer.dropEffect = 'copy'; // Explicitly show this is a copy. | |
this.className = 'upload-drop-zone drop'; | |
return false; | |
} | |
function handleDragLeave(evt) { | |
this.className = 'upload-drop-zone'; | |
return false; | |
} | |
document.getElementById('drop-zone').addEventListener('dragover', handleDragOver, false); | |
document.getElementById('drop-zone').addEventListener('dragleave', handleDragLeave, false); | |
document.getElementById('drop-zone').addEventListener('drop', handleDrop, false); | |
document.getElementById('customFile').addEventListener('change', handleFileSelect, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* layout.css Style */ | |
.upload-drop-zone { | |
height: 200px; | |
border-width: 2px; | |
margin-bottom: 20px; | |
} | |
/* skin.css Style*/ | |
.upload-drop-zone { | |
color: #ccc; | |
border-style: dashed; | |
border-color: #ccc; | |
line-height: 200px; | |
text-align: center | |
} | |
.upload-drop-zone.drop { | |
color: #222; | |
border-color: #222; | |
} | |
@media (max-width: 767px) { | |
.table-responsive .dropdown-menu { | |
position: static !important; | |
} | |
} | |
@media (min-width: 768px) { | |
.table-responsive { | |
overflow: inherit; | |
} | |
} | |
.match-content { width: auto; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment