New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fable-core

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fable-core - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

2

fable-core.d.ts

@@ -257,2 +257,4 @@ declare const FSymbol: {

static map3<T1, T2, T3, U>(f: (x: T1, y: T2, z: T3) => U, xs: Iterable<T1>, ys: Iterable<T2>, zs: Iterable<T3>): Iterable<U>;
static mapFold<T, ST, R>(f: (acc: ST, x: T) => Tuple<R, ST>, acc: ST, xs: Iterable<T>): [Iterable<R>, ST];
static mapFoldBack<T, ST, R>(f: (x: T, acc: ST) => Tuple<R, ST>, xs: Iterable<T>, acc: ST): [Iterable<R>, ST];
static max<T extends number>(xs: Iterable<T>): number;

@@ -259,0 +261,0 @@ static maxBy<T, U extends number>(f: (x: T) => U, xs: Iterable<T>): T;

4

fable-core.min.js

@@ -1,2 +0,2 @@

!function(n,t){if("function"==typeof define&&define.amd)define(["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var e={exports:{}};t(e.exports),n.fableCore=e.exports}}(this,function(n){"use strict";function t(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function e(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function r(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function u(n,t){return[n,t]}function i(n,t,e){return[n,t,e]}Object.defineProperty(n,"__esModule",{value:!0}),n.Tuple=u,n.Tuple3=i;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n},c=function(){function n(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}return function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),f={interfaces:Symbol("interfaces"),typeName:Symbol("typeName")};n.Symbol=f;var l=n.Choice=function(){function n(t,e,r){o(this,n),this.Case=t,this.Fields=[r]}return n.Choice1Of2=function(t){return new n("Choice1Of2",1,t)},n.Choice2Of2=function(t){return new n("Choice2Of2",1,t)},c(n,[{key:"valueIfChoice1",get:function(){return"Choice1Of2"===this.Case?this.Fields[0]:null}},{key:"valueIfChoice2",get:function(){return"Choice2Of2"===this.Case?this.Fields[0]:null}}]),n}(),s=n.Util=function(){function n(){o(this,n)}return n.setInterfaces=function(t,e,r){if(Array.isArray(e)&&e.length>0){var o=t[f.interfaces];if(Array.isArray(o))for(var u=0;u<e.length;u++)o.push(e[u]);else t[f.interfaces]=e}r&&(t[f.typeName]=r,n.__types.set(r,t.constructor))},n.hasInterface=function(n,t){return Array.isArray(n[f.interfaces])&&n[f.interfaces].indexOf(t)>=0},n.getRestParams=function(n,t){for(var e=n.length,r=Array(e>t?e-t:0),o=t;o<e;o++)r[o-t]=n[o];return r},n.compareTo=function(t,e){function r(n){return Array.isArray(n)||ArrayBuffer.isView(n)||n instanceof b||n instanceof Map||n instanceof Set}function o(n){return n instanceof Map||n instanceof Set?Array.from(n).sort():n}if(null==t&&null==e)return 0;if(("undefined"==typeof t?"undefined":a(t))!==("undefined"==typeof e?"undefined":a(e)))return-1;if(null!=t&&null!=e&&"object"===("undefined"==typeof t?"undefined":a(t))&&"object"===("undefined"==typeof e?"undefined":a(e))){if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return-1;if(n.hasInterface(t,"System.IComparable"))return t.compareTo(e);if(r(t)){var u=n.compareTo(w.count(t),w.count(e));return 0!=u?u:w.fold2(function(t,e,r){return 0!=t?t:n.compareTo(e,r)},0,o(t),o(e))}if(t instanceof Date)return t<e?-1:t>e?1:0;var i=Object.getOwnPropertyNames(t),c=Object.getOwnPropertyNames(e),f=n.compareTo(i.length,c.length);return 0!=f?f:w.fold2(function(r,o,u){return 0!=r?r:n.compareTo(t[o],e[u])},0,i.sort(),c.sort())}return t<e?-1:t>e?1:0},n.createDisposable=function(n){var t={dispose:n};return t[f.interfaces]=["System.IDisposable"],t},n.createObj=function(n){return w.fold(function(n,t){return n[t[0]]=t[1],n},{},n)},n.toJson=function(n){return JSON.stringify(n,function(n,t){if(ArrayBuffer.isView(t))return Array.from(t);if("object"==("undefined"==typeof t?"undefined":a(t))){if(t instanceof b||t instanceof Map||t instanceof Set)throw"JSON serialization of List, Map or Set is not supported";if(t[f.typeName])return Object.assign({__type:t[f.typeName]},t)}return t})},n.ofJson=function(t){return JSON.parse(t,function(t,e){if("object"==("undefined"==typeof e?"undefined":a(e))&&e.__type){var r=n.__types.get(e.__type);if(r)return delete e.__type,Object.assign(new r,e)}return e})},n}();s.__types=new Map,s.toPlainJsObj=function(n){if(null!=n&&n.constructor!=Object){for(var t={},e=Object.getOwnPropertyNames(n),r=0;r<e.length;r++)t[e[r]]=n[e[r]];var o=Object.getPrototypeOf(n);if(null!=o){e=Object.getOwnPropertyNames(o);for(var u=0;u<e.length;u++){var i=Object.getOwnPropertyDescriptor(o,e[u]);i.value?t[e[u]]=i.value:i.get&&(t[e[u]]=i.get.apply(n))}}return t}return n};var d=n.TimeSpan=function(n){function t(){return o(this,t),e(this,n.apply(this,arguments))}return r(t,n),t.create=function(){var n=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],e=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=arguments.length<=3||void 0===arguments[3]?0:arguments[3],o=arguments.length<=4||void 0===arguments[4]?0:arguments[4];switch(arguments.length){case 1:return this.fromTicks(arguments[0]);case 3:n=0,t=arguments[0],e=arguments[1],r=arguments[2],o=0;break;default:n=arguments[0],t=arguments[1],e=arguments[2],r=arguments[3],o=arguments[4]||0}return 864e5*n+36e5*t+6e4*e+1e3*r+o},t.fromTicks=function(n){return n/1e4},t.fromDays=function(n){return t.create(n,0,0,0)},t.fromHours=function(n){return t.create(n,0,0)},t.fromMinutes=function(n){return t.create(0,n,0)},t.fromSeconds=function(n){return t.create(0,0,n)},t.days=function(n){return Math.floor(n/864e5)},t.hours=function(n){return Math.floor(n%864e5/36e5)},t.minutes=function(n){return Math.floor(n%36e5/6e4)},t.seconds=function(n){return Math.floor(n%6e4/1e3)},t.milliseconds=function(n){return Math.floor(n%1e3)},t.ticks=function(n){return 1e4*n},t.totalDays=function(n){return n/864e5},t.totalHours=function(n){return n/36e5},t.totalMinutes=function(n){return n/6e4},t.totalSeconds=function(n){return n/1e3},t.negate=function(n){return n*-1},t.add=function(n,t){return n+t},t.subtract=function(n,t){return n-t},t}(Number);d.compare=s.compareTo,d.compareTo=s.compareTo,d.duration=Math.abs;var p=n.DateKind=void 0;!function(n){n[n.UTC=1]="UTC",n[n.Local=2]="Local"}(p||(n.DateKind=p={}));var y=function(n){function t(){return o(this,t),e(this,n.apply(this,arguments))}return r(t,n),t.__changeKind=function(n,t){var e=void 0;return n.kind==t?n:(e=new Date(n.getTime()),e.kind=t,e)},t.__getValue=function(n,t){return n[(n.kind==p.UTC?"getUTC":"get")+t]()},t.minValue=function(){return t.parse(-864e13,1)},t.maxValue=function(){return t.parse(864e13,1)},t.parse=function(n,t){var e=null==n?new Date:new Date(n);if(isNaN(e.getTime()))throw"The string is not a valid Date.";return e.kind=t||p.Local,e},t.create=function(n,t,e){var r=arguments.length<=3||void 0===arguments[3]?0:arguments[3],o=arguments.length<=4||void 0===arguments[4]?0:arguments[4],u=arguments.length<=5||void 0===arguments[5]?0:arguments[5],i=arguments.length<=6||void 0===arguments[6]?0:arguments[6],a=arguments.length<=7||void 0===arguments[7]?p.Local:arguments[7],c=a===p.UTC?new Date(Date.UTC(n,t-1,e,r,o,u,i)):new Date(n,t-1,e,r,o,u,i);if(isNaN(c.getTime()))throw"The parameters describe an unrepresentable Date.";return c.kind=a,c},t.utcNow=function(){return t.parse(null,1)},t.today=function(){return t.date(t.now())},t.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0},t.daysInMonth=function(n,e){return 2==e?t.isLeapYear(n)?29:28:e>=8?e%2==0?31:30:e%2==0?30:31},t.toUniversalTime=function(n){return t.__changeKind(n,1)},t.toLocalTime=function(n){return t.__changeKind(n,2)},t.timeOfDay=function(n){return d.create(t.hour(n),t.minute(n),t.second(n))},t.date=function(n){return t.create(t.year(n),t.month(n),t.day(n),0,0,0,0,n.kind)},t.day=function(n){return t.__getValue(n,"Date")},t.hour=function(n){return t.__getValue(n,"Hours")},t.millisecond=function(n){return t.__getValue(n,"Milliseconds")},t.minute=function(n){return t.__getValue(n,"Minutes")},t.month=function(n){return t.__getValue(n,"Month")+1},t.second=function(n){return t.__getValue(n,"Seconds")},t.year=function(n){return t.__getValue(n,"FullYear")},t.ticks=function(n){return 1e4*(n.getTime()+62135604e6)},t.dayOfWeek=function(n){return t.__getValue(n,"Day")},t.dayOfYear=function(n){for(var e=t.year(n),r=t.month(n),o=t.day(n),u=1;u<r;u++)o+=t.daysInMonth(e,u);return o},t.add=function(n,e){return t.parse(n.getTime()+e,n.kind)},t.addDays=function(n,e){return t.parse(n.getTime()+864e5*e,n.kind)},t.addHours=function(n,e){return t.parse(n.getTime()+36e5*e,n.kind)},t.addMinutes=function(n,e){return t.parse(n.getTime()+6e4*e,n.kind)},t.addSeconds=function(n,e){return t.parse(n.getTime()+1e3*e,n.kind)},t.addMilliseconds=function(n,e){return t.parse(n.getTime()+e,n.kind)},t.addTicks=function(n,e){return t.parse(n.getTime()+e/1e4,n.kind)},t.addYears=function(n,e){var r=t.month(n),o=t.year(n)+e,u=t.daysInMonth(o,r),i=Math.min(u,t.day(n));return t.create(o,r,i,t.hour(n),t.minute(n),t.second(n),t.millisecond(n),n.kind)},t.addMonths=function(n,e){var r=t.month(n)+e,o=0,u=0;r>12?(o=r%12,u=Math.floor(r/12),r=o):r<1&&(o=12+r%12,u=Math.floor(r/12)+(12==o?-1:0),r=o);var i=t.year(n)+u,a=t.daysInMonth(i,r),c=Math.min(a,t.day(n));return t.create(i,r,c,t.hour(n),t.minute(n),t.second(n),t.millisecond(n),n.kind)},t.subtract=function(n,e){return"number"==typeof e?t.parse(n.getTime()-e,n.kind):n.getTime()-e.getTime()},t.toLongDateString=function(n){return n.toDateString()},t.toShortDateString=function(n){return n.toLocaleDateString()},t.toLongTimeString=function(n){return n.toLocaleTimeString()},t.toShortTimeString=function(n){return n.toLocaleTimeString().replace(/:\d\d(?!:)/,"")},t.equals=function(n,t){return n.getTime()==t.getTime()},t}(Date);y.now=y.parse,y.toBinary=y.ticks,y.compareTo=s.compareTo,y.compare=s.compareTo,y.op_Addition=y.add,y.op_Subtraction=y.subtract,n.Date=y;var h=n.Timer=function(){function n(t){o(this,n),this.interval=t>0?t:100,this.autoReset=!0,this._elapsed=new E}return n.prototype.dispose=function(){this.enabled=!1,this._isDisposed=!0},n.prototype.close=function(){this.dispose()},n.prototype.start=function(){this.enabled=!0},n.prototype.stop=function(){this.enabled=!1},c(n,[{key:"elapsed",get:function(){return this._elapsed}},{key:"enabled",get:function(){return this._enabled},set:function(n){var t=this;this._isDisposed||this._enabled==n||((this._enabled=n)?this.autoReset?this._intervalId=setInterval(function(){t.autoReset||(t.enabled=!1),t._elapsed.trigger(new Date)},this.interval):this._timeoutId=setTimeout(function(){t.enabled=!1,t._timeoutId=0,t.autoReset&&(t.enabled=!0),t._elapsed.trigger(new Date)},this.interval):(this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=0),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=0)))}}]),n}();s.setInterfaces(h.prototype,["System.IDisposable"]);var v=function(){function n(){o(this,n)}return n.fsFormat=function(t){function e(n){return!(null===n||"object"!==("undefined"==typeof n?"undefined":a(n))||n instanceof Number||n instanceof String||n instanceof Boolean)}function r(t,r){return t.replace(n.fsFormatRegExp,function(t,o,u,i,a,c){switch(c){case"f":case"F":r=r.toFixed(a||6);break;case"g":case"G":r=r.toPrecision(a);break;case"e":case"E":r=r.toExponential(a);break;case"A":r=(r instanceof Map?"map ":r instanceof Set?"set ":"")+JSON.stringify(r,function(n,t){return t&&t[Symbol.iterator]&&!Array.isArray(t)&&e(t)?Array.from(t):t})}var f=u.indexOf("+")>=0&&parseInt(r)>=0;if(!isNaN(i=parseInt(i))){var l=i>=0&&u.indexOf("0")>=0?"0":" ";r=n.padLeft(r,Math.abs(i)-(f?1:0),l,i<0)}return o+(f?"+"+r:r)})}function o(t){return function(e){var i=r(t,e);return n.fsFormatRegExp.test(i)?o(i):u(i.replace(/%%/g,"%"))}}var u=void 0;return function(e){return u=e,n.fsFormatRegExp.test(t)?o(t):u(t)}},n.format=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return t.replace(n.formatRegExp,function(t,e,o,u){var i=r[e];if("number"==typeof i)switch((u||"").substring(0,1)){case"f":case"F":i=u.length>1?i.toFixed(u.substring(1)):i.toFixed(2);break;case"g":case"G":i=u.length>1?i.toPrecision(u.substring(1)):i.toPrecision();break;case"e":case"E":i=u.length>1?i.toExponential(u.substring(1)):i.toExponential();break;case"p":case"P":i=(u.length>1?(100*i).toFixed(u.substring(1)):(100*i).toFixed(2))+" %"}else if(i instanceof Date){if(1===u.length)switch(u){case"D":i=i.toDateString();break;case"T":i=i.toLocaleTimeString();break;case"d":i=i.toLocaleDateString();break;case"t":i=i.toLocaleTimeString().replace(/:\d\d(?!:)/,"")}i=u.replace(/\w+/g,function(n){var t=n;switch(n.substring(0,1)){case"y":t=n.length<4?y.year(i)%100:y.year(i);break;case"h":t=i.getHours()>12?y.hour(i)%12:y.hour(i);break;case"M":t=y.month(i);break;case"d":t=y.day(i);break;case"H":t=y.hour(i);break;case"m":t=y.minute(i);break;case"s":t=y.second(i)}return t!==n&&t<10&&n.length>1&&(t="0"+t),t})}return isNaN(o=parseInt((o||"").substring(1)))||(i=n.padLeft(i,Math.abs(o)," ",o<0)),i})},n.endsWith=function(n,t){var e=n.lastIndexOf(t);return e>=0&&e==n.length-t.length},n.init=function(n,t){if(n<0)throw"String length must be non-negative";for(var e=new Array(n),r=0;r<n;r++)e[r]=t(r);return e.join("")},n.isNullOrEmpty=function(n){return"string"!=typeof n||0==n.length},n.isNullOrWhiteSpace=function(n){return"string"!=typeof n||/^\s*$/.test(n)},n.join=function(n,t){return t="string"==typeof t?s.getRestParams(arguments,1):t,(Array.isArray(t)?t:Array.from(t)).join(n)},n.newGuid=function(){for(var n="",t=0;t<32;t++){var e=16*Math.random()|0;8!==t&&12!==t&&16!==t&&20!==t||(n+="-"),n+=(12===t?4:16===t?3&e|8:e).toString(16)}return n},n.padLeft=function(n,t,e,r){e=e||" ",n=String(n),t-=n.length;for(var o=-1;++o<t;)n=r?n+e:e+n;return n},n.padRight=function(t,e,r){return n.padLeft(t,e,r,!0)},n.replace=function(n,t,e){return n.replace(new RegExp(m.escape(t),"g"),e)},n.replicate=function(t,e){return n.init(t,function(){return e})},n.split=function(n,t,e,r){if(e="number"==typeof e?e:null,r="number"==typeof r?r:null,e<0)throw"Count cannot be less than zero";if(0===e)return[];t=Array.isArray(t)?t:s.getRestParams(arguments,1),t=t.map(function(n){return m.escape(n)}),t=t.length>0?t:[" "];for(var o=void 0,u=0,i=[],a=new RegExp(t.join("|"),"g");(null==e||e>1)&&null!==(o=a.exec(n));)(!r||o.index-u>0)&&(e=null!=e?e-1:e,i.push(n.substring(u,o.index))),u=a.lastIndex;return(!r||n.length-u>0)&&i.push(n.substring(u)),i},n.trim=function(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;o<e;o++)r[o-2]=arguments[o];if("both"==t&&0==r.length)return n.trim();if("start"==t||"both"==t){var u=0==r.length?/^\s+/:new RegExp("^["+m.escape(r.join(""))+"]+");n=n.replace(u,"")}if("end"==t||"both"==t){var i=0==r.length?/\s+$/:new RegExp("["+m.escape(r.join(""))+"]+$");n=n.replace(i,"")}return n},n}();v.fsFormatRegExp=/(^|[^%])%([0+ ]*)(-?\d+)?(?:\.(\d+))?(\w)/,v.formatRegExp=/\{(\d+)(,-?\d+)?(?:\:(.+?))?\}/g,v.concat=v.join,n.String=v;var m=function(){function n(){o(this,n)}return n.create=function(n,t){var e="g";return e+=1&t?"i":"",e+=2&t?"m":"",new RegExp(n,e)},n.escape=function(n){return n.replace(/[\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},n.unescape=function(n){return n.replace(/\\([\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|])/g,"$1")},n.isMatch=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=t instanceof RegExp?(o=t,t=e,o.lastIndex=r,o):o=n.create(e,r);return o.test(t)},n.match=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=t instanceof RegExp?(o=t,t=e,o.lastIndex=r,o):o=n.create(e,r);return o.exec(t)},n.matches=function t(e,r){var o=arguments.length<=2||void 0===arguments[2]?0:arguments[2],u=e instanceof RegExp?(u=e,e=r,u.lastIndex=o,u):u=n.create(r,o);if(!u.global)throw"Non-global RegExp";for(var i=void 0,t=[];null!==(i=u.exec(e));)t.push(i);return t},n.options=function n(t){var n=256;return n|=t.ignoreCase?1:0,n|=t.multiline?2:0},n.replace=function(t,e,r,o){function u(){var n=arguments[0];if(0!==o){o--;for(var t=[],e=arguments.length,u=0;u<e-2;u++)t.push(arguments[u]);t.index=arguments[e-2],t.input=arguments[e-1],n=r(t)}return n}var i=arguments.length<=4||void 0===arguments[4]?0:arguments[4];if("string"==typeof t){var a=t;t=n.create(e,o),e=a,o=void 0}if("function"==typeof r)return o=null==o?-1:o,e.substring(0,i)+e.substring(i).replace(t,u);if(null!=o){var c=void 0,f=e.substring(i),l=n.matches(t,f),s=l.length>o?(c=l[o-1],f.substring(0,c.index+c[0].length)):f;return e.substring(0,i)+s.replace(t,r)+e.substring(i+s.length)}return e.replace(t,r)},n.split=function(t,e,r){var o=arguments.length<=3||void 0===arguments[3]?0:arguments[3];if("string"==typeof t){var u=t;t=n.create(e,r),e=u,r=void 0}return e=e.substring(o),e.split(t,r)},n}();n.RegExp=m;var g=function(){function n(){o(this,n)}return n.addRangeInPlace=function(n,t){w.iter(function(n){return t.push(n)},n)},n.blit=function(n,t,e,r,o){for(;o--;)e[r++]=n[t++]},n.partition=function(n,t){for(var e=[],r=[],o=0,i=0,a=0;a<t.length;a++)n(t[a])?e[o++]=t[a]:r[i++]=t[a];return u(e,r)},n.permute=function(n,t){for(var e=t.map(function(){return null}),r=new Array(t.length),o=0;o<t.length;o++){var u=n(o);if(u<0||u>=t.length)throw"Not a valid permutation";e[u]=t[o],r[u]=1}for(var i=0;i<t.length;i++)if(1!=r[i])throw"Not a valid permutation";return e},n.removeInPlace=function(n,t){var e=t.indexOf(n);return e>-1&&(t.splice(e,1),!0)},n.setSlice=function(n,t,e,r){var o=(e||n.length-1)-t;if(ArrayBuffer.isView(n)&&r.length<=o)n.set(r,t);else for(var u=0|t,i=0;i<=o;u++,i++)n[u]=r[i]},n.sortInPlaceBy=function(n,t){var e=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t.sort(function(t,r){return t=n(t),r=n(r),(t<r?-1:t==r?0:1)*e})},n.unzip=function(n){for(var t=new Array(n.length),e=new Array(n.length),r=0;r<n.length;r++)t[r]=n[r][0],e[r]=n[r][1];return u(t,e)},n.unzip3=function(n){for(var t=new Array(n.length),e=new Array(n.length),r=new Array(n.length),o=0;o<n.length;o++)t[o]=n[o][0],e[o]=n[o][1],r[o]=n[o][2];return i(t,e,r)},n}();n.Array=g;var b=n.List=function(){function n(t,e){o(this,n),this.head=t,this.tail=e}return n.ofArray=function(t,e){for(var r=e||new n,o=t.length-1;o>=0;o--)r=new n(t[o],r);return r},n.prototype[Symbol.iterator]=function(){var n=this;return{next:function(){var t=n;return n=n.tail,{done:null==t.tail,value:t.head}}}},n.prototype.append=function(t){return n.append(this,t)},n.append=function(t,e){return w.fold(function(t,e){return new n(e,t)},e,n.rev(t))},n.prototype.choose=function(t,e){return n.choose(t,this)},n.choose=function(t,e){var r=w.fold(function(e,r){var o=t(r);return null!=o?new n(o,e):e},new n,e);return n.rev(r)},n.prototype.collect=function(t){return n.collect(t,this)},n.collect=function(t,e){return w.fold(function(n,e){return n.append(t(e))},new n,e)},n.concat=function(t){return n.collect(function(n){return n},t)},n.prototype.filter=function(t){return n.filter(t,this)},n.filter=function(t,e){return n.rev(w.fold(function(e,r){return t(r)?new n(r,e):e},new n,e))},n.prototype.where=function(t){return n.filter(t,this)},n.where=function(t,e){return n.filter(t,e)},n.init=function(t,e){if(t<0)throw"List length must be non-negative";for(var r=new n,o=1;o<=t;o++)r=new n(e(t-o),r);return r},n.prototype.map=function(t){return n.map(t,this)},n.map=function(t,e){return n.rev(w.fold(function(e,r){return new n(t(r),e)},new n,e))},n.prototype.mapi=function(t){return n.mapi(t,this)},n.mapi=function(t,e){return n.rev(w.fold(function(e,r,o){return new n(t(o,r),e)},new n,e))},n.prototype.partition=function(t){return n.partition(t,this)},n.partition=function(t,e){return w.fold(function(e,r){var o=e[0],i=e[1];return t(r)?u(new n(r,o),i):u(o,new n(r,i))},u(new n,new n),n.rev(e))},n.replicate=function(t,e){return n.init(t,function(){return e})},n.prototype.rev=function(){return n.rev(this)},n.rev=function(t){return w.fold(function(t,e){return new n(e,t)},new n,t)},n.singleton=function(t){return new n(t,new n)},n.prototype.slice=function(t,e){return n.slice(t,e,this)},n.slice=function(t,e,r){var o=null==t,u=null==e;return n.rev(w.fold(function(r,i,a){return(o||t<=a)&&(u||a<=e)?new n(i,r):r},new n,r))},n.unzip=function(t){return w.foldBack(function(t,e){return u(new n(t[0],e[0]),new n(t[1],e[1]))},t,u(new n,new n))},n.unzip3=function(t){return w.foldBack(function(t,e){return i(new n(t[0],e[0]),new n(t[1],e[1]),new n(t[2],e[2]))},t,i(new n,new n,new n))},c(n,[{key:"length",get:function(){return w.fold(function(n,t){return n+1},0,this)}}]),n}(),w=n.Seq=function(){function n(){o(this,n)}return n.__failIfNone=function(n){if(null==n)throw"Seq did not contain any matching element";return n},n.toList=function(t){return n.foldBack(function(n,t){return new b(n,t)},t,new b)},n.ofList=function(t){return n.delay(function(){return n.unfold(function(n){return null!=n.tail?[n.head,n.tail]:null},t)})},n.ofArray=function(t){return n.delay(function(){return n.unfold(function(n){return n<t.length?[t[n],n+1]:null},0)})},n.append=function(t,e){return n.delay(function(){var r=!1,o=t[Symbol.iterator](),i=u(o,null);return n.unfold(function(){var n=void 0;if(!r){if(n=i[0].next(),!n.done)return[n.value,i];r=!0,i=[null,e[Symbol.iterator]()]}return n=i[1].next(),n.done?null:[n.value,i]},i)})},n.average=function(t){var e=1,r=n.reduce(function(n,t){return e++,n+t},t);return r/e},n.averageBy=function(t,e){var r=1,o=n.reduce(function(n,e){return r++,(2===r?t(n):n)+t(e)},e);return o/r},n.countBy=function(t,e){return n.map(function(t){return u(t[0],n.count(t[1]))},n.groupBy(t,e))},n.concat=function(t){return n.delay(function(){var e=t[Symbol.iterator](),r=null;return n.unfold(function(n){for(var t=!1;!t;)if(null==n){var o=e.next();o.done?t=!0:n=o.value[Symbol.iterator]()}else{var u=n.next();u.done?n=null:(r=u.value,t=!0)}return null!=n&&null!=r?[r,n]:null},null)})},n.collect=function(t,e){return n.concat(n.map(t,e))},n.choose=function(t,e){var r=function n(e){var r=e.next();if(!r.done){var o=t(r.value);return null!=o?u(o,e):n(e)}};return n.delay(function(){return n.unfold(function(n){return r(n)},e[Symbol.iterator]())})},n.compareWith=function(t,e,r){var o=n.tryFind(function(n){return 0!=n},n.map2(function(n,e){return t(n,e)},e,r));return null!=o?o:n.count(e)-n.count(r)},n.delay=function(n){return t({},Symbol.iterator,function(){return n()[Symbol.iterator]()})},n.distinctBy=function(t,e){return n.choose(function(n){return n[0]},n.scan(function(n,e){var r=n[1],o=t(e);return r.has(o)?u(null,r):u(e,r.add(o))},u(null,new Set),e))},n.distinct=function(t){return n.distinctBy(function(n){return n},t)},n.empty=function(){return n.unfold(function(){})},n.enumerateWhile=function(t,e){return n.concat(n.unfold(function(){return t()?[e,!0]:null}))},n.enumerateThenFinally=function(t,e){return n.delay(function(){var r=void 0;try{r=t[Symbol.iterator]()}finally{e()}return n.unfold(function(n){try{var t=n.next();return t.done?null:[t.value,n]}finally{e()}},r)})},n.enumerateUsing=function(t,e){var r=!1,o=function(){r||(r=!0,t.dispose())};try{return n.enumerateThenFinally(e(t),o)}finally{o()}},n.exactlyOne=function(n){var t=n[Symbol.iterator](),e=t.next();if(e.done)throw"Seq was empty";var r=t.next();if(!r.done)throw"Seq had multiple items";return e.value},n.exists=function(n,t){function e(t){var r=t.next();return!r.done&&(n(r.value)||e(t))}return e(t[Symbol.iterator]())},n.exists2=function(n,t,e){function r(t,e){var o=t.next(),u=e.next();return!o.done&&!u.done&&(n(o.value,u.value)||r(t,e))}return r(t[Symbol.iterator](),e[Symbol.iterator]())},n.filter=function(t,e){function r(n){var e=n.next();if(!e.done)return t(e.value)?[e.value,n]:r(n)}return n.delay(function(){return n.unfold(r,e[Symbol.iterator]())})},n.where=function(t,e){return n.filter(t,e)},n.fold=function(n,t,e){if(Array.isArray(e)||ArrayBuffer.isView(e))return e.reduce(n,t);for(var r=null,o=0,u=e[Symbol.iterator]();r=u.next(),!r.done;o++)t=n(t,r.value,o);return t},n.foldBack=function(n,t,e){for(var r=Array.isArray(t)||ArrayBuffer.isView(t)?t:Array.from(t),o=r.length-1;o>=0;o--)e=n(r[o],e,o);return e},n.fold2=function(n,t,e,r){for(var o=e[Symbol.iterator](),u=r[Symbol.iterator](),i=void 0,a=void 0,c=0;i=o.next(),a=u.next(),!i.done&&!a.done;c++)t=n(t,i.value,a.value,c);return t},n.foldBack2=function(n,t,e,r){for(var o=Array.isArray(t)||ArrayBuffer.isView(t)?t:Array.from(t),u=Array.isArray(e)||ArrayBuffer.isView(e)?e:Array.from(e),i=o.length-1;i>=0;i--)r=n(o[i],u[i],r,i);return r},n.forall=function(t,e){return n.fold(function(n,e){return n&&t(e)},!0,e)},n.forall2=function(t,e,r){return n.fold2(function(n,e,r){return n&&t(e,r)},!0,e,r)},n.groupBy=function(t,e){return n.fold(function(n,e){var r=t(e),o=n.get(r);return null!=o?n.set(r,new b(e,o)):n.set(r,b.singleton(e))},new Map,e)},n.tryHead=function(n){var t=n[Symbol.iterator](),e=t.next();return e.done?null:e.value},n.head=function(t){return n.__failIfNone(n.tryHead(t))},n.init=function(t,e){return n.delay(function(){return n.unfold(function(n){return n<t?[e(n),n+1]:null},0)})},n.initInfinite=function(t){return n.delay(function(){return n.unfold(function(n){return[t(n),n+1]},0)})},n.tryItem=function(n,t){if(n<0)return null;if(Array.isArray(t)||ArrayBuffer.isView(t))return n<t.length?t[n]:null;for(var e=0,r=t[Symbol.iterator]();;e++){var o=r.next();if(o.done)return null;if(e===n)return o.value}},n.item=function(t,e){return n.__failIfNone(n.tryItem(t,e))},n.iter=function(t,e){n.fold(function(n,e){return t(e)},null,e)},n.iter2=function(t,e,r){n.fold2(function(n,e,r){return t(e,r)},null,e,r)},n.iteri=function(t,e){n.fold(function(n,e,r){return t(r,e)},null,e)},n.iteri2=function(t,e,r){n.fold2(function(n,e,r,o){return t(o,e,r)},null,e,r)},n.isEmpty=function(n){var t=n[Symbol.iterator]();return t.next().done},n.tryLast=function(t){try{return n.reduce(function(n,t){return t},t)}catch(n){return null}},n.last=function(t){return n.__failIfNone(n.tryLast(t))},n.count=function(t){return Array.isArray(t)||ArrayBuffer.isView(t)?t.length:n.fold(function(n,t){return n+1},0,t)},n.map=function(t,e){return n.delay(function(){return n.unfold(function(n){var e=n.next();return e.done?null:[t(e.value),n]},e[Symbol.iterator]())})},n.mapi=function(t,e){return n.delay(function(){var r=0;return n.unfold(function(n){var e=n.next();return e.done?null:[t(r++,e.value),n]},e[Symbol.iterator]())})},n.map2=function(t,e,r){return n.delay(function(){var o=e[Symbol.iterator](),u=r[Symbol.iterator]();return n.unfold(function(){var n=o.next(),e=u.next();return n.done||e.done?null:[t(n.value,e.value),null]})})},n.mapi2=function(t,e,r){return n.delay(function(){var o=0,u=e[Symbol.iterator](),i=r[Symbol.iterator]();return n.unfold(function(){var n=u.next(),e=i.next();return n.done||e.done?null:[t(o++,n.value,e.value),null]})})},n.map3=function(t,e,r,o){return n.delay(function(){var u=e[Symbol.iterator](),i=r[Symbol.iterator](),a=o[Symbol.iterator]();return n.unfold(function(){var n=u.next(),e=i.next(),r=a.next();return n.done||e.done||r.done?null:[t(n.value,e.value,r.value),null]})})},n.max=function(t){return n.reduce(function(n,t){return Math.max(n,t)},t)},n.maxBy=function(t,e){return n.reduce(function(n,e){return t(n)>t(e)?n:e},e)},n.min=function(t){return n.reduce(function(n,t){return Math.min(n,t)},t)},n.minBy=function(t,e){return n.reduce(function(n,e){return t(n)<t(e)?n:e},e)},n.pairwise=function(t){return n.skip(1,n.scan(function(n,t){return u(n[1],t)},u(0,0),t))},n.permute=function(t,e){return n.ofArray(g.permute(t,Array.from(e)))},n.rangeStep=function(t,e,r){if(0===e)throw"Step cannot be 0";return n.unfold(function(n){return e>0&&n<=r||e<0&&n>=r?[n,n+e]:null},t)},n.rangeChar=function(t,e){return n.unfold(function(n){return n<=e?[n,String.fromCharCode(n.charCodeAt(0)+1)]:null},t)},n.range=function(t,e){return n.rangeStep(t,1,e)},n.readonly=function(t){return n.map(function(n){return n},t)},n.reduce=function(n,t){if(Array.isArray(t)||ArrayBuffer.isView(t))return t.reduce(n);var e=t[Symbol.iterator](),r=e.next();if(r.done)throw"Seq was empty";for(var o=r.value;r=e.next(),!r.done;)o=n(o,r.value);return o},n.reduceBack=function(n,t){var e=Array.isArray(t)||ArrayBuffer.isView(t)?t:Array.from(t);if(0===e.length)throw"Seq was empty";for(var r=e[e.length-1],o=e.length-2;o>=0;o--)r=n(e[o],r,o);return r},n.replicate=function(t,e){return n.init(t,function(){return e})},n.rev=function(t){var e=Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):Array.from(t);return n.ofArray(e.reverse())},n.scan=function(t,e,r){return n.delay(function(){var o=r[Symbol.iterator]();return n.unfold(function(n){if(null==n)return[e,e];var r=o.next();return r.done?void 0:(n=t(n,r.value),[n,n])},null)})},n.scanBack=function(t,e,r){return n.rev(n.scan(function(n,e){return t(e,n)},r,n.rev(e)))},n.singleton=function(t){return n.unfold(function(n){return null!=n?[n,null]:null},t)},n.skip=function(n,e){return t({},Symbol.iterator,function(){for(var t=e[Symbol.iterator](),r=1;r<=n;r++)if(t.next().done)throw"Seq has not enough elements";return t})},n.skipWhile=function(t,e){return n.delay(function(){var r=!1;return n.filter(function(n){return r||(r=!t(n))},e)})},n.sortWith=function(t,e){var r=Array.from(e);return n.ofArray(r.sort(t))},n.defaultAdder=function(n,t){return n+t},n.sum=function(t,e){return e=e||n.defaultAdder,n.reduce(function(n,t){return e(n,t)},t)},n.sumBy=function(t,e,r){var o=!0;return r=r||n.defaultAdder,n.reduce(function(n,e){return n=o?t(n):n,o=!1,r(n,t(e))},e)},n.tail=function(n){var e=n[Symbol.iterator](),r=e.next();if(r.done)throw"Seq was empty";return t({},Symbol.iterator,function(){return e})},n.take=function(t,e){var r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];return n.delay(function(){var o=e[Symbol.iterator]();return n.unfold(function(n){if(n<t){var e=o.next();if(!e.done)return[e.value,n+1];if(!r)throw"Seq has not enough elements"}},0)})},n.truncate=function(t,e){return n.take(t,e,!0)},n.takeWhile=function(t,e){return n.delay(function(){var r=e[Symbol.iterator]();return n.unfold(function(n){var e=r.next();if(!e.done&&t(e.value))return[e.value,null]},0)})},n.tryFind=function(n,t){for(var e=0,r=t[Symbol.iterator]();;e++){var o=r.next();if(o.done)return null;if(n(o.value,e))return o.value}},n.find=function(t,e){return n.__failIfNone(n.tryFind(t,e))},n.tryFindBack=function(n,t){for(var e=null,r=0,o=t[Symbol.iterator]();;r++){var u=o.next();if(u.done)return e;n(u.value,r)&&(e=u.value)}},n.findBack=function(t,e){return n.__failIfNone(n.tryFindBack(t,e))},n.tryFindIndex=function(n,t){for(var e=0,r=t[Symbol.iterator]();;e++){var o=r.next();if(o.done)return null;if(n(o.value,e))return e}},n.findIndex=function(t,e){return n.__failIfNone(n.tryFindIndex(t,e))},n.tryFindIndexBack=function(n,t){for(var e=0,r=0,o=t[Symbol.iterator]();;r++){var u=o.next();if(u.done)return e;n(u.value,r)&&(e=r)}},n.findIndexBack=function(t,e){return n.__failIfNone(n.tryFindIndexBack(t,e))},n.tryPick=function(n,t){for(var e=0,r=t[Symbol.iterator]();;e++){var o=r.next();if(o.done)break;var u=n(o.value,e);if(null!=u)return u}},n.pick=function(t,e){return n.__failIfNone(n.tryPick(t,e))},n.unfold=function(n,e){return t({},Symbol.iterator,function(){return{next:function(){var t=n(e);return null!=t?(e=t[1],{done:!1,value:t[0]}):{done:!0}}}})},n.zip=function(t,e){return n.map2(function(n,t){return[n,t]},t,e)},n.zip3=function(t,e,r){return n.map3(function(n,t,e){return[n,t,e]},t,e,r)},n}(),S=function(){function n(){o(this,n)}return n.union=function(n,t){return w.fold(function(n,t){return n.add(t),n},new Set(n),t)},n.unionMany=function(t){return w.fold(function(t,e){return n.union(t,e)},new Set,t)},n.difference=function(n,t){return w.fold(function(n,t){return n.delete(t),n},new Set(n),t)},n.intersect=function(n,t){return w.fold(function(n,e){return t.has(e)||n.delete(e),n},new Set(n),n)},n.intersectMany=function(n){var t=Array.isArray(n)?n:Array.from(n);if(0==t.length)throw"Seq was empty";var e=new Set(t[0]);return w.iter(function(n){for(var r=1;r<t.length;r++)if(!t[r].has(n)){e.delete(n);break}},t[0]),e},n.isProperSubsetOf=function(n,t){return w.forall(function(n){return t.has(n)},n)&&w.exists(function(t){
return!n.has(t)},t)},n.isSubsetOf=function(n,t){return w.forall(function(n){return t.has(n)},n)},n.isProperSupersetOf=function(t,e){return n.isProperSubset(e,t)},n.isSupersetOf=function(t,e){return n.isSubset(e,t)},n.copyTo=function(n,t,e,r){if(!Array.isArray(t)&&!ArrayBuffer.isView(t))throw"Array is invalid";r=r||t.length;for(var o=e||0,u=n[Symbol.iterator]();r--;){var i=u.next();if(i.done)break;t[o++]=i.value}},n.partition=function(n,t){return w.fold(function(t,e){var r=t[0],o=t[1];return n(e)?u(r.add(e),o):u(r,o.add(e))},u(new Set,new Set),t)},n.remove=function(t,e){return n.removeInPlace(t,new Set(e))},n.removeInPlace=function(n,t){return t.delete(n),t},n}();S.op_Addition=S.union,S.op_Subtraction=S.difference,S.isProperSubset=S.isProperSubsetOf,S.isSubset=S.isSubsetOf,S.isProperSuperset=S.isProperSupersetOf,S.isSuperset=S.isSupersetOf,n.Set=S;var _=function(){function n(){o(this,n)}return n.containsValue=function(n,t){return w.fold(function(e,r){return e||t.get(r)===n},!1,t.keys())},n.exists=function(n,t){return w.exists(function(t){return n(t[0],t[1])},t)},n.filter=function(n,t){return w.fold(function(t,e){return n(e[0],e[1])?t.set(e[0],e[1]):t},new Map,t)},n.fold=function(n,t,e){return w.fold(function(t,e){return n(t,e[0],e[1])},t,e)},n.foldBack=function(n,t,e){return w.foldBack(function(t,e){return n(t[0],t[1],e)},t,e)},n.forall=function(n,t){return w.forall(function(t){return n(t[0],t[1])},t)},n.iter=function(n,t){return w.iter(function(t){return n(t[0],t[1])},t)},n.map=function(n,t){return w.fold(function(t,e){return t.set(e[0],n(e[0],e[1]))},new Map,t)},n.partition=function(n,t){return w.fold(function(t,e){var r=t[0],o=t[1],i=e[0],a=e[1];return n(i,a)?u(r.set(i,a),o):u(r,o.set(i,a))},u(new Map,new Map),t)},n.findKey=function(n,t){return w.pick(function(t){return n(t[0],t[1])?t[0]:null},t)},n.tryFindKey=function(n,t){return w.tryPick(function(t){return n(t[0],t[1])?t[0]:null},t)},n.pick=function(n,t){return w.pick(function(t){var e=n(t[0],t[1]);return null!=e?e:null},t)},n.remove=function(t,e){return n.removeInPlace(t,new Map(e))},n.removeInPlace=function(n,t){return t.delete(n),t},n.tryPick=function(n,t){return w.tryPick(function(t){var e=n(t[0],t[1]);return null!=e?e:null},t)},n}();n.Map=_;var x=n.Nothing=void 0,A=n.Async=function(){function n(){o(this,n)}return n.__protectedAsync=function(n){return function(t){if(t.cancelToken.isCancelled)t.onCancel("cancelled");else try{return n(t)}catch(n){t.onError(n)}}},n.bind=function(t,e){return n.__protectedAsync(function(n){t({onSuccess:function(t){return e(t)(n)},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken})})},n.combine=function(t,e){return n.bind(t,function(){return e})},n.delay=function(t){return n.__protectedAsync(function(n){return t()(n)})},n.for=function(t,e){var r=t[Symbol.iterator](),o=r.next();return n.while(function(){return!o.done},n.delay(function(){var n=e(o.value);return o=r.next(),n}))},n.return=function(t){return n.__protectedAsync(function(n){return n.onSuccess(t)})},n.returnFrom=function(n){return n},n.tryFinally=function(t,e){return n.__protectedAsync(function(n){t({onSuccess:function(t){e(),n.onSuccess(t)},onError:function(t){e(),n.onError(t)},onCancel:function(t){e(),n.onCancel(t)},cancelToken:n.cancelToken})})},n.tryWith=function(t,e){return n.__protectedAsync(function(n){t({onSuccess:n.onSuccess,onCancel:n.onCancel,cancelToken:n.cancelToken,onError:function(t){return e(t)(n)}})})},n.using=function(t,e){return n.tryFinally(e(t),function(){return t.dispose()})},n.while=function(t,e){return t()?n.bind(e,function(){return n.while(t,e)}):n.return(x)},n.zero=function(){return n.__protectedAsync(function(n){return n.onSuccess(x)})},n.awaitPromise=function(t){return n.fromContinuations(function(n){return t.then(n[0]).catch(function(t){return("cancelled"==t?n[2]:n[1])(t)})})},n.catch=function(t){return n.__protectedAsync(function(n){t({onSuccess:function(t){return n.onSuccess(l.Choice1Of2(t))},onError:function(t){return n.onSuccess(l.Choice2Of2(t))},onCancel:n.onCancel,cancelToken:n.cancelToken})})},n.fromContinuations=function(t){return n.__protectedAsync(function(n){return t([n.onSuccess,n.onError,n.onCancel])})},n.ignore=function(t){return n.bind(t,function(t){return n.return(x)})},n.parallel=function(t){return n.awaitPromise(Promise.all(w.map(function(t){return n.startAsPromise(t)},t)))},n.sleep=function(t){return n.__protectedAsync(function(n){setTimeout(function(){return n.cancelToken.isCancelled?n.onCancel("cancelled"):n.onSuccess(x)},t)})},n.start=function(t,e){return n.startWithContinuations(t,e)},n.emptyContinuation=function(n){},n.startWithContinuations=function(t,e,r,o,u){"function"!=typeof e&&(u=e,e=null),t({onSuccess:e?e:n.emptyContinuation,onError:r?r:n.emptyContinuation,onCancel:o?o:n.emptyContinuation,cancelToken:u?u:n.defaultCancellationToken})},n.startAsPromise=function(t,e){return new Promise(function(r,o){return n.startWithContinuations(t,r,o,o,e?e:n.defaultCancellationToken)})},c(n,[{key:"cancellationToken",get:function(){return n.__protectedAsync(function(n){return n.onSuccess(n.cancelToken)})}}]),n}();A.defaultCancellationToken={isCancelled:!1},A.startImmediate=A.start;var k=function n(t){o(this,n),this.value=t},C=function(){function n(){o(this,n)}return n.prototype.add=function(n){var t=new k(n);this.firstAndLast?(this.firstAndLast[1].next=t,this.firstAndLast=[this.firstAndLast[0],t]):this.firstAndLast=[t,t]},n.prototype.tryGet=function(){if(this.firstAndLast){var n=this.firstAndLast[0].value;return this.firstAndLast[0].next?this.firstAndLast=[this.firstAndLast[0].next,this.firstAndLast[1]]:delete this.firstAndLast,n}},n}(),T=(n.MailboxProcessor=function(){function n(t,e){o(this,n),this.body=t,this.cancellationToken=e||A.defaultCancellationToken,this.messages=new C}return n.start=function(t,e){var r=new n(t,e);return r.start(),r},n.prototype.__processEvents=function(){if(this.continuation){var n=this.messages.tryGet();if(n){var t=this.continuation;delete this.continuation,t(n)}}},n.prototype.start=function(){A.startImmediate(this.body(this),this.cancellationToken)},n.prototype.receive=function(){var n=this;return A.fromContinuations(function(t){if(n.continuation)throw"Receive can only be called once!";n.continuation=t[0],n.__processEvents()})},n.prototype.post=function(n){this.messages.add(n),this.__processEvents()},n.prototype.postAndAsyncReply=function(n){function t(){e&&r&&r(e)}var e=void 0,r=void 0,o={reply:function(n){e=n,t()}};return this.messages.add(n(o)),this.__processEvents(),A.fromContinuations(function(n){r=n[0],t()})},n}(),function n(t,e,r){o(this,n),this.onNext=t,this.onError=e||function(n){},this.onCompleted=r||function(){}});s.setInterfaces(T.prototype,["System.IObserver"]);var I=function n(t){o(this,n),this.subscribe=t};s.setInterfaces(I.prototype,["System.IObservable"]);var O=function(){function n(){o(this,n)}return n.__protect=function(n,t,e){try{return t(n())}catch(n){e(n)}},n.add=function(n,t){t.subscribe(new T(n))},n.choose=function(t,e){return new I(function(r){return e.subscribe(new T(function(e){return n.__protect(function(){return t(e)},function(n){null!=n&&r.onNext(n)},r.onError)},r.onError,r.onCompleted))})},n.filter=function(t,e){return n.choose(function(n){return t(n)?n:null},e)},n.map=function(t,e){return new I(function(r){return e.subscribe(new T(function(e){n.__protect(function(){return t(e)},r.onNext,r.onError)},r.onError,r.onCompleted))})},n.merge=function(n,t){return new I(function(e){var r=!1,o=!1,u=!1,i=n.subscribe(new T(function(n){r||e.onNext(n)},function(n){r||(r=!0,e.onError(n))},function(){r||(o=!0,u&&(r=!0,e.onCompleted()))})),a=t.subscribe(new T(function(n){r||e.onNext(n)},function(n){r||(r=!0,e.onError(n))},function(){r||(u=!0,o&&(r=!0,e.onCompleted()))}));return s.createDisposable(function(){i.dispose(),a.dispose()})})},n.pairwise=function(n){return new I(function(t){var e=null;return n.subscribe(new T(function(n){null!=e&&t.onNext([e,n]),e=n},t.onError,t.onCompleted))})},n.partition=function(t,e){return u(n.filter(t,e),n.filter(function(n){return!t(n)},e))},n.scan=function(t,e,r){return new I(function(o){return r.subscribe(new T(function(r){n.__protect(function(){return t(e,r)},function(n){e=n,o.onNext(n)},o.onError)},o.onError,o.onCompleted))})},n.split=function(t,e){return u(n.choose(function(n){return t(n).valueIfChoice1},e),n.choose(function(n){return t(n).valueIfChoice2},e))},n.subscribe=function(n,t){return t.subscribe(new T(n))},n}();n.Observable=O;var E=n.Event=function(){function n(t,e){o(this,n),this._subscriber=t,this.delegates=e||new Array}return n.prototype.add=function(n){this._addHandler(n)},n.prototype.trigger=function(n){w.iter(function(t){return t(n)},this.delegates)},n.prototype._addHandler=function(n){this.delegates.push(n)},n.prototype._removeHandler=function(n){var t=this.delegates.findIndex(function(t){return""+t==""+n});t>-1&&this.delegates.splice(t,1)},n.prototype.addHandler=function(n){this._addHandler(function(t){return n(void 0,t)})},n.prototype.removeHandler=function(n){this._removeHandler(function(t){return n(void 0,t)})},n.prototype._subscribeFromObserver=function(n){var t=this;if(this._subscriber)return this._subscriber(n);var e=n.onNext;return this._addHandler(e),s.createDisposable(function(){return t._removeHandler(e)})},n.prototype._subscribeFromCallback=function(n){var t=this;return this._addHandler(n),s.createDisposable(function(){return t._removeHandler(n)})},n.prototype.subscribe=function(n){return"function"==typeof n?this._subscribeFromCallback(n):this._subscribeFromObserver(n)},n.add=function(n,t){t.subscribe(new T(n))},n.choose=function(t,e){var r=e;return new n(function(n){return r.subscribe(new T(function(e){return O.__protect(function(){return t(e)},function(t){null!=t&&n.onNext(t)},n.onError)},n.onError,n.onCompleted))},r.delegates)},n.filter=function(t,e){return n.choose(function(n){return t(n)?n:null},e)},n.map=function(t,e){var r=e;return new n(function(n){return r.subscribe(new T(function(e){return O.__protect(function(){return t(e)},n.onNext,n.onError)},n.onError,n.onCompleted))},r.delegates)},n.merge=function(t,e){var r=t,o=e;return new n(function(n){var t=!1,e=!1,u=!1,i=r.subscribe(new T(function(e){t||n.onNext(e)},function(e){t||(t=!0,n.onError(e))},function(){t||(e=!0,u&&(t=!0,n.onCompleted()))})),a=o.subscribe(new T(function(e){t||n.onNext(e)},function(e){t||(t=!0,n.onError(e))},function(){t||(u=!0,e&&(t=!0,n.onCompleted()))}));return s.createDisposable(function(){i.dispose(),a.dispose()})},r.delegates.concat(o.delegates))},n.pairwise=function(t){var e=t;return new n(function(n){var t=null;return e.subscribe(new T(function(e){null!=t&&n.onNext([t,e]),t=e},n.onError,n.onCompleted))},e.delegates)},n.partition=function(t,e){return u(n.filter(t,e),n.filter(function(n){return!t(n)},e))},n.scan=function(t,e,r){var o=r;return new n(function(n){return o.subscribe(new T(function(r){O.__protect(function(){return t(e,r)},function(t){e=t,n.onNext(t)},n.onError)},n.onError,n.onCompleted))},o.delegates)},n.split=function(t,e){return u(n.choose(function(n){return t(n).valueIfChoice1},e),n.choose(function(n){return t(n).valueIfChoice2},e))},c(n,[{key:"publish",get:function(){return this}}]),n}();n.Lazy=function(){function n(t){o(this,n),this.factory=t,this.isValueCreated=!1}return n.createFromValue=function(t){return new n(function(){return t})},c(n,[{key:"value",get:function(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}}]),n}()});
!function(n,t){if("function"==typeof define&&define.amd)define(["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var e={exports:{}};t(e.exports),n.fableCore=e.exports}}(this,function(n){"use strict";function t(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function e(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function r(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function u(n,t){return[n,t]}function i(n,t,e){return[n,t,e]}Object.defineProperty(n,"__esModule",{value:!0}),n.Tuple=u,n.Tuple3=i;var a=function(){function n(n,t){var e=[],r=!0,o=!1,u=void 0;try{for(var i,a=n[Symbol.iterator]();!(r=(i=a.next()).done)&&(e.push(i.value),!t||e.length!==t);r=!0);}catch(n){o=!0,u=n}finally{try{!r&&a.return&&a.return()}finally{if(o)throw u}}return e}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n},f=function(){function n(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}return function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),l={interfaces:Symbol("interfaces"),typeName:Symbol("typeName")};n.Symbol=l;var s=n.Choice=function(){function n(t,e,r){o(this,n),this.Case=t,this.Fields=[r]}return n.Choice1Of2=function(t){return new n("Choice1Of2",1,t)},n.Choice2Of2=function(t){return new n("Choice2Of2",1,t)},f(n,[{key:"valueIfChoice1",get:function(){return"Choice1Of2"===this.Case?this.Fields[0]:null}},{key:"valueIfChoice2",get:function(){return"Choice2Of2"===this.Case?this.Fields[0]:null}}]),n}(),d=n.Util=function(){function n(){o(this,n)}return n.setInterfaces=function(t,e,r){if(Array.isArray(e)&&e.length>0){var o=t[l.interfaces];if(Array.isArray(o))for(var u=0;u<e.length;u++)o.push(e[u]);else t[l.interfaces]=e}r&&(t[l.typeName]=r,n.__types.set(r,t.constructor))},n.hasInterface=function(n,t){return Array.isArray(n[l.interfaces])&&n[l.interfaces].indexOf(t)>=0},n.getRestParams=function(n,t){for(var e=n.length,r=Array(e>t?e-t:0),o=t;o<e;o++)r[o-t]=n[o];return r},n.compareTo=function(t,e){function r(n){return Array.isArray(n)||ArrayBuffer.isView(n)||n instanceof w||n instanceof Map||n instanceof Set}function o(n){return n instanceof Map||n instanceof Set?Array.from(n).sort():n}if(null==t&&null==e)return 0;if(("undefined"==typeof t?"undefined":c(t))!==("undefined"==typeof e?"undefined":c(e)))return-1;if(null!=t&&null!=e&&"object"===("undefined"==typeof t?"undefined":c(t))&&"object"===("undefined"==typeof e?"undefined":c(e))){if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return-1;if(n.hasInterface(t,"System.IComparable"))return t.compareTo(e);if(r(t)){var u=n.compareTo(S.count(t),S.count(e));return 0!=u?u:S.fold2(function(t,e,r){return 0!=t?t:n.compareTo(e,r)},0,o(t),o(e))}if(t instanceof Date)return t<e?-1:t>e?1:0;var i=Object.getOwnPropertyNames(t),a=Object.getOwnPropertyNames(e),f=n.compareTo(i.length,a.length);return 0!=f?f:S.fold2(function(r,o,u){return 0!=r?r:n.compareTo(t[o],e[u])},0,i.sort(),a.sort())}return t<e?-1:t>e?1:0},n.createDisposable=function(n){var t={dispose:n};return t[l.interfaces]=["System.IDisposable"],t},n.createObj=function(n){return S.fold(function(n,t){return n[t[0]]=t[1],n},{},n)},n.toJson=function(n){return JSON.stringify(n,function(n,t){if(ArrayBuffer.isView(t))return Array.from(t);if("object"==("undefined"==typeof t?"undefined":c(t))){if(t instanceof w||t instanceof Map||t instanceof Set)throw"JSON serialization of List, Map or Set is not supported";if(t[l.typeName])return Object.assign({__type:t[l.typeName]},t)}return t})},n.ofJson=function(t){return JSON.parse(t,function(t,e){if("object"==("undefined"==typeof e?"undefined":c(e))&&e.__type){var r=n.__types.get(e.__type);if(r)return delete e.__type,Object.assign(new r,e)}return e})},n}();d.__types=new Map,d.toPlainJsObj=function(n){if(null!=n&&n.constructor!=Object){for(var t={},e=Object.getOwnPropertyNames(n),r=0;r<e.length;r++)t[e[r]]=n[e[r]];var o=Object.getPrototypeOf(n);if(null!=o){e=Object.getOwnPropertyNames(o);for(var u=0;u<e.length;u++){var i=Object.getOwnPropertyDescriptor(o,e[u]);i.value?t[e[u]]=i.value:i.get&&(t[e[u]]=i.get.apply(n))}}return t}return n};var p=n.TimeSpan=function(n){function t(){return o(this,t),e(this,n.apply(this,arguments))}return r(t,n),t.create=function(){var n=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],e=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=arguments.length<=3||void 0===arguments[3]?0:arguments[3],o=arguments.length<=4||void 0===arguments[4]?0:arguments[4];switch(arguments.length){case 1:return this.fromTicks(arguments[0]);case 3:n=0,t=arguments[0],e=arguments[1],r=arguments[2],o=0;break;default:n=arguments[0],t=arguments[1],e=arguments[2],r=arguments[3],o=arguments[4]||0}return 864e5*n+36e5*t+6e4*e+1e3*r+o},t.fromTicks=function(n){return n/1e4},t.fromDays=function(n){return t.create(n,0,0,0)},t.fromHours=function(n){return t.create(n,0,0)},t.fromMinutes=function(n){return t.create(0,n,0)},t.fromSeconds=function(n){return t.create(0,0,n)},t.days=function(n){return Math.floor(n/864e5)},t.hours=function(n){return Math.floor(n%864e5/36e5)},t.minutes=function(n){return Math.floor(n%36e5/6e4)},t.seconds=function(n){return Math.floor(n%6e4/1e3)},t.milliseconds=function(n){return Math.floor(n%1e3)},t.ticks=function(n){return 1e4*n},t.totalDays=function(n){return n/864e5},t.totalHours=function(n){return n/36e5},t.totalMinutes=function(n){return n/6e4},t.totalSeconds=function(n){return n/1e3},t.negate=function(n){return n*-1},t.add=function(n,t){return n+t},t.subtract=function(n,t){return n-t},t}(Number);p.compare=d.compareTo,p.compareTo=d.compareTo,p.duration=Math.abs;var y=n.DateKind=void 0;!function(n){n[n.UTC=1]="UTC",n[n.Local=2]="Local"}(y||(n.DateKind=y={}));var h=function(n){function t(){return o(this,t),e(this,n.apply(this,arguments))}return r(t,n),t.__changeKind=function(n,t){var e=void 0;return n.kind==t?n:(e=new Date(n.getTime()),e.kind=t,e)},t.__getValue=function(n,t){return n[(n.kind==y.UTC?"getUTC":"get")+t]()},t.minValue=function(){return t.parse(-864e13,1)},t.maxValue=function(){return t.parse(864e13,1)},t.parse=function(n,t){var e=null==n?new Date:new Date(n);if(isNaN(e.getTime()))throw"The string is not a valid Date.";return e.kind=t||y.Local,e},t.create=function(n,t,e){var r=arguments.length<=3||void 0===arguments[3]?0:arguments[3],o=arguments.length<=4||void 0===arguments[4]?0:arguments[4],u=arguments.length<=5||void 0===arguments[5]?0:arguments[5],i=arguments.length<=6||void 0===arguments[6]?0:arguments[6],a=arguments.length<=7||void 0===arguments[7]?y.Local:arguments[7],c=a===y.UTC?new Date(Date.UTC(n,t-1,e,r,o,u,i)):new Date(n,t-1,e,r,o,u,i);if(isNaN(c.getTime()))throw"The parameters describe an unrepresentable Date.";return c.kind=a,c},t.utcNow=function(){return t.parse(null,1)},t.today=function(){return t.date(t.now())},t.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0},t.daysInMonth=function(n,e){return 2==e?t.isLeapYear(n)?29:28:e>=8?e%2==0?31:30:e%2==0?30:31},t.toUniversalTime=function(n){return t.__changeKind(n,1)},t.toLocalTime=function(n){return t.__changeKind(n,2)},t.timeOfDay=function(n){return p.create(t.hour(n),t.minute(n),t.second(n))},t.date=function(n){return t.create(t.year(n),t.month(n),t.day(n),0,0,0,0,n.kind)},t.day=function(n){return t.__getValue(n,"Date")},t.hour=function(n){return t.__getValue(n,"Hours")},t.millisecond=function(n){return t.__getValue(n,"Milliseconds")},t.minute=function(n){return t.__getValue(n,"Minutes")},t.month=function(n){return t.__getValue(n,"Month")+1},t.second=function(n){return t.__getValue(n,"Seconds")},t.year=function(n){return t.__getValue(n,"FullYear")},t.ticks=function(n){return 1e4*(n.getTime()+62135604e6)},t.dayOfWeek=function(n){return t.__getValue(n,"Day")},t.dayOfYear=function(n){for(var e=t.year(n),r=t.month(n),o=t.day(n),u=1;u<r;u++)o+=t.daysInMonth(e,u);return o},t.add=function(n,e){return t.parse(n.getTime()+e,n.kind)},t.addDays=function(n,e){return t.parse(n.getTime()+864e5*e,n.kind)},t.addHours=function(n,e){return t.parse(n.getTime()+36e5*e,n.kind)},t.addMinutes=function(n,e){return t.parse(n.getTime()+6e4*e,n.kind)},t.addSeconds=function(n,e){return t.parse(n.getTime()+1e3*e,n.kind)},t.addMilliseconds=function(n,e){return t.parse(n.getTime()+e,n.kind)},t.addTicks=function(n,e){return t.parse(n.getTime()+e/1e4,n.kind)},t.addYears=function(n,e){var r=t.month(n),o=t.year(n)+e,u=t.daysInMonth(o,r),i=Math.min(u,t.day(n));return t.create(o,r,i,t.hour(n),t.minute(n),t.second(n),t.millisecond(n),n.kind)},t.addMonths=function(n,e){var r=t.month(n)+e,o=0,u=0;r>12?(o=r%12,u=Math.floor(r/12),r=o):r<1&&(o=12+r%12,u=Math.floor(r/12)+(12==o?-1:0),r=o);var i=t.year(n)+u,a=t.daysInMonth(i,r),c=Math.min(a,t.day(n));return t.create(i,r,c,t.hour(n),t.minute(n),t.second(n),t.millisecond(n),n.kind)},t.subtract=function(n,e){return"number"==typeof e?t.parse(n.getTime()-e,n.kind):n.getTime()-e.getTime()},t.toLongDateString=function(n){return n.toDateString()},t.toShortDateString=function(n){return n.toLocaleDateString()},t.toLongTimeString=function(n){return n.toLocaleTimeString()},t.toShortTimeString=function(n){return n.toLocaleTimeString().replace(/:\d\d(?!:)/,"")},t.equals=function(n,t){return n.getTime()==t.getTime()},t}(Date);h.now=h.parse,h.toBinary=h.ticks,h.compareTo=d.compareTo,h.compare=d.compareTo,h.op_Addition=h.add,h.op_Subtraction=h.subtract,n.Date=h;var v=n.Timer=function(){function n(t){o(this,n),this.interval=t>0?t:100,this.autoReset=!0,this._elapsed=new N}return n.prototype.dispose=function(){this.enabled=!1,this._isDisposed=!0},n.prototype.close=function(){this.dispose()},n.prototype.start=function(){this.enabled=!0},n.prototype.stop=function(){this.enabled=!1},f(n,[{key:"elapsed",get:function(){return this._elapsed}},{key:"enabled",get:function(){return this._enabled},set:function(n){var t=this;this._isDisposed||this._enabled==n||((this._enabled=n)?this.autoReset?this._intervalId=setInterval(function(){t.autoReset||(t.enabled=!1),t._elapsed.trigger(new Date)},this.interval):this._timeoutId=setTimeout(function(){t.enabled=!1,t._timeoutId=0,t.autoReset&&(t.enabled=!0),t._elapsed.trigger(new Date)},this.interval):(this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=0),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=0)))}}]),n}();d.setInterfaces(v.prototype,["System.IDisposable"]);var m=function(){function n(){o(this,n)}return n.fsFormat=function(t){function e(n){return!(null===n||"object"!==("undefined"==typeof n?"undefined":c(n))||n instanceof Number||n instanceof String||n instanceof Boolean)}function r(t,r){return t.replace(n.fsFormatRegExp,function(t,o,u,i,a,c){switch(c){case"f":case"F":r=r.toFixed(a||6);break;case"g":case"G":r=r.toPrecision(a);break;case"e":case"E":r=r.toExponential(a);break;case"A":r=(r instanceof Map?"map ":r instanceof Set?"set ":"")+JSON.stringify(r,function(n,t){return t&&t[Symbol.iterator]&&!Array.isArray(t)&&e(t)?Array.from(t):t})}var f=u.indexOf("+")>=0&&parseInt(r)>=0;if(!isNaN(i=parseInt(i))){var l=i>=0&&u.indexOf("0")>=0?"0":" ";r=n.padLeft(r,Math.abs(i)-(f?1:0),l,i<0)}return o+(f?"+"+r:r)})}function o(t){return function(e){var i=r(t,e);return n.fsFormatRegExp.test(i)?o(i):u(i.replace(/%%/g,"%"))}}var u=void 0;return function(e){return u=e,n.fsFormatRegExp.test(t)?o(t):u(t)}},n.format=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return t.replace(n.formatRegExp,function(t,e,o,u){var i=r[e];if("number"==typeof i)switch((u||"").substring(0,1)){case"f":case"F":i=u.length>1?i.toFixed(u.substring(1)):i.toFixed(2);break;case"g":case"G":i=u.length>1?i.toPrecision(u.substring(1)):i.toPrecision();break;case"e":case"E":i=u.length>1?i.toExponential(u.substring(1)):i.toExponential();break;case"p":case"P":i=(u.length>1?(100*i).toFixed(u.substring(1)):(100*i).toFixed(2))+" %"}else if(i instanceof Date){if(1===u.length)switch(u){case"D":i=i.toDateString();break;case"T":i=i.toLocaleTimeString();break;case"d":i=i.toLocaleDateString();break;case"t":i=i.toLocaleTimeString().replace(/:\d\d(?!:)/,"")}i=u.replace(/\w+/g,function(n){var t=n;switch(n.substring(0,1)){case"y":t=n.length<4?h.year(i)%100:h.year(i);break;case"h":t=i.getHours()>12?h.hour(i)%12:h.hour(i);break;case"M":t=h.month(i);break;case"d":t=h.day(i);break;case"H":t=h.hour(i);break;case"m":t=h.minute(i);break;case"s":t=h.second(i)}return t!==n&&t<10&&n.length>1&&(t="0"+t),t})}return isNaN(o=parseInt((o||"").substring(1)))||(i=n.padLeft(i,Math.abs(o)," ",o<0)),i})},n.endsWith=function(n,t){var e=n.lastIndexOf(t);return e>=0&&e==n.length-t.length},n.init=function(n,t){if(n<0)throw"String length must be non-negative";for(var e=new Array(n),r=0;r<n;r++)e[r]=t(r);return e.join("")},n.isNullOrEmpty=function(n){return"string"!=typeof n||0==n.length},n.isNullOrWhiteSpace=function(n){return"string"!=typeof n||/^\s*$/.test(n)},n.join=function(n,t){return t="string"==typeof t?d.getRestParams(arguments,1):t,(Array.isArray(t)?t:Array.from(t)).join(n)},n.newGuid=function(){for(var n="",t=0;t<32;t++){var e=16*Math.random()|0;8!==t&&12!==t&&16!==t&&20!==t||(n+="-"),n+=(12===t?4:16===t?3&e|8:e).toString(16)}return n},n.padLeft=function(n,t,e,r){e=e||" ",n=String(n),t-=n.length;for(var o=-1;++o<t;)n=r?n+e:e+n;return n},n.padRight=function(t,e,r){return n.padLeft(t,e,r,!0)},n.replace=function(n,t,e){return n.replace(new RegExp(g.escape(t),"g"),e)},n.replicate=function(t,e){return n.init(t,function(){return e})},n.split=function(n,t,e,r){if(e="number"==typeof e?e:null,r="number"==typeof r?r:null,e<0)throw"Count cannot be less than zero";if(0===e)return[];t=Array.isArray(t)?t:d.getRestParams(arguments,1),t=t.map(function(n){return g.escape(n)}),t=t.length>0?t:[" "];for(var o=void 0,u=0,i=[],a=new RegExp(t.join("|"),"g");(null==e||e>1)&&null!==(o=a.exec(n));)(!r||o.index-u>0)&&(e=null!=e?e-1:e,i.push(n.substring(u,o.index))),u=a.lastIndex;return(!r||n.length-u>0)&&i.push(n.substring(u)),i},n.trim=function(n,t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;o<e;o++)r[o-2]=arguments[o];if("both"==t&&0==r.length)return n.trim();if("start"==t||"both"==t){var u=0==r.length?/^\s+/:new RegExp("^["+g.escape(r.join(""))+"]+");n=n.replace(u,"")}if("end"==t||"both"==t){var i=0==r.length?/\s+$/:new RegExp("["+g.escape(r.join(""))+"]+$");n=n.replace(i,"")}return n},n}();m.fsFormatRegExp=/(^|[^%])%([0+ ]*)(-?\d+)?(?:\.(\d+))?(\w)/,m.formatRegExp=/\{(\d+)(,-?\d+)?(?:\:(.+?))?\}/g,m.concat=m.join,n.String=m;var g=function(){function n(){o(this,n)}return n.create=function(n,t){var e="g";return e+=1&t?"i":"",e+=2&t?"m":"",new RegExp(n,e)},n.escape=function(n){return n.replace(/[\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},n.unescape=function(n){return n.replace(/\\([\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|])/g,"$1")},n.isMatch=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=t instanceof RegExp?(o=t,t=e,o.lastIndex=r,o):o=n.create(e,r);return o.test(t)},n.match=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=t instanceof RegExp?(o=t,t=e,o.lastIndex=r,o):o=n.create(e,r);return o.exec(t)},n.matches=function t(e,r){var o=arguments.length<=2||void 0===arguments[2]?0:arguments[2],u=e instanceof RegExp?(u=e,e=r,u.lastIndex=o,u):u=n.create(r,o);if(!u.global)throw"Non-global RegExp";for(var i=void 0,t=[];null!==(i=u.exec(e));)t.push(i);return t},n.options=function n(t){var n=256;return n|=t.ignoreCase?1:0,n|=t.multiline?2:0},n.replace=function(t,e,r,o){function u(){var n=arguments[0];if(0!==o){o--;for(var t=[],e=arguments.length,u=0;u<e-2;u++)t.push(arguments[u]);t.index=arguments[e-2],t.input=arguments[e-1],n=r(t)}return n}var i=arguments.length<=4||void 0===arguments[4]?0:arguments[4];if("string"==typeof t){var a=t;t=n.create(e,o),e=a,o=void 0}if("function"==typeof r)return o=null==o?-1:o,e.substring(0,i)+e.substring(i).replace(t,u);if(null!=o){var c=void 0,f=e.substring(i),l=n.matches(t,f),s=l.length>o?(c=l[o-1],f.substring(0,c.index+c[0].length)):f;return e.substring(0,i)+s.replace(t,r)+e.substring(i+s.length)}return e.replace(t,r)},n.split=function(t,e,r){var o=arguments.length<=3||void 0===arguments[3]?0:arguments[3];if("string"==typeof t){var u=t;t=n.create(e,r),e=u,r=void 0}return e=e.substring(o),e.split(t,r)},n}();n.RegExp=g;var b=function(){function n(){o(this,n)}return n.addRangeInPlace=function(n,t){S.iter(function(n){return t.push(n)},n)},n.blit=function(n,t,e,r,o){for(;o--;)e[r++]=n[t++]},n.partition=function(n,t){for(var e=[],r=[],o=0,i=0,a=0;a<t.length;a++)n(t[a])?e[o++]=t[a]:r[i++]=t[a];return u(e,r)},n.permute=function(n,t){for(var e=t.map(function(){return null}),r=new Array(t.length),o=0;o<t.length;o++){var u=n(o);if(u<0||u>=t.length)throw"Not a valid permutation";e[u]=t[o],r[u]=1}for(var i=0;i<t.length;i++)if(1!=r[i])throw"Not a valid permutation";return e},n.removeInPlace=function(n,t){var e=t.indexOf(n);return e>-1&&(t.splice(e,1),!0)},n.setSlice=function(n,t,e,r){var o=(e||n.length-1)-t;if(ArrayBuffer.isView(n)&&r.length<=o)n.set(r,t);else for(var u=0|t,i=0;i<=o;u++,i++)n[u]=r[i]},n.sortInPlaceBy=function(n,t){var e=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t.sort(function(t,r){return t=n(t),r=n(r),(t<r?-1:t==r?0:1)*e})},n.unzip=function(n){for(var t=new Array(n.length),e=new Array(n.length),r=0;r<n.length;r++)t[r]=n[r][0],e[r]=n[r][1];return u(t,e)},n.unzip3=function(n){for(var t=new Array(n.length),e=new Array(n.length),r=new Array(n.length),o=0;o<n.length;o++)t[o]=n[o][0],e[o]=n[o][1],r[o]=n[o][2];return i(t,e,r)},n}();n.Array=b;var w=n.List=function(){function n(t,e){o(this,n),this.head=t,this.tail=e}return n.ofArray=function(t,e){for(var r=e||new n,o=t.length-1;o>=0;o--)r=new n(t[o],r);return r},n.prototype[Symbol.iterator]=function(){var n=this;return{next:function(){var t=n;return n=n.tail,{done:null==t.tail,value:t.head}}}},n.prototype.append=function(t){return n.append(this,t)},n.append=function(t,e){return S.fold(function(t,e){return new n(e,t)},e,n.rev(t))},n.prototype.choose=function(t,e){return n.choose(t,this)},n.choose=function(t,e){var r=S.fold(function(e,r){var o=t(r);return null!=o?new n(o,e):e},new n,e);return n.rev(r)},n.prototype.collect=function(t){return n.collect(t,this)},n.collect=function(t,e){return S.fold(function(n,e){return n.append(t(e))},new n,e)},n.concat=function(t){return n.collect(function(n){return n},t)},n.prototype.filter=function(t){return n.filter(t,this)},n.filter=function(t,e){return n.rev(S.fold(function(e,r){return t(r)?new n(r,e):e},new n,e))},n.prototype.where=function(t){return n.filter(t,this)},n.where=function(t,e){return n.filter(t,e)},n.init=function(t,e){if(t<0)throw"List length must be non-negative";for(var r=new n,o=1;o<=t;o++)r=new n(e(t-o),r);return r},n.prototype.map=function(t){return n.map(t,this)},n.map=function(t,e){return n.rev(S.fold(function(e,r){return new n(t(r),e)},new n,e))},n.prototype.mapi=function(t){return n.mapi(t,this)},n.mapi=function(t,e){return n.rev(S.fold(function(e,r,o){return new n(t(o,r),e)},new n,e))},n.prototype.partition=function(t){return n.partition(t,this)},n.partition=function(t,e){return S.fold(function(e,r){var o=e[0],i=e[1];return t(r)?u(new n(r,o),i):u(o,new n(r,i))},u(new n,new n),n.rev(e))},n.replicate=function(t,e){return n.init(t,function(){return e})},n.prototype.rev=function(){return n.rev(this)},n.rev=function(t){return S.fold(function(t,e){return new n(e,t)},new n,t)},n.singleton=function(t){return new n(t,new n)},n.prototype.slice=function(t,e){return n.slice(t,e,this)},n.slice=function(t,e,r){var o=null==t,u=null==e;return n.rev(S.fold(function(r,i,a){return(o||t<=a)&&(u||a<=e)?new n(i,r):r},new n,r))},n.unzip=function(t){return S.foldBack(function(t,e){return u(new n(t[0],e[0]),new n(t[1],e[1]))},t,u(new n,new n))},n.unzip3=function(t){return S.foldBack(function(t,e){return i(new n(t[0],e[0]),new n(t[1],e[1]),new n(t[2],e[2]))},t,i(new n,new n,new n))},f(n,[{key:"length",get:function(){return S.fold(function(n,t){return n+1},0,this)}}]),n}(),S=n.Seq=function(){function n(){o(this,n)}return n.__failIfNone=function(n){if(null==n)throw"Seq did not contain any matching element";return n},n.toList=function(t){return n.foldBack(function(n,t){return new w(n,t)},t,new w)},n.ofList=function(t){return n.delay(function(){return n.unfold(function(n){return null!=n.tail?[n.head,n.tail]:null},t)})},n.ofArray=function(t){return n.delay(function(){return n.unfold(function(n){return n<t.length?[t[n],n+1]:null},0)})},n.append=function(t,e){return n.delay(function(){var r=!1,o=t[Symbol.iterator](),i=u(o,null);return n.unfold(function(){var n=void 0;if(!r){if(n=i[0].next(),!n.done)return[n.value,i];r=!0,i=[null,e[Symbol.iterator]()]}return n=i[1].next(),n.done?null:[n.value,i]},i)})},n.average=function(t){var e=1,r=n.reduce(function(n,t){return e++,n+t},t);return r/e},n.averageBy=function(t,e){var r=1,o=n.reduce(function(n,e){return r++,(2===r?t(n):n)+t(e)},e);return o/r},n.countBy=function(t,e){return n.map(function(t){return u(t[0],n.count(t[1]))},n.groupBy(t,e))},n.concat=function(t){return n.delay(function(){var e=t[Symbol.iterator](),r=null;return n.unfold(function(n){for(var t=!1;!t;)if(null==n){var o=e.next();o.done?t=!0:n=o.value[Symbol.iterator]()}else{var u=n.next();u.done?n=null:(r=u.value,t=!0)}return null!=n&&null!=r?[r,n]:null},null)})},n.collect=function(t,e){return n.concat(n.map(t,e))},n.choose=function(t,e){var r=function n(e){var r=e.next();if(!r.done){var o=t(r.value);return null!=o?u(o,e):n(e)}};return n.delay(function(){return n.unfold(function(n){return r(n)},e[Symbol.iterator]())})},n.compareWith=function(t,e,r){var o=n.tryFind(function(n){return 0!=n},n.map2(function(n,e){return t(n,e)},e,r));return null!=o?o:n.count(e)-n.count(r)},n.delay=function(n){return t({},Symbol.iterator,function(){return n()[Symbol.iterator]()})},n.distinctBy=function(t,e){return n.choose(function(n){return n[0]},n.scan(function(n,e){var r=n[1],o=t(e);return r.has(o)?u(null,r):u(e,r.add(o))},u(null,new Set),e))},n.distinct=function(t){return n.distinctBy(function(n){return n},t)},n.empty=function(){return n.unfold(function(){})},n.enumerateWhile=function(t,e){return n.concat(n.unfold(function(){return t()?[e,!0]:null}))},n.enumerateThenFinally=function(t,e){return n.delay(function(){var r=void 0;try{r=t[Symbol.iterator]()}finally{e()}return n.unfold(function(n){try{var t=n.next();return t.done?null:[t.value,n]}finally{e()}},r)})},n.enumerateUsing=function(t,e){var r=!1,o=function(){r||(r=!0,t.dispose())};try{return n.enumerateThenFinally(e(t),o)}finally{o()}},n.exactlyOne=function(n){var t=n[Symbol.iterator](),e=t.next();if(e.done)throw"Seq was empty";var r=t.next();if(!r.done)throw"Seq had multiple items";return e.value},n.exists=function(n,t){function e(t){var r=t.next();return!r.done&&(n(r.value)||e(t))}return e(t[Symbol.iterator]())},n.exists2=function(n,t,e){function r(t,e){var o=t.next(),u=e.next();return!o.done&&!u.done&&(n(o.value,u.value)||r(t,e))}return r(t[Symbol.iterator](),e[Symbol.iterator]())},n.filter=function(t,e){function r(n){var e=n.next();if(!e.done)return t(e.value)?[e.value,n]:r(n)}return n.delay(function(){return n.unfold(r,e[Symbol.iterator]())})},n.where=function(t,e){return n.filter(t,e)},n.fold=function(n,t,e){if(Array.isArray(e)||ArrayBuffer.isView(e))return e.reduce(n,t);for(var r=void 0,o=0,u=e[Symbol.iterator]();r=u.next(),!r.done;o++)t=n(t,r.value,o);return t},n.foldBack=function(n,t,e){for(var r=Array.isArray(t)||ArrayBuffer.isView(t)?t:Array.from(t),o=r.length-1;o>=0;o--)e=n(r[o],e,o);return e},n.fold2=function(n,t,e,r){for(var o=e[Symbol.iterator](),u=r[Symbol.iterator](),i=void 0,a=void 0,c=0;i=o.next(),a=u.next(),!i.done&&!a.done;c++)t=n(t,i.value,a.value,c);return t},n.foldBack2=function(n,t,e,r){for(var o=Array.isArray(t)||ArrayBuffer.isView(t)?t:Array.from(t),u=Array.isArray(e)||ArrayBuffer.isView(e)?e:Array.from(e),i=o.length-1;i>=0;i--)r=n(o[i],u[i],r,i);return r},n.forall=function(t,e){return n.fold(function(n,e){return n&&t(e)},!0,e)},n.forall2=function(t,e,r){return n.fold2(function(n,e,r){return n&&t(e,r)},!0,e,r)},n.groupBy=function(t,e){return n.fold(function(n,e){var r=t(e),o=n.get(r);return null!=o?n.set(r,new w(e,o)):n.set(r,w.singleton(e))},new Map,e)},n.tryHead=function(n){var t=n[Symbol.iterator](),e=t.next();return e.done?null:e.value},n.head=function(t){return n.__failIfNone(n.tryHead(t))},n.init=function(t,e){return n.delay(function(){return n.unfold(function(n){return n<t?[e(n),n+1]:null},0)})},n.initInfinite=function(t){return n.delay(function(){return n.unfold(function(n){return[t(n),n+1]},0)})},n.tryItem=function(n,t){if(n<0)return null;if(Array.isArray(t)||ArrayBuffer.isView(t))return n<t.length?t[n]:null;for(var e=0,r=t[Symbol.iterator]();;e++){var o=r.next();if(o.done)return null;if(e===n)return o.value}},n.item=function(t,e){return n.__failIfNone(n.tryItem(t,e))},n.iter=function(t,e){n.fold(function(n,e){return t(e)},null,e)},n.iter2=function(t,e,r){n.fold2(function(n,e,r){return t(e,r)},null,e,r)},n.iteri=function(t,e){n.fold(function(n,e,r){return t(r,e)},null,e)},n.iteri2=function(t,e,r){n.fold2(function(n,e,r,o){return t(o,e,r)},null,e,r)},n.isEmpty=function(n){var t=n[Symbol.iterator]();return t.next().done},n.tryLast=function(t){try{return n.reduce(function(n,t){return t},t)}catch(n){return null}},n.last=function(t){return n.__failIfNone(n.tryLast(t))},n.count=function(t){return Array.isArray(t)||ArrayBuffer.isView(t)?t.length:n.fold(function(n,t){return n+1},0,t)},n.map=function(t,e){return n.delay(function(){return n.unfold(function(n){var e=n.next();return e.done?null:[t(e.value),n]},e[Symbol.iterator]())})},n.mapi=function(t,e){return n.delay(function(){var r=0;return n.unfold(function(n){var e=n.next();return e.done?null:[t(r++,e.value),n]},e[Symbol.iterator]())})},n.map2=function(t,e,r){return n.delay(function(){var o=e[Symbol.iterator](),u=r[Symbol.iterator]();return n.unfold(function(){var n=o.next(),e=u.next();return n.done||e.done?null:[t(n.value,e.value),null]})})},n.mapi2=function(t,e,r){return n.delay(function(){var o=0,u=e[Symbol.iterator](),i=r[Symbol.iterator]();return n.unfold(function(){var n=u.next(),e=i.next();return n.done||e.done?null:[t(o++,n.value,e.value),null]})})},n.map3=function(t,e,r,o){return n.delay(function(){var u=e[Symbol.iterator](),i=r[Symbol.iterator](),a=o[Symbol.iterator]();return n.unfold(function(){var n=u.next(),e=i.next(),r=a.next();return n.done||e.done||r.done?null:[t(n.value,e.value,r.value),null]})})},n.mapFold=function(n,t,e){for(var r=[],o=void 0,i=void 0,c=0,f=e[Symbol.iterator]();i=f.next(),!i.done;c++){var l=n(t,i.value),s=a(l,2);o=s[0],t=s[1],r.push(o)}return u(r,t)},n.mapFoldBack=function(n,t,e){for(var r=Array.isArray(t)||ArrayBuffer.isView(t)?t:Array.from(t),o=[],i=void 0,c=r.length-1;c>=0;c--){var f=n(r[c],e),l=a(f,2);i=l[0],e=l[1],o.push(i)}return u(o,e)},n.max=function(t){return n.reduce(function(n,t){return Math.max(n,t)},t)},n.maxBy=function(t,e){return n.reduce(function(n,e){return t(n)>t(e)?n:e},e)},n.min=function(t){return n.reduce(function(n,t){return Math.min(n,t)},t)},n.minBy=function(t,e){return n.reduce(function(n,e){return t(n)<t(e)?n:e},e)},n.pairwise=function(t){return n.skip(1,n.scan(function(n,t){return u(n[1],t)},u(0,0),t))},n.permute=function(t,e){return n.ofArray(b.permute(t,Array.from(e)))},n.rangeStep=function(t,e,r){if(0===e)throw"Step cannot be 0";return n.unfold(function(n){return e>0&&n<=r||e<0&&n>=r?[n,n+e]:null},t)},n.rangeChar=function(t,e){return n.unfold(function(n){return n<=e?[n,String.fromCharCode(n.charCodeAt(0)+1)]:null},t)},n.range=function(t,e){return n.rangeStep(t,1,e)},n.readonly=function(t){return n.map(function(n){return n},t)},n.reduce=function(n,t){if(Array.isArray(t)||ArrayBuffer.isView(t))return t.reduce(n);var e=t[Symbol.iterator](),r=e.next();if(r.done)throw"Seq was empty";for(var o=r.value;r=e.next(),!r.done;)o=n(o,r.value);return o},n.reduceBack=function(n,t){var e=Array.isArray(t)||ArrayBuffer.isView(t)?t:Array.from(t);if(0===e.length)throw"Seq was empty";for(var r=e[e.length-1],o=e.length-2;o>=0;o--)r=n(e[o],r,o);return r},n.replicate=function(t,e){return n.init(t,function(){return e})},n.rev=function(t){var e=Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):Array.from(t);return n.ofArray(e.reverse())},n.scan=function(t,e,r){return n.delay(function(){var o=r[Symbol.iterator]();return n.unfold(function(n){if(null==n)return[e,e];var r=o.next();return r.done?void 0:(n=t(n,r.value),[n,n])},null)})},n.scanBack=function(t,e,r){return n.rev(n.scan(function(n,e){return t(e,n)},r,n.rev(e)))},n.singleton=function(t){return n.unfold(function(n){return null!=n?[n,null]:null},t)},n.skip=function(n,e){return t({},Symbol.iterator,function(){for(var t=e[Symbol.iterator](),r=1;r<=n;r++)if(t.next().done)throw"Seq has not enough elements";return t})},n.skipWhile=function(t,e){return n.delay(function(){var r=!1;return n.filter(function(n){return r||(r=!t(n))},e)})},n.sortWith=function(t,e){var r=Array.from(e);return n.ofArray(r.sort(t))},n.defaultAdder=function(n,t){return n+t},n.sum=function(t,e){return e=e||n.defaultAdder,n.reduce(function(n,t){return e(n,t)},t)},n.sumBy=function(t,e,r){var o=!0;return r=r||n.defaultAdder,n.reduce(function(n,e){return n=o?t(n):n,o=!1,r(n,t(e))},e)},n.tail=function(n){var e=n[Symbol.iterator](),r=e.next();if(r.done)throw"Seq was empty";return t({},Symbol.iterator,function(){return e})},n.take=function(t,e){var r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];return n.delay(function(){var o=e[Symbol.iterator]();return n.unfold(function(n){if(n<t){var e=o.next();if(!e.done)return[e.value,n+1];if(!r)throw"Seq has not enough elements"}},0)})},n.truncate=function(t,e){return n.take(t,e,!0)},n.takeWhile=function(t,e){return n.delay(function(){var r=e[Symbol.iterator]();return n.unfold(function(n){var e=r.next();if(!e.done&&t(e.value))return[e.value,null]},0)})},n.tryFind=function(n,t){for(var e=0,r=t[Symbol.iterator]();;e++){var o=r.next();if(o.done)return null;if(n(o.value,e))return o.value}},n.find=function(t,e){return n.__failIfNone(n.tryFind(t,e))},n.tryFindBack=function(n,t){for(var e=null,r=0,o=t[Symbol.iterator]();;r++){var u=o.next();if(u.done)return e;n(u.value,r)&&(e=u.value)}},n.findBack=function(t,e){return n.__failIfNone(n.tryFindBack(t,e))},n.tryFindIndex=function(n,t){for(var e=0,r=t[Symbol.iterator]();;e++){var o=r.next();if(o.done)return null;if(n(o.value,e))return e}},n.findIndex=function(t,e){return n.__failIfNone(n.tryFindIndex(t,e))},n.tryFindIndexBack=function(n,t){for(var e=0,r=0,o=t[Symbol.iterator]();;r++){var u=o.next();if(u.done)return e;n(u.value,r)&&(e=r)}},n.findIndexBack=function(t,e){return n.__failIfNone(n.tryFindIndexBack(t,e))},n.tryPick=function(n,t){for(var e=0,r=t[Symbol.iterator]();;e++){var o=r.next();if(o.done)break;var u=n(o.value,e);if(null!=u)return u}},n.pick=function(t,e){return n.__failIfNone(n.tryPick(t,e))},n.unfold=function(n,e){return t({},Symbol.iterator,function(){return{next:function(){var t=n(e);return null!=t?(e=t[1],{done:!1,value:t[0]}):{done:!0}}}})},n.zip=function(t,e){return n.map2(function(n,t){return[n,t]},t,e)},
n.zip3=function(t,e,r){return n.map3(function(n,t,e){return[n,t,e]},t,e,r)},n}(),_=function(){function n(){o(this,n)}return n.union=function(n,t){return S.fold(function(n,t){return n.add(t),n},new Set(n),t)},n.unionMany=function(t){return S.fold(function(t,e){return n.union(t,e)},new Set,t)},n.difference=function(n,t){return S.fold(function(n,t){return n.delete(t),n},new Set(n),t)},n.intersect=function(n,t){return S.fold(function(n,e){return t.has(e)||n.delete(e),n},new Set(n),n)},n.intersectMany=function(n){var t=Array.isArray(n)?n:Array.from(n);if(0==t.length)throw"Seq was empty";var e=new Set(t[0]);return S.iter(function(n){for(var r=1;r<t.length;r++)if(!t[r].has(n)){e.delete(n);break}},t[0]),e},n.isProperSubsetOf=function(n,t){return S.forall(function(n){return t.has(n)},n)&&S.exists(function(t){return!n.has(t)},t)},n.isSubsetOf=function(n,t){return S.forall(function(n){return t.has(n)},n)},n.isProperSupersetOf=function(t,e){return n.isProperSubset(e,t)},n.isSupersetOf=function(t,e){return n.isSubset(e,t)},n.copyTo=function(n,t,e,r){if(!Array.isArray(t)&&!ArrayBuffer.isView(t))throw"Array is invalid";r=r||t.length;for(var o=e||0,u=n[Symbol.iterator]();r--;){var i=u.next();if(i.done)break;t[o++]=i.value}},n.partition=function(n,t){return S.fold(function(t,e){var r=t[0],o=t[1];return n(e)?u(r.add(e),o):u(r,o.add(e))},u(new Set,new Set),t)},n.remove=function(t,e){return n.removeInPlace(t,new Set(e))},n.removeInPlace=function(n,t){return t.delete(n),t},n}();_.op_Addition=_.union,_.op_Subtraction=_.difference,_.isProperSubset=_.isProperSubsetOf,_.isSubset=_.isSubsetOf,_.isProperSuperset=_.isProperSupersetOf,_.isSuperset=_.isSupersetOf,n.Set=_;var x=function(){function n(){o(this,n)}return n.containsValue=function(n,t){return S.fold(function(e,r){return e||t.get(r)===n},!1,t.keys())},n.exists=function(n,t){return S.exists(function(t){return n(t[0],t[1])},t)},n.filter=function(n,t){return S.fold(function(t,e){return n(e[0],e[1])?t.set(e[0],e[1]):t},new Map,t)},n.fold=function(n,t,e){return S.fold(function(t,e){return n(t,e[0],e[1])},t,e)},n.foldBack=function(n,t,e){return S.foldBack(function(t,e){return n(t[0],t[1],e)},t,e)},n.forall=function(n,t){return S.forall(function(t){return n(t[0],t[1])},t)},n.iter=function(n,t){return S.iter(function(t){return n(t[0],t[1])},t)},n.map=function(n,t){return S.fold(function(t,e){return t.set(e[0],n(e[0],e[1]))},new Map,t)},n.partition=function(n,t){return S.fold(function(t,e){var r=t[0],o=t[1],i=e[0],a=e[1];return n(i,a)?u(r.set(i,a),o):u(r,o.set(i,a))},u(new Map,new Map),t)},n.findKey=function(n,t){return S.pick(function(t){return n(t[0],t[1])?t[0]:null},t)},n.tryFindKey=function(n,t){return S.tryPick(function(t){return n(t[0],t[1])?t[0]:null},t)},n.pick=function(n,t){return S.pick(function(t){var e=n(t[0],t[1]);return null!=e?e:null},t)},n.remove=function(t,e){return n.removeInPlace(t,new Map(e))},n.removeInPlace=function(n,t){return t.delete(n),t},n.tryPick=function(n,t){return S.tryPick(function(t){var e=n(t[0],t[1]);return null!=e?e:null},t)},n}();n.Map=x;var A=n.Nothing=void 0,k=n.Async=function(){function n(){o(this,n)}return n.__protectedAsync=function(n){return function(t){if(t.cancelToken.isCancelled)t.onCancel("cancelled");else try{return n(t)}catch(n){t.onError(n)}}},n.bind=function(t,e){return n.__protectedAsync(function(n){t({onSuccess:function(t){return e(t)(n)},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken})})},n.combine=function(t,e){return n.bind(t,function(){return e})},n.delay=function(t){return n.__protectedAsync(function(n){return t()(n)})},n.for=function(t,e){var r=t[Symbol.iterator](),o=r.next();return n.while(function(){return!o.done},n.delay(function(){var n=e(o.value);return o=r.next(),n}))},n.return=function(t){return n.__protectedAsync(function(n){return n.onSuccess(t)})},n.returnFrom=function(n){return n},n.tryFinally=function(t,e){return n.__protectedAsync(function(n){t({onSuccess:function(t){e(),n.onSuccess(t)},onError:function(t){e(),n.onError(t)},onCancel:function(t){e(),n.onCancel(t)},cancelToken:n.cancelToken})})},n.tryWith=function(t,e){return n.__protectedAsync(function(n){t({onSuccess:n.onSuccess,onCancel:n.onCancel,cancelToken:n.cancelToken,onError:function(t){return e(t)(n)}})})},n.using=function(t,e){return n.tryFinally(e(t),function(){return t.dispose()})},n.while=function(t,e){return t()?n.bind(e,function(){return n.while(t,e)}):n.return(A)},n.zero=function(){return n.__protectedAsync(function(n){return n.onSuccess(A)})},n.awaitPromise=function(t){return n.fromContinuations(function(n){return t.then(n[0]).catch(function(t){return("cancelled"==t?n[2]:n[1])(t)})})},n.catch=function(t){return n.__protectedAsync(function(n){t({onSuccess:function(t){return n.onSuccess(s.Choice1Of2(t))},onError:function(t){return n.onSuccess(s.Choice2Of2(t))},onCancel:n.onCancel,cancelToken:n.cancelToken})})},n.fromContinuations=function(t){return n.__protectedAsync(function(n){return t([n.onSuccess,n.onError,n.onCancel])})},n.ignore=function(t){return n.bind(t,function(t){return n.return(A)})},n.parallel=function(t){return n.awaitPromise(Promise.all(S.map(function(t){return n.startAsPromise(t)},t)))},n.sleep=function(t){return n.__protectedAsync(function(n){setTimeout(function(){return n.cancelToken.isCancelled?n.onCancel("cancelled"):n.onSuccess(A)},t)})},n.start=function(t,e){return n.startWithContinuations(t,e)},n.emptyContinuation=function(n){},n.startWithContinuations=function(t,e,r,o,u){"function"!=typeof e&&(u=e,e=null),t({onSuccess:e?e:n.emptyContinuation,onError:r?r:n.emptyContinuation,onCancel:o?o:n.emptyContinuation,cancelToken:u?u:n.defaultCancellationToken})},n.startAsPromise=function(t,e){return new Promise(function(r,o){return n.startWithContinuations(t,r,o,o,e?e:n.defaultCancellationToken)})},f(n,[{key:"cancellationToken",get:function(){return n.__protectedAsync(function(n){return n.onSuccess(n.cancelToken)})}}]),n}();k.defaultCancellationToken={isCancelled:!1},k.startImmediate=k.start;var C=function n(t){o(this,n),this.value=t},T=function(){function n(){o(this,n)}return n.prototype.add=function(n){var t=new C(n);this.firstAndLast?(this.firstAndLast[1].next=t,this.firstAndLast=[this.firstAndLast[0],t]):this.firstAndLast=[t,t]},n.prototype.tryGet=function(){if(this.firstAndLast){var n=this.firstAndLast[0].value;return this.firstAndLast[0].next?this.firstAndLast=[this.firstAndLast[0].next,this.firstAndLast[1]]:delete this.firstAndLast,n}},n}(),I=(n.MailboxProcessor=function(){function n(t,e){o(this,n),this.body=t,this.cancellationToken=e||k.defaultCancellationToken,this.messages=new T}return n.start=function(t,e){var r=new n(t,e);return r.start(),r},n.prototype.__processEvents=function(){if(this.continuation){var n=this.messages.tryGet();if(n){var t=this.continuation;delete this.continuation,t(n)}}},n.prototype.start=function(){k.startImmediate(this.body(this),this.cancellationToken)},n.prototype.receive=function(){var n=this;return k.fromContinuations(function(t){if(n.continuation)throw"Receive can only be called once!";n.continuation=t[0],n.__processEvents()})},n.prototype.post=function(n){this.messages.add(n),this.__processEvents()},n.prototype.postAndAsyncReply=function(n){function t(){e&&r&&r(e)}var e=void 0,r=void 0,o={reply:function(n){e=n,t()}};return this.messages.add(n(o)),this.__processEvents(),k.fromContinuations(function(n){r=n[0],t()})},n}(),function n(t,e,r){o(this,n),this.onNext=t,this.onError=e||function(n){},this.onCompleted=r||function(){}});d.setInterfaces(I.prototype,["System.IObserver"]);var O=function n(t){o(this,n),this.subscribe=t};d.setInterfaces(O.prototype,["System.IObservable"]);var E=function(){function n(){o(this,n)}return n.__protect=function(n,t,e){try{return t(n())}catch(n){e(n)}},n.add=function(n,t){t.subscribe(new I(n))},n.choose=function(t,e){return new O(function(r){return e.subscribe(new I(function(e){return n.__protect(function(){return t(e)},function(n){null!=n&&r.onNext(n)},r.onError)},r.onError,r.onCompleted))})},n.filter=function(t,e){return n.choose(function(n){return t(n)?n:null},e)},n.map=function(t,e){return new O(function(r){return e.subscribe(new I(function(e){n.__protect(function(){return t(e)},r.onNext,r.onError)},r.onError,r.onCompleted))})},n.merge=function(n,t){return new O(function(e){var r=!1,o=!1,u=!1,i=n.subscribe(new I(function(n){r||e.onNext(n)},function(n){r||(r=!0,e.onError(n))},function(){r||(o=!0,u&&(r=!0,e.onCompleted()))})),a=t.subscribe(new I(function(n){r||e.onNext(n)},function(n){r||(r=!0,e.onError(n))},function(){r||(u=!0,o&&(r=!0,e.onCompleted()))}));return d.createDisposable(function(){i.dispose(),a.dispose()})})},n.pairwise=function(n){return new O(function(t){var e=null;return n.subscribe(new I(function(n){null!=e&&t.onNext([e,n]),e=n},t.onError,t.onCompleted))})},n.partition=function(t,e){return u(n.filter(t,e),n.filter(function(n){return!t(n)},e))},n.scan=function(t,e,r){return new O(function(o){return r.subscribe(new I(function(r){n.__protect(function(){return t(e,r)},function(n){e=n,o.onNext(n)},o.onError)},o.onError,o.onCompleted))})},n.split=function(t,e){return u(n.choose(function(n){return t(n).valueIfChoice1},e),n.choose(function(n){return t(n).valueIfChoice2},e))},n.subscribe=function(n,t){return t.subscribe(new I(n))},n}();n.Observable=E;var N=n.Event=function(){function n(t,e){o(this,n),this._subscriber=t,this.delegates=e||new Array}return n.prototype.add=function(n){this._addHandler(n)},n.prototype.trigger=function(n){S.iter(function(t){return t(n)},this.delegates)},n.prototype._addHandler=function(n){this.delegates.push(n)},n.prototype._removeHandler=function(n){var t=this.delegates.findIndex(function(t){return""+t==""+n});t>-1&&this.delegates.splice(t,1)},n.prototype.addHandler=function(n){this._addHandler(function(t){return n(void 0,t)})},n.prototype.removeHandler=function(n){this._removeHandler(function(t){return n(void 0,t)})},n.prototype._subscribeFromObserver=function(n){var t=this;if(this._subscriber)return this._subscriber(n);var e=n.onNext;return this._addHandler(e),d.createDisposable(function(){return t._removeHandler(e)})},n.prototype._subscribeFromCallback=function(n){var t=this;return this._addHandler(n),d.createDisposable(function(){return t._removeHandler(n)})},n.prototype.subscribe=function(n){return"function"==typeof n?this._subscribeFromCallback(n):this._subscribeFromObserver(n)},n.add=function(n,t){t.subscribe(new I(n))},n.choose=function(t,e){var r=e;return new n(function(n){return r.subscribe(new I(function(e){return E.__protect(function(){return t(e)},function(t){null!=t&&n.onNext(t)},n.onError)},n.onError,n.onCompleted))},r.delegates)},n.filter=function(t,e){return n.choose(function(n){return t(n)?n:null},e)},n.map=function(t,e){var r=e;return new n(function(n){return r.subscribe(new I(function(e){return E.__protect(function(){return t(e)},n.onNext,n.onError)},n.onError,n.onCompleted))},r.delegates)},n.merge=function(t,e){var r=t,o=e;return new n(function(n){var t=!1,e=!1,u=!1,i=r.subscribe(new I(function(e){t||n.onNext(e)},function(e){t||(t=!0,n.onError(e))},function(){t||(e=!0,u&&(t=!0,n.onCompleted()))})),a=o.subscribe(new I(function(e){t||n.onNext(e)},function(e){t||(t=!0,n.onError(e))},function(){t||(u=!0,e&&(t=!0,n.onCompleted()))}));return d.createDisposable(function(){i.dispose(),a.dispose()})},r.delegates.concat(o.delegates))},n.pairwise=function(t){var e=t;return new n(function(n){var t=null;return e.subscribe(new I(function(e){null!=t&&n.onNext([t,e]),t=e},n.onError,n.onCompleted))},e.delegates)},n.partition=function(t,e){return u(n.filter(t,e),n.filter(function(n){return!t(n)},e))},n.scan=function(t,e,r){var o=r;return new n(function(n){return o.subscribe(new I(function(r){E.__protect(function(){return t(e,r)},function(t){e=t,n.onNext(t)},n.onError)},n.onError,n.onCompleted))},o.delegates)},n.split=function(t,e){return u(n.choose(function(n){return t(n).valueIfChoice1},e),n.choose(function(n){return t(n).valueIfChoice2},e))},f(n,[{key:"publish",get:function(){return this}}]),n}();n.Lazy=function(){function n(t){o(this,n),this.factory=t,this.isValueCreated=!1}return n.createFromValue=function(t){return new n(function(){return t})},f(n,[{key:"value",get:function(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}}]),n}()});
{
"name": "fable-core",
"version": "0.2.2",
"version": "0.2.3",
"description": "Fable core lib & bindings for native JS objects, browser and node APIs",

@@ -5,0 +5,0 @@ "main": "fable-core.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc