diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/marker_regression/display_mapping_results.py | 9 | ||||
-rw-r--r-- | wqflask/wqflask/marker_regression/run_mapping.py | 49 | ||||
-rw-r--r-- | wqflask/wqflask/show_trait/show_trait.py | 4 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/init_genome_browser.js | 168 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/plotly_probability_plot.js | 1 | ||||
-rw-r--r-- | wqflask/wqflask/static/packages/purescript_genome_browser/css/purescript-genetics-browser.css (renamed from wqflask/wqflask/static/packages/purescript_genome_browser/css/purescript_genetics_browser_v01.css) | 0 | ||||
-rw-r--r-- | wqflask/wqflask/static/packages/purescript_genome_browser/js/purescript-genetics-browser.js | 63016 | ||||
-rw-r--r-- | wqflask/wqflask/static/packages/purescript_genome_browser/js/purescript-genetics-browser_v01.js | 659 | ||||
-rw-r--r-- | wqflask/wqflask/templates/mapping_results.html | 10 | ||||
-rw-r--r-- | wqflask/wqflask/views.py | 4 |
10 files changed, 63165 insertions, 755 deletions
diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py index ea1ca5ed..b1e9dad4 100644 --- a/wqflask/wqflask/marker_regression/display_mapping_results.py +++ b/wqflask/wqflask/marker_regression/display_mapping_results.py @@ -31,6 +31,7 @@ import piddle as pid import sys,os import cPickle import httplib +import json from flask import Flask, g @@ -1696,6 +1697,14 @@ class DisplayMappingResults(object): else: LRS_LOD_Max = self.lrsMax + #ZS: Needed to pass to genome browser + js_data = json.loads(self.js_data) + if self.LRS_LOD == "LRS": + js_data['max_score'] = LRS_LOD_Max/4.16 + else: + js_data['max_score'] = LRS_LOD_Max + self.js_data = json.dumps(js_data) + if LRS_LOD_Max > 100: LRSScale = 20.0 elif LRS_LOD_Max > 20: diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py index 7f6bb0a5..11ad7aa4 100644 --- a/wqflask/wqflask/marker_regression/run_mapping.py +++ b/wqflask/wqflask/marker_regression/run_mapping.py @@ -7,6 +7,7 @@ from pprint import pformat as pf import string import math +from decimal import Decimal import random import sys import datetime @@ -314,30 +315,41 @@ class RunMapping(object): else: self.qtl_results = [] self.qtl_results_for_browser = [] + self.annotations_for_browser = [] highest_chr = 1 #This is needed in order to convert the highest chr to X/Y for marker in results: browser_marker = dict( chr = str(marker['chr']), rs = marker['name'], - ps = marker['Mb']*1000000 + ps = marker['Mb']*1000000, + url = "/show_trait?trait_id=" + marker['name'] + "&dataset=" + self.dataset.group.name + "Geno" ) - if 'p_value' in marker: - browser_marker['p_wald'] = marker['p_value'] + annot_marker = dict( + name = str(marker['name']), + chr = str(marker['chr']), + rs = marker['name'], + pos = marker['Mb']*1000000, + url = "/show_trait?trait_id=" + marker['name'] + "&dataset=" + self.dataset.group.name + "Geno" + ) + #if 'p_value' in marker: + # logger.debug("P EXISTS:", marker['p_value']) + #else: + if 'lrs_value' in marker and marker['lrs_value'] > 0: + browser_marker['p_wald'] = 10**-(marker['lrs_value']/4.61) + elif 'lod_score' in marker and marker['lod_score'] > 0: + browser_marker['p_wald'] = 10**-(marker['lod_score']) else: - if 'lrs_value' in marker and marker['lrs_value'] > 0: - browser_marker['p_wald'] = -math.log10(marker['lrs_value']/4.16) - elif 'lod_score' in marker and marker['lod_score'] > 0: - browser_marker['p_wald'] = -math.log10(marker['lod_score']) - else: - browser_marker['p_wald'] = 0 + browser_marker['p_wald'] = 0 + self.qtl_results_for_browser.append(browser_marker) + self.annotations_for_browser.append(annot_marker) if marker['chr'] > 0 or marker['chr'] == "X" or marker['chr'] == "X/Y": if marker['chr'] > highest_chr or marker['chr'] == "X" or marker['chr'] == "X/Y": highest_chr = marker['chr'] if ('lod_score' in marker.keys()) or ('lrs_value' in marker.keys()): self.qtl_results.append(marker) - browser_files = write_input_for_browser(self.dataset, self.qtl_results_for_browser) + browser_files = write_input_for_browser(self.dataset, self.qtl_results_for_browser, self.annotations_for_browser) with Bench("Exporting Results"): export_mapping_results(self.dataset, self.this_trait, self.qtl_results, self.mapping_results_path, self.mapping_scale, self.score_type) @@ -350,6 +362,11 @@ class RunMapping(object): self.trimmed_markers = trim_markers_for_table(results) if self.mapping_method != "gemma": + if self.score_type == "LRS": + significant_for_browser = self.significant / 4.16 + else: + significant_for_browser = self.significant + self.js_data = dict( #result_score_type = self.score_type, #this_trait = self.this_trait.name, @@ -361,7 +378,8 @@ class RunMapping(object): #qtl_results = self.qtl_results, num_perm = self.num_perm, perm_results = self.perm_output, - browser_files = browser_files + browser_files = browser_files, + significant = significant_for_browser ) else: self.js_data = dict( @@ -406,6 +424,7 @@ class RunMapping(object): def export_mapping_results(dataset, trait, markers, results_path, mapping_scale, score_type): with open(results_path, "w+") as output_file: + output_file.write("Time/Date: " + datetime.datetime.now().strftime("%x / %X") + "\n") output_file.write("Population: " + dataset.group.species.title() + " " + dataset.group.name + "\n") output_file.write("Data Set: " + dataset.fullname + "\n") if dataset.type == "ProbeSet": @@ -413,6 +432,8 @@ def export_mapping_results(dataset, trait, markers, results_path, mapping_scale, output_file.write("Location: " + str(trait.chr) + " @ " + str(trait.mb) + " Mb\n") output_file.write("\n") output_file.write("Name,Chr,") + if score_type.lower() == "-log(p)": + score_type = "'-log(p)" if mapping_scale == "physic": output_file.write("Mb," + score_type) else: @@ -491,7 +512,7 @@ def trim_markers_for_table(markers): else: return sorted_markers -def write_input_for_browser(this_dataset, markers): +def write_input_for_browser(this_dataset, gwas_results, annotations): file_base = this_dataset.group.name + "_" + ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(6)) gwas_filename = file_base + "_GWAS" annot_filename = file_base + "_ANNOT" @@ -499,8 +520,8 @@ def write_input_for_browser(this_dataset, markers): annot_path = "{}/gn2/".format(TEMPDIR) + annot_filename with open(gwas_path + ".json", "w") as gwas_file, open(annot_path + ".json", "w") as annot_file: - gwas_file.write(json.dumps(markers)) - annot_file.write(json.dumps([])) + gwas_file.write(json.dumps(gwas_results)) + annot_file.write(json.dumps(annotations)) return [gwas_filename, annot_filename] #return [gwas_filename, annot_filename]
\ No newline at end of file diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py index b0a46b32..02c65d47 100644 --- a/wqflask/wqflask/show_trait/show_trait.py +++ b/wqflask/wqflask/show_trait/show_trait.py @@ -194,10 +194,10 @@ class ShowTrait(object): trait_symbol = self.this_trait.symbol short_description = trait_symbol - elif self.this_trait.post_publication_abbreviation: + elif hasattr(self.this_trait, 'post_publication_abbreviation'): short_description = self.this_trait.post_publication_abbreviation - elif self.this_trait.pre_publication_abbreviation: + elif hasattr(self.this_trait, 'pre_publication_abbreviation'): short_description = self.this_trait.pre_publication_abbreviation # Todo: Add back in the ones we actually need from below, as we discover we need them diff --git a/wqflask/wqflask/static/new/javascript/init_genome_browser.js b/wqflask/wqflask/static/new/javascript/init_genome_browser.js index 64a300bc..7dfd6712 100644 --- a/wqflask/wqflask/static/new/javascript/init_genome_browser.js +++ b/wqflask/wqflask/static/new/javascript/init_genome_browser.js @@ -1,73 +1,97 @@ -console.log("THE FILES:", js_data.browser_files)
-
-snps_filename = "/browser_input?filename=" + js_data.browser_files[0]
-annot_filename = "/browser_input?filename=" + js_data.browser_files[1]
-
-localUrls =
-{
- snps: snps_filename,
- annotations: null
-};
-
-var vscaleWidth = 90.0;
-var legendWidth = 140.0;
-var score = { min: 0.0, max: 30.0, sig: 4 };
-var gwasPadding = { top: 35.0,
- bottom: 35.0,
- left: vscaleWidth,
- right: legendWidth };
-var gwasHeight = 420.0;
-var genePadding = { top: 10.0,
- bottom: 35.0,
- left: vscaleWidth,
- right: legendWidth };
-var geneHeight = 140.0;
-
-
-var config =
-{ trackHeight: 400.0,
- padding: gwasPadding,
- score: score,
- urls: localUrls,
- tracks: {
- gwas: {
- trackHeight: gwasHeight,
- padding: gwasPadding,
- snps: {
- radius: 3.75,
- lineWidth: 1.0,
- color: { outline: "#FFFFFF",
- fill: "#00008B" },
- pixelOffset: {x: 0.0, y: 0.0}
- },
- annotations: {
- radius: 5.5,
- outline: "#000000",
- snpColor: "#0074D9",
- geneColor: "#FF4136"
- },
- score: score,
- legend: {
- fontSize: 14,
- hPad: 0.2,
- vPad: 0.2
- },
- vscale: {
- color: "#000000",
- hPad: 0.125,
- numSteps: 3,
- fonts: { labelSize: 18, scaleSize: 16 }
- },
- }
- },
- chrs: {
- chrBG1: "#FFFFFF",
- chrBG2: "#DDDDDD",
- chrLabels: { fontSize: 16 },
- },
- initialChrs: { left: "1", right: "19" }
-};
-
-GenomeBrowser.main(config)();
-
+console.log("THE FILES:", js_data.browser_files) + +snps_filename = "/browser_input?filename=" + js_data.browser_files[0] +annot_filename = "/browser_input?filename=" + js_data.browser_files[1] + +localUrls = +{ + snps: snps_filename, + annotations: annot_filename +}; + +var coordinateSystem = + [ + { chr: "1", size: "195471971" }, + { chr: "2", size: "182113224" }, + { chr: "3", size: "160039680" }, + { chr: "4", size: "156508116" }, + { chr: "5", size: "151834684" }, + { chr: "6", size: "149736546" }, + { chr: "7", size: "145441459" }, + { chr: "8", size: "129401213" }, + { chr: "9", size: "124595110" }, + { chr: "10", size: "130694993" }, + { chr: "11", size: "122082543" }, + { chr: "12", size: "120129022" }, + { chr: "13", size: "120421639" }, + { chr: "14", size: "124902244" }, + { chr: "15", size: "104043685" }, + { chr: "16", size: "98207768" }, + { chr: "17", size: "94987271" }, + { chr: "18", size: "90702639" }, + { chr: "19", size: "61431566" }, + ]; + +var vscaleWidth = 90.0; +var legendWidth = 140.0; + +if ('significant' in js_data) { + var significant_score = parseFloat(js_data.significant) +} else { + var significant_score = 4 +} +var score = { min: 0.0, max: js_data.max_score, sig: significant_score }; +var gwasPadding = { top: 35.0, + bottom: 35.0, + left: vscaleWidth, + right: legendWidth }; +var gwasHeight = 320.0; +var config = +{ score: score, + urls: localUrls, + tracks: { + gwas: { + trackHeight: gwasHeight, + padding: gwasPadding, + snps: { + radius: 3.75, + lineWidth: 1.0, + color: { outline: "#FFFFFF", + fill: "#00008B" }, + pixelOffset: {x: 0.0, y: 0.0} + }, + annotations: { + urls: { + url: "GeneNetwork" + }, + radius: 5.5, + outline: "#000000", + snpColor: "#0074D9", + geneColor: "#FF4136" + }, + score: score, + legend: { + fontSize: 14, + hPad: 0.2, + vPad: 0.2 + }, + vscale: { + color: "#000000", + hPad: 0.125, + numSteps: 3, + fonts: { labelSize: 18, scaleSize: 16 } + }, + }, + }, + chrs: { + chrBG1: "#FFFFFF", + chrBG2: "#EEEEEE", + chrLabels: { fontSize: 16 }, + }, + // initialChrs: { left: "1", right: "5" } + coordinateSystem: coordinateSystem, + }; + +GenomeBrowser.main(config)(); + document.getElementById("controls").style.visibility = "visible";
\ No newline at end of file diff --git a/wqflask/wqflask/static/new/javascript/plotly_probability_plot.js b/wqflask/wqflask/static/new/javascript/plotly_probability_plot.js index cc4195e4..e8b7ab83 100644 --- a/wqflask/wqflask/static/new/javascript/plotly_probability_plot.js +++ b/wqflask/wqflask/static/new/javascript/plotly_probability_plot.js @@ -195,7 +195,6 @@ } }, yaxis: { - title: "<b>Data Quantiles</b>", zeroline: false, visible: true, linecolor: 'black', diff --git a/wqflask/wqflask/static/packages/purescript_genome_browser/css/purescript_genetics_browser_v01.css b/wqflask/wqflask/static/packages/purescript_genome_browser/css/purescript-genetics-browser.css index 135292ac..135292ac 100644 --- a/wqflask/wqflask/static/packages/purescript_genome_browser/css/purescript_genetics_browser_v01.css +++ b/wqflask/wqflask/static/packages/purescript_genome_browser/css/purescript-genetics-browser.css diff --git a/wqflask/wqflask/static/packages/purescript_genome_browser/js/purescript-genetics-browser.js b/wqflask/wqflask/static/packages/purescript_genome_browser/js/purescript-genetics-browser.js new file mode 100644 index 00000000..27bb4b2f --- /dev/null +++ b/wqflask/wqflask/static/packages/purescript_genome_browser/js/purescript-genetics-browser.js @@ -0,0 +1,63016 @@ +// modules are defined as an array +// [ module function, map of requires ] +// +// map of requires is short require name -> numeric require +// +// anything defined in a previous bundle is accessed via the +// orig method which is the require for previous bundles +parcelRequire = (function (modules, cache, entry, globalName) { + // Save the require from previous bundle to this closure if any + var previousRequire = typeof parcelRequire === 'function' && parcelRequire; + var nodeRequire = typeof require === 'function' && require; + + function newRequire(name, jumped) { + if (!cache[name]) { + if (!modules[name]) { + // if we cannot find the module within our internal map or + // cache jump to the current global require ie. the last bundle + // that was added to the page. + var currentRequire = typeof parcelRequire === 'function' && parcelRequire; + if (!jumped && currentRequire) { + return currentRequire(name, true); + } + + // If there are other bundles on this page the require from the + // previous one is saved to 'previousRequire'. Repeat this as + // many times as there are bundles until the module is found or + // we exhaust the require chain. + if (previousRequire) { + return previousRequire(name, true); + } + + // Try the node require function if it exists. + if (nodeRequire && typeof name === 'string') { + return nodeRequire(name); + } + + var err = new Error('Cannot find module \'' + name + '\''); + err.code = 'MODULE_NOT_FOUND'; + throw err; + } + + localRequire.resolve = resolve; + localRequire.cache = {}; + + var module = cache[name] = new newRequire.Module(name); + + modules[name][0].call(module.exports, localRequire, module, module.exports, this); + } + + return cache[name].exports; + + function localRequire(x){ + return newRequire(localRequire.resolve(x)); + } + + function resolve(x){ + return modules[name][1][x] || x; + } + } + + function Module(moduleName) { + this.id = moduleName; + this.bundle = newRequire; + this.exports = {}; + } + + newRequire.isParcelRequire = true; + newRequire.Module = Module; + newRequire.modules = modules; + newRequire.cache = cache; + newRequire.parent = previousRequire; + newRequire.register = function (id, exports) { + modules[id] = [function (require, module) { + module.exports = exports; + }, {}]; + }; + + var error; + for (var i = 0; i < entry.length; i++) { + try { + newRequire(entry[i]); + } catch (e) { + // Save first error but execute all entries + if (!error) { + error = e; + } + } + } + + if (entry.length) { + // Expose entry point to Node, AMD or browser globals + // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js + var mainExports = newRequire(entry[entry.length - 1]); + + // CommonJS + if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = mainExports; + + // RequireJS + } else if (typeof define === "function" && define.amd) { + define(function () { + return mainExports; + }); + + // <script> + } else if (globalName) { + this[globalName] = mainExports; + } + } + + // Override the current require with this new one + parcelRequire = newRequire; + + if (error) { + // throw error from earlier, _after updating parcelRequire_ + throw error; + } + + return newRequire; +})({"DuPX":[function(require,module,exports) { +"use strict"; + +exports.buttonEvent = function (id) { + return function (cb) { + return function () { + var el = document.getElementById(id); + el.addEventListener('click', function (ev) { + cb(); + }); + }; + }; +}; + +exports.keydownEvent = function (el) { + return function (cb) { + return function () { + window.addEventListener('keydown', function (ev) { + cb(ev)(); + }); + }; + }; +}; + +exports.resizeEvent = function (cb) { + return function () { + var resizeDelay = 250; // ms delay before running resize logic + + var resizeTimeout = null; + + var throttled = function throttled() { + if (resizeTimeout) { + clearTimeout(resizeTimeout); + } + + resizeTimeout = setTimeout(function () { + resizeTimeout = null; + cb(exports.windowInnerSize())(); + }, resizeDelay); + }; + + window.addEventListener('resize', throttled, false); + }; +}; + +exports.windowInnerSize = function () { + var w = window.innerWidth; + var h = window.innerHeight; + return { + width: w, + height: h + }; +}; + +exports.setWindow = function (k) { + return function (v) { + return function () { + window[k] = v; + }; + }; +}; + +exports.setElementContents = function (el) { + return function (html) { + return function () { + el.innerHTML = html; + }; + }; +}; + +var debugDivId = "debugDiv"; + +exports.initDebugDiv = function (radius) { + return function () { + var view = document.getElementById("browser"); + var div = document.getElementById(debugDivId); + + if (!div) { + div = document.createElement("div"); + view.appendChild(div); + } + + div.id = debugDivId; + div.style['position'] = "relative"; + div.style['left'] = "0.0"; + div.style['top'] = "0.0"; + div.style['border-radius'] = "50%"; + div.style['width'] = radius * 2.0 + "px"; + div.style['height'] = radius * 2.0 + "px"; + div.style['z-index'] = "100"; + div.style['backgroundColor'] = "red"; + div.style['pointer-events'] = "none"; + div.style['display'] = "inline-block"; + div.style['visibility'] = "hidden"; + div.dataset.radius = radius; + return div; + }; +}; + +var getDebugDiv = function getDebugDiv() { + var div = document.getElementById(debugDivId); + + if (!div) { + return initDebugDiv(10.0)(); + } else { + return div; + } +}; + +exports.setDebugDivVisibility = function (s) { + return function () { + var div = getDebugDiv(); + div.style['visibility'] = s; + }; +}; + +exports.setDebugDivPoint = function (p) { + return function () { + var div = getDebugDiv(); + var r = div.dataset.radius | 1.0; + var x = p.x - r; + var y = p.y - r * 2.0; // var y = p.y; + + div.style['left'] = x + "px"; + div.style['top'] = y + "px"; + }; +}; +},{}],"7nyB":[function(require,module,exports) { +"use strict"; + +exports.arrayApply = function (fs) { + return function (xs) { + var l = fs.length; + var k = xs.length; + var result = new Array(l * k); + var n = 0; + + for (var i = 0; i < l; i++) { + var f = fs[i]; + + for (var j = 0; j < k; j++) { + result[n++] = f(xs[j]); + } + } + + return result; + }; +}; +},{}],"/riR":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Semigroupoid = function Semigroupoid(compose) { + this.compose = compose; +}; + +var semigroupoidFn = new Semigroupoid(function (f) { + return function (g) { + return function (x) { + return f(g(x)); + }; + }; +}); + +var compose = function compose(dict) { + return dict.compose; +}; + +var composeFlipped = function composeFlipped(dictSemigroupoid) { + return function (f) { + return function (g) { + return compose(dictSemigroupoid)(g)(f); + }; + }; +}; + +module.exports = { + compose: compose, + Semigroupoid: Semigroupoid, + composeFlipped: composeFlipped, + semigroupoidFn: semigroupoidFn +}; +},{}],"IAi2":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Category = function Category(Semigroupoid0, identity) { + this.Semigroupoid0 = Semigroupoid0; + this.identity = identity; +}; + +var identity = function identity(dict) { + return dict.identity; +}; + +var categoryFn = new Category(function () { + return Control_Semigroupoid.semigroupoidFn; +}, function (x) { + return x; +}); +module.exports = { + Category: Category, + identity: identity, + categoryFn: categoryFn +}; +},{"../Control.Semigroupoid/index.js":"/riR"}],"ObQr":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var otherwise = true; +module.exports = { + otherwise: otherwise +}; +},{}],"ImXJ":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var on = function on(f) { + return function (g) { + return function (x) { + return function (y) { + return f(g(x))(g(y)); + }; + }; + }; +}; + +var flip = function flip(f) { + return function (b) { + return function (a) { + return f(a)(b); + }; + }; +}; + +var $$const = function $$const(a) { + return function (v) { + return a; + }; +}; + +var applyN = function applyN(f) { + var go = function go($copy_n) { + return function ($copy_acc) { + var $tco_var_n = $copy_n; + var $tco_done = false; + var $tco_result; + + function $tco_loop(n, acc) { + if (n <= 0) { + $tco_done = true; + return acc; + } + + ; + + if (Data_Boolean.otherwise) { + $tco_var_n = n - 1 | 0; + $copy_acc = f(acc); + return; + } + + ; + throw new Error("Failed pattern match at Data.Function (line 94, column 3 - line 96, column 37): " + [n.constructor.name, acc.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_n, $copy_acc); + } + + ; + return $tco_result; + }; + }; + + return go; +}; + +var applyFlipped = function applyFlipped(x) { + return function (f) { + return f(x); + }; +}; + +var apply = function apply(f) { + return function (x) { + return f(x); + }; +}; + +module.exports = { + flip: flip, + "const": $$const, + apply: apply, + applyFlipped: applyFlipped, + applyN: applyN, + on: on +}; +},{"../Data.Boolean/index.js":"ObQr"}],"0GYo":[function(require,module,exports) { +"use strict"; + +exports.arrayMap = function (f) { + return function (arr) { + var l = arr.length; + var result = new Array(l); + + for (var i = 0; i < l; i++) { + result[i] = f(arr[i]); + } + + return result; + }; +}; +},{}],"Nqls":[function(require,module,exports) { +"use strict"; + +exports.unit = {}; +},{}],"qgjE":[function(require,module,exports) { +"use strict"; + +exports.showIntImpl = function (n) { + return n.toString(); +}; + +exports.showNumberImpl = function (n) { + var str = n.toString(); + return isNaN(str + ".0") ? str : str + ".0"; +}; + +exports.showCharImpl = function (c) { + var code = c.charCodeAt(0); + + if (code < 0x20 || code === 0x7F) { + switch (c) { + case "\x07": + return "'\\a'"; + + case "\b": + return "'\\b'"; + + case "\f": + return "'\\f'"; + + case "\n": + return "'\\n'"; + + case "\r": + return "'\\r'"; + + case "\t": + return "'\\t'"; + + case "\v": + return "'\\v'"; + } + + return "'\\" + code.toString(10) + "'"; + } + + return c === "'" || c === "\\" ? "'\\" + c + "'" : "'" + c + "'"; +}; + +exports.showStringImpl = function (s) { + var l = s.length; + return "\"" + s.replace(/[\0-\x1F\x7F"\\]/g, // eslint-disable-line no-control-regex + function (c, i) { + switch (c) { + case "\"": + case "\\": + return "\\" + c; + + case "\x07": + return "\\a"; + + case "\b": + return "\\b"; + + case "\f": + return "\\f"; + + case "\n": + return "\\n"; + + case "\r": + return "\\r"; + + case "\t": + return "\\t"; + + case "\v": + return "\\v"; + } + + var k = i + 1; + var empty = k < l && s[k] >= "0" && s[k] <= "9" ? "\\&" : ""; + return "\\" + c.charCodeAt(0).toString(10) + empty; + }) + "\""; +}; + +exports.showArrayImpl = function (f) { + return function (xs) { + var ss = []; + + for (var i = 0, l = xs.length; i < l; i++) { + ss[i] = f(xs[i]); + } + + return "[" + ss.join(",") + "]"; + }; +}; + +exports.cons = function (head) { + return function (tail) { + return [head].concat(tail); + }; +}; + +exports.join = function (separator) { + return function (xs) { + return xs.join(separator); + }; +}; +},{}],"AvJb":[function(require,module,exports) { +"use strict"; // module Data.Symbol + +exports.unsafeCoerce = function (arg) { + return arg; +}; +},{}],"4oJQ":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var SProxy = function () { + function SProxy() {} + + ; + SProxy.value = new SProxy(); + return SProxy; +}(); + +var IsSymbol = function IsSymbol(reflectSymbol) { + this.reflectSymbol = reflectSymbol; +}; + +var reifySymbol = function reifySymbol(s) { + return function (f) { + return $foreign.unsafeCoerce(function (dictIsSymbol) { + return f(dictIsSymbol); + })({ + reflectSymbol: function reflectSymbol(v) { + return s; + } + })(SProxy.value); + }; +}; + +var reflectSymbol = function reflectSymbol(dict) { + return dict.reflectSymbol; +}; + +module.exports = { + IsSymbol: IsSymbol, + reflectSymbol: reflectSymbol, + reifySymbol: reifySymbol, + SProxy: SProxy +}; +},{"./foreign.js":"AvJb"}],"CHMS":[function(require,module,exports) { +"use strict"; + +exports.unsafeHas = function (label) { + return function (rec) { + return {}.hasOwnProperty.call(rec, label); + }; +}; + +exports.unsafeGet = function (label) { + return function (rec) { + return rec[label]; + }; +}; + +exports.unsafeSet = function (label) { + return function (value) { + return function (rec) { + var copy = {}; + + for (var key in rec) { + if ({}.hasOwnProperty.call(rec, key)) { + copy[key] = rec[key]; + } + } + + copy[label] = value; + return copy; + }; + }; +}; + +exports.unsafeDelete = function (label) { + return function (rec) { + var copy = {}; + + for (var key in rec) { + if (key !== label && {}.hasOwnProperty.call(rec, key)) { + copy[key] = rec[key]; + } + } + + return copy; + }; +}; +},{}],"KG04":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +module.exports = { + unsafeHas: $foreign.unsafeHas, + unsafeGet: $foreign.unsafeGet, + unsafeSet: $foreign.unsafeSet, + unsafeDelete: $foreign.unsafeDelete +}; +},{"./foreign.js":"CHMS"}],"XaXP":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var RLProxy = function () { + function RLProxy() {} + + ; + RLProxy.value = new RLProxy(); + return RLProxy; +}(); + +module.exports = { + RLProxy: RLProxy +}; +},{}],"mFY7":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Record_Unsafe = require("../Record.Unsafe/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var ShowRecordFields = function ShowRecordFields(showRecordFields) { + this.showRecordFields = showRecordFields; +}; + +var Show = function Show(show) { + this.show = show; +}; + +var showString = new Show($foreign.showStringImpl); +var showRecordFieldsNil = new ShowRecordFields(function (v) { + return function (v1) { + return []; + }; +}); + +var showRecordFields = function showRecordFields(dict) { + return dict.showRecordFields; +}; + +var showRecord = function showRecord(dictRowToList) { + return function (dictShowRecordFields) { + return new Show(function (record) { + var v = showRecordFields(dictShowRecordFields)(Type_Data_RowList.RLProxy.value)(record); + + if (v.length === 0) { + return "{}"; + } + + ; + return $foreign.join(" ")(["{", $foreign.join(", ")(v), "}"]); + }); + }; +}; + +var showNumber = new Show($foreign.showNumberImpl); +var showInt = new Show($foreign.showIntImpl); +var showChar = new Show($foreign.showCharImpl); +var showBoolean = new Show(function (v) { + if (v) { + return "true"; + } + + ; + + if (!v) { + return "false"; + } + + ; + throw new Error("Failed pattern match at Data.Show (line 20, column 1 - line 22, column 23): " + [v.constructor.name]); +}); + +var show = function show(dict) { + return dict.show; +}; + +var showArray = function showArray(dictShow) { + return new Show($foreign.showArrayImpl(show(dictShow))); +}; + +var showRecordFieldsCons = function showRecordFieldsCons(dictIsSymbol) { + return function (dictShowRecordFields) { + return function (dictShow) { + return new ShowRecordFields(function (v) { + return function (record) { + var tail = showRecordFields(dictShowRecordFields)(Type_Data_RowList.RLProxy.value)(record); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var focus = Record_Unsafe.unsafeGet(key)(record); + return $foreign.cons($foreign.join(": ")([key, show(dictShow)(focus)]))(tail); + }; + }); + }; + }; +}; + +module.exports = { + Show: Show, + show: show, + ShowRecordFields: ShowRecordFields, + showRecordFields: showRecordFields, + showBoolean: showBoolean, + showInt: showInt, + showNumber: showNumber, + showChar: showChar, + showString: showString, + showArray: showArray, + showRecord: showRecord, + showRecordFieldsNil: showRecordFieldsNil, + showRecordFieldsCons: showRecordFieldsCons +}; +},{"./foreign.js":"qgjE","../Data.Symbol/index.js":"4oJQ","../Record.Unsafe/index.js":"KG04","../Type.Data.RowList/index.js":"XaXP"}],"NhVk":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var showUnit = new Data_Show.Show(function (v) { + return "unit"; +}); +module.exports = { + showUnit: showUnit, + unit: $foreign.unit +}; +},{"./foreign.js":"Nqls","../Data.Show/index.js":"mFY7"}],"+0AE":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Functor = function Functor(map) { + this.map = map; +}; + +var map = function map(dict) { + return dict.map; +}; + +var mapFlipped = function mapFlipped(dictFunctor) { + return function (fa) { + return function (f) { + return map(dictFunctor)(f)(fa); + }; + }; +}; + +var $$void = function $$void(dictFunctor) { + return map(dictFunctor)(Data_Function["const"](Data_Unit.unit)); +}; + +var voidLeft = function voidLeft(dictFunctor) { + return function (f) { + return function (x) { + return map(dictFunctor)(Data_Function["const"](x))(f); + }; + }; +}; + +var voidRight = function voidRight(dictFunctor) { + return function (x) { + return map(dictFunctor)(Data_Function["const"](x)); + }; +}; + +var functorFn = new Functor(Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)); +var functorArray = new Functor($foreign.arrayMap); + +var flap = function flap(dictFunctor) { + return function (ff) { + return function (x) { + return map(dictFunctor)(function (f) { + return f(x); + })(ff); + }; + }; +}; + +module.exports = { + Functor: Functor, + map: map, + mapFlipped: mapFlipped, + "void": $$void, + voidRight: voidRight, + voidLeft: voidLeft, + flap: flap, + functorFn: functorFn, + functorArray: functorArray +}; +},{"./foreign.js":"0GYo","../Control.Semigroupoid/index.js":"/riR","../Data.Function/index.js":"ImXJ","../Data.Unit/index.js":"NhVk"}],"QcLv":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Apply = function Apply(Functor0, apply) { + this.Functor0 = Functor0; + this.apply = apply; +}; + +var applyFn = new Apply(function () { + return Data_Functor.functorFn; +}, function (f) { + return function (g) { + return function (x) { + return f(x)(g(x)); + }; + }; +}); +var applyArray = new Apply(function () { + return Data_Functor.functorArray; +}, $foreign.arrayApply); + +var apply = function apply(dict) { + return dict.apply; +}; + +var applyFirst = function applyFirst(dictApply) { + return function (a) { + return function (b) { + return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(Data_Function["const"])(a))(b); + }; + }; +}; + +var applySecond = function applySecond(dictApply) { + return function (a) { + return function (b) { + return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(Data_Function["const"](Control_Category.identity(Control_Category.categoryFn)))(a))(b); + }; + }; +}; + +var lift2 = function lift2(dictApply) { + return function (f) { + return function (a) { + return function (b) { + return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b); + }; + }; + }; +}; + +var lift3 = function lift3(dictApply) { + return function (f) { + return function (a) { + return function (b) { + return function (c) { + return apply(dictApply)(apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b))(c); + }; + }; + }; + }; +}; + +var lift4 = function lift4(dictApply) { + return function (f) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return apply(dictApply)(apply(dictApply)(apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b))(c))(d); + }; + }; + }; + }; + }; +}; + +var lift5 = function lift5(dictApply) { + return function (f) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return apply(dictApply)(apply(dictApply)(apply(dictApply)(apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b))(c))(d))(e); + }; + }; + }; + }; + }; + }; +}; + +module.exports = { + Apply: Apply, + apply: apply, + applyFirst: applyFirst, + applySecond: applySecond, + lift2: lift2, + lift3: lift3, + lift4: lift4, + lift5: lift5, + applyFn: applyFn, + applyArray: applyArray +}; +},{"./foreign.js":"7nyB","../Control.Category/index.js":"IAi2","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE"}],"qYya":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Apply = require("../Control.Apply/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Applicative = function Applicative(Apply0, pure) { + this.Apply0 = Apply0; + this.pure = pure; +}; + +var pure = function pure(dict) { + return dict.pure; +}; + +var unless = function unless(dictApplicative) { + return function (v) { + return function (v1) { + if (!v) { + return v1; + } + + ; + + if (v) { + return pure(dictApplicative)(Data_Unit.unit); + } + + ; + throw new Error("Failed pattern match at Control.Applicative (line 62, column 1 - line 62, column 65): " + [v.constructor.name, v1.constructor.name]); + }; + }; +}; + +var when = function when(dictApplicative) { + return function (v) { + return function (v1) { + if (v) { + return v1; + } + + ; + + if (!v) { + return pure(dictApplicative)(Data_Unit.unit); + } + + ; + throw new Error("Failed pattern match at Control.Applicative (line 57, column 1 - line 57, column 63): " + [v.constructor.name, v1.constructor.name]); + }; + }; +}; + +var liftA1 = function liftA1(dictApplicative) { + return function (f) { + return function (a) { + return Control_Apply.apply(dictApplicative.Apply0())(pure(dictApplicative)(f))(a); + }; + }; +}; + +var applicativeFn = new Applicative(function () { + return Control_Apply.applyFn; +}, function (x) { + return function (v) { + return x; + }; +}); +var applicativeArray = new Applicative(function () { + return Control_Apply.applyArray; +}, function (x) { + return [x]; +}); +module.exports = { + Applicative: Applicative, + pure: pure, + liftA1: liftA1, + unless: unless, + when: when, + applicativeFn: applicativeFn, + applicativeArray: applicativeArray +}; +},{"../Control.Apply/index.js":"QcLv","../Data.Unit/index.js":"NhVk"}],"S3W+":[function(require,module,exports) { +"use strict"; + +exports.arrayBind = function (arr) { + return function (f) { + var result = []; + + for (var i = 0, l = arr.length; i < l; i++) { + Array.prototype.push.apply(result, f(arr[i])); + } + + return result; + }; +}; +},{}],"7VcT":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Discard = function Discard(discard) { + this.discard = discard; +}; + +var Bind = function Bind(Apply0, bind) { + this.Apply0 = Apply0; + this.bind = bind; +}; + +var discard = function discard(dict) { + return dict.discard; +}; + +var bindFn = new Bind(function () { + return Control_Apply.applyFn; +}, function (m) { + return function (f) { + return function (x) { + return f(m(x))(x); + }; + }; +}); +var bindArray = new Bind(function () { + return Control_Apply.applyArray; +}, $foreign.arrayBind); + +var bind = function bind(dict) { + return dict.bind; +}; + +var bindFlipped = function bindFlipped(dictBind) { + return Data_Function.flip(bind(dictBind)); +}; + +var composeKleisliFlipped = function composeKleisliFlipped(dictBind) { + return function (f) { + return function (g) { + return function (a) { + return bindFlipped(dictBind)(f)(g(a)); + }; + }; + }; +}; + +var composeKleisli = function composeKleisli(dictBind) { + return function (f) { + return function (g) { + return function (a) { + return bind(dictBind)(f(a))(g); + }; + }; + }; +}; + +var discardUnit = new Discard(function (dictBind) { + return bind(dictBind); +}); + +var ifM = function ifM(dictBind) { + return function (cond) { + return function (t) { + return function (f) { + return bind(dictBind)(cond)(function (cond$prime) { + if (cond$prime) { + return t; + } + + ; + return f; + }); + }; + }; + }; +}; + +var join = function join(dictBind) { + return function (m) { + return bind(dictBind)(m)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +module.exports = { + Bind: Bind, + bind: bind, + bindFlipped: bindFlipped, + Discard: Discard, + discard: discard, + join: join, + composeKleisli: composeKleisli, + composeKleisliFlipped: composeKleisliFlipped, + ifM: ifM, + bindFn: bindFn, + bindArray: bindArray, + discardUnit: discardUnit +}; +},{"./foreign.js":"S3W+","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Function/index.js":"ImXJ"}],"phTL":[function(require,module,exports) { +"use strict"; + +exports.concatString = function (s1) { + return function (s2) { + return s1 + s2; + }; +}; + +exports.concatArray = function (xs) { + return function (ys) { + if (xs.length === 0) return ys; + if (ys.length === 0) return xs; + return xs.concat(ys); + }; +}; +},{}],"bncE":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Show = require("../Data.Show/index.js"); + +var Void = function Void(x) { + return x; +}; + +var absurd = function absurd(a) { + var spin = function spin($copy_v) { + var $tco_result; + + function $tco_loop(v) { + $copy_v = v; + return; + } + + ; + + while (!false) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; + }; + + return spin(a); +}; + +var showVoid = new Data_Show.Show(absurd); +module.exports = { + absurd: absurd, + showVoid: showVoid +}; +},{"../Data.Show/index.js":"mFY7"}],"EsAJ":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Data_Void = require("../Data.Void/index.js"); + +var Record_Unsafe = require("../Record.Unsafe/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var SemigroupRecord = function SemigroupRecord(appendRecord) { + this.appendRecord = appendRecord; +}; + +var Semigroup = function Semigroup(append) { + this.append = append; +}; + +var semigroupVoid = new Semigroup(function (v) { + return Data_Void.absurd; +}); +var semigroupUnit = new Semigroup(function (v) { + return function (v1) { + return Data_Unit.unit; + }; +}); +var semigroupString = new Semigroup($foreign.concatString); +var semigroupRecordNil = new SemigroupRecord(function (v) { + return function (v1) { + return function (v2) { + return {}; + }; + }; +}); +var semigroupArray = new Semigroup($foreign.concatArray); + +var appendRecord = function appendRecord(dict) { + return dict.appendRecord; +}; + +var semigroupRecord = function semigroupRecord(dictRowToList) { + return function (dictSemigroupRecord) { + return new Semigroup(appendRecord(dictSemigroupRecord)(Type_Data_RowList.RLProxy.value)); + }; +}; + +var append = function append(dict) { + return dict.append; +}; + +var semigroupFn = function semigroupFn(dictSemigroup) { + return new Semigroup(function (f) { + return function (g) { + return function (x) { + return append(dictSemigroup)(f(x))(g(x)); + }; + }; + }); +}; + +var semigroupRecordCons = function semigroupRecordCons(dictIsSymbol) { + return function (dictCons) { + return function (dictSemigroupRecord) { + return function (dictSemigroup) { + return new SemigroupRecord(function (v) { + return function (ra) { + return function (rb) { + var tail = appendRecord(dictSemigroupRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + var get = Record_Unsafe.unsafeGet(key); + return insert(append(dictSemigroup)(get(ra))(get(rb)))(tail); + }; + }; + }); + }; + }; + }; +}; + +module.exports = { + Semigroup: Semigroup, + append: append, + SemigroupRecord: SemigroupRecord, + appendRecord: appendRecord, + semigroupString: semigroupString, + semigroupUnit: semigroupUnit, + semigroupVoid: semigroupVoid, + semigroupFn: semigroupFn, + semigroupArray: semigroupArray, + semigroupRecord: semigroupRecord, + semigroupRecordNil: semigroupRecordNil, + semigroupRecordCons: semigroupRecordCons +}; +},{"./foreign.js":"phTL","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Data.Void/index.js":"bncE","../Record.Unsafe/index.js":"KG04","../Type.Data.RowList/index.js":"XaXP"}],"lN+m":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Alt = function Alt(Functor0, alt) { + this.Functor0 = Functor0; + this.alt = alt; +}; + +var altArray = new Alt(function () { + return Data_Functor.functorArray; +}, Data_Semigroup.append(Data_Semigroup.semigroupArray)); + +var alt = function alt(dict) { + return dict.alt; +}; + +module.exports = { + Alt: Alt, + alt: alt, + altArray: altArray +}; +},{"../Data.Functor/index.js":"+0AE","../Data.Semigroup/index.js":"EsAJ"}],"oMBg":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Plus = function Plus(Alt0, empty) { + this.Alt0 = Alt0; + this.empty = empty; +}; + +var plusArray = new Plus(function () { + return Control_Alt.altArray; +}, []); + +var empty = function empty(dict) { + return dict.empty; +}; + +module.exports = { + Plus: Plus, + empty: empty, + plusArray: plusArray +}; +},{"../Control.Alt/index.js":"lN+m"}],"aHia":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Alternative = function Alternative(Applicative0, Plus1) { + this.Applicative0 = Applicative0; + this.Plus1 = Plus1; +}; + +var alternativeArray = new Alternative(function () { + return Control_Applicative.applicativeArray; +}, function () { + return Control_Plus.plusArray; +}); +module.exports = { + Alternative: Alternative, + alternativeArray: alternativeArray +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Plus/index.js":"oMBg"}],"U/Ix":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Monad = function Monad(Applicative0, Bind1) { + this.Applicative0 = Applicative0; + this.Bind1 = Bind1; +}; + +var whenM = function whenM(dictMonad) { + return function (mb) { + return function (m) { + return Control_Bind.bind(dictMonad.Bind1())(mb)(function (v) { + return Control_Applicative.when(dictMonad.Applicative0())(v)(m); + }); + }; + }; +}; + +var unlessM = function unlessM(dictMonad) { + return function (mb) { + return function (m) { + return Control_Bind.bind(dictMonad.Bind1())(mb)(function (v) { + return Control_Applicative.unless(dictMonad.Applicative0())(v)(m); + }); + }; + }; +}; + +var monadFn = new Monad(function () { + return Control_Applicative.applicativeFn; +}, function () { + return Control_Bind.bindFn; +}); +var monadArray = new Monad(function () { + return Control_Applicative.applicativeArray; +}, function () { + return Control_Bind.bindArray; +}); + +var liftM1 = function liftM1(dictMonad) { + return function (f) { + return function (a) { + return Control_Bind.bind(dictMonad.Bind1())(a)(function (v) { + return Control_Applicative.pure(dictMonad.Applicative0())(f(v)); + }); + }; + }; +}; + +var ap = function ap(dictMonad) { + return function (f) { + return function (a) { + return Control_Bind.bind(dictMonad.Bind1())(f)(function (v) { + return Control_Bind.bind(dictMonad.Bind1())(a)(function (v1) { + return Control_Applicative.pure(dictMonad.Applicative0())(v(v1)); + }); + }); + }; + }; +}; + +module.exports = { + Monad: Monad, + liftM1: liftM1, + ap: ap, + whenM: whenM, + unlessM: unlessM, + monadFn: monadFn, + monadArray: monadArray +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT"}],"IpNh":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var MonadCont = function MonadCont(Monad0, callCC) { + this.Monad0 = Monad0; + this.callCC = callCC; +}; + +var callCC = function callCC(dict) { + return dict.callCC; +}; + +module.exports = { + MonadCont: MonadCont, + callCC: callCC +}; +},{}],"YFBA":[function(require,module,exports) { +"use strict"; + +exports.arrayExtend = function (f) { + return function (xs) { + return xs.map(function (_, i, xs) { + return f(xs.slice(i)); + }); + }; +}; +},{}],"JIoJ":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Extend = function Extend(Functor0, extend) { + this.Functor0 = Functor0; + this.extend = extend; +}; + +var extendFn = function extendFn(dictSemigroup) { + return new Extend(function () { + return Data_Functor.functorFn; + }, function (f) { + return function (g) { + return function (w) { + return f(function (w$prime) { + return g(Data_Semigroup.append(dictSemigroup)(w)(w$prime)); + }); + }; + }; + }); +}; + +var extendArray = new Extend(function () { + return Data_Functor.functorArray; +}, $foreign.arrayExtend); + +var extend = function extend(dict) { + return dict.extend; +}; + +var extendFlipped = function extendFlipped(dictExtend) { + return function (w) { + return function (f) { + return extend(dictExtend)(f)(w); + }; + }; +}; + +var duplicate = function duplicate(dictExtend) { + return extend(dictExtend)(Control_Category.identity(Control_Category.categoryFn)); +}; + +var composeCoKleisliFlipped = function composeCoKleisliFlipped(dictExtend) { + return function (f) { + return function (g) { + return function (w) { + return f(extend(dictExtend)(g)(w)); + }; + }; + }; +}; + +var composeCoKleisli = function composeCoKleisli(dictExtend) { + return function (f) { + return function (g) { + return function (w) { + return g(extend(dictExtend)(f)(w)); + }; + }; + }; +}; + +module.exports = { + Extend: Extend, + extend: extend, + extendFlipped: extendFlipped, + composeCoKleisli: composeCoKleisli, + composeCoKleisliFlipped: composeCoKleisliFlipped, + duplicate: duplicate, + extendFn: extendFn, + extendArray: extendArray +}; +},{"./foreign.js":"YFBA","../Control.Category/index.js":"IAi2","../Data.Functor/index.js":"+0AE","../Data.Semigroup/index.js":"EsAJ"}],"kY6E":[function(require,module,exports) { +"use strict"; + +exports.foldrArray = function (f) { + return function (init) { + return function (xs) { + var acc = init; + var len = xs.length; + + for (var i = len - 1; i >= 0; i--) { + acc = f(xs[i])(acc); + } + + return acc; + }; + }; +}; + +exports.foldlArray = function (f) { + return function (init) { + return function (xs) { + var acc = init; + var len = xs.length; + + for (var i = 0; i < len; i++) { + acc = f(acc)(xs[i]); + } + + return acc; + }; + }; +}; +},{}],"h7nC":[function(require,module,exports) { +"use strict"; + +var refEq = function refEq(r1) { + return function (r2) { + return r1 === r2; + }; +}; + +exports.eqBooleanImpl = refEq; +exports.eqIntImpl = refEq; +exports.eqNumberImpl = refEq; +exports.eqCharImpl = refEq; +exports.eqStringImpl = refEq; + +exports.eqArrayImpl = function (f) { + return function (xs) { + return function (ys) { + if (xs === ys) return true; + if (xs.length !== ys.length) return false; + + for (var i = 0; i < xs.length; i++) { + if (!f(xs[i])(ys[i])) return false; + } + + return true; + }; + }; +}; +},{}],"Pq4F":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Record_Unsafe = require("../Record.Unsafe/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var EqRecord = function EqRecord(eqRecord) { + this.eqRecord = eqRecord; +}; + +var Eq1 = function Eq1(eq1) { + this.eq1 = eq1; +}; + +var Eq = function Eq(eq) { + this.eq = eq; +}; + +var eqVoid = new Eq(function (v) { + return function (v1) { + return true; + }; +}); +var eqUnit = new Eq(function (v) { + return function (v1) { + return true; + }; +}); +var eqString = new Eq($foreign.eqStringImpl); +var eqRowNil = new EqRecord(function (v) { + return function (v1) { + return function (v2) { + return true; + }; + }; +}); + +var eqRecord = function eqRecord(dict) { + return dict.eqRecord; +}; + +var eqRec = function eqRec(dictRowToList) { + return function (dictEqRecord) { + return new Eq(eqRecord(dictEqRecord)(Type_Data_RowList.RLProxy.value)); + }; +}; + +var eqNumber = new Eq($foreign.eqNumberImpl); +var eqInt = new Eq($foreign.eqIntImpl); +var eqChar = new Eq($foreign.eqCharImpl); +var eqBoolean = new Eq($foreign.eqBooleanImpl); + +var eq1 = function eq1(dict) { + return dict.eq1; +}; + +var eq = function eq(dict) { + return dict.eq; +}; + +var eqArray = function eqArray(dictEq) { + return new Eq($foreign.eqArrayImpl(eq(dictEq))); +}; + +var eq1Array = new Eq1(function (dictEq) { + return eq(eqArray(dictEq)); +}); + +var eqRowCons = function eqRowCons(dictEqRecord) { + return function (dictCons) { + return function (dictIsSymbol) { + return function (dictEq) { + return new EqRecord(function (v) { + return function (ra) { + return function (rb) { + var tail = eqRecord(dictEqRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var get = Record_Unsafe.unsafeGet(key); + return eq(dictEq)(get(ra))(get(rb)) && tail; + }; + }; + }); + }; + }; + }; +}; + +var notEq = function notEq(dictEq) { + return function (x) { + return function (y) { + return eq(eqBoolean)(eq(dictEq)(x)(y))(false); + }; + }; +}; + +var notEq1 = function notEq1(dictEq1) { + return function (dictEq) { + return function (x) { + return function (y) { + return eq(eqBoolean)(eq1(dictEq1)(dictEq)(x)(y))(false); + }; + }; + }; +}; + +module.exports = { + Eq: Eq, + eq: eq, + notEq: notEq, + Eq1: Eq1, + eq1: eq1, + notEq1: notEq1, + EqRecord: EqRecord, + eqRecord: eqRecord, + eqBoolean: eqBoolean, + eqInt: eqInt, + eqNumber: eqNumber, + eqChar: eqChar, + eqString: eqString, + eqUnit: eqUnit, + eqVoid: eqVoid, + eqArray: eqArray, + eqRec: eqRec, + eq1Array: eq1Array, + eqRowNil: eqRowNil, + eqRowCons: eqRowCons +}; +},{"./foreign.js":"h7nC","../Data.Symbol/index.js":"4oJQ","../Record.Unsafe/index.js":"KG04","../Type.Data.RowList/index.js":"XaXP"}],"7fWM":[function(require,module,exports) { +"use strict"; + +exports.boolConj = function (b1) { + return function (b2) { + return b1 && b2; + }; +}; + +exports.boolDisj = function (b1) { + return function (b2) { + return b1 || b2; + }; +}; + +exports.boolNot = function (b) { + return !b; +}; +},{}],"ukdD":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var RProxy = function () { + function RProxy() {} + + ; + RProxy.value = new RProxy(); + return RProxy; +}(); + +module.exports = { + RProxy: RProxy +}; +},{}],"paZe":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Record_Unsafe = require("../Record.Unsafe/index.js"); + +var Type_Data_Row = require("../Type.Data.Row/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var HeytingAlgebraRecord = function HeytingAlgebraRecord(conjRecord, disjRecord, ffRecord, impliesRecord, notRecord, ttRecord) { + this.conjRecord = conjRecord; + this.disjRecord = disjRecord; + this.ffRecord = ffRecord; + this.impliesRecord = impliesRecord; + this.notRecord = notRecord; + this.ttRecord = ttRecord; +}; + +var HeytingAlgebra = function HeytingAlgebra(conj, disj, ff, implies, not, tt) { + this.conj = conj; + this.disj = disj; + this.ff = ff; + this.implies = implies; + this.not = not; + this.tt = tt; +}; + +var ttRecord = function ttRecord(dict) { + return dict.ttRecord; +}; + +var tt = function tt(dict) { + return dict.tt; +}; + +var notRecord = function notRecord(dict) { + return dict.notRecord; +}; + +var not = function not(dict) { + return dict.not; +}; + +var impliesRecord = function impliesRecord(dict) { + return dict.impliesRecord; +}; + +var implies = function implies(dict) { + return dict.implies; +}; + +var heytingAlgebraUnit = new HeytingAlgebra(function (v) { + return function (v1) { + return Data_Unit.unit; + }; +}, function (v) { + return function (v1) { + return Data_Unit.unit; + }; +}, Data_Unit.unit, function (v) { + return function (v1) { + return Data_Unit.unit; + }; +}, function (v) { + return Data_Unit.unit; +}, Data_Unit.unit); +var heytingAlgebraRecordNil = new HeytingAlgebraRecord(function (v) { + return function (v1) { + return function (v2) { + return {}; + }; + }; +}, function (v) { + return function (v1) { + return function (v2) { + return {}; + }; + }; +}, function (v) { + return function (v1) { + return {}; + }; +}, function (v) { + return function (v1) { + return function (v2) { + return {}; + }; + }; +}, function (v) { + return function (v1) { + return {}; + }; +}, function (v) { + return function (v1) { + return {}; + }; +}); + +var ffRecord = function ffRecord(dict) { + return dict.ffRecord; +}; + +var ff = function ff(dict) { + return dict.ff; +}; + +var disjRecord = function disjRecord(dict) { + return dict.disjRecord; +}; + +var disj = function disj(dict) { + return dict.disj; +}; + +var heytingAlgebraBoolean = new HeytingAlgebra($foreign.boolConj, $foreign.boolDisj, false, function (a) { + return function (b) { + return disj(heytingAlgebraBoolean)(not(heytingAlgebraBoolean)(a))(b); + }; +}, $foreign.boolNot, true); + +var conjRecord = function conjRecord(dict) { + return dict.conjRecord; +}; + +var heytingAlgebraRecord = function heytingAlgebraRecord(dictRowToList) { + return function (dictHeytingAlgebraRecord) { + return new HeytingAlgebra(conjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value), disjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value), ffRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value), impliesRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value), notRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value), ttRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value)); + }; +}; + +var conj = function conj(dict) { + return dict.conj; +}; + +var heytingAlgebraFunction = function heytingAlgebraFunction(dictHeytingAlgebra) { + return new HeytingAlgebra(function (f) { + return function (g) { + return function (a) { + return conj(dictHeytingAlgebra)(f(a))(g(a)); + }; + }; + }, function (f) { + return function (g) { + return function (a) { + return disj(dictHeytingAlgebra)(f(a))(g(a)); + }; + }; + }, function (v) { + return ff(dictHeytingAlgebra); + }, function (f) { + return function (g) { + return function (a) { + return implies(dictHeytingAlgebra)(f(a))(g(a)); + }; + }; + }, function (f) { + return function (a) { + return not(dictHeytingAlgebra)(f(a)); + }; + }, function (v) { + return tt(dictHeytingAlgebra); + }); +}; + +var heytingAlgebraRecordCons = function heytingAlgebraRecordCons(dictIsSymbol) { + return function (dictCons) { + return function (dictHeytingAlgebraRecord) { + return function (dictHeytingAlgebra) { + return new HeytingAlgebraRecord(function (v) { + return function (ra) { + return function (rb) { + var tail = conjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + var get = Record_Unsafe.unsafeGet(key); + return insert(conj(dictHeytingAlgebra)(get(ra))(get(rb)))(tail); + }; + }; + }, function (v) { + return function (ra) { + return function (rb) { + var tail = disjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + var get = Record_Unsafe.unsafeGet(key); + return insert(disj(dictHeytingAlgebra)(get(ra))(get(rb)))(tail); + }; + }; + }, function (v) { + return function (row) { + var tail = ffRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(row); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + return insert(ff(dictHeytingAlgebra))(tail); + }; + }, function (v) { + return function (ra) { + return function (rb) { + var tail = impliesRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + var get = Record_Unsafe.unsafeGet(key); + return insert(implies(dictHeytingAlgebra)(get(ra))(get(rb)))(tail); + }; + }; + }, function (v) { + return function (row) { + var tail = notRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(row); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + var get = Record_Unsafe.unsafeGet(key); + return insert(not(dictHeytingAlgebra)(get(row)))(tail); + }; + }, function (v) { + return function (row) { + var tail = ttRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(row); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + return insert(tt(dictHeytingAlgebra))(tail); + }; + }); + }; + }; + }; +}; + +module.exports = { + HeytingAlgebra: HeytingAlgebra, + tt: tt, + ff: ff, + implies: implies, + conj: conj, + disj: disj, + not: not, + HeytingAlgebraRecord: HeytingAlgebraRecord, + ffRecord: ffRecord, + ttRecord: ttRecord, + impliesRecord: impliesRecord, + conjRecord: conjRecord, + disjRecord: disjRecord, + notRecord: notRecord, + heytingAlgebraBoolean: heytingAlgebraBoolean, + heytingAlgebraUnit: heytingAlgebraUnit, + heytingAlgebraFunction: heytingAlgebraFunction, + heytingAlgebraRecord: heytingAlgebraRecord, + heytingAlgebraRecordNil: heytingAlgebraRecordNil, + heytingAlgebraRecordCons: heytingAlgebraRecordCons +}; +},{"./foreign.js":"7fWM","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Record.Unsafe/index.js":"KG04","../Type.Data.Row/index.js":"ukdD","../Type.Data.RowList/index.js":"XaXP"}],"lD5R":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var MonadZero = function MonadZero(Alternative1, Monad0) { + this.Alternative1 = Alternative1; + this.Monad0 = Monad0; +}; + +var monadZeroArray = new MonadZero(function () { + return Control_Alternative.alternativeArray; +}, function () { + return Control_Monad.monadArray; +}); + +var guard = function guard(dictMonadZero) { + return function (v) { + if (v) { + return Control_Applicative.pure(dictMonadZero.Alternative1().Applicative0())(Data_Unit.unit); + } + + ; + + if (!v) { + return Control_Plus.empty(dictMonadZero.Alternative1().Plus1()); + } + + ; + throw new Error("Failed pattern match at Control.MonadZero (line 54, column 1 - line 54, column 52): " + [v.constructor.name]); + }; +}; + +module.exports = { + MonadZero: MonadZero, + guard: guard, + monadZeroArray: monadZeroArray +}; +},{"../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Monad/index.js":"U/Ix","../Control.Plus/index.js":"oMBg","../Data.Unit/index.js":"NhVk"}],"0C+G":[function(require,module,exports) { +"use strict"; + +exports.topInt = 2147483647; +exports.bottomInt = -2147483648; +exports.topChar = String.fromCharCode(65535); +exports.bottomChar = String.fromCharCode(0); +exports.topNumber = Number.POSITIVE_INFINITY; +exports.bottomNumber = Number.NEGATIVE_INFINITY; +},{}],"m7Aq":[function(require,module,exports) { +"use strict"; + +var unsafeCompareImpl = function unsafeCompareImpl(lt) { + return function (eq) { + return function (gt) { + return function (x) { + return function (y) { + return x < y ? lt : x === y ? eq : gt; + }; + }; + }; + }; +}; + +exports.ordBooleanImpl = unsafeCompareImpl; +exports.ordIntImpl = unsafeCompareImpl; +exports.ordNumberImpl = unsafeCompareImpl; +exports.ordStringImpl = unsafeCompareImpl; +exports.ordCharImpl = unsafeCompareImpl; + +exports.ordArrayImpl = function (f) { + return function (xs) { + return function (ys) { + var i = 0; + var xlen = xs.length; + var ylen = ys.length; + + while (i < xlen && i < ylen) { + var x = xs[i]; + var y = ys[i]; + var o = f(x)(y); + + if (o !== 0) { + return o; + } + + i++; + } + + if (xlen === ylen) { + return 0; + } else if (xlen > ylen) { + return -1; + } else { + return 1; + } + }; + }; +}; +},{}],"5Eun":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var LT = function () { + function LT() {} + + ; + LT.value = new LT(); + return LT; +}(); + +var GT = function () { + function GT() {} + + ; + GT.value = new GT(); + return GT; +}(); + +var EQ = function () { + function EQ() {} + + ; + EQ.value = new EQ(); + return EQ; +}(); + +var showOrdering = new Data_Show.Show(function (v) { + if (v instanceof LT) { + return "LT"; + } + + ; + + if (v instanceof GT) { + return "GT"; + } + + ; + + if (v instanceof EQ) { + return "EQ"; + } + + ; + throw new Error("Failed pattern match at Data.Ordering (line 26, column 1 - line 29, column 17): " + [v.constructor.name]); +}); +var semigroupOrdering = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + if (v instanceof LT) { + return LT.value; + } + + ; + + if (v instanceof GT) { + return GT.value; + } + + ; + + if (v instanceof EQ) { + return v1; + } + + ; + throw new Error("Failed pattern match at Data.Ordering (line 21, column 1 - line 24, column 18): " + [v.constructor.name, v1.constructor.name]); + }; +}); + +var invert = function invert(v) { + if (v instanceof GT) { + return LT.value; + } + + ; + + if (v instanceof EQ) { + return EQ.value; + } + + ; + + if (v instanceof LT) { + return GT.value; + } + + ; + throw new Error("Failed pattern match at Data.Ordering (line 33, column 1 - line 33, column 31): " + [v.constructor.name]); +}; + +var eqOrdering = new Data_Eq.Eq(function (v) { + return function (v1) { + if (v instanceof LT && v1 instanceof LT) { + return true; + } + + ; + + if (v instanceof GT && v1 instanceof GT) { + return true; + } + + ; + + if (v instanceof EQ && v1 instanceof EQ) { + return true; + } + + ; + return false; + }; +}); +module.exports = { + LT: LT, + GT: GT, + EQ: EQ, + invert: invert, + eqOrdering: eqOrdering, + semigroupOrdering: semigroupOrdering, + showOrdering: showOrdering +}; +},{"../Data.Eq/index.js":"Pq4F","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"+BUG":[function(require,module,exports) { +"use strict"; + +exports.intSub = function (x) { + return function (y) { + /* jshint bitwise: false */ + return x - y | 0; + }; +}; + +exports.numSub = function (n1) { + return function (n2) { + return n1 - n2; + }; +}; +},{}],"Vm8y":[function(require,module,exports) { +"use strict"; + +exports.intAdd = function (x) { + return function (y) { + /* jshint bitwise: false */ + return x + y | 0; + }; +}; + +exports.intMul = function (x) { + return function (y) { + /* jshint bitwise: false */ + return x * y | 0; + }; +}; + +exports.numAdd = function (n1) { + return function (n2) { + return n1 + n2; + }; +}; + +exports.numMul = function (n1) { + return function (n2) { + return n1 * n2; + }; +}; +},{}],"11NF":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Record_Unsafe = require("../Record.Unsafe/index.js"); + +var Type_Data_Row = require("../Type.Data.Row/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var SemiringRecord = function SemiringRecord(addRecord, mulRecord, oneRecord, zeroRecord) { + this.addRecord = addRecord; + this.mulRecord = mulRecord; + this.oneRecord = oneRecord; + this.zeroRecord = zeroRecord; +}; + +var Semiring = function Semiring(add, mul, one, zero) { + this.add = add; + this.mul = mul; + this.one = one; + this.zero = zero; +}; + +var zeroRecord = function zeroRecord(dict) { + return dict.zeroRecord; +}; + +var zero = function zero(dict) { + return dict.zero; +}; + +var semiringUnit = new Semiring(function (v) { + return function (v1) { + return Data_Unit.unit; + }; +}, function (v) { + return function (v1) { + return Data_Unit.unit; + }; +}, Data_Unit.unit, Data_Unit.unit); +var semiringRecordNil = new SemiringRecord(function (v) { + return function (v1) { + return function (v2) { + return {}; + }; + }; +}, function (v) { + return function (v1) { + return function (v2) { + return {}; + }; + }; +}, function (v) { + return function (v1) { + return {}; + }; +}, function (v) { + return function (v1) { + return {}; + }; +}); +var semiringNumber = new Semiring($foreign.numAdd, $foreign.numMul, 1.0, 0.0); +var semiringInt = new Semiring($foreign.intAdd, $foreign.intMul, 1, 0); + +var oneRecord = function oneRecord(dict) { + return dict.oneRecord; +}; + +var one = function one(dict) { + return dict.one; +}; + +var mulRecord = function mulRecord(dict) { + return dict.mulRecord; +}; + +var mul = function mul(dict) { + return dict.mul; +}; + +var addRecord = function addRecord(dict) { + return dict.addRecord; +}; + +var semiringRecord = function semiringRecord(dictRowToList) { + return function (dictSemiringRecord) { + return new Semiring(addRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value), mulRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value), oneRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value), zeroRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value)); + }; +}; + +var add = function add(dict) { + return dict.add; +}; + +var semiringFn = function semiringFn(dictSemiring) { + return new Semiring(function (f) { + return function (g) { + return function (x) { + return add(dictSemiring)(f(x))(g(x)); + }; + }; + }, function (f) { + return function (g) { + return function (x) { + return mul(dictSemiring)(f(x))(g(x)); + }; + }; + }, function (v) { + return one(dictSemiring); + }, function (v) { + return zero(dictSemiring); + }); +}; + +var semiringRecordCons = function semiringRecordCons(dictIsSymbol) { + return function (dictCons) { + return function (dictSemiringRecord) { + return function (dictSemiring) { + return new SemiringRecord(function (v) { + return function (ra) { + return function (rb) { + var tail = addRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + var get = Record_Unsafe.unsafeGet(key); + return insert(add(dictSemiring)(get(ra))(get(rb)))(tail); + }; + }; + }, function (v) { + return function (ra) { + return function (rb) { + var tail = mulRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + var get = Record_Unsafe.unsafeGet(key); + return insert(mul(dictSemiring)(get(ra))(get(rb)))(tail); + }; + }; + }, function (v) { + return function (v1) { + var tail = oneRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + return insert(one(dictSemiring))(tail); + }; + }, function (v) { + return function (v1) { + var tail = zeroRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + return insert(zero(dictSemiring))(tail); + }; + }); + }; + }; + }; +}; + +module.exports = { + Semiring: Semiring, + add: add, + zero: zero, + mul: mul, + one: one, + SemiringRecord: SemiringRecord, + addRecord: addRecord, + mulRecord: mulRecord, + oneRecord: oneRecord, + zeroRecord: zeroRecord, + semiringInt: semiringInt, + semiringNumber: semiringNumber, + semiringFn: semiringFn, + semiringUnit: semiringUnit, + semiringRecord: semiringRecord, + semiringRecordNil: semiringRecordNil, + semiringRecordCons: semiringRecordCons +}; +},{"./foreign.js":"Vm8y","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Record.Unsafe/index.js":"KG04","../Type.Data.Row/index.js":"ukdD","../Type.Data.RowList/index.js":"XaXP"}],"E2qH":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Record_Unsafe = require("../Record.Unsafe/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var RingRecord = function RingRecord(SemiringRecord0, subRecord) { + this.SemiringRecord0 = SemiringRecord0; + this.subRecord = subRecord; +}; + +var Ring = function Ring(Semiring0, sub) { + this.Semiring0 = Semiring0; + this.sub = sub; +}; + +var subRecord = function subRecord(dict) { + return dict.subRecord; +}; + +var sub = function sub(dict) { + return dict.sub; +}; + +var ringUnit = new Ring(function () { + return Data_Semiring.semiringUnit; +}, function (v) { + return function (v1) { + return Data_Unit.unit; + }; +}); +var ringRecordNil = new RingRecord(function () { + return Data_Semiring.semiringRecordNil; +}, function (v) { + return function (v1) { + return function (v2) { + return {}; + }; + }; +}); + +var ringRecordCons = function ringRecordCons(dictIsSymbol) { + return function (dictCons) { + return function (dictRingRecord) { + return function (dictRing) { + return new RingRecord(function () { + return Data_Semiring.semiringRecordCons(dictIsSymbol)(dictCons)(dictRingRecord.SemiringRecord0())(dictRing.Semiring0()); + }, function (v) { + return function (ra) { + return function (rb) { + var tail = subRecord(dictRingRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + var get = Record_Unsafe.unsafeGet(key); + return insert(sub(dictRing)(get(ra))(get(rb)))(tail); + }; + }; + }); + }; + }; + }; +}; + +var ringRecord = function ringRecord(dictRowToList) { + return function (dictRingRecord) { + return new Ring(function () { + return Data_Semiring.semiringRecord(dictRowToList)(dictRingRecord.SemiringRecord0()); + }, subRecord(dictRingRecord)(Type_Data_RowList.RLProxy.value)); + }; +}; + +var ringNumber = new Ring(function () { + return Data_Semiring.semiringNumber; +}, $foreign.numSub); +var ringInt = new Ring(function () { + return Data_Semiring.semiringInt; +}, $foreign.intSub); + +var ringFn = function ringFn(dictRing) { + return new Ring(function () { + return Data_Semiring.semiringFn(dictRing.Semiring0()); + }, function (f) { + return function (g) { + return function (x) { + return sub(dictRing)(f(x))(g(x)); + }; + }; + }); +}; + +var negate = function negate(dictRing) { + return function (a) { + return sub(dictRing)(Data_Semiring.zero(dictRing.Semiring0()))(a); + }; +}; + +module.exports = { + Ring: Ring, + sub: sub, + negate: negate, + RingRecord: RingRecord, + subRecord: subRecord, + ringInt: ringInt, + ringNumber: ringNumber, + ringUnit: ringUnit, + ringFn: ringFn, + ringRecord: ringRecord, + ringRecordNil: ringRecordNil, + ringRecordCons: ringRecordCons +}; +},{"./foreign.js":"+BUG","../Data.Semiring/index.js":"11NF","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Record.Unsafe/index.js":"KG04","../Type.Data.RowList/index.js":"XaXP"}],"r4Vb":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Record_Unsafe = require("../Record.Unsafe/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var OrdRecord = function OrdRecord(EqRecord0, compareRecord) { + this.EqRecord0 = EqRecord0; + this.compareRecord = compareRecord; +}; + +var Ord1 = function Ord1(Eq10, compare1) { + this.Eq10 = Eq10; + this.compare1 = compare1; +}; + +var Ord = function Ord(Eq0, compare) { + this.Eq0 = Eq0; + this.compare = compare; +}; + +var ordVoid = new Ord(function () { + return Data_Eq.eqVoid; +}, function (v) { + return function (v1) { + return Data_Ordering.EQ.value; + }; +}); +var ordUnit = new Ord(function () { + return Data_Eq.eqUnit; +}, function (v) { + return function (v1) { + return Data_Ordering.EQ.value; + }; +}); +var ordString = new Ord(function () { + return Data_Eq.eqString; +}, $foreign.ordStringImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value)); +var ordRecordNil = new OrdRecord(function () { + return Data_Eq.eqRowNil; +}, function (v) { + return function (v1) { + return function (v2) { + return Data_Ordering.EQ.value; + }; + }; +}); +var ordOrdering = new Ord(function () { + return Data_Ordering.eqOrdering; +}, function (v) { + return function (v1) { + if (v instanceof Data_Ordering.LT && v1 instanceof Data_Ordering.LT) { + return Data_Ordering.EQ.value; + } + + ; + + if (v instanceof Data_Ordering.EQ && v1 instanceof Data_Ordering.EQ) { + return Data_Ordering.EQ.value; + } + + ; + + if (v instanceof Data_Ordering.GT && v1 instanceof Data_Ordering.GT) { + return Data_Ordering.EQ.value; + } + + ; + + if (v instanceof Data_Ordering.LT) { + return Data_Ordering.LT.value; + } + + ; + + if (v instanceof Data_Ordering.EQ && v1 instanceof Data_Ordering.LT) { + return Data_Ordering.GT.value; + } + + ; + + if (v instanceof Data_Ordering.EQ && v1 instanceof Data_Ordering.GT) { + return Data_Ordering.LT.value; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Data_Ordering.GT.value; + } + + ; + throw new Error("Failed pattern match at Data.Ord (line 112, column 1 - line 119, column 21): " + [v.constructor.name, v1.constructor.name]); + }; +}); +var ordNumber = new Ord(function () { + return Data_Eq.eqNumber; +}, $foreign.ordNumberImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value)); +var ordInt = new Ord(function () { + return Data_Eq.eqInt; +}, $foreign.ordIntImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value)); +var ordChar = new Ord(function () { + return Data_Eq.eqChar; +}, $foreign.ordCharImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value)); +var ordBoolean = new Ord(function () { + return Data_Eq.eqBoolean; +}, $foreign.ordBooleanImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value)); + +var compareRecord = function compareRecord(dict) { + return dict.compareRecord; +}; + +var ordRecord = function ordRecord(dictRowToList) { + return function (dictOrdRecord) { + return new Ord(function () { + return Data_Eq.eqRec(dictRowToList)(dictOrdRecord.EqRecord0()); + }, compareRecord(dictOrdRecord)(Type_Data_RowList.RLProxy.value)); + }; +}; + +var compare1 = function compare1(dict) { + return dict.compare1; +}; + +var compare = function compare(dict) { + return dict.compare; +}; + +var comparing = function comparing(dictOrd) { + return function (f) { + return function (x) { + return function (y) { + return compare(dictOrd)(f(x))(f(y)); + }; + }; + }; +}; + +var greaterThan = function greaterThan(dictOrd) { + return function (a1) { + return function (a2) { + var v = compare(dictOrd)(a1)(a2); + + if (v instanceof Data_Ordering.GT) { + return true; + } + + ; + return false; + }; + }; +}; + +var greaterThanOrEq = function greaterThanOrEq(dictOrd) { + return function (a1) { + return function (a2) { + var v = compare(dictOrd)(a1)(a2); + + if (v instanceof Data_Ordering.LT) { + return false; + } + + ; + return true; + }; + }; +}; + +var signum = function signum(dictOrd) { + return function (dictRing) { + return function (x) { + var $43 = greaterThanOrEq(dictOrd)(x)(Data_Semiring.zero(dictRing.Semiring0())); + + if ($43) { + return Data_Semiring.one(dictRing.Semiring0()); + } + + ; + return Data_Ring.negate(dictRing)(Data_Semiring.one(dictRing.Semiring0())); + }; + }; +}; + +var lessThan = function lessThan(dictOrd) { + return function (a1) { + return function (a2) { + var v = compare(dictOrd)(a1)(a2); + + if (v instanceof Data_Ordering.LT) { + return true; + } + + ; + return false; + }; + }; +}; + +var lessThanOrEq = function lessThanOrEq(dictOrd) { + return function (a1) { + return function (a2) { + var v = compare(dictOrd)(a1)(a2); + + if (v instanceof Data_Ordering.GT) { + return false; + } + + ; + return true; + }; + }; +}; + +var max = function max(dictOrd) { + return function (x) { + return function (y) { + var v = compare(dictOrd)(x)(y); + + if (v instanceof Data_Ordering.LT) { + return y; + } + + ; + + if (v instanceof Data_Ordering.EQ) { + return x; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return x; + } + + ; + throw new Error("Failed pattern match at Data.Ord (line 167, column 3 - line 170, column 12): " + [v.constructor.name]); + }; + }; +}; + +var min = function min(dictOrd) { + return function (x) { + return function (y) { + var v = compare(dictOrd)(x)(y); + + if (v instanceof Data_Ordering.LT) { + return x; + } + + ; + + if (v instanceof Data_Ordering.EQ) { + return x; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return y; + } + + ; + throw new Error("Failed pattern match at Data.Ord (line 158, column 3 - line 161, column 12): " + [v.constructor.name]); + }; + }; +}; + +var ordArray = function ordArray(dictOrd) { + return new Ord(function () { + return Data_Eq.eqArray(dictOrd.Eq0()); + }, function () { + var toDelta = function toDelta(x) { + return function (y) { + var v = compare(dictOrd)(x)(y); + + if (v instanceof Data_Ordering.EQ) { + return 0; + } + + ; + + if (v instanceof Data_Ordering.LT) { + return 1; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return -1 | 0; + } + + ; + throw new Error("Failed pattern match at Data.Ord (line 65, column 7 - line 68, column 17): " + [v.constructor.name]); + }; + }; + + return function (xs) { + return function (ys) { + return compare(ordInt)(0)($foreign.ordArrayImpl(toDelta)(xs)(ys)); + }; + }; + }()); +}; + +var ord1Array = new Ord1(function () { + return Data_Eq.eq1Array; +}, function (dictOrd) { + return compare(ordArray(dictOrd)); +}); + +var ordRecordCons = function ordRecordCons(dictOrdRecord) { + return function (dictCons) { + return function (dictIsSymbol) { + return function (dictOrd) { + return new OrdRecord(function () { + return Data_Eq.eqRowCons(dictOrdRecord.EqRecord0())(dictCons)(dictIsSymbol)(dictOrd.Eq0()); + }, function (v) { + return function (ra) { + return function (rb) { + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var left = compare(dictOrd)(Record_Unsafe.unsafeGet(key)(ra))(Record_Unsafe.unsafeGet(key)(rb)); + var $49 = Data_Eq.notEq(Data_Ordering.eqOrdering)(left)(Data_Ordering.EQ.value); + + if ($49) { + return left; + } + + ; + return compareRecord(dictOrdRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb); + }; + }; + }); + }; + }; + }; +}; + +var clamp = function clamp(dictOrd) { + return function (low) { + return function (hi) { + return function (x) { + return min(dictOrd)(hi)(max(dictOrd)(low)(x)); + }; + }; + }; +}; + +var between = function between(dictOrd) { + return function (low) { + return function (hi) { + return function (x) { + if (lessThan(dictOrd)(x)(low)) { + return false; + } + + ; + + if (greaterThan(dictOrd)(x)(hi)) { + return false; + } + + ; + return true; + }; + }; + }; +}; + +var abs = function abs(dictOrd) { + return function (dictRing) { + return function (x) { + var $53 = greaterThanOrEq(dictOrd)(x)(Data_Semiring.zero(dictRing.Semiring0())); + + if ($53) { + return x; + } + + ; + return Data_Ring.negate(dictRing)(x); + }; + }; +}; + +module.exports = { + Ord: Ord, + compare: compare, + Ord1: Ord1, + compare1: compare1, + lessThan: lessThan, + lessThanOrEq: lessThanOrEq, + greaterThan: greaterThan, + greaterThanOrEq: greaterThanOrEq, + comparing: comparing, + min: min, + max: max, + clamp: clamp, + between: between, + abs: abs, + signum: signum, + OrdRecord: OrdRecord, + compareRecord: compareRecord, + ordBoolean: ordBoolean, + ordInt: ordInt, + ordNumber: ordNumber, + ordString: ordString, + ordChar: ordChar, + ordUnit: ordUnit, + ordVoid: ordVoid, + ordArray: ordArray, + ordOrdering: ordOrdering, + ord1Array: ord1Array, + ordRecordNil: ordRecordNil, + ordRecordCons: ordRecordCons, + ordRecord: ordRecord +}; +},{"./foreign.js":"m7Aq","../Data.Eq/index.js":"Pq4F","../Data.Ordering/index.js":"5Eun","../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF","../Data.Symbol/index.js":"4oJQ","../Record.Unsafe/index.js":"KG04","../Type.Data.RowList/index.js":"XaXP"}],"kcUU":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Bounded = function Bounded(Ord0, bottom, top) { + this.Ord0 = Ord0; + this.bottom = bottom; + this.top = top; +}; + +var top = function top(dict) { + return dict.top; +}; + +var boundedUnit = new Bounded(function () { + return Data_Ord.ordUnit; +}, Data_Unit.unit, Data_Unit.unit); +var boundedOrdering = new Bounded(function () { + return Data_Ord.ordOrdering; +}, Data_Ordering.LT.value, Data_Ordering.GT.value); +var boundedNumber = new Bounded(function () { + return Data_Ord.ordNumber; +}, $foreign.bottomNumber, $foreign.topNumber); +var boundedInt = new Bounded(function () { + return Data_Ord.ordInt; +}, $foreign.bottomInt, $foreign.topInt); +var boundedChar = new Bounded(function () { + return Data_Ord.ordChar; +}, $foreign.bottomChar, $foreign.topChar); +var boundedBoolean = new Bounded(function () { + return Data_Ord.ordBoolean; +}, false, true); + +var bottom = function bottom(dict) { + return dict.bottom; +}; + +module.exports = { + Bounded: Bounded, + bottom: bottom, + top: top, + boundedBoolean: boundedBoolean, + boundedInt: boundedInt, + boundedChar: boundedChar, + boundedOrdering: boundedOrdering, + boundedUnit: boundedUnit, + boundedNumber: boundedNumber +}; +},{"./foreign.js":"0C+G","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Unit/index.js":"NhVk"}],"AXkC":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Functor = require("../Data.Functor/index.js"); + +var Invariant = function Invariant(imap) { + this.imap = imap; +}; + +var invariantMultiplicative = new Invariant(function (f) { + return function (v) { + return function (v1) { + return f(v1); + }; + }; +}); +var invariantEndo = new Invariant(function (ab) { + return function (ba) { + return function (v) { + return function ($31) { + return ab(v(ba($31))); + }; + }; + }; +}); +var invariantDual = new Invariant(function (f) { + return function (v) { + return function (v1) { + return f(v1); + }; + }; +}); +var invariantDisj = new Invariant(function (f) { + return function (v) { + return function (v1) { + return f(v1); + }; + }; +}); +var invariantConj = new Invariant(function (f) { + return function (v) { + return function (v1) { + return f(v1); + }; + }; +}); +var invariantAdditive = new Invariant(function (f) { + return function (v) { + return function (v1) { + return f(v1); + }; + }; +}); + +var imapF = function imapF(dictFunctor) { + return function (f) { + return function (v) { + return Data_Functor.map(dictFunctor)(f); + }; + }; +}; + +var invariantArray = new Invariant(imapF(Data_Functor.functorArray)); +var invariantFn = new Invariant(imapF(Data_Functor.functorFn)); + +var imap = function imap(dict) { + return dict.imap; +}; + +module.exports = { + imap: imap, + Invariant: Invariant, + imapF: imapF, + invariantFn: invariantFn, + invariantArray: invariantArray, + invariantAdditive: invariantAdditive, + invariantConj: invariantConj, + invariantDisj: invariantDisj, + invariantDual: invariantDual, + invariantEndo: invariantEndo, + invariantMultiplicative: invariantMultiplicative +}; +},{"../Data.Functor/index.js":"+0AE"}],"8EBw":[function(require,module,exports) { +"use strict"; + +exports.intDegree = function (x) { + return Math.min(Math.abs(x), 2147483647); +}; // See the Euclidean definition in +// https://en.m.wikipedia.org/wiki/Modulo_operation. + + +exports.intDiv = function (x) { + return function (y) { + if (y === 0) return 0; + return y > 0 ? Math.floor(x / y) : -Math.floor(x / -y); + }; +}; + +exports.intMod = function (x) { + return function (y) { + if (y === 0) return 0; + var yy = Math.abs(y); + return (x % yy + yy) % yy; + }; +}; + +exports.numDiv = function (n1) { + return function (n2) { + return n1 / n2; + }; +}; +},{}],"60TQ":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Ring = require("../Data.Ring/index.js"); + +var CommutativeRingRecord = function CommutativeRingRecord(RingRecord0) { + this.RingRecord0 = RingRecord0; +}; + +var CommutativeRing = function CommutativeRing(Ring0) { + this.Ring0 = Ring0; +}; + +var commutativeRingUnit = new CommutativeRing(function () { + return Data_Ring.ringUnit; +}); +var commutativeRingRecordNil = new CommutativeRingRecord(function () { + return Data_Ring.ringRecordNil; +}); + +var commutativeRingRecordCons = function commutativeRingRecordCons(dictIsSymbol) { + return function (dictCons) { + return function (dictCommutativeRingRecord) { + return function (dictCommutativeRing) { + return new CommutativeRingRecord(function () { + return Data_Ring.ringRecordCons(dictIsSymbol)(dictCons)(dictCommutativeRingRecord.RingRecord0())(dictCommutativeRing.Ring0()); + }); + }; + }; + }; +}; + +var commutativeRingRecord = function commutativeRingRecord(dictRowToList) { + return function (dictCommutativeRingRecord) { + return new CommutativeRing(function () { + return Data_Ring.ringRecord(dictRowToList)(dictCommutativeRingRecord.RingRecord0()); + }); + }; +}; + +var commutativeRingNumber = new CommutativeRing(function () { + return Data_Ring.ringNumber; +}); +var commutativeRingInt = new CommutativeRing(function () { + return Data_Ring.ringInt; +}); + +var commutativeRingFn = function commutativeRingFn(dictCommutativeRing) { + return new CommutativeRing(function () { + return Data_Ring.ringFn(dictCommutativeRing.Ring0()); + }); +}; + +module.exports = { + CommutativeRing: CommutativeRing, + CommutativeRingRecord: CommutativeRingRecord, + commutativeRingInt: commutativeRingInt, + commutativeRingNumber: commutativeRingNumber, + commutativeRingUnit: commutativeRingUnit, + commutativeRingFn: commutativeRingFn, + commutativeRingRecord: commutativeRingRecord, + commutativeRingRecordNil: commutativeRingRecordNil, + commutativeRingRecordCons: commutativeRingRecordCons +}; +},{"../Data.Ring/index.js":"E2qH"}],"2IRB":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_CommutativeRing = require("../Data.CommutativeRing/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var EuclideanRing = function EuclideanRing(CommutativeRing0, degree, div, mod) { + this.CommutativeRing0 = CommutativeRing0; + this.degree = degree; + this.div = div; + this.mod = mod; +}; + +var mod = function mod(dict) { + return dict.mod; +}; + +var gcd = function gcd($copy_dictEq) { + return function ($copy_dictEuclideanRing) { + return function ($copy_a) { + return function ($copy_b) { + var $tco_var_dictEq = $copy_dictEq; + var $tco_var_dictEuclideanRing = $copy_dictEuclideanRing; + var $tco_var_a = $copy_a; + var $tco_done = false; + var $tco_result; + + function $tco_loop(dictEq, dictEuclideanRing, a, b) { + var $7 = Data_Eq.eq(dictEq)(b)(Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0())); + + if ($7) { + $tco_done = true; + return a; + } + + ; + $tco_var_dictEq = dictEq; + $tco_var_dictEuclideanRing = dictEuclideanRing; + $tco_var_a = b; + $copy_b = mod(dictEuclideanRing)(a)(b); + return; + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_dictEq, $tco_var_dictEuclideanRing, $tco_var_a, $copy_b); + } + + ; + return $tco_result; + }; + }; + }; +}; + +var euclideanRingNumber = new EuclideanRing(function () { + return Data_CommutativeRing.commutativeRingNumber; +}, function (v) { + return 1; +}, $foreign.numDiv, function (v) { + return function (v1) { + return 0.0; + }; +}); +var euclideanRingInt = new EuclideanRing(function () { + return Data_CommutativeRing.commutativeRingInt; +}, $foreign.intDegree, $foreign.intDiv, $foreign.intMod); + +var div = function div(dict) { + return dict.div; +}; + +var lcm = function lcm(dictEq) { + return function (dictEuclideanRing) { + return function (a) { + return function (b) { + var $8 = Data_Eq.eq(dictEq)(a)(Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0())) || Data_Eq.eq(dictEq)(b)(Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0())); + + if ($8) { + return Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0()); + } + + ; + return div(dictEuclideanRing)(Data_Semiring.mul(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0())(a)(b))(gcd(dictEq)(dictEuclideanRing)(a)(b)); + }; + }; + }; +}; + +var degree = function degree(dict) { + return dict.degree; +}; + +module.exports = { + EuclideanRing: EuclideanRing, + degree: degree, + div: div, + mod: mod, + gcd: gcd, + lcm: lcm, + euclideanRingInt: euclideanRingInt, + euclideanRingNumber: euclideanRingNumber +}; +},{"./foreign.js":"8EBw","../Data.CommutativeRing/index.js":"60TQ","../Data.Eq/index.js":"Pq4F","../Data.Semiring/index.js":"11NF"}],"TiEB":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_EuclideanRing = require("../Data.EuclideanRing/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Record_Unsafe = require("../Record.Unsafe/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var MonoidRecord = function MonoidRecord(SemigroupRecord0, memptyRecord) { + this.SemigroupRecord0 = SemigroupRecord0; + this.memptyRecord = memptyRecord; +}; + +var Monoid = function Monoid(Semigroup0, mempty) { + this.Semigroup0 = Semigroup0; + this.mempty = mempty; +}; + +var monoidUnit = new Monoid(function () { + return Data_Semigroup.semigroupUnit; +}, Data_Unit.unit); +var monoidString = new Monoid(function () { + return Data_Semigroup.semigroupString; +}, ""); +var monoidRecordNil = new MonoidRecord(function () { + return Data_Semigroup.semigroupRecordNil; +}, function (v) { + return {}; +}); +var monoidOrdering = new Monoid(function () { + return Data_Ordering.semigroupOrdering; +}, Data_Ordering.EQ.value); +var monoidArray = new Monoid(function () { + return Data_Semigroup.semigroupArray; +}, []); + +var memptyRecord = function memptyRecord(dict) { + return dict.memptyRecord; +}; + +var monoidRecord = function monoidRecord(dictRowToList) { + return function (dictMonoidRecord) { + return new Monoid(function () { + return Data_Semigroup.semigroupRecord(dictRowToList)(dictMonoidRecord.SemigroupRecord0()); + }, memptyRecord(dictMonoidRecord)(Type_Data_RowList.RLProxy.value)); + }; +}; + +var mempty = function mempty(dict) { + return dict.mempty; +}; + +var monoidFn = function monoidFn(dictMonoid) { + return new Monoid(function () { + return Data_Semigroup.semigroupFn(dictMonoid.Semigroup0()); + }, function (v) { + return mempty(dictMonoid); + }); +}; + +var monoidRecordCons = function monoidRecordCons(dictIsSymbol) { + return function (dictMonoid) { + return function (dictCons) { + return function (dictMonoidRecord) { + return new MonoidRecord(function () { + return Data_Semigroup.semigroupRecordCons(dictIsSymbol)(dictCons)(dictMonoidRecord.SemigroupRecord0())(dictMonoid.Semigroup0()); + }, function (v) { + var tail = memptyRecord(dictMonoidRecord)(Type_Data_RowList.RLProxy.value); + var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var insert = Record_Unsafe.unsafeSet(key); + return insert(mempty(dictMonoid))(tail); + }); + }; + }; + }; +}; + +var power = function power(dictMonoid) { + return function (x) { + var go = function go(p) { + if (p <= 0) { + return mempty(dictMonoid); + } + + ; + + if (p === 1) { + return x; + } + + ; + + if (Data_EuclideanRing.mod(Data_EuclideanRing.euclideanRingInt)(p)(2) === 0) { + var x$prime = go(Data_EuclideanRing.div(Data_EuclideanRing.euclideanRingInt)(p)(2)); + return Data_Semigroup.append(dictMonoid.Semigroup0())(x$prime)(x$prime); + } + + ; + + if (Data_Boolean.otherwise) { + var x$prime = go(Data_EuclideanRing.div(Data_EuclideanRing.euclideanRingInt)(p)(2)); + return Data_Semigroup.append(dictMonoid.Semigroup0())(x$prime)(Data_Semigroup.append(dictMonoid.Semigroup0())(x$prime)(x)); + } + + ; + throw new Error("Failed pattern match at Data.Monoid (line 65, column 3 - line 65, column 17): " + [p.constructor.name]); + }; + + return go; + }; +}; + +var guard = function guard(dictMonoid) { + return function (v) { + return function (v1) { + if (v) { + return v1; + } + + ; + + if (!v) { + return mempty(dictMonoid); + } + + ; + throw new Error("Failed pattern match at Data.Monoid (line 73, column 1 - line 73, column 49): " + [v.constructor.name, v1.constructor.name]); + }; + }; +}; + +module.exports = { + Monoid: Monoid, + mempty: mempty, + power: power, + guard: guard, + MonoidRecord: MonoidRecord, + memptyRecord: memptyRecord, + monoidUnit: monoidUnit, + monoidOrdering: monoidOrdering, + monoidFn: monoidFn, + monoidString: monoidString, + monoidArray: monoidArray, + monoidRecord: monoidRecord, + monoidRecordNil: monoidRecordNil, + monoidRecordCons: monoidRecordCons +}; +},{"../Data.Boolean/index.js":"ObQr","../Data.EuclideanRing/index.js":"2IRB","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Record.Unsafe/index.js":"KG04","../Type.Data.RowList/index.js":"XaXP"}],"5mN7":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Extend = require("../Control.Extend/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Nothing = function () { + function Nothing() {} + + ; + Nothing.value = new Nothing(); + return Nothing; +}(); + +var Just = function () { + function Just(value0) { + this.value0 = value0; + } + + ; + + Just.create = function (value0) { + return new Just(value0); + }; + + return Just; +}(); + +var showMaybe = function showMaybe(dictShow) { + return new Data_Show.Show(function (v) { + if (v instanceof Just) { + return "(Just " + (Data_Show.show(dictShow)(v.value0) + ")"); + } + + ; + + if (v instanceof Nothing) { + return "Nothing"; + } + + ; + throw new Error("Failed pattern match at Data.Maybe (line 205, column 1 - line 207, column 28): " + [v.constructor.name]); + }); +}; + +var semigroupMaybe = function semigroupMaybe(dictSemigroup) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + if (v instanceof Nothing) { + return v1; + } + + ; + + if (v1 instanceof Nothing) { + return v; + } + + ; + + if (v instanceof Just && v1 instanceof Just) { + return new Just(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0)); + } + + ; + throw new Error("Failed pattern match at Data.Maybe (line 174, column 1 - line 177, column 43): " + [v.constructor.name, v1.constructor.name]); + }; + }); +}; + +var optional = function optional(dictAlternative) { + return function (a) { + return Control_Alt.alt(dictAlternative.Plus1().Alt0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Just.create)(a))(Control_Applicative.pure(dictAlternative.Applicative0())(Nothing.value)); + }; +}; + +var monoidMaybe = function monoidMaybe(dictSemigroup) { + return new Data_Monoid.Monoid(function () { + return semigroupMaybe(dictSemigroup); + }, Nothing.value); +}; + +var maybe$prime = function maybe$prime(v) { + return function (v1) { + return function (v2) { + if (v2 instanceof Nothing) { + return v(Data_Unit.unit); + } + + ; + + if (v2 instanceof Just) { + return v1(v2.value0); + } + + ; + throw new Error("Failed pattern match at Data.Maybe (line 230, column 1 - line 230, column 62): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]); + }; + }; +}; + +var maybe = function maybe(v) { + return function (v1) { + return function (v2) { + if (v2 instanceof Nothing) { + return v; + } + + ; + + if (v2 instanceof Just) { + return v1(v2.value0); + } + + ; + throw new Error("Failed pattern match at Data.Maybe (line 217, column 1 - line 217, column 51): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]); + }; + }; +}; + +var isNothing = maybe(true)(Data_Function["const"](false)); +var isJust = maybe(false)(Data_Function["const"](true)); +var functorMaybe = new Data_Functor.Functor(function (v) { + return function (v1) { + if (v1 instanceof Just) { + return new Just(v(v1.value0)); + } + + ; + return Nothing.value; + }; +}); +var invariantMaybe = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorMaybe)); + +var fromMaybe$prime = function fromMaybe$prime(a) { + return maybe$prime(a)(Control_Category.identity(Control_Category.categoryFn)); +}; + +var fromMaybe = function fromMaybe(a) { + return maybe(a)(Control_Category.identity(Control_Category.categoryFn)); +}; + +var fromJust = function fromJust(dictPartial) { + return function (v) { + if (v instanceof Just) { + return v.value0; + } + + ; + throw new Error("Failed pattern match at Data.Maybe (line 268, column 1 - line 268, column 46): " + [v.constructor.name]); + }; +}; + +var extendMaybe = new Control_Extend.Extend(function () { + return functorMaybe; +}, function (v) { + return function (v1) { + if (v1 instanceof Nothing) { + return Nothing.value; + } + + ; + return new Just(v(v1)); + }; +}); + +var eqMaybe = function eqMaybe(dictEq) { + return new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof Nothing && y instanceof Nothing) { + return true; + } + + ; + + if (x instanceof Just && y instanceof Just) { + return Data_Eq.eq(dictEq)(x.value0)(y.value0); + } + + ; + return false; + }; + }); +}; + +var ordMaybe = function ordMaybe(dictOrd) { + return new Data_Ord.Ord(function () { + return eqMaybe(dictOrd.Eq0()); + }, function (x) { + return function (y) { + if (x instanceof Nothing && y instanceof Nothing) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof Nothing) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof Nothing) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof Just && y instanceof Just) { + return Data_Ord.compare(dictOrd)(x.value0)(y.value0); + } + + ; + throw new Error("Failed pattern match at Data.Maybe (line 194, column 1 - line 194, column 51): " + [x.constructor.name, y.constructor.name]); + }; + }); +}; + +var eq1Maybe = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqMaybe(dictEq)); +}); +var ord1Maybe = new Data_Ord.Ord1(function () { + return eq1Maybe; +}, function (dictOrd) { + return Data_Ord.compare(ordMaybe(dictOrd)); +}); + +var boundedMaybe = function boundedMaybe(dictBounded) { + return new Data_Bounded.Bounded(function () { + return ordMaybe(dictBounded.Ord0()); + }, Nothing.value, new Just(Data_Bounded.top(dictBounded))); +}; + +var applyMaybe = new Control_Apply.Apply(function () { + return functorMaybe; +}, function (v) { + return function (v1) { + if (v instanceof Just) { + return Data_Functor.map(functorMaybe)(v.value0)(v1); + } + + ; + + if (v instanceof Nothing) { + return Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.Maybe (line 67, column 1 - line 69, column 30): " + [v.constructor.name, v1.constructor.name]); + }; +}); +var bindMaybe = new Control_Bind.Bind(function () { + return applyMaybe; +}, function (v) { + return function (v1) { + if (v instanceof Just) { + return v1(v.value0); + } + + ; + + if (v instanceof Nothing) { + return Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.Maybe (line 125, column 1 - line 127, column 28): " + [v.constructor.name, v1.constructor.name]); + }; +}); +var applicativeMaybe = new Control_Applicative.Applicative(function () { + return applyMaybe; +}, Just.create); +var monadMaybe = new Control_Monad.Monad(function () { + return applicativeMaybe; +}, function () { + return bindMaybe; +}); +var altMaybe = new Control_Alt.Alt(function () { + return functorMaybe; +}, function (v) { + return function (v1) { + if (v instanceof Nothing) { + return v1; + } + + ; + return v; + }; +}); +var plusMaybe = new Control_Plus.Plus(function () { + return altMaybe; +}, Nothing.value); +var alternativeMaybe = new Control_Alternative.Alternative(function () { + return applicativeMaybe; +}, function () { + return plusMaybe; +}); +var monadZeroMaybe = new Control_MonadZero.MonadZero(function () { + return alternativeMaybe; +}, function () { + return monadMaybe; +}); +module.exports = { + Nothing: Nothing, + Just: Just, + maybe: maybe, + "maybe'": maybe$prime, + fromMaybe: fromMaybe, + "fromMaybe'": fromMaybe$prime, + isJust: isJust, + isNothing: isNothing, + fromJust: fromJust, + optional: optional, + functorMaybe: functorMaybe, + applyMaybe: applyMaybe, + applicativeMaybe: applicativeMaybe, + altMaybe: altMaybe, + plusMaybe: plusMaybe, + alternativeMaybe: alternativeMaybe, + bindMaybe: bindMaybe, + monadMaybe: monadMaybe, + monadZeroMaybe: monadZeroMaybe, + extendMaybe: extendMaybe, + invariantMaybe: invariantMaybe, + semigroupMaybe: semigroupMaybe, + monoidMaybe: monoidMaybe, + eqMaybe: eqMaybe, + eq1Maybe: eq1Maybe, + ordMaybe: ordMaybe, + ord1Maybe: ord1Maybe, + boundedMaybe: boundedMaybe, + showMaybe: showMaybe +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Extend/index.js":"JIoJ","../Control.Monad/index.js":"U/Ix","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Bounded/index.js":"kcUU","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Functor.Invariant/index.js":"AXkC","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Unit/index.js":"NhVk"}],"U/G5":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Conj = function Conj(x) { + return x; +}; + +var showConj = function showConj(dictShow) { + return new Data_Show.Show(function (v) { + return "(Conj " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semiringConj = function semiringConj(dictHeytingAlgebra) { + return new Data_Semiring.Semiring(function (v) { + return function (v1) { + return Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v)(v1); + }; + }, function (v) { + return function (v1) { + return Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v)(v1); + }; + }, Data_HeytingAlgebra.ff(dictHeytingAlgebra), Data_HeytingAlgebra.tt(dictHeytingAlgebra)); +}; + +var semigroupConj = function semigroupConj(dictHeytingAlgebra) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v)(v1); + }; + }); +}; + +var ordConj = function ordConj(dictOrd) { + return dictOrd; +}; + +var monoidConj = function monoidConj(dictHeytingAlgebra) { + return new Data_Monoid.Monoid(function () { + return semigroupConj(dictHeytingAlgebra); + }, Data_HeytingAlgebra.tt(dictHeytingAlgebra)); +}; + +var functorConj = new Data_Functor.Functor(function (f) { + return function (m) { + return f(m); + }; +}); + +var eqConj = function eqConj(dictEq) { + return dictEq; +}; + +var eq1Conj = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqConj(dictEq)); +}); +var ord1Conj = new Data_Ord.Ord1(function () { + return eq1Conj; +}, function (dictOrd) { + return Data_Ord.compare(ordConj(dictOrd)); +}); + +var boundedConj = function boundedConj(dictBounded) { + return dictBounded; +}; + +var applyConj = new Control_Apply.Apply(function () { + return functorConj; +}, function (v) { + return function (v1) { + return v(v1); + }; +}); +var bindConj = new Control_Bind.Bind(function () { + return applyConj; +}, function (v) { + return function (f) { + return f(v); + }; +}); +var applicativeConj = new Control_Applicative.Applicative(function () { + return applyConj; +}, Conj); +var monadConj = new Control_Monad.Monad(function () { + return applicativeConj; +}, function () { + return bindConj; +}); +module.exports = { + Conj: Conj, + eqConj: eqConj, + eq1Conj: eq1Conj, + ordConj: ordConj, + ord1Conj: ord1Conj, + boundedConj: boundedConj, + showConj: showConj, + functorConj: functorConj, + applyConj: applyConj, + applicativeConj: applicativeConj, + bindConj: bindConj, + monadConj: monadConj, + semigroupConj: semigroupConj, + monoidConj: monoidConj, + semiringConj: semiringConj +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7"}],"9bR7":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Disj = function Disj(x) { + return x; +}; + +var showDisj = function showDisj(dictShow) { + return new Data_Show.Show(function (v) { + return "(Disj " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semiringDisj = function semiringDisj(dictHeytingAlgebra) { + return new Data_Semiring.Semiring(function (v) { + return function (v1) { + return Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v)(v1); + }; + }, function (v) { + return function (v1) { + return Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v)(v1); + }; + }, Data_HeytingAlgebra.tt(dictHeytingAlgebra), Data_HeytingAlgebra.ff(dictHeytingAlgebra)); +}; + +var semigroupDisj = function semigroupDisj(dictHeytingAlgebra) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v)(v1); + }; + }); +}; + +var ordDisj = function ordDisj(dictOrd) { + return dictOrd; +}; + +var monoidDisj = function monoidDisj(dictHeytingAlgebra) { + return new Data_Monoid.Monoid(function () { + return semigroupDisj(dictHeytingAlgebra); + }, Data_HeytingAlgebra.ff(dictHeytingAlgebra)); +}; + +var functorDisj = new Data_Functor.Functor(function (f) { + return function (m) { + return f(m); + }; +}); + +var eqDisj = function eqDisj(dictEq) { + return dictEq; +}; + +var eq1Disj = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqDisj(dictEq)); +}); +var ord1Disj = new Data_Ord.Ord1(function () { + return eq1Disj; +}, function (dictOrd) { + return Data_Ord.compare(ordDisj(dictOrd)); +}); + +var boundedDisj = function boundedDisj(dictBounded) { + return dictBounded; +}; + +var applyDisj = new Control_Apply.Apply(function () { + return functorDisj; +}, function (v) { + return function (v1) { + return v(v1); + }; +}); +var bindDisj = new Control_Bind.Bind(function () { + return applyDisj; +}, function (v) { + return function (f) { + return f(v); + }; +}); +var applicativeDisj = new Control_Applicative.Applicative(function () { + return applyDisj; +}, Disj); +var monadDisj = new Control_Monad.Monad(function () { + return applicativeDisj; +}, function () { + return bindDisj; +}); +module.exports = { + Disj: Disj, + eqDisj: eqDisj, + eq1Disj: eq1Disj, + ordDisj: ordDisj, + ord1Disj: ord1Disj, + boundedDisj: boundedDisj, + showDisj: showDisj, + functorDisj: functorDisj, + applyDisj: applyDisj, + applicativeDisj: applicativeDisj, + bindDisj: bindDisj, + monadDisj: monadDisj, + semigroupDisj: semigroupDisj, + monoidDisj: monoidDisj, + semiringDisj: semiringDisj +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7"}],"ULyl":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Dual = function Dual(x) { + return x; +}; + +var showDual = function showDual(dictShow) { + return new Data_Show.Show(function (v) { + return "(Dual " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semigroupDual = function semigroupDual(dictSemigroup) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return Data_Semigroup.append(dictSemigroup)(v1)(v); + }; + }); +}; + +var ordDual = function ordDual(dictOrd) { + return dictOrd; +}; + +var monoidDual = function monoidDual(dictMonoid) { + return new Data_Monoid.Monoid(function () { + return semigroupDual(dictMonoid.Semigroup0()); + }, Data_Monoid.mempty(dictMonoid)); +}; + +var functorDual = new Data_Functor.Functor(function (f) { + return function (m) { + return f(m); + }; +}); + +var eqDual = function eqDual(dictEq) { + return dictEq; +}; + +var eq1Dual = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqDual(dictEq)); +}); +var ord1Dual = new Data_Ord.Ord1(function () { + return eq1Dual; +}, function (dictOrd) { + return Data_Ord.compare(ordDual(dictOrd)); +}); + +var boundedDual = function boundedDual(dictBounded) { + return dictBounded; +}; + +var applyDual = new Control_Apply.Apply(function () { + return functorDual; +}, function (v) { + return function (v1) { + return v(v1); + }; +}); +var bindDual = new Control_Bind.Bind(function () { + return applyDual; +}, function (v) { + return function (f) { + return f(v); + }; +}); +var applicativeDual = new Control_Applicative.Applicative(function () { + return applyDual; +}, Dual); +var monadDual = new Control_Monad.Monad(function () { + return applicativeDual; +}, function () { + return bindDual; +}); +module.exports = { + Dual: Dual, + eqDual: eqDual, + eq1Dual: eq1Dual, + ordDual: ordDual, + ord1Dual: ord1Dual, + boundedDual: boundedDual, + showDual: showDual, + functorDual: functorDual, + applyDual: applyDual, + applicativeDual: applicativeDual, + bindDual: bindDual, + monadDual: monadDual, + semigroupDual: semigroupDual, + monoidDual: monoidDual +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"2o47":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Endo = function Endo(x) { + return x; +}; + +var showEndo = function showEndo(dictShow) { + return new Data_Show.Show(function (v) { + return "(Endo " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semigroupEndo = function semigroupEndo(dictSemigroupoid) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return Control_Semigroupoid.compose(dictSemigroupoid)(v)(v1); + }; + }); +}; + +var ordEndo = function ordEndo(dictOrd) { + return dictOrd; +}; + +var monoidEndo = function monoidEndo(dictCategory) { + return new Data_Monoid.Monoid(function () { + return semigroupEndo(dictCategory.Semigroupoid0()); + }, Control_Category.identity(dictCategory)); +}; + +var eqEndo = function eqEndo(dictEq) { + return dictEq; +}; + +var boundedEndo = function boundedEndo(dictBounded) { + return dictBounded; +}; + +module.exports = { + Endo: Endo, + eqEndo: eqEndo, + ordEndo: ordEndo, + boundedEndo: boundedEndo, + showEndo: showEndo, + semigroupEndo: semigroupEndo, + monoidEndo: monoidEndo +}; +},{"../Control.Category/index.js":"IAi2","../Control.Semigroupoid/index.js":"/riR","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"fHyj":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Additive = function Additive(x) { + return x; +}; + +var showAdditive = function showAdditive(dictShow) { + return new Data_Show.Show(function (v) { + return "(Additive " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semigroupAdditive = function semigroupAdditive(dictSemiring) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return Data_Semiring.add(dictSemiring)(v)(v1); + }; + }); +}; + +var ordAdditive = function ordAdditive(dictOrd) { + return dictOrd; +}; + +var monoidAdditive = function monoidAdditive(dictSemiring) { + return new Data_Monoid.Monoid(function () { + return semigroupAdditive(dictSemiring); + }, Data_Semiring.zero(dictSemiring)); +}; + +var functorAdditive = new Data_Functor.Functor(function (f) { + return function (m) { + return f(m); + }; +}); + +var eqAdditive = function eqAdditive(dictEq) { + return dictEq; +}; + +var eq1Additive = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqAdditive(dictEq)); +}); +var ord1Additive = new Data_Ord.Ord1(function () { + return eq1Additive; +}, function (dictOrd) { + return Data_Ord.compare(ordAdditive(dictOrd)); +}); + +var boundedAdditive = function boundedAdditive(dictBounded) { + return dictBounded; +}; + +var applyAdditive = new Control_Apply.Apply(function () { + return functorAdditive; +}, function (v) { + return function (v1) { + return v(v1); + }; +}); +var bindAdditive = new Control_Bind.Bind(function () { + return applyAdditive; +}, function (v) { + return function (f) { + return f(v); + }; +}); +var applicativeAdditive = new Control_Applicative.Applicative(function () { + return applyAdditive; +}, Additive); +var monadAdditive = new Control_Monad.Monad(function () { + return applicativeAdditive; +}, function () { + return bindAdditive; +}); +module.exports = { + Additive: Additive, + eqAdditive: eqAdditive, + eq1Additive: eq1Additive, + ordAdditive: ordAdditive, + ord1Additive: ord1Additive, + boundedAdditive: boundedAdditive, + showAdditive: showAdditive, + functorAdditive: functorAdditive, + applyAdditive: applyAdditive, + applicativeAdditive: applicativeAdditive, + bindAdditive: bindAdditive, + monadAdditive: monadAdditive, + semigroupAdditive: semigroupAdditive, + monoidAdditive: monoidAdditive +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7"}],"y5cd":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Multiplicative = function Multiplicative(x) { + return x; +}; + +var showMultiplicative = function showMultiplicative(dictShow) { + return new Data_Show.Show(function (v) { + return "(Multiplicative " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semigroupMultiplicative = function semigroupMultiplicative(dictSemiring) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return Data_Semiring.mul(dictSemiring)(v)(v1); + }; + }); +}; + +var ordMultiplicative = function ordMultiplicative(dictOrd) { + return dictOrd; +}; + +var monoidMultiplicative = function monoidMultiplicative(dictSemiring) { + return new Data_Monoid.Monoid(function () { + return semigroupMultiplicative(dictSemiring); + }, Data_Semiring.one(dictSemiring)); +}; + +var functorMultiplicative = new Data_Functor.Functor(function (f) { + return function (m) { + return f(m); + }; +}); + +var eqMultiplicative = function eqMultiplicative(dictEq) { + return dictEq; +}; + +var eq1Multiplicative = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqMultiplicative(dictEq)); +}); +var ord1Multiplicative = new Data_Ord.Ord1(function () { + return eq1Multiplicative; +}, function (dictOrd) { + return Data_Ord.compare(ordMultiplicative(dictOrd)); +}); + +var boundedMultiplicative = function boundedMultiplicative(dictBounded) { + return dictBounded; +}; + +var applyMultiplicative = new Control_Apply.Apply(function () { + return functorMultiplicative; +}, function (v) { + return function (v1) { + return v(v1); + }; +}); +var bindMultiplicative = new Control_Bind.Bind(function () { + return applyMultiplicative; +}, function (v) { + return function (f) { + return f(v); + }; +}); +var applicativeMultiplicative = new Control_Applicative.Applicative(function () { + return applyMultiplicative; +}, Multiplicative); +var monadMultiplicative = new Control_Monad.Monad(function () { + return applicativeMultiplicative; +}, function () { + return bindMultiplicative; +}); +module.exports = { + Multiplicative: Multiplicative, + eqMultiplicative: eqMultiplicative, + eq1Multiplicative: eq1Multiplicative, + ordMultiplicative: ordMultiplicative, + ord1Multiplicative: ord1Multiplicative, + boundedMultiplicative: boundedMultiplicative, + showMultiplicative: showMultiplicative, + functorMultiplicative: functorMultiplicative, + applyMultiplicative: applyMultiplicative, + applicativeMultiplicative: applicativeMultiplicative, + bindMultiplicative: bindMultiplicative, + monadMultiplicative: monadMultiplicative, + semigroupMultiplicative: semigroupMultiplicative, + monoidMultiplicative: monoidMultiplicative +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7"}],"aRYH":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var First = function First(x) { + return x; +}; + +var showFirst = function showFirst(dictShow) { + return new Data_Show.Show(function (v) { + return "(First " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semigroupFirst = new Data_Semigroup.Semigroup(function (x) { + return function (v) { + return x; + }; +}); + +var ordFirst = function ordFirst(dictOrd) { + return dictOrd; +}; + +var functorFirst = new Data_Functor.Functor(function (f) { + return function (m) { + return f(m); + }; +}); + +var eqFirst = function eqFirst(dictEq) { + return dictEq; +}; + +var eq1First = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqFirst(dictEq)); +}); +var ord1First = new Data_Ord.Ord1(function () { + return eq1First; +}, function (dictOrd) { + return Data_Ord.compare(ordFirst(dictOrd)); +}); + +var boundedFirst = function boundedFirst(dictBounded) { + return dictBounded; +}; + +var applyFirst = new Control_Apply.Apply(function () { + return functorFirst; +}, function (v) { + return function (v1) { + return v(v1); + }; +}); +var bindFirst = new Control_Bind.Bind(function () { + return applyFirst; +}, function (v) { + return function (f) { + return f(v); + }; +}); +var applicativeFirst = new Control_Applicative.Applicative(function () { + return applyFirst; +}, First); +var monadFirst = new Control_Monad.Monad(function () { + return applicativeFirst; +}, function () { + return bindFirst; +}); +module.exports = { + First: First, + eqFirst: eqFirst, + eq1First: eq1First, + ordFirst: ordFirst, + ord1First: ord1First, + boundedFirst: boundedFirst, + showFirst: showFirst, + functorFirst: functorFirst, + applyFirst: applyFirst, + applicativeFirst: applicativeFirst, + bindFirst: bindFirst, + monadFirst: monadFirst, + semigroupFirst: semigroupFirst +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"mI/Z":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Last = function Last(x) { + return x; +}; + +var showLast = function showLast(dictShow) { + return new Data_Show.Show(function (v) { + return "(Last " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semigroupLast = new Data_Semigroup.Semigroup(function (v) { + return function (x) { + return x; + }; +}); + +var ordLast = function ordLast(dictOrd) { + return dictOrd; +}; + +var functorLast = new Data_Functor.Functor(function (f) { + return function (m) { + return f(m); + }; +}); + +var eqLast = function eqLast(dictEq) { + return dictEq; +}; + +var eq1Last = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqLast(dictEq)); +}); +var ord1Last = new Data_Ord.Ord1(function () { + return eq1Last; +}, function (dictOrd) { + return Data_Ord.compare(ordLast(dictOrd)); +}); + +var boundedLast = function boundedLast(dictBounded) { + return dictBounded; +}; + +var applyLast = new Control_Apply.Apply(function () { + return functorLast; +}, function (v) { + return function (v1) { + return v(v1); + }; +}); +var bindLast = new Control_Bind.Bind(function () { + return applyLast; +}, function (v) { + return function (f) { + return f(v); + }; +}); +var applicativeLast = new Control_Applicative.Applicative(function () { + return applyLast; +}, Last); +var monadLast = new Control_Monad.Monad(function () { + return applicativeLast; +}, function () { + return bindLast; +}); +module.exports = { + Last: Last, + eqLast: eqLast, + eq1Last: eq1Last, + ordLast: ordLast, + ord1Last: ord1Last, + boundedLast: boundedLast, + showLast: showLast, + functorLast: functorLast, + applyLast: applyLast, + applicativeLast: applicativeLast, + bindLast: bindLast, + monadLast: monadLast, + semigroupLast: semigroupLast +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"lz8k":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js"); + +var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js"); + +var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js"); + +var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js"); + +var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js"); + +var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js"); + +var Data_Semigroup_First = require("../Data.Semigroup.First/index.js"); + +var Data_Semigroup_Last = require("../Data.Semigroup.Last/index.js"); + +var Newtype = function Newtype(unwrap, wrap) { + this.unwrap = unwrap; + this.wrap = wrap; +}; + +var wrap = function wrap(dict) { + return dict.wrap; +}; + +var unwrap = function unwrap(dict) { + return dict.unwrap; +}; + +var underF2 = function underF2(dictFunctor) { + return function (dictFunctor1) { + return function (dictNewtype) { + return function (dictNewtype1) { + return function (v) { + return function (f) { + var $66 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(Data_Functor.map(dictFunctor1)(unwrap(dictNewtype1))); + var $67 = Data_Function.on(f)(Data_Functor.map(dictFunctor)(wrap(dictNewtype))); + return function ($68) { + return $66($67($68)); + }; + }; + }; + }; + }; + }; +}; + +var underF = function underF(dictFunctor) { + return function (dictFunctor1) { + return function (dictNewtype) { + return function (dictNewtype1) { + return function (v) { + return function (f) { + var $69 = Data_Functor.map(dictFunctor1)(unwrap(dictNewtype1)); + var $70 = Data_Functor.map(dictFunctor)(wrap(dictNewtype)); + return function ($71) { + return $69(f($70($71))); + }; + }; + }; + }; + }; + }; +}; + +var under2 = function under2(dictNewtype) { + return function (dictNewtype1) { + return function (v) { + return function (f) { + var $72 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(unwrap(dictNewtype1)); + var $73 = Data_Function.on(f)(wrap(dictNewtype)); + return function ($74) { + return $72($73($74)); + }; + }; + }; + }; +}; + +var under = function under(dictNewtype) { + return function (dictNewtype1) { + return function (v) { + return function (f) { + var $75 = unwrap(dictNewtype1); + var $76 = wrap(dictNewtype); + return function ($77) { + return $75(f($76($77))); + }; + }; + }; + }; +}; + +var un = function un(dictNewtype) { + return function (v) { + return unwrap(dictNewtype); + }; +}; + +var traverse = function traverse(dictFunctor) { + return function (dictNewtype) { + return function (v) { + return function (f) { + var $78 = Data_Functor.map(dictFunctor)(wrap(dictNewtype)); + var $79 = unwrap(dictNewtype); + return function ($80) { + return $78(f($79($80))); + }; + }; + }; + }; +}; + +var overF2 = function overF2(dictFunctor) { + return function (dictFunctor1) { + return function (dictNewtype) { + return function (dictNewtype1) { + return function (v) { + return function (f) { + var $81 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(Data_Functor.map(dictFunctor1)(wrap(dictNewtype1))); + var $82 = Data_Function.on(f)(Data_Functor.map(dictFunctor)(unwrap(dictNewtype))); + return function ($83) { + return $81($82($83)); + }; + }; + }; + }; + }; + }; +}; + +var overF = function overF(dictFunctor) { + return function (dictFunctor1) { + return function (dictNewtype) { + return function (dictNewtype1) { + return function (v) { + return function (f) { + var $84 = Data_Functor.map(dictFunctor1)(wrap(dictNewtype1)); + var $85 = Data_Functor.map(dictFunctor)(unwrap(dictNewtype)); + return function ($86) { + return $84(f($85($86))); + }; + }; + }; + }; + }; + }; +}; + +var over2 = function over2(dictNewtype) { + return function (dictNewtype1) { + return function (v) { + return function (f) { + var $87 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(wrap(dictNewtype1)); + var $88 = Data_Function.on(f)(unwrap(dictNewtype)); + return function ($89) { + return $87($88($89)); + }; + }; + }; + }; +}; + +var over = function over(dictNewtype) { + return function (dictNewtype1) { + return function (v) { + return function (f) { + var $90 = wrap(dictNewtype1); + var $91 = unwrap(dictNewtype); + return function ($92) { + return $90(f($91($92))); + }; + }; + }; + }; +}; + +var op = function op(dictNewtype) { + return un(dictNewtype); +}; + +var newtypeMultiplicative = new Newtype(function (v) { + return v; +}, Data_Monoid_Multiplicative.Multiplicative); +var newtypeLast = new Newtype(function (v) { + return v; +}, Data_Semigroup_Last.Last); +var newtypeFirst = new Newtype(function (v) { + return v; +}, Data_Semigroup_First.First); +var newtypeEndo = new Newtype(function (v) { + return v; +}, Data_Monoid_Endo.Endo); +var newtypeDual = new Newtype(function (v) { + return v; +}, Data_Monoid_Dual.Dual); +var newtypeDisj = new Newtype(function (v) { + return v; +}, Data_Monoid_Disj.Disj); +var newtypeConj = new Newtype(function (v) { + return v; +}, Data_Monoid_Conj.Conj); +var newtypeAdditive = new Newtype(function (v) { + return v; +}, Data_Monoid_Additive.Additive); + +var collect = function collect(dictFunctor) { + return function (dictNewtype) { + return function (v) { + return function (f) { + var $93 = wrap(dictNewtype); + var $94 = Data_Functor.map(dictFunctor)(unwrap(dictNewtype)); + return function ($95) { + return $93(f($94($95))); + }; + }; + }; + }; +}; + +var alaF = function alaF(dictFunctor) { + return function (dictFunctor1) { + return function (dictNewtype) { + return function (dictNewtype1) { + return function (v) { + return function (f) { + var $96 = Data_Functor.map(dictFunctor1)(unwrap(dictNewtype1)); + var $97 = Data_Functor.map(dictFunctor)(wrap(dictNewtype)); + return function ($98) { + return $96(f($97($98))); + }; + }; + }; + }; + }; + }; +}; + +var ala = function ala(dictFunctor) { + return function (dictNewtype) { + return function (dictNewtype1) { + return function (v) { + return function (f) { + return Data_Functor.map(dictFunctor)(unwrap(dictNewtype))(f(wrap(dictNewtype1))); + }; + }; + }; + }; +}; + +module.exports = { + unwrap: unwrap, + wrap: wrap, + Newtype: Newtype, + un: un, + op: op, + ala: ala, + alaF: alaF, + over: over, + overF: overF, + under: under, + underF: underF, + over2: over2, + overF2: overF2, + under2: under2, + underF2: underF2, + traverse: traverse, + collect: collect, + newtypeAdditive: newtypeAdditive, + newtypeMultiplicative: newtypeMultiplicative, + newtypeConj: newtypeConj, + newtypeDisj: newtypeDisj, + newtypeDual: newtypeDual, + newtypeEndo: newtypeEndo, + newtypeFirst: newtypeFirst, + newtypeLast: newtypeLast +}; +},{"../Control.Semigroupoid/index.js":"/riR","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Monoid.Additive/index.js":"fHyj","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Endo/index.js":"2o47","../Data.Monoid.Multiplicative/index.js":"y5cd","../Data.Semigroup.First/index.js":"aRYH","../Data.Semigroup.Last/index.js":"mI/Z"}],"eVDl":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js"); + +var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js"); + +var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js"); + +var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Foldable = function Foldable(foldMap, foldl, foldr) { + this.foldMap = foldMap; + this.foldl = foldl; + this.foldr = foldr; +}; + +var foldr = function foldr(dict) { + return dict.foldr; +}; + +var indexr = function indexr(dictFoldable) { + return function (idx) { + var go = function go(a) { + return function (cursor) { + if (cursor.elem instanceof Data_Maybe.Just) { + return cursor; + } + + ; + var $106 = cursor.pos === idx; + + if ($106) { + return { + elem: new Data_Maybe.Just(a), + pos: cursor.pos + }; + } + + ; + return { + pos: cursor.pos + 1 | 0, + elem: cursor.elem + }; + }; + }; + + var $193 = foldr(dictFoldable)(go)({ + elem: Data_Maybe.Nothing.value, + pos: 0 + }); + return function ($194) { + return function (v) { + return v.elem; + }($193($194)); + }; + }; +}; + +var $$null = function $$null(dictFoldable) { + return foldr(dictFoldable)(function (v) { + return function (v1) { + return false; + }; + })(true); +}; + +var oneOf = function oneOf(dictFoldable) { + return function (dictPlus) { + return foldr(dictFoldable)(Control_Alt.alt(dictPlus.Alt0()))(Control_Plus.empty(dictPlus)); + }; +}; + +var oneOfMap = function oneOfMap(dictFoldable) { + return function (dictPlus) { + return function (f) { + return foldr(dictFoldable)(function () { + var $195 = Control_Alt.alt(dictPlus.Alt0()); + return function ($196) { + return $195(f($196)); + }; + }())(Control_Plus.empty(dictPlus)); + }; + }; +}; + +var traverse_ = function traverse_(dictApplicative) { + return function (dictFoldable) { + return function (f) { + return foldr(dictFoldable)(function () { + var $197 = Control_Apply.applySecond(dictApplicative.Apply0()); + return function ($198) { + return $197(f($198)); + }; + }())(Control_Applicative.pure(dictApplicative)(Data_Unit.unit)); + }; + }; +}; + +var for_ = function for_(dictApplicative) { + return function (dictFoldable) { + return Data_Function.flip(traverse_(dictApplicative)(dictFoldable)); + }; +}; + +var sequence_ = function sequence_(dictApplicative) { + return function (dictFoldable) { + return traverse_(dictApplicative)(dictFoldable)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var foldl = function foldl(dict) { + return dict.foldl; +}; + +var indexl = function indexl(dictFoldable) { + return function (idx) { + var go = function go(cursor) { + return function (a) { + if (cursor.elem instanceof Data_Maybe.Just) { + return cursor; + } + + ; + var $109 = cursor.pos === idx; + + if ($109) { + return { + elem: new Data_Maybe.Just(a), + pos: cursor.pos + }; + } + + ; + return { + pos: cursor.pos + 1 | 0, + elem: cursor.elem + }; + }; + }; + + var $199 = foldl(dictFoldable)(go)({ + elem: Data_Maybe.Nothing.value, + pos: 0 + }); + return function ($200) { + return function (v) { + return v.elem; + }($199($200)); + }; + }; +}; + +var intercalate = function intercalate(dictFoldable) { + return function (dictMonoid) { + return function (sep) { + return function (xs) { + var go = function go(v) { + return function (x) { + if (v.init) { + return { + init: false, + acc: x + }; + } + + ; + return { + init: false, + acc: Data_Semigroup.append(dictMonoid.Semigroup0())(v.acc)(Data_Semigroup.append(dictMonoid.Semigroup0())(sep)(x)) + }; + }; + }; + + return foldl(dictFoldable)(go)({ + init: true, + acc: Data_Monoid.mempty(dictMonoid) + })(xs).acc; + }; + }; + }; +}; + +var length = function length(dictFoldable) { + return function (dictSemiring) { + return foldl(dictFoldable)(function (c) { + return function (v) { + return Data_Semiring.add(dictSemiring)(Data_Semiring.one(dictSemiring))(c); + }; + })(Data_Semiring.zero(dictSemiring)); + }; +}; + +var maximumBy = function maximumBy(dictFoldable) { + return function (cmp) { + var max$prime = function max$prime(v) { + return function (v1) { + if (v instanceof Data_Maybe.Nothing) { + return new Data_Maybe.Just(v1); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return new Data_Maybe.Just(function () { + var $116 = Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v1))(Data_Ordering.GT.value); + + if ($116) { + return v.value0; + } + + ; + return v1; + }()); + } + + ; + throw new Error("Failed pattern match at Data.Foldable (line 389, column 3 - line 389, column 27): " + [v.constructor.name, v1.constructor.name]); + }; + }; + + return foldl(dictFoldable)(max$prime)(Data_Maybe.Nothing.value); + }; +}; + +var maximum = function maximum(dictOrd) { + return function (dictFoldable) { + return maximumBy(dictFoldable)(Data_Ord.compare(dictOrd)); + }; +}; + +var minimumBy = function minimumBy(dictFoldable) { + return function (cmp) { + var min$prime = function min$prime(v) { + return function (v1) { + if (v instanceof Data_Maybe.Nothing) { + return new Data_Maybe.Just(v1); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return new Data_Maybe.Just(function () { + var $120 = Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v1))(Data_Ordering.LT.value); + + if ($120) { + return v.value0; + } + + ; + return v1; + }()); + } + + ; + throw new Error("Failed pattern match at Data.Foldable (line 402, column 3 - line 402, column 27): " + [v.constructor.name, v1.constructor.name]); + }; + }; + + return foldl(dictFoldable)(min$prime)(Data_Maybe.Nothing.value); + }; +}; + +var minimum = function minimum(dictOrd) { + return function (dictFoldable) { + return minimumBy(dictFoldable)(Data_Ord.compare(dictOrd)); + }; +}; + +var product = function product(dictFoldable) { + return function (dictSemiring) { + return foldl(dictFoldable)(Data_Semiring.mul(dictSemiring))(Data_Semiring.one(dictSemiring)); + }; +}; + +var sum = function sum(dictFoldable) { + return function (dictSemiring) { + return foldl(dictFoldable)(Data_Semiring.add(dictSemiring))(Data_Semiring.zero(dictSemiring)); + }; +}; + +var foldableMultiplicative = new Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return f(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(z)(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(v)(z); + }; + }; +}); +var foldableMaybe = new Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + if (v instanceof Data_Maybe.Nothing) { + return Data_Monoid.mempty(dictMonoid); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return f(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): " + [f.constructor.name, v.constructor.name]); + }; + }; +}, function (v) { + return function (z) { + return function (v1) { + if (v1 instanceof Data_Maybe.Nothing) { + return z; + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + return v(z)(v1.value0); + } + + ; + throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): " + [v.constructor.name, z.constructor.name, v1.constructor.name]); + }; + }; +}, function (v) { + return function (z) { + return function (v1) { + if (v1 instanceof Data_Maybe.Nothing) { + return z; + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + return v(v1.value0)(z); + } + + ; + throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): " + [v.constructor.name, z.constructor.name, v1.constructor.name]); + }; + }; +}); +var foldableDual = new Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return f(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(z)(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(v)(z); + }; + }; +}); +var foldableDisj = new Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return f(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(z)(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(v)(z); + }; + }; +}); +var foldableConj = new Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return f(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(z)(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(v)(z); + }; + }; +}); +var foldableAdditive = new Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return f(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(z)(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(v)(z); + }; + }; +}); + +var foldMapDefaultR = function foldMapDefaultR(dictFoldable) { + return function (dictMonoid) { + return function (f) { + return foldr(dictFoldable)(function (x) { + return function (acc) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(f(x))(acc); + }; + })(Data_Monoid.mempty(dictMonoid)); + }; + }; +}; + +var foldableArray = new Foldable(function (dictMonoid) { + return foldMapDefaultR(foldableArray)(dictMonoid); +}, $foreign.foldlArray, $foreign.foldrArray); + +var foldMapDefaultL = function foldMapDefaultL(dictFoldable) { + return function (dictMonoid) { + return function (f) { + return foldl(dictFoldable)(function (acc) { + return function (x) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(acc)(f(x)); + }; + })(Data_Monoid.mempty(dictMonoid)); + }; + }; +}; + +var foldMap = function foldMap(dict) { + return dict.foldMap; +}; + +var foldableFirst = new Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return foldMap(foldableMaybe)(dictMonoid)(f)(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return foldl(foldableMaybe)(f)(z)(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return foldr(foldableMaybe)(f)(z)(v); + }; + }; +}); +var foldableLast = new Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return foldMap(foldableMaybe)(dictMonoid)(f)(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return foldl(foldableMaybe)(f)(z)(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return foldr(foldableMaybe)(f)(z)(v); + }; + }; +}); + +var foldlDefault = function foldlDefault(dictFoldable) { + return function (c) { + return function (u) { + return function (xs) { + return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(Data_Newtype.unwrap(Data_Newtype.newtypeDual)(foldMap(dictFoldable)(Data_Monoid_Dual.monoidDual(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn)))(function () { + var $201 = Data_Function.flip(c); + return function ($202) { + return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($201($202))); + }; + }())(xs)))(u); + }; + }; + }; +}; + +var foldrDefault = function foldrDefault(dictFoldable) { + return function (c) { + return function (u) { + return function (xs) { + return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMap(dictFoldable)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(function ($203) { + return Data_Monoid_Endo.Endo(c($203)); + })(xs))(u); + }; + }; + }; +}; + +var surroundMap = function surroundMap(dictFoldable) { + return function (dictSemigroup) { + return function (d) { + return function (t) { + return function (f) { + var joined = function joined(a) { + return function (m) { + return Data_Semigroup.append(dictSemigroup)(d)(Data_Semigroup.append(dictSemigroup)(t(a))(m)); + }; + }; + + return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMap(dictFoldable)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(joined)(f))(d); + }; + }; + }; + }; +}; + +var surround = function surround(dictFoldable) { + return function (dictSemigroup) { + return function (d) { + return surroundMap(dictFoldable)(dictSemigroup)(d)(Control_Category.identity(Control_Category.categoryFn)); + }; + }; +}; + +var foldM = function foldM(dictFoldable) { + return function (dictMonad) { + return function (f) { + return function (a0) { + return foldl(dictFoldable)(function (ma) { + return function (b) { + return Control_Bind.bind(dictMonad.Bind1())(ma)(Data_Function.flip(f)(b)); + }; + })(Control_Applicative.pure(dictMonad.Applicative0())(a0)); + }; + }; + }; +}; + +var fold = function fold(dictFoldable) { + return function (dictMonoid) { + return foldMap(dictFoldable)(dictMonoid)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var findMap = function findMap(dictFoldable) { + return function (p) { + var go = function go(v) { + return function (v1) { + if (v instanceof Data_Maybe.Nothing) { + return p(v1); + } + + ; + return v; + }; + }; + + return foldl(dictFoldable)(go)(Data_Maybe.Nothing.value); + }; +}; + +var find = function find(dictFoldable) { + return function (p) { + var go = function go(v) { + return function (v1) { + if (v instanceof Data_Maybe.Nothing && p(v1)) { + return new Data_Maybe.Just(v1); + } + + ; + return v; + }; + }; + + return foldl(dictFoldable)(go)(Data_Maybe.Nothing.value); + }; +}; + +var any = function any(dictFoldable) { + return function (dictHeytingAlgebra) { + return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Newtype.newtypeDisj)(Data_Newtype.newtypeDisj)(Data_Monoid_Disj.Disj)(foldMap(dictFoldable)(Data_Monoid_Disj.monoidDisj(dictHeytingAlgebra))); + }; +}; + +var elem = function elem(dictFoldable) { + return function (dictEq) { + var $204 = any(dictFoldable)(Data_HeytingAlgebra.heytingAlgebraBoolean); + var $205 = Data_Eq.eq(dictEq); + return function ($206) { + return $204($205($206)); + }; + }; +}; + +var notElem = function notElem(dictFoldable) { + return function (dictEq) { + return function (x) { + var $207 = Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean); + var $208 = elem(dictFoldable)(dictEq)(x); + return function ($209) { + return $207($208($209)); + }; + }; + }; +}; + +var or = function or(dictFoldable) { + return function (dictHeytingAlgebra) { + return any(dictFoldable)(dictHeytingAlgebra)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var all = function all(dictFoldable) { + return function (dictHeytingAlgebra) { + return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Newtype.newtypeConj)(Data_Newtype.newtypeConj)(Data_Monoid_Conj.Conj)(foldMap(dictFoldable)(Data_Monoid_Conj.monoidConj(dictHeytingAlgebra))); + }; +}; + +var and = function and(dictFoldable) { + return function (dictHeytingAlgebra) { + return all(dictFoldable)(dictHeytingAlgebra)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +module.exports = { + Foldable: Foldable, + foldr: foldr, + foldl: foldl, + foldMap: foldMap, + foldrDefault: foldrDefault, + foldlDefault: foldlDefault, + foldMapDefaultL: foldMapDefaultL, + foldMapDefaultR: foldMapDefaultR, + fold: fold, + foldM: foldM, + traverse_: traverse_, + for_: for_, + sequence_: sequence_, + oneOf: oneOf, + oneOfMap: oneOfMap, + intercalate: intercalate, + surroundMap: surroundMap, + surround: surround, + and: and, + or: or, + all: all, + any: any, + sum: sum, + product: product, + elem: elem, + notElem: notElem, + indexl: indexl, + indexr: indexr, + find: find, + findMap: findMap, + maximum: maximum, + maximumBy: maximumBy, + minimum: minimum, + minimumBy: minimumBy, + "null": $$null, + length: length, + foldableArray: foldableArray, + foldableMaybe: foldableMaybe, + foldableFirst: foldableFirst, + foldableLast: foldableLast, + foldableAdditive: foldableAdditive, + foldableDual: foldableDual, + foldableDisj: foldableDisj, + foldableConj: foldableConj, + foldableMultiplicative: foldableMultiplicative +}; +},{"./foreign.js":"kY6E","../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Plus/index.js":"oMBg","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Endo/index.js":"2o47","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Unit/index.js":"NhVk"}],"wjQo":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js"); + +var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js"); + +var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js"); + +var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Bifoldable = function Bifoldable(bifoldMap, bifoldl, bifoldr) { + this.bifoldMap = bifoldMap; + this.bifoldl = bifoldl; + this.bifoldr = bifoldr; +}; + +var bifoldr = function bifoldr(dict) { + return dict.bifoldr; +}; + +var bitraverse_ = function bitraverse_(dictBifoldable) { + return function (dictApplicative) { + return function (f) { + return function (g) { + return bifoldr(dictBifoldable)(function () { + var $97 = Control_Apply.applySecond(dictApplicative.Apply0()); + return function ($98) { + return $97(f($98)); + }; + }())(function () { + var $99 = Control_Apply.applySecond(dictApplicative.Apply0()); + return function ($100) { + return $99(g($100)); + }; + }())(Control_Applicative.pure(dictApplicative)(Data_Unit.unit)); + }; + }; + }; +}; + +var bifor_ = function bifor_(dictBifoldable) { + return function (dictApplicative) { + return function (t) { + return function (f) { + return function (g) { + return bitraverse_(dictBifoldable)(dictApplicative)(f)(g)(t); + }; + }; + }; + }; +}; + +var bisequence_ = function bisequence_(dictBifoldable) { + return function (dictApplicative) { + return bitraverse_(dictBifoldable)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var bifoldl = function bifoldl(dict) { + return dict.bifoldl; +}; + +var bifoldableJoker = function bifoldableJoker(dictFoldable) { + return new Bifoldable(function (dictMonoid) { + return function (v) { + return function (r) { + return function (v1) { + return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(r)(v1); + }; + }; + }; + }, function (v) { + return function (r) { + return function (u) { + return function (v1) { + return Data_Foldable.foldl(dictFoldable)(r)(u)(v1); + }; + }; + }; + }, function (v) { + return function (r) { + return function (u) { + return function (v1) { + return Data_Foldable.foldr(dictFoldable)(r)(u)(v1); + }; + }; + }; + }); +}; + +var bifoldableClown = function bifoldableClown(dictFoldable) { + return new Bifoldable(function (dictMonoid) { + return function (l) { + return function (v) { + return function (v1) { + return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(l)(v1); + }; + }; + }; + }, function (l) { + return function (v) { + return function (u) { + return function (v1) { + return Data_Foldable.foldl(dictFoldable)(l)(u)(v1); + }; + }; + }; + }, function (l) { + return function (v) { + return function (u) { + return function (v1) { + return Data_Foldable.foldr(dictFoldable)(l)(u)(v1); + }; + }; + }; + }); +}; + +var bifoldMapDefaultR = function bifoldMapDefaultR(dictBifoldable) { + return function (dictMonoid) { + return function (f) { + return function (g) { + return bifoldr(dictBifoldable)(function () { + var $101 = Data_Semigroup.append(dictMonoid.Semigroup0()); + return function ($102) { + return $101(f($102)); + }; + }())(function () { + var $103 = Data_Semigroup.append(dictMonoid.Semigroup0()); + return function ($104) { + return $103(g($104)); + }; + }())(Data_Monoid.mempty(dictMonoid)); + }; + }; + }; +}; + +var bifoldMapDefaultL = function bifoldMapDefaultL(dictBifoldable) { + return function (dictMonoid) { + return function (f) { + return function (g) { + return bifoldl(dictBifoldable)(function (m) { + return function (a) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(m)(f(a)); + }; + })(function (m) { + return function (b) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(m)(g(b)); + }; + })(Data_Monoid.mempty(dictMonoid)); + }; + }; + }; +}; + +var bifoldMap = function bifoldMap(dict) { + return dict.bifoldMap; +}; + +var bifoldableFlip = function bifoldableFlip(dictBifoldable) { + return new Bifoldable(function (dictMonoid) { + return function (r) { + return function (l) { + return function (v) { + return bifoldMap(dictBifoldable)(dictMonoid)(l)(r)(v); + }; + }; + }; + }, function (r) { + return function (l) { + return function (u) { + return function (v) { + return bifoldl(dictBifoldable)(l)(r)(u)(v); + }; + }; + }; + }, function (r) { + return function (l) { + return function (u) { + return function (v) { + return bifoldr(dictBifoldable)(l)(r)(u)(v); + }; + }; + }; + }); +}; + +var bifoldableWrap = function bifoldableWrap(dictBifoldable) { + return new Bifoldable(function (dictMonoid) { + return function (l) { + return function (r) { + return function (v) { + return bifoldMap(dictBifoldable)(dictMonoid)(l)(r)(v); + }; + }; + }; + }, function (l) { + return function (r) { + return function (u) { + return function (v) { + return bifoldl(dictBifoldable)(l)(r)(u)(v); + }; + }; + }; + }, function (l) { + return function (r) { + return function (u) { + return function (v) { + return bifoldr(dictBifoldable)(l)(r)(u)(v); + }; + }; + }; + }); +}; + +var bifoldlDefault = function bifoldlDefault(dictBifoldable) { + return function (f) { + return function (g) { + return function (z) { + return function (p) { + return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(Data_Newtype.unwrap(Data_Newtype.newtypeDual)(bifoldMap(dictBifoldable)(Data_Monoid_Dual.monoidDual(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn)))(function () { + var $105 = Data_Function.flip(f); + return function ($106) { + return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($105($106))); + }; + }())(function () { + var $107 = Data_Function.flip(g); + return function ($108) { + return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($107($108))); + }; + }())(p)))(z); + }; + }; + }; + }; +}; + +var bifoldrDefault = function bifoldrDefault(dictBifoldable) { + return function (f) { + return function (g) { + return function (z) { + return function (p) { + return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(bifoldMap(dictBifoldable)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(function ($109) { + return Data_Monoid_Endo.Endo(f($109)); + })(function ($110) { + return Data_Monoid_Endo.Endo(g($110)); + })(p))(z); + }; + }; + }; + }; +}; + +var bifoldableProduct = function bifoldableProduct(dictBifoldable) { + return function (dictBifoldable1) { + return new Bifoldable(function (dictMonoid) { + return function (l) { + return function (r) { + return function (v) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(bifoldMap(dictBifoldable)(dictMonoid)(l)(r)(v.value0))(bifoldMap(dictBifoldable1)(dictMonoid)(l)(r)(v.value1)); + }; + }; + }; + }, function (l) { + return function (r) { + return function (u) { + return function (m) { + return bifoldlDefault(bifoldableProduct(dictBifoldable)(dictBifoldable1))(l)(r)(u)(m); + }; + }; + }; + }, function (l) { + return function (r) { + return function (u) { + return function (m) { + return bifoldrDefault(bifoldableProduct(dictBifoldable)(dictBifoldable1))(l)(r)(u)(m); + }; + }; + }; + }); + }; +}; + +var bifold = function bifold(dictBifoldable) { + return function (dictMonoid) { + return bifoldMap(dictBifoldable)(dictMonoid)(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var biany = function biany(dictBifoldable) { + return function (dictBooleanAlgebra) { + return function (p) { + return function (q) { + var $111 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj); + var $112 = bifoldMap(dictBifoldable)(Data_Monoid_Disj.monoidDisj(dictBooleanAlgebra.HeytingAlgebra0()))(function ($114) { + return Data_Monoid_Disj.Disj(p($114)); + })(function ($115) { + return Data_Monoid_Disj.Disj(q($115)); + }); + return function ($113) { + return $111($112($113)); + }; + }; + }; + }; +}; + +var biall = function biall(dictBifoldable) { + return function (dictBooleanAlgebra) { + return function (p) { + return function (q) { + var $116 = Data_Newtype.unwrap(Data_Newtype.newtypeConj); + var $117 = bifoldMap(dictBifoldable)(Data_Monoid_Conj.monoidConj(dictBooleanAlgebra.HeytingAlgebra0()))(function ($119) { + return Data_Monoid_Conj.Conj(p($119)); + })(function ($120) { + return Data_Monoid_Conj.Conj(q($120)); + }); + return function ($118) { + return $116($117($118)); + }; + }; + }; + }; +}; + +module.exports = { + bifoldMap: bifoldMap, + bifoldl: bifoldl, + bifoldr: bifoldr, + Bifoldable: Bifoldable, + bifoldrDefault: bifoldrDefault, + bifoldlDefault: bifoldlDefault, + bifoldMapDefaultR: bifoldMapDefaultR, + bifoldMapDefaultL: bifoldMapDefaultL, + bifold: bifold, + bitraverse_: bitraverse_, + bifor_: bifor_, + bisequence_: bisequence_, + biany: biany, + biall: biall, + bifoldableClown: bifoldableClown, + bifoldableJoker: bifoldableJoker, + bifoldableFlip: bifoldableFlip, + bifoldableProduct: bifoldableProduct, + bifoldableWrap: bifoldableWrap +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Monoid/index.js":"TiEB","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Endo/index.js":"2o47","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Unit/index.js":"NhVk"}],"e2Wc":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Bifunctor = function Bifunctor(bimap) { + this.bimap = bimap; +}; + +var bimap = function bimap(dict) { + return dict.bimap; +}; + +var lmap = function lmap(dictBifunctor) { + return function (f) { + return bimap(dictBifunctor)(f)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var rmap = function rmap(dictBifunctor) { + return bimap(dictBifunctor)(Control_Category.identity(Control_Category.categoryFn)); +}; + +module.exports = { + bimap: bimap, + Bifunctor: Bifunctor, + lmap: lmap, + rmap: rmap +}; +},{"../Control.Category/index.js":"IAi2"}],"Sd0N":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Biapplicative = function Biapplicative(Biapply0, bipure) { + this.Biapply0 = Biapply0; + this.bipure = bipure; +}; + +var bipure = function bipure(dict) { + return dict.bipure; +}; + +module.exports = { + bipure: bipure, + Biapplicative: Biapplicative +}; +},{}],"X0ga":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Biapply = function Biapply(Bifunctor0, biapply) { + this.Bifunctor0 = Bifunctor0; + this.biapply = biapply; +}; + +var biapply = function biapply(dict) { + return dict.biapply; +}; + +var biapplyFirst = function biapplyFirst(dictBiapply) { + return function (a) { + return function (b) { + return biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(Data_Function["const"](Control_Category.identity(Control_Category.categoryFn)))(Data_Function["const"](Control_Category.identity(Control_Category.categoryFn))))(a))(b); + }; + }; +}; + +var biapplySecond = function biapplySecond(dictBiapply) { + return function (a) { + return function (b) { + return biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(Data_Function["const"])(Data_Function["const"]))(a))(b); + }; + }; +}; + +var bilift2 = function bilift2(dictBiapply) { + return function (f) { + return function (g) { + return function (a) { + return function (b) { + return biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(f)(g))(a))(b); + }; + }; + }; + }; +}; + +var bilift3 = function bilift3(dictBiapply) { + return function (f) { + return function (g) { + return function (a) { + return function (b) { + return function (c) { + return biapply(dictBiapply)(biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(f)(g))(a))(b))(c); + }; + }; + }; + }; + }; +}; + +module.exports = { + biapply: biapply, + Biapply: Biapply, + biapplyFirst: biapplyFirst, + biapplySecond: biapplySecond, + bilift2: bilift2, + bilift3: bilift3 +}; +},{"../Control.Category/index.js":"IAi2","../Data.Bifunctor/index.js":"e2Wc","../Data.Function/index.js":"ImXJ"}],"Wuz6":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Biapplicative = require("../Control.Biapplicative/index.js"); + +var Control_Biapply = require("../Control.Biapply/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Clown = function Clown(x) { + return x; +}; + +var showClown = function showClown(dictShow) { + return new Data_Show.Show(function (v) { + return "(Clown " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var ordClown = function ordClown(dictOrd) { + return dictOrd; +}; + +var newtypeClown = new Data_Newtype.Newtype(function (n) { + return n; +}, Clown); +var functorClown = new Data_Functor.Functor(function (v) { + return function (v1) { + return v1; + }; +}); + +var eqClown = function eqClown(dictEq) { + return dictEq; +}; + +var bifunctorClown = function bifunctorClown(dictFunctor) { + return new Data_Bifunctor.Bifunctor(function (f) { + return function (v) { + return function (v1) { + return Data_Functor.map(dictFunctor)(f)(v1); + }; + }; + }); +}; + +var biapplyClown = function biapplyClown(dictApply) { + return new Control_Biapply.Biapply(function () { + return bifunctorClown(dictApply.Functor0()); + }, function (v) { + return function (v1) { + return Control_Apply.apply(dictApply)(v)(v1); + }; + }); +}; + +var biapplicativeClown = function biapplicativeClown(dictApplicative) { + return new Control_Biapplicative.Biapplicative(function () { + return biapplyClown(dictApplicative.Apply0()); + }, function (a) { + return function (v) { + return Control_Applicative.pure(dictApplicative)(a); + }; + }); +}; + +module.exports = { + Clown: Clown, + newtypeClown: newtypeClown, + eqClown: eqClown, + ordClown: ordClown, + showClown: showClown, + functorClown: functorClown, + bifunctorClown: bifunctorClown, + biapplyClown: biapplyClown, + biapplicativeClown: biapplicativeClown +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Biapplicative/index.js":"Sd0N","../Control.Biapply/index.js":"X0ga","../Data.Bifunctor/index.js":"e2Wc","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Show/index.js":"mFY7"}],"EM73":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Biapplicative = require("../Control.Biapplicative/index.js"); + +var Control_Biapply = require("../Control.Biapply/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Flip = function Flip(x) { + return x; +}; + +var showFlip = function showFlip(dictShow) { + return new Data_Show.Show(function (v) { + return "(Flip " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var ordFlip = function ordFlip(dictOrd) { + return dictOrd; +}; + +var newtypeFlip = new Data_Newtype.Newtype(function (n) { + return n; +}, Flip); + +var functorFlip = function functorFlip(dictBifunctor) { + return new Data_Functor.Functor(function (f) { + return function (v) { + return Data_Bifunctor.lmap(dictBifunctor)(f)(v); + }; + }); +}; + +var eqFlip = function eqFlip(dictEq) { + return dictEq; +}; + +var bifunctorFlip = function bifunctorFlip(dictBifunctor) { + return new Data_Bifunctor.Bifunctor(function (f) { + return function (g) { + return function (v) { + return Data_Bifunctor.bimap(dictBifunctor)(g)(f)(v); + }; + }; + }); +}; + +var biapplyFlip = function biapplyFlip(dictBiapply) { + return new Control_Biapply.Biapply(function () { + return bifunctorFlip(dictBiapply.Bifunctor0()); + }, function (v) { + return function (v1) { + return Control_Biapply.biapply(dictBiapply)(v)(v1); + }; + }); +}; + +var biapplicativeFlip = function biapplicativeFlip(dictBiapplicative) { + return new Control_Biapplicative.Biapplicative(function () { + return biapplyFlip(dictBiapplicative.Biapply0()); + }, function (a) { + return function (b) { + return Control_Biapplicative.bipure(dictBiapplicative)(b)(a); + }; + }); +}; + +module.exports = { + Flip: Flip, + newtypeFlip: newtypeFlip, + eqFlip: eqFlip, + ordFlip: ordFlip, + showFlip: showFlip, + functorFlip: functorFlip, + bifunctorFlip: bifunctorFlip, + biapplyFlip: biapplyFlip, + biapplicativeFlip: biapplicativeFlip +}; +},{"../Control.Biapplicative/index.js":"Sd0N","../Control.Biapply/index.js":"X0ga","../Data.Bifunctor/index.js":"e2Wc","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Show/index.js":"mFY7"}],"O/Oh":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Biapplicative = require("../Control.Biapplicative/index.js"); + +var Control_Biapply = require("../Control.Biapply/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Joker = function Joker(x) { + return x; +}; + +var showJoker = function showJoker(dictShow) { + return new Data_Show.Show(function (v) { + return "(Joker " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var ordJoker = function ordJoker(dictOrd) { + return dictOrd; +}; + +var newtypeJoker = new Data_Newtype.Newtype(function (n) { + return n; +}, Joker); + +var functorJoker = function functorJoker(dictFunctor) { + return new Data_Functor.Functor(function (g) { + return function (v) { + return Data_Functor.map(dictFunctor)(g)(v); + }; + }); +}; + +var eqJoker = function eqJoker(dictEq) { + return dictEq; +}; + +var bifunctorJoker = function bifunctorJoker(dictFunctor) { + return new Data_Bifunctor.Bifunctor(function (v) { + return function (g) { + return function (v1) { + return Data_Functor.map(dictFunctor)(g)(v1); + }; + }; + }); +}; + +var biapplyJoker = function biapplyJoker(dictApply) { + return new Control_Biapply.Biapply(function () { + return bifunctorJoker(dictApply.Functor0()); + }, function (v) { + return function (v1) { + return Control_Apply.apply(dictApply)(v)(v1); + }; + }); +}; + +var biapplicativeJoker = function biapplicativeJoker(dictApplicative) { + return new Control_Biapplicative.Biapplicative(function () { + return biapplyJoker(dictApplicative.Apply0()); + }, function (v) { + return function (b) { + return Control_Applicative.pure(dictApplicative)(b); + }; + }); +}; + +module.exports = { + Joker: Joker, + newtypeJoker: newtypeJoker, + eqJoker: eqJoker, + ordJoker: ordJoker, + showJoker: showJoker, + functorJoker: functorJoker, + bifunctorJoker: bifunctorJoker, + biapplyJoker: biapplyJoker, + biapplicativeJoker: biapplicativeJoker +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Biapplicative/index.js":"Sd0N","../Control.Biapply/index.js":"X0ga","../Data.Bifunctor/index.js":"e2Wc","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Show/index.js":"mFY7"}],"U+97":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Biapplicative = require("../Control.Biapplicative/index.js"); + +var Control_Biapply = require("../Control.Biapply/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Product = function () { + function Product(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Product.create = function (value0) { + return function (value1) { + return new Product(value0, value1); + }; + }; + + return Product; +}(); + +var showProduct = function showProduct(dictShow) { + return function (dictShow1) { + return new Data_Show.Show(function (v) { + return "(Product " + (Data_Show.show(dictShow)(v.value0) + (" " + (Data_Show.show(dictShow1)(v.value1) + ")"))); + }); + }; +}; + +var eqProduct = function eqProduct(dictEq) { + return function (dictEq1) { + return new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq(dictEq1)(x.value1)(y.value1); + }; + }); + }; +}; + +var ordProduct = function ordProduct(dictOrd) { + return function (dictOrd1) { + return new Data_Ord.Ord(function () { + return eqProduct(dictOrd.Eq0())(dictOrd1.Eq0()); + }, function (x) { + return function (y) { + var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0); + + if (v instanceof Data_Ordering.LT) { + return Data_Ordering.LT.value; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Data_Ordering.GT.value; + } + + ; + return Data_Ord.compare(dictOrd1)(x.value1)(y.value1); + }; + }); + }; +}; + +var bifunctorProduct = function bifunctorProduct(dictBifunctor) { + return function (dictBifunctor1) { + return new Data_Bifunctor.Bifunctor(function (f) { + return function (g) { + return function (v) { + return new Product(Data_Bifunctor.bimap(dictBifunctor)(f)(g)(v.value0), Data_Bifunctor.bimap(dictBifunctor1)(f)(g)(v.value1)); + }; + }; + }); + }; +}; + +var biapplyProduct = function biapplyProduct(dictBiapply) { + return function (dictBiapply1) { + return new Control_Biapply.Biapply(function () { + return bifunctorProduct(dictBiapply.Bifunctor0())(dictBiapply1.Bifunctor0()); + }, function (v) { + return function (v1) { + return new Product(Control_Biapply.biapply(dictBiapply)(v.value0)(v1.value0), Control_Biapply.biapply(dictBiapply1)(v.value1)(v1.value1)); + }; + }); + }; +}; + +var biapplicativeProduct = function biapplicativeProduct(dictBiapplicative) { + return function (dictBiapplicative1) { + return new Control_Biapplicative.Biapplicative(function () { + return biapplyProduct(dictBiapplicative.Biapply0())(dictBiapplicative1.Biapply0()); + }, function (a) { + return function (b) { + return new Product(Control_Biapplicative.bipure(dictBiapplicative)(a)(b), Control_Biapplicative.bipure(dictBiapplicative1)(a)(b)); + }; + }); + }; +}; + +module.exports = { + Product: Product, + eqProduct: eqProduct, + ordProduct: ordProduct, + showProduct: showProduct, + bifunctorProduct: bifunctorProduct, + biapplyProduct: biapplyProduct, + biapplicativeProduct: biapplicativeProduct +}; +},{"../Control.Biapplicative/index.js":"Sd0N","../Control.Biapply/index.js":"X0ga","../Data.Bifunctor/index.js":"e2Wc","../Data.Eq/index.js":"Pq4F","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7"}],"U78Q":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Biapplicative = require("../Control.Biapplicative/index.js"); + +var Control_Biapply = require("../Control.Biapply/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Wrap = function Wrap(x) { + return x; +}; + +var showWrap = function showWrap(dictShow) { + return new Data_Show.Show(function (v) { + return "(Wrap " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var ordWrap = function ordWrap(dictOrd) { + return dictOrd; +}; + +var newtypeWrap = new Data_Newtype.Newtype(function (n) { + return n; +}, Wrap); + +var functorWrap = function functorWrap(dictBifunctor) { + return new Data_Functor.Functor(function (f) { + return function (v) { + return Data_Bifunctor.rmap(dictBifunctor)(f)(v); + }; + }); +}; + +var eqWrap = function eqWrap(dictEq) { + return dictEq; +}; + +var bifunctorWrap = function bifunctorWrap(dictBifunctor) { + return new Data_Bifunctor.Bifunctor(function (f) { + return function (g) { + return function (v) { + return Data_Bifunctor.bimap(dictBifunctor)(f)(g)(v); + }; + }; + }); +}; + +var biapplyWrap = function biapplyWrap(dictBiapply) { + return new Control_Biapply.Biapply(function () { + return bifunctorWrap(dictBiapply.Bifunctor0()); + }, function (v) { + return function (v1) { + return Control_Biapply.biapply(dictBiapply)(v)(v1); + }; + }); +}; + +var biapplicativeWrap = function biapplicativeWrap(dictBiapplicative) { + return new Control_Biapplicative.Biapplicative(function () { + return biapplyWrap(dictBiapplicative.Biapply0()); + }, function (a) { + return function (b) { + return Control_Biapplicative.bipure(dictBiapplicative)(a)(b); + }; + }); +}; + +module.exports = { + Wrap: Wrap, + newtypeWrap: newtypeWrap, + eqWrap: eqWrap, + ordWrap: ordWrap, + showWrap: showWrap, + functorWrap: functorWrap, + bifunctorWrap: bifunctorWrap, + biapplyWrap: biapplyWrap, + biapplicativeWrap: biapplicativeWrap +}; +},{"../Control.Biapplicative/index.js":"Sd0N","../Control.Biapply/index.js":"X0ga","../Data.Bifunctor/index.js":"e2Wc","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Show/index.js":"mFY7"}],"oRQn":[function(require,module,exports) { +"use strict"; // jshint maxparams: 3 + +exports.traverseArrayImpl = function () { + function array1(a) { + return [a]; + } + + function array2(a) { + return function (b) { + return [a, b]; + }; + } + + function array3(a) { + return function (b) { + return function (c) { + return [a, b, c]; + }; + }; + } + + function concat2(xs) { + return function (ys) { + return xs.concat(ys); + }; + } + + return function (apply) { + return function (map) { + return function (pure) { + return function (f) { + return function (array) { + function go(bot, top) { + switch (top - bot) { + case 0: + return pure([]); + + case 1: + return map(array1)(f(array[bot])); + + case 2: + return apply(map(array2)(f(array[bot])))(f(array[bot + 1])); + + case 3: + return apply(apply(map(array3)(f(array[bot])))(f(array[bot + 1])))(f(array[bot + 2])); + + default: + // This slightly tricky pivot selection aims to produce two + // even-length partitions where possible. + var pivot = bot + Math.floor((top - bot) / 4) * 2; + return apply(map(concat2)(go(bot, pivot)))(go(pivot, top)); + } + } + + return go(0, array.length); + }; + }; + }; + }; + }; +}(); +},{}],"W/l6":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var First = function First(x) { + return x; +}; + +var showFirst = function showFirst(dictShow) { + return new Data_Show.Show(function (v) { + return "First (" + (Data_Show.show(Data_Maybe.showMaybe(dictShow))(v) + ")"); + }); +}; + +var semigroupFirst = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + if (v instanceof Data_Maybe.Just) { + return v; + } + + ; + return v1; + }; +}); + +var ordFirst = function ordFirst(dictOrd) { + return Data_Maybe.ordMaybe(dictOrd); +}; + +var ord1First = Data_Maybe.ord1Maybe; +var newtypeFirst = new Data_Newtype.Newtype(function (n) { + return n; +}, First); +var monoidFirst = new Data_Monoid.Monoid(function () { + return semigroupFirst; +}, Data_Maybe.Nothing.value); +var monadFirst = Data_Maybe.monadMaybe; +var invariantFirst = Data_Maybe.invariantMaybe; +var functorFirst = Data_Maybe.functorMaybe; +var extendFirst = Data_Maybe.extendMaybe; + +var eqFirst = function eqFirst(dictEq) { + return Data_Maybe.eqMaybe(dictEq); +}; + +var eq1First = Data_Maybe.eq1Maybe; + +var boundedFirst = function boundedFirst(dictBounded) { + return Data_Maybe.boundedMaybe(dictBounded); +}; + +var bindFirst = Data_Maybe.bindMaybe; +var applyFirst = Data_Maybe.applyMaybe; +var applicativeFirst = Data_Maybe.applicativeMaybe; +var altFirst = new Control_Alt.Alt(function () { + return functorFirst; +}, Data_Semigroup.append(semigroupFirst)); +var plusFirst = new Control_Plus.Plus(function () { + return altFirst; +}, Data_Monoid.mempty(monoidFirst)); +var alternativeFirst = new Control_Alternative.Alternative(function () { + return applicativeFirst; +}, function () { + return plusFirst; +}); +var monadZeroFirst = new Control_MonadZero.MonadZero(function () { + return alternativeFirst; +}, function () { + return monadFirst; +}); +module.exports = { + First: First, + newtypeFirst: newtypeFirst, + eqFirst: eqFirst, + eq1First: eq1First, + ordFirst: ordFirst, + ord1First: ord1First, + boundedFirst: boundedFirst, + functorFirst: functorFirst, + invariantFirst: invariantFirst, + applyFirst: applyFirst, + applicativeFirst: applicativeFirst, + bindFirst: bindFirst, + monadFirst: monadFirst, + extendFirst: extendFirst, + showFirst: showFirst, + semigroupFirst: semigroupFirst, + monoidFirst: monoidFirst, + altFirst: altFirst, + plusFirst: plusFirst, + alternativeFirst: alternativeFirst, + monadZeroFirst: monadZeroFirst +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"aQky":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Last = function Last(x) { + return x; +}; + +var showLast = function showLast(dictShow) { + return new Data_Show.Show(function (v) { + return "(Last " + (Data_Show.show(Data_Maybe.showMaybe(dictShow))(v) + ")"); + }); +}; + +var semigroupLast = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + if (v1 instanceof Data_Maybe.Just) { + return v1; + } + + ; + + if (v1 instanceof Data_Maybe.Nothing) { + return v; + } + + ; + throw new Error("Failed pattern match at Data.Maybe.Last (line 52, column 1 - line 54, column 36): " + [v.constructor.name, v1.constructor.name]); + }; +}); + +var ordLast = function ordLast(dictOrd) { + return Data_Maybe.ordMaybe(dictOrd); +}; + +var ord1Last = Data_Maybe.ord1Maybe; +var newtypeLast = new Data_Newtype.Newtype(function (n) { + return n; +}, Last); +var monoidLast = new Data_Monoid.Monoid(function () { + return semigroupLast; +}, Data_Maybe.Nothing.value); +var monadLast = Data_Maybe.monadMaybe; +var invariantLast = Data_Maybe.invariantMaybe; +var functorLast = Data_Maybe.functorMaybe; +var extendLast = Data_Maybe.extendMaybe; + +var eqLast = function eqLast(dictEq) { + return Data_Maybe.eqMaybe(dictEq); +}; + +var eq1Last = Data_Maybe.eq1Maybe; + +var boundedLast = function boundedLast(dictBounded) { + return Data_Maybe.boundedMaybe(dictBounded); +}; + +var bindLast = Data_Maybe.bindMaybe; +var applyLast = Data_Maybe.applyMaybe; +var applicativeLast = Data_Maybe.applicativeMaybe; +var altLast = new Control_Alt.Alt(function () { + return functorLast; +}, Data_Semigroup.append(semigroupLast)); +var plusLast = new Control_Plus.Plus(function () { + return altLast; +}, Data_Monoid.mempty(monoidLast)); +var alternativeLast = new Control_Alternative.Alternative(function () { + return applicativeLast; +}, function () { + return plusLast; +}); +var monadZeroLast = new Control_MonadZero.MonadZero(function () { + return alternativeLast; +}, function () { + return monadLast; +}); +module.exports = { + Last: Last, + newtypeLast: newtypeLast, + eqLast: eqLast, + eq1Last: eq1Last, + ordLast: ordLast, + ord1Last: ord1Last, + boundedLast: boundedLast, + functorLast: functorLast, + invariantLast: invariantLast, + applyLast: applyLast, + applicativeLast: applicativeLast, + bindLast: bindLast, + monadLast: monadLast, + extendLast: extendLast, + showLast: showLast, + semigroupLast: semigroupLast, + monoidLast: monoidLast, + altLast: altLast, + plusLast: plusLast, + alternativeLast: alternativeLast, + monadZeroLast: monadZeroLast +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"LbSr":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var StateR = function StateR(x) { + return x; +}; + +var StateL = function StateL(x) { + return x; +}; + +var stateR = function stateR(v) { + return v; +}; + +var stateL = function stateL(v) { + return v; +}; + +var functorStateR = new Data_Functor.Functor(function (f) { + return function (k) { + return function (s) { + var v = stateR(k)(s); + return { + accum: v.accum, + value: f(v.value) + }; + }; + }; +}); +var functorStateL = new Data_Functor.Functor(function (f) { + return function (k) { + return function (s) { + var v = stateL(k)(s); + return { + accum: v.accum, + value: f(v.value) + }; + }; + }; +}); +var applyStateR = new Control_Apply.Apply(function () { + return functorStateR; +}, function (f) { + return function (x) { + return function (s) { + var v = stateR(x)(s); + var v1 = stateR(f)(v.accum); + return { + accum: v1.accum, + value: v1.value(v.value) + }; + }; + }; +}); +var applyStateL = new Control_Apply.Apply(function () { + return functorStateL; +}, function (f) { + return function (x) { + return function (s) { + var v = stateL(f)(s); + var v1 = stateL(x)(v.accum); + return { + accum: v1.accum, + value: v.value(v1.value) + }; + }; + }; +}); +var applicativeStateR = new Control_Applicative.Applicative(function () { + return applyStateR; +}, function (a) { + return function (s) { + return { + accum: s, + value: a + }; + }; +}); +var applicativeStateL = new Control_Applicative.Applicative(function () { + return applyStateL; +}, function (a) { + return function (s) { + return { + accum: s, + value: a + }; + }; +}); +module.exports = { + StateL: StateL, + stateL: stateL, + StateR: StateR, + stateR: stateR, + functorStateL: functorStateL, + applyStateL: applyStateL, + applicativeStateL: applicativeStateL, + functorStateR: functorStateR, + applyStateR: applyStateR, + applicativeStateR: applicativeStateR +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Data.Functor/index.js":"+0AE"}],"n7EE":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Maybe_First = require("../Data.Maybe.First/index.js"); + +var Data_Maybe_Last = require("../Data.Maybe.Last/index.js"); + +var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js"); + +var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js"); + +var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js"); + +var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js"); + +var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js"); + +var Data_Traversable_Accum_Internal = require("../Data.Traversable.Accum.Internal/index.js"); + +var Traversable = function Traversable(Foldable1, Functor0, sequence, traverse) { + this.Foldable1 = Foldable1; + this.Functor0 = Functor0; + this.sequence = sequence; + this.traverse = traverse; +}; + +var traverse = function traverse(dict) { + return dict.traverse; +}; + +var traversableMultiplicative = new Traversable(function () { + return Data_Foldable.foldableMultiplicative; +}, function () { + return Data_Monoid_Multiplicative.functorMultiplicative; +}, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Multiplicative.Multiplicative)(v); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Multiplicative.Multiplicative)(f(v)); + }; + }; +}); +var traversableMaybe = new Traversable(function () { + return Data_Foldable.foldableMaybe; +}, function () { + return Data_Maybe.functorMaybe; +}, function (dictApplicative) { + return function (v) { + if (v instanceof Data_Maybe.Nothing) { + return Control_Applicative.pure(dictApplicative)(Data_Maybe.Nothing.value); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe.Just.create)(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.Traversable (line 86, column 1 - line 90, column 33): " + [v.constructor.name]); + }; +}, function (dictApplicative) { + return function (v) { + return function (v1) { + if (v1 instanceof Data_Maybe.Nothing) { + return Control_Applicative.pure(dictApplicative)(Data_Maybe.Nothing.value); + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe.Just.create)(v(v1.value0)); + } + + ; + throw new Error("Failed pattern match at Data.Traversable (line 86, column 1 - line 90, column 33): " + [v.constructor.name, v1.constructor.name]); + }; + }; +}); +var traversableDual = new Traversable(function () { + return Data_Foldable.foldableDual; +}, function () { + return Data_Monoid_Dual.functorDual; +}, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Dual.Dual)(v); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Dual.Dual)(f(v)); + }; + }; +}); +var traversableDisj = new Traversable(function () { + return Data_Foldable.foldableDisj; +}, function () { + return Data_Monoid_Disj.functorDisj; +}, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Disj.Disj)(v); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Disj.Disj)(f(v)); + }; + }; +}); +var traversableConj = new Traversable(function () { + return Data_Foldable.foldableConj; +}, function () { + return Data_Monoid_Conj.functorConj; +}, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Conj.Conj)(v); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Conj.Conj)(f(v)); + }; + }; +}); +var traversableAdditive = new Traversable(function () { + return Data_Foldable.foldableAdditive; +}, function () { + return Data_Monoid_Additive.functorAdditive; +}, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Additive.Additive)(v); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Additive.Additive)(f(v)); + }; + }; +}); + +var sequenceDefault = function sequenceDefault(dictTraversable) { + return function (dictApplicative) { + return traverse(dictTraversable)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var traversableArray = new Traversable(function () { + return Data_Foldable.foldableArray; +}, function () { + return Data_Functor.functorArray; +}, function (dictApplicative) { + return sequenceDefault(traversableArray)(dictApplicative); +}, function (dictApplicative) { + return $foreign.traverseArrayImpl(Control_Apply.apply(dictApplicative.Apply0()))(Data_Functor.map(dictApplicative.Apply0().Functor0()))(Control_Applicative.pure(dictApplicative)); +}); + +var sequence = function sequence(dict) { + return dict.sequence; +}; + +var traversableFirst = new Traversable(function () { + return Data_Foldable.foldableFirst; +}, function () { + return Data_Maybe_First.functorFirst; +}, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_First.First)(sequence(traversableMaybe)(dictApplicative)(v)); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_First.First)(traverse(traversableMaybe)(dictApplicative)(f)(v)); + }; + }; +}); +var traversableLast = new Traversable(function () { + return Data_Foldable.foldableLast; +}, function () { + return Data_Maybe_Last.functorLast; +}, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_Last.Last)(sequence(traversableMaybe)(dictApplicative)(v)); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_Last.Last)(traverse(traversableMaybe)(dictApplicative)(f)(v)); + }; + }; +}); + +var traverseDefault = function traverseDefault(dictTraversable) { + return function (dictApplicative) { + return function (f) { + return function (ta) { + return sequence(dictTraversable)(dictApplicative)(Data_Functor.map(dictTraversable.Functor0())(f)(ta)); + }; + }; + }; +}; + +var mapAccumR = function mapAccumR(dictTraversable) { + return function (f) { + return function (s0) { + return function (xs) { + return Data_Traversable_Accum_Internal.stateR(traverse(dictTraversable)(Data_Traversable_Accum_Internal.applicativeStateR)(function (a) { + return function (s) { + return f(s)(a); + }; + })(xs))(s0); + }; + }; + }; +}; + +var scanr = function scanr(dictTraversable) { + return function (f) { + return function (b0) { + return function (xs) { + return mapAccumR(dictTraversable)(function (b) { + return function (a) { + var b$prime = f(a)(b); + return { + accum: b$prime, + value: b$prime + }; + }; + })(b0)(xs).value; + }; + }; + }; +}; + +var mapAccumL = function mapAccumL(dictTraversable) { + return function (f) { + return function (s0) { + return function (xs) { + return Data_Traversable_Accum_Internal.stateL(traverse(dictTraversable)(Data_Traversable_Accum_Internal.applicativeStateL)(function (a) { + return function (s) { + return f(s)(a); + }; + })(xs))(s0); + }; + }; + }; +}; + +var scanl = function scanl(dictTraversable) { + return function (f) { + return function (b0) { + return function (xs) { + return mapAccumL(dictTraversable)(function (b) { + return function (a) { + var b$prime = f(b)(a); + return { + accum: b$prime, + value: b$prime + }; + }; + })(b0)(xs).value; + }; + }; + }; +}; + +var $$for = function $$for(dictApplicative) { + return function (dictTraversable) { + return function (x) { + return function (f) { + return traverse(dictTraversable)(dictApplicative)(f)(x); + }; + }; + }; +}; + +module.exports = { + Traversable: Traversable, + traverse: traverse, + sequence: sequence, + traverseDefault: traverseDefault, + sequenceDefault: sequenceDefault, + "for": $$for, + scanl: scanl, + scanr: scanr, + mapAccumL: mapAccumL, + mapAccumR: mapAccumR, + traversableArray: traversableArray, + traversableMaybe: traversableMaybe, + traversableFirst: traversableFirst, + traversableLast: traversableLast, + traversableAdditive: traversableAdditive, + traversableDual: traversableDual, + traversableConj: traversableConj, + traversableDisj: traversableDisj, + traversableMultiplicative: traversableMultiplicative +}; +},{"./foreign.js":"oRQn","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Foldable/index.js":"eVDl","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Maybe.First/index.js":"W/l6","../Data.Maybe.Last/index.js":"aQky","../Data.Monoid.Additive/index.js":"fHyj","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Multiplicative/index.js":"y5cd","../Data.Traversable.Accum.Internal/index.js":"LbSr"}],"8nb9":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Bifoldable = require("../Data.Bifoldable/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Bifunctor_Clown = require("../Data.Bifunctor.Clown/index.js"); + +var Data_Bifunctor_Flip = require("../Data.Bifunctor.Flip/index.js"); + +var Data_Bifunctor_Joker = require("../Data.Bifunctor.Joker/index.js"); + +var Data_Bifunctor_Product = require("../Data.Bifunctor.Product/index.js"); + +var Data_Bifunctor_Wrap = require("../Data.Bifunctor.Wrap/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Bitraversable = function Bitraversable(Bifoldable1, Bifunctor0, bisequence, bitraverse) { + this.Bifoldable1 = Bifoldable1; + this.Bifunctor0 = Bifunctor0; + this.bisequence = bisequence; + this.bitraverse = bitraverse; +}; + +var bitraverse = function bitraverse(dict) { + return dict.bitraverse; +}; + +var lfor = function lfor(dictBitraversable) { + return function (dictApplicative) { + return function (t) { + return function (f) { + return bitraverse(dictBitraversable)(dictApplicative)(f)(Control_Applicative.pure(dictApplicative))(t); + }; + }; + }; +}; + +var ltraverse = function ltraverse(dictBitraversable) { + return function (dictApplicative) { + return function (f) { + return bitraverse(dictBitraversable)(dictApplicative)(f)(Control_Applicative.pure(dictApplicative)); + }; + }; +}; + +var rfor = function rfor(dictBitraversable) { + return function (dictApplicative) { + return function (t) { + return function (f) { + return bitraverse(dictBitraversable)(dictApplicative)(Control_Applicative.pure(dictApplicative))(f)(t); + }; + }; + }; +}; + +var rtraverse = function rtraverse(dictBitraversable) { + return function (dictApplicative) { + return bitraverse(dictBitraversable)(dictApplicative)(Control_Applicative.pure(dictApplicative)); + }; +}; + +var bitraversableJoker = function bitraversableJoker(dictTraversable) { + return new Bitraversable(function () { + return Data_Bifoldable.bifoldableJoker(dictTraversable.Foldable1()); + }, function () { + return Data_Bifunctor_Joker.bifunctorJoker(dictTraversable.Functor0()); + }, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Joker.Joker)(Data_Traversable.sequence(dictTraversable)(dictApplicative)(v)); + }; + }, function (dictApplicative) { + return function (v) { + return function (r) { + return function (v1) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Joker.Joker)(Data_Traversable.traverse(dictTraversable)(dictApplicative)(r)(v1)); + }; + }; + }; + }); +}; + +var bitraversableClown = function bitraversableClown(dictTraversable) { + return new Bitraversable(function () { + return Data_Bifoldable.bifoldableClown(dictTraversable.Foldable1()); + }, function () { + return Data_Bifunctor_Clown.bifunctorClown(dictTraversable.Functor0()); + }, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Clown.Clown)(Data_Traversable.sequence(dictTraversable)(dictApplicative)(v)); + }; + }, function (dictApplicative) { + return function (l) { + return function (v) { + return function (v1) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Clown.Clown)(Data_Traversable.traverse(dictTraversable)(dictApplicative)(l)(v1)); + }; + }; + }; + }); +}; + +var bisequenceDefault = function bisequenceDefault(dictBitraversable) { + return function (dictApplicative) { + return bitraverse(dictBitraversable)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var bisequence = function bisequence(dict) { + return dict.bisequence; +}; + +var bitraversableFlip = function bitraversableFlip(dictBitraversable) { + return new Bitraversable(function () { + return Data_Bifoldable.bifoldableFlip(dictBitraversable.Bifoldable1()); + }, function () { + return Data_Bifunctor_Flip.bifunctorFlip(dictBitraversable.Bifunctor0()); + }, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Flip.Flip)(bisequence(dictBitraversable)(dictApplicative)(v)); + }; + }, function (dictApplicative) { + return function (r) { + return function (l) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Flip.Flip)(bitraverse(dictBitraversable)(dictApplicative)(l)(r)(v)); + }; + }; + }; + }); +}; + +var bitraversableProduct = function bitraversableProduct(dictBitraversable) { + return function (dictBitraversable1) { + return new Bitraversable(function () { + return Data_Bifoldable.bifoldableProduct(dictBitraversable.Bifoldable1())(dictBitraversable1.Bifoldable1()); + }, function () { + return Data_Bifunctor_Product.bifunctorProduct(dictBitraversable.Bifunctor0())(dictBitraversable1.Bifunctor0()); + }, function (dictApplicative) { + return function (v) { + return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Product.Product.create)(bisequence(dictBitraversable)(dictApplicative)(v.value0)))(bisequence(dictBitraversable1)(dictApplicative)(v.value1)); + }; + }, function (dictApplicative) { + return function (l) { + return function (r) { + return function (v) { + return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Product.Product.create)(bitraverse(dictBitraversable)(dictApplicative)(l)(r)(v.value0)))(bitraverse(dictBitraversable1)(dictApplicative)(l)(r)(v.value1)); + }; + }; + }; + }); + }; +}; + +var bitraversableWrap = function bitraversableWrap(dictBitraversable) { + return new Bitraversable(function () { + return Data_Bifoldable.bifoldableWrap(dictBitraversable.Bifoldable1()); + }, function () { + return Data_Bifunctor_Wrap.bifunctorWrap(dictBitraversable.Bifunctor0()); + }, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Wrap.Wrap)(bisequence(dictBitraversable)(dictApplicative)(v)); + }; + }, function (dictApplicative) { + return function (l) { + return function (r) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Wrap.Wrap)(bitraverse(dictBitraversable)(dictApplicative)(l)(r)(v)); + }; + }; + }; + }); +}; + +var bitraverseDefault = function bitraverseDefault(dictBitraversable) { + return function (dictApplicative) { + return function (f) { + return function (g) { + return function (t) { + return bisequence(dictBitraversable)(dictApplicative)(Data_Bifunctor.bimap(dictBitraversable.Bifunctor0())(f)(g)(t)); + }; + }; + }; + }; +}; + +var bifor = function bifor(dictBitraversable) { + return function (dictApplicative) { + return function (t) { + return function (f) { + return function (g) { + return bitraverse(dictBitraversable)(dictApplicative)(f)(g)(t); + }; + }; + }; + }; +}; + +module.exports = { + Bitraversable: Bitraversable, + bitraverse: bitraverse, + bisequence: bisequence, + bitraverseDefault: bitraverseDefault, + bisequenceDefault: bisequenceDefault, + ltraverse: ltraverse, + rtraverse: rtraverse, + bifor: bifor, + lfor: lfor, + rfor: rfor, + bitraversableClown: bitraversableClown, + bitraversableJoker: bitraversableJoker, + bitraversableFlip: bitraversableFlip, + bitraversableProduct: bitraversableProduct, + bitraversableWrap: bitraversableWrap +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Bifoldable/index.js":"wjQo","../Data.Bifunctor/index.js":"e2Wc","../Data.Bifunctor.Clown/index.js":"Wuz6","../Data.Bifunctor.Flip/index.js":"EM73","../Data.Bifunctor.Joker/index.js":"O/Oh","../Data.Bifunctor.Product/index.js":"U+97","../Data.Bifunctor.Wrap/index.js":"U78Q","../Data.Functor/index.js":"+0AE","../Data.Traversable/index.js":"n7EE"}],"ZgoH":[function(require,module,exports) { +"use strict"; + +exports.mapWithIndexArray = function (f) { + return function (xs) { + var l = xs.length; + var result = Array(l); + + for (var i = 0; i < l; i++) { + result[i] = f(i)(xs[i]); + } + + return result; + }; +}; +},{}],"OHRN":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Maybe_First = require("../Data.Maybe.First/index.js"); + +var Data_Maybe_Last = require("../Data.Maybe.Last/index.js"); + +var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js"); + +var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js"); + +var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js"); + +var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js"); + +var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var FunctorWithIndex = function FunctorWithIndex(Functor0, mapWithIndex) { + this.Functor0 = Functor0; + this.mapWithIndex = mapWithIndex; +}; + +var mapWithIndex = function mapWithIndex(dict) { + return dict.mapWithIndex; +}; + +var mapDefault = function mapDefault(dictFunctorWithIndex) { + return function (f) { + return mapWithIndex(dictFunctorWithIndex)(Data_Function["const"](f)); + }; +}; + +var functorWithIndexMultiplicative = new FunctorWithIndex(function () { + return Data_Monoid_Multiplicative.functorMultiplicative; +}, function (f) { + return Data_Functor.map(Data_Monoid_Multiplicative.functorMultiplicative)(f(Data_Unit.unit)); +}); +var functorWithIndexMaybe = new FunctorWithIndex(function () { + return Data_Maybe.functorMaybe; +}, function (f) { + return Data_Functor.map(Data_Maybe.functorMaybe)(f(Data_Unit.unit)); +}); +var functorWithIndexLast = new FunctorWithIndex(function () { + return Data_Maybe_Last.functorLast; +}, function (f) { + return Data_Functor.map(Data_Maybe_Last.functorLast)(f(Data_Unit.unit)); +}); +var functorWithIndexFirst = new FunctorWithIndex(function () { + return Data_Maybe_First.functorFirst; +}, function (f) { + return Data_Functor.map(Data_Maybe_First.functorFirst)(f(Data_Unit.unit)); +}); +var functorWithIndexDual = new FunctorWithIndex(function () { + return Data_Monoid_Dual.functorDual; +}, function (f) { + return Data_Functor.map(Data_Monoid_Dual.functorDual)(f(Data_Unit.unit)); +}); +var functorWithIndexDisj = new FunctorWithIndex(function () { + return Data_Monoid_Disj.functorDisj; +}, function (f) { + return Data_Functor.map(Data_Monoid_Disj.functorDisj)(f(Data_Unit.unit)); +}); +var functorWithIndexConj = new FunctorWithIndex(function () { + return Data_Monoid_Conj.functorConj; +}, function (f) { + return Data_Functor.map(Data_Monoid_Conj.functorConj)(f(Data_Unit.unit)); +}); +var functorWithIndexArray = new FunctorWithIndex(function () { + return Data_Functor.functorArray; +}, $foreign.mapWithIndexArray); +var functorWithIndexAdditive = new FunctorWithIndex(function () { + return Data_Monoid_Additive.functorAdditive; +}, function (f) { + return Data_Functor.map(Data_Monoid_Additive.functorAdditive)(f(Data_Unit.unit)); +}); +module.exports = { + FunctorWithIndex: FunctorWithIndex, + mapWithIndex: mapWithIndex, + mapDefault: mapDefault, + functorWithIndexArray: functorWithIndexArray, + functorWithIndexMaybe: functorWithIndexMaybe, + functorWithIndexFirst: functorWithIndexFirst, + functorWithIndexLast: functorWithIndexLast, + functorWithIndexAdditive: functorWithIndexAdditive, + functorWithIndexDual: functorWithIndexDual, + functorWithIndexConj: functorWithIndexConj, + functorWithIndexDisj: functorWithIndexDisj, + functorWithIndexMultiplicative: functorWithIndexMultiplicative +}; +},{"./foreign.js":"ZgoH","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Maybe.First/index.js":"W/l6","../Data.Maybe.Last/index.js":"aQky","../Data.Monoid.Additive/index.js":"fHyj","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Multiplicative/index.js":"y5cd","../Data.Unit/index.js":"NhVk"}],"9Efi":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js"); + +var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js"); + +var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js"); + +var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Tuple = function () { + function Tuple(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Tuple.create = function (value0) { + return function (value1) { + return new Tuple(value0, value1); + }; + }; + + return Tuple; +}(); + +var FoldableWithIndex = function FoldableWithIndex(Foldable0, foldMapWithIndex, foldlWithIndex, foldrWithIndex) { + this.Foldable0 = Foldable0; + this.foldMapWithIndex = foldMapWithIndex; + this.foldlWithIndex = foldlWithIndex; + this.foldrWithIndex = foldrWithIndex; +}; + +var foldrWithIndex = function foldrWithIndex(dict) { + return dict.foldrWithIndex; +}; + +var traverseWithIndex_ = function traverseWithIndex_(dictApplicative) { + return function (dictFoldableWithIndex) { + return function (f) { + return foldrWithIndex(dictFoldableWithIndex)(function (i) { + var $46 = Control_Apply.applySecond(dictApplicative.Apply0()); + var $47 = f(i); + return function ($48) { + return $46($47($48)); + }; + })(Control_Applicative.pure(dictApplicative)(Data_Unit.unit)); + }; + }; +}; + +var forWithIndex_ = function forWithIndex_(dictApplicative) { + return function (dictFoldableWithIndex) { + return Data_Function.flip(traverseWithIndex_(dictApplicative)(dictFoldableWithIndex)); + }; +}; + +var foldrDefault = function foldrDefault(dictFoldableWithIndex) { + return function (f) { + return foldrWithIndex(dictFoldableWithIndex)(Data_Function["const"](f)); + }; +}; + +var foldlWithIndex = function foldlWithIndex(dict) { + return dict.foldlWithIndex; +}; + +var foldlDefault = function foldlDefault(dictFoldableWithIndex) { + return function (f) { + return foldlWithIndex(dictFoldableWithIndex)(Data_Function["const"](f)); + }; +}; + +var foldableWithIndexMultiplicative = new FoldableWithIndex(function () { + return Data_Foldable.foldableMultiplicative; +}, function (dictMonoid) { + return function (f) { + return Data_Foldable.foldMap(Data_Foldable.foldableMultiplicative)(dictMonoid)(f(Data_Unit.unit)); + }; +}, function (f) { + return Data_Foldable.foldl(Data_Foldable.foldableMultiplicative)(f(Data_Unit.unit)); +}, function (f) { + return Data_Foldable.foldr(Data_Foldable.foldableMultiplicative)(f(Data_Unit.unit)); +}); +var foldableWithIndexMaybe = new FoldableWithIndex(function () { + return Data_Foldable.foldableMaybe; +}, function (dictMonoid) { + return function (f) { + return Data_Foldable.foldMap(Data_Foldable.foldableMaybe)(dictMonoid)(f(Data_Unit.unit)); + }; +}, function (f) { + return Data_Foldable.foldl(Data_Foldable.foldableMaybe)(f(Data_Unit.unit)); +}, function (f) { + return Data_Foldable.foldr(Data_Foldable.foldableMaybe)(f(Data_Unit.unit)); +}); +var foldableWithIndexLast = new FoldableWithIndex(function () { + return Data_Foldable.foldableLast; +}, function (dictMonoid) { + return function (f) { + return Data_Foldable.foldMap(Data_Foldable.foldableLast)(dictMonoid)(f(Data_Unit.unit)); + }; +}, function (f) { + return Data_Foldable.foldl(Data_Foldable.foldableLast)(f(Data_Unit.unit)); +}, function (f) { + return Data_Foldable.foldr(Data_Foldable.foldableLast)(f(Data_Unit.unit)); +}); +var foldableWithIndexFirst = new FoldableWithIndex(function () { + return Data_Foldable.foldableFirst; +}, function (dictMonoid) { + return function (f) { + return Data_Foldable.foldMap(Data_Foldable.foldableFirst)(dictMonoid)(f(Data_Unit.unit)); + }; +}, function (f) { + return Data_Foldable.foldl(Data_Foldable.foldableFirst)(f(Data_Unit.unit)); +}, function (f) { + return Data_Foldable.foldr(Data_Foldable.foldableFirst)(f(Data_Unit.unit)); +}); +var foldableWithIndexDual = new FoldableWithIndex(function () { + return Data_Foldable.foldableDual; +}, function (dictMonoid) { + return function (f) { + return Data_Foldable.foldMap(Data_Foldable.foldableDual)(dictMonoid)(f(Data_Unit.unit)); + }; +}, function (f) { + return Data_Foldable.foldl(Data_Foldable.foldableDual)(f(Data_Unit.unit)); +}, function (f) { + return Data_Foldable.foldr(Data_Foldable.foldableDual)(f(Data_Unit.unit)); +}); +var foldableWithIndexDisj = new FoldableWithIndex(function () { + return Data_Foldable.foldableDisj; +}, function (dictMonoid) { + return function (f) { + return Data_Foldable.foldMap(Data_Foldable.foldableDisj)(dictMonoid)(f(Data_Unit.unit)); + }; +}, function (f) { + return Data_Foldable.foldl(Data_Foldable.foldableDisj)(f(Data_Unit.unit)); +}, function (f) { + return Data_Foldable.foldr(Data_Foldable.foldableDisj)(f(Data_Unit.unit)); +}); +var foldableWithIndexConj = new FoldableWithIndex(function () { + return Data_Foldable.foldableConj; +}, function (dictMonoid) { + return function (f) { + return Data_Foldable.foldMap(Data_Foldable.foldableConj)(dictMonoid)(f(Data_Unit.unit)); + }; +}, function (f) { + return Data_Foldable.foldl(Data_Foldable.foldableConj)(f(Data_Unit.unit)); +}, function (f) { + return Data_Foldable.foldr(Data_Foldable.foldableConj)(f(Data_Unit.unit)); +}); +var foldableWithIndexAdditive = new FoldableWithIndex(function () { + return Data_Foldable.foldableAdditive; +}, function (dictMonoid) { + return function (f) { + return Data_Foldable.foldMap(Data_Foldable.foldableAdditive)(dictMonoid)(f(Data_Unit.unit)); + }; +}, function (f) { + return Data_Foldable.foldl(Data_Foldable.foldableAdditive)(f(Data_Unit.unit)); +}, function (f) { + return Data_Foldable.foldr(Data_Foldable.foldableAdditive)(f(Data_Unit.unit)); +}); + +var foldWithIndexM = function foldWithIndexM(dictFoldableWithIndex) { + return function (dictMonad) { + return function (f) { + return function (a0) { + return foldlWithIndex(dictFoldableWithIndex)(function (i) { + return function (ma) { + return function (b) { + return Control_Bind.bind(dictMonad.Bind1())(ma)(Data_Function.flip(f(i))(b)); + }; + }; + })(Control_Applicative.pure(dictMonad.Applicative0())(a0)); + }; + }; + }; +}; + +var foldMapWithIndexDefaultR = function foldMapWithIndexDefaultR(dictFoldableWithIndex) { + return function (dictMonoid) { + return function (f) { + return foldrWithIndex(dictFoldableWithIndex)(function (i) { + return function (x) { + return function (acc) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(f(i)(x))(acc); + }; + }; + })(Data_Monoid.mempty(dictMonoid)); + }; + }; +}; + +var foldableWithIndexArray = new FoldableWithIndex(function () { + return Data_Foldable.foldableArray; +}, function (dictMonoid) { + return foldMapWithIndexDefaultR(foldableWithIndexArray)(dictMonoid); +}, function (f) { + return function (z) { + var $49 = Data_Foldable.foldl(Data_Foldable.foldableArray)(function (y) { + return function (v) { + return f(v.value0)(y)(v.value1); + }; + })(z); + var $50 = Data_FunctorWithIndex.mapWithIndex(Data_FunctorWithIndex.functorWithIndexArray)(Tuple.create); + return function ($51) { + return $49($50($51)); + }; + }; +}, function (f) { + return function (z) { + var $52 = Data_Foldable.foldr(Data_Foldable.foldableArray)(function (v) { + return function (y) { + return f(v.value0)(v.value1)(y); + }; + })(z); + var $53 = Data_FunctorWithIndex.mapWithIndex(Data_FunctorWithIndex.functorWithIndexArray)(Tuple.create); + return function ($54) { + return $52($53($54)); + }; + }; +}); + +var foldMapWithIndexDefaultL = function foldMapWithIndexDefaultL(dictFoldableWithIndex) { + return function (dictMonoid) { + return function (f) { + return foldlWithIndex(dictFoldableWithIndex)(function (i) { + return function (acc) { + return function (x) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(acc)(f(i)(x)); + }; + }; + })(Data_Monoid.mempty(dictMonoid)); + }; + }; +}; + +var foldMapWithIndex = function foldMapWithIndex(dict) { + return dict.foldMapWithIndex; +}; + +var foldlWithIndexDefault = function foldlWithIndexDefault(dictFoldableWithIndex) { + return function (c) { + return function (u) { + return function (xs) { + return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(Data_Newtype.unwrap(Data_Newtype.newtypeDual)(foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Dual.monoidDual(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn)))(function (i) { + var $55 = Data_Function.flip(c(i)); + return function ($56) { + return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($55($56))); + }; + })(xs)))(u); + }; + }; + }; +}; + +var foldrWithIndexDefault = function foldrWithIndexDefault(dictFoldableWithIndex) { + return function (c) { + return function (u) { + return function (xs) { + return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(function (i) { + var $57 = c(i); + return function ($58) { + return Data_Monoid_Endo.Endo($57($58)); + }; + })(xs))(u); + }; + }; + }; +}; + +var surroundMapWithIndex = function surroundMapWithIndex(dictFoldableWithIndex) { + return function (dictSemigroup) { + return function (d) { + return function (t) { + return function (f) { + var joined = function joined(i) { + return function (a) { + return function (m) { + return Data_Semigroup.append(dictSemigroup)(d)(Data_Semigroup.append(dictSemigroup)(t(i)(a))(m)); + }; + }; + }; + + return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(joined)(f))(d); + }; + }; + }; + }; +}; + +var foldMapDefault = function foldMapDefault(dictFoldableWithIndex) { + return function (dictMonoid) { + return function (f) { + return foldMapWithIndex(dictFoldableWithIndex)(dictMonoid)(Data_Function["const"](f)); + }; + }; +}; + +var findWithIndex = function findWithIndex(dictFoldableWithIndex) { + return function (p) { + var go = function go(v) { + return function (v1) { + return function (v2) { + if (v1 instanceof Data_Maybe.Nothing && p(v)(v2)) { + return new Data_Maybe.Just({ + index: v, + value: v2 + }); + } + + ; + return v1; + }; + }; + }; + + return foldlWithIndex(dictFoldableWithIndex)(go)(Data_Maybe.Nothing.value); + }; +}; + +var anyWithIndex = function anyWithIndex(dictFoldableWithIndex) { + return function (dictHeytingAlgebra) { + return function (t) { + var $59 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj); + var $60 = foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Disj.monoidDisj(dictHeytingAlgebra))(function (i) { + var $62 = t(i); + return function ($63) { + return Data_Monoid_Disj.Disj($62($63)); + }; + }); + return function ($61) { + return $59($60($61)); + }; + }; + }; +}; + +var allWithIndex = function allWithIndex(dictFoldableWithIndex) { + return function (dictHeytingAlgebra) { + return function (t) { + var $64 = Data_Newtype.unwrap(Data_Newtype.newtypeConj); + var $65 = foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Conj.monoidConj(dictHeytingAlgebra))(function (i) { + var $67 = t(i); + return function ($68) { + return Data_Monoid_Conj.Conj($67($68)); + }; + }); + return function ($66) { + return $64($65($66)); + }; + }; + }; +}; + +module.exports = { + FoldableWithIndex: FoldableWithIndex, + foldrWithIndex: foldrWithIndex, + foldlWithIndex: foldlWithIndex, + foldMapWithIndex: foldMapWithIndex, + foldrWithIndexDefault: foldrWithIndexDefault, + foldlWithIndexDefault: foldlWithIndexDefault, + foldMapWithIndexDefaultR: foldMapWithIndexDefaultR, + foldMapWithIndexDefaultL: foldMapWithIndexDefaultL, + foldWithIndexM: foldWithIndexM, + traverseWithIndex_: traverseWithIndex_, + forWithIndex_: forWithIndex_, + surroundMapWithIndex: surroundMapWithIndex, + allWithIndex: allWithIndex, + anyWithIndex: anyWithIndex, + findWithIndex: findWithIndex, + foldrDefault: foldrDefault, + foldlDefault: foldlDefault, + foldMapDefault: foldMapDefault, + foldableWithIndexArray: foldableWithIndexArray, + foldableWithIndexMaybe: foldableWithIndexMaybe, + foldableWithIndexFirst: foldableWithIndexFirst, + foldableWithIndexLast: foldableWithIndexLast, + foldableWithIndexAdditive: foldableWithIndexAdditive, + foldableWithIndexDual: foldableWithIndexDual, + foldableWithIndexDisj: foldableWithIndexDisj, + foldableWithIndexConj: foldableWithIndexConj, + foldableWithIndexMultiplicative: foldableWithIndexMultiplicative +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Endo/index.js":"2o47","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Unit/index.js":"NhVk"}],"V4EF":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_Traversable_Accum_Internal = require("../Data.Traversable.Accum.Internal/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var TraversableWithIndex = function TraversableWithIndex(FoldableWithIndex1, FunctorWithIndex0, Traversable2, traverseWithIndex) { + this.FoldableWithIndex1 = FoldableWithIndex1; + this.FunctorWithIndex0 = FunctorWithIndex0; + this.Traversable2 = Traversable2; + this.traverseWithIndex = traverseWithIndex; +}; + +var traverseWithIndexDefault = function traverseWithIndexDefault(dictTraversableWithIndex) { + return function (dictApplicative) { + return function (f) { + var $19 = Data_Traversable.sequence(dictTraversableWithIndex.Traversable2())(dictApplicative); + var $20 = Data_FunctorWithIndex.mapWithIndex(dictTraversableWithIndex.FunctorWithIndex0())(f); + return function ($21) { + return $19($20($21)); + }; + }; + }; +}; + +var traverseWithIndex = function traverseWithIndex(dict) { + return dict.traverseWithIndex; +}; + +var traverseDefault = function traverseDefault(dictTraversableWithIndex) { + return function (dictApplicative) { + return function (f) { + return traverseWithIndex(dictTraversableWithIndex)(dictApplicative)(Data_Function["const"](f)); + }; + }; +}; + +var traversableWithIndexMultiplicative = new TraversableWithIndex(function () { + return Data_FoldableWithIndex.foldableWithIndexMultiplicative; +}, function () { + return Data_FunctorWithIndex.functorWithIndexMultiplicative; +}, function () { + return Data_Traversable.traversableMultiplicative; +}, function (dictApplicative) { + return function (f) { + return Data_Traversable.traverse(Data_Traversable.traversableMultiplicative)(dictApplicative)(f(Data_Unit.unit)); + }; +}); +var traversableWithIndexMaybe = new TraversableWithIndex(function () { + return Data_FoldableWithIndex.foldableWithIndexMaybe; +}, function () { + return Data_FunctorWithIndex.functorWithIndexMaybe; +}, function () { + return Data_Traversable.traversableMaybe; +}, function (dictApplicative) { + return function (f) { + return Data_Traversable.traverse(Data_Traversable.traversableMaybe)(dictApplicative)(f(Data_Unit.unit)); + }; +}); +var traversableWithIndexLast = new TraversableWithIndex(function () { + return Data_FoldableWithIndex.foldableWithIndexLast; +}, function () { + return Data_FunctorWithIndex.functorWithIndexLast; +}, function () { + return Data_Traversable.traversableLast; +}, function (dictApplicative) { + return function (f) { + return Data_Traversable.traverse(Data_Traversable.traversableLast)(dictApplicative)(f(Data_Unit.unit)); + }; +}); +var traversableWithIndexFirst = new TraversableWithIndex(function () { + return Data_FoldableWithIndex.foldableWithIndexFirst; +}, function () { + return Data_FunctorWithIndex.functorWithIndexFirst; +}, function () { + return Data_Traversable.traversableFirst; +}, function (dictApplicative) { + return function (f) { + return Data_Traversable.traverse(Data_Traversable.traversableFirst)(dictApplicative)(f(Data_Unit.unit)); + }; +}); +var traversableWithIndexDual = new TraversableWithIndex(function () { + return Data_FoldableWithIndex.foldableWithIndexDual; +}, function () { + return Data_FunctorWithIndex.functorWithIndexDual; +}, function () { + return Data_Traversable.traversableDual; +}, function (dictApplicative) { + return function (f) { + return Data_Traversable.traverse(Data_Traversable.traversableDual)(dictApplicative)(f(Data_Unit.unit)); + }; +}); +var traversableWithIndexDisj = new TraversableWithIndex(function () { + return Data_FoldableWithIndex.foldableWithIndexDisj; +}, function () { + return Data_FunctorWithIndex.functorWithIndexDisj; +}, function () { + return Data_Traversable.traversableDisj; +}, function (dictApplicative) { + return function (f) { + return Data_Traversable.traverse(Data_Traversable.traversableDisj)(dictApplicative)(f(Data_Unit.unit)); + }; +}); +var traversableWithIndexConj = new TraversableWithIndex(function () { + return Data_FoldableWithIndex.foldableWithIndexConj; +}, function () { + return Data_FunctorWithIndex.functorWithIndexConj; +}, function () { + return Data_Traversable.traversableConj; +}, function (dictApplicative) { + return function (f) { + return Data_Traversable.traverse(Data_Traversable.traversableConj)(dictApplicative)(f(Data_Unit.unit)); + }; +}); +var traversableWithIndexArray = new TraversableWithIndex(function () { + return Data_FoldableWithIndex.foldableWithIndexArray; +}, function () { + return Data_FunctorWithIndex.functorWithIndexArray; +}, function () { + return Data_Traversable.traversableArray; +}, function (dictApplicative) { + return traverseWithIndexDefault(traversableWithIndexArray)(dictApplicative); +}); +var traversableWithIndexAdditive = new TraversableWithIndex(function () { + return Data_FoldableWithIndex.foldableWithIndexAdditive; +}, function () { + return Data_FunctorWithIndex.functorWithIndexAdditive; +}, function () { + return Data_Traversable.traversableAdditive; +}, function (dictApplicative) { + return function (f) { + return Data_Traversable.traverse(Data_Traversable.traversableAdditive)(dictApplicative)(f(Data_Unit.unit)); + }; +}); + +var mapAccumRWithIndex = function mapAccumRWithIndex(dictTraversableWithIndex) { + return function (f) { + return function (s0) { + return function (xs) { + return Data_Traversable_Accum_Internal.stateR(traverseWithIndex(dictTraversableWithIndex)(Data_Traversable_Accum_Internal.applicativeStateR)(function (i) { + return function (a) { + return function (s) { + return f(i)(s)(a); + }; + }; + })(xs))(s0); + }; + }; + }; +}; + +var scanrWithIndex = function scanrWithIndex(dictTraversableWithIndex) { + return function (f) { + return function (b0) { + return function (xs) { + return mapAccumRWithIndex(dictTraversableWithIndex)(function (i) { + return function (b) { + return function (a) { + var b$prime = f(i)(a)(b); + return { + accum: b$prime, + value: b$prime + }; + }; + }; + })(b0)(xs).value; + }; + }; + }; +}; + +var mapAccumLWithIndex = function mapAccumLWithIndex(dictTraversableWithIndex) { + return function (f) { + return function (s0) { + return function (xs) { + return Data_Traversable_Accum_Internal.stateL(traverseWithIndex(dictTraversableWithIndex)(Data_Traversable_Accum_Internal.applicativeStateL)(function (i) { + return function (a) { + return function (s) { + return f(i)(s)(a); + }; + }; + })(xs))(s0); + }; + }; + }; +}; + +var scanlWithIndex = function scanlWithIndex(dictTraversableWithIndex) { + return function (f) { + return function (b0) { + return function (xs) { + return mapAccumLWithIndex(dictTraversableWithIndex)(function (i) { + return function (b) { + return function (a) { + var b$prime = f(i)(b)(a); + return { + accum: b$prime, + value: b$prime + }; + }; + }; + })(b0)(xs).value; + }; + }; + }; +}; + +var forWithIndex = function forWithIndex(dictApplicative) { + return function (dictTraversableWithIndex) { + return Data_Function.flip(traverseWithIndex(dictTraversableWithIndex)(dictApplicative)); + }; +}; + +module.exports = { + TraversableWithIndex: TraversableWithIndex, + traverseWithIndex: traverseWithIndex, + traverseWithIndexDefault: traverseWithIndexDefault, + forWithIndex: forWithIndex, + scanlWithIndex: scanlWithIndex, + mapAccumLWithIndex: mapAccumLWithIndex, + scanrWithIndex: scanrWithIndex, + mapAccumRWithIndex: mapAccumRWithIndex, + traverseDefault: traverseDefault, + traversableWithIndexArray: traversableWithIndexArray, + traversableWithIndexMaybe: traversableWithIndexMaybe, + traversableWithIndexFirst: traversableWithIndexFirst, + traversableWithIndexLast: traversableWithIndexLast, + traversableWithIndexAdditive: traversableWithIndexAdditive, + traversableWithIndexDual: traversableWithIndexDual, + traversableWithIndexConj: traversableWithIndexConj, + traversableWithIndexDisj: traversableWithIndexDisj, + traversableWithIndexMultiplicative: traversableWithIndexMultiplicative +}; +},{"../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Traversable/index.js":"n7EE","../Data.Traversable.Accum.Internal/index.js":"LbSr","../Data.Unit/index.js":"NhVk"}],"B2JL":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Extend = require("../Control.Extend/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Bifoldable = require("../Data.Bifoldable/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Bitraversable = require("../Data.Bitraversable/index.js"); + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Left = function () { + function Left(value0) { + this.value0 = value0; + } + + ; + + Left.create = function (value0) { + return new Left(value0); + }; + + return Left; +}(); + +var Right = function () { + function Right(value0) { + this.value0 = value0; + } + + ; + + Right.create = function (value0) { + return new Right(value0); + }; + + return Right; +}(); + +var showEither = function showEither(dictShow) { + return function (dictShow1) { + return new Data_Show.Show(function (v) { + if (v instanceof Left) { + return "(Left " + (Data_Show.show(dictShow)(v.value0) + ")"); + } + + ; + + if (v instanceof Right) { + return "(Right " + (Data_Show.show(dictShow1)(v.value0) + ")"); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 163, column 1 - line 165, column 46): " + [v.constructor.name]); + }); + }; +}; + +var note$prime = function note$prime(f) { + return Data_Maybe["maybe'"](function ($198) { + return Left.create(f($198)); + })(Right.create); +}; + +var note = function note(a) { + return Data_Maybe.maybe(new Left(a))(Right.create); +}; + +var functorEither = new Data_Functor.Functor(function (f) { + return function (m) { + if (m instanceof Left) { + return new Left(m.value0); + } + + ; + + if (m instanceof Right) { + return new Right(f(m.value0)); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 38, column 1 - line 38, column 52): " + [m.constructor.name]); + }; +}); +var functorWithIndexEither = new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorEither; +}, function (f) { + return Data_Functor.map(functorEither)(f(Data_Unit.unit)); +}); +var invariantEither = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorEither)); + +var fromRight = function fromRight(dictPartial) { + return function (v) { + if (v instanceof Right) { + return v.value0; + } + + ; + throw new Error("Failed pattern match at Data.Either (line 261, column 1 - line 261, column 52): " + [v.constructor.name]); + }; +}; + +var fromLeft = function fromLeft(dictPartial) { + return function (v) { + if (v instanceof Left) { + return v.value0; + } + + ; + throw new Error("Failed pattern match at Data.Either (line 256, column 1 - line 256, column 51): " + [v.constructor.name]); + }; +}; + +var foldableEither = new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + if (v instanceof Left) { + return Data_Monoid.mempty(dictMonoid); + } + + ; + + if (v instanceof Right) { + return f(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): " + [f.constructor.name, v.constructor.name]); + }; + }; +}, function (v) { + return function (z) { + return function (v1) { + if (v1 instanceof Left) { + return z; + } + + ; + + if (v1 instanceof Right) { + return v(z)(v1.value0); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): " + [v.constructor.name, z.constructor.name, v1.constructor.name]); + }; + }; +}, function (v) { + return function (z) { + return function (v1) { + if (v1 instanceof Left) { + return z; + } + + ; + + if (v1 instanceof Right) { + return v(v1.value0)(z); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): " + [v.constructor.name, z.constructor.name, v1.constructor.name]); + }; + }; +}); +var foldableWithIndexEither = new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableEither; +}, function (dictMonoid) { + return function (f) { + return function (v) { + if (v instanceof Left) { + return Data_Monoid.mempty(dictMonoid); + } + + ; + + if (v instanceof Right) { + return f(Data_Unit.unit)(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): " + [f.constructor.name, v.constructor.name]); + }; + }; +}, function (v) { + return function (z) { + return function (v1) { + if (v1 instanceof Left) { + return z; + } + + ; + + if (v1 instanceof Right) { + return v(Data_Unit.unit)(z)(v1.value0); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): " + [v.constructor.name, z.constructor.name, v1.constructor.name]); + }; + }; +}, function (v) { + return function (z) { + return function (v1) { + if (v1 instanceof Left) { + return z; + } + + ; + + if (v1 instanceof Right) { + return v(Data_Unit.unit)(v1.value0)(z); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): " + [v.constructor.name, z.constructor.name, v1.constructor.name]); + }; + }; +}); +var traversableEither = new Data_Traversable.Traversable(function () { + return foldableEither; +}, function () { + return functorEither; +}, function (dictApplicative) { + return function (v) { + if (v instanceof Left) { + return Control_Applicative.pure(dictApplicative)(new Left(v.value0)); + } + + ; + + if (v instanceof Right) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 211, column 1 - line 215, column 36): " + [v.constructor.name]); + }; +}, function (dictApplicative) { + return function (v) { + return function (v1) { + if (v1 instanceof Left) { + return Control_Applicative.pure(dictApplicative)(new Left(v1.value0)); + } + + ; + + if (v1 instanceof Right) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v(v1.value0)); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 211, column 1 - line 215, column 36): " + [v.constructor.name, v1.constructor.name]); + }; + }; +}); +var traversableWithIndexEither = new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexEither; +}, function () { + return functorWithIndexEither; +}, function () { + return traversableEither; +}, function (dictApplicative) { + return function (v) { + return function (v1) { + if (v1 instanceof Left) { + return Control_Applicative.pure(dictApplicative)(new Left(v1.value0)); + } + + ; + + if (v1 instanceof Right) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v(Data_Unit.unit)(v1.value0)); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 217, column 1 - line 219, column 53): " + [v.constructor.name, v1.constructor.name]); + }; + }; +}); +var extendEither = new Control_Extend.Extend(function () { + return functorEither; +}, function (v) { + return function (v1) { + if (v1 instanceof Left) { + return new Left(v1.value0); + } + + ; + return new Right(v(v1)); + }; +}); + +var eqEither = function eqEither(dictEq) { + return function (dictEq1) { + return new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof Left && y instanceof Left) { + return Data_Eq.eq(dictEq)(x.value0)(y.value0); + } + + ; + + if (x instanceof Right && y instanceof Right) { + return Data_Eq.eq(dictEq1)(x.value0)(y.value0); + } + + ; + return false; + }; + }); + }; +}; + +var ordEither = function ordEither(dictOrd) { + return function (dictOrd1) { + return new Data_Ord.Ord(function () { + return eqEither(dictOrd.Eq0())(dictOrd1.Eq0()); + }, function (x) { + return function (y) { + if (x instanceof Left && y instanceof Left) { + return Data_Ord.compare(dictOrd)(x.value0)(y.value0); + } + + ; + + if (x instanceof Left) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof Left) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof Right && y instanceof Right) { + return Data_Ord.compare(dictOrd1)(x.value0)(y.value0); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 179, column 1 - line 179, column 64): " + [x.constructor.name, y.constructor.name]); + }; + }); + }; +}; + +var eq1Either = function eq1Either(dictEq) { + return new Data_Eq.Eq1(function (dictEq1) { + return Data_Eq.eq(eqEither(dictEq)(dictEq1)); + }); +}; + +var ord1Either = function ord1Either(dictOrd) { + return new Data_Ord.Ord1(function () { + return eq1Either(dictOrd.Eq0()); + }, function (dictOrd1) { + return Data_Ord.compare(ordEither(dictOrd)(dictOrd1)); + }); +}; + +var either = function either(v) { + return function (v1) { + return function (v2) { + if (v2 instanceof Left) { + return v(v2.value0); + } + + ; + + if (v2 instanceof Right) { + return v1(v2.value0); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 238, column 1 - line 238, column 64): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]); + }; + }; +}; + +var hush = either(Data_Function["const"](Data_Maybe.Nothing.value))(Data_Maybe.Just.create); +var isLeft = either(Data_Function["const"](true))(Data_Function["const"](false)); +var isRight = either(Data_Function["const"](false))(Data_Function["const"](true)); + +var choose = function choose(dictAlt) { + return function (a) { + return function (b) { + return Control_Alt.alt(dictAlt)(Data_Functor.map(dictAlt.Functor0())(Left.create)(a))(Data_Functor.map(dictAlt.Functor0())(Right.create)(b)); + }; + }; +}; + +var boundedEither = function boundedEither(dictBounded) { + return function (dictBounded1) { + return new Data_Bounded.Bounded(function () { + return ordEither(dictBounded.Ord0())(dictBounded1.Ord0()); + }, new Left(Data_Bounded.bottom(dictBounded)), new Right(Data_Bounded.top(dictBounded1))); + }; +}; + +var bifunctorEither = new Data_Bifunctor.Bifunctor(function (v) { + return function (v1) { + return function (v2) { + if (v2 instanceof Left) { + return new Left(v(v2.value0)); + } + + ; + + if (v2 instanceof Right) { + return new Right(v1(v2.value0)); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 46, column 1 - line 48, column 36): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]); + }; + }; +}); +var bifoldableEither = new Data_Bifoldable.Bifoldable(function (dictMonoid) { + return function (v) { + return function (v1) { + return function (v2) { + if (v2 instanceof Left) { + return v(v2.value0); + } + + ; + + if (v2 instanceof Right) { + return v1(v2.value0); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 203, column 1 - line 209, column 32): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]); + }; + }; + }; +}, function (v) { + return function (v1) { + return function (z) { + return function (v2) { + if (v2 instanceof Left) { + return v(z)(v2.value0); + } + + ; + + if (v2 instanceof Right) { + return v1(z)(v2.value0); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 203, column 1 - line 209, column 32): " + [v.constructor.name, v1.constructor.name, z.constructor.name, v2.constructor.name]); + }; + }; + }; +}, function (v) { + return function (v1) { + return function (z) { + return function (v2) { + if (v2 instanceof Left) { + return v(v2.value0)(z); + } + + ; + + if (v2 instanceof Right) { + return v1(v2.value0)(z); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 203, column 1 - line 209, column 32): " + [v.constructor.name, v1.constructor.name, z.constructor.name, v2.constructor.name]); + }; + }; + }; +}); +var bitraversableEither = new Data_Bitraversable.Bitraversable(function () { + return bifoldableEither; +}, function () { + return bifunctorEither; +}, function (dictApplicative) { + return function (v) { + if (v instanceof Left) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Left.create)(v.value0); + } + + ; + + if (v instanceof Right) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 221, column 1 - line 225, column 37): " + [v.constructor.name]); + }; +}, function (dictApplicative) { + return function (v) { + return function (v1) { + return function (v2) { + if (v2 instanceof Left) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Left.create)(v(v2.value0)); + } + + ; + + if (v2 instanceof Right) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v1(v2.value0)); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 221, column 1 - line 225, column 37): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]); + }; + }; + }; +}); +var applyEither = new Control_Apply.Apply(function () { + return functorEither; +}, function (v) { + return function (v1) { + if (v instanceof Left) { + return new Left(v.value0); + } + + ; + + if (v instanceof Right) { + return Data_Functor.map(functorEither)(v.value0)(v1); + } + + ; + throw new Error("Failed pattern match at Data.Either (line 82, column 1 - line 84, column 30): " + [v.constructor.name, v1.constructor.name]); + }; +}); +var bindEither = new Control_Bind.Bind(function () { + return applyEither; +}, either(function (e) { + return function (v) { + return new Left(e); + }; +})(function (a) { + return function (f) { + return f(a); + }; +})); + +var semigroupEither = function semigroupEither(dictSemigroup) { + return new Data_Semigroup.Semigroup(function (x) { + return function (y) { + return Control_Apply.apply(applyEither)(Data_Functor.map(functorEither)(Data_Semigroup.append(dictSemigroup))(x))(y); + }; + }); +}; + +var applicativeEither = new Control_Applicative.Applicative(function () { + return applyEither; +}, Right.create); +var monadEither = new Control_Monad.Monad(function () { + return applicativeEither; +}, function () { + return bindEither; +}); +var altEither = new Control_Alt.Alt(function () { + return functorEither; +}, function (v) { + return function (v1) { + if (v instanceof Left) { + return v1; + } + + ; + return v; + }; +}); +module.exports = { + Left: Left, + Right: Right, + either: either, + choose: choose, + isLeft: isLeft, + isRight: isRight, + fromLeft: fromLeft, + fromRight: fromRight, + note: note, + "note'": note$prime, + hush: hush, + functorEither: functorEither, + functorWithIndexEither: functorWithIndexEither, + invariantEither: invariantEither, + bifunctorEither: bifunctorEither, + applyEither: applyEither, + applicativeEither: applicativeEither, + altEither: altEither, + bindEither: bindEither, + monadEither: monadEither, + extendEither: extendEither, + showEither: showEither, + eqEither: eqEither, + eq1Either: eq1Either, + ordEither: ordEither, + ord1Either: ord1Either, + boundedEither: boundedEither, + foldableEither: foldableEither, + foldableWithIndexEither: foldableWithIndexEither, + bifoldableEither: bifoldableEither, + traversableEither: traversableEither, + traversableWithIndexEither: traversableWithIndexEither, + bitraversableEither: bitraversableEither, + semigroupEither: semigroupEither +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Extend/index.js":"JIoJ","../Control.Monad/index.js":"U/Ix","../Data.Bifoldable/index.js":"wjQo","../Data.Bifunctor/index.js":"e2Wc","../Data.Bitraversable/index.js":"8nb9","../Data.Bounded/index.js":"kcUU","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Functor.Invariant/index.js":"AXkC","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Unit/index.js":"NhVk"}],"bXvE":[function(require,module,exports) { +"use strict"; + +exports.pureE = function (a) { + return function () { + return a; + }; +}; + +exports.bindE = function (a) { + return function (f) { + return function () { + return f(a())(); + }; + }; +}; + +exports.untilE = function (f) { + return function () { + while (!f()) { + ; + } + + return {}; + }; +}; + +exports.whileE = function (f) { + return function (a) { + return function () { + while (f()) { + a(); + } + + return {}; + }; + }; +}; + +exports.forE = function (lo) { + return function (hi) { + return function (f) { + return function () { + for (var i = lo; i < hi; i++) { + f(i)(); + } + }; + }; + }; +}; + +exports.foreachE = function (as) { + return function (f) { + return function () { + for (var i = 0, l = as.length; i < l; i++) { + f(as[i])(); + } + }; + }; +}; +},{}],"oTWB":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var monadEffect = new Control_Monad.Monad(function () { + return applicativeEffect; +}, function () { + return bindEffect; +}); +var bindEffect = new Control_Bind.Bind(function () { + return applyEffect; +}, $foreign.bindE); +var applyEffect = new Control_Apply.Apply(function () { + return functorEffect; +}, Control_Monad.ap(monadEffect)); +var applicativeEffect = new Control_Applicative.Applicative(function () { + return applyEffect; +}, $foreign.pureE); +var functorEffect = new Data_Functor.Functor(Control_Applicative.liftA1(applicativeEffect)); + +var semigroupEffect = function semigroupEffect(dictSemigroup) { + return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyEffect)(Data_Semigroup.append(dictSemigroup))); +}; + +var monoidEffect = function monoidEffect(dictMonoid) { + return new Data_Monoid.Monoid(function () { + return semigroupEffect(dictMonoid.Semigroup0()); + }, $foreign.pureE(Data_Monoid.mempty(dictMonoid))); +}; + +module.exports = { + functorEffect: functorEffect, + applyEffect: applyEffect, + applicativeEffect: applicativeEffect, + bindEffect: bindEffect, + monadEffect: monadEffect, + semigroupEffect: semigroupEffect, + monoidEffect: monoidEffect, + untilE: $foreign.untilE, + whileE: $foreign.whileE, + forE: $foreign.forE, + foreachE: $foreign.foreachE +}; +},{"./foreign.js":"bXvE","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ"}],"OvLS":[function(require,module,exports) { +"use strict"; + +exports.showErrorImpl = function (err) { + return err.stack || err.toString(); +}; + +exports.error = function (msg) { + return new Error(msg); +}; + +exports.message = function (e) { + return e.message; +}; + +exports.name = function (e) { + return e.name || "Error"; +}; + +exports.stackImpl = function (just) { + return function (nothing) { + return function (e) { + return e.stack ? just(e.stack) : nothing; + }; + }; +}; + +exports.throwException = function (e) { + return function () { + throw e; + }; +}; + +exports.catchException = function (c) { + return function (t) { + return function () { + try { + return t(); + } catch (e) { + if (e instanceof Error || Object.prototype.toString.call(e) === "[object Error]") { + return c(e)(); + } else { + return c(new Error(e.toString()))(); + } + } + }; + }; +}; +},{}],"0OCW":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Effect = require("../Effect/index.js"); + +var $$try = function $$try(action) { + return $foreign.catchException(function () { + var $0 = Control_Applicative.pure(Effect.applicativeEffect); + return function ($1) { + return $0(Data_Either.Left.create($1)); + }; + }())(Data_Functor.map(Effect.functorEffect)(Data_Either.Right.create)(action)); +}; + +var $$throw = function $$throw($2) { + return $foreign.throwException($foreign.error($2)); +}; + +var stack = $foreign.stackImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value); +var showError = new Data_Show.Show($foreign.showErrorImpl); +module.exports = { + stack: stack, + "throw": $$throw, + "try": $$try, + showError: showError, + error: $foreign.error, + message: $foreign.message, + name: $foreign.name, + throwException: $foreign.throwException, + catchException: $foreign.catchException +}; +},{"./foreign.js":"OvLS","../Control.Applicative/index.js":"qYya","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Show/index.js":"mFY7","../Effect/index.js":"oTWB"}],"L8Lk":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Effect = require("../Effect/index.js"); + +var Effect_Exception = require("../Effect.Exception/index.js"); + +var MonadThrow = function MonadThrow(Monad0, throwError) { + this.Monad0 = Monad0; + this.throwError = throwError; +}; + +var MonadError = function MonadError(MonadThrow0, catchError) { + this.MonadThrow0 = MonadThrow0; + this.catchError = catchError; +}; + +var throwError = function throwError(dict) { + return dict.throwError; +}; + +var monadThrowMaybe = new MonadThrow(function () { + return Data_Maybe.monadMaybe; +}, Data_Function["const"](Data_Maybe.Nothing.value)); +var monadThrowEither = new MonadThrow(function () { + return Data_Either.monadEither; +}, Data_Either.Left.create); +var monadThrowEffect = new MonadThrow(function () { + return Effect.monadEffect; +}, Effect_Exception.throwException); +var monadErrorMaybe = new MonadError(function () { + return monadThrowMaybe; +}, function (v) { + return function (v1) { + if (v instanceof Data_Maybe.Nothing) { + return v1(Data_Unit.unit); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return new Data_Maybe.Just(v.value0); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Error.Class (line 79, column 1 - line 81, column 33): " + [v.constructor.name, v1.constructor.name]); + }; +}); +var monadErrorEither = new MonadError(function () { + return monadThrowEither; +}, function (v) { + return function (v1) { + if (v instanceof Data_Either.Left) { + return v1(v.value0); + } + + ; + + if (v instanceof Data_Either.Right) { + return new Data_Either.Right(v.value0); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Error.Class (line 72, column 1 - line 74, column 35): " + [v.constructor.name, v1.constructor.name]); + }; +}); +var monadErrorEffect = new MonadError(function () { + return monadThrowEffect; +}, Data_Function.flip(Effect_Exception.catchException)); + +var catchError = function catchError(dict) { + return dict.catchError; +}; + +var catchJust = function catchJust(dictMonadError) { + return function (p) { + return function (act) { + return function (handler) { + var handle = function handle(e) { + var v = p(e); + + if (v instanceof Data_Maybe.Nothing) { + return throwError(dictMonadError.MonadThrow0())(e); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return handler(v.value0); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Error.Class (line 57, column 5 - line 59, column 26): " + [v.constructor.name]); + }; + + return catchError(dictMonadError)(act)(handle); + }; + }; + }; +}; + +var $$try = function $$try(dictMonadError) { + return function (a) { + return catchError(dictMonadError)(Data_Functor.map(dictMonadError.MonadThrow0().Monad0().Bind1().Apply0().Functor0())(Data_Either.Right.create)(a))(function () { + var $21 = Control_Applicative.pure(dictMonadError.MonadThrow0().Monad0().Applicative0()); + return function ($22) { + return $21(Data_Either.Left.create($22)); + }; + }()); + }; +}; + +var withResource = function withResource(dictMonadError) { + return function (acquire) { + return function (release) { + return function (kleisli) { + return Control_Bind.bind(dictMonadError.MonadThrow0().Monad0().Bind1())(acquire)(function (v) { + return Control_Bind.bind(dictMonadError.MonadThrow0().Monad0().Bind1())($$try(dictMonadError)(kleisli(v)))(function (v1) { + return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadError.MonadThrow0().Monad0().Bind1())(release(v))(function () { + return Data_Either.either(throwError(dictMonadError.MonadThrow0()))(Control_Applicative.pure(dictMonadError.MonadThrow0().Monad0().Applicative0()))(v1); + }); + }); + }); + }; + }; + }; +}; + +module.exports = { + catchError: catchError, + throwError: throwError, + MonadThrow: MonadThrow, + MonadError: MonadError, + catchJust: catchJust, + "try": $$try, + withResource: withResource, + monadThrowEither: monadThrowEither, + monadErrorEither: monadErrorEither, + monadThrowMaybe: monadThrowMaybe, + monadErrorMaybe: monadErrorMaybe, + monadThrowEffect: monadThrowEffect, + monadErrorEffect: monadErrorEffect +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Data.Either/index.js":"B2JL","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Unit/index.js":"NhVk","../Effect/index.js":"oTWB","../Effect.Exception/index.js":"0OCW"}],"c2ZJ":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var MonadAsk = function MonadAsk(Monad0, ask) { + this.Monad0 = Monad0; + this.ask = ask; +}; + +var MonadReader = function MonadReader(MonadAsk0, local) { + this.MonadAsk0 = MonadAsk0; + this.local = local; +}; + +var monadAskFun = new MonadAsk(function () { + return Control_Monad.monadFn; +}, Control_Category.identity(Control_Category.categoryFn)); +var monadReaderFun = new MonadReader(function () { + return monadAskFun; +}, Control_Semigroupoid.composeFlipped(Control_Semigroupoid.semigroupoidFn)); + +var local = function local(dict) { + return dict.local; +}; + +var ask = function ask(dict) { + return dict.ask; +}; + +var asks = function asks(dictMonadAsk) { + return function (f) { + return Data_Functor.map(dictMonadAsk.Monad0().Bind1().Apply0().Functor0())(f)(ask(dictMonadAsk)); + }; +}; + +module.exports = { + ask: ask, + local: local, + MonadAsk: MonadAsk, + asks: asks, + MonadReader: MonadReader, + monadAskFun: monadAskFun, + monadReaderFun: monadReaderFun +}; +},{"../Control.Category/index.js":"IAi2","../Control.Monad/index.js":"U/Ix","../Control.Semigroupoid/index.js":"/riR","../Data.Functor/index.js":"+0AE"}],"U0zO":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Comonad = function Comonad(Extend0, extract) { + this.Extend0 = Extend0; + this.extract = extract; +}; + +var extract = function extract(dict) { + return dict.extract; +}; + +module.exports = { + Comonad: Comonad, + extract: extract +}; +},{}],"fhx3":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Max = function Max(x) { + return x; +}; + +var showMax = function showMax(dictShow) { + return new Data_Show.Show(function (v) { + return "(Max " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semigroupMax = function semigroupMax(dictOrd) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return Data_Ord.max(dictOrd)(v)(v1); + }; + }); +}; + +var newtypeMax = new Data_Newtype.Newtype(function (n) { + return n; +}, Max); + +var monoidMax = function monoidMax(dictBounded) { + return new Data_Monoid.Monoid(function () { + return semigroupMax(dictBounded.Ord0()); + }, Data_Bounded.bottom(dictBounded)); +}; + +var eqMax = function eqMax(dictEq) { + return dictEq; +}; + +var ordMax = function ordMax(dictOrd) { + return new Data_Ord.Ord(function () { + return eqMax(dictOrd.Eq0()); + }, function (v) { + return function (v1) { + return Data_Ord.compare(dictOrd)(v)(v1); + }; + }); +}; + +module.exports = { + Max: Max, + newtypeMax: newtypeMax, + eqMax: eqMax, + ordMax: ordMax, + semigroupMax: semigroupMax, + monoidMax: monoidMax, + showMax: showMax +}; +},{"../Data.Bounded/index.js":"kcUU","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"X+tn":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Min = function Min(x) { + return x; +}; + +var showMin = function showMin(dictShow) { + return new Data_Show.Show(function (v) { + return "(Min " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semigroupMin = function semigroupMin(dictOrd) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return Data_Ord.min(dictOrd)(v)(v1); + }; + }); +}; + +var newtypeMin = new Data_Newtype.Newtype(function (n) { + return n; +}, Min); + +var monoidMin = function monoidMin(dictBounded) { + return new Data_Monoid.Monoid(function () { + return semigroupMin(dictBounded.Ord0()); + }, Data_Bounded.top(dictBounded)); +}; + +var eqMin = function eqMin(dictEq) { + return dictEq; +}; + +var ordMin = function ordMin(dictOrd) { + return new Data_Ord.Ord(function () { + return eqMin(dictOrd.Eq0()); + }, function (v) { + return function (v1) { + return Data_Ord.compare(dictOrd)(v)(v1); + }; + }); +}; + +module.exports = { + Min: Min, + newtypeMin: newtypeMin, + eqMin: eqMin, + ordMin: ordMin, + semigroupMin: semigroupMin, + monoidMin: monoidMin, + showMin: showMin +}; +},{"../Data.Bounded/index.js":"kcUU","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"ht+A":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord_Max = require("../Data.Ord.Max/index.js"); + +var Data_Ord_Min = require("../Data.Ord.Min/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var JoinWith = function JoinWith(x) { + return x; +}; + +var Act = function Act(x) { + return x; +}; + +var Foldable1 = function Foldable1(Foldable0, fold1, foldMap1) { + this.Foldable0 = Foldable0; + this.fold1 = fold1; + this.foldMap1 = foldMap1; +}; + +var semigroupJoinWith = function semigroupJoinWith(dictSemigroup) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return JoinWith(function (j) { + return Data_Semigroup.append(dictSemigroup)(v(j))(Data_Semigroup.append(dictSemigroup)(j)(v1(j))); + }); + }; + }); +}; + +var semigroupAct = function semigroupAct(dictApply) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return Control_Apply.applySecond(dictApply)(v)(v1); + }; + }); +}; + +var joinee = function joinee(v) { + return v; +}; + +var getAct = function getAct(v) { + return v; +}; + +var foldMap1 = function foldMap1(dict) { + return dict.foldMap1; +}; + +var intercalateMap = function intercalateMap(dictFoldable1) { + return function (dictSemigroup) { + return function (j) { + return function (f) { + return function (foldable) { + return joinee(foldMap1(dictFoldable1)(semigroupJoinWith(dictSemigroup))(function ($43) { + return JoinWith(Data_Function["const"](f($43))); + })(foldable))(j); + }; + }; + }; + }; +}; + +var intercalate = function intercalate(dictFoldable1) { + return function (dictSemigroup) { + return Data_Function.flip(intercalateMap(dictFoldable1)(dictSemigroup))(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var maximum = function maximum(dictOrd) { + return function (dictFoldable1) { + return Data_Newtype.ala(Data_Functor.functorFn)(Data_Ord_Max.newtypeMax)(Data_Ord_Max.newtypeMax)(Data_Ord_Max.Max)(foldMap1(dictFoldable1)(Data_Ord_Max.semigroupMax(dictOrd))); + }; +}; + +var minimum = function minimum(dictOrd) { + return function (dictFoldable1) { + return Data_Newtype.ala(Data_Functor.functorFn)(Data_Ord_Min.newtypeMin)(Data_Ord_Min.newtypeMin)(Data_Ord_Min.Min)(foldMap1(dictFoldable1)(Data_Ord_Min.semigroupMin(dictOrd))); + }; +}; + +var traverse1_ = function traverse1_(dictFoldable1) { + return function (dictApply) { + return function (f) { + return function (t) { + return Data_Functor.voidRight(dictApply.Functor0())(Data_Unit.unit)(getAct(foldMap1(dictFoldable1)(semigroupAct(dictApply))(function ($44) { + return Act(f($44)); + })(t))); + }; + }; + }; +}; + +var for1_ = function for1_(dictFoldable1) { + return function (dictApply) { + return Data_Function.flip(traverse1_(dictFoldable1)(dictApply)); + }; +}; + +var sequence1_ = function sequence1_(dictFoldable1) { + return function (dictApply) { + return traverse1_(dictFoldable1)(dictApply)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var fold1Default = function fold1Default(dictFoldable1) { + return function (dictSemigroup) { + return foldMap1(dictFoldable1)(dictSemigroup)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var foldableDual = new Foldable1(function () { + return Data_Foldable.foldableDual; +}, function (dictSemigroup) { + return fold1Default(foldableDual)(dictSemigroup); +}, function (dictSemigroup) { + return function (f) { + return function (v) { + return f(v); + }; + }; +}); +var foldableMultiplicative = new Foldable1(function () { + return Data_Foldable.foldableMultiplicative; +}, function (dictSemigroup) { + return fold1Default(foldableMultiplicative)(dictSemigroup); +}, function (dictSemigroup) { + return function (f) { + return function (v) { + return f(v); + }; + }; +}); + +var fold1 = function fold1(dict) { + return dict.fold1; +}; + +var foldMap1Default = function foldMap1Default(dictFoldable1) { + return function (dictFunctor) { + return function (dictSemigroup) { + return function (f) { + var $45 = fold1(dictFoldable1)(dictSemigroup); + var $46 = Data_Functor.map(dictFunctor)(f); + return function ($47) { + return $45($46($47)); + }; + }; + }; + }; +}; + +module.exports = { + Foldable1: Foldable1, + foldMap1: foldMap1, + fold1: fold1, + traverse1_: traverse1_, + for1_: for1_, + sequence1_: sequence1_, + foldMap1Default: foldMap1Default, + fold1Default: fold1Default, + intercalate: intercalate, + intercalateMap: intercalateMap, + maximum: maximum, + minimum: minimum, + foldableDual: foldableDual, + foldableMultiplicative: foldableMultiplicative +}; +},{"../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Ord.Max/index.js":"fhx3","../Data.Ord.Min/index.js":"X+tn","../Data.Semigroup/index.js":"EsAJ","../Data.Unit/index.js":"NhVk"}],"qkfi":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js"); + +var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js"); + +var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Traversable1 = function Traversable1(Foldable10, _Traversable, sequence1, traverse1) { + this.Foldable10 = Foldable10; + this.Traversable1 = _Traversable; + this.sequence1 = sequence1; + this.traverse1 = traverse1; +}; + +var traverse1 = function traverse1(dict) { + return dict.traverse1; +}; + +var sequence1Default = function sequence1Default(dictTraversable1) { + return function (dictApply) { + return traverse1(dictTraversable1)(dictApply)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var traversableDual = new Traversable1(function () { + return Data_Semigroup_Foldable.foldableDual; +}, function () { + return Data_Traversable.traversableDual; +}, function (dictApply) { + return sequence1Default(traversableDual)(dictApply); +}, function (dictApply) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApply.Functor0())(Data_Monoid_Dual.Dual)(f(v)); + }; + }; +}); +var traversableMultiplicative = new Traversable1(function () { + return Data_Semigroup_Foldable.foldableMultiplicative; +}, function () { + return Data_Traversable.traversableMultiplicative; +}, function (dictApply) { + return sequence1Default(traversableMultiplicative)(dictApply); +}, function (dictApply) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApply.Functor0())(Data_Monoid_Multiplicative.Multiplicative)(f(v)); + }; + }; +}); + +var sequence1 = function sequence1(dict) { + return dict.sequence1; +}; + +var traverse1Default = function traverse1Default(dictTraversable1) { + return function (dictApply) { + return function (f) { + return function (ta) { + return sequence1(dictTraversable1)(dictApply)(Data_Functor.map(dictTraversable1.Traversable1().Functor0())(f)(ta)); + }; + }; + }; +}; + +module.exports = { + sequence1: sequence1, + traverse1: traverse1, + Traversable1: Traversable1, + traverse1Default: traverse1Default, + sequence1Default: sequence1Default, + traversableDual: traversableDual, + traversableMultiplicative: traversableMultiplicative +}; +},{"../Control.Category/index.js":"IAi2","../Data.Functor/index.js":"+0AE","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Multiplicative/index.js":"y5cd","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Traversable/index.js":"n7EE"}],"2OKT":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Comonad = require("../Control.Comonad/index.js"); + +var Control_Extend = require("../Control.Extend/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js"); + +var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Identity = function Identity(x) { + return x; +}; + +var showIdentity = function showIdentity(dictShow) { + return new Data_Show.Show(function (v) { + return "(Identity " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semiringIdentity = function semiringIdentity(dictSemiring) { + return dictSemiring; +}; + +var semigroupIdenity = function semigroupIdenity(dictSemigroup) { + return dictSemigroup; +}; + +var ringIdentity = function ringIdentity(dictRing) { + return dictRing; +}; + +var ordIdentity = function ordIdentity(dictOrd) { + return dictOrd; +}; + +var newtypeIdentity = new Data_Newtype.Newtype(function (n) { + return n; +}, Identity); + +var monoidIdentity = function monoidIdentity(dictMonoid) { + return dictMonoid; +}; + +var lazyIdentity = function lazyIdentity(dictLazy) { + return dictLazy; +}; + +var heytingAlgebraIdentity = function heytingAlgebraIdentity(dictHeytingAlgebra) { + return dictHeytingAlgebra; +}; + +var functorIdentity = new Data_Functor.Functor(function (f) { + return function (m) { + return f(m); + }; +}); +var functorWithIndexIdentity = new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorIdentity; +}, function (f) { + return function (v) { + return f(Data_Unit.unit)(v); + }; +}); +var invariantIdentity = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorIdentity)); +var foldableIdentity = new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return f(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(z)(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(v)(z); + }; + }; +}); +var foldableWithIndexIdentity = new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableIdentity; +}, function (dictMonoid) { + return function (f) { + return function (v) { + return f(Data_Unit.unit)(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(Data_Unit.unit)(z)(v); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(Data_Unit.unit)(v)(z); + }; + }; +}); +var traversableIdentity = new Data_Traversable.Traversable(function () { + return foldableIdentity; +}, function () { + return functorIdentity; +}, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Identity)(v); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Identity)(f(v)); + }; + }; +}); +var traversableWithIndexIdentity = new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexIdentity; +}, function () { + return functorWithIndexIdentity; +}, function () { + return traversableIdentity; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Identity)(f(Data_Unit.unit)(v)); + }; + }; +}); +var foldable1Identity = new Data_Semigroup_Foldable.Foldable1(function () { + return foldableIdentity; +}, function (dictSemigroup) { + return function (v) { + return v; + }; +}, function (dictSemigroup) { + return function (f) { + return function (v) { + return f(v); + }; + }; +}); +var traversable1Identity = new Data_Semigroup_Traversable.Traversable1(function () { + return foldable1Identity; +}, function () { + return traversableIdentity; +}, function (dictApply) { + return function (v) { + return Data_Functor.map(dictApply.Functor0())(Identity)(v); + }; +}, function (dictApply) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApply.Functor0())(Identity)(f(v)); + }; + }; +}); +var extendIdentity = new Control_Extend.Extend(function () { + return functorIdentity; +}, function (f) { + return function (m) { + return f(m); + }; +}); + +var euclideanRingIdentity = function euclideanRingIdentity(dictEuclideanRing) { + return dictEuclideanRing; +}; + +var eqIdentity = function eqIdentity(dictEq) { + return dictEq; +}; + +var eq1Identity = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqIdentity(dictEq)); +}); +var ord1Identity = new Data_Ord.Ord1(function () { + return eq1Identity; +}, function (dictOrd) { + return Data_Ord.compare(ordIdentity(dictOrd)); +}); +var comonadIdentity = new Control_Comonad.Comonad(function () { + return extendIdentity; +}, function (v) { + return v; +}); + +var commutativeRingIdentity = function commutativeRingIdentity(dictCommutativeRing) { + return dictCommutativeRing; +}; + +var boundedIdentity = function boundedIdentity(dictBounded) { + return dictBounded; +}; + +var booleanAlgebraIdentity = function booleanAlgebraIdentity(dictBooleanAlgebra) { + return dictBooleanAlgebra; +}; + +var applyIdentity = new Control_Apply.Apply(function () { + return functorIdentity; +}, function (v) { + return function (v1) { + return v(v1); + }; +}); +var bindIdentity = new Control_Bind.Bind(function () { + return applyIdentity; +}, function (v) { + return function (f) { + return f(v); + }; +}); +var applicativeIdentity = new Control_Applicative.Applicative(function () { + return applyIdentity; +}, Identity); +var monadIdentity = new Control_Monad.Monad(function () { + return applicativeIdentity; +}, function () { + return bindIdentity; +}); +var altIdentity = new Control_Alt.Alt(function () { + return functorIdentity; +}, function (x) { + return function (v) { + return x; + }; +}); +module.exports = { + Identity: Identity, + newtypeIdentity: newtypeIdentity, + eqIdentity: eqIdentity, + ordIdentity: ordIdentity, + boundedIdentity: boundedIdentity, + heytingAlgebraIdentity: heytingAlgebraIdentity, + booleanAlgebraIdentity: booleanAlgebraIdentity, + semigroupIdenity: semigroupIdenity, + monoidIdentity: monoidIdentity, + semiringIdentity: semiringIdentity, + euclideanRingIdentity: euclideanRingIdentity, + ringIdentity: ringIdentity, + commutativeRingIdentity: commutativeRingIdentity, + lazyIdentity: lazyIdentity, + showIdentity: showIdentity, + eq1Identity: eq1Identity, + ord1Identity: ord1Identity, + functorIdentity: functorIdentity, + functorWithIndexIdentity: functorWithIndexIdentity, + invariantIdentity: invariantIdentity, + altIdentity: altIdentity, + applyIdentity: applyIdentity, + applicativeIdentity: applicativeIdentity, + bindIdentity: bindIdentity, + monadIdentity: monadIdentity, + extendIdentity: extendIdentity, + comonadIdentity: comonadIdentity, + foldableIdentity: foldableIdentity, + foldable1Identity: foldable1Identity, + foldableWithIndexIdentity: foldableWithIndexIdentity, + traversableIdentity: traversableIdentity, + traversable1Identity: traversable1Identity, + traversableWithIndexIdentity: traversableWithIndexIdentity +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Comonad/index.js":"U0zO","../Control.Extend/index.js":"JIoJ","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Functor/index.js":"+0AE","../Data.Functor.Invariant/index.js":"AXkC","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Unit/index.js":"NhVk"}],"bagd":[function(require,module,exports) { +"use strict"; + +exports.new = function (val) { + return function () { + return { + value: val + }; + }; +}; + +exports.read = function (ref) { + return function () { + return ref.value; + }; +}; + +exports["modify'"] = function (f) { + return function (ref) { + return function () { + var t = f(ref.value); + ref.value = t.state; + return t.value; + }; + }; +}; + +exports.write = function (val) { + return function (ref) { + return function () { + ref.value = val; + return {}; + }; + }; +}; +},{}],"/Jaj":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Effect = require("../Effect/index.js"); + +var modify = function modify(f) { + return $foreign["modify'"](function (s) { + var s$prime = f(s); + return { + state: s$prime, + value: s$prime + }; + }); +}; + +var modify_ = function modify_(f) { + return function (s) { + return Data_Functor["void"](Effect.functorEffect)(modify(f)(s)); + }; +}; + +module.exports = { + modify: modify, + modify_: modify_, + "new": $foreign["new"], + read: $foreign.read, + "modify'": $foreign["modify'"], + write: $foreign.write +}; +},{"./foreign.js":"bagd","../Data.Functor/index.js":"+0AE","../Effect/index.js":"oTWB"}],"UVIy":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Effect = require("../Effect/index.js"); + +var Effect_Ref = require("../Effect.Ref/index.js"); + +var Loop = function () { + function Loop(value0) { + this.value0 = value0; + } + + ; + + Loop.create = function (value0) { + return new Loop(value0); + }; + + return Loop; +}(); + +var Done = function () { + function Done(value0) { + this.value0 = value0; + } + + ; + + Done.create = function (value0) { + return new Done(value0); + }; + + return Done; +}(); + +var MonadRec = function MonadRec(Monad0, tailRecM) { + this.Monad0 = Monad0; + this.tailRecM = tailRecM; +}; + +var tailRecM = function tailRecM(dict) { + return dict.tailRecM; +}; + +var tailRecM2 = function tailRecM2(dictMonadRec) { + return function (f) { + return function (a) { + return function (b) { + return tailRecM(dictMonadRec)(function (o) { + return f(o.a)(o.b); + })({ + a: a, + b: b + }); + }; + }; + }; +}; + +var tailRecM3 = function tailRecM3(dictMonadRec) { + return function (f) { + return function (a) { + return function (b) { + return function (c) { + return tailRecM(dictMonadRec)(function (o) { + return f(o.a)(o.b)(o.c); + })({ + a: a, + b: b, + c: c + }); + }; + }; + }; + }; +}; + +var tailRec = function tailRec(f) { + var go = function go($copy_v) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(v) { + if (v instanceof Loop) { + $copy_v = f(v.value0); + return; + } + + ; + + if (v instanceof Done) { + $tco_done = true; + return v.value0; + } + + ; + throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 91, column 3 - line 91, column 25): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; + }; + + return function ($53) { + return go(f($53)); + }; +}; + +var monadRecMaybe = new MonadRec(function () { + return Data_Maybe.monadMaybe; +}, function (f) { + return function (a0) { + var g = function g(v) { + if (v instanceof Data_Maybe.Nothing) { + return new Done(Data_Maybe.Nothing.value); + } + + ; + + if (v instanceof Data_Maybe.Just && v.value0 instanceof Loop) { + return new Loop(f(v.value0.value0)); + } + + ; + + if (v instanceof Data_Maybe.Just && v.value0 instanceof Done) { + return new Done(new Data_Maybe.Just(v.value0.value0)); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 127, column 7 - line 127, column 31): " + [v.constructor.name]); + }; + + return tailRec(g)(f(a0)); + }; +}); +var monadRecIdentity = new MonadRec(function () { + return Data_Identity.monadIdentity; +}, function (f) { + var runIdentity = function runIdentity(v) { + return v; + }; + + var $54 = tailRec(function ($56) { + return runIdentity(f($56)); + }); + return function ($55) { + return Data_Identity.Identity($54($55)); + }; +}); +var monadRecFunction = new MonadRec(function () { + return Control_Monad.monadFn; +}, function (f) { + return function (a0) { + return function (e) { + return tailRec(function (a) { + return f(a)(e); + })(a0); + }; + }; +}); +var monadRecEither = new MonadRec(function () { + return Data_Either.monadEither; +}, function (f) { + return function (a0) { + var g = function g(v) { + if (v instanceof Data_Either.Left) { + return new Done(new Data_Either.Left(v.value0)); + } + + ; + + if (v instanceof Data_Either.Right && v.value0 instanceof Loop) { + return new Loop(f(v.value0.value0)); + } + + ; + + if (v instanceof Data_Either.Right && v.value0 instanceof Done) { + return new Done(new Data_Either.Right(v.value0.value0)); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 119, column 7 - line 119, column 33): " + [v.constructor.name]); + }; + + return tailRec(g)(f(a0)); + }; +}); +var monadRecEffect = new MonadRec(function () { + return Effect.monadEffect; +}, function (f) { + return function (a) { + var fromDone = function fromDone(v) { + if (v instanceof Done) { + return v.value0; + } + + ; + throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 111, column 30 - line 111, column 44): " + [v.constructor.name]); + }; + + return function __do() { + var v = Control_Bind.bindFlipped(Effect.bindEffect)(Effect_Ref["new"])(f(a))(); + + (function () { + while (!function __do() { + var v1 = Effect_Ref.read(v)(); + + if (v1 instanceof Loop) { + var v2 = f(v1.value0)(); + var v3 = Effect_Ref.write(v2)(v)(); + return false; + } + + ; + + if (v1 instanceof Done) { + return true; + } + + ; + throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 102, column 22 - line 107, column 28): " + [v1.constructor.name]); + }()) {} + + ; + return {}; + })(); + + return Data_Functor.map(Effect.functorEffect)(fromDone)(Effect_Ref.read(v))(); + }; + }; +}); +var functorStep = new Data_Functor.Functor(function (f) { + return function (m) { + if (m instanceof Loop) { + return new Loop(m.value0); + } + + ; + + if (m instanceof Done) { + return new Done(f(m.value0)); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 25, column 1 - line 25, column 48): " + [m.constructor.name]); + }; +}); + +var forever = function forever(dictMonadRec) { + return function (ma) { + return tailRecM(dictMonadRec)(function (u) { + return Data_Functor.voidRight(dictMonadRec.Monad0().Bind1().Apply0().Functor0())(new Loop(u))(ma); + })(Data_Unit.unit); + }; +}; + +var bifunctorStep = new Data_Bifunctor.Bifunctor(function (v) { + return function (v1) { + return function (v2) { + if (v2 instanceof Loop) { + return new Loop(v(v2.value0)); + } + + ; + + if (v2 instanceof Done) { + return new Done(v1(v2.value0)); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 27, column 1 - line 29, column 34): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]); + }; + }; +}); +module.exports = { + Loop: Loop, + Done: Done, + MonadRec: MonadRec, + tailRec: tailRec, + tailRecM: tailRecM, + tailRecM2: tailRecM2, + tailRecM3: tailRecM3, + forever: forever, + functorStep: functorStep, + bifunctorStep: bifunctorStep, + monadRecIdentity: monadRecIdentity, + monadRecEffect: monadRecEffect, + monadRecFunction: monadRecFunction, + monadRecEither: monadRecEither, + monadRecMaybe: monadRecMaybe +}; +},{"../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Bifunctor/index.js":"e2Wc","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Maybe/index.js":"5mN7","../Data.Unit/index.js":"NhVk","../Effect/index.js":"oTWB","../Effect.Ref/index.js":"/Jaj"}],"y9cE":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Unit = require("../Data.Unit/index.js"); + +var Lazy = function Lazy(defer) { + this.defer = defer; +}; + +var lazyUnit = new Lazy(function (v) { + return Data_Unit.unit; +}); +var lazyFn = new Lazy(function (f) { + return function (x) { + return f(Data_Unit.unit)(x); + }; +}); + +var defer = function defer(dict) { + return dict.defer; +}; + +var fix = function fix(dictLazy) { + return function (f) { + var go = defer(dictLazy)(function (v) { + return f(go); + }); + return go; + }; +}; + +module.exports = { + defer: defer, + Lazy: Lazy, + fix: fix, + lazyFn: lazyFn, + lazyUnit: lazyUnit +}; +},{"../Data.Unit/index.js":"NhVk"}],"e7y+":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var BooleanAlgebraRecord = function BooleanAlgebraRecord(HeytingAlgebraRecord0) { + this.HeytingAlgebraRecord0 = HeytingAlgebraRecord0; +}; + +var BooleanAlgebra = function BooleanAlgebra(HeytingAlgebra0) { + this.HeytingAlgebra0 = HeytingAlgebra0; +}; + +var booleanAlgebraUnit = new BooleanAlgebra(function () { + return Data_HeytingAlgebra.heytingAlgebraUnit; +}); +var booleanAlgebraRecordNil = new BooleanAlgebraRecord(function () { + return Data_HeytingAlgebra.heytingAlgebraRecordNil; +}); + +var booleanAlgebraRecordCons = function booleanAlgebraRecordCons(dictIsSymbol) { + return function (dictCons) { + return function (dictBooleanAlgebraRecord) { + return function (dictBooleanAlgebra) { + return new BooleanAlgebraRecord(function () { + return Data_HeytingAlgebra.heytingAlgebraRecordCons(dictIsSymbol)(dictCons)(dictBooleanAlgebraRecord.HeytingAlgebraRecord0())(dictBooleanAlgebra.HeytingAlgebra0()); + }); + }; + }; + }; +}; + +var booleanAlgebraRecord = function booleanAlgebraRecord(dictRowToList) { + return function (dictBooleanAlgebraRecord) { + return new BooleanAlgebra(function () { + return Data_HeytingAlgebra.heytingAlgebraRecord(dictRowToList)(dictBooleanAlgebraRecord.HeytingAlgebraRecord0()); + }); + }; +}; + +var booleanAlgebraFn = function booleanAlgebraFn(dictBooleanAlgebra) { + return new BooleanAlgebra(function () { + return Data_HeytingAlgebra.heytingAlgebraFunction(dictBooleanAlgebra.HeytingAlgebra0()); + }); +}; + +var booleanAlgebraBoolean = new BooleanAlgebra(function () { + return Data_HeytingAlgebra.heytingAlgebraBoolean; +}); +module.exports = { + BooleanAlgebra: BooleanAlgebra, + BooleanAlgebraRecord: BooleanAlgebraRecord, + booleanAlgebraBoolean: booleanAlgebraBoolean, + booleanAlgebraUnit: booleanAlgebraUnit, + booleanAlgebraFn: booleanAlgebraFn, + booleanAlgebraRecord: booleanAlgebraRecord, + booleanAlgebraRecordNil: booleanAlgebraRecordNil, + booleanAlgebraRecordCons: booleanAlgebraRecordCons +}; +},{"../Data.HeytingAlgebra/index.js":"paZe"}],"8PTu":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Distributive = function Distributive(Functor0, collect, distribute) { + this.Functor0 = Functor0; + this.collect = collect; + this.distribute = distribute; +}; + +var distributiveIdentity = new Distributive(function () { + return Data_Identity.functorIdentity; +}, function (dictFunctor) { + return function (f) { + var $11 = Data_Functor.map(dictFunctor)(function () { + var $13 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity); + return function ($14) { + return $13(f($14)); + }; + }()); + return function ($12) { + return Data_Identity.Identity($11($12)); + }; + }; +}, function (dictFunctor) { + var $15 = Data_Functor.map(dictFunctor)(Data_Newtype.unwrap(Data_Identity.newtypeIdentity)); + return function ($16) { + return Data_Identity.Identity($15($16)); + }; +}); + +var distribute = function distribute(dict) { + return dict.distribute; +}; + +var distributiveFunction = new Distributive(function () { + return Data_Functor.functorFn; +}, function (dictFunctor) { + return function (f) { + var $17 = distribute(distributiveFunction)(dictFunctor); + var $18 = Data_Functor.map(dictFunctor)(f); + return function ($19) { + return $17($18($19)); + }; + }; +}, function (dictFunctor) { + return function (a) { + return function (e) { + return Data_Functor.map(dictFunctor)(function (v) { + return v(e); + })(a); + }; + }; +}); + +var cotraverse = function cotraverse(dictDistributive) { + return function (dictFunctor) { + return function (f) { + var $20 = Data_Functor.map(dictDistributive.Functor0())(f); + var $21 = distribute(dictDistributive)(dictFunctor); + return function ($22) { + return $20($21($22)); + }; + }; + }; +}; + +var collectDefault = function collectDefault(dictDistributive) { + return function (dictFunctor) { + return function (f) { + var $23 = distribute(dictDistributive)(dictFunctor); + var $24 = Data_Functor.map(dictFunctor)(f); + return function ($25) { + return $23($24($25)); + }; + }; + }; +}; + +var collect = function collect(dict) { + return dict.collect; +}; + +var distributeDefault = function distributeDefault(dictDistributive) { + return function (dictFunctor) { + return collect(dictDistributive)(dictFunctor)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +module.exports = { + collect: collect, + distribute: distribute, + Distributive: Distributive, + distributeDefault: distributeDefault, + collectDefault: collectDefault, + cotraverse: cotraverse, + distributiveIdentity: distributiveIdentity, + distributiveFunction: distributiveFunction +}; +},{"../Control.Category/index.js":"IAi2","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Newtype/index.js":"lz8k"}],"Uq/R":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var TypeEquals = function TypeEquals(from, to) { + this.from = from; + this.to = to; +}; + +var to = function to(dict) { + return dict.to; +}; + +var refl = new TypeEquals(function (a) { + return a; +}, function (a) { + return a; +}); + +var from = function from(dict) { + return dict.from; +}; + +module.exports = { + TypeEquals: TypeEquals, + to: to, + from: from, + refl: refl +}; +},{}],"II/O":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Biapplicative = require("../Control.Biapplicative/index.js"); + +var Control_Biapply = require("../Control.Biapply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Comonad = require("../Control.Comonad/index.js"); + +var Control_Extend = require("../Control.Extend/index.js"); + +var Control_Lazy = require("../Control.Lazy/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Bifoldable = require("../Data.Bifoldable/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Bitraversable = require("../Data.Bitraversable/index.js"); + +var Data_BooleanAlgebra = require("../Data.BooleanAlgebra/index.js"); + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_CommutativeRing = require("../Data.CommutativeRing/index.js"); + +var Data_Distributive = require("../Data.Distributive/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Maybe_First = require("../Data.Maybe.First/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js"); + +var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Type_Equality = require("../Type.Equality/index.js"); + +var Tuple = function () { + function Tuple(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Tuple.create = function (value0) { + return function (value1) { + return new Tuple(value0, value1); + }; + }; + + return Tuple; +}(); + +var uncurry = function uncurry(f) { + return function (v) { + return f(v.value0)(v.value1); + }; +}; + +var swap = function swap(v) { + return new Tuple(v.value1, v.value0); +}; + +var snd = function snd(v) { + return v.value1; +}; + +var showTuple = function showTuple(dictShow) { + return function (dictShow1) { + return new Data_Show.Show(function (v) { + return "(Tuple " + (Data_Show.show(dictShow)(v.value0) + (" " + (Data_Show.show(dictShow1)(v.value1) + ")"))); + }); + }; +}; + +var semiringTuple = function semiringTuple(dictSemiring) { + return function (dictSemiring1) { + return new Data_Semiring.Semiring(function (v) { + return function (v1) { + return new Tuple(Data_Semiring.add(dictSemiring)(v.value0)(v1.value0), Data_Semiring.add(dictSemiring1)(v.value1)(v1.value1)); + }; + }, function (v) { + return function (v1) { + return new Tuple(Data_Semiring.mul(dictSemiring)(v.value0)(v1.value0), Data_Semiring.mul(dictSemiring1)(v.value1)(v1.value1)); + }; + }, new Tuple(Data_Semiring.one(dictSemiring), Data_Semiring.one(dictSemiring1)), new Tuple(Data_Semiring.zero(dictSemiring), Data_Semiring.zero(dictSemiring1))); + }; +}; + +var semigroupoidTuple = new Control_Semigroupoid.Semigroupoid(function (v) { + return function (v1) { + return new Tuple(v1.value0, v.value1); + }; +}); + +var semigroupTuple = function semigroupTuple(dictSemigroup) { + return function (dictSemigroup1) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return new Tuple(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), Data_Semigroup.append(dictSemigroup1)(v.value1)(v1.value1)); + }; + }); + }; +}; + +var ringTuple = function ringTuple(dictRing) { + return function (dictRing1) { + return new Data_Ring.Ring(function () { + return semiringTuple(dictRing.Semiring0())(dictRing1.Semiring0()); + }, function (v) { + return function (v1) { + return new Tuple(Data_Ring.sub(dictRing)(v.value0)(v1.value0), Data_Ring.sub(dictRing1)(v.value1)(v1.value1)); + }; + }); + }; +}; + +var monoidTuple = function monoidTuple(dictMonoid) { + return function (dictMonoid1) { + return new Data_Monoid.Monoid(function () { + return semigroupTuple(dictMonoid.Semigroup0())(dictMonoid1.Semigroup0()); + }, new Tuple(Data_Monoid.mempty(dictMonoid), Data_Monoid.mempty(dictMonoid1))); + }; +}; + +var lookup = function lookup(dictFoldable) { + return function (dictEq) { + return function (a) { + var $312 = Data_Newtype.unwrap(Data_Maybe_First.newtypeFirst); + var $313 = Data_Foldable.foldMap(dictFoldable)(Data_Maybe_First.monoidFirst)(function (v) { + var $163 = Data_Eq.eq(dictEq)(a)(v.value0); + + if ($163) { + return new Data_Maybe.Just(v.value1); + } + + ; + return Data_Maybe.Nothing.value; + }); + return function ($314) { + return $312($313($314)); + }; + }; + }; +}; + +var heytingAlgebraTuple = function heytingAlgebraTuple(dictHeytingAlgebra) { + return function (dictHeytingAlgebra1) { + return new Data_HeytingAlgebra.HeytingAlgebra(function (v) { + return function (v1) { + return new Tuple(Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v.value0)(v1.value0), Data_HeytingAlgebra.conj(dictHeytingAlgebra1)(v.value1)(v1.value1)); + }; + }, function (v) { + return function (v1) { + return new Tuple(Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v.value0)(v1.value0), Data_HeytingAlgebra.disj(dictHeytingAlgebra1)(v.value1)(v1.value1)); + }; + }, new Tuple(Data_HeytingAlgebra.ff(dictHeytingAlgebra), Data_HeytingAlgebra.ff(dictHeytingAlgebra1)), function (v) { + return function (v1) { + return new Tuple(Data_HeytingAlgebra.implies(dictHeytingAlgebra)(v.value0)(v1.value0), Data_HeytingAlgebra.implies(dictHeytingAlgebra1)(v.value1)(v1.value1)); + }; + }, function (v) { + return new Tuple(Data_HeytingAlgebra.not(dictHeytingAlgebra)(v.value0), Data_HeytingAlgebra.not(dictHeytingAlgebra1)(v.value1)); + }, new Tuple(Data_HeytingAlgebra.tt(dictHeytingAlgebra), Data_HeytingAlgebra.tt(dictHeytingAlgebra1))); + }; +}; + +var functorTuple = new Data_Functor.Functor(function (f) { + return function (m) { + return new Tuple(m.value0, f(m.value1)); + }; +}); +var functorWithIndexTuple = new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorTuple; +}, function (f) { + return Data_Functor.map(functorTuple)(f(Data_Unit.unit)); +}); +var invariantTuple = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorTuple)); + +var fst = function fst(v) { + return v.value0; +}; + +var lazyTuple = function lazyTuple(dictLazy) { + return function (dictLazy1) { + return new Control_Lazy.Lazy(function (f) { + return new Tuple(Control_Lazy.defer(dictLazy)(function (v) { + return fst(f(Data_Unit.unit)); + }), Control_Lazy.defer(dictLazy1)(function (v) { + return snd(f(Data_Unit.unit)); + })); + }); + }; +}; + +var foldableTuple = new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return f(v.value1); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(z)(v.value1); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(v.value1)(z); + }; + }; +}); +var foldableWithIndexTuple = new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableTuple; +}, function (dictMonoid) { + return function (f) { + return function (v) { + return f(Data_Unit.unit)(v.value1); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(Data_Unit.unit)(z)(v.value1); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(Data_Unit.unit)(v.value1)(z); + }; + }; +}); +var traversableTuple = new Data_Traversable.Traversable(function () { + return foldableTuple; +}, function () { + return functorTuple; +}, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create(v.value0))(v.value1); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create(v.value0))(f(v.value1)); + }; + }; +}); +var traversableWithIndexTuple = new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexTuple; +}, function () { + return functorWithIndexTuple; +}, function () { + return traversableTuple; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create(v.value0))(f(Data_Unit.unit)(v.value1)); + }; + }; +}); +var foldable1Tuple = new Data_Semigroup_Foldable.Foldable1(function () { + return foldableTuple; +}, function (dictSemigroup) { + return function (v) { + return v.value1; + }; +}, function (dictSemigroup) { + return function (f) { + return function (v) { + return f(v.value1); + }; + }; +}); +var traversable1Tuple = new Data_Semigroup_Traversable.Traversable1(function () { + return foldable1Tuple; +}, function () { + return traversableTuple; +}, function (dictApply) { + return function (v) { + return Data_Functor.map(dictApply.Functor0())(Tuple.create(v.value0))(v.value1); + }; +}, function (dictApply) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApply.Functor0())(Tuple.create(v.value0))(f(v.value1)); + }; + }; +}); +var extendTuple = new Control_Extend.Extend(function () { + return functorTuple; +}, function (f) { + return function (v) { + return new Tuple(v.value0, f(v)); + }; +}); + +var eqTuple = function eqTuple(dictEq) { + return function (dictEq1) { + return new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq(dictEq1)(x.value1)(y.value1); + }; + }); + }; +}; + +var ordTuple = function ordTuple(dictOrd) { + return function (dictOrd1) { + return new Data_Ord.Ord(function () { + return eqTuple(dictOrd.Eq0())(dictOrd1.Eq0()); + }, function (x) { + return function (y) { + var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0); + + if (v instanceof Data_Ordering.LT) { + return Data_Ordering.LT.value; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Data_Ordering.GT.value; + } + + ; + return Data_Ord.compare(dictOrd1)(x.value1)(y.value1); + }; + }); + }; +}; + +var eq1Tuple = function eq1Tuple(dictEq) { + return new Data_Eq.Eq1(function (dictEq1) { + return Data_Eq.eq(eqTuple(dictEq)(dictEq1)); + }); +}; + +var ord1Tuple = function ord1Tuple(dictOrd) { + return new Data_Ord.Ord1(function () { + return eq1Tuple(dictOrd.Eq0()); + }, function (dictOrd1) { + return Data_Ord.compare(ordTuple(dictOrd)(dictOrd1)); + }); +}; + +var distributiveTuple = function distributiveTuple(dictTypeEquals) { + return new Data_Distributive.Distributive(function () { + return functorTuple; + }, function (dictFunctor) { + return Data_Distributive.collectDefault(distributiveTuple(dictTypeEquals))(dictFunctor); + }, function (dictFunctor) { + var $315 = Tuple.create(Type_Equality.from(dictTypeEquals)(Data_Unit.unit)); + var $316 = Data_Functor.map(dictFunctor)(snd); + return function ($317) { + return $315($316($317)); + }; + }); +}; + +var curry = function curry(f) { + return function (a) { + return function (b) { + return f(new Tuple(a, b)); + }; + }; +}; + +var comonadTuple = new Control_Comonad.Comonad(function () { + return extendTuple; +}, snd); + +var commutativeRingTuple = function commutativeRingTuple(dictCommutativeRing) { + return function (dictCommutativeRing1) { + return new Data_CommutativeRing.CommutativeRing(function () { + return ringTuple(dictCommutativeRing.Ring0())(dictCommutativeRing1.Ring0()); + }); + }; +}; + +var boundedTuple = function boundedTuple(dictBounded) { + return function (dictBounded1) { + return new Data_Bounded.Bounded(function () { + return ordTuple(dictBounded.Ord0())(dictBounded1.Ord0()); + }, new Tuple(Data_Bounded.bottom(dictBounded), Data_Bounded.bottom(dictBounded1)), new Tuple(Data_Bounded.top(dictBounded), Data_Bounded.top(dictBounded1))); + }; +}; + +var booleanAlgebraTuple = function booleanAlgebraTuple(dictBooleanAlgebra) { + return function (dictBooleanAlgebra1) { + return new Data_BooleanAlgebra.BooleanAlgebra(function () { + return heytingAlgebraTuple(dictBooleanAlgebra.HeytingAlgebra0())(dictBooleanAlgebra1.HeytingAlgebra0()); + }); + }; +}; + +var bifunctorTuple = new Data_Bifunctor.Bifunctor(function (f) { + return function (g) { + return function (v) { + return new Tuple(f(v.value0), g(v.value1)); + }; + }; +}); +var bifoldableTuple = new Data_Bifoldable.Bifoldable(function (dictMonoid) { + return function (f) { + return function (g) { + return function (v) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(f(v.value0))(g(v.value1)); + }; + }; + }; +}, function (f) { + return function (g) { + return function (z) { + return function (v) { + return g(f(z)(v.value0))(v.value1); + }; + }; + }; +}, function (f) { + return function (g) { + return function (z) { + return function (v) { + return f(v.value0)(g(v.value1)(z)); + }; + }; + }; +}); +var bitraversableTuple = new Data_Bitraversable.Bitraversable(function () { + return bifoldableTuple; +}, function () { + return bifunctorTuple; +}, function (dictApplicative) { + return function (v) { + return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create)(v.value0))(v.value1); + }; +}, function (dictApplicative) { + return function (f) { + return function (g) { + return function (v) { + return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create)(f(v.value0)))(g(v.value1)); + }; + }; + }; +}); +var biapplyTuple = new Control_Biapply.Biapply(function () { + return bifunctorTuple; +}, function (v) { + return function (v1) { + return new Tuple(v.value0(v1.value0), v.value1(v1.value1)); + }; +}); +var biapplicativeTuple = new Control_Biapplicative.Biapplicative(function () { + return biapplyTuple; +}, Tuple.create); + +var applyTuple = function applyTuple(dictSemigroup) { + return new Control_Apply.Apply(function () { + return functorTuple; + }, function (v) { + return function (v1) { + return new Tuple(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), v.value1(v1.value1)); + }; + }); +}; + +var bindTuple = function bindTuple(dictSemigroup) { + return new Control_Bind.Bind(function () { + return applyTuple(dictSemigroup); + }, function (v) { + return function (f) { + var v1 = f(v.value1); + return new Tuple(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), v1.value1); + }; + }); +}; + +var applicativeTuple = function applicativeTuple(dictMonoid) { + return new Control_Applicative.Applicative(function () { + return applyTuple(dictMonoid.Semigroup0()); + }, Tuple.create(Data_Monoid.mempty(dictMonoid))); +}; + +var monadTuple = function monadTuple(dictMonoid) { + return new Control_Monad.Monad(function () { + return applicativeTuple(dictMonoid); + }, function () { + return bindTuple(dictMonoid.Semigroup0()); + }); +}; + +module.exports = { + Tuple: Tuple, + fst: fst, + snd: snd, + curry: curry, + uncurry: uncurry, + swap: swap, + lookup: lookup, + showTuple: showTuple, + eqTuple: eqTuple, + eq1Tuple: eq1Tuple, + ordTuple: ordTuple, + ord1Tuple: ord1Tuple, + boundedTuple: boundedTuple, + semigroupoidTuple: semigroupoidTuple, + semigroupTuple: semigroupTuple, + monoidTuple: monoidTuple, + semiringTuple: semiringTuple, + ringTuple: ringTuple, + commutativeRingTuple: commutativeRingTuple, + heytingAlgebraTuple: heytingAlgebraTuple, + booleanAlgebraTuple: booleanAlgebraTuple, + functorTuple: functorTuple, + functorWithIndexTuple: functorWithIndexTuple, + invariantTuple: invariantTuple, + bifunctorTuple: bifunctorTuple, + applyTuple: applyTuple, + biapplyTuple: biapplyTuple, + applicativeTuple: applicativeTuple, + biapplicativeTuple: biapplicativeTuple, + bindTuple: bindTuple, + monadTuple: monadTuple, + extendTuple: extendTuple, + comonadTuple: comonadTuple, + lazyTuple: lazyTuple, + foldableTuple: foldableTuple, + foldable1Tuple: foldable1Tuple, + foldableWithIndexTuple: foldableWithIndexTuple, + bifoldableTuple: bifoldableTuple, + traversableTuple: traversableTuple, + traversable1Tuple: traversable1Tuple, + traversableWithIndexTuple: traversableWithIndexTuple, + bitraversableTuple: bitraversableTuple, + distributiveTuple: distributiveTuple +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Biapplicative/index.js":"Sd0N","../Control.Biapply/index.js":"X0ga","../Control.Bind/index.js":"7VcT","../Control.Comonad/index.js":"U0zO","../Control.Extend/index.js":"JIoJ","../Control.Lazy/index.js":"y9cE","../Control.Monad/index.js":"U/Ix","../Control.Semigroupoid/index.js":"/riR","../Data.Bifoldable/index.js":"wjQo","../Data.Bifunctor/index.js":"e2Wc","../Data.Bitraversable/index.js":"8nb9","../Data.BooleanAlgebra/index.js":"e7y+","../Data.Bounded/index.js":"kcUU","../Data.CommutativeRing/index.js":"60TQ","../Data.Distributive/index.js":"8PTu","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Functor/index.js":"+0AE","../Data.Functor.Invariant/index.js":"AXkC","../Data.FunctorWithIndex/index.js":"OHRN","../Data.HeytingAlgebra/index.js":"paZe","../Data.Maybe/index.js":"5mN7","../Data.Maybe.First/index.js":"W/l6","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Ring/index.js":"E2qH","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Unit/index.js":"NhVk","../Type.Equality/index.js":"Uq/R"}],"u1pL":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var MonadState = function MonadState(Monad0, state) { + this.Monad0 = Monad0; + this.state = state; +}; + +var state = function state(dict) { + return dict.state; +}; + +var put = function put(dictMonadState) { + return function (s) { + return state(dictMonadState)(function (v) { + return new Data_Tuple.Tuple(Data_Unit.unit, s); + }); + }; +}; + +var modify_ = function modify_(dictMonadState) { + return function (f) { + return state(dictMonadState)(function (s) { + return new Data_Tuple.Tuple(Data_Unit.unit, f(s)); + }); + }; +}; + +var modify = function modify(dictMonadState) { + return function (f) { + return state(dictMonadState)(function (s) { + var s$prime = f(s); + return new Data_Tuple.Tuple(s$prime, s$prime); + }); + }; +}; + +var gets = function gets(dictMonadState) { + return function (f) { + return state(dictMonadState)(function (s) { + return new Data_Tuple.Tuple(f(s), s); + }); + }; +}; + +var get = function get(dictMonadState) { + return state(dictMonadState)(function (s) { + return new Data_Tuple.Tuple(s, s); + }); +}; + +module.exports = { + state: state, + MonadState: MonadState, + get: get, + gets: gets, + put: put, + modify: modify, + modify_: modify_ +}; +},{"../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk"}],"5tIR":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var MonadTrans = function MonadTrans(lift) { + this.lift = lift; +}; + +var lift = function lift(dict) { + return dict.lift; +}; + +module.exports = { + lift: lift, + MonadTrans: MonadTrans +}; +},{}],"gxgA":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var MonadTell = function MonadTell(Monad0, tell) { + this.Monad0 = Monad0; + this.tell = tell; +}; + +var MonadWriter = function MonadWriter(MonadTell0, listen, pass) { + this.MonadTell0 = MonadTell0; + this.listen = listen; + this.pass = pass; +}; + +var tell = function tell(dict) { + return dict.tell; +}; + +var pass = function pass(dict) { + return dict.pass; +}; + +var listen = function listen(dict) { + return dict.listen; +}; + +var listens = function listens(dictMonadWriter) { + return function (f) { + return function (m) { + return Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(listen(dictMonadWriter)(m))(function (v) { + return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(new Data_Tuple.Tuple(v.value0, f(v.value1))); + }); + }; + }; +}; + +var censor = function censor(dictMonadWriter) { + return function (f) { + return function (m) { + return pass(dictMonadWriter)(Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(m)(function (v) { + return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(new Data_Tuple.Tuple(v, f)); + })); + }; + }; +}; + +module.exports = { + listen: listen, + pass: pass, + tell: tell, + MonadTell: MonadTell, + MonadWriter: MonadWriter, + listens: listens, + censor: censor +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Data.Tuple/index.js":"II/O"}],"HkJx":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var MonadPlus = function MonadPlus(MonadZero0) { + this.MonadZero0 = MonadZero0; +}; + +var monadPlusArray = new MonadPlus(function () { + return Control_MonadZero.monadZeroArray; +}); +module.exports = { + MonadPlus: MonadPlus, + monadPlusArray: monadPlusArray +}; +},{"../Control.MonadZero/index.js":"lD5R"}],"dWtH":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Effect = require("../Effect/index.js"); + +var MonadEffect = function MonadEffect(Monad0, liftEffect) { + this.Monad0 = Monad0; + this.liftEffect = liftEffect; +}; + +var monadEffectEffect = new MonadEffect(function () { + return Effect.monadEffect; +}, Control_Category.identity(Control_Category.categoryFn)); + +var liftEffect = function liftEffect(dict) { + return dict.liftEffect; +}; + +module.exports = { + liftEffect: liftEffect, + MonadEffect: MonadEffect, + monadEffectEffect: monadEffectEffect +}; +},{"../Control.Category/index.js":"IAi2","../Effect/index.js":"oTWB"}],"gr8B":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js"); + +var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js"); + +var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js"); + +var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js"); + +var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js"); + +var Control_MonadPlus = require("../Control.MonadPlus/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var ExceptT = function ExceptT(x) { + return x; +}; + +var withExceptT = function withExceptT(dictFunctor) { + return function (f) { + return function (v) { + var mapLeft = function mapLeft(v1) { + return function (v2) { + if (v2 instanceof Data_Either.Right) { + return new Data_Either.Right(v2.value0); + } + + ; + + if (v2 instanceof Data_Either.Left) { + return new Data_Either.Left(v1(v2.value0)); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 42, column 3 - line 42, column 32): " + [v1.constructor.name, v2.constructor.name]); + }; + }; + + return ExceptT(Data_Functor.map(dictFunctor)(mapLeft(f))(v)); + }; + }; +}; + +var runExceptT = function runExceptT(v) { + return v; +}; + +var newtypeExceptT = new Data_Newtype.Newtype(function (n) { + return n; +}, ExceptT); +var monadTransExceptT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) { + return function (m) { + return Control_Bind.bind(dictMonad.Bind1())(m)(function (v) { + return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Right(v)); + }); + }; +}); + +var mapExceptT = function mapExceptT(f) { + return function (v) { + return f(v); + }; +}; + +var functorExceptT = function functorExceptT(dictFunctor) { + return new Data_Functor.Functor(function (f) { + return mapExceptT(Data_Functor.map(dictFunctor)(Data_Functor.map(Data_Either.functorEither)(f))); + }); +}; + +var except = function except(dictApplicative) { + var $96 = Control_Applicative.pure(dictApplicative); + return function ($97) { + return ExceptT($96($97)); + }; +}; + +var monadExceptT = function monadExceptT(dictMonad) { + return new Control_Monad.Monad(function () { + return applicativeExceptT(dictMonad); + }, function () { + return bindExceptT(dictMonad); + }); +}; + +var bindExceptT = function bindExceptT(dictMonad) { + return new Control_Bind.Bind(function () { + return applyExceptT(dictMonad); + }, function (v) { + return function (k) { + return Control_Bind.bind(dictMonad.Bind1())(v)(Data_Either.either(function () { + var $98 = Control_Applicative.pure(dictMonad.Applicative0()); + return function ($99) { + return $98(Data_Either.Left.create($99)); + }; + }())(function (a) { + var v1 = k(a); + return v1; + })); + }; + }); +}; + +var applyExceptT = function applyExceptT(dictMonad) { + return new Control_Apply.Apply(function () { + return functorExceptT(dictMonad.Bind1().Apply0().Functor0()); + }, Control_Monad.ap(monadExceptT(dictMonad))); +}; + +var applicativeExceptT = function applicativeExceptT(dictMonad) { + return new Control_Applicative.Applicative(function () { + return applyExceptT(dictMonad); + }, function () { + var $100 = Control_Applicative.pure(dictMonad.Applicative0()); + return function ($101) { + return ExceptT($100(Data_Either.Right.create($101))); + }; + }()); +}; + +var monadAskExceptT = function monadAskExceptT(dictMonadAsk) { + return new Control_Monad_Reader_Class.MonadAsk(function () { + return monadExceptT(dictMonadAsk.Monad0()); + }, Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk))); +}; + +var monadReaderExceptT = function monadReaderExceptT(dictMonadReader) { + return new Control_Monad_Reader_Class.MonadReader(function () { + return monadAskExceptT(dictMonadReader.MonadAsk0()); + }, function (f) { + return mapExceptT(Control_Monad_Reader_Class.local(dictMonadReader)(f)); + }); +}; + +var monadContExceptT = function monadContExceptT(dictMonadCont) { + return new Control_Monad_Cont_Class.MonadCont(function () { + return monadExceptT(dictMonadCont.Monad0()); + }, function (f) { + return ExceptT(Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) { + var v = f(function (a) { + return ExceptT(c(new Data_Either.Right(a))); + }); + return v; + })); + }); +}; + +var monadEffectExceptT = function monadEffectExceptT(dictMonadEffect) { + return new Effect_Class.MonadEffect(function () { + return monadExceptT(dictMonadEffect.Monad0()); + }, function () { + var $102 = Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadEffect.Monad0()); + var $103 = Effect_Class.liftEffect(dictMonadEffect); + return function ($104) { + return $102($103($104)); + }; + }()); +}; + +var monadRecExceptT = function monadRecExceptT(dictMonadRec) { + return new Control_Monad_Rec_Class.MonadRec(function () { + return monadExceptT(dictMonadRec.Monad0()); + }, function (f) { + var $105 = Control_Monad_Rec_Class.tailRecM(dictMonadRec)(function (a) { + var v = f(a); + return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(v)(function (m$prime) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(function () { + if (m$prime instanceof Data_Either.Left) { + return new Control_Monad_Rec_Class.Done(new Data_Either.Left(m$prime.value0)); + } + + ; + + if (m$prime instanceof Data_Either.Right && m$prime.value0 instanceof Control_Monad_Rec_Class.Loop) { + return new Control_Monad_Rec_Class.Loop(m$prime.value0.value0); + } + + ; + + if (m$prime instanceof Data_Either.Right && m$prime.value0 instanceof Control_Monad_Rec_Class.Done) { + return new Control_Monad_Rec_Class.Done(new Data_Either.Right(m$prime.value0.value0)); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 74, column 14 - line 77, column 43): " + [m$prime.constructor.name]); + }()); + }); + }); + return function ($106) { + return ExceptT($105($106)); + }; + }); +}; + +var monadStateExceptT = function monadStateExceptT(dictMonadState) { + return new Control_Monad_State_Class.MonadState(function () { + return monadExceptT(dictMonadState.Monad0()); + }, function (f) { + return Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadState.Monad0())(Control_Monad_State_Class.state(dictMonadState)(f)); + }); +}; + +var monadTellExceptT = function monadTellExceptT(dictMonadTell) { + return new Control_Monad_Writer_Class.MonadTell(function () { + return monadExceptT(dictMonadTell.Monad0()); + }, function () { + var $107 = Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadTell.Monad0()); + var $108 = Control_Monad_Writer_Class.tell(dictMonadTell); + return function ($109) { + return $107($108($109)); + }; + }()); +}; + +var monadWriterExceptT = function monadWriterExceptT(dictMonadWriter) { + return new Control_Monad_Writer_Class.MonadWriter(function () { + return monadTellExceptT(dictMonadWriter.MonadTell0()); + }, mapExceptT(function (m) { + return Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(Control_Monad_Writer_Class.listen(dictMonadWriter)(m))(function (v) { + return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(Data_Functor.map(Data_Either.functorEither)(function (r) { + return new Data_Tuple.Tuple(r, v.value1); + })(v.value0)); + }); + }), mapExceptT(function (m) { + return Control_Monad_Writer_Class.pass(dictMonadWriter)(Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(m)(function (v) { + return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(function () { + if (v instanceof Data_Either.Left) { + return new Data_Tuple.Tuple(new Data_Either.Left(v.value0), Control_Category.identity(Control_Category.categoryFn)); + } + + ; + + if (v instanceof Data_Either.Right) { + return new Data_Tuple.Tuple(new Data_Either.Right(v.value0.value0), v.value0.value1); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 136, column 10 - line 138, column 45): " + [v.constructor.name]); + }()); + })); + })); +}; + +var monadThrowExceptT = function monadThrowExceptT(dictMonad) { + return new Control_Monad_Error_Class.MonadThrow(function () { + return monadExceptT(dictMonad); + }, function () { + var $110 = Control_Applicative.pure(dictMonad.Applicative0()); + return function ($111) { + return ExceptT($110(Data_Either.Left.create($111))); + }; + }()); +}; + +var monadErrorExceptT = function monadErrorExceptT(dictMonad) { + return new Control_Monad_Error_Class.MonadError(function () { + return monadThrowExceptT(dictMonad); + }, function (v) { + return function (k) { + return Control_Bind.bind(dictMonad.Bind1())(v)(Data_Either.either(function (a) { + var v1 = k(a); + return v1; + })(function () { + var $112 = Control_Applicative.pure(dictMonad.Applicative0()); + return function ($113) { + return $112(Data_Either.Right.create($113)); + }; + }())); + }; + }); +}; + +var altExceptT = function altExceptT(dictSemigroup) { + return function (dictMonad) { + return new Control_Alt.Alt(function () { + return functorExceptT(dictMonad.Bind1().Apply0().Functor0()); + }, function (v) { + return function (v1) { + return Control_Bind.bind(dictMonad.Bind1())(v)(function (v2) { + if (v2 instanceof Data_Either.Right) { + return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Right(v2.value0)); + } + + ; + + if (v2 instanceof Data_Either.Left) { + return Control_Bind.bind(dictMonad.Bind1())(v1)(function (v3) { + if (v3 instanceof Data_Either.Right) { + return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Right(v3.value0)); + } + + ; + + if (v3 instanceof Data_Either.Left) { + return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Left(Data_Semigroup.append(dictSemigroup)(v2.value0)(v3.value0))); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 86, column 9 - line 88, column 49): " + [v3.constructor.name]); + }); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 82, column 5 - line 88, column 49): " + [v2.constructor.name]); + }); + }; + }); + }; +}; + +var plusExceptT = function plusExceptT(dictMonoid) { + return function (dictMonad) { + return new Control_Plus.Plus(function () { + return altExceptT(dictMonoid.Semigroup0())(dictMonad); + }, Control_Monad_Error_Class.throwError(monadThrowExceptT(dictMonad))(Data_Monoid.mempty(dictMonoid))); + }; +}; + +var alternativeExceptT = function alternativeExceptT(dictMonoid) { + return function (dictMonad) { + return new Control_Alternative.Alternative(function () { + return applicativeExceptT(dictMonad); + }, function () { + return plusExceptT(dictMonoid)(dictMonad); + }); + }; +}; + +var monadZeroExceptT = function monadZeroExceptT(dictMonoid) { + return function (dictMonad) { + return new Control_MonadZero.MonadZero(function () { + return alternativeExceptT(dictMonoid)(dictMonad); + }, function () { + return monadExceptT(dictMonad); + }); + }; +}; + +var monadPlusExceptT = function monadPlusExceptT(dictMonoid) { + return function (dictMonad) { + return new Control_MonadPlus.MonadPlus(function () { + return monadZeroExceptT(dictMonoid)(dictMonad); + }); + }; +}; + +module.exports = { + ExceptT: ExceptT, + runExceptT: runExceptT, + withExceptT: withExceptT, + mapExceptT: mapExceptT, + except: except, + newtypeExceptT: newtypeExceptT, + functorExceptT: functorExceptT, + applyExceptT: applyExceptT, + applicativeExceptT: applicativeExceptT, + bindExceptT: bindExceptT, + monadExceptT: monadExceptT, + monadRecExceptT: monadRecExceptT, + altExceptT: altExceptT, + plusExceptT: plusExceptT, + alternativeExceptT: alternativeExceptT, + monadPlusExceptT: monadPlusExceptT, + monadZeroExceptT: monadZeroExceptT, + monadTransExceptT: monadTransExceptT, + monadEffectExceptT: monadEffectExceptT, + monadContExceptT: monadContExceptT, + monadThrowExceptT: monadThrowExceptT, + monadErrorExceptT: monadErrorExceptT, + monadAskExceptT: monadAskExceptT, + monadReaderExceptT: monadReaderExceptT, + monadStateExceptT: monadStateExceptT, + monadTellExceptT: monadTellExceptT, + monadWriterExceptT: monadWriterExceptT +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad/index.js":"U/Ix","../Control.Monad.Cont.Class/index.js":"IpNh","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Class/index.js":"gxgA","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O","../Effect.Class/index.js":"dWtH"}],"Fye2":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var withExcept = Control_Monad_Except_Trans.withExceptT(Data_Identity.functorIdentity); + +var runExcept = function () { + var $0 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity); + return function ($1) { + return $0(Control_Monad_Except_Trans.runExceptT($1)); + }; +}(); + +var mapExcept = function mapExcept(f) { + return Control_Monad_Except_Trans.mapExceptT(function () { + var $2 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity); + return function ($3) { + return Data_Identity.Identity(f($2($3))); + }; + }()); +}; + +module.exports = { + runExcept: runExcept, + mapExcept: mapExcept, + withExcept: withExcept +}; +},{"../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Identity/index.js":"2OKT","../Data.Newtype/index.js":"lz8k"}],"TZDL":[function(require,module,exports) { +"use strict"; //------------------------------------------------------------------------------ +// Array creation -------------------------------------------------------------- +//------------------------------------------------------------------------------ + +exports.range = function (start) { + return function (end) { + var step = start > end ? -1 : 1; + var result = new Array(step * (end - start) + 1); + var i = start, + n = 0; + + while (i !== end) { + result[n++] = i; + i += step; + } + + result[n] = i; + return result; + }; +}; + +var replicateFill = function replicateFill(count) { + return function (value) { + if (count < 1) { + return []; + } + + var result = new Array(count); + return result.fill(value); + }; +}; + +var replicatePolyfill = function replicatePolyfill(count) { + return function (value) { + var result = []; + var n = 0; + + for (var i = 0; i < count; i++) { + result[n++] = value; + } + + return result; + }; +}; // In browsers that have Array.prototype.fill we use it, as it's faster. + + +exports.replicate = typeof Array.prototype.fill === "function" ? replicateFill : replicatePolyfill; + +exports.fromFoldableImpl = function () { + function Cons(head, tail) { + this.head = head; + this.tail = tail; + } + + var emptyList = {}; + + function curryCons(head) { + return function (tail) { + return new Cons(head, tail); + }; + } + + function listToArray(list) { + var result = []; + var count = 0; + var xs = list; + + while (xs !== emptyList) { + result[count++] = xs.head; + xs = xs.tail; + } + + return result; + } + + return function (foldr) { + return function (xs) { + return listToArray(foldr(curryCons)(emptyList)(xs)); + }; + }; +}(); //------------------------------------------------------------------------------ +// Array size ------------------------------------------------------------------ +//------------------------------------------------------------------------------ + + +exports.length = function (xs) { + return xs.length; +}; //------------------------------------------------------------------------------ +// Extending arrays ------------------------------------------------------------ +//------------------------------------------------------------------------------ + + +exports.cons = function (e) { + return function (l) { + return [e].concat(l); + }; +}; + +exports.snoc = function (l) { + return function (e) { + var l1 = l.slice(); + l1.push(e); + return l1; + }; +}; //------------------------------------------------------------------------------ +// Non-indexed reads ----------------------------------------------------------- +//------------------------------------------------------------------------------ + + +exports["uncons'"] = function (empty) { + return function (next) { + return function (xs) { + return xs.length === 0 ? empty({}) : next(xs[0])(xs.slice(1)); + }; + }; +}; //------------------------------------------------------------------------------ +// Indexed operations ---------------------------------------------------------- +//------------------------------------------------------------------------------ + + +exports.indexImpl = function (just) { + return function (nothing) { + return function (xs) { + return function (i) { + return i < 0 || i >= xs.length ? nothing : just(xs[i]); + }; + }; + }; +}; + +exports.findIndexImpl = function (just) { + return function (nothing) { + return function (f) { + return function (xs) { + for (var i = 0, l = xs.length; i < l; i++) { + if (f(xs[i])) return just(i); + } + + return nothing; + }; + }; + }; +}; + +exports.findLastIndexImpl = function (just) { + return function (nothing) { + return function (f) { + return function (xs) { + for (var i = xs.length - 1; i >= 0; i--) { + if (f(xs[i])) return just(i); + } + + return nothing; + }; + }; + }; +}; + +exports._insertAt = function (just) { + return function (nothing) { + return function (i) { + return function (a) { + return function (l) { + if (i < 0 || i > l.length) return nothing; + var l1 = l.slice(); + l1.splice(i, 0, a); + return just(l1); + }; + }; + }; + }; +}; + +exports._deleteAt = function (just) { + return function (nothing) { + return function (i) { + return function (l) { + if (i < 0 || i >= l.length) return nothing; + var l1 = l.slice(); + l1.splice(i, 1); + return just(l1); + }; + }; + }; +}; + +exports._updateAt = function (just) { + return function (nothing) { + return function (i) { + return function (a) { + return function (l) { + if (i < 0 || i >= l.length) return nothing; + var l1 = l.slice(); + l1[i] = a; + return just(l1); + }; + }; + }; + }; +}; //------------------------------------------------------------------------------ +// Transformations ------------------------------------------------------------- +//------------------------------------------------------------------------------ + + +exports.reverse = function (l) { + return l.slice().reverse(); +}; + +exports.concat = function (xss) { + if (xss.length <= 10000) { + // This method is faster, but it crashes on big arrays. + // So we use it when can and fallback to simple variant otherwise. + return Array.prototype.concat.apply([], xss); + } + + var result = []; + + for (var i = 0, l = xss.length; i < l; i++) { + var xs = xss[i]; + + for (var j = 0, m = xs.length; j < m; j++) { + result.push(xs[j]); + } + } + + return result; +}; + +exports.filter = function (f) { + return function (xs) { + return xs.filter(f); + }; +}; + +exports.partition = function (f) { + return function (xs) { + var yes = []; + var no = []; + + for (var i = 0; i < xs.length; i++) { + var x = xs[i]; + if (f(x)) yes.push(x);else no.push(x); + } + + return { + yes: yes, + no: no + }; + }; +}; //------------------------------------------------------------------------------ +// Sorting --------------------------------------------------------------------- +//------------------------------------------------------------------------------ + + +exports.sortImpl = function (f) { + return function (l) { + return l.slice().sort(function (x, y) { + return f(x)(y); + }); + }; +}; //------------------------------------------------------------------------------ +// Subarrays ------------------------------------------------------------------- +//------------------------------------------------------------------------------ + + +exports.slice = function (s) { + return function (e) { + return function (l) { + return l.slice(s, e); + }; + }; +}; + +exports.take = function (n) { + return function (l) { + return n < 1 ? [] : l.slice(0, n); + }; +}; + +exports.drop = function (n) { + return function (l) { + return n < 1 ? l : l.slice(n); + }; +}; //------------------------------------------------------------------------------ +// Zipping --------------------------------------------------------------------- +//------------------------------------------------------------------------------ + + +exports.zipWith = function (f) { + return function (xs) { + return function (ys) { + var l = xs.length < ys.length ? xs.length : ys.length; + var result = new Array(l); + + for (var i = 0; i < l; i++) { + result[i] = f(xs[i])(ys[i]); + } + + return result; + }; + }; +}; //------------------------------------------------------------------------------ +// Partial --------------------------------------------------------------------- +//------------------------------------------------------------------------------ + + +exports.unsafeIndexImpl = function (xs) { + return function (n) { + return xs[n]; + }; +}; +},{}],"4sh7":[function(require,module,exports) { +"use strict"; + +exports.map_ = function (f) { + return function (a) { + return function () { + return f(a()); + }; + }; +}; + +exports.pure_ = function (a) { + return function () { + return a; + }; +}; + +exports.bind_ = function (a) { + return function (f) { + return function () { + return f(a())(); + }; + }; +}; + +exports.run = function (f) { + return f(); +}; + +exports["while"] = function (f) { + return function (a) { + return function () { + while (f()) { + a(); + } + }; + }; +}; + +exports["for"] = function (lo) { + return function (hi) { + return function (f) { + return function () { + for (var i = lo; i < hi; i++) { + f(i)(); + } + }; + }; + }; +}; + +exports.foreach = function (as) { + return function (f) { + return function () { + for (var i = 0, l = as.length; i < l; i++) { + f(as[i])(); + } + }; + }; +}; + +exports.new = function (val) { + return function () { + return { + value: val + }; + }; +}; + +exports.read = function (ref) { + return function () { + return ref.value; + }; +}; + +exports["modify'"] = function (f) { + return function (ref) { + return function () { + var t = f(ref.value); + ref.value = t.state; + return t.value; + }; + }; +}; + +exports.write = function (a) { + return function (ref) { + return function () { + return ref.value = a; // eslint-disable-line no-return-assign + }; + }; +}; +},{}],"Sedc":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var modify = function modify(f) { + return $foreign["modify'"](function (s) { + var s$prime = f(s); + return { + state: s$prime, + value: s$prime + }; + }); +}; + +var functorST = new Data_Functor.Functor($foreign.map_); +var monadST = new Control_Monad.Monad(function () { + return applicativeST; +}, function () { + return bindST; +}); +var bindST = new Control_Bind.Bind(function () { + return applyST; +}, $foreign.bind_); +var applyST = new Control_Apply.Apply(function () { + return functorST; +}, Control_Monad.ap(monadST)); +var applicativeST = new Control_Applicative.Applicative(function () { + return applyST; +}, $foreign.pure_); +var monadRecST = new Control_Monad_Rec_Class.MonadRec(function () { + return monadST; +}, function (f) { + return function (a) { + var isLooping = function isLooping(v) { + if (v instanceof Control_Monad_Rec_Class.Loop) { + return true; + } + + ; + return false; + }; + + var fromDone = function fromDone(v) { + if (v instanceof Control_Monad_Rec_Class.Done) { + return v.value0; + } + + ; + throw new Error("Failed pattern match at Control.Monad.ST.Internal (line 54, column 32 - line 54, column 46): " + [v.constructor.name]); + }; + + return Control_Bind.bind(bindST)(Control_Bind.bindFlipped(bindST)($foreign["new"])(f(a)))(function (v) { + return Control_Bind.discard(Control_Bind.discardUnit)(bindST)($foreign["while"](Data_Functor.map(functorST)(isLooping)($foreign.read(v)))(Control_Bind.bind(bindST)($foreign.read(v))(function (v1) { + if (v1 instanceof Control_Monad_Rec_Class.Loop) { + return Control_Bind.bind(bindST)(f(v1.value0))(function (v2) { + return Data_Functor["void"](functorST)($foreign.write(v2)(v)); + }); + } + + ; + + if (v1 instanceof Control_Monad_Rec_Class.Done) { + return Control_Applicative.pure(applicativeST)(Data_Unit.unit); + } + + ; + throw new Error("Failed pattern match at Control.Monad.ST.Internal (line 46, column 18 - line 50, column 28): " + [v1.constructor.name]); + })))(function () { + return Data_Functor.map(functorST)(fromDone)($foreign.read(v)); + }); + }); + }; +}); +module.exports = { + modify: modify, + functorST: functorST, + applyST: applyST, + applicativeST: applicativeST, + bindST: bindST, + monadST: monadST, + monadRecST: monadRecST, + map_: $foreign.map_, + pure_: $foreign.pure_, + bind_: $foreign.bind_, + run: $foreign.run, + "while": $foreign["while"], + "for": $foreign["for"], + foreach: $foreign.foreach, + "new": $foreign["new"], + read: $foreign.read, + "modify'": $foreign["modify'"], + write: $foreign.write +}; +},{"./foreign.js":"4sh7","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Control.Monad.Rec.Class/index.js":"UVIy","../Data.Functor/index.js":"+0AE","../Data.Unit/index.js":"NhVk"}],"pEQc":[function(require,module,exports) { +"use strict"; + +exports.empty = function () { + return []; +}; + +exports.peekImpl = function (just) { + return function (nothing) { + return function (i) { + return function (xs) { + return function () { + return i >= 0 && i < xs.length ? just(xs[i]) : nothing; + }; + }; + }; + }; +}; + +exports.poke = function (i) { + return function (a) { + return function (xs) { + return function () { + var ret = i >= 0 && i < xs.length; + if (ret) xs[i] = a; + return ret; + }; + }; + }; +}; + +exports.popImpl = function (just) { + return function (nothing) { + return function (xs) { + return function () { + return xs.length > 0 ? just(xs.pop()) : nothing; + }; + }; + }; +}; + +exports.pushAll = function (as) { + return function (xs) { + return function () { + return xs.push.apply(xs, as); + }; + }; +}; + +exports.shiftImpl = function (just) { + return function (nothing) { + return function (xs) { + return function () { + return xs.length > 0 ? just(xs.shift()) : nothing; + }; + }; + }; +}; + +exports.unshiftAll = function (as) { + return function (xs) { + return function () { + return xs.unshift.apply(xs, as); + }; + }; +}; + +exports.splice = function (i) { + return function (howMany) { + return function (bs) { + return function (xs) { + return function () { + return xs.splice.apply(xs, [i, howMany].concat(bs)); + }; + }; + }; + }; +}; + +exports.copyImpl = function (xs) { + return function () { + return xs.slice(); + }; +}; + +exports.sortByImpl = function (comp) { + return function (xs) { + return function () { + return xs.sort(function (x, y) { + return comp(x)(y); + }); + }; + }; +}; + +exports.toAssocArray = function (xs) { + return function () { + var n = xs.length; + var as = new Array(n); + + for (var i = 0; i < n; i++) { + as[i] = { + value: xs[i], + index: i + }; + } + + return as; + }; +}; +},{}],"s8si":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var unshift = function unshift(a) { + return $foreign.unshiftAll([a]); +}; + +var unsafeThaw = function () { + var $11 = Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST); + return function ($12) { + return $11($12); + }; +}(); + +var unsafeFreeze = function () { + var $13 = Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST); + return function ($14) { + return $13($14); + }; +}(); + +var thaw = $foreign.copyImpl; + +var withArray = function withArray(f) { + return function (xs) { + return function __do() { + var v = thaw(xs)(); + var v1 = f(v)(); + return unsafeFreeze(v)(); + }; + }; +}; + +var sortBy = function sortBy(comp) { + var comp$prime = function comp$prime(x) { + return function (y) { + var v = comp(x)(y); + + if (v instanceof Data_Ordering.GT) { + return 1; + } + + ; + + if (v instanceof Data_Ordering.EQ) { + return 0; + } + + ; + + if (v instanceof Data_Ordering.LT) { + return -1 | 0; + } + + ; + throw new Error("Failed pattern match at Data.Array.ST (line 109, column 15 - line 112, column 13): " + [v.constructor.name]); + }; + }; + + return $foreign.sortByImpl(comp$prime); +}; + +var sortWith = function sortWith(dictOrd) { + return function (f) { + return sortBy(Data_Ord.comparing(dictOrd)(f)); + }; +}; + +var sort = function sort(dictOrd) { + return sortBy(Data_Ord.compare(dictOrd)); +}; + +var shift = $foreign.shiftImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var run = function run(st) { + return Control_Bind.bind(Control_Monad_ST_Internal.bindST)(st)(unsafeFreeze)(); +}; + +var push = function push(a) { + return $foreign.pushAll([a]); +}; + +var pop = $foreign.popImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value); +var peek = $foreign.peekImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var modify = function modify(i) { + return function (f) { + return function (xs) { + return function __do() { + var v = peek(i)(xs)(); + + if (v instanceof Data_Maybe.Just) { + return $foreign.poke(i)(f(v.value0))(xs)(); + } + + ; + + if (v instanceof Data_Maybe.Nothing) { + return false; + } + + ; + throw new Error("Failed pattern match at Data.Array.ST (line 195, column 3 - line 197, column 26): " + [v.constructor.name]); + }; + }; + }; +}; + +var freeze = $foreign.copyImpl; +module.exports = { + run: run, + withArray: withArray, + peek: peek, + modify: modify, + pop: pop, + push: push, + shift: shift, + unshift: unshift, + sort: sort, + sortBy: sortBy, + sortWith: sortWith, + freeze: freeze, + thaw: thaw, + unsafeFreeze: unsafeFreeze, + unsafeThaw: unsafeThaw, + empty: $foreign.empty, + poke: $foreign.poke, + pushAll: $foreign.pushAll, + unshiftAll: $foreign.unshiftAll, + splice: $foreign.splice, + toAssocArray: $foreign.toAssocArray +}; +},{"./foreign.js":"pEQc","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.ST.Internal/index.js":"Sedc","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun"}],"Wi7L":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js"); + +var Data_Array_ST = require("../Data.Array.ST/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Iterator = function () { + function Iterator(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Iterator.create = function (value0) { + return function (value1) { + return new Iterator(value0, value1); + }; + }; + + return Iterator; +}(); + +var peek = function peek(v) { + return function __do() { + var v1 = Control_Monad_ST_Internal.read(v.value1)(); + return v.value0(v1); + }; +}; + +var next = function next(v) { + return function __do() { + var v1 = Control_Monad_ST_Internal.read(v.value1)(); + var v2 = Control_Monad_ST_Internal.modify(function (v2) { + return v2 + 1 | 0; + })(v.value1)(); + return v.value0(v1); + }; +}; + +var pushWhile = function pushWhile(p) { + return function (iter) { + return function (array) { + return function __do() { + var v = Control_Monad_ST_Internal["new"](false)(); + + while (Data_Functor.map(Control_Monad_ST_Internal.functorST)(Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean))(Control_Monad_ST_Internal.read(v))()) { + (function __do() { + var v1 = peek(iter)(); + + if (v1 instanceof Data_Maybe.Just && p(v1.value0)) { + var v2 = Data_Array_ST.push(v1.value0)(array)(); + return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(next(iter))(); + } + + ; + return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Control_Monad_ST_Internal.write(true)(v))(); + })(); + } + + ; + return {}; + }; + }; + }; +}; + +var pushAll = pushWhile(Data_Function["const"](true)); + +var iterator = function iterator(f) { + return Data_Functor.map(Control_Monad_ST_Internal.functorST)(Iterator.create(f))(Control_Monad_ST_Internal["new"](0)); +}; + +var iterate = function iterate(iter) { + return function (f) { + return function __do() { + var v = Control_Monad_ST_Internal["new"](false)(); + + while (Data_Functor.map(Control_Monad_ST_Internal.functorST)(Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean))(Control_Monad_ST_Internal.read(v))()) { + (function __do() { + var v1 = next(iter)(); + + if (v1 instanceof Data_Maybe.Just) { + return f(v1.value0)(); + } + + ; + + if (v1 instanceof Data_Maybe.Nothing) { + return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Control_Monad_ST_Internal.write(true)(v))(); + } + + ; + throw new Error("Failed pattern match at Data.Array.ST.Iterator (line 42, column 5 - line 44, column 47): " + [v1.constructor.name]); + })(); + } + + ; + return {}; + }; + }; +}; + +var exhausted = function () { + var $27 = Data_Functor.map(Control_Monad_ST_Internal.functorST)(Data_Maybe.isNothing); + return function ($28) { + return $27(peek($28)); + }; +}(); + +module.exports = { + iterator: iterator, + iterate: iterate, + next: next, + peek: peek, + exhausted: exhausted, + pushWhile: pushWhile, + pushAll: pushAll +}; +},{"../Control.Monad.ST.Internal/index.js":"Sedc","../Data.Array.ST/index.js":"s8si","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Maybe/index.js":"5mN7"}],"v/61":[function(require,module,exports) { +"use strict"; + +exports.unfoldrArrayImpl = function (isNothing) { + return function (fromJust) { + return function (fst) { + return function (snd) { + return function (f) { + return function (b) { + var result = []; + var value = b; + + while (true) { + // eslint-disable-line no-constant-condition + var maybe = f(value); + if (isNothing(maybe)) return result; + var tuple = fromJust(maybe); + result.push(fst(tuple)); + value = snd(tuple); + } + }; + }; + }; + }; + }; +}; +},{}],"rpkt":[function(require,module,exports) { +"use strict"; + +exports.unfoldr1ArrayImpl = function (isNothing) { + return function (fromJust) { + return function (fst) { + return function (snd) { + return function (f) { + return function (b) { + var result = []; + var value = b; + + while (true) { + // eslint-disable-line no-constant-condition + var tuple = f(value); + result.push(fst(tuple)); + var maybe = snd(tuple); + if (isNothing(maybe)) return result; + value = fromJust(maybe); + } + }; + }; + }; + }; + }; +}; +},{}],"S0Nl":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Unfoldable1 = function Unfoldable1(unfoldr1) { + this.unfoldr1 = unfoldr1; +}; + +var unfoldr1 = function unfoldr1(dict) { + return dict.unfoldr1; +}; + +var unfoldable1Array = new Unfoldable1($foreign.unfoldr1ArrayImpl(Data_Maybe.isNothing)(Data_Maybe.fromJust())(Data_Tuple.fst)(Data_Tuple.snd)); + +var replicate1 = function replicate1(dictUnfoldable1) { + return function (n) { + return function (v) { + var step = function step(i) { + if (i <= 0) { + return new Data_Tuple.Tuple(v, Data_Maybe.Nothing.value); + } + + ; + + if (Data_Boolean.otherwise) { + return new Data_Tuple.Tuple(v, new Data_Maybe.Just(i - 1 | 0)); + } + + ; + throw new Error("Failed pattern match at Data.Unfoldable1 (line 64, column 5 - line 64, column 39): " + [i.constructor.name]); + }; + + return unfoldr1(dictUnfoldable1)(step)(n - 1 | 0); + }; + }; +}; + +var replicate1A = function replicate1A(dictApply) { + return function (dictUnfoldable1) { + return function (dictTraversable1) { + return function (n) { + return function (m) { + return Data_Semigroup_Traversable.sequence1(dictTraversable1)(dictApply)(replicate1(dictUnfoldable1)(n)(m)); + }; + }; + }; + }; +}; + +var singleton = function singleton(dictUnfoldable1) { + return replicate1(dictUnfoldable1)(1); +}; + +var range = function range(dictUnfoldable1) { + return function (start) { + return function (end) { + var go = function go(delta) { + return function (i) { + var i$prime = i + delta | 0; + return new Data_Tuple.Tuple(i, function () { + var $8 = i === end; + + if ($8) { + return Data_Maybe.Nothing.value; + } + + ; + return new Data_Maybe.Just(i$prime); + }()); + }; + }; + + var delta = function () { + var $9 = end >= start; + + if ($9) { + return 1; + } + + ; + return -1 | 0; + }(); + + return unfoldr1(dictUnfoldable1)(go(delta))(start); + }; + }; +}; + +module.exports = { + Unfoldable1: Unfoldable1, + unfoldr1: unfoldr1, + replicate1: replicate1, + replicate1A: replicate1A, + singleton: singleton, + range: range, + unfoldable1Array: unfoldable1Array +}; +},{"./foreign.js":"rpkt","../Data.Boolean/index.js":"ObQr","../Data.Maybe/index.js":"5mN7","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Tuple/index.js":"II/O"}],"77+Z":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Unfoldable = function Unfoldable(Unfoldable10, unfoldr) { + this.Unfoldable10 = Unfoldable10; + this.unfoldr = unfoldr; +}; + +var unfoldr = function unfoldr(dict) { + return dict.unfoldr; +}; + +var unfoldableArray = new Unfoldable(function () { + return Data_Unfoldable1.unfoldable1Array; +}, $foreign.unfoldrArrayImpl(Data_Maybe.isNothing)(Data_Maybe.fromJust())(Data_Tuple.fst)(Data_Tuple.snd)); + +var replicate = function replicate(dictUnfoldable) { + return function (n) { + return function (v) { + var step = function step(i) { + var $7 = i <= 0; + + if ($7) { + return Data_Maybe.Nothing.value; + } + + ; + return new Data_Maybe.Just(new Data_Tuple.Tuple(v, i - 1 | 0)); + }; + + return unfoldr(dictUnfoldable)(step)(n); + }; + }; +}; + +var replicateA = function replicateA(dictApplicative) { + return function (dictUnfoldable) { + return function (dictTraversable) { + return function (n) { + return function (m) { + return Data_Traversable.sequence(dictTraversable)(dictApplicative)(replicate(dictUnfoldable)(n)(m)); + }; + }; + }; + }; +}; + +var none = function none(dictUnfoldable) { + return unfoldr(dictUnfoldable)(Data_Function["const"](Data_Maybe.Nothing.value))(Data_Unit.unit); +}; + +var fromMaybe = function fromMaybe(dictUnfoldable) { + return unfoldr(dictUnfoldable)(function (b) { + return Data_Functor.map(Data_Maybe.functorMaybe)(Data_Function.flip(Data_Tuple.Tuple.create)(Data_Maybe.Nothing.value))(b); + }); +}; + +module.exports = { + Unfoldable: Unfoldable, + unfoldr: unfoldr, + replicate: replicate, + replicateA: replicateA, + none: none, + fromMaybe: fromMaybe, + unfoldableArray: unfoldableArray +}; +},{"./foreign.js":"v/61","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Unfoldable1/index.js":"S0Nl","../Data.Unit/index.js":"NhVk"}],"4t4C":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Lazy = require("../Control.Lazy/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js"); + +var Data_Array_ST = require("../Data.Array.ST/index.js"); + +var Data_Array_ST_Iterator = require("../Data.Array.ST.Iterator/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var zipWithA = function zipWithA(dictApplicative) { + return function (f) { + return function (xs) { + return function (ys) { + return Data_Traversable.sequence(Data_Traversable.traversableArray)(dictApplicative)($foreign.zipWith(f)(xs)(ys)); + }; + }; + }; +}; + +var zip = $foreign.zipWith(Data_Tuple.Tuple.create); + +var updateAtIndices = function updateAtIndices(dictFoldable) { + return function (us) { + return function (xs) { + return Data_Array_ST.withArray(function (res) { + return Data_Foldable.traverse_(Control_Monad_ST_Internal.applicativeST)(dictFoldable)(function (v) { + return Data_Array_ST.poke(v.value0)(v.value1)(res); + })(us); + })(xs)(); + }; + }; +}; + +var updateAt = $foreign["_updateAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var unsafeIndex = function unsafeIndex(dictPartial) { + return $foreign.unsafeIndexImpl; +}; + +var uncons = $foreign["uncons'"](Data_Function["const"](Data_Maybe.Nothing.value))(function (x) { + return function (xs) { + return new Data_Maybe.Just({ + head: x, + tail: xs + }); + }; +}); + +var toUnfoldable = function toUnfoldable(dictUnfoldable) { + return function (xs) { + var len = $foreign.length(xs); + + var f = function f(i) { + if (i < len) { + return new Data_Maybe.Just(new Data_Tuple.Tuple(unsafeIndex()(xs)(i), i + 1 | 0)); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.Array (line 143, column 3 - line 145, column 26): " + [i.constructor.name]); + }; + + return Data_Unfoldable.unfoldr(dictUnfoldable)(f)(0); + }; +}; + +var takeEnd = function takeEnd(n) { + return function (xs) { + return $foreign.drop($foreign.length(xs) - n | 0)(xs); + }; +}; + +var tail = $foreign["uncons'"](Data_Function["const"](Data_Maybe.Nothing.value))(function (v) { + return function (xs) { + return new Data_Maybe.Just(xs); + }; +}); + +var sortBy = function sortBy(comp) { + return function (xs) { + var comp$prime = function comp$prime(x) { + return function (y) { + var v = comp(x)(y); + + if (v instanceof Data_Ordering.GT) { + return 1; + } + + ; + + if (v instanceof Data_Ordering.EQ) { + return 0; + } + + ; + + if (v instanceof Data_Ordering.LT) { + return -1 | 0; + } + + ; + throw new Error("Failed pattern match at Data.Array (line 702, column 15 - line 705, column 13): " + [v.constructor.name]); + }; + }; + + return $foreign.sortImpl(comp$prime)(xs); + }; +}; + +var sortWith = function sortWith(dictOrd) { + return function (f) { + return sortBy(Data_Ord.comparing(dictOrd)(f)); + }; +}; + +var sort = function sort(dictOrd) { + return function (xs) { + return sortBy(Data_Ord.compare(dictOrd))(xs); + }; +}; + +var singleton = function singleton(a) { + return [a]; +}; + +var $$null = function $$null(xs) { + return $foreign.length(xs) === 0; +}; + +var nubByEq = function nubByEq(eq) { + return function (xs) { + return function __do() { + var v = Data_Array_ST.empty(); + Control_Monad_ST_Internal.foreach(xs)(function (x) { + return function __do() { + var v1 = Data_Functor.map(Control_Monad_ST_Internal.functorST)(function () { + var $113 = Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean); + var $114 = Data_Foldable.any(Data_Foldable.foldableArray)(Data_HeytingAlgebra.heytingAlgebraBoolean)(function (v1) { + return eq(v1)(x); + }); + return function ($115) { + return $113($114($115)); + }; + }())(Data_Array_ST.unsafeFreeze(v))(); + return Control_Applicative.when(Control_Monad_ST_Internal.applicativeST)(v1)(Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(x)(v)))(); + }; + })(); + return Data_Array_ST.unsafeFreeze(v)(); + }(); + }; +}; + +var nubEq = function nubEq(dictEq) { + return nubByEq(Data_Eq.eq(dictEq)); +}; + +var modifyAtIndices = function modifyAtIndices(dictFoldable) { + return function (is) { + return function (f) { + return function (xs) { + return Data_Array_ST.withArray(function (res) { + return Data_Foldable.traverse_(Control_Monad_ST_Internal.applicativeST)(dictFoldable)(function (i) { + return Data_Array_ST.modify(i)(f)(res); + })(is); + })(xs)(); + }; + }; + }; +}; + +var mapWithIndex = function mapWithIndex(f) { + return function (xs) { + return $foreign.zipWith(f)($foreign.range(0)($foreign.length(xs) - 1 | 0))(xs); + }; +}; + +var some = function some(dictAlternative) { + return function (dictLazy) { + return function (v) { + return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())($foreign.cons)(v))(Control_Lazy.defer(dictLazy)(function (v1) { + return many(dictAlternative)(dictLazy)(v); + })); + }; + }; +}; + +var many = function many(dictAlternative) { + return function (dictLazy) { + return function (v) { + return Control_Alt.alt(dictAlternative.Plus1().Alt0())(some(dictAlternative)(dictLazy)(v))(Control_Applicative.pure(dictAlternative.Applicative0())([])); + }; + }; +}; + +var insertAt = $foreign["_insertAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var init = function init(xs) { + if ($$null(xs)) { + return Data_Maybe.Nothing.value; + } + + ; + + if (Data_Boolean.otherwise) { + return new Data_Maybe.Just($foreign.slice(0)($foreign.length(xs) - 1 | 0)(xs)); + } + + ; + throw new Error("Failed pattern match at Data.Array (line 323, column 1 - line 323, column 45): " + [xs.constructor.name]); +}; + +var index = $foreign.indexImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var last = function last(xs) { + return index(xs)($foreign.length(xs) - 1 | 0); +}; + +var unsnoc = function unsnoc(xs) { + return Control_Apply.apply(Data_Maybe.applyMaybe)(Data_Functor.map(Data_Maybe.functorMaybe)(function (v) { + return function (v1) { + return { + init: v, + last: v1 + }; + }; + })(init(xs)))(last(xs)); +}; + +var modifyAt = function modifyAt(i) { + return function (f) { + return function (xs) { + var go = function go(x) { + return updateAt(i)(f(x))(xs); + }; + + return Data_Maybe.maybe(Data_Maybe.Nothing.value)(go)(index(xs)(i)); + }; + }; +}; + +var span = function span(p) { + return function (arr) { + var go = function go($copy_i) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(i) { + var v = index(arr)(i); + + if (v instanceof Data_Maybe.Just) { + var $77 = p(v.value0); + + if ($77) { + $copy_i = i + 1 | 0; + return; + } + + ; + $tco_done = true; + return new Data_Maybe.Just(i); + } + + ; + + if (v instanceof Data_Maybe.Nothing) { + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.Array (line 834, column 5 - line 836, column 25): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_i); + } + + ; + return $tco_result; + }; + + var breakIndex = go(0); + + if (breakIndex instanceof Data_Maybe.Just && breakIndex.value0 === 0) { + return { + init: [], + rest: arr + }; + } + + ; + + if (breakIndex instanceof Data_Maybe.Just) { + return { + init: $foreign.slice(0)(breakIndex.value0)(arr), + rest: $foreign.slice(breakIndex.value0)($foreign.length(arr))(arr) + }; + } + + ; + + if (breakIndex instanceof Data_Maybe.Nothing) { + return { + init: arr, + rest: [] + }; + } + + ; + throw new Error("Failed pattern match at Data.Array (line 821, column 3 - line 827, column 30): " + [breakIndex.constructor.name]); + }; +}; + +var takeWhile = function takeWhile(p) { + return function (xs) { + return span(p)(xs).init; + }; +}; + +var unzip = function unzip(xs) { + return function __do() { + var v = Data_Array_ST.empty(); + var v1 = Data_Array_ST.empty(); + var v2 = Data_Array_ST_Iterator.iterator(function (v2) { + return index(xs)(v2); + })(); + Data_Array_ST_Iterator.iterate(v2)(function (v3) { + return function __do() { + Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(v3.value0)(v))(); + return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(v3.value1)(v1))(); + }; + })(); + var v3 = Data_Array_ST.unsafeFreeze(v)(); + var v4 = Data_Array_ST.unsafeFreeze(v1)(); + return new Data_Tuple.Tuple(v3, v4); + }(); +}; + +var head = function head(xs) { + return index(xs)(0); +}; + +var nubBy = function nubBy(comp) { + return function (xs) { + var indexedAndSorted = sortBy(function (x) { + return function (y) { + return comp(Data_Tuple.snd(x))(Data_Tuple.snd(y)); + }; + })(mapWithIndex(Data_Tuple.Tuple.create)(xs)); + var v = head(indexedAndSorted); + + if (v instanceof Data_Maybe.Nothing) { + return []; + } + + ; + + if (v instanceof Data_Maybe.Just) { + return Data_Functor.map(Data_Functor.functorArray)(Data_Tuple.snd)(sortWith(Data_Ord.ordInt)(Data_Tuple.fst)(function __do() { + var v1 = Data_Array_ST.unsafeThaw(singleton(v.value0))(); + Control_Monad_ST_Internal.foreach(indexedAndSorted)(function (v2) { + return function __do() { + var v3 = Data_Functor.map(Control_Monad_ST_Internal.functorST)(function () { + var $116 = function (dictPartial) { + var $118 = Data_Maybe.fromJust(dictPartial); + return function ($119) { + return $118(last($119)); + }; + }(); + + return function ($117) { + return Data_Tuple.snd($116($117)); + }; + }())(Data_Array_ST.unsafeFreeze(v1))(); + return Control_Applicative.when(Control_Monad_ST_Internal.applicativeST)(Data_Eq.notEq(Data_Ordering.eqOrdering)(comp(v3)(v2.value1))(Data_Ordering.EQ.value))(Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(v2)(v1)))(); + }; + })(); + return Data_Array_ST.unsafeFreeze(v1)(); + }())); + } + + ; + throw new Error("Failed pattern match at Data.Array (line 903, column 17 - line 911, column 29): " + [v.constructor.name]); + }; +}; + +var nub = function nub(dictOrd) { + return nubBy(Data_Ord.compare(dictOrd)); +}; + +var groupBy = function groupBy(op) { + return function (xs) { + return function __do() { + var v = Data_Array_ST.empty(); + var v1 = Data_Array_ST_Iterator.iterator(function (v1) { + return index(xs)(v1); + })(); + Data_Array_ST_Iterator.iterate(v1)(function (x) { + return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(function __do() { + var v2 = Data_Array_ST.empty(); + var v3 = Data_Array_ST.push(x)(v2)(); + Data_Array_ST_Iterator.pushWhile(op(x))(v1)(v2)(); + var v4 = Data_Array_ST.unsafeFreeze(v2)(); + return Data_Array_ST.push(v4)(v)(); + }); + })(); + return Data_Array_ST.unsafeFreeze(v)(); + }(); + }; +}; + +var group = function group(dictEq) { + return function (xs) { + return groupBy(Data_Eq.eq(dictEq))(xs); + }; +}; + +var group$prime = function group$prime(dictOrd) { + var $120 = group(dictOrd.Eq0()); + var $121 = sort(dictOrd); + return function ($122) { + return $120($121($122)); + }; +}; + +var fromFoldable = function fromFoldable(dictFoldable) { + return $foreign.fromFoldableImpl(Data_Foldable.foldr(dictFoldable)); +}; + +var foldRecM = function foldRecM(dictMonadRec) { + return function (f) { + return function (a) { + return function (array) { + var go = function go(res) { + return function (i) { + if (i >= $foreign.length(array)) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Done(res)); + } + + ; + + if (Data_Boolean.otherwise) { + return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(f(res)(unsafeIndex()(array)(i)))(function (v) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Loop({ + a: v, + b: i + 1 | 0 + })); + }); + } + + ; + throw new Error("Failed pattern match at Data.Array (line 1101, column 3 - line 1105, column 42): " + [res.constructor.name, i.constructor.name]); + }; + }; + + return Control_Monad_Rec_Class.tailRecM2(dictMonadRec)(go)(a)(0); + }; + }; + }; +}; + +var foldM = function foldM(dictMonad) { + return function (f) { + return function (a) { + return $foreign["uncons'"](function (v) { + return Control_Applicative.pure(dictMonad.Applicative0())(a); + })(function (b) { + return function (bs) { + return Control_Bind.bind(dictMonad.Bind1())(f(a)(b))(function (a$prime) { + return foldM(dictMonad)(f)(a$prime)(bs); + }); + }; + }); + }; + }; +}; + +var findLastIndex = $foreign.findLastIndexImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var insertBy = function insertBy(cmp) { + return function (x) { + return function (ys) { + var i = Data_Maybe.maybe(0)(function (v) { + return v + 1 | 0; + })(findLastIndex(function (y) { + return Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(x)(y))(Data_Ordering.GT.value); + })(ys)); + return Data_Maybe.fromJust()(insertAt(i)(x)(ys)); + }; + }; +}; + +var insert = function insert(dictOrd) { + return insertBy(Data_Ord.compare(dictOrd)); +}; + +var findIndex = $foreign.findIndexImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var intersectBy = function intersectBy(eq) { + return function (xs) { + return function (ys) { + return $foreign.filter(function (x) { + return Data_Maybe.isJust(findIndex(eq(x))(ys)); + })(xs); + }; + }; +}; + +var intersect = function intersect(dictEq) { + return intersectBy(Data_Eq.eq(dictEq)); +}; + +var elemLastIndex = function elemLastIndex(dictEq) { + return function (x) { + return findLastIndex(function (v) { + return Data_Eq.eq(dictEq)(v)(x); + }); + }; +}; + +var elemIndex = function elemIndex(dictEq) { + return function (x) { + return findIndex(function (v) { + return Data_Eq.eq(dictEq)(v)(x); + }); + }; +}; + +var dropWhile = function dropWhile(p) { + return function (xs) { + return span(p)(xs).rest; + }; +}; + +var dropEnd = function dropEnd(n) { + return function (xs) { + return $foreign.take($foreign.length(xs) - n | 0)(xs); + }; +}; + +var deleteAt = $foreign["_deleteAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var deleteBy = function deleteBy(v) { + return function (v1) { + return function (v2) { + if (v2.length === 0) { + return []; + } + + ; + return Data_Maybe.maybe(v2)(function (i) { + return Data_Maybe.fromJust()(deleteAt(i)(v2)); + })(findIndex(v(v1))(v2)); + }; + }; +}; + +var unionBy = function unionBy(eq) { + return function (xs) { + return function (ys) { + return Data_Semigroup.append(Data_Semigroup.semigroupArray)(xs)(Data_Foldable.foldl(Data_Foldable.foldableArray)(Data_Function.flip(deleteBy(eq)))(nubByEq(eq)(ys))(xs)); + }; + }; +}; + +var union = function union(dictEq) { + return unionBy(Data_Eq.eq(dictEq)); +}; + +var $$delete = function $$delete(dictEq) { + return deleteBy(Data_Eq.eq(dictEq)); +}; + +var difference = function difference(dictEq) { + return Data_Foldable.foldr(Data_Foldable.foldableArray)($$delete(dictEq)); +}; + +var concatMap = Data_Function.flip(Control_Bind.bind(Control_Bind.bindArray)); + +var mapMaybe = function mapMaybe(f) { + return concatMap(function () { + var $123 = Data_Maybe.maybe([])(singleton); + return function ($124) { + return $123(f($124)); + }; + }()); +}; + +var filterA = function filterA(dictApplicative) { + return function (p) { + var $125 = Data_Functor.map(dictApplicative.Apply0().Functor0())(mapMaybe(function (v) { + if (v.value1) { + return new Data_Maybe.Just(v.value0); + } + + ; + return Data_Maybe.Nothing.value; + })); + var $126 = Data_Traversable.traverse(Data_Traversable.traversableArray)(dictApplicative)(function (x) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Tuple.Tuple.create(x))(p(x)); + }); + return function ($127) { + return $125($126($127)); + }; + }; +}; + +var catMaybes = mapMaybe(Control_Category.identity(Control_Category.categoryFn)); + +var alterAt = function alterAt(i) { + return function (f) { + return function (xs) { + var go = function go(x) { + var v = f(x); + + if (v instanceof Data_Maybe.Nothing) { + return deleteAt(i)(xs); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return updateAt(i)(v.value0)(xs); + } + + ; + throw new Error("Failed pattern match at Data.Array (line 544, column 10 - line 546, column 32): " + [v.constructor.name]); + }; + + return Data_Maybe.maybe(Data_Maybe.Nothing.value)(go)(index(xs)(i)); + }; + }; +}; + +module.exports = { + fromFoldable: fromFoldable, + toUnfoldable: toUnfoldable, + singleton: singleton, + some: some, + many: many, + "null": $$null, + insert: insert, + insertBy: insertBy, + head: head, + last: last, + tail: tail, + init: init, + uncons: uncons, + unsnoc: unsnoc, + index: index, + elemIndex: elemIndex, + elemLastIndex: elemLastIndex, + findIndex: findIndex, + findLastIndex: findLastIndex, + insertAt: insertAt, + deleteAt: deleteAt, + updateAt: updateAt, + updateAtIndices: updateAtIndices, + modifyAt: modifyAt, + modifyAtIndices: modifyAtIndices, + alterAt: alterAt, + concatMap: concatMap, + filterA: filterA, + mapMaybe: mapMaybe, + catMaybes: catMaybes, + mapWithIndex: mapWithIndex, + sort: sort, + sortBy: sortBy, + sortWith: sortWith, + takeEnd: takeEnd, + takeWhile: takeWhile, + dropEnd: dropEnd, + dropWhile: dropWhile, + span: span, + group: group, + "group'": group$prime, + groupBy: groupBy, + nub: nub, + nubEq: nubEq, + nubBy: nubBy, + nubByEq: nubByEq, + union: union, + unionBy: unionBy, + "delete": $$delete, + deleteBy: deleteBy, + difference: difference, + intersect: intersect, + intersectBy: intersectBy, + zipWithA: zipWithA, + zip: zip, + unzip: unzip, + foldM: foldM, + foldRecM: foldRecM, + unsafeIndex: unsafeIndex, + range: $foreign.range, + replicate: $foreign.replicate, + length: $foreign.length, + cons: $foreign.cons, + snoc: $foreign.snoc, + reverse: $foreign.reverse, + concat: $foreign.concat, + filter: $foreign.filter, + partition: $foreign.partition, + slice: $foreign.slice, + take: $foreign.take, + drop: $foreign.drop, + zipWith: $foreign.zipWith +}; +},{"./foreign.js":"TZDL","../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Lazy/index.js":"y9cE","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.ST.Internal/index.js":"Sedc","../Data.Array.ST/index.js":"s8si","../Data.Array.ST.Iterator/index.js":"Wi7L","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z"}],"9xaU":[function(require,module,exports) { +var define; +var bigInt = function (undefined) { + "use strict"; + + var BASE = 1e7, + LOG_BASE = 7, + MAX_INT = 9007199254740992, + MAX_INT_ARR = smallToArray(MAX_INT), + LOG_MAX_INT = Math.log(MAX_INT); + + function Integer(v, radix) { + if (typeof v === "undefined") return Integer[0]; + if (typeof radix !== "undefined") return +radix === 10 ? parseValue(v) : parseBase(v, radix); + return parseValue(v); + } + + function BigInteger(value, sign) { + this.value = value; + this.sign = sign; + this.isSmall = false; + } + + BigInteger.prototype = Object.create(Integer.prototype); + + function SmallInteger(value) { + this.value = value; + this.sign = value < 0; + this.isSmall = true; + } + + SmallInteger.prototype = Object.create(Integer.prototype); + + function isPrecise(n) { + return -MAX_INT < n && n < MAX_INT; + } + + function smallToArray(n) { + // For performance reasons doesn't reference BASE, need to change this function if BASE changes + if (n < 1e7) return [n]; + if (n < 1e14) return [n % 1e7, Math.floor(n / 1e7)]; + return [n % 1e7, Math.floor(n / 1e7) % 1e7, Math.floor(n / 1e14)]; + } + + function arrayToSmall(arr) { + // If BASE changes this function may need to change + trim(arr); + var length = arr.length; + + if (length < 4 && compareAbs(arr, MAX_INT_ARR) < 0) { + switch (length) { + case 0: + return 0; + + case 1: + return arr[0]; + + case 2: + return arr[0] + arr[1] * BASE; + + default: + return arr[0] + (arr[1] + arr[2] * BASE) * BASE; + } + } + + return arr; + } + + function trim(v) { + var i = v.length; + + while (v[--i] === 0); + + v.length = i + 1; + } + + function createArray(length) { + // function shamelessly stolen from Yaffle's library https://github.com/Yaffle/BigInteger + var x = new Array(length); + var i = -1; + + while (++i < length) { + x[i] = 0; + } + + return x; + } + + function truncate(n) { + if (n > 0) return Math.floor(n); + return Math.ceil(n); + } + + function add(a, b) { + // assumes a and b are arrays with a.length >= b.length + var l_a = a.length, + l_b = b.length, + r = new Array(l_a), + carry = 0, + base = BASE, + sum, + i; + + for (i = 0; i < l_b; i++) { + sum = a[i] + b[i] + carry; + carry = sum >= base ? 1 : 0; + r[i] = sum - carry * base; + } + + while (i < l_a) { + sum = a[i] + carry; + carry = sum === base ? 1 : 0; + r[i++] = sum - carry * base; + } + + if (carry > 0) r.push(carry); + return r; + } + + function addAny(a, b) { + if (a.length >= b.length) return add(a, b); + return add(b, a); + } + + function addSmall(a, carry) { + // assumes a is array, carry is number with 0 <= carry < MAX_INT + var l = a.length, + r = new Array(l), + base = BASE, + sum, + i; + + for (i = 0; i < l; i++) { + sum = a[i] - base + carry; + carry = Math.floor(sum / base); + r[i] = sum - carry * base; + carry += 1; + } + + while (carry > 0) { + r[i++] = carry % base; + carry = Math.floor(carry / base); + } + + return r; + } + + BigInteger.prototype.add = function (v) { + var n = parseValue(v); + + if (this.sign !== n.sign) { + return this.subtract(n.negate()); + } + + var a = this.value, + b = n.value; + + if (n.isSmall) { + return new BigInteger(addSmall(a, Math.abs(b)), this.sign); + } + + return new BigInteger(addAny(a, b), this.sign); + }; + + BigInteger.prototype.plus = BigInteger.prototype.add; + + SmallInteger.prototype.add = function (v) { + var n = parseValue(v); + var a = this.value; + + if (a < 0 !== n.sign) { + return this.subtract(n.negate()); + } + + var b = n.value; + + if (n.isSmall) { + if (isPrecise(a + b)) return new SmallInteger(a + b); + b = smallToArray(Math.abs(b)); + } + + return new BigInteger(addSmall(b, Math.abs(a)), a < 0); + }; + + SmallInteger.prototype.plus = SmallInteger.prototype.add; + + function subtract(a, b) { + // assumes a and b are arrays with a >= b + var a_l = a.length, + b_l = b.length, + r = new Array(a_l), + borrow = 0, + base = BASE, + i, + difference; + + for (i = 0; i < b_l; i++) { + difference = a[i] - borrow - b[i]; + + if (difference < 0) { + difference += base; + borrow = 1; + } else borrow = 0; + + r[i] = difference; + } + + for (i = b_l; i < a_l; i++) { + difference = a[i] - borrow; + if (difference < 0) difference += base;else { + r[i++] = difference; + break; + } + r[i] = difference; + } + + for (; i < a_l; i++) { + r[i] = a[i]; + } + + trim(r); + return r; + } + + function subtractAny(a, b, sign) { + var value; + + if (compareAbs(a, b) >= 0) { + value = subtract(a, b); + } else { + value = subtract(b, a); + sign = !sign; + } + + value = arrayToSmall(value); + + if (typeof value === "number") { + if (sign) value = -value; + return new SmallInteger(value); + } + + return new BigInteger(value, sign); + } + + function subtractSmall(a, b, sign) { + // assumes a is array, b is number with 0 <= b < MAX_INT + var l = a.length, + r = new Array(l), + carry = -b, + base = BASE, + i, + difference; + + for (i = 0; i < l; i++) { + difference = a[i] + carry; + carry = Math.floor(difference / base); + difference %= base; + r[i] = difference < 0 ? difference + base : difference; + } + + r = arrayToSmall(r); + + if (typeof r === "number") { + if (sign) r = -r; + return new SmallInteger(r); + } + + return new BigInteger(r, sign); + } + + BigInteger.prototype.subtract = function (v) { + var n = parseValue(v); + + if (this.sign !== n.sign) { + return this.add(n.negate()); + } + + var a = this.value, + b = n.value; + if (n.isSmall) return subtractSmall(a, Math.abs(b), this.sign); + return subtractAny(a, b, this.sign); + }; + + BigInteger.prototype.minus = BigInteger.prototype.subtract; + + SmallInteger.prototype.subtract = function (v) { + var n = parseValue(v); + var a = this.value; + + if (a < 0 !== n.sign) { + return this.add(n.negate()); + } + + var b = n.value; + + if (n.isSmall) { + return new SmallInteger(a - b); + } + + return subtractSmall(b, Math.abs(a), a >= 0); + }; + + SmallInteger.prototype.minus = SmallInteger.prototype.subtract; + + BigInteger.prototype.negate = function () { + return new BigInteger(this.value, !this.sign); + }; + + SmallInteger.prototype.negate = function () { + var sign = this.sign; + var small = new SmallInteger(-this.value); + small.sign = !sign; + return small; + }; + + BigInteger.prototype.abs = function () { + return new BigInteger(this.value, false); + }; + + SmallInteger.prototype.abs = function () { + return new SmallInteger(Math.abs(this.value)); + }; + + function multiplyLong(a, b) { + var a_l = a.length, + b_l = b.length, + l = a_l + b_l, + r = createArray(l), + base = BASE, + product, + carry, + i, + a_i, + b_j; + + for (i = 0; i < a_l; ++i) { + a_i = a[i]; + + for (var j = 0; j < b_l; ++j) { + b_j = b[j]; + product = a_i * b_j + r[i + j]; + carry = Math.floor(product / base); + r[i + j] = product - carry * base; + r[i + j + 1] += carry; + } + } + + trim(r); + return r; + } + + function multiplySmall(a, b) { + // assumes a is array, b is number with |b| < BASE + var l = a.length, + r = new Array(l), + base = BASE, + carry = 0, + product, + i; + + for (i = 0; i < l; i++) { + product = a[i] * b + carry; + carry = Math.floor(product / base); + r[i] = product - carry * base; + } + + while (carry > 0) { + r[i++] = carry % base; + carry = Math.floor(carry / base); + } + + return r; + } + + function shiftLeft(x, n) { + var r = []; + + while (n-- > 0) r.push(0); + + return r.concat(x); + } + + function multiplyKaratsuba(x, y) { + var n = Math.max(x.length, y.length); + if (n <= 30) return multiplyLong(x, y); + n = Math.ceil(n / 2); + var b = x.slice(n), + a = x.slice(0, n), + d = y.slice(n), + c = y.slice(0, n); + var ac = multiplyKaratsuba(a, c), + bd = multiplyKaratsuba(b, d), + abcd = multiplyKaratsuba(addAny(a, b), addAny(c, d)); + var product = addAny(addAny(ac, shiftLeft(subtract(subtract(abcd, ac), bd), n)), shiftLeft(bd, 2 * n)); + trim(product); + return product; + } // The following function is derived from a surface fit of a graph plotting the performance difference + // between long multiplication and karatsuba multiplication versus the lengths of the two arrays. + + + function useKaratsuba(l1, l2) { + return -0.012 * l1 - 0.012 * l2 + 0.000015 * l1 * l2 > 0; + } + + BigInteger.prototype.multiply = function (v) { + var n = parseValue(v), + a = this.value, + b = n.value, + sign = this.sign !== n.sign, + abs; + + if (n.isSmall) { + if (b === 0) return Integer[0]; + if (b === 1) return this; + if (b === -1) return this.negate(); + abs = Math.abs(b); + + if (abs < BASE) { + return new BigInteger(multiplySmall(a, abs), sign); + } + + b = smallToArray(abs); + } + + if (useKaratsuba(a.length, b.length)) // Karatsuba is only faster for certain array sizes + return new BigInteger(multiplyKaratsuba(a, b), sign); + return new BigInteger(multiplyLong(a, b), sign); + }; + + BigInteger.prototype.times = BigInteger.prototype.multiply; + + function multiplySmallAndArray(a, b, sign) { + // a >= 0 + if (a < BASE) { + return new BigInteger(multiplySmall(b, a), sign); + } + + return new BigInteger(multiplyLong(b, smallToArray(a)), sign); + } + + SmallInteger.prototype._multiplyBySmall = function (a) { + if (isPrecise(a.value * this.value)) { + return new SmallInteger(a.value * this.value); + } + + return multiplySmallAndArray(Math.abs(a.value), smallToArray(Math.abs(this.value)), this.sign !== a.sign); + }; + + BigInteger.prototype._multiplyBySmall = function (a) { + if (a.value === 0) return Integer[0]; + if (a.value === 1) return this; + if (a.value === -1) return this.negate(); + return multiplySmallAndArray(Math.abs(a.value), this.value, this.sign !== a.sign); + }; + + SmallInteger.prototype.multiply = function (v) { + return parseValue(v)._multiplyBySmall(this); + }; + + SmallInteger.prototype.times = SmallInteger.prototype.multiply; + + function square(a) { + var l = a.length, + r = createArray(l + l), + base = BASE, + product, + carry, + i, + a_i, + a_j; + + for (i = 0; i < l; i++) { + a_i = a[i]; + + for (var j = 0; j < l; j++) { + a_j = a[j]; + product = a_i * a_j + r[i + j]; + carry = Math.floor(product / base); + r[i + j] = product - carry * base; + r[i + j + 1] += carry; + } + } + + trim(r); + return r; + } + + BigInteger.prototype.square = function () { + return new BigInteger(square(this.value), false); + }; + + SmallInteger.prototype.square = function () { + var value = this.value * this.value; + if (isPrecise(value)) return new SmallInteger(value); + return new BigInteger(square(smallToArray(Math.abs(this.value))), false); + }; + + function divMod1(a, b) { + // Left over from previous version. Performs faster than divMod2 on smaller input sizes. + var a_l = a.length, + b_l = b.length, + base = BASE, + result = createArray(b.length), + divisorMostSignificantDigit = b[b_l - 1], + // normalization + lambda = Math.ceil(base / (2 * divisorMostSignificantDigit)), + remainder = multiplySmall(a, lambda), + divisor = multiplySmall(b, lambda), + quotientDigit, + shift, + carry, + borrow, + i, + l, + q; + if (remainder.length <= a_l) remainder.push(0); + divisor.push(0); + divisorMostSignificantDigit = divisor[b_l - 1]; + + for (shift = a_l - b_l; shift >= 0; shift--) { + quotientDigit = base - 1; + + if (remainder[shift + b_l] !== divisorMostSignificantDigit) { + quotientDigit = Math.floor((remainder[shift + b_l] * base + remainder[shift + b_l - 1]) / divisorMostSignificantDigit); + } // quotientDigit <= base - 1 + + + carry = 0; + borrow = 0; + l = divisor.length; + + for (i = 0; i < l; i++) { + carry += quotientDigit * divisor[i]; + q = Math.floor(carry / base); + borrow += remainder[shift + i] - (carry - q * base); + carry = q; + + if (borrow < 0) { + remainder[shift + i] = borrow + base; + borrow = -1; + } else { + remainder[shift + i] = borrow; + borrow = 0; + } + } + + while (borrow !== 0) { + quotientDigit -= 1; + carry = 0; + + for (i = 0; i < l; i++) { + carry += remainder[shift + i] - base + divisor[i]; + + if (carry < 0) { + remainder[shift + i] = carry + base; + carry = 0; + } else { + remainder[shift + i] = carry; + carry = 1; + } + } + + borrow += carry; + } + + result[shift] = quotientDigit; + } // denormalization + + + remainder = divModSmall(remainder, lambda)[0]; + return [arrayToSmall(result), arrayToSmall(remainder)]; + } + + function divMod2(a, b) { + // Implementation idea shamelessly stolen from Silent Matt's library http://silentmatt.com/biginteger/ + // Performs faster than divMod1 on larger input sizes. + var a_l = a.length, + b_l = b.length, + result = [], + part = [], + base = BASE, + guess, + xlen, + highx, + highy, + check; + + while (a_l) { + part.unshift(a[--a_l]); + trim(part); + + if (compareAbs(part, b) < 0) { + result.push(0); + continue; + } + + xlen = part.length; + highx = part[xlen - 1] * base + part[xlen - 2]; + highy = b[b_l - 1] * base + b[b_l - 2]; + + if (xlen > b_l) { + highx = (highx + 1) * base; + } + + guess = Math.ceil(highx / highy); + + do { + check = multiplySmall(b, guess); + if (compareAbs(check, part) <= 0) break; + guess--; + } while (guess); + + result.push(guess); + part = subtract(part, check); + } + + result.reverse(); + return [arrayToSmall(result), arrayToSmall(part)]; + } + + function divModSmall(value, lambda) { + var length = value.length, + quotient = createArray(length), + base = BASE, + i, + q, + remainder, + divisor; + remainder = 0; + + for (i = length - 1; i >= 0; --i) { + divisor = remainder * base + value[i]; + q = truncate(divisor / lambda); + remainder = divisor - q * lambda; + quotient[i] = q | 0; + } + + return [quotient, remainder | 0]; + } + + function divModAny(self, v) { + var value, + n = parseValue(v); + var a = self.value, + b = n.value; + var quotient; + if (b === 0) throw new Error("Cannot divide by zero"); + + if (self.isSmall) { + if (n.isSmall) { + return [new SmallInteger(truncate(a / b)), new SmallInteger(a % b)]; + } + + return [Integer[0], self]; + } + + if (n.isSmall) { + if (b === 1) return [self, Integer[0]]; + if (b == -1) return [self.negate(), Integer[0]]; + var abs = Math.abs(b); + + if (abs < BASE) { + value = divModSmall(a, abs); + quotient = arrayToSmall(value[0]); + var remainder = value[1]; + if (self.sign) remainder = -remainder; + + if (typeof quotient === "number") { + if (self.sign !== n.sign) quotient = -quotient; + return [new SmallInteger(quotient), new SmallInteger(remainder)]; + } + + return [new BigInteger(quotient, self.sign !== n.sign), new SmallInteger(remainder)]; + } + + b = smallToArray(abs); + } + + var comparison = compareAbs(a, b); + if (comparison === -1) return [Integer[0], self]; + if (comparison === 0) return [Integer[self.sign === n.sign ? 1 : -1], Integer[0]]; // divMod1 is faster on smaller input sizes + + if (a.length + b.length <= 200) value = divMod1(a, b);else value = divMod2(a, b); + quotient = value[0]; + var qSign = self.sign !== n.sign, + mod = value[1], + mSign = self.sign; + + if (typeof quotient === "number") { + if (qSign) quotient = -quotient; + quotient = new SmallInteger(quotient); + } else quotient = new BigInteger(quotient, qSign); + + if (typeof mod === "number") { + if (mSign) mod = -mod; + mod = new SmallInteger(mod); + } else mod = new BigInteger(mod, mSign); + + return [quotient, mod]; + } + + BigInteger.prototype.divmod = function (v) { + var result = divModAny(this, v); + return { + quotient: result[0], + remainder: result[1] + }; + }; + + SmallInteger.prototype.divmod = BigInteger.prototype.divmod; + + BigInteger.prototype.divide = function (v) { + return divModAny(this, v)[0]; + }; + + SmallInteger.prototype.over = SmallInteger.prototype.divide = BigInteger.prototype.over = BigInteger.prototype.divide; + + BigInteger.prototype.mod = function (v) { + return divModAny(this, v)[1]; + }; + + SmallInteger.prototype.remainder = SmallInteger.prototype.mod = BigInteger.prototype.remainder = BigInteger.prototype.mod; + + BigInteger.prototype.pow = function (v) { + var n = parseValue(v), + a = this.value, + b = n.value, + value, + x, + y; + if (b === 0) return Integer[1]; + if (a === 0) return Integer[0]; + if (a === 1) return Integer[1]; + if (a === -1) return n.isEven() ? Integer[1] : Integer[-1]; + + if (n.sign) { + return Integer[0]; + } + + if (!n.isSmall) throw new Error("The exponent " + n.toString() + " is too large."); + + if (this.isSmall) { + if (isPrecise(value = Math.pow(a, b))) return new SmallInteger(truncate(value)); + } + + x = this; + y = Integer[1]; + + while (true) { + if (b & 1 === 1) { + y = y.times(x); + --b; + } + + if (b === 0) break; + b /= 2; + x = x.square(); + } + + return y; + }; + + SmallInteger.prototype.pow = BigInteger.prototype.pow; + + BigInteger.prototype.modPow = function (exp, mod) { + exp = parseValue(exp); + mod = parseValue(mod); + if (mod.isZero()) throw new Error("Cannot take modPow with modulus 0"); + var r = Integer[1], + base = this.mod(mod); + + while (exp.isPositive()) { + if (base.isZero()) return Integer[0]; + if (exp.isOdd()) r = r.multiply(base).mod(mod); + exp = exp.divide(2); + base = base.square().mod(mod); + } + + return r; + }; + + SmallInteger.prototype.modPow = BigInteger.prototype.modPow; + + function compareAbs(a, b) { + if (a.length !== b.length) { + return a.length > b.length ? 1 : -1; + } + + for (var i = a.length - 1; i >= 0; i--) { + if (a[i] !== b[i]) return a[i] > b[i] ? 1 : -1; + } + + return 0; + } + + BigInteger.prototype.compareAbs = function (v) { + var n = parseValue(v), + a = this.value, + b = n.value; + if (n.isSmall) return 1; + return compareAbs(a, b); + }; + + SmallInteger.prototype.compareAbs = function (v) { + var n = parseValue(v), + a = Math.abs(this.value), + b = n.value; + + if (n.isSmall) { + b = Math.abs(b); + return a === b ? 0 : a > b ? 1 : -1; + } + + return -1; + }; + + BigInteger.prototype.compare = function (v) { + // See discussion about comparison with Infinity: + // https://github.com/peterolson/BigInteger.js/issues/61 + if (v === Infinity) { + return -1; + } + + if (v === -Infinity) { + return 1; + } + + var n = parseValue(v), + a = this.value, + b = n.value; + + if (this.sign !== n.sign) { + return n.sign ? 1 : -1; + } + + if (n.isSmall) { + return this.sign ? -1 : 1; + } + + return compareAbs(a, b) * (this.sign ? -1 : 1); + }; + + BigInteger.prototype.compareTo = BigInteger.prototype.compare; + + SmallInteger.prototype.compare = function (v) { + if (v === Infinity) { + return -1; + } + + if (v === -Infinity) { + return 1; + } + + var n = parseValue(v), + a = this.value, + b = n.value; + + if (n.isSmall) { + return a == b ? 0 : a > b ? 1 : -1; + } + + if (a < 0 !== n.sign) { + return a < 0 ? -1 : 1; + } + + return a < 0 ? 1 : -1; + }; + + SmallInteger.prototype.compareTo = SmallInteger.prototype.compare; + + BigInteger.prototype.equals = function (v) { + return this.compare(v) === 0; + }; + + SmallInteger.prototype.eq = SmallInteger.prototype.equals = BigInteger.prototype.eq = BigInteger.prototype.equals; + + BigInteger.prototype.notEquals = function (v) { + return this.compare(v) !== 0; + }; + + SmallInteger.prototype.neq = SmallInteger.prototype.notEquals = BigInteger.prototype.neq = BigInteger.prototype.notEquals; + + BigInteger.prototype.greater = function (v) { + return this.compare(v) > 0; + }; + + SmallInteger.prototype.gt = SmallInteger.prototype.greater = BigInteger.prototype.gt = BigInteger.prototype.greater; + + BigInteger.prototype.lesser = function (v) { + return this.compare(v) < 0; + }; + + SmallInteger.prototype.lt = SmallInteger.prototype.lesser = BigInteger.prototype.lt = BigInteger.prototype.lesser; + + BigInteger.prototype.greaterOrEquals = function (v) { + return this.compare(v) >= 0; + }; + + SmallInteger.prototype.geq = SmallInteger.prototype.greaterOrEquals = BigInteger.prototype.geq = BigInteger.prototype.greaterOrEquals; + + BigInteger.prototype.lesserOrEquals = function (v) { + return this.compare(v) <= 0; + }; + + SmallInteger.prototype.leq = SmallInteger.prototype.lesserOrEquals = BigInteger.prototype.leq = BigInteger.prototype.lesserOrEquals; + + BigInteger.prototype.isEven = function () { + return (this.value[0] & 1) === 0; + }; + + SmallInteger.prototype.isEven = function () { + return (this.value & 1) === 0; + }; + + BigInteger.prototype.isOdd = function () { + return (this.value[0] & 1) === 1; + }; + + SmallInteger.prototype.isOdd = function () { + return (this.value & 1) === 1; + }; + + BigInteger.prototype.isPositive = function () { + return !this.sign; + }; + + SmallInteger.prototype.isPositive = function () { + return this.value > 0; + }; + + BigInteger.prototype.isNegative = function () { + return this.sign; + }; + + SmallInteger.prototype.isNegative = function () { + return this.value < 0; + }; + + BigInteger.prototype.isUnit = function () { + return false; + }; + + SmallInteger.prototype.isUnit = function () { + return Math.abs(this.value) === 1; + }; + + BigInteger.prototype.isZero = function () { + return false; + }; + + SmallInteger.prototype.isZero = function () { + return this.value === 0; + }; + + BigInteger.prototype.isDivisibleBy = function (v) { + var n = parseValue(v); + var value = n.value; + if (value === 0) return false; + if (value === 1) return true; + if (value === 2) return this.isEven(); + return this.mod(n).equals(Integer[0]); + }; + + SmallInteger.prototype.isDivisibleBy = BigInteger.prototype.isDivisibleBy; + + function isBasicPrime(v) { + var n = v.abs(); + if (n.isUnit()) return false; + if (n.equals(2) || n.equals(3) || n.equals(5)) return true; + if (n.isEven() || n.isDivisibleBy(3) || n.isDivisibleBy(5)) return false; + if (n.lesser(25)) return true; // we don't know if it's prime: let the other functions figure it out + } + + BigInteger.prototype.isPrime = function () { + var isPrime = isBasicPrime(this); + if (isPrime !== undefined) return isPrime; + var n = this.abs(), + nPrev = n.prev(); + var a = [2, 3, 5, 7, 11, 13, 17, 19], + b = nPrev, + d, + t, + i, + x; + + while (b.isEven()) b = b.divide(2); + + for (i = 0; i < a.length; i++) { + x = bigInt(a[i]).modPow(b, n); + if (x.equals(Integer[1]) || x.equals(nPrev)) continue; + + for (t = true, d = b; t && d.lesser(nPrev); d = d.multiply(2)) { + x = x.square().mod(n); + if (x.equals(nPrev)) t = false; + } + + if (t) return false; + } + + return true; + }; + + SmallInteger.prototype.isPrime = BigInteger.prototype.isPrime; + + BigInteger.prototype.isProbablePrime = function (iterations) { + var isPrime = isBasicPrime(this); + if (isPrime !== undefined) return isPrime; + var n = this.abs(); + var t = iterations === undefined ? 5 : iterations; // use the Fermat primality test + + for (var i = 0; i < t; i++) { + var a = bigInt.randBetween(2, n.minus(2)); + if (!a.modPow(n.prev(), n).isUnit()) return false; // definitely composite + } + + return true; // large chance of being prime + }; + + SmallInteger.prototype.isProbablePrime = BigInteger.prototype.isProbablePrime; + + BigInteger.prototype.modInv = function (n) { + var t = bigInt.zero, + newT = bigInt.one, + r = parseValue(n), + newR = this.abs(), + q, + lastT, + lastR; + + while (!newR.equals(bigInt.zero)) { + q = r.divide(newR); + lastT = t; + lastR = r; + t = newT; + r = newR; + newT = lastT.subtract(q.multiply(newT)); + newR = lastR.subtract(q.multiply(newR)); + } + + if (!r.equals(1)) throw new Error(this.toString() + " and " + n.toString() + " are not co-prime"); + + if (t.compare(0) === -1) { + t = t.add(n); + } + + if (this.isNegative()) { + return t.negate(); + } + + return t; + }; + + SmallInteger.prototype.modInv = BigInteger.prototype.modInv; + + BigInteger.prototype.next = function () { + var value = this.value; + + if (this.sign) { + return subtractSmall(value, 1, this.sign); + } + + return new BigInteger(addSmall(value, 1), this.sign); + }; + + SmallInteger.prototype.next = function () { + var value = this.value; + if (value + 1 < MAX_INT) return new SmallInteger(value + 1); + return new BigInteger(MAX_INT_ARR, false); + }; + + BigInteger.prototype.prev = function () { + var value = this.value; + + if (this.sign) { + return new BigInteger(addSmall(value, 1), true); + } + + return subtractSmall(value, 1, this.sign); + }; + + SmallInteger.prototype.prev = function () { + var value = this.value; + if (value - 1 > -MAX_INT) return new SmallInteger(value - 1); + return new BigInteger(MAX_INT_ARR, true); + }; + + var powersOfTwo = [1]; + + while (2 * powersOfTwo[powersOfTwo.length - 1] <= BASE) powersOfTwo.push(2 * powersOfTwo[powersOfTwo.length - 1]); + + var powers2Length = powersOfTwo.length, + highestPower2 = powersOfTwo[powers2Length - 1]; + + function shift_isSmall(n) { + return (typeof n === "number" || typeof n === "string") && +Math.abs(n) <= BASE || n instanceof BigInteger && n.value.length <= 1; + } + + BigInteger.prototype.shiftLeft = function (n) { + if (!shift_isSmall(n)) { + throw new Error(String(n) + " is too large for shifting."); + } + + n = +n; + if (n < 0) return this.shiftRight(-n); + var result = this; + + while (n >= powers2Length) { + result = result.multiply(highestPower2); + n -= powers2Length - 1; + } + + return result.multiply(powersOfTwo[n]); + }; + + SmallInteger.prototype.shiftLeft = BigInteger.prototype.shiftLeft; + + BigInteger.prototype.shiftRight = function (n) { + var remQuo; + + if (!shift_isSmall(n)) { + throw new Error(String(n) + " is too large for shifting."); + } + + n = +n; + if (n < 0) return this.shiftLeft(-n); + var result = this; + + while (n >= powers2Length) { + if (result.isZero()) return result; + remQuo = divModAny(result, highestPower2); + result = remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; + n -= powers2Length - 1; + } + + remQuo = divModAny(result, powersOfTwo[n]); + return remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; + }; + + SmallInteger.prototype.shiftRight = BigInteger.prototype.shiftRight; + + function bitwise(x, y, fn) { + y = parseValue(y); + var xSign = x.isNegative(), + ySign = y.isNegative(); + var xRem = xSign ? x.not() : x, + yRem = ySign ? y.not() : y; + var xDigit = 0, + yDigit = 0; + var xDivMod = null, + yDivMod = null; + var result = []; + + while (!xRem.isZero() || !yRem.isZero()) { + xDivMod = divModAny(xRem, highestPower2); + xDigit = xDivMod[1].toJSNumber(); + + if (xSign) { + xDigit = highestPower2 - 1 - xDigit; // two's complement for negative numbers + } + + yDivMod = divModAny(yRem, highestPower2); + yDigit = yDivMod[1].toJSNumber(); + + if (ySign) { + yDigit = highestPower2 - 1 - yDigit; // two's complement for negative numbers + } + + xRem = xDivMod[0]; + yRem = yDivMod[0]; + result.push(fn(xDigit, yDigit)); + } + + var sum = fn(xSign ? 1 : 0, ySign ? 1 : 0) !== 0 ? bigInt(-1) : bigInt(0); + + for (var i = result.length - 1; i >= 0; i -= 1) { + sum = sum.multiply(highestPower2).add(bigInt(result[i])); + } + + return sum; + } + + BigInteger.prototype.not = function () { + return this.negate().prev(); + }; + + SmallInteger.prototype.not = BigInteger.prototype.not; + + BigInteger.prototype.and = function (n) { + return bitwise(this, n, function (a, b) { + return a & b; + }); + }; + + SmallInteger.prototype.and = BigInteger.prototype.and; + + BigInteger.prototype.or = function (n) { + return bitwise(this, n, function (a, b) { + return a | b; + }); + }; + + SmallInteger.prototype.or = BigInteger.prototype.or; + + BigInteger.prototype.xor = function (n) { + return bitwise(this, n, function (a, b) { + return a ^ b; + }); + }; + + SmallInteger.prototype.xor = BigInteger.prototype.xor; + var LOBMASK_I = 1 << 30, + LOBMASK_BI = (BASE & -BASE) * (BASE & -BASE) | LOBMASK_I; + + function roughLOB(n) { + // get lowestOneBit (rough) + // SmallInteger: return Min(lowestOneBit(n), 1 << 30) + // BigInteger: return Min(lowestOneBit(n), 1 << 14) [BASE=1e7] + var v = n.value, + x = typeof v === "number" ? v | LOBMASK_I : v[0] + v[1] * BASE | LOBMASK_BI; + return x & -x; + } + + function max(a, b) { + a = parseValue(a); + b = parseValue(b); + return a.greater(b) ? a : b; + } + + function min(a, b) { + a = parseValue(a); + b = parseValue(b); + return a.lesser(b) ? a : b; + } + + function gcd(a, b) { + a = parseValue(a).abs(); + b = parseValue(b).abs(); + if (a.equals(b)) return a; + if (a.isZero()) return b; + if (b.isZero()) return a; + var c = Integer[1], + d, + t; + + while (a.isEven() && b.isEven()) { + d = Math.min(roughLOB(a), roughLOB(b)); + a = a.divide(d); + b = b.divide(d); + c = c.multiply(d); + } + + while (a.isEven()) { + a = a.divide(roughLOB(a)); + } + + do { + while (b.isEven()) { + b = b.divide(roughLOB(b)); + } + + if (a.greater(b)) { + t = b; + b = a; + a = t; + } + + b = b.subtract(a); + } while (!b.isZero()); + + return c.isUnit() ? a : a.multiply(c); + } + + function lcm(a, b) { + a = parseValue(a).abs(); + b = parseValue(b).abs(); + return a.divide(gcd(a, b)).multiply(b); + } + + function randBetween(a, b) { + a = parseValue(a); + b = parseValue(b); + var low = min(a, b), + high = max(a, b); + var range = high.subtract(low).add(1); + if (range.isSmall) return low.add(Math.floor(Math.random() * range)); + var length = range.value.length - 1; + var result = [], + restricted = true; + + for (var i = length; i >= 0; i--) { + var top = restricted ? range.value[i] : BASE; + var digit = truncate(Math.random() * top); + result.unshift(digit); + if (digit < top) restricted = false; + } + + result = arrayToSmall(result); + return low.add(typeof result === "number" ? new SmallInteger(result) : new BigInteger(result, false)); + } + + var parseBase = function (text, base) { + var length = text.length; + var i; + var absBase = Math.abs(base); + + for (var i = 0; i < length; i++) { + var c = text[i].toLowerCase(); + if (c === "-") continue; + + if (/[a-z0-9]/.test(c)) { + if (/[0-9]/.test(c) && +c >= absBase) { + if (c === "1" && absBase === 1) continue; + throw new Error(c + " is not a valid digit in base " + base + "."); + } else if (c.charCodeAt(0) - 87 >= absBase) { + throw new Error(c + " is not a valid digit in base " + base + "."); + } + } + } + + if (2 <= base && base <= 36) { + if (length <= LOG_MAX_INT / Math.log(base)) { + var result = parseInt(text, base); + + if (isNaN(result)) { + throw new Error(c + " is not a valid digit in base " + base + "."); + } + + return new SmallInteger(parseInt(text, base)); + } + } + + base = parseValue(base); + var digits = []; + var isNegative = text[0] === "-"; + + for (i = isNegative ? 1 : 0; i < text.length; i++) { + var c = text[i].toLowerCase(), + charCode = c.charCodeAt(0); + if (48 <= charCode && charCode <= 57) digits.push(parseValue(c));else if (97 <= charCode && charCode <= 122) digits.push(parseValue(c.charCodeAt(0) - 87));else if (c === "<") { + var start = i; + + do { + i++; + } while (text[i] !== ">"); + + digits.push(parseValue(text.slice(start + 1, i))); + } else throw new Error(c + " is not a valid character"); + } + + return parseBaseFromArray(digits, base, isNegative); + }; + + function parseBaseFromArray(digits, base, isNegative) { + var val = Integer[0], + pow = Integer[1], + i; + + for (i = digits.length - 1; i >= 0; i--) { + val = val.add(digits[i].times(pow)); + pow = pow.times(base); + } + + return isNegative ? val.negate() : val; + } + + function stringify(digit) { + if (digit <= 35) { + return "0123456789abcdefghijklmnopqrstuvwxyz".charAt(digit); + } + + return "<" + digit + ">"; + } + + function toBase(n, base) { + base = bigInt(base); + + if (base.isZero()) { + if (n.isZero()) return { + value: [0], + isNegative: false + }; + throw new Error("Cannot convert nonzero numbers to base 0."); + } + + if (base.equals(-1)) { + if (n.isZero()) return { + value: [0], + isNegative: false + }; + if (n.isNegative()) return { + value: [].concat.apply([], Array.apply(null, Array(-n)).map(Array.prototype.valueOf, [1, 0])), + isNegative: false + }; + var arr = Array.apply(null, Array(+n - 1)).map(Array.prototype.valueOf, [0, 1]); + arr.unshift([1]); + return { + value: [].concat.apply([], arr), + isNegative: false + }; + } + + var neg = false; + + if (n.isNegative() && base.isPositive()) { + neg = true; + n = n.abs(); + } + + if (base.equals(1)) { + if (n.isZero()) return { + value: [0], + isNegative: false + }; + return { + value: Array.apply(null, Array(+n)).map(Number.prototype.valueOf, 1), + isNegative: neg + }; + } + + var out = []; + var left = n, + divmod; + + while (left.isNegative() || left.compareAbs(base) >= 0) { + divmod = left.divmod(base); + left = divmod.quotient; + var digit = divmod.remainder; + + if (digit.isNegative()) { + digit = base.minus(digit).abs(); + left = left.next(); + } + + out.push(digit.toJSNumber()); + } + + out.push(left.toJSNumber()); + return { + value: out.reverse(), + isNegative: neg + }; + } + + function toBaseString(n, base) { + var arr = toBase(n, base); + return (arr.isNegative ? "-" : "") + arr.value.map(stringify).join(''); + } + + BigInteger.prototype.toArray = function (radix) { + return toBase(this, radix); + }; + + SmallInteger.prototype.toArray = function (radix) { + return toBase(this, radix); + }; + + BigInteger.prototype.toString = function (radix) { + if (radix === undefined) radix = 10; + if (radix !== 10) return toBaseString(this, radix); + var v = this.value, + l = v.length, + str = String(v[--l]), + zeros = "0000000", + digit; + + while (--l >= 0) { + digit = String(v[l]); + str += zeros.slice(digit.length) + digit; + } + + var sign = this.sign ? "-" : ""; + return sign + str; + }; + + SmallInteger.prototype.toString = function (radix) { + if (radix === undefined) radix = 10; + if (radix != 10) return toBaseString(this, radix); + return String(this.value); + }; + + BigInteger.prototype.toJSON = SmallInteger.prototype.toJSON = function () { + return this.toString(); + }; + + BigInteger.prototype.valueOf = function () { + return parseInt(this.toString(), 10); + }; + + BigInteger.prototype.toJSNumber = BigInteger.prototype.valueOf; + + SmallInteger.prototype.valueOf = function () { + return this.value; + }; + + SmallInteger.prototype.toJSNumber = SmallInteger.prototype.valueOf; + + function parseStringValue(v) { + if (isPrecise(+v)) { + var x = +v; + if (x === truncate(x)) return new SmallInteger(x); + throw "Invalid integer: " + v; + } + + var sign = v[0] === "-"; + if (sign) v = v.slice(1); + var split = v.split(/e/i); + if (split.length > 2) throw new Error("Invalid integer: " + split.join("e")); + + if (split.length === 2) { + var exp = split[1]; + if (exp[0] === "+") exp = exp.slice(1); + exp = +exp; + if (exp !== truncate(exp) || !isPrecise(exp)) throw new Error("Invalid integer: " + exp + " is not a valid exponent."); + var text = split[0]; + var decimalPlace = text.indexOf("."); + + if (decimalPlace >= 0) { + exp -= text.length - decimalPlace - 1; + text = text.slice(0, decimalPlace) + text.slice(decimalPlace + 1); + } + + if (exp < 0) throw new Error("Cannot include negative exponent part for integers"); + text += new Array(exp + 1).join("0"); + v = text; + } + + var isValid = /^([0-9][0-9]*)$/.test(v); + if (!isValid) throw new Error("Invalid integer: " + v); + var r = [], + max = v.length, + l = LOG_BASE, + min = max - l; + + while (max > 0) { + r.push(+v.slice(min, max)); + min -= l; + if (min < 0) min = 0; + max -= l; + } + + trim(r); + return new BigInteger(r, sign); + } + + function parseNumberValue(v) { + if (isPrecise(v)) { + if (v !== truncate(v)) throw new Error(v + " is not an integer."); + return new SmallInteger(v); + } + + return parseStringValue(v.toString()); + } + + function parseValue(v) { + if (typeof v === "number") { + return parseNumberValue(v); + } + + if (typeof v === "string") { + return parseStringValue(v); + } + + return v; + } // Pre-define numbers in range [-999,999] + + + for (var i = 0; i < 1000; i++) { + Integer[i] = new SmallInteger(i); + if (i > 0) Integer[-i] = new SmallInteger(-i); + } // Backwards compatibility + + + Integer.one = Integer[1]; + Integer.zero = Integer[0]; + Integer.minusOne = Integer[-1]; + Integer.max = max; + Integer.min = min; + Integer.gcd = gcd; + Integer.lcm = lcm; + + Integer.isInstance = function (x) { + return x instanceof BigInteger || x instanceof SmallInteger; + }; + + Integer.randBetween = randBetween; + + Integer.fromArray = function (digits, base, isNegative) { + return parseBaseFromArray(digits.map(parseValue), parseValue(base || 10), isNegative); + }; + + return Integer; +}(); // Node.js check + + +if (typeof module !== "undefined" && module.hasOwnProperty("exports")) { + module.exports = bigInt; +} //amd check + + +if (typeof define === "function" && define.amd) { + define("big-integer", [], function () { + return bigInt; + }); +} +},{}],"S0gh":[function(require,module,exports) { +// module Data.BigInt +var bigInt = require("big-integer"); + +exports["fromBase'"] = function (just) { + return function (nothing) { + return function (b) { + return function (s) { + try { + var x = bigInt(s, b); + return just(x); + } catch (err) { + return nothing; + } + }; + }; + }; +}; + +function truncate(n) { + if (n > 0) return Math.floor(n); + return Math.ceil(n); +} + +exports["fromNumber'"] = function (just) { + return function (nothing) { + return function (n) { + try { + var x = bigInt(truncate(n)); + return just(x); + } catch (err) { + return nothing; + } + }; + }; +}; + +exports.fromInt = function (n) { + return bigInt(n); +}; + +exports.toBase = function (base) { + return function (x) { + return x.toString(base); + }; +}; + +exports.toNumber = function (x) { + return x.toJSNumber(); +}; + +exports.biAdd = function (x) { + return function (y) { + return x.add(y); + }; +}; + +exports.biMul = function (x) { + return function (y) { + return x.multiply(y); + }; +}; + +exports.biSub = function (x) { + return function (y) { + return x.minus(y); + }; +}; + +exports.biMod = function (x) { + return function (y) { + return x.mod(y); + }; +}; + +exports.biDiv = function (x) { + return function (y) { + return x.divide(y); + }; +}; + +exports.biEquals = function (x) { + return function (y) { + return x.equals(y); + }; +}; + +exports.biCompare = function (x) { + return function (y) { + return x.compare(y); + }; +}; + +exports.abs = function (x) { + return x.abs(); +}; + +exports.even = function (x) { + return x.isEven(); +}; + +exports.odd = function (x) { + return x.isOdd(); +}; + +exports.prime = function (x) { + return x.isPrime(); +}; + +exports.pow = function (x) { + return function (y) { + return x.pow(y); + }; +}; + +exports.not = function (x) { + return x.not(); +}; + +exports.or = function (x) { + return function (y) { + return x.or(y); + }; +}; + +exports.xor = function (x) { + return function (y) { + return x.xor(y); + }; +}; + +exports.and = function (x) { + return function (y) { + return x.and(y); + }; +}; + +exports.shl = function (x) { + return function (n) { + return x.shiftLeft(n); + }; +}; + +exports.shr = function (x) { + return function (n) { + return x.shiftRight(n); + }; +}; + +exports.digitsInBase = function (radix) { + return function (x) { + return x.toArray(radix); + }; +}; +},{"big-integer":"9xaU"}],"2lBd":[function(require,module,exports) { +"use strict"; + +exports.fromNumberImpl = function (just) { + return function (nothing) { + return function (n) { + /* jshint bitwise: false */ + return (n | 0) === n ? just(n) : nothing; + }; + }; +}; + +exports.toNumber = function (n) { + return n; +}; + +exports.fromStringAsImpl = function (just) { + return function (nothing) { + return function (radix) { + var digits; + + if (radix < 11) { + digits = "[0-" + (radix - 1).toString() + "]"; + } else if (radix === 11) { + digits = "[0-9a]"; + } else { + digits = "[0-9a-" + String.fromCharCode(86 + radix) + "]"; + } + + var pattern = new RegExp("^[\\+\\-]?" + digits + "+$", "i"); + return function (s) { + /* jshint bitwise: false */ + if (pattern.test(s)) { + var i = parseInt(s, radix); + return (i | 0) === i ? just(i) : nothing; + } else { + return nothing; + } + }; + }; + }; +}; + +exports.toStringAs = function (radix) { + return function (i) { + return i.toString(radix); + }; +}; + +exports.quot = function (x) { + return function (y) { + /* jshint bitwise: false */ + return x / y | 0; + }; +}; + +exports.rem = function (x) { + return function (y) { + return x % y; + }; +}; + +exports.pow = function (x) { + return function (y) { + /* jshint bitwise: false */ + return Math.pow(x, y) | 0; + }; +}; +},{}],"xYq2":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var DivisionRing = function DivisionRing(Ring0, recip) { + this.Ring0 = Ring0; + this.recip = recip; +}; + +var recip = function recip(dict) { + return dict.recip; +}; + +var rightDiv = function rightDiv(dictDivisionRing) { + return function (a) { + return function (b) { + return Data_Semiring.mul(dictDivisionRing.Ring0().Semiring0())(a)(recip(dictDivisionRing)(b)); + }; + }; +}; + +var leftDiv = function leftDiv(dictDivisionRing) { + return function (a) { + return function (b) { + return Data_Semiring.mul(dictDivisionRing.Ring0().Semiring0())(recip(dictDivisionRing)(b))(a); + }; + }; +}; + +var divisionringNumber = new DivisionRing(function () { + return Data_Ring.ringNumber; +}, function (x) { + return 1.0 / x; +}); +module.exports = { + DivisionRing: DivisionRing, + recip: recip, + leftDiv: leftDiv, + rightDiv: rightDiv, + divisionringNumber: divisionringNumber +}; +},{"../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF"}],"pJ2E":[function(require,module,exports) { +/* globals exports */ +"use strict"; + +exports.nan = NaN; +exports.isNaN = isNaN; +exports.infinity = Infinity; +exports.isFinite = isFinite; + +exports.readInt = function (radix) { + return function (n) { + return parseInt(n, radix); + }; +}; + +exports.readFloat = parseFloat; +},{}],"aQlK":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +module.exports = { + nan: $foreign.nan, + "isNaN": $foreign["isNaN"], + infinity: $foreign.infinity, + "isFinite": $foreign["isFinite"], + readInt: $foreign.readInt, + readFloat: $foreign.readFloat +}; +},{"./foreign.js":"pJ2E"}],"9/+z":[function(require,module,exports) { +"use strict"; // module Math + +exports.abs = Math.abs; +exports.acos = Math.acos; +exports.asin = Math.asin; +exports.atan = Math.atan; + +exports.atan2 = function (y) { + return function (x) { + return Math.atan2(y, x); + }; +}; + +exports.ceil = Math.ceil; +exports.cos = Math.cos; +exports.exp = Math.exp; +exports.floor = Math.floor; + +exports.trunc = Math.trunc || function (n) { + return n < 0 ? Math.ceil(n) : Math.floor(n); +}; + +exports.log = Math.log; + +exports.max = function (n1) { + return function (n2) { + return Math.max(n1, n2); + }; +}; + +exports.min = function (n1) { + return function (n2) { + return Math.min(n1, n2); + }; +}; + +exports.pow = function (n) { + return function (p) { + return Math.pow(n, p); + }; +}; + +exports.remainder = function (n) { + return function (m) { + return n % m; + }; +}; + +exports.round = Math.round; +exports.sin = Math.sin; +exports.sqrt = Math.sqrt; +exports.tan = Math.tan; +exports.e = Math.E; +exports.ln2 = Math.LN2; +exports.ln10 = Math.LN10; +exports.log2e = Math.LOG2E; +exports.log10e = Math.LOG10E; +exports.pi = Math.PI; +exports.tau = 2 * Math.PI; +exports.sqrt1_2 = Math.SQRT1_2; +exports.sqrt2 = Math.SQRT2; +},{}],"Rpaz":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +module.exports = { + abs: $foreign.abs, + acos: $foreign.acos, + asin: $foreign.asin, + atan: $foreign.atan, + atan2: $foreign.atan2, + ceil: $foreign.ceil, + cos: $foreign.cos, + exp: $foreign.exp, + floor: $foreign.floor, + log: $foreign.log, + max: $foreign.max, + min: $foreign.min, + pow: $foreign.pow, + round: $foreign.round, + sin: $foreign.sin, + sqrt: $foreign.sqrt, + tan: $foreign.tan, + trunc: $foreign.trunc, + remainder: $foreign.remainder, + e: $foreign.e, + ln2: $foreign.ln2, + ln10: $foreign.ln10, + log2e: $foreign.log2e, + log10e: $foreign.log10e, + pi: $foreign.pi, + tau: $foreign.tau, + sqrt1_2: $foreign.sqrt1_2, + sqrt2: $foreign.sqrt2 +}; +},{"./foreign.js":"9/+z"}],"xNJb":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_CommutativeRing = require("../Data.CommutativeRing/index.js"); + +var Data_DivisionRing = require("../Data.DivisionRing/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_EuclideanRing = require("../Data.EuclideanRing/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Global = require("../Global/index.js"); + +var $$Math = require("../Math/index.js"); + +var Radix = function Radix(x) { + return x; +}; + +var Even = function () { + function Even() {} + + ; + Even.value = new Even(); + return Even; +}(); + +var Odd = function () { + function Odd() {} + + ; + Odd.value = new Odd(); + return Odd; +}(); + +var showParity = new Data_Show.Show(function (v) { + if (v instanceof Even) { + return "Even"; + } + + ; + + if (v instanceof Odd) { + return "Odd"; + } + + ; + throw new Error("Failed pattern match at Data.Int (line 112, column 1 - line 114, column 19): " + [v.constructor.name]); +}); + +var radix = function radix(n) { + if (n >= 2 && n <= 36) { + return new Data_Maybe.Just(n); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.Int (line 193, column 1 - line 193, column 28): " + [n.constructor.name]); +}; + +var odd = function odd(x) { + return (x & 1) !== 0; +}; + +var octal = 8; +var hexadecimal = 16; +var fromStringAs = $foreign.fromStringAsImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value); +var fromString = fromStringAs(10); +var fromNumber = $foreign.fromNumberImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var unsafeClamp = function unsafeClamp(x) { + if (x === Global.infinity) { + return 0; + } + + ; + + if (x === -Global.infinity) { + return 0; + } + + ; + + if (x >= $foreign.toNumber(Data_Bounded.top(Data_Bounded.boundedInt))) { + return Data_Bounded.top(Data_Bounded.boundedInt); + } + + ; + + if (x <= $foreign.toNumber(Data_Bounded.bottom(Data_Bounded.boundedInt))) { + return Data_Bounded.bottom(Data_Bounded.boundedInt); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Maybe.fromMaybe(0)(fromNumber(x)); + } + + ; + throw new Error("Failed pattern match at Data.Int (line 66, column 1 - line 66, column 29): " + [x.constructor.name]); +}; + +var round = function round($23) { + return unsafeClamp($$Math.round($23)); +}; + +var floor = function floor($24) { + return unsafeClamp($$Math.floor($24)); +}; + +var even = function even(x) { + return (x & 1) === 0; +}; + +var parity = function parity(n) { + var $14 = even(n); + + if ($14) { + return Even.value; + } + + ; + return Odd.value; +}; + +var eqParity = new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof Even && y instanceof Even) { + return true; + } + + ; + + if (x instanceof Odd && y instanceof Odd) { + return true; + } + + ; + return false; + }; +}); +var ordParity = new Data_Ord.Ord(function () { + return eqParity; +}, function (x) { + return function (y) { + if (x instanceof Even && y instanceof Even) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof Even) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof Even) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof Odd && y instanceof Odd) { + return Data_Ordering.EQ.value; + } + + ; + throw new Error("Failed pattern match at Data.Int (line 110, column 1 - line 110, column 40): " + [x.constructor.name, y.constructor.name]); + }; +}); +var semiringParity = new Data_Semiring.Semiring(function (x) { + return function (y) { + var $19 = Data_Eq.eq(eqParity)(x)(y); + + if ($19) { + return Even.value; + } + + ; + return Odd.value; + }; +}, function (v) { + return function (v1) { + if (v instanceof Odd && v1 instanceof Odd) { + return Odd.value; + } + + ; + return Even.value; + }; +}, Odd.value, Even.value); +var ringParity = new Data_Ring.Ring(function () { + return semiringParity; +}, Data_Semiring.add(semiringParity)); +var divisionRingParity = new Data_DivisionRing.DivisionRing(function () { + return ringParity; +}, Control_Category.identity(Control_Category.categoryFn)); +var decimal = 10; +var commutativeRingParity = new Data_CommutativeRing.CommutativeRing(function () { + return ringParity; +}); +var euclideanRingParity = new Data_EuclideanRing.EuclideanRing(function () { + return commutativeRingParity; +}, function (v) { + if (v instanceof Even) { + return 0; + } + + ; + + if (v instanceof Odd) { + return 1; + } + + ; + throw new Error("Failed pattern match at Data.Int (line 132, column 1 - line 136, column 17): " + [v.constructor.name]); +}, function (x) { + return function (v) { + return x; + }; +}, function (v) { + return function (v1) { + return Even.value; + }; +}); + +var ceil = function ceil($25) { + return unsafeClamp($$Math.ceil($25)); +}; + +var boundedParity = new Data_Bounded.Bounded(function () { + return ordParity; +}, Even.value, Odd.value); +var binary = 2; +var base36 = 36; +module.exports = { + fromNumber: fromNumber, + ceil: ceil, + floor: floor, + round: round, + fromString: fromString, + radix: radix, + binary: binary, + octal: octal, + decimal: decimal, + hexadecimal: hexadecimal, + base36: base36, + fromStringAs: fromStringAs, + Even: Even, + Odd: Odd, + parity: parity, + even: even, + odd: odd, + eqParity: eqParity, + ordParity: ordParity, + showParity: showParity, + boundedParity: boundedParity, + semiringParity: semiringParity, + ringParity: ringParity, + commutativeRingParity: commutativeRingParity, + euclideanRingParity: euclideanRingParity, + divisionRingParity: divisionRingParity, + toNumber: $foreign.toNumber, + toStringAs: $foreign.toStringAs, + quot: $foreign.quot, + rem: $foreign.rem, + pow: $foreign.pow +}; +},{"./foreign.js":"2lBd","../Control.Category/index.js":"IAi2","../Data.Boolean/index.js":"ObQr","../Data.Bounded/index.js":"kcUU","../Data.CommutativeRing/index.js":"60TQ","../Data.DivisionRing/index.js":"xYq2","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Global/index.js":"aQlK","../Math/index.js":"Rpaz"}],"g11n":[function(require,module,exports) { +"use strict"; + +exports.fromCharArray = function (a) { + return a.join(""); +}; + +exports.toCharArray = function (s) { + return s.split(""); +}; + +exports.singleton = function (c) { + return c; +}; + +exports._charAt = function (just) { + return function (nothing) { + return function (i) { + return function (s) { + return i >= 0 && i < s.length ? just(s.charAt(i)) : nothing; + }; + }; + }; +}; + +exports._toChar = function (just) { + return function (nothing) { + return function (s) { + return s.length === 1 ? just(s) : nothing; + }; + }; +}; + +exports.length = function (s) { + return s.length; +}; + +exports.countPrefix = function (p) { + return function (s) { + var i = 0; + + while (i < s.length && p(s.charAt(i))) { + i++; + } + + return i; + }; +}; + +exports._indexOf = function (just) { + return function (nothing) { + return function (x) { + return function (s) { + var i = s.indexOf(x); + return i === -1 ? nothing : just(i); + }; + }; + }; +}; + +exports["_indexOf'"] = function (just) { + return function (nothing) { + return function (x) { + return function (startAt) { + return function (s) { + if (startAt < 0 || startAt > s.length) return nothing; + var i = s.indexOf(x, startAt); + return i === -1 ? nothing : just(i); + }; + }; + }; + }; +}; + +exports._lastIndexOf = function (just) { + return function (nothing) { + return function (x) { + return function (s) { + var i = s.lastIndexOf(x); + return i === -1 ? nothing : just(i); + }; + }; + }; +}; + +exports["_lastIndexOf'"] = function (just) { + return function (nothing) { + return function (x) { + return function (startAt) { + return function (s) { + if (startAt < 0 || startAt > s.length) return nothing; + var i = s.lastIndexOf(x, startAt); + return i === -1 ? nothing : just(i); + }; + }; + }; + }; +}; + +exports.take = function (n) { + return function (s) { + return s.substr(0, n); + }; +}; + +exports.drop = function (n) { + return function (s) { + return s.substring(n); + }; +}; + +exports._slice = function (b) { + return function (e) { + return function (s) { + return s.slice(b, e); + }; + }; +}; + +exports.splitAt = function (i) { + return function (s) { + return { + before: s.substring(0, i), + after: s.substring(i) + }; + }; +}; +},{}],"iZpG":[function(require,module,exports) { +"use strict"; + +exports.charAt = function (i) { + return function (s) { + if (i >= 0 && i < s.length) return s.charAt(i); + throw new Error("Data.String.Unsafe.charAt: Invalid index."); + }; +}; + +exports.char = function (s) { + if (s.length === 1) return s.charAt(0); + throw new Error("Data.String.Unsafe.char: Expected string of length 1."); +}; +},{}],"5UWM":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +module.exports = { + "char": $foreign["char"], + charAt: $foreign.charAt +}; +},{"./foreign.js":"iZpG"}],"6c6X":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_String_Unsafe = require("../Data.String.Unsafe/index.js"); + +var uncons = function uncons(v) { + if (v === "") { + return Data_Maybe.Nothing.value; + } + + ; + return new Data_Maybe.Just({ + head: Data_String_Unsafe.charAt(0)(v), + tail: $foreign.drop(1)(v) + }); +}; + +var toChar = $foreign["_toChar"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var takeWhile = function takeWhile(p) { + return function (s) { + return $foreign.take($foreign.countPrefix(p)(s))(s); + }; +}; + +var takeRight = function takeRight(i) { + return function (s) { + return $foreign.drop($foreign.length(s) - i | 0)(s); + }; +}; + +var slice = function slice(b) { + return function (e) { + return function (s) { + var l = $foreign.length(s); + + var norm = function norm(x) { + if (x < 0) { + return l + x | 0; + } + + ; + + if (Data_Boolean.otherwise) { + return x; + } + + ; + throw new Error("Failed pattern match at Data.String.CodeUnits (line 314, column 5 - line 315, column 27): " + [x.constructor.name]); + }; + + var e$prime = norm(e); + var b$prime = norm(b); + var $7 = b$prime < 0 || b$prime >= l || e$prime < 0 || e$prime > l || b$prime > e$prime; + + if ($7) { + return Data_Maybe.Nothing.value; + } + + ; + return new Data_Maybe.Just($foreign["_slice"](b)(e)(s)); + }; + }; +}; + +var lastIndexOf$prime = $foreign["_lastIndexOf'"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); +var lastIndexOf = $foreign["_lastIndexOf"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var stripSuffix = function stripSuffix(v) { + return function (str) { + var v1 = lastIndexOf(v)(str); + + if (v1 instanceof Data_Maybe.Just && v1.value0 === ($foreign.length(str) - $foreign.length(v) | 0)) { + return Data_Maybe.Just.create($foreign.take(v1.value0)(str)); + } + + ; + return Data_Maybe.Nothing.value; + }; +}; + +var indexOf$prime = $foreign["_indexOf'"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); +var indexOf = $foreign["_indexOf"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var stripPrefix = function stripPrefix(v) { + return function (str) { + var v1 = indexOf(v)(str); + + if (v1 instanceof Data_Maybe.Just && v1.value0 === 0) { + return Data_Maybe.Just.create($foreign.drop($foreign.length(v))(str)); + } + + ; + return Data_Maybe.Nothing.value; + }; +}; + +var dropWhile = function dropWhile(p) { + return function (s) { + return $foreign.drop($foreign.countPrefix(p)(s))(s); + }; +}; + +var dropRight = function dropRight(i) { + return function (s) { + return $foreign.take($foreign.length(s) - i | 0)(s); + }; +}; + +var contains = function contains(pat) { + var $16 = indexOf(pat); + return function ($17) { + return Data_Maybe.isJust($16($17)); + }; +}; + +var charAt = $foreign["_charAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); +module.exports = { + stripPrefix: stripPrefix, + stripSuffix: stripSuffix, + contains: contains, + charAt: charAt, + toChar: toChar, + uncons: uncons, + indexOf: indexOf, + "indexOf'": indexOf$prime, + lastIndexOf: lastIndexOf, + "lastIndexOf'": lastIndexOf$prime, + takeRight: takeRight, + takeWhile: takeWhile, + dropRight: dropRight, + dropWhile: dropWhile, + slice: slice, + singleton: $foreign.singleton, + fromCharArray: $foreign.fromCharArray, + toCharArray: $foreign.toCharArray, + length: $foreign.length, + countPrefix: $foreign.countPrefix, + take: $foreign.take, + drop: $foreign.drop, + splitAt: $foreign.splitAt +}; +},{"./foreign.js":"g11n","../Data.Boolean/index.js":"ObQr","../Data.Maybe/index.js":"5mN7","../Data.String.Unsafe/index.js":"5UWM"}],"B+B2":[function(require,module,exports) { +"use strict"; + +exports._localeCompare = function (lt) { + return function (eq) { + return function (gt) { + return function (s1) { + return function (s2) { + var result = s1.localeCompare(s2); + return result < 0 ? lt : result > 0 ? gt : eq; + }; + }; + }; + }; +}; + +exports.replace = function (s1) { + return function (s2) { + return function (s3) { + return s3.replace(s1, s2); + }; + }; +}; + +exports.replaceAll = function (s1) { + return function (s2) { + return function (s3) { + return s3.replace(new RegExp(s1.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), "g"), s2); // eslint-disable-line no-useless-escape + }; + }; +}; + +exports.split = function (sep) { + return function (s) { + return s.split(sep); + }; +}; + +exports.toLower = function (s) { + return s.toLowerCase(); +}; + +exports.toUpper = function (s) { + return s.toUpperCase(); +}; + +exports.trim = function (s) { + return s.trim(); +}; + +exports.joinWith = function (s) { + return function (xs) { + return xs.join(s); + }; +}; +},{}],"OSrc":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var $$null = function $$null(s) { + return s === ""; +}; + +var localeCompare = $foreign["_localeCompare"](Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value); +module.exports = { + "null": $$null, + localeCompare: localeCompare, + replace: $foreign.replace, + replaceAll: $foreign.replaceAll, + split: $foreign.split, + toLower: $foreign.toLower, + toUpper: $foreign.toUpper, + trim: $foreign.trim, + joinWith: $foreign.joinWith +}; +},{"./foreign.js":"B+B2","../Data.Ordering/index.js":"5Eun"}],"Ph6A":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Bind = require("../Control.Bind/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_String_CodeUnits = require("../Data.String.CodeUnits/index.js"); + +var Data_String_Common = require("../Data.String.Common/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var NonEmptyString = function NonEmptyString(x) { + return x; +}; + +var NonEmptyReplacement = function NonEmptyReplacement(x) { + return x; +}; + +var MakeNonEmpty = function MakeNonEmpty(nes) { + this.nes = nes; +}; + +var toUpper = function toUpper(v) { + return Data_String_Common.toUpper(v); +}; + +var toString = function toString(v) { + return v; +}; + +var toLower = function toLower(v) { + return Data_String_Common.toLower(v); +}; + +var showNonEmptyString = new Data_Show.Show(function (v) { + return "(NonEmptyString.unsafeFromString " + (Data_Show.show(Data_Show.showString)(v) + ")"); +}); +var showNonEmptyReplacement = new Data_Show.Show(function (v) { + return "(NonEmptyReplacement " + (Data_Show.show(showNonEmptyString)(v) + ")"); +}); +var semigroupNonEmptyString = Data_Semigroup.semigroupString; +var semigroupNonEmptyReplacement = semigroupNonEmptyString; + +var replaceAll = function replaceAll(pat) { + return function (v) { + return function (v1) { + return Data_String_Common.replaceAll(pat)(v)(v1); + }; + }; +}; + +var replace = function replace(pat) { + return function (v) { + return function (v1) { + return Data_String_Common.replace(pat)(v)(v1); + }; + }; +}; + +var prependString = function prependString(s1) { + return function (v) { + return s1 + v; + }; +}; + +var ordNonEmptyString = Data_Ord.ordString; +var ordNonEmptyReplacement = ordNonEmptyString; + +var nonEmptyNonEmpty = function nonEmptyNonEmpty(dictIsSymbol) { + return new MakeNonEmpty(function (p) { + return Data_Symbol.reflectSymbol(dictIsSymbol)(p); + }); +}; + +var nes = function nes(dict) { + return dict.nes; +}; + +var makeNonEmptyBad = function makeNonEmptyBad(dictFail) { + return new MakeNonEmpty(function (v) { + return ""; + }); +}; + +var localeCompare = function localeCompare(v) { + return function (v1) { + return Data_String_Common.localeCompare(v)(v1); + }; +}; + +var liftS = function liftS(f) { + return function (v) { + return f(v); + }; +}; + +var joinWith1 = function joinWith1(dictFoldable1) { + return function (v) { + var $46 = Data_Foldable.intercalate(dictFoldable1.Foldable0())(Data_Monoid.monoidString)(v); + return function ($47) { + return NonEmptyString($46($47)); + }; + }; +}; + +var joinWith = function joinWith(dictFoldable) { + return function (splice) { + var $48 = Data_Foldable.intercalate(dictFoldable)(Data_Monoid.monoidString)(splice); + return function ($49) { + return $48($49); + }; + }; +}; + +var join1With = function join1With(dictFoldable1) { + return function (splice) { + var $50 = joinWith(dictFoldable1.Foldable0())(splice); + return function ($51) { + return NonEmptyString($50($51)); + }; + }; +}; + +var fromString = function fromString(v) { + if (v === "") { + return Data_Maybe.Nothing.value; + } + + ; + return new Data_Maybe.Just(v); +}; + +var stripPrefix = function stripPrefix(pat) { + return Control_Bind.composeKleisliFlipped(Data_Maybe.bindMaybe)(fromString)(liftS(Data_String_CodeUnits.stripPrefix(pat))); +}; + +var stripSuffix = function stripSuffix(pat) { + return Control_Bind.composeKleisliFlipped(Data_Maybe.bindMaybe)(fromString)(liftS(Data_String_CodeUnits.stripSuffix(pat))); +}; + +var trim = function trim(v) { + return fromString(Data_String_Common.trim(v)); +}; + +var unsafeFromString = function unsafeFromString(dictPartial) { + var $52 = Data_Maybe.fromJust(dictPartial); + return function ($53) { + return $52(fromString($53)); + }; +}; + +var eqNonEmptyString = Data_Eq.eqString; +var eqNonEmptyReplacement = eqNonEmptyString; + +var contains = function contains($54) { + return liftS(Data_String_CodeUnits.contains($54)); +}; + +var appendString = function appendString(v) { + return function (s2) { + return v + s2; + }; +}; + +module.exports = { + nes: nes, + NonEmptyString: NonEmptyString, + MakeNonEmpty: MakeNonEmpty, + NonEmptyReplacement: NonEmptyReplacement, + fromString: fromString, + unsafeFromString: unsafeFromString, + toString: toString, + appendString: appendString, + prependString: prependString, + stripPrefix: stripPrefix, + stripSuffix: stripSuffix, + contains: contains, + localeCompare: localeCompare, + replace: replace, + replaceAll: replaceAll, + toLower: toLower, + toUpper: toUpper, + trim: trim, + joinWith: joinWith, + join1With: join1With, + joinWith1: joinWith1, + liftS: liftS, + eqNonEmptyString: eqNonEmptyString, + ordNonEmptyString: ordNonEmptyString, + semigroupNonEmptyString: semigroupNonEmptyString, + showNonEmptyString: showNonEmptyString, + makeNonEmptyBad: makeNonEmptyBad, + nonEmptyNonEmpty: nonEmptyNonEmpty, + eqNonEmptyReplacement: eqNonEmptyReplacement, + ordNonEmptyReplacement: ordNonEmptyReplacement, + semigroupNonEmptyReplacement: semigroupNonEmptyReplacement, + showNonEmptyReplacement: showNonEmptyReplacement +}; +},{"../Control.Bind/index.js":"7VcT","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.String.CodeUnits/index.js":"6c6X","../Data.String.Common/index.js":"OSrc","../Data.Symbol/index.js":"4oJQ"}],"Zx+T":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_CommutativeRing = require("../Data.CommutativeRing/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_EuclideanRing = require("../Data.EuclideanRing/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_String_NonEmpty_Internal = require("../Data.String.NonEmpty.Internal/index.js"); + +var toString = $foreign.toBase(10); + +var toBase$prime = function toBase$prime(i) { + return function (bi) { + return Data_Maybe.fromJust()(Data_String_NonEmpty_Internal.fromString($foreign.toBase(i)(bi))); + }; +}; + +var toNonEmptyString = toBase$prime(10); +var showBigInt = new Data_Show.Show(function (x) { + return "fromString \"" + (toString(x) + "\""); +}); +var semiringBigInt = new Data_Semiring.Semiring($foreign.biAdd, $foreign.biMul, $foreign.fromInt(1), $foreign.fromInt(0)); +var ringBigInt = new Data_Ring.Ring(function () { + return semiringBigInt; +}, $foreign.biSub); +var rem = $foreign.biMod; +var quot = $foreign.biDiv; +var fromNumber = $foreign["fromNumber'"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); +var fromBase = $foreign["fromBase'"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); +var fromString = fromBase(10); +var eqBigInt = new Data_Eq.Eq($foreign.biEquals); +var ordBigInt = new Data_Ord.Ord(function () { + return eqBigInt; +}, function (x) { + return function (y) { + var v = $foreign.biCompare(x)(y); + + if (v === 1) { + return Data_Ordering.GT.value; + } + + ; + + if (v === 0) { + return Data_Ordering.EQ.value; + } + + ; + return Data_Ordering.LT.value; + }; +}); +var commutativeRingBigInt = new Data_CommutativeRing.CommutativeRing(function () { + return ringBigInt; +}); +var euclideanRingBigInt = new Data_EuclideanRing.EuclideanRing(function () { + return commutativeRingBigInt; +}, function ($4) { + return Data_Int.floor($foreign.toNumber($foreign.abs($4))); +}, function (x) { + return function (y) { + return $foreign.biDiv(Data_Ring.sub(ringBigInt)(x)(Data_EuclideanRing.mod(euclideanRingBigInt)(x)(y)))(y); + }; +}, function (x) { + return function (y) { + var yy = $foreign.abs(y); + return $foreign.biMod(Data_Semiring.add(semiringBigInt)($foreign.biMod(x)(yy))(yy))(yy); + }; +}); +module.exports = { + fromString: fromString, + fromBase: fromBase, + fromNumber: fromNumber, + toString: toString, + toNonEmptyString: toNonEmptyString, + "toBase'": toBase$prime, + quot: quot, + rem: rem, + eqBigInt: eqBigInt, + ordBigInt: ordBigInt, + showBigInt: showBigInt, + semiringBigInt: semiringBigInt, + ringBigInt: ringBigInt, + commutativeRingBigInt: commutativeRingBigInt, + euclideanRingBigInt: euclideanRingBigInt, + fromInt: $foreign.fromInt, + toBase: $foreign.toBase, + digitsInBase: $foreign.digitsInBase, + abs: $foreign.abs, + even: $foreign.even, + odd: $foreign.odd, + prime: $foreign.prime, + pow: $foreign.pow, + not: $foreign.not, + or: $foreign.or, + xor: $foreign.xor, + and: $foreign.and, + shl: $foreign.shl, + shr: $foreign.shr, + toNumber: $foreign.toNumber +}; +},{"./foreign.js":"S0gh","../Data.CommutativeRing/index.js":"60TQ","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Int/index.js":"xNJb","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.String.NonEmpty.Internal/index.js":"Ph6A"}],"qF8i":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js"); + +var NonEmpty = function () { + function NonEmpty(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + NonEmpty.create = function (value0) { + return function (value1) { + return new NonEmpty(value0, value1); + }; + }; + + return NonEmpty; +}(); + +var unfoldable1NonEmpty = function unfoldable1NonEmpty(dictUnfoldable) { + return new Data_Unfoldable1.Unfoldable1(function (f) { + return function (b) { + return Data_Tuple.uncurry(NonEmpty.create)(Data_Functor.map(Data_Tuple.functorTuple)(Data_Unfoldable.unfoldr(dictUnfoldable)(Data_Functor.map(Data_Maybe.functorMaybe)(f)))(f(b))); + }; + }); +}; + +var tail = function tail(v) { + return v.value1; +}; + +var singleton = function singleton(dictPlus) { + return function (a) { + return new NonEmpty(a, Control_Plus.empty(dictPlus)); + }; +}; + +var showNonEmpty = function showNonEmpty(dictShow) { + return function (dictShow1) { + return new Data_Show.Show(function (v) { + return "(NonEmpty " + (Data_Show.show(dictShow)(v.value0) + (" " + (Data_Show.show(dictShow1)(v.value1) + ")"))); + }); + }; +}; + +var oneOf = function oneOf(dictAlternative) { + return function (v) { + return Control_Alt.alt(dictAlternative.Plus1().Alt0())(Control_Applicative.pure(dictAlternative.Applicative0())(v.value0))(v.value1); + }; +}; + +var head = function head(v) { + return v.value0; +}; + +var functorNonEmpty = function functorNonEmpty(dictFunctor) { + return new Data_Functor.Functor(function (f) { + return function (m) { + return new NonEmpty(f(m.value0), Data_Functor.map(dictFunctor)(f)(m.value1)); + }; + }); +}; + +var functorWithIndex = function functorWithIndex(dictFunctorWithIndex) { + return new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorNonEmpty(dictFunctorWithIndex.Functor0()); + }, function (f) { + return function (v) { + return new NonEmpty(f(Data_Maybe.Nothing.value)(v.value0), Data_FunctorWithIndex.mapWithIndex(dictFunctorWithIndex)(function ($146) { + return f(Data_Maybe.Just.create($146)); + })(v.value1)); + }; + }); +}; + +var fromNonEmpty = function fromNonEmpty(f) { + return function (v) { + return f(v.value0)(v.value1); + }; +}; + +var foldl1 = function foldl1(dictFoldable) { + return function (f) { + return function (v) { + return Data_Foldable.foldl(dictFoldable)(f)(v.value0)(v.value1); + }; + }; +}; + +var foldableNonEmpty = function foldableNonEmpty(dictFoldable) { + return new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(f(v.value0))(Data_Foldable.foldMap(dictFoldable)(dictMonoid)(f)(v.value1)); + }; + }; + }, function (f) { + return function (b) { + return function (v) { + return Data_Foldable.foldl(dictFoldable)(f)(f(b)(v.value0))(v.value1); + }; + }; + }, function (f) { + return function (b) { + return function (v) { + return f(v.value0)(Data_Foldable.foldr(dictFoldable)(f)(b)(v.value1)); + }; + }; + }); +}; + +var foldableWithIndexNonEmpty = function foldableWithIndexNonEmpty(dictFoldableWithIndex) { + return new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableNonEmpty(dictFoldableWithIndex.Foldable0()); + }, function (dictMonoid) { + return function (f) { + return function (v) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(f(Data_Maybe.Nothing.value)(v.value0))(Data_FoldableWithIndex.foldMapWithIndex(dictFoldableWithIndex)(dictMonoid)(function ($147) { + return f(Data_Maybe.Just.create($147)); + })(v.value1)); + }; + }; + }, function (f) { + return function (b) { + return function (v) { + return Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex)(function ($148) { + return f(Data_Maybe.Just.create($148)); + })(f(Data_Maybe.Nothing.value)(b)(v.value0))(v.value1); + }; + }; + }, function (f) { + return function (b) { + return function (v) { + return f(Data_Maybe.Nothing.value)(v.value0)(Data_FoldableWithIndex.foldrWithIndex(dictFoldableWithIndex)(function ($149) { + return f(Data_Maybe.Just.create($149)); + })(b)(v.value1)); + }; + }; + }); +}; + +var traversableNonEmpty = function traversableNonEmpty(dictTraversable) { + return new Data_Traversable.Traversable(function () { + return foldableNonEmpty(dictTraversable.Foldable1()); + }, function () { + return functorNonEmpty(dictTraversable.Functor0()); + }, function (dictApplicative) { + return function (v) { + return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmpty.create)(v.value0))(Data_Traversable.sequence(dictTraversable)(dictApplicative)(v.value1)); + }; + }, function (dictApplicative) { + return function (f) { + return function (v) { + return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmpty.create)(f(v.value0)))(Data_Traversable.traverse(dictTraversable)(dictApplicative)(f)(v.value1)); + }; + }; + }); +}; + +var traversableWithIndexNonEmpty = function traversableWithIndexNonEmpty(dictTraversableWithIndex) { + return new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexNonEmpty(dictTraversableWithIndex.FoldableWithIndex1()); + }, function () { + return functorWithIndex(dictTraversableWithIndex.FunctorWithIndex0()); + }, function () { + return traversableNonEmpty(dictTraversableWithIndex.Traversable2()); + }, function (dictApplicative) { + return function (f) { + return function (v) { + return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmpty.create)(f(Data_Maybe.Nothing.value)(v.value0)))(Data_TraversableWithIndex.traverseWithIndex(dictTraversableWithIndex)(dictApplicative)(function ($150) { + return f(Data_Maybe.Just.create($150)); + })(v.value1)); + }; + }; + }); +}; + +var foldable1NonEmpty = function foldable1NonEmpty(dictFoldable) { + return new Data_Semigroup_Foldable.Foldable1(function () { + return foldableNonEmpty(dictFoldable); + }, function (dictSemigroup) { + return Data_Semigroup_Foldable.foldMap1(foldable1NonEmpty(dictFoldable))(dictSemigroup)(Control_Category.identity(Control_Category.categoryFn)); + }, function (dictSemigroup) { + return function (f) { + return function (v) { + return Data_Foldable.foldl(dictFoldable)(function (s) { + return function (a1) { + return Data_Semigroup.append(dictSemigroup)(s)(f(a1)); + }; + })(f(v.value0))(v.value1); + }; + }; + }); +}; + +var eqNonEmpty = function eqNonEmpty(dictEq1) { + return function (dictEq) { + return new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq1(dictEq1)(dictEq)(x.value1)(y.value1); + }; + }); + }; +}; + +var ordNonEmpty = function ordNonEmpty(dictOrd1) { + return function (dictOrd) { + return new Data_Ord.Ord(function () { + return eqNonEmpty(dictOrd1.Eq10())(dictOrd.Eq0()); + }, function (x) { + return function (y) { + var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0); + + if (v instanceof Data_Ordering.LT) { + return Data_Ordering.LT.value; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Data_Ordering.GT.value; + } + + ; + return Data_Ord.compare1(dictOrd1)(dictOrd)(x.value1)(y.value1); + }; + }); + }; +}; + +var eq1NonEmpty = function eq1NonEmpty(dictEq1) { + return new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqNonEmpty(dictEq1)(dictEq)); + }); +}; + +var ord1NonEmpty = function ord1NonEmpty(dictOrd1) { + return new Data_Ord.Ord1(function () { + return eq1NonEmpty(dictOrd1.Eq10()); + }, function (dictOrd) { + return Data_Ord.compare(ordNonEmpty(dictOrd1)(dictOrd)); + }); +}; + +module.exports = { + NonEmpty: NonEmpty, + singleton: singleton, + foldl1: foldl1, + fromNonEmpty: fromNonEmpty, + oneOf: oneOf, + head: head, + tail: tail, + showNonEmpty: showNonEmpty, + eqNonEmpty: eqNonEmpty, + eq1NonEmpty: eq1NonEmpty, + ordNonEmpty: ordNonEmpty, + ord1NonEmpty: ord1NonEmpty, + functorNonEmpty: functorNonEmpty, + functorWithIndex: functorWithIndex, + foldableNonEmpty: foldableNonEmpty, + foldableWithIndexNonEmpty: foldableWithIndexNonEmpty, + traversableNonEmpty: traversableNonEmpty, + traversableWithIndexNonEmpty: traversableWithIndexNonEmpty, + foldable1NonEmpty: foldable1NonEmpty, + unfoldable1NonEmpty: unfoldable1NonEmpty +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Control.Plus/index.js":"oMBg","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unfoldable1/index.js":"S0Nl"}],"Xxuc":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Comonad = require("../Control.Comonad/index.js"); + +var Control_Extend = require("../Control.Extend/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_MonadPlus = require("../Control.MonadPlus/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_NonEmpty = require("../Data.NonEmpty/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js"); + +var Nil = function () { + function Nil() {} + + ; + Nil.value = new Nil(); + return Nil; +}(); + +var Cons = function () { + function Cons(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Cons.create = function (value0) { + return function (value1) { + return new Cons(value0, value1); + }; + }; + + return Cons; +}(); + +var NonEmptyList = function NonEmptyList(x) { + return x; +}; + +var toList = function toList(v) { + return new Cons(v.value0, v.value1); +}; + +var newtypeNonEmptyList = new Data_Newtype.Newtype(function (n) { + return n; +}, NonEmptyList); + +var nelCons = function nelCons(a) { + return function (v) { + return new Data_NonEmpty.NonEmpty(a, new Cons(v.value0, v.value1)); + }; +}; + +var listMap = function listMap(f) { + var chunkedRevMap = function chunkedRevMap($copy_chunksAcc) { + return function ($copy_v) { + var $tco_var_chunksAcc = $copy_chunksAcc; + var $tco_done = false; + var $tco_result; + + function $tco_loop(chunksAcc, v) { + if (v instanceof Cons && v.value1 instanceof Cons && v.value1.value1 instanceof Cons) { + $tco_var_chunksAcc = new Cons(v, chunksAcc); + $copy_v = v.value1.value1.value1; + return; + } + + ; + + var unrolledMap = function unrolledMap(v1) { + if (v1 instanceof Cons && v1.value1 instanceof Cons && v1.value1.value1 instanceof Nil) { + return new Cons(f(v1.value0), new Cons(f(v1.value1.value0), Nil.value)); + } + + ; + + if (v1 instanceof Cons && v1.value1 instanceof Nil) { + return new Cons(f(v1.value0), Nil.value); + } + + ; + return Nil.value; + }; + + var reverseUnrolledMap = function reverseUnrolledMap($copy_v1) { + return function ($copy_acc) { + var $tco_var_v1 = $copy_v1; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v1, acc) { + if (v1 instanceof Cons && v1.value0 instanceof Cons && v1.value0.value1 instanceof Cons && v1.value0.value1.value1 instanceof Cons) { + $tco_var_v1 = v1.value1; + $copy_acc = new Cons(f(v1.value0.value0), new Cons(f(v1.value0.value1.value0), new Cons(f(v1.value0.value1.value1.value0), acc))); + return; + } + + ; + $tco_done = true; + return acc; + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v1, $copy_acc); + } + + ; + return $tco_result; + }; + }; + + $tco_done = true; + return reverseUnrolledMap(chunksAcc)(unrolledMap(v)); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_chunksAcc, $copy_v); + } + + ; + return $tco_result; + }; + }; + + return chunkedRevMap(Nil.value); +}; + +var functorList = new Data_Functor.Functor(listMap); +var functorNonEmptyList = Data_NonEmpty.functorNonEmpty(functorList); +var foldableList = new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return Data_Foldable.foldl(foldableList)(function (acc) { + var $202 = Data_Semigroup.append(dictMonoid.Semigroup0())(acc); + return function ($203) { + return $202(f($203)); + }; + })(Data_Monoid.mempty(dictMonoid)); + }; +}, function (f) { + var go = function go($copy_b) { + return function ($copy_v) { + var $tco_var_b = $copy_b; + var $tco_done = false; + var $tco_result; + + function $tco_loop(b, v) { + if (v instanceof Nil) { + $tco_done = true; + return b; + } + + ; + + if (v instanceof Cons) { + $tco_var_b = f(b)(v.value0); + $copy_v = v.value1; + return; + } + + ; + throw new Error("Failed pattern match at Data.List.Types (line 109, column 12 - line 111, column 30): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_b, $copy_v); + } + + ; + return $tco_result; + }; + }; + + return go; +}, function (f) { + return function (b) { + var rev = Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value); + var $204 = Data_Foldable.foldl(foldableList)(Data_Function.flip(f))(b); + return function ($205) { + return $204(rev($205)); + }; + }; +}); +var foldableNonEmptyList = Data_NonEmpty.foldableNonEmpty(foldableList); +var foldableWithIndexList = new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableList; +}, function (dictMonoid) { + return function (f) { + return Data_FoldableWithIndex.foldlWithIndex(foldableWithIndexList)(function (i) { + return function (acc) { + var $206 = Data_Semigroup.append(dictMonoid.Semigroup0())(acc); + var $207 = f(i); + return function ($208) { + return $206($207($208)); + }; + }; + })(Data_Monoid.mempty(dictMonoid)); + }; +}, function (f) { + return function (acc) { + var $209 = Data_Foldable.foldl(foldableList)(function (v) { + return function (a) { + return new Data_Tuple.Tuple(v.value0 + 1 | 0, f(v.value0)(v.value1)(a)); + }; + })(new Data_Tuple.Tuple(0, acc)); + return function ($210) { + return Data_Tuple.snd($209($210)); + }; + }; +}, function (f) { + return function (b) { + return function (xs) { + var v = function () { + var rev = Data_Foldable.foldl(foldableList)(function (v1) { + return function (a) { + return new Data_Tuple.Tuple(v1.value0 + 1 | 0, new Cons(a, v1.value1)); + }; + }); + return rev(new Data_Tuple.Tuple(0, Nil.value))(xs); + }(); + + return Data_Tuple.snd(Data_Foldable.foldl(foldableList)(function (v1) { + return function (a) { + return new Data_Tuple.Tuple(v1.value0 - 1 | 0, f(v1.value0 - 1 | 0)(a)(v1.value1)); + }; + })(new Data_Tuple.Tuple(v.value0, b))(v.value1)); + }; + }; +}); +var foldableWithIndexNonEmptyList = new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableNonEmptyList; +}, function (dictMonoid) { + return function (f) { + return function (v) { + return Data_FoldableWithIndex.foldMapWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(dictMonoid)(function () { + var $211 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1)); + return function ($212) { + return f($211($212)); + }; + }())(v); + }; + }; +}, function (f) { + return function (b) { + return function (v) { + return Data_FoldableWithIndex.foldlWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () { + var $213 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1)); + return function ($214) { + return f($213($214)); + }; + }())(b)(v); + }; + }; +}, function (f) { + return function (b) { + return function (v) { + return Data_FoldableWithIndex.foldrWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () { + var $215 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1)); + return function ($216) { + return f($215($216)); + }; + }())(b)(v); + }; + }; +}); +var functorWithIndexList = new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorList; +}, function (f) { + return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexList)(function (i) { + return function (x) { + return function (acc) { + return new Cons(f(i)(x), acc); + }; + }; + })(Nil.value); +}); +var functorWithIndexNonEmptyList = new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorNonEmptyList; +}, function (fn) { + return function (v) { + return NonEmptyList(Data_FunctorWithIndex.mapWithIndex(Data_NonEmpty.functorWithIndex(functorWithIndexList))(function () { + var $217 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1)); + return function ($218) { + return fn($217($218)); + }; + }())(v)); + }; +}); +var semigroupList = new Data_Semigroup.Semigroup(function (xs) { + return function (ys) { + return Data_Foldable.foldr(foldableList)(Cons.create)(ys)(xs); + }; +}); +var monoidList = new Data_Monoid.Monoid(function () { + return semigroupList; +}, Nil.value); +var semigroupNonEmptyList = new Data_Semigroup.Semigroup(function (v) { + return function (as$prime) { + return new Data_NonEmpty.NonEmpty(v.value0, Data_Semigroup.append(semigroupList)(v.value1)(toList(as$prime))); + }; +}); + +var showList = function showList(dictShow) { + return new Data_Show.Show(function (v) { + if (v instanceof Nil) { + return "Nil"; + } + + ; + return "(" + (Data_Foldable.intercalate(foldableList)(Data_Monoid.monoidString)(" : ")(Data_Functor.map(functorList)(Data_Show.show(dictShow))(v)) + " : Nil)"); + }); +}; + +var showNonEmptyList = function showNonEmptyList(dictShow) { + return new Data_Show.Show(function (v) { + return "(NonEmptyList " + (Data_Show.show(Data_NonEmpty.showNonEmpty(dictShow)(showList(dictShow)))(v) + ")"); + }); +}; + +var traversableList = new Data_Traversable.Traversable(function () { + return foldableList; +}, function () { + return functorList; +}, function (dictApplicative) { + return Data_Traversable.traverse(traversableList)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn)); +}, function (dictApplicative) { + return function (f) { + var $219 = Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value)); + var $220 = Data_Foldable.foldl(foldableList)(function (acc) { + var $222 = Control_Apply.lift2(dictApplicative.Apply0())(Data_Function.flip(Cons.create))(acc); + return function ($223) { + return $222(f($223)); + }; + })(Control_Applicative.pure(dictApplicative)(Nil.value)); + return function ($221) { + return $219($220($221)); + }; + }; +}); +var traversableNonEmptyList = Data_NonEmpty.traversableNonEmpty(traversableList); +var traversableWithIndexList = new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexList; +}, function () { + return functorWithIndexList; +}, function () { + return traversableList; +}, function (dictApplicative) { + return function (f) { + var rev = Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value); + var $224 = Data_Functor.map(dictApplicative.Apply0().Functor0())(rev); + var $225 = Data_FoldableWithIndex.foldlWithIndex(foldableWithIndexList)(function (i) { + return function (acc) { + var $227 = Control_Apply.lift2(dictApplicative.Apply0())(Data_Function.flip(Cons.create))(acc); + var $228 = f(i); + return function ($229) { + return $227($228($229)); + }; + }; + })(Control_Applicative.pure(dictApplicative)(Nil.value)); + return function ($226) { + return $224($225($226)); + }; + }; +}); +var traversableWithIndexNonEmptyList = new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexNonEmptyList; +}, function () { + return functorWithIndexNonEmptyList; +}, function () { + return traversableNonEmptyList; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmptyList)(Data_TraversableWithIndex.traverseWithIndex(Data_NonEmpty.traversableWithIndexNonEmpty(traversableWithIndexList))(dictApplicative)(function () { + var $230 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1)); + return function ($231) { + return f($230($231)); + }; + }())(v)); + }; + }; +}); +var unfoldable1List = new Data_Unfoldable1.Unfoldable1(function (f) { + return function (b) { + var go = function go($copy_source) { + return function ($copy_memo) { + var $tco_var_source = $copy_source; + var $tco_done = false; + var $tco_result; + + function $tco_loop(source, memo) { + var v = f(source); + + if (v.value1 instanceof Data_Maybe.Just) { + $tco_var_source = v.value1.value0; + $copy_memo = new Cons(v.value0, memo); + return; + } + + ; + + if (v.value1 instanceof Data_Maybe.Nothing) { + $tco_done = true; + return Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value)(new Cons(v.value0, memo)); + } + + ; + throw new Error("Failed pattern match at Data.List.Types (line 133, column 22 - line 135, column 61): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_source, $copy_memo); + } + + ; + return $tco_result; + }; + }; + + return go(b)(Nil.value); + }; +}); +var unfoldableList = new Data_Unfoldable.Unfoldable(function () { + return unfoldable1List; +}, function (f) { + return function (b) { + var go = function go($copy_source) { + return function ($copy_memo) { + var $tco_var_source = $copy_source; + var $tco_done = false; + var $tco_result; + + function $tco_loop(source, memo) { + var v = f(source); + + if (v instanceof Data_Maybe.Nothing) { + $tco_done = true; + return Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value)(memo); + } + + ; + + if (v instanceof Data_Maybe.Just) { + $tco_var_source = v.value0.value1; + $copy_memo = new Cons(v.value0.value0, memo); + return; + } + + ; + throw new Error("Failed pattern match at Data.List.Types (line 140, column 22 - line 142, column 52): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_source, $copy_memo); + } + + ; + return $tco_result; + }; + }; + + return go(b)(Nil.value); + }; +}); +var unfoldable1NonEmptyList = Data_NonEmpty.unfoldable1NonEmpty(unfoldableList); +var foldable1NonEmptyList = Data_NonEmpty.foldable1NonEmpty(foldableList); +var extendNonEmptyList = new Control_Extend.Extend(function () { + return functorNonEmptyList; +}, function (f) { + return function (v) { + var go = function go(a) { + return function (v1) { + return { + val: new Cons(f(new Data_NonEmpty.NonEmpty(a, v1.acc)), v1.val), + acc: new Cons(a, v1.acc) + }; + }; + }; + + return new Data_NonEmpty.NonEmpty(f(v), Data_Foldable.foldr(foldableList)(go)({ + val: Nil.value, + acc: Nil.value + })(v.value1).val); + }; +}); +var extendList = new Control_Extend.Extend(function () { + return functorList; +}, function (f) { + return function (v) { + if (v instanceof Nil) { + return Nil.value; + } + + ; + + if (v instanceof Cons) { + var go = function go(a$prime) { + return function (v1) { + var acc$prime = new Cons(a$prime, v1.acc); + return { + val: new Cons(f(acc$prime), v1.val), + acc: acc$prime + }; + }; + }; + + return new Cons(f(v), Data_Foldable.foldr(foldableList)(go)({ + val: Nil.value, + acc: Nil.value + })(v.value1).val); + } + + ; + throw new Error("Failed pattern match at Data.List.Types (line 180, column 1 - line 187, column 42): " + [f.constructor.name, v.constructor.name]); + }; +}); +var eq1List = new Data_Eq.Eq1(function (dictEq) { + return function (xs) { + return function (ys) { + var go = function go($copy_v) { + return function ($copy_v1) { + return function ($copy_v2) { + var $tco_var_v = $copy_v; + var $tco_var_v1 = $copy_v1; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1, v2) { + if (!v2) { + $tco_done = true; + return false; + } + + ; + + if (v instanceof Nil && v1 instanceof Nil) { + $tco_done = true; + return v2; + } + + ; + + if (v instanceof Cons && v1 instanceof Cons) { + $tco_var_v = v.value1; + $tco_var_v1 = v1.value1; + $copy_v2 = v2 && Data_Eq.eq(dictEq)(v1.value0)(v.value0); + return; + } + + ; + $tco_done = true; + return false; + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $tco_var_v1, $copy_v2); + } + + ; + return $tco_result; + }; + }; + }; + + return go(xs)(ys)(true); + }; + }; +}); + +var eqList = function eqList(dictEq) { + return new Data_Eq.Eq(Data_Eq.eq1(eq1List)(dictEq)); +}; + +var eqNonEmptyList = function eqNonEmptyList(dictEq) { + return Data_NonEmpty.eqNonEmpty(eq1List)(dictEq); +}; + +var ord1List = new Data_Ord.Ord1(function () { + return eq1List; +}, function (dictOrd) { + return function (xs) { + return function (ys) { + var go = function go($copy_v) { + return function ($copy_v1) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1) { + if (v instanceof Nil && v1 instanceof Nil) { + $tco_done = true; + return Data_Ordering.EQ.value; + } + + ; + + if (v instanceof Nil) { + $tco_done = true; + return Data_Ordering.LT.value; + } + + ; + + if (v1 instanceof Nil) { + $tco_done = true; + return Data_Ordering.GT.value; + } + + ; + + if (v instanceof Cons && v1 instanceof Cons) { + var v2 = Data_Ord.compare(dictOrd)(v.value0)(v1.value0); + + if (v2 instanceof Data_Ordering.EQ) { + $tco_var_v = v.value1; + $copy_v1 = v1.value1; + return; + } + + ; + $tco_done = true; + return v2; + } + + ; + throw new Error("Failed pattern match at Data.List.Types (line 61, column 5 - line 61, column 20): " + [v.constructor.name, v1.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; + }; + + return go(xs)(ys); + }; + }; +}); + +var ordList = function ordList(dictOrd) { + return new Data_Ord.Ord(function () { + return eqList(dictOrd.Eq0()); + }, Data_Ord.compare1(ord1List)(dictOrd)); +}; + +var ordNonEmptyList = function ordNonEmptyList(dictOrd) { + return Data_NonEmpty.ordNonEmpty(ord1List)(dictOrd); +}; + +var comonadNonEmptyList = new Control_Comonad.Comonad(function () { + return extendNonEmptyList; +}, function (v) { + return v.value0; +}); +var applyList = new Control_Apply.Apply(function () { + return functorList; +}, function (v) { + return function (v1) { + if (v instanceof Nil) { + return Nil.value; + } + + ; + + if (v instanceof Cons) { + return Data_Semigroup.append(semigroupList)(Data_Functor.map(functorList)(v.value0)(v1))(Control_Apply.apply(applyList)(v.value1)(v1)); + } + + ; + throw new Error("Failed pattern match at Data.List.Types (line 155, column 1 - line 157, column 48): " + [v.constructor.name, v1.constructor.name]); + }; +}); +var applyNonEmptyList = new Control_Apply.Apply(function () { + return functorNonEmptyList; +}, function (v) { + return function (v1) { + return new Data_NonEmpty.NonEmpty(v.value0(v1.value0), Data_Semigroup.append(semigroupList)(Control_Apply.apply(applyList)(v.value1)(new Cons(v1.value0, Nil.value)))(Control_Apply.apply(applyList)(new Cons(v.value0, v.value1))(v1.value1))); + }; +}); +var bindList = new Control_Bind.Bind(function () { + return applyList; +}, function (v) { + return function (v1) { + if (v instanceof Nil) { + return Nil.value; + } + + ; + + if (v instanceof Cons) { + return Data_Semigroup.append(semigroupList)(v1(v.value0))(Control_Bind.bind(bindList)(v.value1)(v1)); + } + + ; + throw new Error("Failed pattern match at Data.List.Types (line 162, column 1 - line 164, column 37): " + [v.constructor.name, v1.constructor.name]); + }; +}); +var bindNonEmptyList = new Control_Bind.Bind(function () { + return applyNonEmptyList; +}, function (v) { + return function (f) { + var v1 = f(v.value0); + return new Data_NonEmpty.NonEmpty(v1.value0, Data_Semigroup.append(semigroupList)(v1.value1)(Control_Bind.bind(bindList)(v.value1)(function ($232) { + return toList(f($232)); + }))); + }; +}); +var applicativeList = new Control_Applicative.Applicative(function () { + return applyList; +}, function (a) { + return new Cons(a, Nil.value); +}); +var monadList = new Control_Monad.Monad(function () { + return applicativeList; +}, function () { + return bindList; +}); +var altNonEmptyList = new Control_Alt.Alt(function () { + return functorNonEmptyList; +}, Data_Semigroup.append(semigroupNonEmptyList)); +var altList = new Control_Alt.Alt(function () { + return functorList; +}, Data_Semigroup.append(semigroupList)); +var plusList = new Control_Plus.Plus(function () { + return altList; +}, Nil.value); +var alternativeList = new Control_Alternative.Alternative(function () { + return applicativeList; +}, function () { + return plusList; +}); +var monadZeroList = new Control_MonadZero.MonadZero(function () { + return alternativeList; +}, function () { + return monadList; +}); +var monadPlusList = new Control_MonadPlus.MonadPlus(function () { + return monadZeroList; +}); +var applicativeNonEmptyList = new Control_Applicative.Applicative(function () { + return applyNonEmptyList; +}, function () { + var $233 = Data_NonEmpty.singleton(plusList); + return function ($234) { + return NonEmptyList($233($234)); + }; +}()); +var monadNonEmptyList = new Control_Monad.Monad(function () { + return applicativeNonEmptyList; +}, function () { + return bindNonEmptyList; +}); +var traversable1NonEmptyList = new Data_Semigroup_Traversable.Traversable1(function () { + return foldable1NonEmptyList; +}, function () { + return traversableNonEmptyList; +}, function (dictApply) { + return Data_Semigroup_Traversable.traverse1(traversable1NonEmptyList)(dictApply)(Control_Category.identity(Control_Category.categoryFn)); +}, function (dictApply) { + return function (f) { + return function (v) { + return Data_Functor.mapFlipped(dictApply.Functor0())(Data_Foldable.foldl(foldableList)(function (acc) { + var $235 = Control_Apply.lift2(dictApply)(Data_Function.flip(nelCons))(acc); + return function ($236) { + return $235(f($236)); + }; + })(Data_Functor.map(dictApply.Functor0())(Control_Applicative.pure(applicativeNonEmptyList))(f(v.value0)))(v.value1))(function (v1) { + return Data_Foldable.foldl(foldableList)(Data_Function.flip(nelCons))(Control_Applicative.pure(applicativeNonEmptyList)(v1.value0))(v1.value1); + }); + }; + }; +}); +module.exports = { + Nil: Nil, + Cons: Cons, + NonEmptyList: NonEmptyList, + toList: toList, + nelCons: nelCons, + showList: showList, + eqList: eqList, + eq1List: eq1List, + ordList: ordList, + ord1List: ord1List, + semigroupList: semigroupList, + monoidList: monoidList, + functorList: functorList, + functorWithIndexList: functorWithIndexList, + foldableList: foldableList, + foldableWithIndexList: foldableWithIndexList, + unfoldable1List: unfoldable1List, + unfoldableList: unfoldableList, + traversableList: traversableList, + traversableWithIndexList: traversableWithIndexList, + applyList: applyList, + applicativeList: applicativeList, + bindList: bindList, + monadList: monadList, + altList: altList, + plusList: plusList, + alternativeList: alternativeList, + monadZeroList: monadZeroList, + monadPlusList: monadPlusList, + extendList: extendList, + newtypeNonEmptyList: newtypeNonEmptyList, + eqNonEmptyList: eqNonEmptyList, + ordNonEmptyList: ordNonEmptyList, + showNonEmptyList: showNonEmptyList, + functorNonEmptyList: functorNonEmptyList, + applyNonEmptyList: applyNonEmptyList, + applicativeNonEmptyList: applicativeNonEmptyList, + bindNonEmptyList: bindNonEmptyList, + monadNonEmptyList: monadNonEmptyList, + altNonEmptyList: altNonEmptyList, + extendNonEmptyList: extendNonEmptyList, + comonadNonEmptyList: comonadNonEmptyList, + semigroupNonEmptyList: semigroupNonEmptyList, + foldableNonEmptyList: foldableNonEmptyList, + traversableNonEmptyList: traversableNonEmptyList, + foldable1NonEmptyList: foldable1NonEmptyList, + unfoldable1NonEmptyList: unfoldable1NonEmptyList, + functorWithIndexNonEmptyList: functorWithIndexNonEmptyList, + foldableWithIndexNonEmptyList: foldableWithIndexNonEmptyList, + traversableWithIndexNonEmptyList: traversableWithIndexNonEmptyList, + traversable1NonEmptyList: traversable1NonEmptyList +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Comonad/index.js":"U0zO","../Control.Extend/index.js":"JIoJ","../Control.Monad/index.js":"U/Ix","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unfoldable1/index.js":"S0Nl"}],"ezw6":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Lazy = require("../Control.Lazy/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_NonEmpty = require("../Data.NonEmpty/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Pattern = function Pattern(x) { + return x; +}; + +var updateAt = function updateAt(v) { + return function (v1) { + return function (v2) { + if (v === 0 && v2 instanceof Data_List_Types.Cons) { + return new Data_Maybe.Just(new Data_List_Types.Cons(v1, v2.value1)); + } + + ; + + if (v2 instanceof Data_List_Types.Cons) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v3) { + return new Data_List_Types.Cons(v2.value0, v3); + })(updateAt(v - 1 | 0)(v1)(v2.value1)); + } + + ; + return Data_Maybe.Nothing.value; + }; + }; +}; + +var unzip = Data_Foldable.foldr(Data_List_Types.foldableList)(function (v) { + return function (v1) { + return new Data_Tuple.Tuple(new Data_List_Types.Cons(v.value0, v1.value0), new Data_List_Types.Cons(v.value1, v1.value1)); + }; +})(new Data_Tuple.Tuple(Data_List_Types.Nil.value, Data_List_Types.Nil.value)); + +var uncons = function uncons(v) { + if (v instanceof Data_List_Types.Nil) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Data_List_Types.Cons) { + return new Data_Maybe.Just({ + head: v.value0, + tail: v.value1 + }); + } + + ; + throw new Error("Failed pattern match at Data.List (line 259, column 1 - line 259, column 66): " + [v.constructor.name]); +}; + +var toUnfoldable = function toUnfoldable(dictUnfoldable) { + return Data_Unfoldable.unfoldr(dictUnfoldable)(function (xs) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (rec) { + return new Data_Tuple.Tuple(rec.head, rec.tail); + })(uncons(xs)); + }); +}; + +var tail = function tail(v) { + if (v instanceof Data_List_Types.Nil) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Data_List_Types.Cons) { + return new Data_Maybe.Just(v.value1); + } + + ; + throw new Error("Failed pattern match at Data.List (line 245, column 1 - line 245, column 43): " + [v.constructor.name]); +}; + +var stripPrefix = function stripPrefix(dictEq) { + return function (v) { + return function (s) { + var go = function go(prefix) { + return function (input) { + if (prefix instanceof Data_List_Types.Cons && input instanceof Data_List_Types.Cons && Data_Eq.eq(dictEq)(prefix.value0)(input.value0)) { + return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Loop({ + a: prefix.value1, + b: input.value1 + })); + } + + ; + + if (prefix instanceof Data_List_Types.Nil) { + return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Done(input)); + } + + ; + return Data_Maybe.Nothing.value; + }; + }; + + return Control_Monad_Rec_Class.tailRecM2(Control_Monad_Rec_Class.monadRecMaybe)(go)(v)(s); + }; + }; +}; + +var span = function span(v) { + return function (v1) { + if (v1 instanceof Data_List_Types.Cons && v(v1.value0)) { + var v2 = span(v)(v1.value1); + return { + init: new Data_List_Types.Cons(v1.value0, v2.init), + rest: v2.rest + }; + } + + ; + return { + init: Data_List_Types.Nil.value, + rest: v1 + }; + }; +}; + +var snoc = function snoc(xs) { + return function (x) { + return Data_Foldable.foldr(Data_List_Types.foldableList)(Data_List_Types.Cons.create)(new Data_List_Types.Cons(x, Data_List_Types.Nil.value))(xs); + }; +}; + +var singleton = function singleton(a) { + return new Data_List_Types.Cons(a, Data_List_Types.Nil.value); +}; + +var sortBy = function sortBy(cmp) { + var merge = function merge(v) { + return function (v1) { + if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) { + if (Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v1.value0))(Data_Ordering.GT.value)) { + return new Data_List_Types.Cons(v1.value0, merge(v)(v1.value1)); + } + + ; + + if (Data_Boolean.otherwise) { + return new Data_List_Types.Cons(v.value0, merge(v.value1)(v1)); + } + + ; + } + + ; + + if (v instanceof Data_List_Types.Nil) { + return v1; + } + + ; + + if (v1 instanceof Data_List_Types.Nil) { + return v; + } + + ; + throw new Error("Failed pattern match at Data.List (line 473, column 3 - line 473, column 38): " + [v.constructor.name, v1.constructor.name]); + }; + }; + + var mergePairs = function mergePairs(v) { + if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Cons) { + return new Data_List_Types.Cons(merge(v.value0)(v.value1.value0), mergePairs(v.value1.value1)); + } + + ; + return v; + }; + + var mergeAll = function mergeAll($copy_v) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(v) { + if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil) { + $tco_done = true; + return v.value0; + } + + ; + $copy_v = mergePairs(v); + return; + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; + }; + + var sequences = function sequences(v) { + if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Cons) { + if (Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v.value1.value0))(Data_Ordering.GT.value)) { + return descending(v.value1.value0)(singleton(v.value0))(v.value1.value1); + } + + ; + + if (Data_Boolean.otherwise) { + return ascending(v.value1.value0)(function (v1) { + return new Data_List_Types.Cons(v.value0, v1); + })(v.value1.value1); + } + + ; + } + + ; + return singleton(v); + }; + + var descending = function descending($copy_a) { + return function ($copy_as) { + return function ($copy_v) { + var $tco_var_a = $copy_a; + var $tco_var_as = $copy_as; + var $tco_done = false; + var $tco_result; + + function $tco_loop(a, as, v) { + if (v instanceof Data_List_Types.Cons && Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(a)(v.value0))(Data_Ordering.GT.value)) { + $tco_var_a = v.value0; + $tco_var_as = new Data_List_Types.Cons(a, as); + $copy_v = v.value1; + return; + } + + ; + $tco_done = true; + return new Data_List_Types.Cons(new Data_List_Types.Cons(a, as), sequences(v)); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_a, $tco_var_as, $copy_v); + } + + ; + return $tco_result; + }; + }; + }; + + var ascending = function ascending($copy_a) { + return function ($copy_as) { + return function ($copy_v) { + var $tco_var_a = $copy_a; + var $tco_var_as = $copy_as; + var $tco_done = false; + var $tco_result; + + function $tco_loop(a, as, v) { + if (v instanceof Data_List_Types.Cons && Data_Eq.notEq(Data_Ordering.eqOrdering)(cmp(a)(v.value0))(Data_Ordering.GT.value)) { + $tco_var_a = v.value0; + + $tco_var_as = function $tco_var_as(ys) { + return as(new Data_List_Types.Cons(a, ys)); + }; + + $copy_v = v.value1; + return; + } + + ; + $tco_done = true; + return new Data_List_Types.Cons(as(singleton(a)), sequences(v)); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_a, $tco_var_as, $copy_v); + } + + ; + return $tco_result; + }; + }; + }; + + return function ($337) { + return mergeAll(sequences($337)); + }; +}; + +var sort = function sort(dictOrd) { + return function (xs) { + return sortBy(Data_Ord.compare(dictOrd))(xs); + }; +}; + +var tails = function tails(v) { + if (v instanceof Data_List_Types.Nil) { + return singleton(Data_List_Types.Nil.value); + } + + ; + + if (v instanceof Data_List_Types.Cons) { + return new Data_List_Types.Cons(v, tails(v.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List (line 626, column 1 - line 626, column 43): " + [v.constructor.name]); +}; + +var showPattern = function showPattern(dictShow) { + return new Data_Show.Show(function (v) { + return "(Pattern " + (Data_Show.show(Data_List_Types.showList(dictShow))(v) + ")"); + }); +}; + +var reverse = function () { + var go = function go($copy_acc) { + return function ($copy_v) { + var $tco_var_acc = $copy_acc; + var $tco_done = false; + var $tco_result; + + function $tco_loop(acc, v) { + if (v instanceof Data_List_Types.Nil) { + $tco_done = true; + return acc; + } + + ; + + if (v instanceof Data_List_Types.Cons) { + $tco_var_acc = new Data_List_Types.Cons(v.value0, acc); + $copy_v = v.value1; + return; + } + + ; + throw new Error("Failed pattern match at Data.List (line 368, column 3 - line 368, column 19): " + [acc.constructor.name, v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_acc, $copy_v); + } + + ; + return $tco_result; + }; + }; + + return go(Data_List_Types.Nil.value); +}(); + +var take = function () { + var go = function go($copy_acc) { + return function ($copy_v) { + return function ($copy_v1) { + var $tco_var_acc = $copy_acc; + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(acc, v, v1) { + if (v < 1) { + $tco_done = true; + return reverse(acc); + } + + ; + + if (v1 instanceof Data_List_Types.Nil) { + $tco_done = true; + return reverse(acc); + } + + ; + + if (v1 instanceof Data_List_Types.Cons) { + $tco_var_acc = new Data_List_Types.Cons(v1.value0, acc); + $tco_var_v = v - 1 | 0; + $copy_v1 = v1.value1; + return; + } + + ; + throw new Error("Failed pattern match at Data.List (line 520, column 3 - line 520, column 35): " + [acc.constructor.name, v.constructor.name, v1.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_acc, $tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; + }; + }; + + return go(Data_List_Types.Nil.value); +}(); + +var takeWhile = function takeWhile(p) { + var go = function go($copy_acc) { + return function ($copy_v) { + var $tco_var_acc = $copy_acc; + var $tco_done = false; + var $tco_result; + + function $tco_loop(acc, v) { + if (v instanceof Data_List_Types.Cons && p(v.value0)) { + $tco_var_acc = new Data_List_Types.Cons(v.value0, acc); + $copy_v = v.value1; + return; + } + + ; + $tco_done = true; + return reverse(acc); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_acc, $copy_v); + } + + ; + return $tco_result; + }; + }; + + return go(Data_List_Types.Nil.value); +}; + +var unsnoc = function unsnoc(lst) { + var go = function go($copy_v) { + return function ($copy_acc) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, acc) { + if (v instanceof Data_List_Types.Nil) { + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil) { + $tco_done = true; + return new Data_Maybe.Just({ + revInit: acc, + last: v.value0 + }); + } + + ; + + if (v instanceof Data_List_Types.Cons) { + $tco_var_v = v.value1; + $copy_acc = new Data_List_Types.Cons(v.value0, acc); + return; + } + + ; + throw new Error("Failed pattern match at Data.List (line 270, column 3 - line 270, column 23): " + [v.constructor.name, acc.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_acc); + } + + ; + return $tco_result; + }; + }; + + return Data_Functor.map(Data_Maybe.functorMaybe)(function (h) { + return { + init: reverse(h.revInit), + last: h.last + }; + })(go(lst)(Data_List_Types.Nil.value)); +}; + +var zipWith = function zipWith(f) { + return function (xs) { + return function (ys) { + var go = function go($copy_v) { + return function ($copy_v1) { + return function ($copy_acc) { + var $tco_var_v = $copy_v; + var $tco_var_v1 = $copy_v1; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1, acc) { + if (v instanceof Data_List_Types.Nil) { + $tco_done = true; + return acc; + } + + ; + + if (v1 instanceof Data_List_Types.Nil) { + $tco_done = true; + return acc; + } + + ; + + if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) { + $tco_var_v = v.value1; + $tco_var_v1 = v1.value1; + $copy_acc = new Data_List_Types.Cons(f(v.value0)(v1.value0), acc); + return; + } + + ; + throw new Error("Failed pattern match at Data.List (line 718, column 3 - line 718, column 21): " + [v.constructor.name, v1.constructor.name, acc.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $tco_var_v1, $copy_acc); + } + + ; + return $tco_result; + }; + }; + }; + + return reverse(go(xs)(ys)(Data_List_Types.Nil.value)); + }; + }; +}; + +var zip = zipWith(Data_Tuple.Tuple.create); + +var zipWithA = function zipWithA(dictApplicative) { + return function (f) { + return function (xs) { + return function (ys) { + return Data_Traversable.sequence(Data_List_Types.traversableList)(dictApplicative)(zipWith(f)(xs)(ys)); + }; + }; + }; +}; + +var range = function range(start) { + return function (end) { + if (start === end) { + return singleton(start); + } + + ; + + if (Data_Boolean.otherwise) { + var go = function go($copy_s) { + return function ($copy_e) { + return function ($copy_step) { + return function ($copy_rest) { + var $tco_var_s = $copy_s; + var $tco_var_e = $copy_e; + var $tco_var_step = $copy_step; + var $tco_done = false; + var $tco_result; + + function $tco_loop(s, e, step, rest) { + if (s === e) { + $tco_done = true; + return new Data_List_Types.Cons(s, rest); + } + + ; + + if (Data_Boolean.otherwise) { + $tco_var_s = s + step | 0; + $tco_var_e = e; + $tco_var_step = step; + $copy_rest = new Data_List_Types.Cons(s, rest); + return; + } + + ; + throw new Error("Failed pattern match at Data.List (line 148, column 3 - line 149, column 65): " + [s.constructor.name, e.constructor.name, step.constructor.name, rest.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_s, $tco_var_e, $tco_var_step, $copy_rest); + } + + ; + return $tco_result; + }; + }; + }; + }; + + return go(end)(start)(function () { + var $223 = start > end; + + if ($223) { + return 1; + } + + ; + return -1 | 0; + }())(Data_List_Types.Nil.value); + } + + ; + throw new Error("Failed pattern match at Data.List (line 144, column 1 - line 144, column 32): " + [start.constructor.name, end.constructor.name]); + }; +}; + +var partition = function partition(p) { + return function (xs) { + var select = function select(x) { + return function (v) { + var $226 = p(x); + + if ($226) { + return { + no: v.no, + yes: new Data_List_Types.Cons(x, v.yes) + }; + } + + ; + return { + no: new Data_List_Types.Cons(x, v.no), + yes: v.yes + }; + }; + }; + + return Data_Foldable.foldr(Data_List_Types.foldableList)(select)({ + no: Data_List_Types.Nil.value, + yes: Data_List_Types.Nil.value + })(xs); + }; +}; + +var $$null = function $$null(v) { + if (v instanceof Data_List_Types.Nil) { + return true; + } + + ; + return false; +}; + +var newtypePattern = new Data_Newtype.Newtype(function (n) { + return n; +}, Pattern); +var mapWithIndex = Data_FunctorWithIndex.mapWithIndex(Data_List_Types.functorWithIndexList); + +var mapMaybe = function mapMaybe(f) { + var go = function go($copy_acc) { + return function ($copy_v) { + var $tco_var_acc = $copy_acc; + var $tco_done = false; + var $tco_result; + + function $tco_loop(acc, v) { + if (v instanceof Data_List_Types.Nil) { + $tco_done = true; + return reverse(acc); + } + + ; + + if (v instanceof Data_List_Types.Cons) { + var v1 = f(v.value0); + + if (v1 instanceof Data_Maybe.Nothing) { + $tco_var_acc = acc; + $copy_v = v.value1; + return; + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + $tco_var_acc = new Data_List_Types.Cons(v1.value0, acc); + $copy_v = v.value1; + return; + } + + ; + throw new Error("Failed pattern match at Data.List (line 419, column 5 - line 421, column 32): " + [v1.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.List (line 417, column 3 - line 417, column 27): " + [acc.constructor.name, v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_acc, $copy_v); + } + + ; + return $tco_result; + }; + }; + + return go(Data_List_Types.Nil.value); +}; + +var manyRec = function manyRec(dictMonadRec) { + return function (dictAlternative) { + return function (p) { + var go = function go(acc) { + return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(Control_Alt.alt(dictAlternative.Plus1().Alt0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Control_Monad_Rec_Class.Loop.create)(p))(Control_Applicative.pure(dictAlternative.Applicative0())(new Control_Monad_Rec_Class.Done(Data_Unit.unit))))(function (v) { + return Control_Applicative.pure(dictAlternative.Applicative0())(Data_Bifunctor.bimap(Control_Monad_Rec_Class.bifunctorStep)(function (v1) { + return new Data_List_Types.Cons(v1, acc); + })(function (v1) { + return reverse(acc); + })(v)); + }); + }; + + return Control_Monad_Rec_Class.tailRecM(dictMonadRec)(go)(Data_List_Types.Nil.value); + }; + }; +}; + +var someRec = function someRec(dictMonadRec) { + return function (dictAlternative) { + return function (v) { + return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Data_List_Types.Cons.create)(v))(manyRec(dictMonadRec)(dictAlternative)(v)); + }; + }; +}; + +var some = function some(dictAlternative) { + return function (dictLazy) { + return function (v) { + return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Data_List_Types.Cons.create)(v))(Control_Lazy.defer(dictLazy)(function (v1) { + return many(dictAlternative)(dictLazy)(v); + })); + }; + }; +}; + +var many = function many(dictAlternative) { + return function (dictLazy) { + return function (v) { + return Control_Alt.alt(dictAlternative.Plus1().Alt0())(some(dictAlternative)(dictLazy)(v))(Control_Applicative.pure(dictAlternative.Applicative0())(Data_List_Types.Nil.value)); + }; + }; +}; + +var length = Data_Foldable.foldl(Data_List_Types.foldableList)(function (acc) { + return function (v) { + return acc + 1 | 0; + }; +})(0); + +var last = function last($copy_v) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(v) { + if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil) { + $tco_done = true; + return new Data_Maybe.Just(v.value0); + } + + ; + + if (v instanceof Data_List_Types.Cons) { + $copy_v = v.value1; + return; + } + + ; + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; +}; + +var insertBy = function insertBy(v) { + return function (x) { + return function (v1) { + if (v1 instanceof Data_List_Types.Nil) { + return singleton(x); + } + + ; + + if (v1 instanceof Data_List_Types.Cons) { + var v2 = v(x)(v1.value0); + + if (v2 instanceof Data_Ordering.GT) { + return new Data_List_Types.Cons(v1.value0, insertBy(v)(x)(v1.value1)); + } + + ; + return new Data_List_Types.Cons(x, v1); + } + + ; + throw new Error("Failed pattern match at Data.List (line 216, column 1 - line 216, column 68): " + [v.constructor.name, x.constructor.name, v1.constructor.name]); + }; + }; +}; + +var insertAt = function insertAt(v) { + return function (v1) { + return function (v2) { + if (v === 0) { + return new Data_Maybe.Just(new Data_List_Types.Cons(v1, v2)); + } + + ; + + if (v2 instanceof Data_List_Types.Cons) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v3) { + return new Data_List_Types.Cons(v2.value0, v3); + })(insertAt(v - 1 | 0)(v1)(v2.value1)); + } + + ; + return Data_Maybe.Nothing.value; + }; + }; +}; + +var insert = function insert(dictOrd) { + return insertBy(Data_Ord.compare(dictOrd)); +}; + +var init = function init(lst) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) { + return v.init; + })(unsnoc(lst)); +}; + +var index = function index($copy_v) { + return function ($copy_v1) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1) { + if (v instanceof Data_List_Types.Nil) { + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Data_List_Types.Cons && v1 === 0) { + $tco_done = true; + return new Data_Maybe.Just(v.value0); + } + + ; + + if (v instanceof Data_List_Types.Cons) { + $tco_var_v = v.value1; + $copy_v1 = v1 - 1 | 0; + return; + } + + ; + throw new Error("Failed pattern match at Data.List (line 281, column 1 - line 281, column 44): " + [v.constructor.name, v1.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; +}; + +var head = function head(v) { + if (v instanceof Data_List_Types.Nil) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Data_List_Types.Cons) { + return new Data_Maybe.Just(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.List (line 230, column 1 - line 230, column 22): " + [v.constructor.name]); +}; + +var transpose = function transpose(v) { + if (v instanceof Data_List_Types.Nil) { + return Data_List_Types.Nil.value; + } + + ; + + if (v instanceof Data_List_Types.Cons && v.value0 instanceof Data_List_Types.Nil) { + return transpose(v.value1); + } + + ; + + if (v instanceof Data_List_Types.Cons && v.value0 instanceof Data_List_Types.Cons) { + return new Data_List_Types.Cons(new Data_List_Types.Cons(v.value0.value0, mapMaybe(head)(v.value1)), transpose(new Data_List_Types.Cons(v.value0.value1, mapMaybe(tail)(v.value1)))); + } + + ; + throw new Error("Failed pattern match at Data.List (line 752, column 1 - line 752, column 54): " + [v.constructor.name]); +}; + +var groupBy = function groupBy(v) { + return function (v1) { + if (v1 instanceof Data_List_Types.Nil) { + return Data_List_Types.Nil.value; + } + + ; + + if (v1 instanceof Data_List_Types.Cons) { + var v2 = span(v(v1.value0))(v1.value1); + return new Data_List_Types.Cons(new Data_NonEmpty.NonEmpty(v1.value0, v2.init), groupBy(v)(v2.rest)); + } + + ; + throw new Error("Failed pattern match at Data.List (line 605, column 1 - line 605, column 80): " + [v.constructor.name, v1.constructor.name]); + }; +}; + +var group = function group(dictEq) { + return groupBy(Data_Eq.eq(dictEq)); +}; + +var group$prime = function group$prime(dictOrd) { + var $338 = group(dictOrd.Eq0()); + var $339 = sort(dictOrd); + return function ($340) { + return $338($339($340)); + }; +}; + +var fromFoldable = function fromFoldable(dictFoldable) { + return Data_Foldable.foldr(dictFoldable)(Data_List_Types.Cons.create)(Data_List_Types.Nil.value); +}; + +var foldM = function foldM(dictMonad) { + return function (v) { + return function (a) { + return function (v1) { + if (v1 instanceof Data_List_Types.Nil) { + return Control_Applicative.pure(dictMonad.Applicative0())(a); + } + + ; + + if (v1 instanceof Data_List_Types.Cons) { + return Control_Bind.bind(dictMonad.Bind1())(v(a)(v1.value0))(function (a$prime) { + return foldM(dictMonad)(v)(a$prime)(v1.value1); + }); + } + + ; + throw new Error("Failed pattern match at Data.List (line 763, column 1 - line 763, column 72): " + [v.constructor.name, a.constructor.name, v1.constructor.name]); + }; + }; + }; +}; + +var findIndex = function findIndex(fn) { + var go = function go($copy_v) { + return function ($copy_v1) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1) { + if (v1 instanceof Data_List_Types.Cons) { + if (fn(v1.value0)) { + $tco_done = true; + return new Data_Maybe.Just(v); + } + + ; + + if (Data_Boolean.otherwise) { + $tco_var_v = v + 1 | 0; + $copy_v1 = v1.value1; + return; + } + + ; + } + + ; + + if (v1 instanceof Data_List_Types.Nil) { + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.List (line 301, column 3 - line 301, column 35): " + [v.constructor.name, v1.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; + }; + + return go(0); +}; + +var findLastIndex = function findLastIndex(fn) { + return function (xs) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) { + return (length(xs) - 1 | 0) - v | 0; + })(findIndex(fn)(reverse(xs))); + }; +}; + +var filterM = function filterM(dictMonad) { + return function (v) { + return function (v1) { + if (v1 instanceof Data_List_Types.Nil) { + return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Types.Nil.value); + } + + ; + + if (v1 instanceof Data_List_Types.Cons) { + return Control_Bind.bind(dictMonad.Bind1())(v(v1.value0))(function (v2) { + return Control_Bind.bind(dictMonad.Bind1())(filterM(dictMonad)(v)(v1.value1))(function (v3) { + return Control_Applicative.pure(dictMonad.Applicative0())(function () { + if (v2) { + return new Data_List_Types.Cons(v1.value0, v3); + } + + ; + return v3; + }()); + }); + }); + } + + ; + throw new Error("Failed pattern match at Data.List (line 403, column 1 - line 403, column 75): " + [v.constructor.name, v1.constructor.name]); + }; + }; +}; + +var filter = function filter(p) { + var go = function go($copy_acc) { + return function ($copy_v) { + var $tco_var_acc = $copy_acc; + var $tco_done = false; + var $tco_result; + + function $tco_loop(acc, v) { + if (v instanceof Data_List_Types.Nil) { + $tco_done = true; + return reverse(acc); + } + + ; + + if (v instanceof Data_List_Types.Cons) { + if (p(v.value0)) { + $tco_var_acc = new Data_List_Types.Cons(v.value0, acc); + $copy_v = v.value1; + return; + } + + ; + + if (Data_Boolean.otherwise) { + $tco_var_acc = acc; + $copy_v = v.value1; + return; + } + + ; + } + + ; + throw new Error("Failed pattern match at Data.List (line 390, column 3 - line 390, column 27): " + [acc.constructor.name, v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_acc, $copy_v); + } + + ; + return $tco_result; + }; + }; + + return go(Data_List_Types.Nil.value); +}; + +var intersectBy = function intersectBy(v) { + return function (v1) { + return function (v2) { + if (v1 instanceof Data_List_Types.Nil) { + return Data_List_Types.Nil.value; + } + + ; + + if (v2 instanceof Data_List_Types.Nil) { + return Data_List_Types.Nil.value; + } + + ; + return filter(function (x) { + return Data_Foldable.any(Data_List_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(v(x))(v2); + })(v1); + }; + }; +}; + +var intersect = function intersect(dictEq) { + return intersectBy(Data_Eq.eq(dictEq)); +}; + +var nubBy = function nubBy(v) { + return function (v1) { + if (v1 instanceof Data_List_Types.Nil) { + return Data_List_Types.Nil.value; + } + + ; + + if (v1 instanceof Data_List_Types.Cons) { + return new Data_List_Types.Cons(v1.value0, nubBy(v)(filter(function (y) { + return !v(v1.value0)(y); + })(v1.value1))); + } + + ; + throw new Error("Failed pattern match at Data.List (line 644, column 1 - line 644, column 59): " + [v.constructor.name, v1.constructor.name]); + }; +}; + +var nub = function nub(dictEq) { + return nubBy(Data_Eq.eq(dictEq)); +}; + +var eqPattern = function eqPattern(dictEq) { + return new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(Data_List_Types.eqList(dictEq))(x)(y); + }; + }); +}; + +var ordPattern = function ordPattern(dictOrd) { + return new Data_Ord.Ord(function () { + return eqPattern(dictOrd.Eq0()); + }, function (x) { + return function (y) { + return Data_Ord.compare(Data_List_Types.ordList(dictOrd))(x)(y); + }; + }); +}; + +var elemLastIndex = function elemLastIndex(dictEq) { + return function (x) { + return findLastIndex(function (v) { + return Data_Eq.eq(dictEq)(v)(x); + }); + }; +}; + +var elemIndex = function elemIndex(dictEq) { + return function (x) { + return findIndex(function (v) { + return Data_Eq.eq(dictEq)(v)(x); + }); + }; +}; + +var dropWhile = function dropWhile(p) { + var go = function go($copy_v) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(v) { + if (v instanceof Data_List_Types.Cons && p(v.value0)) { + $copy_v = v.value1; + return; + } + + ; + $tco_done = true; + return v; + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; + }; + + return go; +}; + +var dropEnd = function dropEnd(n) { + return function (xs) { + return take(length(xs) - n | 0)(xs); + }; +}; + +var drop = function drop($copy_v) { + return function ($copy_v1) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1) { + if (v < 1) { + $tco_done = true; + return v1; + } + + ; + + if (v1 instanceof Data_List_Types.Nil) { + $tco_done = true; + return Data_List_Types.Nil.value; + } + + ; + + if (v1 instanceof Data_List_Types.Cons) { + $tco_var_v = v - 1 | 0; + $copy_v1 = v1.value1; + return; + } + + ; + throw new Error("Failed pattern match at Data.List (line 543, column 1 - line 543, column 42): " + [v.constructor.name, v1.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; +}; + +var slice = function slice(start) { + return function (end) { + return function (xs) { + return take(end - start | 0)(drop(start)(xs)); + }; + }; +}; + +var takeEnd = function takeEnd(n) { + return function (xs) { + return drop(length(xs) - n | 0)(xs); + }; +}; + +var deleteBy = function deleteBy(v) { + return function (v1) { + return function (v2) { + if (v2 instanceof Data_List_Types.Nil) { + return Data_List_Types.Nil.value; + } + + ; + + if (v2 instanceof Data_List_Types.Cons && v(v1)(v2.value0)) { + return v2.value1; + } + + ; + + if (v2 instanceof Data_List_Types.Cons) { + return new Data_List_Types.Cons(v2.value0, deleteBy(v)(v1)(v2.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List (line 671, column 1 - line 671, column 67): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]); + }; + }; +}; + +var unionBy = function unionBy(eq) { + return function (xs) { + return function (ys) { + return Data_Semigroup.append(Data_List_Types.semigroupList)(xs)(Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip(deleteBy(eq)))(nubBy(eq)(ys))(xs)); + }; + }; +}; + +var union = function union(dictEq) { + return unionBy(Data_Eq.eq(dictEq)); +}; + +var deleteAt = function deleteAt(v) { + return function (v1) { + if (v === 0 && v1 instanceof Data_List_Types.Cons) { + return new Data_Maybe.Just(v1.value1); + } + + ; + + if (v1 instanceof Data_List_Types.Cons) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v2) { + return new Data_List_Types.Cons(v1.value0, v2); + })(deleteAt(v - 1 | 0)(v1.value1)); + } + + ; + return Data_Maybe.Nothing.value; + }; +}; + +var $$delete = function $$delete(dictEq) { + return deleteBy(Data_Eq.eq(dictEq)); +}; + +var difference = function difference(dictEq) { + return Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip($$delete(dictEq))); +}; + +var concatMap = Data_Function.flip(Control_Bind.bind(Data_List_Types.bindList)); + +var concat = function concat(v) { + return Control_Bind.bind(Data_List_Types.bindList)(v)(Control_Category.identity(Control_Category.categoryFn)); +}; + +var catMaybes = mapMaybe(Control_Category.identity(Control_Category.categoryFn)); + +var alterAt = function alterAt(v) { + return function (v1) { + return function (v2) { + if (v === 0 && v2 instanceof Data_List_Types.Cons) { + return Data_Maybe.Just.create(function () { + var v3 = v1(v2.value0); + + if (v3 instanceof Data_Maybe.Nothing) { + return v2.value1; + } + + ; + + if (v3 instanceof Data_Maybe.Just) { + return new Data_List_Types.Cons(v3.value0, v2.value1); + } + + ; + throw new Error("Failed pattern match at Data.List (line 352, column 3 - line 354, column 23): " + [v3.constructor.name]); + }()); + } + + ; + + if (v2 instanceof Data_List_Types.Cons) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v3) { + return new Data_List_Types.Cons(v2.value0, v3); + })(alterAt(v - 1 | 0)(v1)(v2.value1)); + } + + ; + return Data_Maybe.Nothing.value; + }; + }; +}; + +var modifyAt = function modifyAt(n) { + return function (f) { + return alterAt(n)(function ($341) { + return Data_Maybe.Just.create(f($341)); + }); + }; +}; + +module.exports = { + toUnfoldable: toUnfoldable, + fromFoldable: fromFoldable, + singleton: singleton, + range: range, + some: some, + someRec: someRec, + many: many, + manyRec: manyRec, + "null": $$null, + length: length, + snoc: snoc, + insert: insert, + insertBy: insertBy, + head: head, + last: last, + tail: tail, + init: init, + uncons: uncons, + unsnoc: unsnoc, + index: index, + elemIndex: elemIndex, + elemLastIndex: elemLastIndex, + findIndex: findIndex, + findLastIndex: findLastIndex, + insertAt: insertAt, + deleteAt: deleteAt, + updateAt: updateAt, + modifyAt: modifyAt, + alterAt: alterAt, + reverse: reverse, + concat: concat, + concatMap: concatMap, + filter: filter, + filterM: filterM, + mapMaybe: mapMaybe, + catMaybes: catMaybes, + mapWithIndex: mapWithIndex, + sort: sort, + sortBy: sortBy, + Pattern: Pattern, + stripPrefix: stripPrefix, + slice: slice, + take: take, + takeEnd: takeEnd, + takeWhile: takeWhile, + drop: drop, + dropEnd: dropEnd, + dropWhile: dropWhile, + span: span, + group: group, + "group'": group$prime, + groupBy: groupBy, + partition: partition, + nub: nub, + nubBy: nubBy, + union: union, + unionBy: unionBy, + "delete": $$delete, + deleteBy: deleteBy, + difference: difference, + intersect: intersect, + intersectBy: intersectBy, + zipWith: zipWith, + zipWithA: zipWithA, + zip: zip, + unzip: unzip, + transpose: transpose, + foldM: foldM, + eqPattern: eqPattern, + ordPattern: ordPattern, + newtypePattern: newtypePattern, + showPattern: showPattern +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Lazy/index.js":"y9cE","../Control.Monad.Rec.Class/index.js":"UVIy","../Data.Bifunctor/index.js":"e2Wc","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.HeytingAlgebra/index.js":"paZe","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unit/index.js":"NhVk"}],"9xeJ":[function(require,module,exports) { +"use strict"; + +exports.defer = function (thunk) { + var v = null; + return function () { + if (thunk === undefined) return v; + v = thunk(); + thunk = undefined; // eslint-disable-line no-param-reassign + + return v; + }; +}; + +exports.force = function (l) { + return l(); +}; +},{}],"aRUE":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Comonad = require("../Control.Comonad/index.js"); + +var Control_Extend = require("../Control.Extend/index.js"); + +var Control_Lazy = require("../Control.Lazy/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_BooleanAlgebra = require("../Data.BooleanAlgebra/index.js"); + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_CommutativeRing = require("../Data.CommutativeRing/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_EuclideanRing = require("../Data.EuclideanRing/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js"); + +var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var showLazy = function showLazy(dictShow) { + return new Data_Show.Show(function (x) { + return "(defer \\_ -> " + (Data_Show.show(dictShow)($foreign.force(x)) + ")"); + }); +}; + +var semiringLazy = function semiringLazy(dictSemiring) { + return new Data_Semiring.Semiring(function (a) { + return function (b) { + return $foreign.defer(function (v) { + return Data_Semiring.add(dictSemiring)($foreign.force(a))($foreign.force(b)); + }); + }; + }, function (a) { + return function (b) { + return $foreign.defer(function (v) { + return Data_Semiring.mul(dictSemiring)($foreign.force(a))($foreign.force(b)); + }); + }; + }, $foreign.defer(function (v) { + return Data_Semiring.one(dictSemiring); + }), $foreign.defer(function (v) { + return Data_Semiring.zero(dictSemiring); + })); +}; + +var semigroupLazy = function semigroupLazy(dictSemigroup) { + return new Data_Semigroup.Semigroup(function (a) { + return function (b) { + return $foreign.defer(function (v) { + return Data_Semigroup.append(dictSemigroup)($foreign.force(a))($foreign.force(b)); + }); + }; + }); +}; + +var ringLazy = function ringLazy(dictRing) { + return new Data_Ring.Ring(function () { + return semiringLazy(dictRing.Semiring0()); + }, function (a) { + return function (b) { + return $foreign.defer(function (v) { + return Data_Ring.sub(dictRing)($foreign.force(a))($foreign.force(b)); + }); + }; + }); +}; + +var monoidLazy = function monoidLazy(dictMonoid) { + return new Data_Monoid.Monoid(function () { + return semigroupLazy(dictMonoid.Semigroup0()); + }, $foreign.defer(function (v) { + return Data_Monoid.mempty(dictMonoid); + })); +}; + +var lazyLazy = new Control_Lazy.Lazy(function (f) { + return $foreign.defer(function (v) { + return $foreign.force(f(Data_Unit.unit)); + }); +}); +var functorLazy = new Data_Functor.Functor(function (f) { + return function (l) { + return $foreign.defer(function (v) { + return f($foreign.force(l)); + }); + }; +}); +var functorWithIndexLazy = new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorLazy; +}, function (f) { + return Data_Functor.map(functorLazy)(f(Data_Unit.unit)); +}); +var invariantLazy = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorLazy)); +var foldableLazy = new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return function (l) { + return f($foreign.force(l)); + }; + }; +}, function (f) { + return function (z) { + return function (l) { + return f(z)($foreign.force(l)); + }; + }; +}, function (f) { + return function (z) { + return function (l) { + return f($foreign.force(l))(z); + }; + }; +}); +var foldableWithIndexLazy = new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableLazy; +}, function (dictMonoid) { + return function (f) { + return Data_Foldable.foldMap(foldableLazy)(dictMonoid)(f(Data_Unit.unit)); + }; +}, function (f) { + return Data_Foldable.foldl(foldableLazy)(f(Data_Unit.unit)); +}, function (f) { + return Data_Foldable.foldr(foldableLazy)(f(Data_Unit.unit)); +}); +var traversableLazy = new Data_Traversable.Traversable(function () { + return foldableLazy; +}, function () { + return functorLazy; +}, function (dictApplicative) { + return function (l) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(function ($42) { + return $foreign.defer(Data_Function["const"]($42)); + })($foreign.force(l)); + }; +}, function (dictApplicative) { + return function (f) { + return function (l) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(function ($43) { + return $foreign.defer(Data_Function["const"]($43)); + })(f($foreign.force(l))); + }; + }; +}); +var traversableWithIndexLazy = new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexLazy; +}, function () { + return functorWithIndexLazy; +}, function () { + return traversableLazy; +}, function (dictApplicative) { + return function (f) { + return Data_Traversable.traverse(traversableLazy)(dictApplicative)(f(Data_Unit.unit)); + }; +}); +var foldable1Lazy = new Data_Semigroup_Foldable.Foldable1(function () { + return foldableLazy; +}, function (dictSemigroup) { + return Data_Semigroup_Foldable.fold1Default(foldable1Lazy)(dictSemigroup); +}, function (dictSemigroup) { + return function (f) { + return function (l) { + return f($foreign.force(l)); + }; + }; +}); +var traversable1Lazy = new Data_Semigroup_Traversable.Traversable1(function () { + return foldable1Lazy; +}, function () { + return traversableLazy; +}, function (dictApply) { + return function (l) { + return Data_Functor.map(dictApply.Functor0())(function ($44) { + return $foreign.defer(Data_Function["const"]($44)); + })($foreign.force(l)); + }; +}, function (dictApply) { + return function (f) { + return function (l) { + return Data_Functor.map(dictApply.Functor0())(function ($45) { + return $foreign.defer(Data_Function["const"]($45)); + })(f($foreign.force(l))); + }; + }; +}); +var extendLazy = new Control_Extend.Extend(function () { + return functorLazy; +}, function (f) { + return function (x) { + return $foreign.defer(function (v) { + return f(x); + }); + }; +}); + +var eqLazy = function eqLazy(dictEq) { + return new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(dictEq)($foreign.force(x))($foreign.force(y)); + }; + }); +}; + +var ordLazy = function ordLazy(dictOrd) { + return new Data_Ord.Ord(function () { + return eqLazy(dictOrd.Eq0()); + }, function (x) { + return function (y) { + return Data_Ord.compare(dictOrd)($foreign.force(x))($foreign.force(y)); + }; + }); +}; + +var eq1Lazy = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqLazy(dictEq)); +}); +var ord1Lazy = new Data_Ord.Ord1(function () { + return eq1Lazy; +}, function (dictOrd) { + return Data_Ord.compare(ordLazy(dictOrd)); +}); +var comonadLazy = new Control_Comonad.Comonad(function () { + return extendLazy; +}, $foreign.force); + +var commutativeRingLazy = function commutativeRingLazy(dictCommutativeRing) { + return new Data_CommutativeRing.CommutativeRing(function () { + return ringLazy(dictCommutativeRing.Ring0()); + }); +}; + +var euclideanRingLazy = function euclideanRingLazy(dictEuclideanRing) { + return new Data_EuclideanRing.EuclideanRing(function () { + return commutativeRingLazy(dictEuclideanRing.CommutativeRing0()); + }, function () { + var $46 = Data_EuclideanRing.degree(dictEuclideanRing); + return function ($47) { + return $46($foreign.force($47)); + }; + }(), function (a) { + return function (b) { + return $foreign.defer(function (v) { + return Data_EuclideanRing.div(dictEuclideanRing)($foreign.force(a))($foreign.force(b)); + }); + }; + }, function (a) { + return function (b) { + return $foreign.defer(function (v) { + return Data_EuclideanRing.mod(dictEuclideanRing)($foreign.force(a))($foreign.force(b)); + }); + }; + }); +}; + +var boundedLazy = function boundedLazy(dictBounded) { + return new Data_Bounded.Bounded(function () { + return ordLazy(dictBounded.Ord0()); + }, $foreign.defer(function (v) { + return Data_Bounded.bottom(dictBounded); + }), $foreign.defer(function (v) { + return Data_Bounded.top(dictBounded); + })); +}; + +var applyLazy = new Control_Apply.Apply(function () { + return functorLazy; +}, function (f) { + return function (x) { + return $foreign.defer(function (v) { + return $foreign.force(f)($foreign.force(x)); + }); + }; +}); +var bindLazy = new Control_Bind.Bind(function () { + return applyLazy; +}, function (l) { + return function (f) { + return $foreign.defer(function (v) { + return $foreign.force(f($foreign.force(l))); + }); + }; +}); + +var heytingAlgebraLazy = function heytingAlgebraLazy(dictHeytingAlgebra) { + return new Data_HeytingAlgebra.HeytingAlgebra(function (a) { + return function (b) { + return Control_Apply.apply(applyLazy)(Data_Functor.map(functorLazy)(Data_HeytingAlgebra.conj(dictHeytingAlgebra))(a))(b); + }; + }, function (a) { + return function (b) { + return Control_Apply.apply(applyLazy)(Data_Functor.map(functorLazy)(Data_HeytingAlgebra.disj(dictHeytingAlgebra))(a))(b); + }; + }, $foreign.defer(function (v) { + return Data_HeytingAlgebra.ff(dictHeytingAlgebra); + }), function (a) { + return function (b) { + return Control_Apply.apply(applyLazy)(Data_Functor.map(functorLazy)(Data_HeytingAlgebra.implies(dictHeytingAlgebra))(a))(b); + }; + }, function (a) { + return Data_Functor.map(functorLazy)(Data_HeytingAlgebra.not(dictHeytingAlgebra))(a); + }, $foreign.defer(function (v) { + return Data_HeytingAlgebra.tt(dictHeytingAlgebra); + })); +}; + +var booleanAlgebraLazy = function booleanAlgebraLazy(dictBooleanAlgebra) { + return new Data_BooleanAlgebra.BooleanAlgebra(function () { + return heytingAlgebraLazy(dictBooleanAlgebra.HeytingAlgebra0()); + }); +}; + +var applicativeLazy = new Control_Applicative.Applicative(function () { + return applyLazy; +}, function (a) { + return $foreign.defer(function (v) { + return a; + }); +}); +var monadLazy = new Control_Monad.Monad(function () { + return applicativeLazy; +}, function () { + return bindLazy; +}); +module.exports = { + semiringLazy: semiringLazy, + ringLazy: ringLazy, + commutativeRingLazy: commutativeRingLazy, + euclideanRingLazy: euclideanRingLazy, + eqLazy: eqLazy, + eq1Lazy: eq1Lazy, + ordLazy: ordLazy, + ord1Lazy: ord1Lazy, + boundedLazy: boundedLazy, + semigroupLazy: semigroupLazy, + monoidLazy: monoidLazy, + heytingAlgebraLazy: heytingAlgebraLazy, + booleanAlgebraLazy: booleanAlgebraLazy, + functorLazy: functorLazy, + functorWithIndexLazy: functorWithIndexLazy, + foldableLazy: foldableLazy, + foldableWithIndexLazy: foldableWithIndexLazy, + foldable1Lazy: foldable1Lazy, + traversableLazy: traversableLazy, + traversableWithIndexLazy: traversableWithIndexLazy, + traversable1Lazy: traversable1Lazy, + invariantLazy: invariantLazy, + applyLazy: applyLazy, + applicativeLazy: applicativeLazy, + bindLazy: bindLazy, + monadLazy: monadLazy, + extendLazy: extendLazy, + comonadLazy: comonadLazy, + showLazy: showLazy, + lazyLazy: lazyLazy, + defer: $foreign.defer, + force: $foreign.force +}; +},{"./foreign.js":"9xeJ","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Comonad/index.js":"U0zO","../Control.Extend/index.js":"JIoJ","../Control.Lazy/index.js":"y9cE","../Control.Monad/index.js":"U/Ix","../Data.BooleanAlgebra/index.js":"e7y+","../Data.Bounded/index.js":"kcUU","../Data.CommutativeRing/index.js":"60TQ","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Functor.Invariant/index.js":"AXkC","../Data.FunctorWithIndex/index.js":"OHRN","../Data.HeytingAlgebra/index.js":"paZe","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ring/index.js":"E2qH","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Unit/index.js":"NhVk"}],"EJF+":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Comonad = require("../Control.Comonad/index.js"); + +var Control_Extend = require("../Control.Extend/index.js"); + +var Control_Lazy = require("../Control.Lazy/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_MonadPlus = require("../Control.MonadPlus/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_Lazy = require("../Data.Lazy/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_NonEmpty = require("../Data.NonEmpty/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js"); + +var List = function List(x) { + return x; +}; + +var Nil = function () { + function Nil() {} + + ; + Nil.value = new Nil(); + return Nil; +}(); + +var Cons = function () { + function Cons(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Cons.create = function (value0) { + return function (value1) { + return new Cons(value0, value1); + }; + }; + + return Cons; +}(); + +var NonEmptyList = function NonEmptyList(x) { + return x; +}; + +var nil = List(Data_Lazy.defer(function (v) { + return Nil.value; +})); +var newtypeNonEmptyList = new Data_Newtype.Newtype(function (n) { + return n; +}, NonEmptyList); +var newtypeList = new Data_Newtype.Newtype(function (n) { + return n; +}, List); + +var step = function () { + var $215 = Data_Newtype.unwrap(newtypeList); + return function ($216) { + return Data_Lazy.force($215($216)); + }; +}(); + +var semigroupList = new Data_Semigroup.Semigroup(function (xs) { + return function (ys) { + var go = function go(v) { + if (v instanceof Nil) { + return step(ys); + } + + ; + + if (v instanceof Cons) { + return new Cons(v.value0, Data_Semigroup.append(semigroupList)(v.value1)(ys)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy.Types (line 98, column 5 - line 98, column 21): " + [v.constructor.name]); + }; + + return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(newtypeList)(xs)); + }; +}); + +var showList = function showList(dictShow) { + return new Data_Show.Show(function (xs) { + var go = function go(v) { + if (v instanceof Nil) { + return "Nil"; + } + + ; + + if (v instanceof Cons) { + return "(Cons " + (Data_Show.show(dictShow)(v.value0) + (" " + (go(step(v.value1)) + ")"))); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy.Types (line 64, column 5 - line 64, column 19): " + [v.constructor.name]); + }; + + return "fromStrict (" + (go(step(xs)) + ")"); + }); +}; + +var showNonEmptyList = function showNonEmptyList(dictShow) { + return new Data_Show.Show(function (v) { + return "(NonEmptyList " + (Data_Show.show(Data_Lazy.showLazy(Data_NonEmpty.showNonEmpty(dictShow)(showList(dictShow))))(v) + ")"); + }); +}; + +var monoidList = new Data_Monoid.Monoid(function () { + return semigroupList; +}, nil); +var lazyList = new Control_Lazy.Lazy(function (f) { + return List(Data_Lazy.defer(function ($217) { + return step(f($217)); + })); +}); +var functorList = new Data_Functor.Functor(function (f) { + return function (xs) { + var go = function go(v) { + if (v instanceof Nil) { + return Nil.value; + } + + ; + + if (v instanceof Cons) { + return new Cons(f(v.value0), Data_Functor.map(functorList)(f)(v.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy.Types (line 107, column 5 - line 107, column 17): " + [v.constructor.name]); + }; + + return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(newtypeList)(xs)); + }; +}); +var functorNonEmptyList = new Data_Functor.Functor(function (f) { + return function (v) { + return Data_Functor.map(Data_Lazy.functorLazy)(Data_Functor.map(Data_NonEmpty.functorNonEmpty(functorList))(f))(v); + }; +}); +var eq1List = new Data_Eq.Eq1(function (dictEq) { + return function (xs) { + return function (ys) { + var go = function go($copy_v) { + return function ($copy_v1) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1) { + if (v instanceof Nil && v1 instanceof Nil) { + $tco_done = true; + return true; + } + + ; + + if (v instanceof Cons && v1 instanceof Cons && Data_Eq.eq(dictEq)(v.value0)(v1.value0)) { + $tco_var_v = step(v.value1); + $copy_v1 = step(v1.value1); + return; + } + + ; + $tco_done = true; + return false; + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; + }; + + return go(step(xs))(step(ys)); + }; + }; +}); + +var eqList = function eqList(dictEq) { + return new Data_Eq.Eq(Data_Eq.eq1(eq1List)(dictEq)); +}; + +var eqNonEmptyList = function eqNonEmptyList(dictEq) { + return Data_Lazy.eqLazy(Data_NonEmpty.eqNonEmpty(eq1List)(dictEq)); +}; + +var ord1List = new Data_Ord.Ord1(function () { + return eq1List; +}, function (dictOrd) { + return function (xs) { + return function (ys) { + var go = function go($copy_v) { + return function ($copy_v1) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1) { + if (v instanceof Nil && v1 instanceof Nil) { + $tco_done = true; + return Data_Ordering.EQ.value; + } + + ; + + if (v instanceof Nil) { + $tco_done = true; + return Data_Ordering.LT.value; + } + + ; + + if (v1 instanceof Nil) { + $tco_done = true; + return Data_Ordering.GT.value; + } + + ; + + if (v instanceof Cons && v1 instanceof Cons) { + var v2 = Data_Ord.compare(dictOrd)(v.value0)(v1.value0); + + if (v2 instanceof Data_Ordering.EQ) { + $tco_var_v = step(v.value1); + $copy_v1 = step(v1.value1); + return; + } + + ; + $tco_done = true; + return v2; + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy.Types (line 84, column 5 - line 84, column 20): " + [v.constructor.name, v1.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; + }; + + return go(step(xs))(step(ys)); + }; + }; +}); + +var ordList = function ordList(dictOrd) { + return new Data_Ord.Ord(function () { + return eqList(dictOrd.Eq0()); + }, Data_Ord.compare1(ord1List)(dictOrd)); +}; + +var ordNonEmptyList = function ordNonEmptyList(dictOrd) { + return Data_Lazy.ordLazy(Data_NonEmpty.ordNonEmpty(ord1List)(dictOrd)); +}; + +var cons = function cons(x) { + return function (xs) { + return List(Data_Lazy.defer(function (v) { + return new Cons(x, xs); + })); + }; +}; + +var foldableList = new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return Data_Foldable.foldl(foldableList)(function (b) { + return function (a) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(b)(f(a)); + }; + })(Data_Monoid.mempty(dictMonoid)); + }; +}, function (op) { + var go = function go($copy_b) { + return function ($copy_xs) { + var $tco_var_b = $copy_b; + var $tco_done = false; + var $tco_result; + + function $tco_loop(b, xs) { + var v = step(xs); + + if (v instanceof Nil) { + $tco_done = true; + return b; + } + + ; + + if (v instanceof Cons) { + $tco_var_b = op(b)(v.value0); + $copy_xs = v.value1; + return; + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy.Types (line 122, column 7 - line 124, column 40): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_b, $copy_xs); + } + + ; + return $tco_result; + }; + }; + + return go; +}, function (op) { + return function (z) { + return function (xs) { + var rev = Data_Foldable.foldl(foldableList)(Data_Function.flip(cons))(nil); + return Data_Foldable.foldl(foldableList)(Data_Function.flip(op))(z)(rev(xs)); + }; + }; +}); +var extendList = new Control_Extend.Extend(function () { + return functorList; +}, function (f) { + return function (l) { + var go = function go(a) { + return function (v) { + var acc$prime = cons(a)(v.acc); + return { + val: cons(f(acc$prime))(v.val), + acc: acc$prime + }; + }; + }; + + var v = step(l); + + if (v instanceof Nil) { + return nil; + } + + ; + + if (v instanceof Cons) { + return cons(f(l))(Data_Foldable.foldr(foldableList)(go)({ + val: nil, + acc: nil + })(v.value1).val); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy.Types (line 194, column 5 - line 197, column 55): " + [v.constructor.name]); + }; +}); +var extendNonEmptyList = new Control_Extend.Extend(function () { + return functorNonEmptyList; +}, function (f) { + return function (v) { + var go = function go(a) { + return function (v1) { + return { + val: cons(f(Data_Lazy.defer(function (v2) { + return new Data_NonEmpty.NonEmpty(a, v1.acc); + })))(v1.val), + acc: cons(a)(v1.acc) + }; + }; + }; + + var v1 = Data_Lazy.force(v); + return NonEmptyList(Data_Lazy.defer(function (v2) { + return new Data_NonEmpty.NonEmpty(f(v), Data_Foldable.foldr(foldableList)(go)({ + val: nil, + acc: nil + })(v1.value1).val); + })); + }; +}); +var foldableNonEmptyList = new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return Data_Foldable.foldMap(Data_NonEmpty.foldableNonEmpty(foldableList))(dictMonoid)(f)(Data_Lazy.force(v)); + }; + }; +}, function (f) { + return function (b) { + return function (v) { + return Data_Foldable.foldl(Data_NonEmpty.foldableNonEmpty(foldableList))(f)(b)(Data_Lazy.force(v)); + }; + }; +}, function (f) { + return function (b) { + return function (v) { + return Data_Foldable.foldr(Data_NonEmpty.foldableNonEmpty(foldableList))(f)(b)(Data_Lazy.force(v)); + }; + }; +}); +var foldableWithIndexList = new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableList; +}, function (dictMonoid) { + return function (f) { + return Data_FoldableWithIndex.foldlWithIndex(foldableWithIndexList)(function (i) { + return function (acc) { + var $218 = Data_Semigroup.append(dictMonoid.Semigroup0())(acc); + var $219 = f(i); + return function ($220) { + return $218($219($220)); + }; + }; + })(Data_Monoid.mempty(dictMonoid)); + }; +}, function (f) { + return function (acc) { + var $221 = Data_Foldable.foldl(foldableList)(function (v) { + return function (a) { + return new Data_Tuple.Tuple(v.value0 + 1 | 0, f(v.value0)(v.value1)(a)); + }; + })(new Data_Tuple.Tuple(0, acc)); + return function ($222) { + return Data_Tuple.snd($221($222)); + }; + }; +}, function (f) { + return function (b) { + return function (xs) { + var v = function () { + var rev = Data_Foldable.foldl(foldableList)(function (v1) { + return function (a) { + return new Data_Tuple.Tuple(v1.value0 + 1 | 0, cons(a)(v1.value1)); + }; + }); + return rev(new Data_Tuple.Tuple(0, nil))(xs); + }(); + + return Data_Tuple.snd(Data_Foldable.foldl(foldableList)(function (v1) { + return function (a) { + return new Data_Tuple.Tuple(v1.value0 - 1 | 0, f(v1.value0 - 1 | 0)(a)(v1.value1)); + }; + })(new Data_Tuple.Tuple(v.value0, b))(v.value1)); + }; + }; +}); +var foldableWithIndexNonEmptyList = new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableNonEmptyList; +}, function (dictMonoid) { + return function (f) { + return function (v) { + return Data_FoldableWithIndex.foldMapWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(dictMonoid)(function () { + var $223 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1)); + return function ($224) { + return f($223($224)); + }; + }())(Data_Lazy.force(v)); + }; + }; +}, function (f) { + return function (b) { + return function (v) { + return Data_FoldableWithIndex.foldlWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () { + var $225 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1)); + return function ($226) { + return f($225($226)); + }; + }())(b)(Data_Lazy.force(v)); + }; + }; +}, function (f) { + return function (b) { + return function (v) { + return Data_FoldableWithIndex.foldrWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () { + var $227 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1)); + return function ($228) { + return f($227($228)); + }; + }())(b)(Data_Lazy.force(v)); + }; + }; +}); +var functorWithIndexList = new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorList; +}, function (f) { + return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexList)(function (i) { + return function (x) { + return function (acc) { + return cons(f(i)(x))(acc); + }; + }; + })(nil); +}); +var functorWithIndexNonEmptyList = new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorNonEmptyList; +}, function (f) { + return function (v) { + return NonEmptyList(Data_Lazy.defer(function (v1) { + return Data_FunctorWithIndex.mapWithIndex(Data_NonEmpty.functorWithIndex(functorWithIndexList))(function () { + var $229 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1)); + return function ($230) { + return f($229($230)); + }; + }())(Data_Lazy.force(v)); + })); + }; +}); + +var toList = function toList(v) { + return Control_Lazy.defer(lazyList)(function (v1) { + var v2 = Data_Lazy.force(v); + return cons(v2.value0)(v2.value1); + }); +}; + +var semigroupNonEmptyList = new Data_Semigroup.Semigroup(function (v) { + return function (as$prime) { + var v1 = Data_Lazy.force(v); + return Data_Lazy.defer(function (v2) { + return new Data_NonEmpty.NonEmpty(v1.value0, Data_Semigroup.append(semigroupList)(v1.value1)(toList(as$prime))); + }); + }; +}); +var traversableList = new Data_Traversable.Traversable(function () { + return foldableList; +}, function () { + return functorList; +}, function (dictApplicative) { + return Data_Traversable.traverse(traversableList)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn)); +}, function (dictApplicative) { + return function (f) { + return Data_Foldable.foldr(foldableList)(function (a) { + return function (b) { + return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(cons)(f(a)))(b); + }; + })(Control_Applicative.pure(dictApplicative)(nil)); + }; +}); +var traversableNonEmptyList = new Data_Traversable.Traversable(function () { + return foldableNonEmptyList; +}, function () { + return functorNonEmptyList; +}, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (xxs) { + return NonEmptyList(Data_Lazy.defer(function (v1) { + return xxs; + })); + })(Data_Traversable.sequence(Data_NonEmpty.traversableNonEmpty(traversableList))(dictApplicative)(Data_Lazy.force(v))); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (xxs) { + return NonEmptyList(Data_Lazy.defer(function (v1) { + return xxs; + })); + })(Data_Traversable.traverse(Data_NonEmpty.traversableNonEmpty(traversableList))(dictApplicative)(f)(Data_Lazy.force(v))); + }; + }; +}); +var traversableWithIndexList = new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexList; +}, function () { + return functorWithIndexList; +}, function () { + return traversableList; +}, function (dictApplicative) { + return function (f) { + return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexList)(function (i) { + return function (a) { + return function (b) { + return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(cons)(f(i)(a)))(b); + }; + }; + })(Control_Applicative.pure(dictApplicative)(nil)); + }; +}); +var traversableWithIndexNonEmptyList = new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexNonEmptyList; +}, function () { + return functorWithIndexNonEmptyList; +}, function () { + return traversableNonEmptyList; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (xxs) { + return NonEmptyList(Data_Lazy.defer(function (v1) { + return xxs; + })); + })(Data_TraversableWithIndex.traverseWithIndex(Data_NonEmpty.traversableWithIndexNonEmpty(traversableWithIndexList))(dictApplicative)(function () { + var $231 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1)); + return function ($232) { + return f($231($232)); + }; + }())(Data_Lazy.force(v))); + }; + }; +}); +var unfoldable1List = new Data_Unfoldable1.Unfoldable1(function () { + var go = function go(f) { + return function (b) { + return Control_Lazy.defer(lazyList)(function (v) { + var v1 = f(b); + + if (v1.value1 instanceof Data_Maybe.Just) { + return cons(v1.value0)(go(f)(v1.value1.value0)); + } + + ; + + if (v1.value1 instanceof Data_Maybe.Nothing) { + return cons(v1.value0)(nil); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy.Types (line 146, column 28 - line 148, column 33): " + [v1.constructor.name]); + }); + }; + }; + + return go; +}()); +var unfoldableList = new Data_Unfoldable.Unfoldable(function () { + return unfoldable1List; +}, function () { + var go = function go(f) { + return function (b) { + return Control_Lazy.defer(lazyList)(function (v) { + var v1 = f(b); + + if (v1 instanceof Data_Maybe.Nothing) { + return nil; + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + return cons(v1.value0.value0)(go(f)(v1.value0.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy.Types (line 152, column 28 - line 154, column 39): " + [v1.constructor.name]); + }); + }; + }; + + return go; +}()); +var unfoldable1NonEmptyList = new Data_Unfoldable1.Unfoldable1(function (f) { + return function (b) { + return NonEmptyList(Data_Lazy.defer(function (v) { + return Data_Unfoldable1.unfoldr1(Data_NonEmpty.unfoldable1NonEmpty(unfoldableList))(f)(b); + })); + }; +}); +var comonadNonEmptyList = new Control_Comonad.Comonad(function () { + return extendNonEmptyList; +}, function (v) { + return Data_NonEmpty.head(Data_Lazy.force(v)); +}); +var monadList = new Control_Monad.Monad(function () { + return applicativeList; +}, function () { + return bindList; +}); +var bindList = new Control_Bind.Bind(function () { + return applyList; +}, function (xs) { + return function (f) { + var go = function go(v) { + if (v instanceof Nil) { + return Nil.value; + } + + ; + + if (v instanceof Cons) { + return step(Data_Semigroup.append(semigroupList)(f(v.value0))(Control_Bind.bind(bindList)(v.value1)(f))); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy.Types (line 175, column 5 - line 175, column 17): " + [v.constructor.name]); + }; + + return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(newtypeList)(xs)); + }; +}); +var applyList = new Control_Apply.Apply(function () { + return functorList; +}, Control_Monad.ap(monadList)); +var applicativeList = new Control_Applicative.Applicative(function () { + return applyList; +}, function (a) { + return cons(a)(nil); +}); +var applyNonEmptyList = new Control_Apply.Apply(function () { + return functorNonEmptyList; +}, function (v) { + return function (v1) { + var v2 = Data_Lazy.force(v1); + var v3 = Data_Lazy.force(v); + return Data_Lazy.defer(function (v4) { + return new Data_NonEmpty.NonEmpty(v3.value0(v2.value0), Data_Semigroup.append(semigroupList)(Control_Apply.apply(applyList)(v3.value1)(cons(v2.value0)(nil)))(Control_Apply.apply(applyList)(cons(v3.value0)(v3.value1))(v2.value1))); + }); + }; +}); +var bindNonEmptyList = new Control_Bind.Bind(function () { + return applyNonEmptyList; +}, function (v) { + return function (f) { + var v1 = Data_Lazy.force(v); + var v2 = Data_Lazy.force(Data_Newtype.unwrap(newtypeNonEmptyList)(f(v1.value0))); + return Data_Lazy.defer(function (v3) { + return new Data_NonEmpty.NonEmpty(v2.value0, Data_Semigroup.append(semigroupList)(v2.value1)(Control_Bind.bind(bindList)(v1.value1)(function ($233) { + return toList(f($233)); + }))); + }); + }; +}); +var altNonEmptyList = new Control_Alt.Alt(function () { + return functorNonEmptyList; +}, Data_Semigroup.append(semigroupNonEmptyList)); +var altList = new Control_Alt.Alt(function () { + return functorList; +}, Data_Semigroup.append(semigroupList)); +var plusList = new Control_Plus.Plus(function () { + return altList; +}, nil); +var alternativeList = new Control_Alternative.Alternative(function () { + return applicativeList; +}, function () { + return plusList; +}); +var monadZeroList = new Control_MonadZero.MonadZero(function () { + return alternativeList; +}, function () { + return monadList; +}); +var monadPlusList = new Control_MonadPlus.MonadPlus(function () { + return monadZeroList; +}); +var applicativeNonEmptyList = new Control_Applicative.Applicative(function () { + return applyNonEmptyList; +}, function (a) { + return Data_Lazy.defer(function (v) { + return Data_NonEmpty.singleton(plusList)(a); + }); +}); +var monadNonEmptyList = new Control_Monad.Monad(function () { + return applicativeNonEmptyList; +}, function () { + return bindNonEmptyList; +}); +module.exports = { + List: List, + Nil: Nil, + Cons: Cons, + step: step, + nil: nil, + cons: cons, + NonEmptyList: NonEmptyList, + toList: toList, + newtypeList: newtypeList, + showList: showList, + eqList: eqList, + eq1List: eq1List, + ordList: ordList, + ord1List: ord1List, + lazyList: lazyList, + semigroupList: semigroupList, + monoidList: monoidList, + functorList: functorList, + functorWithIndexList: functorWithIndexList, + foldableList: foldableList, + foldableWithIndexList: foldableWithIndexList, + unfoldable1List: unfoldable1List, + unfoldableList: unfoldableList, + traversableList: traversableList, + traversableWithIndexList: traversableWithIndexList, + applyList: applyList, + applicativeList: applicativeList, + bindList: bindList, + monadList: monadList, + altList: altList, + plusList: plusList, + alternativeList: alternativeList, + monadZeroList: monadZeroList, + monadPlusList: monadPlusList, + extendList: extendList, + newtypeNonEmptyList: newtypeNonEmptyList, + eqNonEmptyList: eqNonEmptyList, + ordNonEmptyList: ordNonEmptyList, + showNonEmptyList: showNonEmptyList, + functorNonEmptyList: functorNonEmptyList, + applyNonEmptyList: applyNonEmptyList, + applicativeNonEmptyList: applicativeNonEmptyList, + bindNonEmptyList: bindNonEmptyList, + monadNonEmptyList: monadNonEmptyList, + altNonEmptyList: altNonEmptyList, + extendNonEmptyList: extendNonEmptyList, + comonadNonEmptyList: comonadNonEmptyList, + semigroupNonEmptyList: semigroupNonEmptyList, + foldableNonEmptyList: foldableNonEmptyList, + traversableNonEmptyList: traversableNonEmptyList, + unfoldable1NonEmptyList: unfoldable1NonEmptyList, + functorWithIndexNonEmptyList: functorWithIndexNonEmptyList, + foldableWithIndexNonEmptyList: foldableWithIndexNonEmptyList, + traversableWithIndexNonEmptyList: traversableWithIndexNonEmptyList +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Comonad/index.js":"U0zO","../Control.Extend/index.js":"JIoJ","../Control.Lazy/index.js":"y9cE","../Control.Monad/index.js":"U/Ix","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Lazy/index.js":"aRUE","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unfoldable1/index.js":"S0Nl"}],"sNBV":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Lazy = require("../Control.Lazy/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Lazy = require("../Data.Lazy/index.js"); + +var Data_List_Lazy_Types = require("../Data.List.Lazy.Types/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_NonEmpty = require("../Data.NonEmpty/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Pattern = function Pattern(x) { + return x; +}; + +var zipWith = function zipWith(f) { + return function (xs) { + return function (ys) { + var go = function go(v) { + return function (v1) { + if (v instanceof Data_List_Lazy_Types.Nil) { + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v1 instanceof Data_List_Lazy_Types.Nil) { + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v instanceof Data_List_Lazy_Types.Cons && v1 instanceof Data_List_Lazy_Types.Cons) { + return new Data_List_Lazy_Types.Cons(f(v.value0)(v1.value0), zipWith(f)(v.value1)(v1.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 693, column 3 - line 693, column 35): " + [v.constructor.name, v1.constructor.name]); + }; + }; + + return Control_Apply.apply(Data_Lazy.applyLazy)(Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs)))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(ys)); + }; + }; +}; + +var zipWithA = function zipWithA(dictApplicative) { + return function (f) { + return function (xs) { + return function (ys) { + return Data_Traversable.sequence(Data_List_Lazy_Types.traversableList)(dictApplicative)(zipWith(f)(xs)(ys)); + }; + }; + }; +}; + +var zip = zipWith(Data_Tuple.Tuple.create); + +var updateAt = function updateAt(n) { + return function (x) { + return function (xs) { + var go = function go(v) { + return function (v1) { + if (v1 instanceof Data_List_Lazy_Types.Nil) { + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v === 0 && v1 instanceof Data_List_Lazy_Types.Cons) { + return new Data_List_Lazy_Types.Cons(x, v1.value1); + } + + ; + + if (v1 instanceof Data_List_Lazy_Types.Cons) { + return new Data_List_Lazy_Types.Cons(v1.value0, updateAt(v - 1 | 0)(x)(v1.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 367, column 3 - line 367, column 17): " + [v.constructor.name, v1.constructor.name]); + }; + }; + + return Data_Functor.map(Data_Lazy.functorLazy)(go(n))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs)); + }; + }; +}; + +var unzip = Data_Foldable.foldr(Data_List_Lazy_Types.foldableList)(function (v) { + return function (v1) { + return new Data_Tuple.Tuple(Data_List_Lazy_Types.cons(v.value0)(v1.value0), Data_List_Lazy_Types.cons(v.value1)(v1.value1)); + }; +})(new Data_Tuple.Tuple(Data_List_Lazy_Types.nil, Data_List_Lazy_Types.nil)); + +var uncons = function uncons(xs) { + var v = Data_List_Lazy_Types.step(xs); + + if (v instanceof Data_List_Lazy_Types.Nil) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Data_List_Lazy_Types.Cons) { + return new Data_Maybe.Just({ + head: v.value0, + tail: v.value1 + }); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 285, column 13 - line 287, column 44): " + [v.constructor.name]); +}; + +var toUnfoldable = function toUnfoldable(dictUnfoldable) { + return Data_Unfoldable.unfoldr(dictUnfoldable)(function (xs) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (rec) { + return new Data_Tuple.Tuple(rec.head, rec.tail); + })(uncons(xs)); + }); +}; + +var takeWhile = function takeWhile(p) { + var go = function go(v) { + if (v instanceof Data_List_Lazy_Types.Cons && p(v.value0)) { + return new Data_List_Lazy_Types.Cons(v.value0, takeWhile(p)(v.value1)); + } + + ; + return Data_List_Lazy_Types.Nil.value; + }; + + var $249 = Data_Functor.map(Data_Lazy.functorLazy)(go); + var $250 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList); + return function ($251) { + return Data_List_Lazy_Types.List($249($250($251))); + }; +}; + +var take = function take(n) { + var go = function go(v) { + return function (v1) { + if (v1 instanceof Data_List_Lazy_Types.Nil) { + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v1 instanceof Data_List_Lazy_Types.Cons) { + return new Data_List_Lazy_Types.Cons(v1.value0, take(v - 1 | 0)(v1.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 517, column 3 - line 517, column 32): " + [v.constructor.name, v1.constructor.name]); + }; + }; + + var $124 = n <= 0; + + if ($124) { + return Data_Function["const"](Data_List_Lazy_Types.nil); + } + + ; + var $252 = Data_Functor.map(Data_Lazy.functorLazy)(go(n)); + var $253 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList); + return function ($254) { + return Data_List_Lazy_Types.List($252($253($254))); + }; +}; + +var tail = function tail(xs) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) { + return v.tail; + })(uncons(xs)); +}; + +var stripPrefix = function stripPrefix(dictEq) { + return function (v) { + return function (s) { + var go = function go(prefix) { + return function (input) { + var v1 = Data_List_Lazy_Types.step(prefix); + + if (v1 instanceof Data_List_Lazy_Types.Nil) { + return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Done(input)); + } + + ; + + if (v1 instanceof Data_List_Lazy_Types.Cons) { + var v2 = Data_List_Lazy_Types.step(input); + + if (v2 instanceof Data_List_Lazy_Types.Cons && Data_Eq.eq(dictEq)(v1.value0)(v2.value0)) { + return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Loop({ + a: v1.value1, + b: v2.value1 + })); + } + + ; + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 499, column 21 - line 503, column 19): " + [v1.constructor.name]); + }; + }; + + return Control_Monad_Rec_Class.tailRecM2(Control_Monad_Rec_Class.monadRecMaybe)(go)(v)(s); + }; + }; +}; + +var span = function span(p) { + return function (xs) { + var v = uncons(xs); + + if (v instanceof Data_Maybe.Just && p(v.value0.head)) { + var v1 = span(p)(v.value0.tail); + return { + init: Data_List_Lazy_Types.cons(v.value0.head)(v1.init), + rest: v1.rest + }; + } + + ; + return { + init: Data_List_Lazy_Types.nil, + rest: xs + }; + }; +}; + +var snoc = function snoc(xs) { + return function (x) { + return Data_Foldable.foldr(Data_List_Lazy_Types.foldableList)(Data_List_Lazy_Types.cons)(Data_List_Lazy_Types.cons(x)(Data_List_Lazy_Types.nil))(xs); + }; +}; + +var singleton = function singleton(a) { + return Data_List_Lazy_Types.cons(a)(Data_List_Lazy_Types.nil); +}; + +var showPattern = function showPattern(dictShow) { + return new Data_Show.Show(function (v) { + return "(Pattern " + (Data_Show.show(Data_List_Lazy_Types.showList(dictShow))(v) + ")"); + }); +}; + +var scanrLazy = function scanrLazy(f) { + return function (acc) { + return function (xs) { + var go = function go(v) { + if (v instanceof Data_List_Lazy_Types.Nil) { + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v instanceof Data_List_Lazy_Types.Cons) { + var acc$prime = f(v.value0)(acc); + return Data_List_Lazy_Types.Cons.create(acc$prime)(scanrLazy(f)(acc$prime)(v.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 764, column 5 - line 764, column 27): " + [v.constructor.name]); + }; + + return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs)); + }; + }; +}; + +var reverse = function reverse(xs) { + return Control_Lazy.defer(Data_List_Lazy_Types.lazyList)(function (v) { + return Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(Data_Function.flip(Data_List_Lazy_Types.cons))(Data_List_Lazy_Types.nil)(xs); + }); +}; + +var replicateM = function replicateM(dictMonad) { + return function (n) { + return function (m) { + if (n < 1) { + return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Lazy_Types.nil); + } + + ; + + if (Data_Boolean.otherwise) { + return Control_Bind.bind(dictMonad.Bind1())(m)(function (v) { + return Control_Bind.bind(dictMonad.Bind1())(replicateM(dictMonad)(n - 1 | 0)(m))(function (v1) { + return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Lazy_Types.cons(v)(v1)); + }); + }); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 161, column 1 - line 161, column 62): " + [n.constructor.name, m.constructor.name]); + }; + }; +}; + +var repeat = function repeat(x) { + return Control_Lazy.fix(Data_List_Lazy_Types.lazyList)(function (xs) { + return Data_List_Lazy_Types.cons(x)(xs); + }); +}; + +var replicate = function replicate(i) { + return function (xs) { + return take(i)(repeat(xs)); + }; +}; + +var range = function range(start) { + return function (end) { + if (start > end) { + var g = function g(x) { + if (x >= end) { + return new Data_Maybe.Just(new Data_Tuple.Tuple(x, x - 1 | 0)); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 148, column 13 - line 149, column 38): " + [x.constructor.name]); + }; + + return Data_Unfoldable.unfoldr(Data_List_Lazy_Types.unfoldableList)(g)(start); + } + + ; + + if (Data_Boolean.otherwise) { + var f = function f(x) { + if (x <= end) { + return new Data_Maybe.Just(new Data_Tuple.Tuple(x, x + 1 | 0)); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 153, column 5 - line 154, column 30): " + [x.constructor.name]); + }; + + return Data_Unfoldable.unfoldr(Data_List_Lazy_Types.unfoldableList)(f)(start); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 145, column 1 - line 145, column 32): " + [start.constructor.name, end.constructor.name]); + }; +}; + +var partition = function partition(f) { + var go = function go(x) { + return function (v) { + var $154 = f(x); + + if ($154) { + return { + yes: Data_List_Lazy_Types.cons(x)(v.yes), + no: v.no + }; + } + + ; + return { + yes: v.yes, + no: Data_List_Lazy_Types.cons(x)(v.no) + }; + }; + }; + + return Data_Foldable.foldr(Data_List_Lazy_Types.foldableList)(go)({ + yes: Data_List_Lazy_Types.nil, + no: Data_List_Lazy_Types.nil + }); +}; + +var $$null = function $$null($255) { + return Data_Maybe.isNothing(uncons($255)); +}; + +var newtypePattern = new Data_Newtype.Newtype(function (n) { + return n; +}, Pattern); + +var mapMaybe = function mapMaybe(f) { + var go = function go($copy_v) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(v) { + if (v instanceof Data_List_Lazy_Types.Nil) { + $tco_done = true; + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v instanceof Data_List_Lazy_Types.Cons) { + var v1 = f(v.value0); + + if (v1 instanceof Data_Maybe.Nothing) { + $copy_v = Data_List_Lazy_Types.step(v.value1); + return; + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + $tco_done = true; + return new Data_List_Lazy_Types.Cons(v1.value0, mapMaybe(f)(v.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 460, column 5 - line 462, column 39): " + [v1.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 458, column 3 - line 458, column 15): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; + }; + + var $256 = Data_Functor.map(Data_Lazy.functorLazy)(go); + var $257 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList); + return function ($258) { + return Data_List_Lazy_Types.List($256($257($258))); + }; +}; + +var some = function some(dictAlternative) { + return function (dictLazy) { + return function (v) { + return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Data_List_Lazy_Types.cons)(v))(Control_Lazy.defer(dictLazy)(function (v1) { + return many(dictAlternative)(dictLazy)(v); + })); + }; + }; +}; + +var many = function many(dictAlternative) { + return function (dictLazy) { + return function (v) { + return Control_Alt.alt(dictAlternative.Plus1().Alt0())(some(dictAlternative)(dictLazy)(v))(Control_Applicative.pure(dictAlternative.Applicative0())(Data_List_Lazy_Types.nil)); + }; + }; +}; + +var length = Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(function (l) { + return function (v) { + return l + 1 | 0; + }; +})(0); + +var last = function () { + var go = function go($copy_v) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(v) { + if (v instanceof Data_List_Lazy_Types.Cons) { + if ($$null(v.value1)) { + $tco_done = true; + return new Data_Maybe.Just(v.value0); + } + + ; + + if (Data_Boolean.otherwise) { + $copy_v = Data_List_Lazy_Types.step(v.value1); + return; + } + + ; + } + + ; + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; + }; + + return function ($259) { + return go(Data_List_Lazy_Types.step($259)); + }; +}(); + +var iterate = function iterate(f) { + return function (x) { + return Control_Lazy.fix(Data_List_Lazy_Types.lazyList)(function (xs) { + return Data_List_Lazy_Types.cons(x)(Data_Functor.map(Data_List_Lazy_Types.functorList)(f)(xs)); + }); + }; +}; + +var insertAt = function insertAt(v) { + return function (x) { + return function (xs) { + if (v === 0) { + return Data_List_Lazy_Types.cons(x)(xs); + } + + ; + + var go = function go(v1) { + if (v1 instanceof Data_List_Lazy_Types.Nil) { + return new Data_List_Lazy_Types.Cons(x, Data_List_Lazy_Types.nil); + } + + ; + + if (v1 instanceof Data_List_Lazy_Types.Cons) { + return new Data_List_Lazy_Types.Cons(v1.value0, insertAt(v - 1 | 0)(x)(v1.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 340, column 3 - line 340, column 22): " + [v1.constructor.name]); + }; + + return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs)); + }; + }; +}; + +var init = function () { + var go = function go(v) { + if (v instanceof Data_List_Lazy_Types.Cons) { + if ($$null(v.value1)) { + return new Data_Maybe.Just(Data_List_Lazy_Types.nil); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Functor.map(Data_Maybe.functorMaybe)(Data_List_Lazy_Types.cons(v.value0))(go(Data_List_Lazy_Types.step(v.value1))); + } + + ; + } + + ; + return Data_Maybe.Nothing.value; + }; + + return function ($260) { + return go(Data_List_Lazy_Types.step($260)); + }; +}(); + +var index = function index(xs) { + var go = function go($copy_v) { + return function ($copy_v1) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1) { + if (v instanceof Data_List_Lazy_Types.Nil) { + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Data_List_Lazy_Types.Cons && v1 === 0) { + $tco_done = true; + return new Data_Maybe.Just(v.value0); + } + + ; + + if (v instanceof Data_List_Lazy_Types.Cons) { + $tco_var_v = Data_List_Lazy_Types.step(v.value1); + $copy_v1 = v1 - 1 | 0; + return; + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 299, column 3 - line 299, column 21): " + [v.constructor.name, v1.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; + }; + + return go(Data_List_Lazy_Types.step(xs)); +}; + +var head = function head(xs) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) { + return v.head; + })(uncons(xs)); +}; + +var transpose = function transpose(xs) { + var v = uncons(xs); + + if (v instanceof Data_Maybe.Nothing) { + return xs; + } + + ; + + if (v instanceof Data_Maybe.Just) { + var v1 = uncons(v.value0.head); + + if (v1 instanceof Data_Maybe.Nothing) { + return transpose(v.value0.tail); + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + return Data_List_Lazy_Types.cons(Data_List_Lazy_Types.cons(v1.value0.head)(mapMaybe(head)(v.value0.tail)))(transpose(Data_List_Lazy_Types.cons(v1.value0.tail)(mapMaybe(tail)(v.value0.tail)))); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 734, column 7 - line 738, column 72): " + [v1.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 730, column 3 - line 738, column 72): " + [v.constructor.name]); +}; + +var groupBy = function groupBy(eq) { + var go = function go(v) { + if (v instanceof Data_List_Lazy_Types.Nil) { + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v instanceof Data_List_Lazy_Types.Cons) { + var v1 = span(eq(v.value0))(v.value1); + return new Data_List_Lazy_Types.Cons(Data_Lazy.defer(function (v2) { + return new Data_NonEmpty.NonEmpty(v.value0, v1.init); + }), groupBy(eq)(v1.rest)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 588, column 3 - line 588, column 15): " + [v.constructor.name]); + }; + + var $261 = Data_Functor.map(Data_Lazy.functorLazy)(go); + var $262 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList); + return function ($263) { + return Data_List_Lazy_Types.List($261($262($263))); + }; +}; + +var group = function group(dictEq) { + return groupBy(Data_Eq.eq(dictEq)); +}; + +var fromStep = function () { + var $264 = Control_Applicative.pure(Data_Lazy.applicativeLazy); + return function ($265) { + return Data_List_Lazy_Types.List($264($265)); + }; +}(); + +var insertBy = function insertBy(cmp) { + return function (x) { + return function (xs) { + var go = function go(v) { + if (v instanceof Data_List_Lazy_Types.Nil) { + return new Data_List_Lazy_Types.Cons(x, Data_List_Lazy_Types.nil); + } + + ; + + if (v instanceof Data_List_Lazy_Types.Cons) { + var v1 = cmp(x)(v.value0); + + if (v1 instanceof Data_Ordering.GT) { + return new Data_List_Lazy_Types.Cons(v.value0, insertBy(cmp)(x)(v.value1)); + } + + ; + return new Data_List_Lazy_Types.Cons(x, fromStep(v)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 235, column 3 - line 235, column 22): " + [v.constructor.name]); + }; + + return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs)); + }; + }; +}; + +var insert = function insert(dictOrd) { + return insertBy(Data_Ord.compare(dictOrd)); +}; + +var fromFoldable = function fromFoldable(dictFoldable) { + return Data_Foldable.foldr(dictFoldable)(Data_List_Lazy_Types.cons)(Data_List_Lazy_Types.nil); +}; + +var foldrLazy = function foldrLazy(dictLazy) { + return function (op) { + return function (z) { + var go = function go(xs) { + var v = Data_List_Lazy_Types.step(xs); + + if (v instanceof Data_List_Lazy_Types.Cons) { + return Control_Lazy.defer(dictLazy)(function (v1) { + return op(v.value0)(go(v.value1)); + }); + } + + ; + + if (v instanceof Data_List_Lazy_Types.Nil) { + return z; + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 756, column 13 - line 758, column 15): " + [v.constructor.name]); + }; + + return go; + }; + }; +}; + +var foldM = function foldM(dictMonad) { + return function (f) { + return function (a) { + return function (xs) { + var v = uncons(xs); + + if (v instanceof Data_Maybe.Nothing) { + return Control_Applicative.pure(dictMonad.Applicative0())(a); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return Control_Bind.bind(dictMonad.Bind1())(f(a)(v.value0.head))(function (a$prime) { + return foldM(dictMonad)(f)(a$prime)(v.value0.tail); + }); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 747, column 5 - line 750, column 54): " + [v.constructor.name]); + }; + }; + }; +}; + +var findIndex = function findIndex(fn) { + var go = function go(n) { + return function (list) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(uncons(list))(function (v) { + var $207 = fn(v.head); + + if ($207) { + return Control_Applicative.pure(Data_Maybe.applicativeMaybe)(n); + } + + ; + return go(n + 1 | 0)(v.tail); + }); + }; + }; + + return go(0); +}; + +var findLastIndex = function findLastIndex(fn) { + return function (xs) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) { + return (length(xs) - 1 | 0) - v | 0; + })(findIndex(fn)(reverse(xs))); + }; +}; + +var filterM = function filterM(dictMonad) { + return function (p) { + return function (list) { + var v = uncons(list); + + if (v instanceof Data_Maybe.Nothing) { + return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Lazy_Types.nil); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return Control_Bind.bind(dictMonad.Bind1())(p(v.value0.head))(function (v1) { + return Control_Bind.bind(dictMonad.Bind1())(filterM(dictMonad)(p)(v.value0.tail))(function (v2) { + return Control_Applicative.pure(dictMonad.Applicative0())(function () { + if (v1) { + return Data_List_Lazy_Types.cons(v.value0.head)(v2); + } + + ; + return v2; + }()); + }); + }); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 443, column 5 - line 448, column 48): " + [v.constructor.name]); + }; + }; +}; + +var filter = function filter(p) { + var go = function go($copy_v) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(v) { + if (v instanceof Data_List_Lazy_Types.Nil) { + $tco_done = true; + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v instanceof Data_List_Lazy_Types.Cons) { + if (p(v.value0)) { + $tco_done = true; + return new Data_List_Lazy_Types.Cons(v.value0, filter(p)(v.value1)); + } + + ; + + if (Data_Boolean.otherwise) { + $copy_v = Data_List_Lazy_Types.step(v.value1); + return; + } + + ; + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 428, column 3 - line 428, column 15): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; + }; + + var $266 = Data_Functor.map(Data_Lazy.functorLazy)(go); + var $267 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList); + return function ($268) { + return Data_List_Lazy_Types.List($266($267($268))); + }; +}; + +var intersectBy = function intersectBy(eq) { + return function (xs) { + return function (ys) { + return filter(function (x) { + return Data_Foldable.any(Data_List_Lazy_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(eq(x))(ys); + })(xs); + }; + }; +}; + +var intersect = function intersect(dictEq) { + return intersectBy(Data_Eq.eq(dictEq)); +}; + +var nubBy = function nubBy(eq) { + var go = function go(v) { + if (v instanceof Data_List_Lazy_Types.Nil) { + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v instanceof Data_List_Lazy_Types.Cons) { + return new Data_List_Lazy_Types.Cons(v.value0, nubBy(eq)(filter(function (y) { + return !eq(v.value0)(y); + })(v.value1))); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 621, column 3 - line 621, column 15): " + [v.constructor.name]); + }; + + var $269 = Data_Functor.map(Data_Lazy.functorLazy)(go); + var $270 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList); + return function ($271) { + return Data_List_Lazy_Types.List($269($270($271))); + }; +}; + +var nub = function nub(dictEq) { + return nubBy(Data_Eq.eq(dictEq)); +}; + +var eqPattern = function eqPattern(dictEq) { + return new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(Data_List_Lazy_Types.eqList(dictEq))(x)(y); + }; + }); +}; + +var ordPattern = function ordPattern(dictOrd) { + return new Data_Ord.Ord(function () { + return eqPattern(dictOrd.Eq0()); + }, function (x) { + return function (y) { + return Data_Ord.compare(Data_List_Lazy_Types.ordList(dictOrd))(x)(y); + }; + }); +}; + +var elemLastIndex = function elemLastIndex(dictEq) { + return function (x) { + return findLastIndex(function (v) { + return Data_Eq.eq(dictEq)(v)(x); + }); + }; +}; + +var elemIndex = function elemIndex(dictEq) { + return function (x) { + return findIndex(function (v) { + return Data_Eq.eq(dictEq)(v)(x); + }); + }; +}; + +var dropWhile = function dropWhile(p) { + var go = function go($copy_v) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(v) { + if (v instanceof Data_List_Lazy_Types.Cons && p(v.value0)) { + $copy_v = Data_List_Lazy_Types.step(v.value1); + return; + } + + ; + $tco_done = true; + return fromStep(v); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; + }; + + return function ($272) { + return go(Data_List_Lazy_Types.step($272)); + }; +}; + +var drop = function drop(n) { + var go = function go($copy_v) { + return function ($copy_v1) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1) { + if (v === 0) { + $tco_done = true; + return v1; + } + + ; + + if (v1 instanceof Data_List_Lazy_Types.Nil) { + $tco_done = true; + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v1 instanceof Data_List_Lazy_Types.Cons) { + $tco_var_v = v - 1 | 0; + $copy_v1 = Data_List_Lazy_Types.step(v1.value1); + return; + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 536, column 3 - line 536, column 15): " + [v.constructor.name, v1.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; + }; + + var $273 = Data_Functor.map(Data_Lazy.functorLazy)(go(n)); + var $274 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList); + return function ($275) { + return Data_List_Lazy_Types.List($273($274($275))); + }; +}; + +var slice = function slice(start) { + return function (end) { + return function (xs) { + return take(end - start | 0)(drop(start)(xs)); + }; + }; +}; + +var deleteBy = function deleteBy(eq) { + return function (x) { + return function (xs) { + var go = function go(v) { + if (v instanceof Data_List_Lazy_Types.Nil) { + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v instanceof Data_List_Lazy_Types.Cons) { + if (eq(x)(v.value0)) { + return Data_List_Lazy_Types.step(v.value1); + } + + ; + + if (Data_Boolean.otherwise) { + return new Data_List_Lazy_Types.Cons(v.value0, deleteBy(eq)(x)(v.value1)); + } + + ; + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 650, column 3 - line 650, column 15): " + [v.constructor.name]); + }; + + return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs)); + }; + }; +}; + +var unionBy = function unionBy(eq) { + return function (xs) { + return function (ys) { + return Data_Semigroup.append(Data_List_Lazy_Types.semigroupList)(xs)(Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(Data_Function.flip(deleteBy(eq)))(nubBy(eq)(ys))(xs)); + }; + }; +}; + +var union = function union(dictEq) { + return unionBy(Data_Eq.eq(dictEq)); +}; + +var deleteAt = function deleteAt(n) { + return function (xs) { + var go = function go(v) { + return function (v1) { + if (v1 instanceof Data_List_Lazy_Types.Nil) { + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v === 0 && v1 instanceof Data_List_Lazy_Types.Cons) { + return Data_List_Lazy_Types.step(v1.value1); + } + + ; + + if (v1 instanceof Data_List_Lazy_Types.Cons) { + return new Data_List_Lazy_Types.Cons(v1.value0, deleteAt(v - 1 | 0)(v1.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 353, column 3 - line 353, column 17): " + [v.constructor.name, v1.constructor.name]); + }; + }; + + return Data_Functor.map(Data_Lazy.functorLazy)(go(n))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs)); + }; +}; + +var $$delete = function $$delete(dictEq) { + return deleteBy(Data_Eq.eq(dictEq)); +}; + +var difference = function difference(dictEq) { + return Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(Data_Function.flip($$delete(dictEq))); +}; + +var cycle = function cycle(xs) { + return Control_Lazy.fix(Data_List_Lazy_Types.lazyList)(function (ys) { + return Data_Semigroup.append(Data_List_Lazy_Types.semigroupList)(xs)(ys); + }); +}; + +var concatMap = Data_Function.flip(Control_Bind.bind(Data_List_Lazy_Types.bindList)); + +var concat = function concat(v) { + return Control_Bind.bind(Data_List_Lazy_Types.bindList)(v)(Control_Category.identity(Control_Category.categoryFn)); +}; + +var catMaybes = mapMaybe(Control_Category.identity(Control_Category.categoryFn)); + +var alterAt = function alterAt(n) { + return function (f) { + return function (xs) { + var go = function go(v) { + return function (v1) { + if (v1 instanceof Data_List_Lazy_Types.Nil) { + return Data_List_Lazy_Types.Nil.value; + } + + ; + + if (v === 0 && v1 instanceof Data_List_Lazy_Types.Cons) { + var v2 = f(v1.value0); + + if (v2 instanceof Data_Maybe.Nothing) { + return Data_List_Lazy_Types.step(v1.value1); + } + + ; + + if (v2 instanceof Data_Maybe.Just) { + return new Data_List_Lazy_Types.Cons(v2.value0, v1.value1); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 394, column 22 - line 396, column 26): " + [v2.constructor.name]); + } + + ; + + if (v1 instanceof Data_List_Lazy_Types.Cons) { + return new Data_List_Lazy_Types.Cons(v1.value0, alterAt(v - 1 | 0)(f)(v1.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.Lazy (line 393, column 3 - line 393, column 17): " + [v.constructor.name, v1.constructor.name]); + }; + }; + + return Data_Functor.map(Data_Lazy.functorLazy)(go(n))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs)); + }; + }; +}; + +var modifyAt = function modifyAt(n) { + return function (f) { + return alterAt(n)(function ($276) { + return Data_Maybe.Just.create(f($276)); + }); + }; +}; + +module.exports = { + toUnfoldable: toUnfoldable, + fromFoldable: fromFoldable, + singleton: singleton, + range: range, + replicate: replicate, + replicateM: replicateM, + some: some, + many: many, + repeat: repeat, + iterate: iterate, + cycle: cycle, + "null": $$null, + length: length, + snoc: snoc, + insert: insert, + insertBy: insertBy, + head: head, + last: last, + tail: tail, + init: init, + uncons: uncons, + index: index, + elemIndex: elemIndex, + elemLastIndex: elemLastIndex, + findIndex: findIndex, + findLastIndex: findLastIndex, + insertAt: insertAt, + deleteAt: deleteAt, + updateAt: updateAt, + modifyAt: modifyAt, + alterAt: alterAt, + reverse: reverse, + concat: concat, + concatMap: concatMap, + filter: filter, + filterM: filterM, + mapMaybe: mapMaybe, + catMaybes: catMaybes, + Pattern: Pattern, + stripPrefix: stripPrefix, + slice: slice, + take: take, + takeWhile: takeWhile, + drop: drop, + dropWhile: dropWhile, + span: span, + group: group, + groupBy: groupBy, + partition: partition, + nub: nub, + nubBy: nubBy, + union: union, + unionBy: unionBy, + "delete": $$delete, + deleteBy: deleteBy, + difference: difference, + intersect: intersect, + intersectBy: intersectBy, + zipWith: zipWith, + zipWithA: zipWithA, + zip: zip, + unzip: unzip, + transpose: transpose, + foldM: foldM, + foldrLazy: foldrLazy, + scanrLazy: scanrLazy, + eqPattern: eqPattern, + ordPattern: ordPattern, + newtypePattern: newtypePattern, + showPattern: showPattern +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Lazy/index.js":"y9cE","../Control.Monad.Rec.Class/index.js":"UVIy","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Lazy/index.js":"aRUE","../Data.List.Lazy.Types/index.js":"EJF+","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z"}],"RRDs":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_List = require("../Data.List/index.js"); + +var Data_List_Lazy = require("../Data.List.Lazy/index.js"); + +var Data_List_Lazy_Types = require("../Data.List.Lazy.Types/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Leaf = function () { + function Leaf() {} + + ; + Leaf.value = new Leaf(); + return Leaf; +}(); + +var Two = function () { + function Two(value0, value1, value2, value3) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + this.value3 = value3; + } + + ; + + Two.create = function (value0) { + return function (value1) { + return function (value2) { + return function (value3) { + return new Two(value0, value1, value2, value3); + }; + }; + }; + }; + + return Two; +}(); + +var Three = function () { + function Three(value0, value1, value2, value3, value4, value5, value6) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + this.value3 = value3; + this.value4 = value4; + this.value5 = value5; + this.value6 = value6; + } + + ; + + Three.create = function (value0) { + return function (value1) { + return function (value2) { + return function (value3) { + return function (value4) { + return function (value5) { + return function (value6) { + return new Three(value0, value1, value2, value3, value4, value5, value6); + }; + }; + }; + }; + }; + }; + }; + + return Three; +}(); + +var TwoLeft = function () { + function TwoLeft(value0, value1, value2) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + } + + ; + + TwoLeft.create = function (value0) { + return function (value1) { + return function (value2) { + return new TwoLeft(value0, value1, value2); + }; + }; + }; + + return TwoLeft; +}(); + +var TwoRight = function () { + function TwoRight(value0, value1, value2) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + } + + ; + + TwoRight.create = function (value0) { + return function (value1) { + return function (value2) { + return new TwoRight(value0, value1, value2); + }; + }; + }; + + return TwoRight; +}(); + +var ThreeLeft = function () { + function ThreeLeft(value0, value1, value2, value3, value4, value5) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + this.value3 = value3; + this.value4 = value4; + this.value5 = value5; + } + + ; + + ThreeLeft.create = function (value0) { + return function (value1) { + return function (value2) { + return function (value3) { + return function (value4) { + return function (value5) { + return new ThreeLeft(value0, value1, value2, value3, value4, value5); + }; + }; + }; + }; + }; + }; + + return ThreeLeft; +}(); + +var ThreeMiddle = function () { + function ThreeMiddle(value0, value1, value2, value3, value4, value5) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + this.value3 = value3; + this.value4 = value4; + this.value5 = value5; + } + + ; + + ThreeMiddle.create = function (value0) { + return function (value1) { + return function (value2) { + return function (value3) { + return function (value4) { + return function (value5) { + return new ThreeMiddle(value0, value1, value2, value3, value4, value5); + }; + }; + }; + }; + }; + }; + + return ThreeMiddle; +}(); + +var ThreeRight = function () { + function ThreeRight(value0, value1, value2, value3, value4, value5) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + this.value3 = value3; + this.value4 = value4; + this.value5 = value5; + } + + ; + + ThreeRight.create = function (value0) { + return function (value1) { + return function (value2) { + return function (value3) { + return function (value4) { + return function (value5) { + return new ThreeRight(value0, value1, value2, value3, value4, value5); + }; + }; + }; + }; + }; + }; + + return ThreeRight; +}(); + +var KickUp = function () { + function KickUp(value0, value1, value2, value3) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + this.value3 = value3; + } + + ; + + KickUp.create = function (value0) { + return function (value1) { + return function (value2) { + return function (value3) { + return new KickUp(value0, value1, value2, value3); + }; + }; + }; + }; + + return KickUp; +}(); + +var values = function values(v) { + if (v instanceof Leaf) { + return Data_List_Types.Nil.value; + } + + ; + + if (v instanceof Two) { + return Data_Semigroup.append(Data_List_Types.semigroupList)(values(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value2))(values(v.value3))); + } + + ; + + if (v instanceof Three) { + return Data_Semigroup.append(Data_List_Types.semigroupList)(values(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value2))(Data_Semigroup.append(Data_List_Types.semigroupList)(values(v.value3))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value5))(values(v.value6))))); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 612, column 1 - line 612, column 40): " + [v.constructor.name]); +}; + +var size = function size(v) { + if (v instanceof Leaf) { + return 0; + } + + ; + + if (v instanceof Two) { + return (1 + size(v.value0) | 0) + size(v.value3) | 0; + } + + ; + + if (v instanceof Three) { + return ((2 + size(v.value0) | 0) + size(v.value3) | 0) + size(v.value6) | 0; + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 662, column 1 - line 662, column 35): " + [v.constructor.name]); +}; + +var singleton = function singleton(k) { + return function (v) { + return new Two(Leaf.value, k, v, Leaf.value); + }; +}; + +var toUnfoldable = function toUnfoldable(dictUnfoldable) { + return function (m) { + var go = function go($copy_v) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(v) { + if (v instanceof Data_List_Types.Nil) { + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Data_List_Types.Cons) { + if (v.value0 instanceof Leaf) { + $copy_v = v.value1; + return; + } + + ; + + if (v.value0 instanceof Two && v.value0.value0 instanceof Leaf && v.value0.value3 instanceof Leaf) { + $tco_done = true; + return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), v.value1)); + } + + ; + + if (v.value0 instanceof Two && v.value0.value0 instanceof Leaf) { + $tco_done = true; + return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), new Data_List_Types.Cons(v.value0.value3, v.value1))); + } + + ; + + if (v.value0 instanceof Two) { + $copy_v = new Data_List_Types.Cons(v.value0.value0, new Data_List_Types.Cons(singleton(v.value0.value1)(v.value0.value2), new Data_List_Types.Cons(v.value0.value3, v.value1))); + return; + } + + ; + + if (v.value0 instanceof Three) { + $copy_v = new Data_List_Types.Cons(v.value0.value0, new Data_List_Types.Cons(singleton(v.value0.value1)(v.value0.value2), new Data_List_Types.Cons(v.value0.value3, new Data_List_Types.Cons(singleton(v.value0.value4)(v.value0.value5), new Data_List_Types.Cons(v.value0.value6, v.value1))))); + return; + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 577, column 18 - line 586, column 71): " + [v.value0.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 576, column 3 - line 576, column 19): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; + }; + + return Data_Unfoldable.unfoldr(dictUnfoldable)(go)(new Data_List_Types.Cons(m, Data_List_Types.Nil.value)); + }; +}; + +var toAscArray = toUnfoldable(Data_Unfoldable.unfoldableArray); + +var toUnfoldableUnordered = function toUnfoldableUnordered(dictUnfoldable) { + return function (m) { + var go = function go($copy_v) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(v) { + if (v instanceof Data_List_Types.Nil) { + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Data_List_Types.Cons) { + if (v.value0 instanceof Leaf) { + $copy_v = v.value1; + return; + } + + ; + + if (v.value0 instanceof Two) { + $tco_done = true; + return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), new Data_List_Types.Cons(v.value0.value0, new Data_List_Types.Cons(v.value0.value3, v.value1)))); + } + + ; + + if (v.value0 instanceof Three) { + $tco_done = true; + return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), new Data_List_Types.Cons(singleton(v.value0.value4)(v.value0.value5), new Data_List_Types.Cons(v.value0.value0, new Data_List_Types.Cons(v.value0.value3, new Data_List_Types.Cons(v.value0.value6, v.value1)))))); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 598, column 18 - line 603, column 77): " + [v.value0.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 597, column 3 - line 597, column 19): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; + }; + + return Data_Unfoldable.unfoldr(dictUnfoldable)(go)(new Data_List_Types.Cons(m, Data_List_Types.Nil.value)); + }; +}; + +var showTree = function showTree(dictShow) { + return function (dictShow1) { + return function (v) { + if (v instanceof Leaf) { + return "Leaf"; + } + + ; + + if (v instanceof Two) { + return "Two (" + (showTree(dictShow)(dictShow1)(v.value0) + (") (" + (Data_Show.show(dictShow)(v.value1) + (") (" + (Data_Show.show(dictShow1)(v.value2) + (") (" + (showTree(dictShow)(dictShow1)(v.value3) + ")"))))))); + } + + ; + + if (v instanceof Three) { + return "Three (" + (showTree(dictShow)(dictShow1)(v.value0) + (") (" + (Data_Show.show(dictShow)(v.value1) + (") (" + (Data_Show.show(dictShow1)(v.value2) + (") (" + (showTree(dictShow)(dictShow1)(v.value3) + (") (" + (Data_Show.show(dictShow)(v.value4) + (") (" + (Data_Show.show(dictShow1)(v.value5) + (") (" + (showTree(dictShow)(dictShow1)(v.value6) + ")"))))))))))))); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 153, column 1 - line 153, column 62): " + [v.constructor.name]); + }; + }; +}; + +var showMap = function showMap(dictShow) { + return function (dictShow1) { + return new Data_Show.Show(function (m) { + return "(fromFoldable " + (Data_Show.show(Data_Show.showArray(Data_Tuple.showTuple(dictShow)(dictShow1)))(toAscArray(m)) + ")"); + }); + }; +}; + +var lookupLE = function lookupLE(dictOrd) { + return function (k) { + var comp = Data_Ord.compare(dictOrd); + + var go = function go(v) { + if (v instanceof Leaf) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Two) { + var v2 = comp(k)(v.value1); + + if (v2 instanceof Data_Ordering.EQ) { + return new Data_Maybe.Just({ + key: v.value1, + value: v.value2 + }); + } + + ; + + if (v2 instanceof Data_Ordering.GT) { + return Data_Maybe.Just.create(Data_Maybe.fromMaybe({ + key: v.value1, + value: v.value2 + })(go(v.value3))); + } + + ; + + if (v2 instanceof Data_Ordering.LT) { + return go(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 225, column 33 - line 228, column 20): " + [v2.constructor.name]); + } + + ; + + if (v instanceof Three) { + var v3 = comp(k)(v.value4); + + if (v3 instanceof Data_Ordering.EQ) { + return new Data_Maybe.Just({ + key: v.value4, + value: v.value5 + }); + } + + ; + + if (v3 instanceof Data_Ordering.GT) { + return Data_Maybe.Just.create(Data_Maybe.fromMaybe({ + key: v.value4, + value: v.value5 + })(go(v.value6))); + } + + ; + + if (v3 instanceof Data_Ordering.LT) { + return go(new Two(v.value0, v.value1, v.value2, v.value3)); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 229, column 45 - line 232, column 36): " + [v3.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 224, column 5 - line 224, column 22): " + [v.constructor.name]); + }; + + return go; + }; +}; + +var lookupGE = function lookupGE(dictOrd) { + return function (k) { + var comp = Data_Ord.compare(dictOrd); + + var go = function go(v) { + if (v instanceof Leaf) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Two) { + var v2 = comp(k)(v.value1); + + if (v2 instanceof Data_Ordering.EQ) { + return new Data_Maybe.Just({ + key: v.value1, + value: v.value2 + }); + } + + ; + + if (v2 instanceof Data_Ordering.LT) { + return Data_Maybe.Just.create(Data_Maybe.fromMaybe({ + key: v.value1, + value: v.value2 + })(go(v.value0))); + } + + ; + + if (v2 instanceof Data_Ordering.GT) { + return go(v.value3); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 259, column 33 - line 262, column 21): " + [v2.constructor.name]); + } + + ; + + if (v instanceof Three) { + var v3 = comp(k)(v.value1); + + if (v3 instanceof Data_Ordering.EQ) { + return new Data_Maybe.Just({ + key: v.value1, + value: v.value2 + }); + } + + ; + + if (v3 instanceof Data_Ordering.LT) { + return Data_Maybe.Just.create(Data_Maybe.fromMaybe({ + key: v.value1, + value: v.value2 + })(go(v.value0))); + } + + ; + + if (v3 instanceof Data_Ordering.GT) { + return go(new Two(v.value3, v.value4, v.value5, v.value6)); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 263, column 45 - line 266, column 37): " + [v3.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 258, column 5 - line 258, column 22): " + [v.constructor.name]); + }; + + return go; + }; +}; + +var lookup = function lookup(dictOrd) { + return function (k) { + var comp = Data_Ord.compare(dictOrd); + + var go = function go($copy_v) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(v) { + if (v instanceof Leaf) { + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Two) { + var v2 = comp(k)(v.value1); + + if (v2 instanceof Data_Ordering.EQ) { + $tco_done = true; + return new Data_Maybe.Just(v.value2); + } + + ; + + if (v2 instanceof Data_Ordering.LT) { + $copy_v = v.value0; + return; + } + + ; + $copy_v = v.value3; + return; + } + + ; + + if (v instanceof Three) { + var v3 = comp(k)(v.value1); + + if (v3 instanceof Data_Ordering.EQ) { + $tco_done = true; + return new Data_Maybe.Just(v.value2); + } + + ; + var v4 = comp(k)(v.value4); + + if (v4 instanceof Data_Ordering.EQ) { + $tco_done = true; + return new Data_Maybe.Just(v.value5); + } + + ; + + if (v3 instanceof Data_Ordering.LT) { + $copy_v = v.value0; + return; + } + + ; + + if (v4 instanceof Data_Ordering.GT) { + $copy_v = v.value6; + return; + } + + ; + $copy_v = v.value3; + return; + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 200, column 5 - line 200, column 22): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; + }; + + return go; + }; +}; + +var member = function member(dictOrd) { + return function (k) { + return function (m) { + return Data_Maybe.isJust(lookup(dictOrd)(k)(m)); + }; + }; +}; + +var keys = function keys(v) { + if (v instanceof Leaf) { + return Data_List_Types.Nil.value; + } + + ; + + if (v instanceof Two) { + return Data_Semigroup.append(Data_List_Types.semigroupList)(keys(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value1))(keys(v.value3))); + } + + ; + + if (v instanceof Three) { + return Data_Semigroup.append(Data_List_Types.semigroupList)(keys(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value1))(Data_Semigroup.append(Data_List_Types.semigroupList)(keys(v.value3))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value4))(keys(v.value6))))); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 606, column 1 - line 606, column 38): " + [v.constructor.name]); +}; + +var isSubmap = function isSubmap(dictOrd) { + return function (dictEq) { + return function (m1) { + return function (m2) { + var f = function f(v) { + return Data_Eq.eq(Data_Maybe.eqMaybe(dictEq))(lookup(dictOrd)(v.value0)(m2))(new Data_Maybe.Just(v.value1)); + }; + + return Data_Foldable.all(Data_List_Lazy_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(f)(toUnfoldable(Data_List_Lazy_Types.unfoldableList)(m1)); + }; + }; + }; +}; + +var isEmpty = function isEmpty(v) { + if (v instanceof Leaf) { + return true; + } + + ; + return false; +}; + +var functorMap = new Data_Functor.Functor(function (v) { + return function (v1) { + if (v1 instanceof Leaf) { + return Leaf.value; + } + + ; + + if (v1 instanceof Two) { + return new Two(Data_Functor.map(functorMap)(v)(v1.value0), v1.value1, v(v1.value2), Data_Functor.map(functorMap)(v)(v1.value3)); + } + + ; + + if (v1 instanceof Three) { + return new Three(Data_Functor.map(functorMap)(v)(v1.value0), v1.value1, v(v1.value2), Data_Functor.map(functorMap)(v)(v1.value3), v1.value4, v(v1.value5), Data_Functor.map(functorMap)(v)(v1.value6)); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 96, column 1 - line 99, column 110): " + [v.constructor.name, v1.constructor.name]); + }; +}); +var functorWithIndexMap = new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorMap; +}, function (v) { + return function (v1) { + if (v1 instanceof Leaf) { + return Leaf.value; + } + + ; + + if (v1 instanceof Two) { + return new Two(Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value0), v1.value1, v(v1.value1)(v1.value2), Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value3)); + } + + ; + + if (v1 instanceof Three) { + return new Three(Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value0), v1.value1, v(v1.value1)(v1.value2), Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value3), v1.value4, v(v1.value4)(v1.value5), Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value6)); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 101, column 1 - line 104, column 152): " + [v.constructor.name, v1.constructor.name]); + }; +}); + +var fromZipper = function fromZipper($copy_dictOrd) { + return function ($copy_v) { + return function ($copy_tree) { + var $tco_var_dictOrd = $copy_dictOrd; + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(dictOrd, v, tree) { + if (v instanceof Data_List_Types.Nil) { + $tco_done = true; + return tree; + } + + ; + + if (v instanceof Data_List_Types.Cons) { + if (v.value0 instanceof TwoLeft) { + $tco_var_dictOrd = dictOrd; + $tco_var_v = v.value1; + $copy_tree = new Two(tree, v.value0.value0, v.value0.value1, v.value0.value2); + return; + } + + ; + + if (v.value0 instanceof TwoRight) { + $tco_var_dictOrd = dictOrd; + $tco_var_v = v.value1; + $copy_tree = new Two(v.value0.value0, v.value0.value1, v.value0.value2, tree); + return; + } + + ; + + if (v.value0 instanceof ThreeLeft) { + $tco_var_dictOrd = dictOrd; + $tco_var_v = v.value1; + $copy_tree = new Three(tree, v.value0.value0, v.value0.value1, v.value0.value2, v.value0.value3, v.value0.value4, v.value0.value5); + return; + } + + ; + + if (v.value0 instanceof ThreeMiddle) { + $tco_var_dictOrd = dictOrd; + $tco_var_v = v.value1; + $copy_tree = new Three(v.value0.value0, v.value0.value1, v.value0.value2, tree, v.value0.value3, v.value0.value4, v.value0.value5); + return; + } + + ; + + if (v.value0 instanceof ThreeRight) { + $tco_var_dictOrd = dictOrd; + $tco_var_v = v.value1; + $copy_tree = new Three(v.value0.value0, v.value0.value1, v.value0.value2, v.value0.value3, v.value0.value4, v.value0.value5, tree); + return; + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 418, column 3 - line 423, column 88): " + [v.value0.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 415, column 1 - line 415, column 80): " + [v.constructor.name, tree.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_dictOrd, $tco_var_v, $copy_tree); + } + + ; + return $tco_result; + }; + }; +}; + +var insert = function insert(dictOrd) { + return function (k) { + return function (v) { + var up = function up($copy_v1) { + return function ($copy_v2) { + var $tco_var_v1 = $copy_v1; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v1, v2) { + if (v1 instanceof Data_List_Types.Nil) { + $tco_done = true; + return new Two(v2.value0, v2.value1, v2.value2, v2.value3); + } + + ; + + if (v1 instanceof Data_List_Types.Cons) { + if (v1.value0 instanceof TwoLeft) { + $tco_done = true; + return fromZipper(dictOrd)(v1.value1)(new Three(v2.value0, v2.value1, v2.value2, v2.value3, v1.value0.value0, v1.value0.value1, v1.value0.value2)); + } + + ; + + if (v1.value0 instanceof TwoRight) { + $tco_done = true; + return fromZipper(dictOrd)(v1.value1)(new Three(v1.value0.value0, v1.value0.value1, v1.value0.value2, v2.value0, v2.value1, v2.value2, v2.value3)); + } + + ; + + if (v1.value0 instanceof ThreeLeft) { + $tco_var_v1 = v1.value1; + $copy_v2 = new KickUp(new Two(v2.value0, v2.value1, v2.value2, v2.value3), v1.value0.value0, v1.value0.value1, new Two(v1.value0.value2, v1.value0.value3, v1.value0.value4, v1.value0.value5)); + return; + } + + ; + + if (v1.value0 instanceof ThreeMiddle) { + $tco_var_v1 = v1.value1; + $copy_v2 = new KickUp(new Two(v1.value0.value0, v1.value0.value1, v1.value0.value2, v2.value0), v2.value1, v2.value2, new Two(v2.value3, v1.value0.value3, v1.value0.value4, v1.value0.value5)); + return; + } + + ; + + if (v1.value0 instanceof ThreeRight) { + $tco_var_v1 = v1.value1; + $copy_v2 = new KickUp(new Two(v1.value0.value0, v1.value0.value1, v1.value0.value2, v1.value0.value3), v1.value0.value4, v1.value0.value5, new Two(v2.value0, v2.value1, v2.value2, v2.value3)); + return; + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 454, column 5 - line 459, column 108): " + [v1.value0.constructor.name, v2.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 451, column 3 - line 451, column 56): " + [v1.constructor.name, v2.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v1, $copy_v2); + } + + ; + return $tco_result; + }; + }; + + var comp = Data_Ord.compare(dictOrd); + + var down = function down($copy_ctx) { + return function ($copy_v1) { + var $tco_var_ctx = $copy_ctx; + var $tco_done = false; + var $tco_result; + + function $tco_loop(ctx, v1) { + if (v1 instanceof Leaf) { + $tco_done = true; + return up(ctx)(new KickUp(Leaf.value, k, v, Leaf.value)); + } + + ; + + if (v1 instanceof Two) { + var v2 = comp(k)(v1.value1); + + if (v2 instanceof Data_Ordering.EQ) { + $tco_done = true; + return fromZipper(dictOrd)(ctx)(new Two(v1.value0, k, v, v1.value3)); + } + + ; + + if (v2 instanceof Data_Ordering.LT) { + $tco_var_ctx = new Data_List_Types.Cons(new TwoLeft(v1.value1, v1.value2, v1.value3), ctx); + $copy_v1 = v1.value0; + return; + } + + ; + $tco_var_ctx = new Data_List_Types.Cons(new TwoRight(v1.value0, v1.value1, v1.value2), ctx); + $copy_v1 = v1.value3; + return; + } + + ; + + if (v1 instanceof Three) { + var v3 = comp(k)(v1.value1); + + if (v3 instanceof Data_Ordering.EQ) { + $tco_done = true; + return fromZipper(dictOrd)(ctx)(new Three(v1.value0, k, v, v1.value3, v1.value4, v1.value5, v1.value6)); + } + + ; + var v4 = comp(k)(v1.value4); + + if (v4 instanceof Data_Ordering.EQ) { + $tco_done = true; + return fromZipper(dictOrd)(ctx)(new Three(v1.value0, v1.value1, v1.value2, v1.value3, k, v, v1.value6)); + } + + ; + + if (v3 instanceof Data_Ordering.LT) { + $tco_var_ctx = new Data_List_Types.Cons(new ThreeLeft(v1.value1, v1.value2, v1.value3, v1.value4, v1.value5, v1.value6), ctx); + $copy_v1 = v1.value0; + return; + } + + ; + + if (v3 instanceof Data_Ordering.GT && v4 instanceof Data_Ordering.LT) { + $tco_var_ctx = new Data_List_Types.Cons(new ThreeMiddle(v1.value0, v1.value1, v1.value2, v1.value4, v1.value5, v1.value6), ctx); + $copy_v1 = v1.value3; + return; + } + + ; + $tco_var_ctx = new Data_List_Types.Cons(new ThreeRight(v1.value0, v1.value1, v1.value2, v1.value3, v1.value4, v1.value5), ctx); + $copy_v1 = v1.value6; + return; + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 434, column 3 - line 434, column 55): " + [ctx.constructor.name, v1.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_ctx, $copy_v1); + } + + ; + return $tco_result; + }; + }; + + return down(Data_List_Types.Nil.value); + }; + }; +}; + +var pop = function pop(dictOrd) { + return function (k) { + var up = function up($copy_ctxs) { + return function ($copy_tree) { + var $tco_var_ctxs = $copy_ctxs; + var $tco_done = false; + var $tco_result; + + function $tco_loop(ctxs, tree) { + if (ctxs instanceof Data_List_Types.Nil) { + $tco_done = true; + return tree; + } + + ; + + if (ctxs instanceof Data_List_Types.Cons) { + if (ctxs.value0 instanceof TwoLeft && ctxs.value0.value2 instanceof Leaf && tree instanceof Leaf) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Two(Leaf.value, ctxs.value0.value0, ctxs.value0.value1, Leaf.value)); + } + + ; + + if (ctxs.value0 instanceof TwoRight && ctxs.value0.value0 instanceof Leaf && tree instanceof Leaf) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Two(Leaf.value, ctxs.value0.value1, ctxs.value0.value2, Leaf.value)); + } + + ; + + if (ctxs.value0 instanceof TwoLeft && ctxs.value0.value2 instanceof Two) { + $tco_var_ctxs = ctxs.value1; + $copy_tree = new Three(tree, ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2.value0, ctxs.value0.value2.value1, ctxs.value0.value2.value2, ctxs.value0.value2.value3); + return; + } + + ; + + if (ctxs.value0 instanceof TwoRight && ctxs.value0.value0 instanceof Two) { + $tco_var_ctxs = ctxs.value1; + $copy_tree = new Three(ctxs.value0.value0.value0, ctxs.value0.value0.value1, ctxs.value0.value0.value2, ctxs.value0.value0.value3, ctxs.value0.value1, ctxs.value0.value2, tree); + return; + } + + ; + + if (ctxs.value0 instanceof TwoLeft && ctxs.value0.value2 instanceof Three) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Two(new Two(tree, ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2.value0), ctxs.value0.value2.value1, ctxs.value0.value2.value2, new Two(ctxs.value0.value2.value3, ctxs.value0.value2.value4, ctxs.value0.value2.value5, ctxs.value0.value2.value6))); + } + + ; + + if (ctxs.value0 instanceof TwoRight && ctxs.value0.value0 instanceof Three) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Two(new Two(ctxs.value0.value0.value0, ctxs.value0.value0.value1, ctxs.value0.value0.value2, ctxs.value0.value0.value3), ctxs.value0.value0.value4, ctxs.value0.value0.value5, new Two(ctxs.value0.value0.value6, ctxs.value0.value1, ctxs.value0.value2, tree))); + } + + ; + + if (ctxs.value0 instanceof ThreeLeft && ctxs.value0.value2 instanceof Leaf && ctxs.value0.value5 instanceof Leaf && tree instanceof Leaf) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Three(Leaf.value, ctxs.value0.value0, ctxs.value0.value1, Leaf.value, ctxs.value0.value3, ctxs.value0.value4, Leaf.value)); + } + + ; + + if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value0 instanceof Leaf && ctxs.value0.value5 instanceof Leaf && tree instanceof Leaf) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Three(Leaf.value, ctxs.value0.value1, ctxs.value0.value2, Leaf.value, ctxs.value0.value3, ctxs.value0.value4, Leaf.value)); + } + + ; + + if (ctxs.value0 instanceof ThreeRight && ctxs.value0.value0 instanceof Leaf && ctxs.value0.value3 instanceof Leaf && tree instanceof Leaf) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Three(Leaf.value, ctxs.value0.value1, ctxs.value0.value2, Leaf.value, ctxs.value0.value4, ctxs.value0.value5, Leaf.value)); + } + + ; + + if (ctxs.value0 instanceof ThreeLeft && ctxs.value0.value2 instanceof Two) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Two(new Three(tree, ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2.value0, ctxs.value0.value2.value1, ctxs.value0.value2.value2, ctxs.value0.value2.value3), ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5)); + } + + ; + + if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value0 instanceof Two) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Two(new Three(ctxs.value0.value0.value0, ctxs.value0.value0.value1, ctxs.value0.value0.value2, ctxs.value0.value0.value3, ctxs.value0.value1, ctxs.value0.value2, tree), ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5)); + } + + ; + + if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value5 instanceof Two) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Two(ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2, new Three(tree, ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5.value0, ctxs.value0.value5.value1, ctxs.value0.value5.value2, ctxs.value0.value5.value3))); + } + + ; + + if (ctxs.value0 instanceof ThreeRight && ctxs.value0.value3 instanceof Two) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Two(ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2, new Three(ctxs.value0.value3.value0, ctxs.value0.value3.value1, ctxs.value0.value3.value2, ctxs.value0.value3.value3, ctxs.value0.value4, ctxs.value0.value5, tree))); + } + + ; + + if (ctxs.value0 instanceof ThreeLeft && ctxs.value0.value2 instanceof Three) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Three(new Two(tree, ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2.value0), ctxs.value0.value2.value1, ctxs.value0.value2.value2, new Two(ctxs.value0.value2.value3, ctxs.value0.value2.value4, ctxs.value0.value2.value5, ctxs.value0.value2.value6), ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5)); + } + + ; + + if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value0 instanceof Three) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Three(new Two(ctxs.value0.value0.value0, ctxs.value0.value0.value1, ctxs.value0.value0.value2, ctxs.value0.value0.value3), ctxs.value0.value0.value4, ctxs.value0.value0.value5, new Two(ctxs.value0.value0.value6, ctxs.value0.value1, ctxs.value0.value2, tree), ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5)); + } + + ; + + if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value5 instanceof Three) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Three(ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2, new Two(tree, ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5.value0), ctxs.value0.value5.value1, ctxs.value0.value5.value2, new Two(ctxs.value0.value5.value3, ctxs.value0.value5.value4, ctxs.value0.value5.value5, ctxs.value0.value5.value6))); + } + + ; + + if (ctxs.value0 instanceof ThreeRight && ctxs.value0.value3 instanceof Three) { + $tco_done = true; + return fromZipper(dictOrd)(ctxs.value1)(new Three(ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2, new Two(ctxs.value0.value3.value0, ctxs.value0.value3.value1, ctxs.value0.value3.value2, ctxs.value0.value3.value3), ctxs.value0.value3.value4, ctxs.value0.value3.value5, new Two(ctxs.value0.value3.value6, ctxs.value0.value4, ctxs.value0.value5, tree))); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 511, column 9 - line 528, column 136): " + [ctxs.value0.constructor.name, tree.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 508, column 5 - line 528, column 136): " + [ctxs.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_ctxs, $copy_tree); + } + + ; + return $tco_result; + }; + }; + + var removeMaxNode = function removeMaxNode($copy_ctx) { + return function ($copy_m) { + var $tco_var_ctx = $copy_ctx; + var $tco_done = false; + var $tco_result; + + function $tco_loop(ctx, m) { + if (m instanceof Two && m.value0 instanceof Leaf && m.value3 instanceof Leaf) { + $tco_done = true; + return up(ctx)(Leaf.value); + } + + ; + + if (m instanceof Two) { + $tco_var_ctx = new Data_List_Types.Cons(new TwoRight(m.value0, m.value1, m.value2), ctx); + $copy_m = m.value3; + return; + } + + ; + + if (m instanceof Three && m.value0 instanceof Leaf && m.value3 instanceof Leaf && m.value6 instanceof Leaf) { + $tco_done = true; + return up(new Data_List_Types.Cons(new TwoRight(Leaf.value, m.value1, m.value2), ctx))(Leaf.value); + } + + ; + + if (m instanceof Three) { + $tco_var_ctx = new Data_List_Types.Cons(new ThreeRight(m.value0, m.value1, m.value2, m.value3, m.value4, m.value5), ctx); + $copy_m = m.value6; + return; + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 540, column 5 - line 544, column 107): " + [m.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_ctx, $copy_m); + } + + ; + return $tco_result; + }; + }; + + var maxNode = function maxNode($copy_m) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(m) { + if (m instanceof Two && m.value3 instanceof Leaf) { + $tco_done = true; + return { + key: m.value1, + value: m.value2 + }; + } + + ; + + if (m instanceof Two) { + $copy_m = m.value3; + return; + } + + ; + + if (m instanceof Three && m.value6 instanceof Leaf) { + $tco_done = true; + return { + key: m.value4, + value: m.value5 + }; + } + + ; + + if (m instanceof Three) { + $copy_m = m.value6; + return; + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 531, column 33 - line 535, column 45): " + [m.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_m); + } + + ; + return $tco_result; + }; + + var comp = Data_Ord.compare(dictOrd); + + var down = function down($copy_ctx) { + return function ($copy_m) { + var $tco_var_ctx = $copy_ctx; + var $tco_done = false; + var $tco_result; + + function $tco_loop(ctx, m) { + if (m instanceof Leaf) { + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + + if (m instanceof Two) { + var v = comp(k)(m.value1); + + if (m.value3 instanceof Leaf && v instanceof Data_Ordering.EQ) { + $tco_done = true; + return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, up(ctx)(Leaf.value))); + } + + ; + + if (v instanceof Data_Ordering.EQ) { + var max = maxNode(m.value0); + $tco_done = true; + return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, removeMaxNode(new Data_List_Types.Cons(new TwoLeft(max.key, max.value, m.value3), ctx))(m.value0))); + } + + ; + + if (v instanceof Data_Ordering.LT) { + $tco_var_ctx = new Data_List_Types.Cons(new TwoLeft(m.value1, m.value2, m.value3), ctx); + $copy_m = m.value0; + return; + } + + ; + $tco_var_ctx = new Data_List_Types.Cons(new TwoRight(m.value0, m.value1, m.value2), ctx); + $copy_m = m.value3; + return; + } + + ; + + if (m instanceof Three) { + var leaves = function () { + if (m.value0 instanceof Leaf && m.value3 instanceof Leaf && m.value6 instanceof Leaf) { + return true; + } + + ; + return false; + }(); + + var v = comp(k)(m.value4); + var v3 = comp(k)(m.value1); + + if (leaves && v3 instanceof Data_Ordering.EQ) { + $tco_done = true; + return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, fromZipper(dictOrd)(ctx)(new Two(Leaf.value, m.value4, m.value5, Leaf.value)))); + } + + ; + + if (leaves && v instanceof Data_Ordering.EQ) { + $tco_done = true; + return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value5, fromZipper(dictOrd)(ctx)(new Two(Leaf.value, m.value1, m.value2, Leaf.value)))); + } + + ; + + if (v3 instanceof Data_Ordering.EQ) { + var max = maxNode(m.value0); + $tco_done = true; + return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, removeMaxNode(new Data_List_Types.Cons(new ThreeLeft(max.key, max.value, m.value3, m.value4, m.value5, m.value6), ctx))(m.value0))); + } + + ; + + if (v instanceof Data_Ordering.EQ) { + var max = maxNode(m.value3); + $tco_done = true; + return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value5, removeMaxNode(new Data_List_Types.Cons(new ThreeMiddle(m.value0, m.value1, m.value2, max.key, max.value, m.value6), ctx))(m.value3))); + } + + ; + + if (v3 instanceof Data_Ordering.LT) { + $tco_var_ctx = new Data_List_Types.Cons(new ThreeLeft(m.value1, m.value2, m.value3, m.value4, m.value5, m.value6), ctx); + $copy_m = m.value0; + return; + } + + ; + + if (v3 instanceof Data_Ordering.GT && v instanceof Data_Ordering.LT) { + $tco_var_ctx = new Data_List_Types.Cons(new ThreeMiddle(m.value0, m.value1, m.value2, m.value4, m.value5, m.value6), ctx); + $copy_m = m.value3; + return; + } + + ; + $tco_var_ctx = new Data_List_Types.Cons(new ThreeRight(m.value0, m.value1, m.value2, m.value3, m.value4, m.value5), ctx); + $copy_m = m.value6; + return; + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 481, column 34 - line 504, column 80): " + [m.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_ctx, $copy_m); + } + + ; + return $tco_result; + }; + }; + + return down(Data_List_Types.Nil.value); + }; +}; + +var foldableMap = new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return function (m) { + return Data_Foldable.foldMap(Data_List_Types.foldableList)(dictMonoid)(f)(values(m)); + }; + }; +}, function (f) { + return function (z) { + return function (m) { + return Data_Foldable.foldl(Data_List_Types.foldableList)(f)(z)(values(m)); + }; + }; +}, function (f) { + return function (z) { + return function (m) { + return Data_Foldable.foldr(Data_List_Types.foldableList)(f)(z)(values(m)); + }; + }; +}); +var traversableMap = new Data_Traversable.Traversable(function () { + return foldableMap; +}, function () { + return functorMap; +}, function (dictApplicative) { + return Data_Traversable.traverse(traversableMap)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn)); +}, function (dictApplicative) { + return function (f) { + return function (v) { + if (v instanceof Leaf) { + return Control_Applicative.pure(dictApplicative)(Leaf.value); + } + + ; + + if (v instanceof Two) { + return Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Two.create)(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value0)))(Control_Applicative.pure(dictApplicative)(v.value1)))(f(v.value2)))(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value3)); + } + + ; + + if (v instanceof Three) { + return Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Three.create)(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value0)))(Control_Applicative.pure(dictApplicative)(v.value1)))(f(v.value2)))(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value3)))(Control_Applicative.pure(dictApplicative)(v.value4)))(f(v.value5)))(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value6)); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 119, column 1 - line 134, column 31): " + [f.constructor.name, v.constructor.name]); + }; + }; +}); + +var foldSubmap = function foldSubmap(dictOrd) { + return function (dictMonoid) { + return function (kmin) { + return function (kmax) { + return function (f) { + var tooSmall = function () { + if (kmin instanceof Data_Maybe.Just) { + return function (k) { + return Data_Ord.lessThan(dictOrd)(k)(kmin.value0); + }; + } + + ; + + if (kmin instanceof Data_Maybe.Nothing) { + return Data_Function["const"](false); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 319, column 7 - line 323, column 22): " + [kmin.constructor.name]); + }(); + + var tooLarge = function () { + if (kmax instanceof Data_Maybe.Just) { + return function (k) { + return Data_Ord.greaterThan(dictOrd)(k)(kmax.value0); + }; + } + + ; + + if (kmax instanceof Data_Maybe.Nothing) { + return Data_Function["const"](false); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 326, column 7 - line 330, column 22): " + [kmax.constructor.name]); + }(); + + var inBounds = function () { + if (kmin instanceof Data_Maybe.Just && kmax instanceof Data_Maybe.Just) { + return function (k) { + return Data_Ord.lessThanOrEq(dictOrd)(kmin.value0)(k) && Data_Ord.lessThanOrEq(dictOrd)(k)(kmax.value0); + }; + } + + ; + + if (kmin instanceof Data_Maybe.Just && kmax instanceof Data_Maybe.Nothing) { + return function (k) { + return Data_Ord.lessThanOrEq(dictOrd)(kmin.value0)(k); + }; + } + + ; + + if (kmin instanceof Data_Maybe.Nothing && kmax instanceof Data_Maybe.Just) { + return function (k) { + return Data_Ord.lessThanOrEq(dictOrd)(k)(kmax.value0); + }; + } + + ; + + if (kmin instanceof Data_Maybe.Nothing && kmax instanceof Data_Maybe.Nothing) { + return Data_Function["const"](true); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 333, column 7 - line 341, column 21): " + [kmin.constructor.name, kmax.constructor.name]); + }(); + + var go = function go(v) { + if (v instanceof Leaf) { + return Data_Monoid.mempty(dictMonoid); + } + + ; + + if (v instanceof Two) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(function () { + var $633 = tooSmall(v.value1); + + if ($633) { + return Data_Monoid.mempty(dictMonoid); + } + + ; + return go(v.value0); + }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () { + var $634 = inBounds(v.value1); + + if ($634) { + return f(v.value1)(v.value2); + } + + ; + return Data_Monoid.mempty(dictMonoid); + }())(function () { + var $635 = tooLarge(v.value1); + + if ($635) { + return Data_Monoid.mempty(dictMonoid); + } + + ; + return go(v.value3); + }())); + } + + ; + + if (v instanceof Three) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(function () { + var $640 = tooSmall(v.value1); + + if ($640) { + return Data_Monoid.mempty(dictMonoid); + } + + ; + return go(v.value0); + }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () { + var $641 = inBounds(v.value1); + + if ($641) { + return f(v.value1)(v.value2); + } + + ; + return Data_Monoid.mempty(dictMonoid); + }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () { + var $642 = tooSmall(v.value4) || tooLarge(v.value1); + + if ($642) { + return Data_Monoid.mempty(dictMonoid); + } + + ; + return go(v.value3); + }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () { + var $643 = inBounds(v.value4); + + if ($643) { + return f(v.value4)(v.value5); + } + + ; + return Data_Monoid.mempty(dictMonoid); + }())(function () { + var $644 = tooLarge(v.value4); + + if ($644) { + return Data_Monoid.mempty(dictMonoid); + } + + ; + return go(v.value6); + }())))); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 359, column 10 - line 371, column 54): " + [v.constructor.name]); + }; + + return go; + }; + }; + }; + }; +}; + +var findMin = function () { + var go = function go($copy_v) { + return function ($copy_v1) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1) { + if (v1 instanceof Leaf) { + $tco_done = true; + return v; + } + + ; + + if (v1 instanceof Two) { + $tco_var_v = new Data_Maybe.Just({ + key: v1.value1, + value: v1.value2 + }); + $copy_v1 = v1.value0; + return; + } + + ; + + if (v1 instanceof Three) { + $tco_var_v = new Data_Maybe.Just({ + key: v1.value1, + value: v1.value2 + }); + $copy_v1 = v1.value0; + return; + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 297, column 5 - line 297, column 22): " + [v.constructor.name, v1.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; + }; + + return go(Data_Maybe.Nothing.value); +}(); + +var lookupGT = function lookupGT(dictOrd) { + return function (k) { + var comp = Data_Ord.compare(dictOrd); + + var go = function go(v) { + if (v instanceof Leaf) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Two) { + var v2 = comp(k)(v.value1); + + if (v2 instanceof Data_Ordering.EQ) { + return findMin(v.value3); + } + + ; + + if (v2 instanceof Data_Ordering.LT) { + return Data_Maybe.Just.create(Data_Maybe.fromMaybe({ + key: v.value1, + value: v.value2 + })(go(v.value0))); + } + + ; + + if (v2 instanceof Data_Ordering.GT) { + return go(v.value3); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 276, column 33 - line 279, column 21): " + [v2.constructor.name]); + } + + ; + + if (v instanceof Three) { + var v3 = comp(k)(v.value1); + + if (v3 instanceof Data_Ordering.EQ) { + return findMin(new Two(v.value3, v.value4, v.value5, v.value6)); + } + + ; + + if (v3 instanceof Data_Ordering.LT) { + return Data_Maybe.Just.create(Data_Maybe.fromMaybe({ + key: v.value1, + value: v.value2 + })(go(v.value0))); + } + + ; + + if (v3 instanceof Data_Ordering.GT) { + return go(new Two(v.value3, v.value4, v.value5, v.value6)); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 280, column 45 - line 283, column 37): " + [v3.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 275, column 5 - line 275, column 22): " + [v.constructor.name]); + }; + + return go; + }; +}; + +var findMax = function () { + var go = function go($copy_v) { + return function ($copy_v1) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1) { + if (v1 instanceof Leaf) { + $tco_done = true; + return v; + } + + ; + + if (v1 instanceof Two) { + $tco_var_v = new Data_Maybe.Just({ + key: v1.value1, + value: v1.value2 + }); + $copy_v1 = v1.value3; + return; + } + + ; + + if (v1 instanceof Three) { + $tco_var_v = new Data_Maybe.Just({ + key: v1.value4, + value: v1.value5 + }); + $copy_v1 = v1.value6; + return; + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 289, column 5 - line 289, column 22): " + [v.constructor.name, v1.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; + }; + + return go(Data_Maybe.Nothing.value); +}(); + +var lookupLT = function lookupLT(dictOrd) { + return function (k) { + var comp = Data_Ord.compare(dictOrd); + + var go = function go(v) { + if (v instanceof Leaf) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Two) { + var v2 = comp(k)(v.value1); + + if (v2 instanceof Data_Ordering.EQ) { + return findMax(v.value0); + } + + ; + + if (v2 instanceof Data_Ordering.GT) { + return Data_Maybe.Just.create(Data_Maybe.fromMaybe({ + key: v.value1, + value: v.value2 + })(go(v.value3))); + } + + ; + + if (v2 instanceof Data_Ordering.LT) { + return go(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 242, column 33 - line 245, column 20): " + [v2.constructor.name]); + } + + ; + + if (v instanceof Three) { + var v3 = comp(k)(v.value4); + + if (v3 instanceof Data_Ordering.EQ) { + return findMax(new Two(v.value0, v.value1, v.value2, v.value3)); + } + + ; + + if (v3 instanceof Data_Ordering.GT) { + return Data_Maybe.Just.create(Data_Maybe.fromMaybe({ + key: v.value4, + value: v.value5 + })(go(v.value6))); + } + + ; + + if (v3 instanceof Data_Ordering.LT) { + return go(new Two(v.value0, v.value1, v.value2, v.value3)); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 246, column 45 - line 249, column 36): " + [v3.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 241, column 5 - line 241, column 22): " + [v.constructor.name]); + }; + + return go; + }; +}; + +var eqMap = function eqMap(dictEq) { + return function (dictEq1) { + return new Data_Eq.Eq(function (m1) { + return function (m2) { + return Data_Eq.eq(Data_Eq.eqArray(Data_Tuple.eqTuple(dictEq)(dictEq1)))(toAscArray(m1))(toAscArray(m2)); + }; + }); + }; +}; + +var ordMap = function ordMap(dictOrd) { + return function (dictOrd1) { + return new Data_Ord.Ord(function () { + return eqMap(dictOrd.Eq0())(dictOrd1.Eq0()); + }, function (m1) { + return function (m2) { + return Data_Ord.compare(Data_Ord.ordArray(Data_Tuple.ordTuple(dictOrd)(dictOrd1)))(toAscArray(m1))(toAscArray(m2)); + }; + }); + }; +}; + +var eq1Map = function eq1Map(dictEq) { + return new Data_Eq.Eq1(function (dictEq1) { + return Data_Eq.eq(eqMap(dictEq)(dictEq1)); + }); +}; + +var ord1Map = function ord1Map(dictOrd) { + return new Data_Ord.Ord1(function () { + return eq1Map(dictOrd.Eq0()); + }, function (dictOrd1) { + return Data_Ord.compare(ordMap(dictOrd)(dictOrd1)); + }); +}; + +var empty = Leaf.value; + +var fromFoldable = function fromFoldable(dictOrd) { + return function (dictFoldable) { + return Data_Foldable.foldl(dictFoldable)(function (m) { + return function (v) { + return insert(dictOrd)(v.value0)(v.value1)(m); + }; + })(empty); + }; +}; + +var filterWithKey = function filterWithKey(dictOrd) { + return function (predicate) { + var $758 = fromFoldable(dictOrd)(Data_List_Lazy_Types.foldableList); + var $759 = Data_List_Lazy.filter(Data_Tuple.uncurry(predicate)); + var $760 = toUnfoldable(Data_List_Lazy_Types.unfoldableList); + return function ($761) { + return $758($759($760($761))); + }; + }; +}; + +var filter = function filter(dictOrd) { + return function (predicate) { + return filterWithKey(dictOrd)(Data_Function["const"](predicate)); + }; +}; + +var filterKeys = function filterKeys(dictOrd) { + return function (predicate) { + return filterWithKey(dictOrd)(function ($762) { + return Data_Function["const"](predicate($762)); + }); + }; +}; + +var fromFoldableWithIndex = function fromFoldableWithIndex(dictOrd) { + return function (dictFoldableWithIndex) { + return Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex)(function (k) { + return function (m) { + return function (v) { + return insert(dictOrd)(k)(v)(m); + }; + }; + })(empty); + }; +}; + +var intersectionWith = function intersectionWith(dictOrd) { + return function (f) { + return function (m1) { + return function (m2) { + var go = function go($copy_v) { + return function ($copy_v1) { + return function ($copy_m) { + var $tco_var_v = $copy_v; + var $tco_var_v1 = $copy_v1; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1, m) { + if (v instanceof Data_List_Types.Nil) { + $tco_done = true; + return m; + } + + ; + + if (v1 instanceof Data_List_Types.Nil) { + $tco_done = true; + return m; + } + + ; + + if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) { + var v2 = Data_Ord.compare(dictOrd)(v.value0.value0)(v1.value0.value0); + + if (v2 instanceof Data_Ordering.LT) { + $tco_var_v = v.value1; + $tco_var_v1 = v1; + $copy_m = m; + return; + } + + ; + + if (v2 instanceof Data_Ordering.EQ) { + $tco_var_v = v.value1; + $tco_var_v1 = v1.value1; + $copy_m = insert(dictOrd)(v.value0.value0)(f(v.value0.value1)(v1.value0.value1))(m); + return; + } + + ; + + if (v2 instanceof Data_Ordering.GT) { + $tco_var_v = v; + $tco_var_v1 = v1.value1; + $copy_m = m; + return; + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 641, column 5 - line 644, column 27): " + [v2.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 638, column 3 - line 638, column 17): " + [v.constructor.name, v1.constructor.name, m.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $tco_var_v1, $copy_m); + } + + ; + return $tco_result; + }; + }; + }; + + return go(toUnfoldable(Data_List_Types.unfoldableList)(m1))(toUnfoldable(Data_List_Types.unfoldableList)(m2))(empty); + }; + }; + }; +}; + +var intersection = function intersection(dictOrd) { + return intersectionWith(dictOrd)(Data_Function["const"]); +}; + +var $$delete = function $$delete(dictOrd) { + return function (k) { + return function (m) { + return Data_Maybe.maybe(m)(Data_Tuple.snd)(pop(dictOrd)(k)(m)); + }; + }; +}; + +var difference = function difference(dictOrd) { + return function (m1) { + return function (m2) { + return Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip($$delete(dictOrd)))(m1)(keys(m2)); + }; + }; +}; + +var checkValid = function checkValid(tree) { + var allHeights = function allHeights(v) { + if (v instanceof Leaf) { + return Control_Applicative.pure(Data_List_Types.applicativeList)(0); + } + + ; + + if (v instanceof Two) { + return Data_Functor.map(Data_List_Types.functorList)(function (n) { + return n + 1 | 0; + })(Data_Semigroup.append(Data_List_Types.semigroupList)(allHeights(v.value0))(allHeights(v.value3))); + } + + ; + + if (v instanceof Three) { + return Data_Functor.map(Data_List_Types.functorList)(function (n) { + return n + 1 | 0; + })(Data_Semigroup.append(Data_List_Types.semigroupList)(allHeights(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(allHeights(v.value3))(allHeights(v.value6)))); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 188, column 3 - line 188, column 36): " + [v.constructor.name]); + }; + + return Data_List.length(Data_List.nub(Data_Eq.eqInt)(allHeights(tree))) === 1; +}; + +var asList = Control_Category.identity(Control_Category.categoryFn); +var foldableWithIndexMap = new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableMap; +}, function (dictMonoid) { + return function (f) { + return function (m) { + return Data_Foldable.foldMap(Data_List_Types.foldableList)(dictMonoid)(Data_Tuple.uncurry(f))(asList(toUnfoldable(Data_List_Types.unfoldableList)(m))); + }; + }; +}, function (f) { + return function (z) { + return function (m) { + return Data_Foldable.foldl(Data_List_Types.foldableList)(function () { + var $763 = Data_Function.flip(f); + return function ($764) { + return Data_Tuple.uncurry($763($764)); + }; + }())(z)(asList(toUnfoldable(Data_List_Types.unfoldableList)(m))); + }; + }; +}, function (f) { + return function (z) { + return function (m) { + return Data_Foldable.foldr(Data_List_Types.foldableList)(Data_Tuple.uncurry(f))(z)(asList(toUnfoldable(Data_List_Types.unfoldableList)(m))); + }; + }; +}); + +var mapMaybeWithKey = function mapMaybeWithKey(dictOrd) { + return function (f) { + return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexMap)(function (k) { + return function (a) { + return function (acc) { + return Data_Maybe.maybe(acc)(function (b) { + return insert(dictOrd)(k)(b)(acc); + })(f(k)(a)); + }; + }; + })(empty); + }; +}; + +var mapMaybe = function mapMaybe(dictOrd) { + var $765 = mapMaybeWithKey(dictOrd); + return function ($766) { + return $765(Data_Function["const"]($766)); + }; +}; + +var traversableWithIndexMap = new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexMap; +}, function () { + return functorWithIndexMap; +}, function () { + return traversableMap; +}, function (dictApplicative) { + return function (f) { + return function (v) { + if (v instanceof Leaf) { + return Control_Applicative.pure(dictApplicative)(Leaf.value); + } + + ; + + if (v instanceof Two) { + return Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Two.create)(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value0)))(Control_Applicative.pure(dictApplicative)(v.value1)))(f(v.value1)(v.value2)))(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value3)); + } + + ; + + if (v instanceof Three) { + return Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Three.create)(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value0)))(Control_Applicative.pure(dictApplicative)(v.value1)))(f(v.value1)(v.value2)))(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value3)))(Control_Applicative.pure(dictApplicative)(v.value4)))(f(v.value4)(v.value5)))(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value6)); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 136, column 1 - line 150, column 40): " + [f.constructor.name, v.constructor.name]); + }; + }; +}); + +var alter = function alter(dictOrd) { + return function (f) { + return function (k) { + return function (m) { + var v = f(lookup(dictOrd)(k)(m)); + + if (v instanceof Data_Maybe.Nothing) { + return $$delete(dictOrd)(k)(m); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return insert(dictOrd)(k)(v.value0)(m); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 549, column 15 - line 551, column 25): " + [v.constructor.name]); + }; + }; + }; +}; + +var fromFoldableWith = function fromFoldableWith(dictOrd) { + return function (dictFoldable) { + return function (f) { + var combine = function combine(v) { + return function (v1) { + if (v1 instanceof Data_Maybe.Just) { + return Data_Maybe.Just.create(f(v)(v1.value0)); + } + + ; + + if (v1 instanceof Data_Maybe.Nothing) { + return new Data_Maybe.Just(v); + } + + ; + throw new Error("Failed pattern match at Data.Map.Internal (line 566, column 3 - line 566, column 38): " + [v.constructor.name, v1.constructor.name]); + }; + }; + + return Data_Foldable.foldl(dictFoldable)(function (m) { + return function (v) { + return alter(dictOrd)(combine(v.value1))(v.value0)(m); + }; + })(empty); + }; + }; +}; + +var insertWith = function insertWith(dictOrd) { + return function (f) { + return function (k) { + return function (v) { + return alter(dictOrd)(function () { + var $767 = Data_Maybe.maybe(v)(Data_Function.flip(f)(v)); + return function ($768) { + return Data_Maybe.Just.create($767($768)); + }; + }())(k); + }; + }; + }; +}; + +var unionWith = function unionWith(dictOrd) { + return function (f) { + return function (m1) { + return function (m2) { + var go = function go(m) { + return function (v) { + return alter(dictOrd)(function () { + var $769 = Data_Maybe.maybe(v.value1)(f(v.value1)); + return function ($770) { + return Data_Maybe.Just.create($769($770)); + }; + }())(v.value0)(m); + }; + }; + + return Data_Foldable.foldl(Data_List_Types.foldableList)(go)(m2)(toUnfoldable(Data_List_Types.unfoldableList)(m1)); + }; + }; + }; +}; + +var union = function union(dictOrd) { + return unionWith(dictOrd)(Data_Function["const"]); +}; + +var semigroupMap = function semigroupMap(dictOrd) { + return new Data_Semigroup.Semigroup(union(dictOrd)); +}; + +var monoidMap = function monoidMap(dictOrd) { + return new Data_Monoid.Monoid(function () { + return semigroupMap(dictOrd); + }, empty); +}; + +var submap = function submap(dictOrd) { + return function (kmin) { + return function (kmax) { + return foldSubmap(dictOrd)(monoidMap(dictOrd))(kmin)(kmax)(singleton); + }; + }; +}; + +var unions = function unions(dictOrd) { + return function (dictFoldable) { + return Data_Foldable.foldl(dictFoldable)(union(dictOrd))(empty); + }; +}; + +var update = function update(dictOrd) { + return function (f) { + return function (k) { + return function (m) { + return alter(dictOrd)(Data_Maybe.maybe(Data_Maybe.Nothing.value)(f))(k)(m); + }; + }; + }; +}; + +module.exports = { + showTree: showTree, + empty: empty, + isEmpty: isEmpty, + singleton: singleton, + checkValid: checkValid, + insert: insert, + insertWith: insertWith, + lookup: lookup, + lookupLE: lookupLE, + lookupLT: lookupLT, + lookupGE: lookupGE, + lookupGT: lookupGT, + findMin: findMin, + findMax: findMax, + foldSubmap: foldSubmap, + submap: submap, + fromFoldable: fromFoldable, + fromFoldableWith: fromFoldableWith, + fromFoldableWithIndex: fromFoldableWithIndex, + toUnfoldable: toUnfoldable, + toUnfoldableUnordered: toUnfoldableUnordered, + "delete": $$delete, + pop: pop, + member: member, + alter: alter, + update: update, + keys: keys, + values: values, + union: union, + unionWith: unionWith, + unions: unions, + intersection: intersection, + intersectionWith: intersectionWith, + difference: difference, + isSubmap: isSubmap, + size: size, + filterWithKey: filterWithKey, + filterKeys: filterKeys, + filter: filter, + mapMaybeWithKey: mapMaybeWithKey, + mapMaybe: mapMaybe, + eq1Map: eq1Map, + eqMap: eqMap, + ord1Map: ord1Map, + ordMap: ordMap, + showMap: showMap, + semigroupMap: semigroupMap, + monoidMap: monoidMap, + functorMap: functorMap, + functorWithIndexMap: functorWithIndexMap, + foldableMap: foldableMap, + foldableWithIndexMap: foldableWithIndexMap, + traversableMap: traversableMap, + traversableWithIndexMap: traversableWithIndexMap +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.HeytingAlgebra/index.js":"paZe","../Data.List/index.js":"ezw6","../Data.List.Lazy/index.js":"sNBV","../Data.List.Lazy.Types/index.js":"EJF+","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z"}],"jHR9":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_List = require("../Data.List/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Map_Internal = require("../Data.Map.Internal/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Compactable = function Compactable(compact, separate) { + this.compact = compact; + this.separate = separate; +}; + +var separateSequence = function separateSequence(dictAlternative) { + return function (dictFoldable) { + return function (dictCompactable) { + var go = function go(acc) { + return function (v) { + if (v instanceof Data_Either.Left) { + return { + left: Control_Alt.alt(dictAlternative.Plus1().Alt0())(acc.left)(Control_Applicative.pure(dictAlternative.Applicative0())(v.value0)), + right: acc.right + }; + } + + ; + + if (v instanceof Data_Either.Right) { + return { + right: Control_Alt.alt(dictAlternative.Plus1().Alt0())(acc.right)(Control_Applicative.pure(dictAlternative.Applicative0())(v.value0)), + left: acc.left + }; + } + + ; + throw new Error("Failed pattern match at Data.Compactable (line 113, column 14 - line 115, column 54): " + [v.constructor.name]); + }; + }; + + return Data_Foldable.foldl(dictFoldable)(go)({ + left: Control_Plus.empty(dictAlternative.Plus1()), + right: Control_Plus.empty(dictAlternative.Plus1()) + }); + }; + }; +}; + +var separate = function separate(dict) { + return dict.separate; +}; + +var mapToList = function mapToList(dictOrd) { + return Data_Map_Internal.toUnfoldable(Data_List_Types.unfoldableList); +}; + +var compactableMaybe = new Compactable(Control_Bind.join(Data_Maybe.bindMaybe), function (v) { + if (v instanceof Data_Maybe.Nothing) { + return { + left: Data_Maybe.Nothing.value, + right: Data_Maybe.Nothing.value + }; + } + + ; + + if (v instanceof Data_Maybe.Just) { + if (v.value0 instanceof Data_Either.Left) { + return { + left: new Data_Maybe.Just(v.value0.value0), + right: Data_Maybe.Nothing.value + }; + } + + ; + + if (v.value0 instanceof Data_Either.Right) { + return { + left: Data_Maybe.Nothing.value, + right: new Data_Maybe.Just(v.value0.value0) + }; + } + + ; + throw new Error("Failed pattern match at Data.Compactable (line 87, column 23 - line 89, column 48): " + [v.value0.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Compactable (line 83, column 1 - line 89, column 48): " + [v.constructor.name]); +}); + +var compactableMap = function compactableMap(dictOrd) { + return new Compactable(function () { + var select = function select(v) { + return function (m) { + return Data_Map_Internal.alter(dictOrd)(Data_Function["const"](v.value1))(v.value0)(m); + }; + }; + + var $63 = Data_Foldable.foldr(Data_List_Types.foldableList)(select)(Data_Map_Internal.empty); + var $64 = mapToList(dictOrd); + return function ($65) { + return $63($64($65)); + }; + }(), function () { + var select = function select(v) { + return function (v1) { + if (v.value1 instanceof Data_Either.Left) { + return { + left: Data_Map_Internal.insert(dictOrd)(v.value0)(v.value1.value0)(v1.left), + right: v1.right + }; + } + + ; + + if (v.value1 instanceof Data_Either.Right) { + return { + left: v1.left, + right: Data_Map_Internal.insert(dictOrd)(v.value0)(v.value1.value0)(v1.right) + }; + } + + ; + throw new Error("Failed pattern match at Data.Compactable (line 124, column 44 - line 126, column 63): " + [v.value1.constructor.name]); + }; + }; + + var $66 = Data_Foldable.foldr(Data_List_Types.foldableList)(select)({ + left: Data_Map_Internal.empty, + right: Data_Map_Internal.empty + }); + var $67 = mapToList(dictOrd); + return function ($68) { + return $66($67($68)); + }; + }()); +}; + +var compactableList = new Compactable(Data_List.catMaybes, function (xs) { + return separateSequence(Data_List_Types.alternativeList)(Data_List_Types.foldableList)(compactableList)(xs); +}); + +var compactableEither = function compactableEither(dictMonoid) { + return new Compactable(function (v) { + if (v instanceof Data_Either.Left) { + return new Data_Either.Left(v.value0); + } + + ; + + if (v instanceof Data_Either.Right) { + if (v.value0 instanceof Data_Maybe.Just) { + return new Data_Either.Right(v.value0.value0); + } + + ; + + if (v.value0 instanceof Data_Maybe.Nothing) { + return new Data_Either.Left(Data_Monoid.mempty(dictMonoid)); + } + + ; + throw new Error("Failed pattern match at Data.Compactable (line 93, column 23 - line 95, column 27): " + [v.value0.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Compactable (line 91, column 1 - line 100, column 53): " + [v.constructor.name]); + }, function (v) { + if (v instanceof Data_Either.Left) { + return { + left: new Data_Either.Left(v.value0), + right: new Data_Either.Left(v.value0) + }; + } + + ; + + if (v instanceof Data_Either.Right) { + if (v.value0 instanceof Data_Either.Left) { + return { + left: new Data_Either.Right(v.value0.value0), + right: new Data_Either.Left(Data_Monoid.mempty(dictMonoid)) + }; + } + + ; + + if (v.value0 instanceof Data_Either.Right) { + return { + left: new Data_Either.Left(Data_Monoid.mempty(dictMonoid)), + right: new Data_Either.Right(v.value0.value0) + }; + } + + ; + throw new Error("Failed pattern match at Data.Compactable (line 98, column 24 - line 100, column 53): " + [v.value0.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Compactable (line 91, column 1 - line 100, column 53): " + [v.constructor.name]); + }); +}; + +var compactableArray = new Compactable(Data_Array.catMaybes, function (xs) { + return separateSequence(Control_Alternative.alternativeArray)(Data_Foldable.foldableArray)(compactableArray)(xs); +}); + +var compactDefault = function compactDefault(dictFunctor) { + return function (dictCompactable) { + var $69 = separate(dictCompactable); + var $70 = Data_Functor.map(dictFunctor)(Data_Either.note(Data_Unit.unit)); + return function ($71) { + return function (v) { + return v.right; + }($69($70($71))); + }; + }; +}; + +var compact = function compact(dict) { + return dict.compact; +}; + +var separateDefault = function separateDefault(dictFunctor) { + return function (dictCompactable) { + return function (xs) { + var swapEither = function swapEither(e) { + if (e instanceof Data_Either.Left) { + return new Data_Either.Right(e.value0); + } + + ; + + if (e instanceof Data_Either.Right) { + return new Data_Either.Left(e.value0); + } + + ; + throw new Error("Failed pattern match at Data.Compactable (line 79, column 20 - line 81, column 24): " + [e.constructor.name]); + }; + + return { + left: compact(dictCompactable)(Data_Functor.map(dictFunctor)(function ($72) { + return Data_Either.hush(swapEither($72)); + })(xs)), + right: compact(dictCompactable)(Data_Functor.map(dictFunctor)(Data_Either.hush)(xs)) + }; + }; + }; +}; + +var bindMaybe = function bindMaybe(dictBind) { + return function (dictCompactable) { + return function (x) { + var $73 = compact(dictCompactable); + var $74 = Control_Bind.bind(dictBind)(x); + return function ($75) { + return $73($74($75)); + }; + }; + }; +}; + +var bindEither = function bindEither(dictBind) { + return function (dictCompactable) { + return function (x) { + var $76 = separate(dictCompactable); + var $77 = Control_Bind.bind(dictBind)(x); + return function ($78) { + return $76($77($78)); + }; + }; + }; +}; + +var applyMaybe = function applyMaybe(dictApply) { + return function (dictCompactable) { + return function (p) { + var $79 = compact(dictCompactable); + var $80 = Control_Apply.apply(dictApply)(p); + return function ($81) { + return $79($80($81)); + }; + }; + }; +}; + +var applyEither = function applyEither(dictApply) { + return function (dictCompactable) { + return function (p) { + var $82 = separate(dictCompactable); + var $83 = Control_Apply.apply(dictApply)(p); + return function ($84) { + return $82($83($84)); + }; + }; + }; +}; + +module.exports = { + Compactable: Compactable, + compact: compact, + separate: separate, + compactDefault: compactDefault, + separateDefault: separateDefault, + applyMaybe: applyMaybe, + applyEither: applyEither, + bindMaybe: bindMaybe, + bindEither: bindEither, + compactableMaybe: compactableMaybe, + compactableEither: compactableEither, + compactableArray: compactableArray, + compactableList: compactableList, + compactableMap: compactableMap +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Plus/index.js":"oMBg","../Data.Array/index.js":"4t4C","../Data.Either/index.js":"B2JL","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Unit/index.js":"NhVk"}],"6hfS":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Bind = require("../Control.Bind/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_Compactable = require("../Data.Compactable/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_List = require("../Data.List/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Map_Internal = require("../Data.Map.Internal/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Filterable = function Filterable(Compactable0, Functor1, filter, filterMap, partition, partitionMap) { + this.Compactable0 = Compactable0; + this.Functor1 = Functor1; + this.filter = filter; + this.filterMap = filterMap; + this.partition = partition; + this.partitionMap = partitionMap; +}; + +var partitionMapDefault = function partitionMapDefault(dictFilterable) { + return function (p) { + var $82 = Data_Compactable.separate(dictFilterable.Compactable0()); + var $83 = Data_Functor.map(dictFilterable.Functor1())(p); + return function ($84) { + return $82($83($84)); + }; + }; +}; + +var partitionMap = function partitionMap(dict) { + return dict.partitionMap; +}; + +var partition = function partition(dict) { + return dict.partition; +}; + +var maybeBool = function maybeBool(p) { + return function (x) { + var $33 = p(x); + + if ($33) { + return new Data_Maybe.Just(x); + } + + ; + return Data_Maybe.Nothing.value; + }; +}; + +var filterableList = new Filterable(function () { + return Data_Compactable.compactableList; +}, function () { + return Data_List_Types.functorList; +}, Data_List.filter, function (p) { + return Data_List.mapMaybe(p); +}, function (p) { + return function (xs) { + var select = function select(x) { + return function (v) { + var $36 = p(x); + + if ($36) { + return { + no: v.no, + yes: new Data_List_Types.Cons(x, v.yes) + }; + } + + ; + return { + no: new Data_List_Types.Cons(x, v.no), + yes: v.yes + }; + }; + }; + + return Data_Foldable.foldr(Data_List_Types.foldableList)(select)({ + no: Data_List_Types.Nil.value, + yes: Data_List_Types.Nil.value + })(xs); + }; +}, function (p) { + return function (xs) { + var select = function select(x) { + return function (v) { + var v1 = p(x); + + if (v1 instanceof Data_Either.Left) { + return { + left: new Data_List_Types.Cons(v1.value0, v.left), + right: v.right + }; + } + + ; + + if (v1 instanceof Data_Either.Right) { + return { + left: v.left, + right: new Data_List_Types.Cons(v1.value0, v.right) + }; + } + + ; + throw new Error("Failed pattern match at Data.Filterable (line 190, column 36 - line 192, column 83): " + [v1.constructor.name]); + }; + }; + + return Data_Foldable.foldr(Data_List_Types.foldableList)(select)({ + left: Data_List_Types.Nil.value, + right: Data_List_Types.Nil.value + })(xs); + }; +}); +var filterableArray = new Filterable(function () { + return Data_Compactable.compactableArray; +}, function () { + return Data_Functor.functorArray; +}, Data_Array.filter, Data_Array.mapMaybe, Data_Array.partition, function (p) { + var go = function go(acc) { + return function (x) { + var v = p(x); + + if (v instanceof Data_Either.Left) { + return { + left: Data_Semigroup.append(Data_Semigroup.semigroupArray)(acc.left)([v.value0]), + right: acc.right + }; + } + + ; + + if (v instanceof Data_Either.Right) { + return { + right: Data_Semigroup.append(Data_Semigroup.semigroupArray)(acc.right)([v.value0]), + left: acc.left + }; + } + + ; + throw new Error("Failed pattern match at Data.Filterable (line 149, column 16 - line 151, column 50): " + [v.constructor.name]); + }; + }; + + return Data_Foldable.foldl(Data_Foldable.foldableArray)(go)({ + left: [], + right: [] + }); +}); + +var filterMapDefault = function filterMapDefault(dictFilterable) { + return function (p) { + var $85 = Data_Compactable.compact(dictFilterable.Compactable0()); + var $86 = Data_Functor.map(dictFilterable.Functor1())(p); + return function ($87) { + return $85($86($87)); + }; + }; +}; + +var filterMap = function filterMap(dict) { + return dict.filterMap; +}; + +var partitionDefaultFilterMap = function partitionDefaultFilterMap(dictFilterable) { + return function (p) { + return function (xs) { + return { + yes: filterMap(dictFilterable)(maybeBool(p))(xs), + no: filterMap(dictFilterable)(maybeBool(Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraFunction(Data_HeytingAlgebra.heytingAlgebraBoolean))(p)))(xs) + }; + }; + }; +}; + +var filterDefaultPartition = function filterDefaultPartition(dictFilterable) { + return function (p) { + return function (xs) { + return partition(dictFilterable)(p)(xs).yes; + }; + }; +}; + +var filterDefault = function filterDefault(dictFilterable) { + var $88 = filterMap(dictFilterable); + return function ($89) { + return $88(maybeBool($89)); + }; +}; + +var filter = function filter(dict) { + return dict.filter; +}; + +var partitionDefaultFilter = function partitionDefaultFilter(dictFilterable) { + return function (p) { + return function (xs) { + return { + yes: filter(dictFilterable)(p)(xs), + no: filter(dictFilterable)(Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraFunction(Data_HeytingAlgebra.heytingAlgebraBoolean))(p))(xs) + }; + }; + }; +}; + +var eitherBool = function eitherBool(p) { + return function (x) { + var $49 = p(x); + + if ($49) { + return new Data_Either.Right(x); + } + + ; + return new Data_Either.Left(x); + }; +}; + +var filterDefaultPartitionMap = function filterDefaultPartitionMap(dictFilterable) { + return function (p) { + return function (xs) { + return partitionMap(dictFilterable)(eitherBool(p))(xs).right; + }; + }; +}; + +var partitionDefault = function partitionDefault(dictFilterable) { + return function (p) { + return function (xs) { + var o = partitionMap(dictFilterable)(eitherBool(p))(xs); + return { + no: o.left, + yes: o.right + }; + }; + }; +}; + +var filterableEither = function filterableEither(dictMonoid) { + return new Filterable(function () { + return Data_Compactable.compactableEither(dictMonoid); + }, function () { + return Data_Either.functorEither; + }, function (p) { + return filterDefault(filterableEither(dictMonoid))(p); + }, function (p) { + return function (v) { + if (v instanceof Data_Either.Left) { + return new Data_Either.Left(v.value0); + } + + ; + + if (v instanceof Data_Either.Right) { + var v1 = p(v.value0); + + if (v1 instanceof Data_Maybe.Nothing) { + return new Data_Either.Left(Data_Monoid.mempty(dictMonoid)); + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + return new Data_Either.Right(v1.value0); + } + + ; + throw new Error("Failed pattern match at Data.Filterable (line 180, column 27 - line 182, column 22): " + [v1.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Filterable (line 171, column 1 - line 184, column 29): " + [p.constructor.name, v.constructor.name]); + }; + }, function (p) { + return partitionDefault(filterableEither(dictMonoid))(p); + }, function (p) { + return function (v) { + if (v instanceof Data_Either.Left) { + return { + left: new Data_Either.Left(v.value0), + right: new Data_Either.Left(v.value0) + }; + } + + ; + + if (v instanceof Data_Either.Right) { + var v1 = p(v.value0); + + if (v1 instanceof Data_Either.Left) { + return { + left: new Data_Either.Right(v1.value0), + right: new Data_Either.Left(Data_Monoid.mempty(dictMonoid)) + }; + } + + ; + + if (v1 instanceof Data_Either.Right) { + return { + left: new Data_Either.Left(Data_Monoid.mempty(dictMonoid)), + right: new Data_Either.Right(v1.value0) + }; + } + + ; + throw new Error("Failed pattern match at Data.Filterable (line 173, column 30 - line 175, column 53): " + [v1.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Filterable (line 171, column 1 - line 184, column 29): " + [p.constructor.name, v.constructor.name]); + }; + }); +}; + +var filterableMap = function filterableMap(dictOrd) { + return new Filterable(function () { + return Data_Compactable.compactableMap(dictOrd); + }, function () { + return Data_Map_Internal.functorMap; + }, function (p) { + return filterDefault(filterableMap(dictOrd))(p); + }, function (p) { + return function (xs) { + var toList = Data_Map_Internal.toUnfoldable(Data_List_Types.unfoldableList); + + var select = function select(v) { + return function (m) { + return Data_Map_Internal.alter(dictOrd)(Data_Function["const"](p(v.value1)))(v.value0)(m); + }; + }; + + return Data_Foldable.foldr(Data_List_Types.foldableList)(select)(Data_Map_Internal.empty)(toList(xs)); + }; + }, function (p) { + return partitionDefault(filterableMap(dictOrd))(p); + }, function (p) { + return function (xs) { + var toList = Data_Map_Internal.toUnfoldable(Data_List_Types.unfoldableList); + + var select = function select(v) { + return function (v1) { + var v2 = p(v.value1); + + if (v2 instanceof Data_Either.Left) { + return { + left: Data_Map_Internal.insert(dictOrd)(v.value0)(v2.value0)(v1.left), + right: v1.right + }; + } + + ; + + if (v2 instanceof Data_Either.Right) { + return { + left: v1.left, + right: Data_Map_Internal.insert(dictOrd)(v.value0)(v2.value0)(v1.right) + }; + } + + ; + throw new Error("Failed pattern match at Data.Filterable (line 215, column 44 - line 217, column 57): " + [v2.constructor.name]); + }; + }; + + return Data_Foldable.foldr(Data_List_Types.foldableList)(select)({ + left: Data_Map_Internal.empty, + right: Data_Map_Internal.empty + })(toList(xs)); + }; + }); +}; + +var filterableMaybe = new Filterable(function () { + return Data_Compactable.compactableMaybe; +}, function () { + return Data_Maybe.functorMaybe; +}, function (p) { + return filterDefault(filterableMaybe)(p); +}, Control_Bind.bindFlipped(Data_Maybe.bindMaybe), function (p) { + return partitionDefault(filterableMaybe)(p); +}, function (p) { + return function (v) { + if (v instanceof Data_Maybe.Nothing) { + return { + left: Data_Maybe.Nothing.value, + right: Data_Maybe.Nothing.value + }; + } + + ; + + if (v instanceof Data_Maybe.Just) { + var v1 = p(v.value0); + + if (v1 instanceof Data_Either.Left) { + return { + left: new Data_Maybe.Just(v1.value0), + right: Data_Maybe.Nothing.value + }; + } + + ; + + if (v1 instanceof Data_Either.Right) { + return { + left: Data_Maybe.Nothing.value, + right: new Data_Maybe.Just(v1.value0) + }; + } + + ; + throw new Error("Failed pattern match at Data.Filterable (line 161, column 29 - line 163, column 48): " + [v1.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Data.Filterable (line 159, column 1 - line 169, column 29): " + [p.constructor.name, v.constructor.name]); + }; +}); + +var cleared = function cleared(dictFilterable) { + return filterMap(dictFilterable)(Data_Function["const"](Data_Maybe.Nothing.value)); +}; + +module.exports = { + Filterable: Filterable, + partitionMap: partitionMap, + partition: partition, + filterMap: filterMap, + filter: filter, + eitherBool: eitherBool, + partitionDefault: partitionDefault, + partitionDefaultFilter: partitionDefaultFilter, + partitionDefaultFilterMap: partitionDefaultFilterMap, + partitionMapDefault: partitionMapDefault, + maybeBool: maybeBool, + filterDefault: filterDefault, + filterDefaultPartition: filterDefaultPartition, + filterDefaultPartitionMap: filterDefaultPartitionMap, + filterMapDefault: filterMapDefault, + cleared: cleared, + filterableArray: filterableArray, + filterableMaybe: filterableMaybe, + filterableEither: filterableEither, + filterableList: filterableList, + filterableMap: filterableMap +}; +},{"../Control.Bind/index.js":"7VcT","../Data.Array/index.js":"4t4C","../Data.Compactable/index.js":"jHR9","../Data.Either/index.js":"B2JL","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ"}],"AuzG":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Inl = function () { + function Inl(value0) { + this.value0 = value0; + } + + ; + + Inl.create = function (value0) { + return new Inl(value0); + }; + + return Inl; +}(); + +var Inr = function () { + function Inr(value0) { + this.value0 = value0; + } + + ; + + Inr.create = function (value0) { + return new Inr(value0); + }; + + return Inr; +}(); + +var Product = function () { + function Product(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Product.create = function (value0) { + return function (value1) { + return new Product(value0, value1); + }; + }; + + return Product; +}(); + +var NoArguments = function () { + function NoArguments() {} + + ; + NoArguments.value = new NoArguments(); + return NoArguments; +}(); + +var Constructor = function Constructor(x) { + return x; +}; + +var Argument = function Argument(x) { + return x; +}; + +var Generic = function Generic(from, to) { + this.from = from; + this.to = to; +}; + +var to = function to(dict) { + return dict.to; +}; + +var genericMaybe = new Generic(function (v) { + if (v instanceof Data_Maybe.Nothing) { + return new Inl(NoArguments.value); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return new Inr(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.Generic.Rep (line 40, column 1 - line 47, column 49): " + [v.constructor.name]); +}, function (v) { + if (v instanceof Inl) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Inr) { + return new Data_Maybe.Just(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.Generic.Rep (line 40, column 1 - line 47, column 49): " + [v.constructor.name]); +}); + +var from = function from(dict) { + return dict.from; +}; + +module.exports = { + Generic: Generic, + to: to, + from: from, + NoArguments: NoArguments, + Inl: Inl, + Inr: Inr, + Product: Product, + Constructor: Constructor, + Argument: Argument, + genericMaybe: genericMaybe +}; +},{"../Data.Maybe/index.js":"5mN7"}],"lpst":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Generic_Rep = require("../Data.Generic.Rep/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var GenericShowArgs = function GenericShowArgs(genericShowArgs) { + this.genericShowArgs = genericShowArgs; +}; + +var GenericShow = function GenericShow(genericShow$prime) { + this["genericShow'"] = genericShow$prime; +}; + +var genericShowArgsNoArguments = new GenericShowArgs(function (v) { + return []; +}); + +var genericShowArgsArgument = function genericShowArgsArgument(dictShow) { + return new GenericShowArgs(function (v) { + return [Data_Show.show(dictShow)(v)]; + }); +}; + +var genericShowArgs = function genericShowArgs(dict) { + return dict.genericShowArgs; +}; + +var genericShowArgsProduct = function genericShowArgsProduct(dictGenericShowArgs) { + return function (dictGenericShowArgs1) { + return new GenericShowArgs(function (v) { + return Data_Semigroup.append(Data_Semigroup.semigroupArray)(genericShowArgs(dictGenericShowArgs)(v.value0))(genericShowArgs(dictGenericShowArgs1)(v.value1)); + }); + }; +}; + +var genericShowConstructor = function genericShowConstructor(dictGenericShowArgs) { + return function (dictIsSymbol) { + return new GenericShow(function (v) { + var ctor = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var v1 = genericShowArgs(dictGenericShowArgs)(v); + + if (v1.length === 0) { + return ctor; + } + + ; + return "(" + (Data_Foldable.intercalate(Data_Foldable.foldableArray)(Data_Monoid.monoidString)(" ")(Data_Semigroup.append(Data_Semigroup.semigroupArray)([ctor])(v1)) + ")"); + }); + }; +}; + +var genericShow$prime = function genericShow$prime(dict) { + return dict["genericShow'"]; +}; + +var genericShowNoConstructors = new GenericShow(function (a) { + return genericShow$prime(genericShowNoConstructors)(a); +}); + +var genericShowSum = function genericShowSum(dictGenericShow) { + return function (dictGenericShow1) { + return new GenericShow(function (v) { + if (v instanceof Data_Generic_Rep.Inl) { + return genericShow$prime(dictGenericShow)(v.value0); + } + + ; + + if (v instanceof Data_Generic_Rep.Inr) { + return genericShow$prime(dictGenericShow1)(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.Generic.Rep.Show (line 26, column 1 - line 28, column 40): " + [v.constructor.name]); + }); + }; +}; + +var genericShow = function genericShow(dictGeneric) { + return function (dictGenericShow) { + return function (x) { + return genericShow$prime(dictGenericShow)(Data_Generic_Rep.from(dictGeneric)(x)); + }; + }; +}; + +module.exports = { + GenericShow: GenericShow, + "genericShow'": genericShow$prime, + genericShow: genericShow, + GenericShowArgs: GenericShowArgs, + genericShowArgs: genericShowArgs, + genericShowNoConstructors: genericShowNoConstructors, + genericShowArgsNoArguments: genericShowArgsNoArguments, + genericShowSum: genericShowSum, + genericShowArgsProduct: genericShowArgsProduct, + genericShowConstructor: genericShowConstructor, + genericShowArgsArgument: genericShowArgsArgument +}; +},{"../Data.Foldable/index.js":"eVDl","../Data.Generic.Rep/index.js":"AuzG","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Symbol/index.js":"4oJQ"}],"89+t":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Void = require("../Data.Void/index.js"); + +var Contravariant = function Contravariant(cmap) { + this.cmap = cmap; +}; + +var cmap = function cmap(dict) { + return dict.cmap; +}; + +var cmapFlipped = function cmapFlipped(dictContravariant) { + return function (x) { + return function (f) { + return cmap(dictContravariant)(f)(x); + }; + }; +}; + +var coerce = function coerce(dictContravariant) { + return function (dictFunctor) { + return function (a) { + return Data_Functor.map(dictFunctor)(Data_Void.absurd)(cmap(dictContravariant)(Data_Void.absurd)(a)); + }; + }; +}; + +var imapC = function imapC(dictContravariant) { + return function (v) { + return function (f) { + return cmap(dictContravariant)(f); + }; + }; +}; + +module.exports = { + cmap: cmap, + Contravariant: Contravariant, + cmapFlipped: cmapFlipped, + coerce: coerce, + imapC: imapC +}; +},{"../Data.Functor/index.js":"+0AE","../Data.Void/index.js":"bncE"}],"OmNG":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Bifoldable = require("../Data.Bifoldable/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Bitraversable = require("../Data.Bitraversable/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Functor_Contravariant = require("../Data.Functor.Contravariant/index.js"); + +var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Const = function Const(x) { + return x; +}; + +var showConst = function showConst(dictShow) { + return new Data_Show.Show(function (v) { + return "(Const " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semiringConst = function semiringConst(dictSemiring) { + return dictSemiring; +}; + +var semigroupoidConst = new Control_Semigroupoid.Semigroupoid(function (v) { + return function (v1) { + return v1; + }; +}); + +var semigroupConst = function semigroupConst(dictSemigroup) { + return dictSemigroup; +}; + +var ringConst = function ringConst(dictRing) { + return dictRing; +}; + +var ordConst = function ordConst(dictOrd) { + return dictOrd; +}; + +var newtypeConst = new Data_Newtype.Newtype(function (n) { + return n; +}, Const); + +var monoidConst = function monoidConst(dictMonoid) { + return dictMonoid; +}; + +var heytingAlgebraConst = function heytingAlgebraConst(dictHeytingAlgebra) { + return dictHeytingAlgebra; +}; + +var functorConst = new Data_Functor.Functor(function (f) { + return function (m) { + return m; + }; +}); +var functorWithIndexConst = new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorConst; +}, function (v) { + return function (v1) { + return v1; + }; +}); +var invariantConst = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorConst)); +var foldableConst = new Data_Foldable.Foldable(function (dictMonoid) { + return function (v) { + return function (v1) { + return Data_Monoid.mempty(dictMonoid); + }; + }; +}, function (v) { + return function (z) { + return function (v1) { + return z; + }; + }; +}, function (v) { + return function (z) { + return function (v1) { + return z; + }; + }; +}); +var foldableWithIndexConst = new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableConst; +}, function (dictMonoid) { + return function (v) { + return function (v1) { + return Data_Monoid.mempty(dictMonoid); + }; + }; +}, function (v) { + return function (z) { + return function (v1) { + return z; + }; + }; +}, function (v) { + return function (z) { + return function (v1) { + return z; + }; + }; +}); +var traversableConst = new Data_Traversable.Traversable(function () { + return foldableConst; +}, function () { + return functorConst; +}, function (dictApplicative) { + return function (v) { + return Control_Applicative.pure(dictApplicative)(v); + }; +}, function (dictApplicative) { + return function (v) { + return function (v1) { + return Control_Applicative.pure(dictApplicative)(v1); + }; + }; +}); +var traversableWithIndexConst = new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexConst; +}, function () { + return functorWithIndexConst; +}, function () { + return traversableConst; +}, function (dictApplicative) { + return function (v) { + return function (v1) { + return Control_Applicative.pure(dictApplicative)(v1); + }; + }; +}); + +var euclideanRingConst = function euclideanRingConst(dictEuclideanRing) { + return dictEuclideanRing; +}; + +var eqConst = function eqConst(dictEq) { + return dictEq; +}; + +var eq1Const = function eq1Const(dictEq) { + return new Data_Eq.Eq1(function (dictEq1) { + return Data_Eq.eq(eqConst(dictEq)); + }); +}; + +var ord1Const = function ord1Const(dictOrd) { + return new Data_Ord.Ord1(function () { + return eq1Const(dictOrd.Eq0()); + }, function (dictOrd1) { + return Data_Ord.compare(ordConst(dictOrd)); + }); +}; + +var contravariantConst = new Data_Functor_Contravariant.Contravariant(function (v) { + return function (v1) { + return v1; + }; +}); + +var commutativeRingConst = function commutativeRingConst(dictCommutativeRing) { + return dictCommutativeRing; +}; + +var boundedConst = function boundedConst(dictBounded) { + return dictBounded; +}; + +var booleanAlgebraConst = function booleanAlgebraConst(dictBooleanAlgebra) { + return dictBooleanAlgebra; +}; + +var bifunctorConst = new Data_Bifunctor.Bifunctor(function (f) { + return function (v) { + return function (v1) { + return f(v1); + }; + }; +}); +var bifoldableConst = new Data_Bifoldable.Bifoldable(function (dictMonoid) { + return function (f) { + return function (v) { + return function (v1) { + return f(v1); + }; + }; + }; +}, function (f) { + return function (v) { + return function (z) { + return function (v1) { + return f(z)(v1); + }; + }; + }; +}, function (f) { + return function (v) { + return function (z) { + return function (v1) { + return f(v1)(z); + }; + }; + }; +}); +var bitraversableConst = new Data_Bitraversable.Bitraversable(function () { + return bifoldableConst; +}, function () { + return bifunctorConst; +}, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Const)(v); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return function (v1) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Const)(f(v1)); + }; + }; + }; +}); + +var applyConst = function applyConst(dictSemigroup) { + return new Control_Apply.Apply(function () { + return functorConst; + }, function (v) { + return function (v1) { + return Data_Semigroup.append(dictSemigroup)(v)(v1); + }; + }); +}; + +var applicativeConst = function applicativeConst(dictMonoid) { + return new Control_Applicative.Applicative(function () { + return applyConst(dictMonoid.Semigroup0()); + }, function (v) { + return Data_Monoid.mempty(dictMonoid); + }); +}; + +module.exports = { + Const: Const, + newtypeConst: newtypeConst, + eqConst: eqConst, + eq1Const: eq1Const, + ordConst: ordConst, + ord1Const: ord1Const, + boundedConst: boundedConst, + showConst: showConst, + semigroupoidConst: semigroupoidConst, + semigroupConst: semigroupConst, + monoidConst: monoidConst, + semiringConst: semiringConst, + ringConst: ringConst, + euclideanRingConst: euclideanRingConst, + commutativeRingConst: commutativeRingConst, + heytingAlgebraConst: heytingAlgebraConst, + booleanAlgebraConst: booleanAlgebraConst, + functorConst: functorConst, + bifunctorConst: bifunctorConst, + functorWithIndexConst: functorWithIndexConst, + invariantConst: invariantConst, + contravariantConst: contravariantConst, + applyConst: applyConst, + applicativeConst: applicativeConst, + foldableConst: foldableConst, + foldableWithIndexConst: foldableWithIndexConst, + bifoldableConst: bifoldableConst, + traversableConst: traversableConst, + traversableWithIndexConst: traversableWithIndexConst, + bitraversableConst: bitraversableConst +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Semigroupoid/index.js":"/riR","../Data.Bifoldable/index.js":"wjQo","../Data.Bifunctor/index.js":"e2Wc","../Data.Bitraversable/index.js":"8nb9","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Functor/index.js":"+0AE","../Data.Functor.Contravariant/index.js":"89+t","../Data.Functor.Invariant/index.js":"AXkC","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF"}],"0DaD":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Profunctor = function Profunctor(dimap) { + this.dimap = dimap; +}; + +var profunctorFn = new Profunctor(function (a2b) { + return function (c2d) { + return function (b2c) { + return function ($9) { + return c2d(b2c(a2b($9))); + }; + }; + }; +}); + +var dimap = function dimap(dict) { + return dict.dimap; +}; + +var lcmap = function lcmap(dictProfunctor) { + return function (a2b) { + return dimap(dictProfunctor)(a2b)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var rmap = function rmap(dictProfunctor) { + return function (b2c) { + return dimap(dictProfunctor)(Control_Category.identity(Control_Category.categoryFn))(b2c); + }; +}; + +var unwrapIso = function unwrapIso(dictProfunctor) { + return function (dictNewtype) { + return dimap(dictProfunctor)(Data_Newtype.wrap(dictNewtype))(Data_Newtype.unwrap(dictNewtype)); + }; +}; + +var wrapIso = function wrapIso(dictProfunctor) { + return function (dictNewtype) { + return function (v) { + return dimap(dictProfunctor)(Data_Newtype.unwrap(dictNewtype))(Data_Newtype.wrap(dictNewtype)); + }; + }; +}; + +var arr = function arr(dictCategory) { + return function (dictProfunctor) { + return function (f) { + return rmap(dictProfunctor)(f)(Control_Category.identity(dictCategory)); + }; + }; +}; + +module.exports = { + dimap: dimap, + Profunctor: Profunctor, + lcmap: lcmap, + rmap: rmap, + arr: arr, + unwrapIso: unwrapIso, + wrapIso: wrapIso, + profunctorFn: profunctorFn +}; +},{"../Control.Category/index.js":"IAi2","../Data.Newtype/index.js":"lz8k"}],"nkqb":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Choice = function Choice(Profunctor0, left, right) { + this.Profunctor0 = Profunctor0; + this.left = left; + this.right = right; +}; + +var right = function right(dict) { + return dict.right; +}; + +var left = function left(dict) { + return dict.left; +}; + +var splitChoice = function splitChoice(dictCategory) { + return function (dictChoice) { + return function (l) { + return function (r) { + return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(left(dictChoice)(l))(right(dictChoice)(r)); + }; + }; + }; +}; + +var fanin = function fanin(dictCategory) { + return function (dictChoice) { + return function (l) { + return function (r) { + var join = Data_Profunctor.dimap(dictChoice.Profunctor0())(Data_Either.either(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn)))(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(dictCategory)); + return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(splitChoice(dictCategory)(dictChoice)(l)(r))(join); + }; + }; + }; +}; + +var choiceFn = new Choice(function () { + return Data_Profunctor.profunctorFn; +}, function (v) { + return function (v1) { + if (v1 instanceof Data_Either.Left) { + return Data_Either.Left.create(v(v1.value0)); + } + + ; + + if (v1 instanceof Data_Either.Right) { + return new Data_Either.Right(v1.value0); + } + + ; + throw new Error("Failed pattern match at Data.Profunctor.Choice (line 32, column 1 - line 35, column 16): " + [v.constructor.name, v1.constructor.name]); + }; +}, Data_Functor.map(Data_Either.functorEither)); +module.exports = { + left: left, + right: right, + Choice: Choice, + splitChoice: splitChoice, + fanin: fanin, + choiceFn: choiceFn +}; +},{"../Control.Category/index.js":"IAi2","../Control.Semigroupoid/index.js":"/riR","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Profunctor/index.js":"0DaD"}],"af4y":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Closed = function Closed(Profunctor0, closed) { + this.Profunctor0 = Profunctor0; + this.closed = closed; +}; + +var closedFunction = new Closed(function () { + return Data_Profunctor.profunctorFn; +}, Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)); + +var closed = function closed(dict) { + return dict.closed; +}; + +module.exports = { + closed: closed, + Closed: Closed, + closedFunction: closedFunction +}; +},{"../Control.Semigroupoid/index.js":"/riR","../Data.Profunctor/index.js":"0DaD"}],"w9p6":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Strong = function Strong(Profunctor0, first, second) { + this.Profunctor0 = Profunctor0; + this.first = first; + this.second = second; +}; + +var strongFn = new Strong(function () { + return Data_Profunctor.profunctorFn; +}, function (a2b) { + return function (v) { + return new Data_Tuple.Tuple(a2b(v.value0), v.value1); + }; +}, Data_Functor.map(Data_Tuple.functorTuple)); + +var second = function second(dict) { + return dict.second; +}; + +var first = function first(dict) { + return dict.first; +}; + +var splitStrong = function splitStrong(dictCategory) { + return function (dictStrong) { + return function (l) { + return function (r) { + return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(first(dictStrong)(l))(second(dictStrong)(r)); + }; + }; + }; +}; + +var fanout = function fanout(dictCategory) { + return function (dictStrong) { + return function (l) { + return function (r) { + var split = Data_Profunctor.dimap(dictStrong.Profunctor0())(Control_Category.identity(Control_Category.categoryFn))(function (a) { + return new Data_Tuple.Tuple(a, a); + })(Control_Category.identity(dictCategory)); + return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(split)(splitStrong(dictCategory)(dictStrong)(l)(r)); + }; + }; + }; +}; + +module.exports = { + first: first, + second: second, + Strong: Strong, + splitStrong: splitStrong, + fanout: fanout, + strongFn: strongFn +}; +},{"../Control.Category/index.js":"IAi2","../Control.Semigroupoid/index.js":"/riR","../Data.Functor/index.js":"+0AE","../Data.Profunctor/index.js":"0DaD","../Data.Tuple/index.js":"II/O"}],"tj5E":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_MonadPlus = require("../Control.MonadPlus/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Distributive = require("../Data.Distributive/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js"); + +var Data_Profunctor_Closed = require("../Data.Profunctor.Closed/index.js"); + +var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Star = function Star(x) { + return x; +}; + +var semigroupoidStar = function semigroupoidStar(dictBind) { + return new Control_Semigroupoid.Semigroupoid(function (v) { + return function (v1) { + return function (x) { + return Control_Bind.bind(dictBind)(v1(x))(v); + }; + }; + }); +}; + +var profunctorStar = function profunctorStar(dictFunctor) { + return new Data_Profunctor.Profunctor(function (f) { + return function (g) { + return function (v) { + var $78 = Data_Functor.map(dictFunctor)(g); + return function ($79) { + return $78(v(f($79))); + }; + }; + }; + }); +}; + +var strongStar = function strongStar(dictFunctor) { + return new Data_Profunctor_Strong.Strong(function () { + return profunctorStar(dictFunctor); + }, function (v) { + return function (v1) { + return Data_Functor.map(dictFunctor)(function (v2) { + return new Data_Tuple.Tuple(v2, v1.value1); + })(v(v1.value0)); + }; + }, function (v) { + return function (v1) { + return Data_Functor.map(dictFunctor)(Data_Tuple.Tuple.create(v1.value0))(v(v1.value1)); + }; + }); +}; + +var newtypeStar = new Data_Newtype.Newtype(function (n) { + return n; +}, Star); + +var invariantStar = function invariantStar(dictInvariant) { + return new Data_Functor_Invariant.Invariant(function (f) { + return function (g) { + return function (v) { + var $80 = Data_Functor_Invariant.imap(dictInvariant)(f)(g); + return function ($81) { + return $80(v($81)); + }; + }; + }; + }); +}; + +var hoistStar = function hoistStar(f) { + return function (v) { + return function ($82) { + return f(v($82)); + }; + }; +}; + +var functorStar = function functorStar(dictFunctor) { + return new Data_Functor.Functor(function (f) { + return function (v) { + var $83 = Data_Functor.map(dictFunctor)(f); + return function ($84) { + return $83(v($84)); + }; + }; + }); +}; + +var distributiveStar = function distributiveStar(dictDistributive) { + return new Data_Distributive.Distributive(function () { + return functorStar(dictDistributive.Functor0()); + }, function (dictFunctor) { + return function (f) { + var $85 = Data_Distributive.distribute(distributiveStar(dictDistributive))(dictFunctor); + var $86 = Data_Functor.map(dictFunctor)(f); + return function ($87) { + return $85($86($87)); + }; + }; + }, function (dictFunctor) { + return function (f) { + return function (a) { + return Data_Distributive.collect(dictDistributive)(dictFunctor)(function (v) { + return v(a); + })(f); + }; + }; + }); +}; + +var closedStar = function closedStar(dictDistributive) { + return new Data_Profunctor_Closed.Closed(function () { + return profunctorStar(dictDistributive.Functor0()); + }, function (v) { + return function (g) { + return Data_Distributive.distribute(dictDistributive)(Data_Functor.functorFn)(function ($88) { + return v(g($88)); + }); + }; + }); +}; + +var choiceStar = function choiceStar(dictApplicative) { + return new Data_Profunctor_Choice.Choice(function () { + return profunctorStar(dictApplicative.Apply0().Functor0()); + }, function (v) { + return Star(Data_Either.either(function () { + var $89 = Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Either.Left.create); + return function ($90) { + return $89(v($90)); + }; + }())(function () { + var $91 = Control_Applicative.pure(dictApplicative); + return function ($92) { + return $91(Data_Either.Right.create($92)); + }; + }())); + }, function (v) { + return Star(Data_Either.either(function () { + var $93 = Control_Applicative.pure(dictApplicative); + return function ($94) { + return $93(Data_Either.Left.create($94)); + }; + }())(function () { + var $95 = Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Either.Right.create); + return function ($96) { + return $95(v($96)); + }; + }())); + }); +}; + +var categoryStar = function categoryStar(dictMonad) { + return new Control_Category.Category(function () { + return semigroupoidStar(dictMonad.Bind1()); + }, Control_Applicative.pure(dictMonad.Applicative0())); +}; + +var applyStar = function applyStar(dictApply) { + return new Control_Apply.Apply(function () { + return functorStar(dictApply.Functor0()); + }, function (v) { + return function (v1) { + return function (a) { + return Control_Apply.apply(dictApply)(v(a))(v1(a)); + }; + }; + }); +}; + +var bindStar = function bindStar(dictBind) { + return new Control_Bind.Bind(function () { + return applyStar(dictBind.Apply0()); + }, function (v) { + return function (f) { + return function (x) { + return Control_Bind.bind(dictBind)(v(x))(function (a) { + var v1 = f(a); + return v1(x); + }); + }; + }; + }); +}; + +var applicativeStar = function applicativeStar(dictApplicative) { + return new Control_Applicative.Applicative(function () { + return applyStar(dictApplicative.Apply0()); + }, function (a) { + return function (v) { + return Control_Applicative.pure(dictApplicative)(a); + }; + }); +}; + +var monadStar = function monadStar(dictMonad) { + return new Control_Monad.Monad(function () { + return applicativeStar(dictMonad.Applicative0()); + }, function () { + return bindStar(dictMonad.Bind1()); + }); +}; + +var altStar = function altStar(dictAlt) { + return new Control_Alt.Alt(function () { + return functorStar(dictAlt.Functor0()); + }, function (v) { + return function (v1) { + return function (a) { + return Control_Alt.alt(dictAlt)(v(a))(v1(a)); + }; + }; + }); +}; + +var plusStar = function plusStar(dictPlus) { + return new Control_Plus.Plus(function () { + return altStar(dictPlus.Alt0()); + }, function (v) { + return Control_Plus.empty(dictPlus); + }); +}; + +var alternativeStar = function alternativeStar(dictAlternative) { + return new Control_Alternative.Alternative(function () { + return applicativeStar(dictAlternative.Applicative0()); + }, function () { + return plusStar(dictAlternative.Plus1()); + }); +}; + +var monadZeroStar = function monadZeroStar(dictMonadZero) { + return new Control_MonadZero.MonadZero(function () { + return alternativeStar(dictMonadZero.Alternative1()); + }, function () { + return monadStar(dictMonadZero.Monad0()); + }); +}; + +var monadPlusStar = function monadPlusStar(dictMonadPlus) { + return new Control_MonadPlus.MonadPlus(function () { + return monadZeroStar(dictMonadPlus.MonadZero0()); + }); +}; + +module.exports = { + Star: Star, + hoistStar: hoistStar, + newtypeStar: newtypeStar, + semigroupoidStar: semigroupoidStar, + categoryStar: categoryStar, + functorStar: functorStar, + invariantStar: invariantStar, + applyStar: applyStar, + applicativeStar: applicativeStar, + bindStar: bindStar, + monadStar: monadStar, + altStar: altStar, + plusStar: plusStar, + alternativeStar: alternativeStar, + monadZeroStar: monadZeroStar, + monadPlusStar: monadPlusStar, + distributiveStar: distributiveStar, + profunctorStar: profunctorStar, + strongStar: strongStar, + choiceStar: choiceStar, + closedStar: closedStar +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad/index.js":"U/Ix","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Control.Semigroupoid/index.js":"/riR","../Data.Distributive/index.js":"8PTu","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Functor.Invariant/index.js":"AXkC","../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Profunctor.Closed/index.js":"af4y","../Data.Profunctor.Strong/index.js":"w9p6","../Data.Tuple/index.js":"II/O"}],"i7fd":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js"); + +var Data_Profunctor_Star = require("../Data.Profunctor.Star/index.js"); + +var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js"); + +var Wander = function Wander(Choice1, Strong0, wander) { + this.Choice1 = Choice1; + this.Strong0 = Strong0; + this.wander = wander; +}; + +var wanderStar = function wanderStar(dictApplicative) { + return new Wander(function () { + return Data_Profunctor_Star.choiceStar(dictApplicative); + }, function () { + return Data_Profunctor_Star.strongStar(dictApplicative.Apply0().Functor0()); + }, function (t) { + return function (v) { + return t(dictApplicative)(v); + }; + }); +}; + +var wanderFunction = new Wander(function () { + return Data_Profunctor_Choice.choiceFn; +}, function () { + return Data_Profunctor_Strong.strongFn; +}, function (t) { + return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Identity.newtypeIdentity)(Data_Identity.newtypeIdentity)(Data_Identity.Identity)(t(Data_Identity.applicativeIdentity)); +}); + +var wander = function wander(dict) { + return dict.wander; +}; + +module.exports = { + wander: wander, + Wander: Wander, + wanderFunction: wanderFunction, + wanderStar: wanderStar +}; +},{"../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Newtype/index.js":"lz8k","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Profunctor.Star/index.js":"tj5E","../Data.Profunctor.Strong/index.js":"w9p6"}],"FnLc":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Cochoice = function Cochoice(Profunctor0, unleft, unright) { + this.Profunctor0 = Profunctor0; + this.unleft = unleft; + this.unright = unright; +}; + +var unright = function unright(dict) { + return dict.unright; +}; + +var unleft = function unleft(dict) { + return dict.unleft; +}; + +module.exports = { + unleft: unleft, + unright: unright, + Cochoice: Cochoice +}; +},{}],"mj9z":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Const = require("../Data.Const/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js"); + +var Data_Profunctor_Cochoice = require("../Data.Profunctor.Cochoice/index.js"); + +var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Forget = function Forget(x) { + return x; +}; + +var semigroupForget = function semigroupForget(dictSemigroup) { + return Data_Semigroup.semigroupFn(dictSemigroup); +}; + +var profunctorForget = new Data_Profunctor.Profunctor(function (f) { + return function (v) { + return function (v1) { + return function ($27) { + return v1(f($27)); + }; + }; + }; +}); +var strongForget = new Data_Profunctor_Strong.Strong(function () { + return profunctorForget; +}, function (v) { + return function ($28) { + return v(Data_Tuple.fst($28)); + }; +}, function (v) { + return function ($29) { + return v(Data_Tuple.snd($29)); + }; +}); +var newtypeForget = new Data_Newtype.Newtype(function (n) { + return n; +}, Forget); + +var monoidForget = function monoidForget(dictMonoid) { + return Data_Monoid.monoidFn(dictMonoid); +}; + +var cochoiceForget = new Data_Profunctor_Cochoice.Cochoice(function () { + return profunctorForget; +}, function (v) { + return function ($30) { + return v(Data_Either.Left.create($30)); + }; +}, function (v) { + return function ($31) { + return v(Data_Either.Right.create($31)); + }; +}); + +var choiceForget = function choiceForget(dictMonoid) { + return new Data_Profunctor_Choice.Choice(function () { + return profunctorForget; + }, function (v) { + return Data_Either.either(v)(Data_Monoid.mempty(Data_Monoid.monoidFn(dictMonoid))); + }, function (v) { + return Data_Either.either(Data_Monoid.mempty(Data_Monoid.monoidFn(dictMonoid)))(v); + }); +}; + +var wanderForget = function wanderForget(dictMonoid) { + return new Data_Lens_Internal_Wander.Wander(function () { + return choiceForget(dictMonoid); + }, function () { + return strongForget; + }, function (f) { + return function (v) { + return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Const.newtypeConst)(Data_Const.newtypeConst)(Data_Const.Const)(f(Data_Const.applicativeConst(dictMonoid)))(v); + }; + }); +}; + +module.exports = { + Forget: Forget, + newtypeForget: newtypeForget, + semigroupForget: semigroupForget, + monoidForget: monoidForget, + profunctorForget: profunctorForget, + choiceForget: choiceForget, + strongForget: strongForget, + cochoiceForget: cochoiceForget, + wanderForget: wanderForget +}; +},{"../Data.Const/index.js":"OmNG","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Lens.Internal.Wander/index.js":"i7fd","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Profunctor.Cochoice/index.js":"FnLc","../Data.Profunctor.Strong/index.js":"w9p6","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O"}],"V4/H":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js"); + +var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Indexed = function Indexed(x) { + return x; +}; + +var profunctorIndexed = function profunctorIndexed(dictProfunctor) { + return new Data_Profunctor.Profunctor(function (f) { + return function (g) { + return function (v) { + return Data_Profunctor.dimap(dictProfunctor)(Data_Profunctor_Strong.second(Data_Profunctor_Strong.strongFn)(f))(g)(v); + }; + }; + }); +}; + +var strongIndexed = function strongIndexed(dictStrong) { + return new Data_Profunctor_Strong.Strong(function () { + return profunctorIndexed(dictStrong.Profunctor0()); + }, function (v) { + return Indexed(Data_Profunctor.lcmap(dictStrong.Profunctor0())(function (v1) { + return new Data_Tuple.Tuple(new Data_Tuple.Tuple(v1.value0, v1.value1.value0), v1.value1.value1); + })(Data_Profunctor_Strong.first(dictStrong)(v))); + }, function (v) { + return Indexed(Data_Profunctor.lcmap(dictStrong.Profunctor0())(function (v1) { + return new Data_Tuple.Tuple(v1.value1.value0, new Data_Tuple.Tuple(v1.value0, v1.value1.value1)); + })(Data_Profunctor_Strong.second(dictStrong)(v))); + }); +}; + +var newtypeIndexed = new Data_Newtype.Newtype(function (n) { + return n; +}, Indexed); + +var choiceIndexed = function choiceIndexed(dictChoice) { + return new Data_Profunctor_Choice.Choice(function () { + return profunctorIndexed(dictChoice.Profunctor0()); + }, function (v) { + return Indexed(Data_Profunctor.lcmap(dictChoice.Profunctor0())(function (v1) { + return Data_Either.either(function () { + var $47 = Data_Tuple.Tuple.create(v1.value0); + return function ($48) { + return Data_Either.Left.create($47($48)); + }; + }())(Data_Either.Right.create)(v1.value1); + })(Data_Profunctor_Choice.left(dictChoice)(v))); + }, function (v) { + return Indexed(Data_Profunctor.lcmap(dictChoice.Profunctor0())(function (v1) { + return Data_Either.either(Data_Either.Left.create)(function () { + var $49 = Data_Tuple.Tuple.create(v1.value0); + return function ($50) { + return Data_Either.Right.create($49($50)); + }; + }())(v1.value1); + })(Data_Profunctor_Choice.right(dictChoice)(v))); + }); +}; + +var wanderIndexed = function wanderIndexed(dictWander) { + return new Data_Lens_Internal_Wander.Wander(function () { + return choiceIndexed(dictWander.Choice1()); + }, function () { + return strongIndexed(dictWander.Strong0()); + }, function (trav) { + return function (v) { + return Indexed(Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) { + return function (ia2fb) { + return function (v1) { + return trav(dictApplicative)(function () { + var $51 = Data_Tuple.Tuple.create(v1.value0); + return function ($52) { + return ia2fb($51($52)); + }; + }())(v1.value1); + }; + }; + })(v)); + }; + }); +}; + +module.exports = { + Indexed: Indexed, + newtypeIndexed: newtypeIndexed, + profunctorIndexed: profunctorIndexed, + strongIndexed: strongIndexed, + choiceIndexed: choiceIndexed, + wanderIndexed: wanderIndexed +}; +},{"../Data.Either/index.js":"B2JL","../Data.Lens.Internal.Wander/index.js":"i7fd","../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Profunctor.Strong/index.js":"w9p6","../Data.Tuple/index.js":"II/O"}],"OPOX":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js"); + +var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js"); + +var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js"); + +var view = function view(l) { + return Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(l(Control_Category.identity(Control_Category.categoryFn))); +}; + +var viewOn = function viewOn(s) { + return function (l) { + return view(l)(s); + }; +}; + +var use = function use(dictMonadState) { + return function (p) { + return Control_Monad_State_Class.gets(dictMonadState)(function (v) { + return viewOn(v)(p); + }); + }; +}; + +var to = function to(f) { + return function (p) { + var $3 = Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(p); + return function ($4) { + return $3(f($4)); + }; + }; +}; + +var takeBoth = function takeBoth(l) { + return function (r) { + return to(Data_Profunctor_Strong.fanout(Control_Category.categoryFn)(Data_Profunctor_Strong.strongFn)(view(l))(view(r))); + }; +}; + +var iview = function iview(l) { + return Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(l(Data_Lens_Internal_Indexed.Indexed(Control_Category.identity(Control_Category.categoryFn)))); +}; + +var iuse = function iuse(dictMonadState) { + return function (p) { + return Control_Monad_State_Class.gets(dictMonadState)(iview(p)); + }; +}; + +var cloneGetter = function cloneGetter(g) { + return to(view(g)); +}; + +module.exports = { + viewOn: viewOn, + view: view, + to: to, + takeBoth: takeBoth, + use: use, + iview: iview, + iuse: iuse, + cloneGetter: cloneGetter +}; +},{"../Control.Category/index.js":"IAi2","../Control.Monad.State.Class/index.js":"u1pL","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.Lens.Internal.Indexed/index.js":"V4/H","../Data.Newtype/index.js":"lz8k","../Data.Profunctor.Strong/index.js":"w9p6"}],"eUa0":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Exchange = function () { + function Exchange(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Exchange.create = function (value0) { + return function (value1) { + return new Exchange(value0, value1); + }; + }; + + return Exchange; +}(); + +var profunctorExchange = new Data_Profunctor.Profunctor(function (f) { + return function (g) { + return function (v) { + return new Exchange(function ($11) { + return v.value0(f($11)); + }, function ($12) { + return g(v.value1($12)); + }); + }; + }; +}); +var functorExchange = new Data_Functor.Functor(function (f) { + return function (v) { + return new Exchange(v.value0, function ($13) { + return f(v.value1($13)); + }); + }; +}); +module.exports = { + Exchange: Exchange, + functorExchange: functorExchange, + profunctorExchange: profunctorExchange +}; +},{"../Data.Functor/index.js":"+0AE","../Data.Profunctor/index.js":"0DaD"}],"NfU6":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Costrong = function Costrong(Profunctor0, unfirst, unsecond) { + this.Profunctor0 = Profunctor0; + this.unfirst = unfirst; + this.unsecond = unsecond; +}; + +var unsecond = function unsecond(dict) { + return dict.unsecond; +}; + +var unfirst = function unfirst(dict) { + return dict.unfirst; +}; + +module.exports = { + unfirst: unfirst, + unsecond: unsecond, + Costrong: Costrong +}; +},{}],"IZDD":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js"); + +var Data_Profunctor_Cochoice = require("../Data.Profunctor.Cochoice/index.js"); + +var Data_Profunctor_Costrong = require("../Data.Profunctor.Costrong/index.js"); + +var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js"); + +var Re = function Re(x) { + return x; +}; + +var profunctorRe = function profunctorRe(dictProfunctor) { + return new Data_Profunctor.Profunctor(function (f) { + return function (g) { + return function (v) { + var $28 = Data_Profunctor.dimap(dictProfunctor)(g)(f); + return function ($29) { + return v($28($29)); + }; + }; + }; + }); +}; + +var strongRe = function strongRe(dictStrong) { + return new Data_Profunctor_Costrong.Costrong(function () { + return profunctorRe(dictStrong.Profunctor0()); + }, function (v) { + var $30 = Data_Profunctor_Strong.first(dictStrong); + return function ($31) { + return v($30($31)); + }; + }, function (v) { + var $32 = Data_Profunctor_Strong.second(dictStrong); + return function ($33) { + return v($32($33)); + }; + }); +}; + +var newtypeRe = new Data_Newtype.Newtype(function (n) { + return n; +}, Re); + +var costrongRe = function costrongRe(dictCostrong) { + return new Data_Profunctor_Strong.Strong(function () { + return profunctorRe(dictCostrong.Profunctor0()); + }, function (v) { + var $34 = Data_Profunctor_Costrong.unfirst(dictCostrong); + return function ($35) { + return v($34($35)); + }; + }, function (v) { + var $36 = Data_Profunctor_Costrong.unsecond(dictCostrong); + return function ($37) { + return v($36($37)); + }; + }); +}; + +var cochoiceRe = function cochoiceRe(dictCochoice) { + return new Data_Profunctor_Choice.Choice(function () { + return profunctorRe(dictCochoice.Profunctor0()); + }, function (v) { + var $38 = Data_Profunctor_Cochoice.unleft(dictCochoice); + return function ($39) { + return v($38($39)); + }; + }, function (v) { + var $40 = Data_Profunctor_Cochoice.unright(dictCochoice); + return function ($41) { + return v($40($41)); + }; + }); +}; + +var choiceRe = function choiceRe(dictChoice) { + return new Data_Profunctor_Cochoice.Cochoice(function () { + return profunctorRe(dictChoice.Profunctor0()); + }, function (v) { + var $42 = Data_Profunctor_Choice.left(dictChoice); + return function ($43) { + return v($42($43)); + }; + }, function (v) { + var $44 = Data_Profunctor_Choice.right(dictChoice); + return function ($45) { + return v($44($45)); + }; + }); +}; + +module.exports = { + Re: Re, + newtypeRe: newtypeRe, + profunctorRe: profunctorRe, + choiceRe: choiceRe, + cochoiceRe: cochoiceRe, + strongRe: strongRe, + costrongRe: costrongRe +}; +},{"../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Profunctor.Cochoice/index.js":"FnLc","../Data.Profunctor.Costrong/index.js":"NfU6","../Data.Profunctor.Strong/index.js":"w9p6"}],"fFCp":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Lens_Internal_Exchange = require("../Data.Lens.Internal.Exchange/index.js"); + +var Data_Lens_Internal_Re = require("../Data.Lens.Internal.Re/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var withIso = function withIso(l) { + return function (f) { + var v = l(new Data_Lens_Internal_Exchange.Exchange(Control_Category.identity(Control_Category.categoryFn), Control_Category.identity(Control_Category.categoryFn))); + return f(v.value0)(v.value1); + }; +}; + +var under = function under(l) { + return withIso(l)(function (sa) { + return function (bt) { + return function (ts) { + return function ($19) { + return sa(ts(bt($19))); + }; + }; + }; + }); +}; + +var re = function re(t) { + return Data_Newtype.unwrap(Data_Lens_Internal_Re.newtypeRe)(t(Control_Category.identity(Control_Category.categoryFn))); +}; + +var iso = function iso(f) { + return function (g) { + return function (dictProfunctor) { + return function (pab) { + return Data_Profunctor.dimap(dictProfunctor)(f)(g)(pab); + }; + }; + }; +}; + +var mapping = function mapping(dictFunctor) { + return function (dictFunctor1) { + return function (l) { + return function (dictProfunctor) { + return withIso(l)(function (sa) { + return function (bt) { + return iso(Data_Functor.map(dictFunctor)(sa))(Data_Functor.map(dictFunctor1)(bt))(dictProfunctor); + }; + }); + }; + }; + }; +}; + +var non = function non(dictEq) { + return function (def) { + return function (dictProfunctor) { + var g = function g(a) { + if (Data_Eq.eq(dictEq)(a)(def)) { + return Data_Maybe.Nothing.value; + } + + ; + + if (Data_Boolean.otherwise) { + return new Data_Maybe.Just(a); + } + + ; + throw new Error("Failed pattern match at Data.Lens.Iso (line 45, column 9 - line 46, column 33): " + [a.constructor.name]); + }; + + return iso(Data_Maybe.fromMaybe(def))(g)(dictProfunctor); + }; + }; +}; + +var uncurried = function uncurried(dictProfunctor) { + return iso(Data_Tuple.uncurry)(Data_Tuple.curry)(dictProfunctor); +}; + +var flipped = function flipped(dictProfunctor) { + return iso(Data_Function.flip)(Data_Function.flip)(dictProfunctor); +}; + +var dimapping = function dimapping(dictProfunctor) { + return function (dictProfunctor1) { + return function (f) { + return function (g) { + return function (dictProfunctor2) { + return withIso(f)(function (sa) { + return function (bt) { + return withIso(g)(function (ssaa) { + return function (bbtt) { + return iso(Data_Profunctor.dimap(dictProfunctor)(sa)(ssaa))(Data_Profunctor.dimap(dictProfunctor1)(bt)(bbtt))(dictProfunctor2); + }; + }); + }; + }); + }; + }; + }; + }; +}; + +var curried = function curried(dictProfunctor) { + return iso(Data_Tuple.curry)(Data_Tuple.uncurry)(dictProfunctor); +}; + +var cloneIso = function cloneIso(l) { + return function (dictProfunctor) { + return withIso(l)(function (x) { + return function (y) { + return function (p) { + return iso(x)(y)(dictProfunctor)(p); + }; + }; + }); + }; +}; + +var auf = function auf(dictProfunctor) { + return function (l) { + return withIso(l)(function (sa) { + return function (bt) { + return function (f) { + return function (g) { + return function (e) { + return bt(f(Data_Profunctor.rmap(dictProfunctor)(sa)(g))(e)); + }; + }; + }; + }; + }); + }; +}; + +var au = function au(l) { + return withIso(l)(function (sa) { + return function (bt) { + return function (f) { + return function (e) { + return sa(f(bt)(e)); + }; + }; + }; + }); +}; + +module.exports = { + iso: iso, + withIso: withIso, + cloneIso: cloneIso, + re: re, + au: au, + auf: auf, + under: under, + non: non, + curried: curried, + uncurried: uncurried, + flipped: flipped, + mapping: mapping, + dimapping: dimapping +}; +},{"../Control.Category/index.js":"IAi2","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Lens.Internal.Exchange/index.js":"eUa0","../Data.Lens.Internal.Re/index.js":"IZDD","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Tuple/index.js":"II/O"}],"CiFJ":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Lens_Iso = require("../Data.Lens.Iso/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var _Newtype = function _Newtype(dictNewtype) { + return function (dictNewtype1) { + return function (dictProfunctor) { + return Data_Lens_Iso.iso(Data_Newtype.unwrap(dictNewtype))(Data_Newtype.wrap(dictNewtype1))(dictProfunctor); + }; + }; +}; + +module.exports = { + "_Newtype": _Newtype +}; +},{"../Data.Lens.Iso/index.js":"fFCp","../Data.Newtype/index.js":"lz8k"}],"ONWB":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var MonadGen = function MonadGen(Monad0, chooseBool, chooseFloat, chooseInt, resize, sized) { + this.Monad0 = Monad0; + this.chooseBool = chooseBool; + this.chooseFloat = chooseFloat; + this.chooseInt = chooseInt; + this.resize = resize; + this.sized = sized; +}; + +var sized = function sized(dict) { + return dict.sized; +}; + +var resize = function resize(dict) { + return dict.resize; +}; + +var chooseInt = function chooseInt(dict) { + return dict.chooseInt; +}; + +var chooseFloat = function chooseFloat(dict) { + return dict.chooseFloat; +}; + +var chooseBool = function chooseBool(dict) { + return dict.chooseBool; +}; + +module.exports = { + chooseBool: chooseBool, + chooseFloat: chooseFloat, + chooseInt: chooseInt, + resize: resize, + sized: sized, + MonadGen: MonadGen +}; +},{}],"s7H0":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_Gen_Class = require("../Control.Monad.Gen.Class/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Cons = function () { + function Cons(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Cons.create = function (value0) { + return function (value1) { + return new Cons(value0, value1); + }; + }; + + return Cons; +}(); + +var Nil = function () { + function Nil() {} + + ; + Nil.value = new Nil(); + return Nil; +}(); + +var FreqSemigroup = function FreqSemigroup(x) { + return x; +}; + +var AtIndex = function AtIndex(x) { + return x; +}; + +var unfoldable = function unfoldable(dictMonadRec) { + return function (dictMonadGen) { + return function (dictUnfoldable) { + return function (gen) { + var unfold = function unfold(v) { + if (v instanceof Nil) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Cons) { + return new Data_Maybe.Just(new Data_Tuple.Tuple(v.value0, v.value1)); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Gen (line 101, column 12 - line 103, column 35): " + [v.constructor.name]); + }; + + var loopGen = function loopGen(v) { + if (v.value1 <= 0) { + return Control_Applicative.pure(dictMonadGen.Monad0().Applicative0())(new Control_Monad_Rec_Class.Done(v.value0)); + } + + ; + + if (Data_Boolean.otherwise) { + return Control_Bind.bind(dictMonadGen.Monad0().Bind1())(gen)(function (v1) { + return Control_Applicative.pure(dictMonadGen.Monad0().Applicative0())(new Control_Monad_Rec_Class.Loop(new Data_Tuple.Tuple(new Cons(v1, v.value0), v.value1 - 1 | 0))); + }); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Gen (line 93, column 3 - line 93, column 68): " + [v.constructor.name]); + }; + + return Data_Functor.map(dictMonadGen.Monad0().Bind1().Apply0().Functor0())(Data_Unfoldable.unfoldr(dictUnfoldable)(unfold))(Control_Monad_Gen_Class.sized(dictMonadGen)(function () { + var $59 = Control_Monad_Rec_Class.tailRecM(dictMonadRec)(loopGen); + var $60 = Data_Tuple.Tuple.create(Nil.value); + return function ($61) { + return $59($60($61)); + }; + }())); + }; + }; + }; +}; + +var semigroupFreqSemigroup = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return function (pos) { + var v2 = v(pos); + + if (v2.value0 instanceof Data_Maybe.Just) { + return v1(v2.value0.value0); + } + + ; + return v2; + }; + }; +}); +var semigroupAtIndex = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return function (i) { + var $46 = i <= 0; + + if ($46) { + return v(i); + } + + ; + return v1(i - 1 | 0); + }; + }; +}); + +var getFreqVal = function getFreqVal(v) { + return function ($62) { + return Data_Tuple.snd(v($62)); + }; +}; + +var getAtIndex = function getAtIndex(v) { + return v; +}; + +var freqSemigroup = function freqSemigroup(v) { + return function (pos) { + var $50 = pos >= v.value0; + + if ($50) { + return new Data_Tuple.Tuple(new Data_Maybe.Just(pos - v.value0), v.value1); + } + + ; + return new Data_Tuple.Tuple(Data_Maybe.Nothing.value, v.value1); + }; +}; + +var frequency = function frequency(dictMonadGen) { + return function (dictFoldable1) { + return function (xs) { + var total = Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Newtype.newtypeAdditive)(Data_Newtype.newtypeAdditive)(Data_Monoid_Additive.Additive)(Data_Foldable.foldMap(dictFoldable1.Foldable0())(Data_Monoid_Additive.monoidAdditive(Data_Semiring.semiringNumber)))(Data_Tuple.fst)(xs); + return Control_Bind.bind(dictMonadGen.Monad0().Bind1())(Control_Monad_Gen_Class.chooseFloat(dictMonadGen)(0.0)(total))(getFreqVal(Data_Semigroup_Foldable.foldMap1(dictFoldable1)(semigroupFreqSemigroup)(freqSemigroup)(xs))); + }; + }; +}; + +var filtered = function filtered(dictMonadRec) { + return function (dictMonadGen) { + return function (gen) { + var go = function go(v) { + return Data_Functor.mapFlipped(dictMonadGen.Monad0().Bind1().Apply0().Functor0())(gen)(function (a) { + if (a instanceof Data_Maybe.Nothing) { + return new Control_Monad_Rec_Class.Loop(Data_Unit.unit); + } + + ; + + if (a instanceof Data_Maybe.Just) { + return new Control_Monad_Rec_Class.Done(a.value0); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Gen (line 117, column 24 - line 119, column 23): " + [a.constructor.name]); + }); + }; + + return Control_Monad_Rec_Class.tailRecM(dictMonadRec)(go)(Data_Unit.unit); + }; + }; +}; + +var suchThat = function suchThat(dictMonadRec) { + return function (dictMonadGen) { + return function (gen) { + return function (pred) { + return filtered(dictMonadRec)(dictMonadGen)(Data_Functor.mapFlipped(dictMonadGen.Monad0().Bind1().Apply0().Functor0())(gen)(function (a) { + var $55 = pred(a); + + if ($55) { + return new Data_Maybe.Just(a); + } + + ; + return Data_Maybe.Nothing.value; + })); + }; + }; + }; +}; + +var choose = function choose(dictMonadGen) { + return function (genA) { + return function (genB) { + return Control_Bind.bind(dictMonadGen.Monad0().Bind1())(Control_Monad_Gen_Class.chooseBool(dictMonadGen))(function (v) { + if (v) { + return genA; + } + + ; + return genB; + }); + }; + }; +}; + +var atIndex = function atIndex($63) { + return AtIndex(Data_Function["const"]($63)); +}; + +var fromIndex = function fromIndex(dictFoldable1) { + return function (i) { + return function (xs) { + return getAtIndex(Data_Semigroup_Foldable.foldMap1(dictFoldable1)(semigroupAtIndex)(atIndex)(xs))(i); + }; + }; +}; + +var elements = function elements(dictMonadGen) { + return function (dictFoldable1) { + return function (xs) { + return Control_Bind.bind(dictMonadGen.Monad0().Bind1())(Control_Monad_Gen_Class.chooseInt(dictMonadGen)(0)(Data_Foldable.length(dictFoldable1.Foldable0())(Data_Semiring.semiringInt)(xs) - 1 | 0))(function (v) { + return Control_Applicative.pure(dictMonadGen.Monad0().Applicative0())(fromIndex(dictFoldable1)(v)(xs)); + }); + }; + }; +}; + +var oneOf = function oneOf(dictMonadGen) { + return function (dictFoldable1) { + return function (xs) { + return Control_Bind.bind(dictMonadGen.Monad0().Bind1())(Control_Monad_Gen_Class.chooseInt(dictMonadGen)(0)(Data_Foldable.length(dictFoldable1.Foldable0())(Data_Semiring.semiringInt)(xs) - 1 | 0))(function (v) { + return fromIndex(dictFoldable1)(v)(xs); + }); + }; + }; +}; + +module.exports = { + choose: choose, + oneOf: oneOf, + frequency: frequency, + elements: elements, + unfoldable: unfoldable, + suchThat: suchThat, + filtered: filtered +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Gen.Class/index.js":"ONWB","../Control.Monad.Rec.Class/index.js":"UVIy","../Data.Boolean/index.js":"ObQr","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Monoid.Additive/index.js":"fHyj","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Semiring/index.js":"11NF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unit/index.js":"NhVk"}],"K4TW":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_Gen = require("../Control.Monad.Gen/index.js"); + +var Control_Monad_Gen_Class = require("../Control.Monad.Gen.Class/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_NonEmpty = require("../Data.NonEmpty/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var genTuple = function genTuple(dictApply) { + return Control_Apply.lift2(dictApply)(Data_Tuple.Tuple.create); +}; + +var genNonEmpty = function genNonEmpty(dictMonadRec) { + return function (dictMonadGen) { + return function (dictUnfoldable) { + return function (gen) { + return Control_Apply.apply(dictMonadGen.Monad0().Bind1().Apply0())(Data_Functor.map(dictMonadGen.Monad0().Bind1().Apply0().Functor0())(Data_NonEmpty.NonEmpty.create)(gen))(Control_Monad_Gen_Class.resize(dictMonadGen)(function () { + var $16 = Data_Ord.max(Data_Ord.ordInt)(0); + return function ($17) { + return $16(function (v) { + return v - 1 | 0; + }($17)); + }; + }())(Control_Monad_Gen.unfoldable(dictMonadRec)(dictMonadGen)(dictUnfoldable)(gen))); + }; + }; + }; +}; + +var genMaybe$prime = function genMaybe$prime(dictMonadGen) { + return function (bias) { + return function (gen) { + return Control_Bind.bind(dictMonadGen.Monad0().Bind1())(Control_Monad_Gen_Class.chooseFloat(dictMonadGen)(0.0)(1.0))(function (v) { + var $13 = v < bias; + + if ($13) { + return Data_Functor.map(dictMonadGen.Monad0().Bind1().Apply0().Functor0())(Data_Maybe.Just.create)(gen); + } + + ; + return Control_Applicative.pure(dictMonadGen.Monad0().Applicative0())(Data_Maybe.Nothing.value); + }); + }; + }; +}; + +var genMaybe = function genMaybe(dictMonadGen) { + return genMaybe$prime(dictMonadGen)(0.75); +}; + +var genIdentity = function genIdentity(dictFunctor) { + return Data_Functor.map(dictFunctor)(Data_Identity.Identity); +}; + +var genEither$prime = function genEither$prime(dictMonadGen) { + return function (bias) { + return function (genA) { + return function (genB) { + return Control_Bind.bind(dictMonadGen.Monad0().Bind1())(Control_Monad_Gen_Class.chooseFloat(dictMonadGen)(0.0)(1.0))(function (v) { + var $15 = v < bias; + + if ($15) { + return Data_Functor.map(dictMonadGen.Monad0().Bind1().Apply0().Functor0())(Data_Either.Left.create)(genA); + } + + ; + return Data_Functor.map(dictMonadGen.Monad0().Bind1().Apply0().Functor0())(Data_Either.Right.create)(genB); + }); + }; + }; + }; +}; + +var genEither = function genEither(dictMonadGen) { + return genEither$prime(dictMonadGen)(0.5); +}; + +module.exports = { + genEither: genEither, + "genEither'": genEither$prime, + genIdentity: genIdentity, + genMaybe: genMaybe, + "genMaybe'": genMaybe$prime, + genTuple: genTuple, + genNonEmpty: genNonEmpty +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad.Gen/index.js":"s7H0","../Control.Monad.Gen.Class/index.js":"ONWB","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Maybe/index.js":"5mN7","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Tuple/index.js":"II/O"}],"iQxY":[function(require,module,exports) { +"use strict"; + +exports.fold1Impl = function (f) { + return function (xs) { + var acc = xs[0]; + var len = xs.length; + + for (var i = 1; i < len; i++) { + acc = f(acc)(xs[i]); + } + + return acc; + }; +}; + +exports.traverse1Impl = function () { + function Cont(fn) { + this.fn = fn; + } + + var emptyList = {}; + + var ConsCell = function ConsCell(head, tail) { + this.head = head; + this.tail = tail; + }; + + function finalCell(head) { + return new ConsCell(head, emptyList); + } + + function consList(x) { + return function (xs) { + return new ConsCell(x, xs); + }; + } + + function listToArray(list) { + var arr = []; + var xs = list; + + while (xs !== emptyList) { + arr.push(xs.head); + xs = xs.tail; + } + + return arr; + } + + return function (apply) { + return function (map) { + return function (f) { + var buildFrom = function buildFrom(x, ys) { + return apply(map(consList)(f(x)))(ys); + }; + + var go = function go(acc, currentLen, xs) { + if (currentLen === 0) { + return acc; + } else { + var last = xs[currentLen - 1]; + return new Cont(function () { + var built = go(buildFrom(last, acc), currentLen - 1, xs); + return built; + }); + } + }; + + return function (array) { + var acc = map(finalCell)(f(array[array.length - 1])); + var result = go(acc, array.length - 1, array); + + while (result instanceof Cont) { + result = result.fn(); + } + + return map(listToArray)(result); + }; + }; + }; + }; +}(); +},{}],"PmFL":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js"); + +var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js"); + +var NonEmptyArray = function NonEmptyArray(x) { + return x; +}; + +var unfoldable1NonEmptyArray = Data_Unfoldable1.unfoldable1Array; +var traversableWithIndexNonEmptyArray = Data_TraversableWithIndex.traversableWithIndexArray; +var traversableNonEmptyArray = Data_Traversable.traversableArray; + +var showNonEmptyArray = function showNonEmptyArray(dictShow) { + return new Data_Show.Show(function (v) { + return "(NonEmptyArray " + (Data_Show.show(Data_Show.showArray(dictShow))(v) + ")"); + }); +}; + +var semigroupNonEmptyArray = Data_Semigroup.semigroupArray; + +var ordNonEmptyArray = function ordNonEmptyArray(dictOrd) { + return Data_Ord.ordArray(dictOrd); +}; + +var ord1NonEmptyArray = Data_Ord.ord1Array; +var monadNonEmptyArray = Control_Monad.monadArray; +var functorWithIndexNonEmptyArray = Data_FunctorWithIndex.functorWithIndexArray; +var functorNonEmptyArray = Data_Functor.functorArray; +var foldableWithIndexNonEmptyArray = Data_FoldableWithIndex.foldableWithIndexArray; +var foldableNonEmptyArray = Data_Foldable.foldableArray; +var foldable1NonEmptyArray = new Data_Semigroup_Foldable.Foldable1(function () { + return foldableNonEmptyArray; +}, function (dictSemigroup) { + return $foreign.fold1Impl(Data_Semigroup.append(dictSemigroup)); +}, function (dictSemigroup) { + return Data_Semigroup_Foldable.foldMap1Default(foldable1NonEmptyArray)(functorNonEmptyArray)(dictSemigroup); +}); +var traversable1NonEmptyArray = new Data_Semigroup_Traversable.Traversable1(function () { + return foldable1NonEmptyArray; +}, function () { + return traversableNonEmptyArray; +}, function (dictApply) { + return Data_Semigroup_Traversable.sequence1Default(traversable1NonEmptyArray)(dictApply); +}, function (dictApply) { + return $foreign.traverse1Impl(Control_Apply.apply(dictApply))(Data_Functor.map(dictApply.Functor0())); +}); + +var eqNonEmptyArray = function eqNonEmptyArray(dictEq) { + return Data_Eq.eqArray(dictEq); +}; + +var eq1NonEmptyArray = Data_Eq.eq1Array; +var bindNonEmptyArray = Control_Bind.bindArray; +var applyNonEmptyArray = Control_Apply.applyArray; +var applicativeNonEmptyArray = Control_Applicative.applicativeArray; +var altNonEmptyArray = Control_Alt.altArray; +module.exports = { + showNonEmptyArray: showNonEmptyArray, + eqNonEmptyArray: eqNonEmptyArray, + eq1NonEmptyArray: eq1NonEmptyArray, + ordNonEmptyArray: ordNonEmptyArray, + ord1NonEmptyArray: ord1NonEmptyArray, + semigroupNonEmptyArray: semigroupNonEmptyArray, + functorNonEmptyArray: functorNonEmptyArray, + functorWithIndexNonEmptyArray: functorWithIndexNonEmptyArray, + foldableNonEmptyArray: foldableNonEmptyArray, + foldableWithIndexNonEmptyArray: foldableWithIndexNonEmptyArray, + foldable1NonEmptyArray: foldable1NonEmptyArray, + unfoldable1NonEmptyArray: unfoldable1NonEmptyArray, + traversableNonEmptyArray: traversableNonEmptyArray, + traversableWithIndexNonEmptyArray: traversableWithIndexNonEmptyArray, + traversable1NonEmptyArray: traversable1NonEmptyArray, + applyNonEmptyArray: applyNonEmptyArray, + applicativeNonEmptyArray: applicativeNonEmptyArray, + bindNonEmptyArray: bindNonEmptyArray, + monadNonEmptyArray: monadNonEmptyArray, + altNonEmptyArray: altNonEmptyArray +}; +},{"./foreign.js":"iQxY","../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Unfoldable1/index.js":"S0Nl"}],"Bc2X":[function(require,module,exports) { +"use strict"; // module Unsafe.Coerce + +exports.unsafeCoerce = function (x) { + return x; +}; +},{}],"ETUV":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +module.exports = { + unsafeCoerce: $foreign.unsafeCoerce +}; +},{"./foreign.js":"Bc2X"}],"eTKN":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Bind = require("../Control.Bind/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_Array_NonEmpty_Internal = require("../Data.Array.NonEmpty.Internal/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_NonEmpty = require("../Data.NonEmpty/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var unsafeFromArrayF = Unsafe_Coerce.unsafeCoerce; +var unsafeFromArray = Unsafe_Coerce.unsafeCoerce; +var toArray = Unsafe_Coerce.unsafeCoerce; + +var unionBy$prime = function unionBy$prime(eq) { + return function (xs) { + var $39 = Data_Array.unionBy(eq)(toArray(xs)); + return function ($40) { + return unsafeFromArray($39($40)); + }; + }; +}; + +var union$prime = function union$prime(dictEq) { + return unionBy$prime(Data_Eq.eq(dictEq)); +}; + +var unionBy = function unionBy(eq) { + return function (xs) { + var $41 = unionBy$prime(eq)(xs); + return function ($42) { + return $41(toArray($42)); + }; + }; +}; + +var union = function union(dictEq) { + return unionBy(Data_Eq.eq(dictEq)); +}; + +var unzip = function () { + var $43 = Data_Bifunctor.bimap(Data_Tuple.bifunctorTuple)(unsafeFromArray)(unsafeFromArray); + return function ($44) { + return $43(Data_Array.unzip(toArray($44))); + }; +}(); + +var updateAt = function updateAt(i) { + return function (x) { + var $45 = Data_Array.updateAt(i)(x); + return function ($46) { + return unsafeFromArrayF($45(toArray($46))); + }; + }; +}; + +var zip = function zip(xs) { + return function (ys) { + return unsafeFromArray(Data_Array.zip(toArray(xs))(toArray(ys))); + }; +}; + +var zipWith = function zipWith(f) { + return function (xs) { + return function (ys) { + return unsafeFromArray(Data_Array.zipWith(f)(toArray(xs))(toArray(ys))); + }; + }; +}; + +var zipWithA = function zipWithA(dictApplicative) { + return function (f) { + return function (xs) { + return function (ys) { + return unsafeFromArrayF(Data_Array.zipWithA(dictApplicative)(f)(toArray(xs))(toArray(ys))); + }; + }; + }; +}; + +var some = function some(dictAlternative) { + return function (dictLazy) { + var $47 = Data_Array.some(dictAlternative)(dictLazy); + return function ($48) { + return unsafeFromArrayF($47($48)); + }; + }; +}; + +var snoc$prime = function snoc$prime(xs) { + return function (x) { + return unsafeFromArray(Data_Array.snoc(xs)(x)); + }; +}; + +var snoc = function snoc(xs) { + return function (x) { + return unsafeFromArray(Data_Array.snoc(toArray(xs))(x)); + }; +}; + +var singleton = function singleton($49) { + return unsafeFromArray(Data_Array.singleton($49)); +}; + +var replicate = function replicate(i) { + return function (x) { + return unsafeFromArray(Data_Array.replicate(Data_Ord.max(Data_Ord.ordInt)(1)(i))(x)); + }; +}; + +var range = function range(x) { + return function (y) { + return unsafeFromArray(Data_Array.range(x)(y)); + }; +}; + +var modifyAt = function modifyAt(i) { + return function (f) { + var $50 = Data_Array.modifyAt(i)(f); + return function ($51) { + return unsafeFromArrayF($50(toArray($51))); + }; + }; +}; + +var intersectBy$prime = function intersectBy$prime(eq) { + return function (xs) { + return Data_Array.intersectBy(eq)(toArray(xs)); + }; +}; + +var intersectBy = function intersectBy(eq) { + return function (xs) { + var $52 = intersectBy$prime(eq)(xs); + return function ($53) { + return $52(toArray($53)); + }; + }; +}; + +var intersect$prime = function intersect$prime(dictEq) { + return intersectBy$prime(Data_Eq.eq(dictEq)); +}; + +var intersect = function intersect(dictEq) { + return intersectBy(Data_Eq.eq(dictEq)); +}; + +var insertAt = function insertAt(i) { + return function (x) { + var $54 = Data_Array.insertAt(i)(x); + return function ($55) { + return unsafeFromArrayF($54(toArray($55))); + }; + }; +}; + +var fromFoldable1 = function fromFoldable1(dictFoldable1) { + var $56 = Data_Array.fromFoldable(dictFoldable1.Foldable0()); + return function ($57) { + return unsafeFromArray($56($57)); + }; +}; + +var fromArray = function fromArray(xs) { + if (Data_Array.length(xs) > 0) { + return new Data_Maybe.Just(unsafeFromArray(xs)); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.Array.NonEmpty (line 134, column 1 - line 134, column 58): " + [xs.constructor.name]); +}; + +var fromFoldable = function fromFoldable(dictFoldable) { + var $58 = Data_Array.fromFoldable(dictFoldable); + return function ($59) { + return fromArray($58($59)); + }; +}; + +var difference$prime = function difference$prime(dictEq) { + return function (xs) { + return Data_Array.difference(dictEq)(toArray(xs)); + }; +}; + +var cons$prime = function cons$prime(x) { + return function (xs) { + return unsafeFromArray(Data_Array.cons(x)(xs)); + }; +}; + +var fromNonEmpty = function fromNonEmpty(v) { + return cons$prime(v.value0)(v.value1); +}; + +var concatMap = Data_Function.flip(Control_Bind.bind(Data_Array_NonEmpty_Internal.bindNonEmptyArray)); + +var concat = function () { + var $60 = Data_Functor.map(Data_Array_NonEmpty_Internal.functorNonEmptyArray)(toArray); + return function ($61) { + return unsafeFromArray(Data_Array.concat(toArray($60($61)))); + }; +}(); + +var appendArray = function appendArray(xs) { + return function (ys) { + return unsafeFromArray(Data_Semigroup.append(Data_Semigroup.semigroupArray)(toArray(xs))(ys)); + }; +}; + +var alterAt = function alterAt(i) { + return function (f) { + var $62 = Data_Array.alterAt(i)(f); + return function ($63) { + return $62(toArray($63)); + }; + }; +}; + +var adaptMaybe = function adaptMaybe(f) { + var $64 = Data_Maybe.fromJust(); + return function ($65) { + return $64(f(toArray($65))); + }; +}; + +var head = adaptMaybe(Data_Array.head); +var init = adaptMaybe(Data_Array.init); +var last = adaptMaybe(Data_Array.last); +var tail = adaptMaybe(Data_Array.tail); +var uncons = adaptMaybe(Data_Array.uncons); + +var toNonEmpty = function toNonEmpty($66) { + return function (v) { + return new Data_NonEmpty.NonEmpty(v.head, v.tail); + }(uncons($66)); +}; + +var unsnoc = adaptMaybe(Data_Array.unsnoc); + +var adaptAny = function adaptAny(f) { + return function ($67) { + return f(toArray($67)); + }; +}; + +var catMaybes = adaptAny(Data_Array.catMaybes); + +var $$delete = function $$delete(dictEq) { + return function (x) { + return adaptAny(Data_Array["delete"](dictEq)(x)); + }; +}; + +var deleteAt = function deleteAt(i) { + return adaptAny(Data_Array.deleteAt(i)); +}; + +var deleteBy = function deleteBy(f) { + return function (x) { + return adaptAny(Data_Array.deleteBy(f)(x)); + }; +}; + +var difference = function difference(dictEq) { + return function (xs) { + return adaptAny(difference$prime(dictEq)(xs)); + }; +}; + +var drop = function drop(i) { + return adaptAny(Data_Array.drop(i)); +}; + +var dropEnd = function dropEnd(i) { + return adaptAny(Data_Array.dropEnd(i)); +}; + +var dropWhile = function dropWhile(f) { + return adaptAny(Data_Array.dropWhile(f)); +}; + +var elemIndex = function elemIndex(dictEq) { + return function (x) { + return adaptAny(Data_Array.elemIndex(dictEq)(x)); + }; +}; + +var elemLastIndex = function elemLastIndex(dictEq) { + return function (x) { + return adaptAny(Data_Array.elemLastIndex(dictEq)(x)); + }; +}; + +var filter = function filter(f) { + return adaptAny(Data_Array.filter(f)); +}; + +var filterA = function filterA(dictApplicative) { + return function (f) { + return adaptAny(Data_Array.filterA(dictApplicative)(f)); + }; +}; + +var findIndex = function findIndex(x) { + return adaptAny(Data_Array.findIndex(x)); +}; + +var findLastIndex = function findLastIndex(x) { + return adaptAny(Data_Array.findLastIndex(x)); +}; + +var foldM = function foldM(dictMonad) { + return function (f) { + return function (acc) { + return adaptAny(Data_Array.foldM(dictMonad)(f)(acc)); + }; + }; +}; + +var foldRecM = function foldRecM(dictMonadRec) { + return function (f) { + return function (acc) { + return adaptAny(Data_Array.foldRecM(dictMonadRec)(f)(acc)); + }; + }; +}; + +var index = adaptAny(Data_Array.index); +var length = adaptAny(Data_Array.length); + +var mapMaybe = function mapMaybe(f) { + return adaptAny(Data_Array.mapMaybe(f)); +}; + +var partition = function partition(f) { + return adaptAny(Data_Array.partition(f)); +}; + +var slice = function slice(start) { + return function (end) { + return adaptAny(Data_Array.slice(start)(end)); + }; +}; + +var span = function span(f) { + return adaptAny(Data_Array.span(f)); +}; + +var take = function take(i) { + return adaptAny(Data_Array.take(i)); +}; + +var takeEnd = function takeEnd(i) { + return adaptAny(Data_Array.takeEnd(i)); +}; + +var takeWhile = function takeWhile(f) { + return adaptAny(Data_Array.takeWhile(f)); +}; + +var toUnfoldable = function toUnfoldable(dictUnfoldable) { + return adaptAny(Data_Array.toUnfoldable(dictUnfoldable)); +}; + +var unsafeAdapt = function unsafeAdapt(f) { + var $68 = adaptAny(f); + return function ($69) { + return unsafeFromArray($68($69)); + }; +}; + +var cons = function cons(x) { + return unsafeAdapt(Data_Array.cons(x)); +}; + +var insert = function insert(dictOrd) { + return function (x) { + return unsafeAdapt(Data_Array.insert(dictOrd)(x)); + }; +}; + +var insertBy = function insertBy(f) { + return function (x) { + return unsafeAdapt(Data_Array.insertBy(f)(x)); + }; +}; + +var modifyAtIndices = function modifyAtIndices(dictFoldable) { + return function (is) { + return function (f) { + return unsafeAdapt(Data_Array.modifyAtIndices(dictFoldable)(is)(f)); + }; + }; +}; + +var nub = function nub(dictOrd) { + return unsafeAdapt(Data_Array.nub(dictOrd)); +}; + +var nubBy = function nubBy(f) { + return unsafeAdapt(Data_Array.nubBy(f)); +}; + +var nubByEq = function nubByEq(f) { + return unsafeAdapt(Data_Array.nubByEq(f)); +}; + +var nubEq = function nubEq(dictEq) { + return unsafeAdapt(Data_Array.nubEq(dictEq)); +}; + +var reverse = unsafeAdapt(Data_Array.reverse); + +var sort = function sort(dictOrd) { + return unsafeAdapt(Data_Array.sort(dictOrd)); +}; + +var sortBy = function sortBy(f) { + return unsafeAdapt(Data_Array.sortBy(f)); +}; + +var sortWith = function sortWith(dictOrd) { + return function (f) { + return unsafeAdapt(Data_Array.sortWith(dictOrd)(f)); + }; +}; + +var updateAtIndices = function updateAtIndices(dictFoldable) { + return function (pairs) { + return unsafeAdapt(Data_Array.updateAtIndices(dictFoldable)(pairs)); + }; +}; + +var unsafeIndex = function unsafeIndex(dictPartial) { + return adaptAny(Data_Array.unsafeIndex(dictPartial)); +}; + +var toUnfoldable1 = function toUnfoldable1(dictUnfoldable1) { + return function (xs) { + var len = length(xs); + + var f = function f(i) { + return Data_Tuple.Tuple.create(unsafeIndex()(xs)(i))(function () { + var $38 = i < (len - 1 | 0); + + if ($38) { + return new Data_Maybe.Just(i + 1 | 0); + } + + ; + return Data_Maybe.Nothing.value; + }()); + }; + + return Data_Unfoldable1.unfoldr1(dictUnfoldable1)(f)(0); + }; +}; + +module.exports = { + fromArray: fromArray, + fromNonEmpty: fromNonEmpty, + toArray: toArray, + toNonEmpty: toNonEmpty, + fromFoldable: fromFoldable, + fromFoldable1: fromFoldable1, + toUnfoldable: toUnfoldable, + toUnfoldable1: toUnfoldable1, + singleton: singleton, + range: range, + replicate: replicate, + some: some, + length: length, + cons: cons, + "cons'": cons$prime, + snoc: snoc, + "snoc'": snoc$prime, + appendArray: appendArray, + insert: insert, + insertBy: insertBy, + head: head, + last: last, + tail: tail, + init: init, + uncons: uncons, + unsnoc: unsnoc, + index: index, + elemIndex: elemIndex, + elemLastIndex: elemLastIndex, + findIndex: findIndex, + findLastIndex: findLastIndex, + insertAt: insertAt, + deleteAt: deleteAt, + updateAt: updateAt, + updateAtIndices: updateAtIndices, + modifyAt: modifyAt, + modifyAtIndices: modifyAtIndices, + alterAt: alterAt, + reverse: reverse, + concat: concat, + concatMap: concatMap, + filter: filter, + partition: partition, + filterA: filterA, + mapMaybe: mapMaybe, + catMaybes: catMaybes, + sort: sort, + sortBy: sortBy, + sortWith: sortWith, + slice: slice, + take: take, + takeEnd: takeEnd, + takeWhile: takeWhile, + drop: drop, + dropEnd: dropEnd, + dropWhile: dropWhile, + span: span, + nub: nub, + nubBy: nubBy, + nubEq: nubEq, + nubByEq: nubByEq, + union: union, + "union'": union$prime, + unionBy: unionBy, + "unionBy'": unionBy$prime, + "delete": $$delete, + deleteBy: deleteBy, + difference: difference, + "difference'": difference$prime, + intersect: intersect, + "intersect'": intersect$prime, + intersectBy: intersectBy, + "intersectBy'": intersectBy$prime, + zipWith: zipWith, + zipWithA: zipWithA, + zip: zip, + unzip: unzip, + foldM: foldM, + foldRecM: foldRecM, + unsafeIndex: unsafeIndex +}; +},{"../Control.Bind/index.js":"7VcT","../Data.Array/index.js":"4t4C","../Data.Array.NonEmpty.Internal/index.js":"PmFL","../Data.Bifunctor/index.js":"e2Wc","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O","../Data.Unfoldable1/index.js":"S0Nl","../Unsafe.Coerce/index.js":"ETUV"}],"Yzse":[function(require,module,exports) { +"use strict"; + +exports.toCharCode = function (c) { + return c.charCodeAt(0); +}; + +exports.fromCharCode = function (c) { + return String.fromCharCode(c); +}; +},{}],"oOsU":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Cardinality = function Cardinality(x) { + return x; +}; + +var Enum = function Enum(Ord0, pred, succ) { + this.Ord0 = Ord0; + this.pred = pred; + this.succ = succ; +}; + +var BoundedEnum = function BoundedEnum(Bounded0, Enum1, cardinality, fromEnum, toEnum) { + this.Bounded0 = Bounded0; + this.Enum1 = Enum1; + this.cardinality = cardinality; + this.fromEnum = fromEnum; + this.toEnum = toEnum; +}; + +var toEnum = function toEnum(dict) { + return dict.toEnum; +}; + +var succ = function succ(dict) { + return dict.succ; +}; + +var upFromIncluding = function upFromIncluding(dictEnum) { + return function (dictUnfoldable1) { + return Data_Unfoldable1.unfoldr1(dictUnfoldable1)(Control_Apply.apply(Control_Apply.applyFn)(Data_Tuple.Tuple.create)(succ(dictEnum))); + }; +}; + +var showCardinality = new Data_Show.Show(function (v) { + return "(Cardinality " + (Data_Show.show(Data_Show.showInt)(v) + ")"); +}); + +var pred = function pred(dict) { + return dict.pred; +}; + +var ordCardinality = Data_Ord.ordInt; +var newtypeCardinality = new Data_Newtype.Newtype(function (n) { + return n; +}, Cardinality); + +var fromEnum = function fromEnum(dict) { + return dict.fromEnum; +}; + +var toEnumWithDefaults = function toEnumWithDefaults(dictBoundedEnum) { + return function (low) { + return function (high) { + return function (x) { + var v = toEnum(dictBoundedEnum)(x); + + if (v instanceof Data_Maybe.Just) { + return v.value0; + } + + ; + + if (v instanceof Data_Maybe.Nothing) { + var $54 = x < fromEnum(dictBoundedEnum)(Data_Bounded.bottom(dictBoundedEnum.Bounded0())); + + if ($54) { + return low; + } + + ; + return high; + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 158, column 33 - line 160, column 62): " + [v.constructor.name]); + }; + }; + }; +}; + +var eqCardinality = Data_Eq.eqInt; +var enumUnit = new Enum(function () { + return Data_Ord.ordUnit; +}, Data_Function["const"](Data_Maybe.Nothing.value), Data_Function["const"](Data_Maybe.Nothing.value)); + +var enumTuple = function enumTuple(dictEnum) { + return function (dictBoundedEnum) { + return new Enum(function () { + return Data_Tuple.ordTuple(dictEnum.Ord0())(dictBoundedEnum.Enum1().Ord0()); + }, function (v) { + return Data_Maybe.maybe(Data_Functor.map(Data_Maybe.functorMaybe)(Data_Function.flip(Data_Tuple.Tuple.create)(Data_Bounded.top(dictBoundedEnum.Bounded0())))(pred(dictEnum)(v.value0)))(function () { + var $96 = Data_Tuple.Tuple.create(v.value0); + return function ($97) { + return Data_Maybe.Just.create($96($97)); + }; + }())(pred(dictBoundedEnum.Enum1())(v.value1)); + }, function (v) { + return Data_Maybe.maybe(Data_Functor.map(Data_Maybe.functorMaybe)(Data_Function.flip(Data_Tuple.Tuple.create)(Data_Bounded.bottom(dictBoundedEnum.Bounded0())))(succ(dictEnum)(v.value0)))(function () { + var $98 = Data_Tuple.Tuple.create(v.value0); + return function ($99) { + return Data_Maybe.Just.create($98($99)); + }; + }())(succ(dictBoundedEnum.Enum1())(v.value1)); + }); + }; +}; + +var enumOrdering = new Enum(function () { + return Data_Ord.ordOrdering; +}, function (v) { + if (v instanceof Data_Ordering.LT) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Data_Ordering.EQ) { + return new Data_Maybe.Just(Data_Ordering.LT.value); + } + + ; + + if (v instanceof Data_Ordering.GT) { + return new Data_Maybe.Just(Data_Ordering.EQ.value); + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 72, column 1 - line 78, column 20): " + [v.constructor.name]); +}, function (v) { + if (v instanceof Data_Ordering.LT) { + return new Data_Maybe.Just(Data_Ordering.EQ.value); + } + + ; + + if (v instanceof Data_Ordering.EQ) { + return new Data_Maybe.Just(Data_Ordering.GT.value); + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 72, column 1 - line 78, column 20): " + [v.constructor.name]); +}); + +var enumMaybe = function enumMaybe(dictBoundedEnum) { + return new Enum(function () { + return Data_Maybe.ordMaybe(dictBoundedEnum.Enum1().Ord0()); + }, function (v) { + if (v instanceof Data_Maybe.Nothing) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Data_Maybe.Just) { + return new Data_Maybe.Just(pred(dictBoundedEnum.Enum1())(v.value0)); + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 80, column 1 - line 84, column 32): " + [v.constructor.name]); + }, function (v) { + if (v instanceof Data_Maybe.Nothing) { + return new Data_Maybe.Just(new Data_Maybe.Just(Data_Bounded.bottom(dictBoundedEnum.Bounded0()))); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return Data_Functor.map(Data_Maybe.functorMaybe)(Data_Maybe.Just.create)(succ(dictBoundedEnum.Enum1())(v.value0)); + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 80, column 1 - line 84, column 32): " + [v.constructor.name]); + }); +}; + +var enumInt = new Enum(function () { + return Data_Ord.ordInt; +}, function (n) { + var $67 = n > Data_Bounded.bottom(Data_Bounded.boundedInt); + + if ($67) { + return new Data_Maybe.Just(n - 1 | 0); + } + + ; + return Data_Maybe.Nothing.value; +}, function (n) { + var $68 = n < Data_Bounded.top(Data_Bounded.boundedInt); + + if ($68) { + return new Data_Maybe.Just(n + 1 | 0); + } + + ; + return Data_Maybe.Nothing.value; +}); + +var enumFromTo = function enumFromTo(dictEnum) { + return function (dictUnfoldable1) { + var go = function go(step) { + return function (op) { + return function (to) { + return function (a) { + return new Data_Tuple.Tuple(a, Control_Bind.bind(Data_Maybe.bindMaybe)(step(a))(function (a$prime) { + return Data_Functor.voidLeft(Data_Maybe.functorMaybe)(Control_MonadZero.guard(Data_Maybe.monadZeroMaybe)(op(a$prime)(to)))(a$prime); + })); + }; + }; + }; + }; + + return function (v) { + return function (v1) { + if (Data_Eq.eq(dictEnum.Ord0().Eq0())(v)(v1)) { + return Data_Unfoldable1.singleton(dictUnfoldable1)(v); + } + + ; + + if (Data_Ord.lessThan(dictEnum.Ord0())(v)(v1)) { + return Data_Unfoldable1.unfoldr1(dictUnfoldable1)(go(succ(dictEnum))(Data_Ord.lessThanOrEq(dictEnum.Ord0()))(v1))(v); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Unfoldable1.unfoldr1(dictUnfoldable1)(go(pred(dictEnum))(Data_Ord.greaterThanOrEq(dictEnum.Ord0()))(v1))(v); + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 183, column 14 - line 187, column 51): " + [v.constructor.name, v1.constructor.name]); + }; + }; + }; +}; + +var enumFromThenTo = function enumFromThenTo(dictUnfoldable) { + return function (dictFunctor) { + return function (dictBoundedEnum) { + var go = function go(step) { + return function (to) { + return function (e) { + if (e <= to) { + return new Data_Maybe.Just(new Data_Tuple.Tuple(e, e + step | 0)); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 214, column 5 - line 216, column 28): " + [step.constructor.name, to.constructor.name, e.constructor.name]); + }; + }; + }; + + return function (a) { + return function (b) { + return function (c) { + var c$prime = fromEnum(dictBoundedEnum)(c); + var b$prime = fromEnum(dictBoundedEnum)(b); + var a$prime = fromEnum(dictBoundedEnum)(a); + return Data_Functor.map(dictFunctor)(function () { + var $100 = Data_Maybe.fromJust(); + var $101 = toEnum(dictBoundedEnum); + return function ($102) { + return $100($101($102)); + }; + }())(Data_Unfoldable.unfoldr(dictUnfoldable)(go(b$prime - a$prime | 0)(c$prime))(a$prime)); + }; + }; + }; + }; + }; +}; + +var enumEither = function enumEither(dictBoundedEnum) { + return function (dictBoundedEnum1) { + return new Enum(function () { + return Data_Either.ordEither(dictBoundedEnum.Enum1().Ord0())(dictBoundedEnum1.Enum1().Ord0()); + }, function (v) { + if (v instanceof Data_Either.Left) { + return Data_Maybe.maybe(Data_Maybe.Nothing.value)(function ($103) { + return Data_Maybe.Just.create(Data_Either.Left.create($103)); + })(pred(dictBoundedEnum.Enum1())(v.value0)); + } + + ; + + if (v instanceof Data_Either.Right) { + return Data_Maybe.maybe(new Data_Maybe.Just(new Data_Either.Left(Data_Bounded.top(dictBoundedEnum.Bounded0()))))(function ($104) { + return Data_Maybe.Just.create(Data_Either.Right.create($104)); + })(pred(dictBoundedEnum1.Enum1())(v.value0)); + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 86, column 1 - line 90, column 69): " + [v.constructor.name]); + }, function (v) { + if (v instanceof Data_Either.Left) { + return Data_Maybe.maybe(new Data_Maybe.Just(new Data_Either.Right(Data_Bounded.bottom(dictBoundedEnum1.Bounded0()))))(function ($105) { + return Data_Maybe.Just.create(Data_Either.Left.create($105)); + })(succ(dictBoundedEnum.Enum1())(v.value0)); + } + + ; + + if (v instanceof Data_Either.Right) { + return Data_Maybe.maybe(Data_Maybe.Nothing.value)(function ($106) { + return Data_Maybe.Just.create(Data_Either.Right.create($106)); + })(succ(dictBoundedEnum1.Enum1())(v.value0)); + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 86, column 1 - line 90, column 69): " + [v.constructor.name]); + }); + }; +}; + +var enumBoolean = new Enum(function () { + return Data_Ord.ordBoolean; +}, function (v) { + if (v) { + return new Data_Maybe.Just(false); + } + + ; + return Data_Maybe.Nothing.value; +}, function (v) { + if (!v) { + return new Data_Maybe.Just(true); + } + + ; + return Data_Maybe.Nothing.value; +}); + +var downFromIncluding = function downFromIncluding(dictEnum) { + return function (dictUnfoldable1) { + return Data_Unfoldable1.unfoldr1(dictUnfoldable1)(Control_Apply.apply(Control_Apply.applyFn)(Data_Tuple.Tuple.create)(pred(dictEnum))); + }; +}; + +var diag = function diag(a) { + return new Data_Tuple.Tuple(a, a); +}; + +var downFrom = function downFrom(dictEnum) { + return function (dictUnfoldable) { + return Data_Unfoldable.unfoldr(dictUnfoldable)(function () { + var $107 = Data_Functor.map(Data_Maybe.functorMaybe)(diag); + var $108 = pred(dictEnum); + return function ($109) { + return $107($108($109)); + }; + }()); + }; +}; + +var upFrom = function upFrom(dictEnum) { + return function (dictUnfoldable) { + return Data_Unfoldable.unfoldr(dictUnfoldable)(function () { + var $110 = Data_Functor.map(Data_Maybe.functorMaybe)(diag); + var $111 = succ(dictEnum); + return function ($112) { + return $110($111($112)); + }; + }()); + }; +}; + +var defaultToEnum = function defaultToEnum(dictBounded) { + return function (dictEnum) { + return function (i$prime) { + var go = function go($copy_i) { + return function ($copy_x) { + var $tco_var_i = $copy_i; + var $tco_done = false; + var $tco_result; + + function $tco_loop(i, x) { + var $82 = i === 0; + + if ($82) { + $tco_done = true; + return new Data_Maybe.Just(x); + } + + ; + var v = succ(dictEnum)(x); + + if (v instanceof Data_Maybe.Just) { + $tco_var_i = i - 1 | 0; + $copy_x = v.value0; + return; + } + + ; + + if (v instanceof Data_Maybe.Nothing) { + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 293, column 12 - line 295, column 33): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_i, $copy_x); + } + + ; + return $tco_result; + }; + }; + + var $85 = i$prime < 0; + + if ($85) { + return Data_Maybe.Nothing.value; + } + + ; + return go(i$prime)(Data_Bounded.bottom(dictBounded)); + }; + }; +}; + +var defaultSucc = function defaultSucc(toEnum$prime) { + return function (fromEnum$prime) { + return function (a) { + return toEnum$prime(fromEnum$prime(a) + 1 | 0); + }; + }; +}; + +var defaultPred = function defaultPred(toEnum$prime) { + return function (fromEnum$prime) { + return function (a) { + return toEnum$prime(fromEnum$prime(a) - 1 | 0); + }; + }; +}; + +var defaultFromEnum = function defaultFromEnum(dictEnum) { + var go = function go($copy_i) { + return function ($copy_x) { + var $tco_var_i = $copy_i; + var $tco_done = false; + var $tco_result; + + function $tco_loop(i, x) { + var v = pred(dictEnum)(x); + + if (v instanceof Data_Maybe.Just) { + $tco_var_i = i + 1 | 0; + $copy_x = v.value0; + return; + } + + ; + + if (v instanceof Data_Maybe.Nothing) { + $tco_done = true; + return i; + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 306, column 5 - line 308, column 19): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_i, $copy_x); + } + + ; + return $tco_result; + }; + }; + + return go(0); +}; + +var defaultCardinality = function defaultCardinality(dictBounded) { + return function (dictEnum) { + var go = function go($copy_i) { + return function ($copy_x) { + var $tco_var_i = $copy_i; + var $tco_done = false; + var $tco_result; + + function $tco_loop(i, x) { + var v = succ(dictEnum)(x); + + if (v instanceof Data_Maybe.Just) { + $tco_var_i = i + 1 | 0; + $copy_x = v.value0; + return; + } + + ; + + if (v instanceof Data_Maybe.Nothing) { + $tco_done = true; + return i; + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 273, column 5 - line 275, column 19): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_i, $copy_x); + } + + ; + return $tco_result; + }; + }; + + return Cardinality(go(1)(Data_Bounded.bottom(dictBounded))); + }; +}; + +var charToEnum = function charToEnum(v) { + if (v >= Data_Bounded.bottom(Data_Bounded.boundedInt) && v <= Data_Bounded.top(Data_Bounded.boundedInt)) { + return new Data_Maybe.Just($foreign.fromCharCode(v)); + } + + ; + return Data_Maybe.Nothing.value; +}; + +var enumChar = new Enum(function () { + return Data_Ord.ordChar; +}, defaultPred(charToEnum)($foreign.toCharCode), defaultSucc(charToEnum)($foreign.toCharCode)); + +var cardinality = function cardinality(dict) { + return dict.cardinality; +}; + +var boundedEnumUnit = new BoundedEnum(function () { + return Data_Bounded.boundedUnit; +}, function () { + return enumUnit; +}, 1, Data_Function["const"](0), function (v) { + if (v === 0) { + return new Data_Maybe.Just(Data_Unit.unit); + } + + ; + return Data_Maybe.Nothing.value; +}); +var boundedEnumOrdering = new BoundedEnum(function () { + return Data_Bounded.boundedOrdering; +}, function () { + return enumOrdering; +}, 3, function (v) { + if (v instanceof Data_Ordering.LT) { + return 0; + } + + ; + + if (v instanceof Data_Ordering.EQ) { + return 1; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return 2; + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 137, column 1 - line 145, column 18): " + [v.constructor.name]); +}, function (v) { + if (v === 0) { + return new Data_Maybe.Just(Data_Ordering.LT.value); + } + + ; + + if (v === 1) { + return new Data_Maybe.Just(Data_Ordering.EQ.value); + } + + ; + + if (v === 2) { + return new Data_Maybe.Just(Data_Ordering.GT.value); + } + + ; + return Data_Maybe.Nothing.value; +}); +var boundedEnumChar = new BoundedEnum(function () { + return Data_Bounded.boundedChar; +}, function () { + return enumChar; +}, $foreign.toCharCode(Data_Bounded.top(Data_Bounded.boundedChar)) - $foreign.toCharCode(Data_Bounded.bottom(Data_Bounded.boundedChar)) | 0, $foreign.toCharCode, charToEnum); +var boundedEnumBoolean = new BoundedEnum(function () { + return Data_Bounded.boundedBoolean; +}, function () { + return enumBoolean; +}, 2, function (v) { + if (!v) { + return 0; + } + + ; + + if (v) { + return 1; + } + + ; + throw new Error("Failed pattern match at Data.Enum (line 118, column 1 - line 124, column 20): " + [v.constructor.name]); +}, function (v) { + if (v === 0) { + return new Data_Maybe.Just(false); + } + + ; + + if (v === 1) { + return new Data_Maybe.Just(true); + } + + ; + return Data_Maybe.Nothing.value; +}); +module.exports = { + Enum: Enum, + succ: succ, + pred: pred, + BoundedEnum: BoundedEnum, + cardinality: cardinality, + toEnum: toEnum, + fromEnum: fromEnum, + toEnumWithDefaults: toEnumWithDefaults, + Cardinality: Cardinality, + enumFromTo: enumFromTo, + enumFromThenTo: enumFromThenTo, + upFrom: upFrom, + upFromIncluding: upFromIncluding, + downFrom: downFrom, + downFromIncluding: downFromIncluding, + defaultSucc: defaultSucc, + defaultPred: defaultPred, + defaultCardinality: defaultCardinality, + defaultToEnum: defaultToEnum, + defaultFromEnum: defaultFromEnum, + enumBoolean: enumBoolean, + enumInt: enumInt, + enumChar: enumChar, + enumUnit: enumUnit, + enumOrdering: enumOrdering, + enumMaybe: enumMaybe, + enumEither: enumEither, + enumTuple: enumTuple, + boundedEnumBoolean: boundedEnumBoolean, + boundedEnumChar: boundedEnumChar, + boundedEnumUnit: boundedEnumUnit, + boundedEnumOrdering: boundedEnumOrdering, + newtypeCardinality: newtypeCardinality, + eqCardinality: eqCardinality, + ordCardinality: ordCardinality, + showCardinality: showCardinality +}; +},{"./foreign.js":"Yzse","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.MonadZero/index.js":"lD5R","../Data.Boolean/index.js":"ObQr","../Data.Bounded/index.js":"kcUU","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unfoldable1/index.js":"S0Nl","../Data.Unit/index.js":"NhVk"}],"EM+K":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Array_NonEmpty = require("../Data.Array.NonEmpty/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js"); + +var Data_String_CodeUnits = require("../Data.String.CodeUnits/index.js"); + +var Data_String_NonEmpty_Internal = require("../Data.String.NonEmpty.Internal/index.js"); + +var Data_String_Unsafe = require("../Data.String.Unsafe/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var toNonEmptyString = Unsafe_Coerce.unsafeCoerce; + +var snoc = function snoc(c) { + return function (s) { + return toNonEmptyString(s + Data_String_CodeUnits.singleton(c)); + }; +}; + +var singleton = function singleton($13) { + return toNonEmptyString(Data_String_CodeUnits.singleton($13)); +}; + +var liftS = Unsafe_Coerce.unsafeCoerce; + +var takeWhile = function takeWhile(f) { + var $14 = liftS(Data_String_CodeUnits.takeWhile(f)); + return function ($15) { + return Data_String_NonEmpty_Internal.fromString($14($15)); + }; +}; + +var lastIndexOf$prime = function lastIndexOf$prime(pat) { + var $16 = Data_String_CodeUnits["lastIndexOf'"](pat); + return function ($17) { + return liftS($16($17)); + }; +}; + +var lastIndexOf = function lastIndexOf($18) { + return liftS(Data_String_CodeUnits.lastIndexOf($18)); +}; + +var indexOf$prime = function indexOf$prime(pat) { + var $19 = Data_String_CodeUnits["indexOf'"](pat); + return function ($20) { + return liftS($19($20)); + }; +}; + +var indexOf = function indexOf($21) { + return liftS(Data_String_CodeUnits.indexOf($21)); +}; + +var fromNonEmptyString = Unsafe_Coerce.unsafeCoerce; + +var length = function length($22) { + return Data_String_CodeUnits.length(fromNonEmptyString($22)); +}; + +var splitAt = function splitAt(i) { + return function (nes) { + var v = Data_String_CodeUnits.splitAt(i)(fromNonEmptyString(nes)); + return { + before: Data_String_NonEmpty_Internal.fromString(v.before), + after: Data_String_NonEmpty_Internal.fromString(v.after) + }; + }; +}; + +var take = function take(i) { + return function (nes) { + var s = fromNonEmptyString(nes); + var $8 = i < 1; + + if ($8) { + return Data_Maybe.Nothing.value; + } + + ; + return new Data_Maybe.Just(toNonEmptyString(Data_String_CodeUnits.take(i)(s))); + }; +}; + +var takeRight = function takeRight(i) { + return function (nes) { + var s = fromNonEmptyString(nes); + var $9 = i < 1; + + if ($9) { + return Data_Maybe.Nothing.value; + } + + ; + return new Data_Maybe.Just(toNonEmptyString(Data_String_CodeUnits.takeRight(i)(s))); + }; +}; + +var toChar = function toChar($23) { + return Data_String_CodeUnits.toChar(fromNonEmptyString($23)); +}; + +var toCharArray = function toCharArray($24) { + return Data_String_CodeUnits.toCharArray(fromNonEmptyString($24)); +}; + +var toNonEmptyCharArray = function () { + var $25 = Data_Maybe.fromJust(); + return function ($26) { + return $25(Data_Array_NonEmpty.fromArray(toCharArray($26))); + }; +}(); + +var uncons = function uncons(nes) { + var s = fromNonEmptyString(nes); + return { + head: Data_String_Unsafe.charAt(0)(s), + tail: Data_String_NonEmpty_Internal.fromString(Data_String_CodeUnits.drop(1)(s)) + }; +}; + +var fromFoldable1 = function fromFoldable1(dictFoldable1) { + var $27 = Data_Semigroup_Foldable.fold1(dictFoldable1)(Data_String_NonEmpty_Internal.semigroupNonEmptyString); + return function ($28) { + return $27($28); + }; +}; + +var fromCharArray = function fromCharArray(v) { + if (v.length === 0) { + return Data_Maybe.Nothing.value; + } + + ; + return new Data_Maybe.Just(toNonEmptyString(Data_String_CodeUnits.fromCharArray(v))); +}; + +var fromNonEmptyCharArray = function () { + var $29 = Data_Maybe.fromJust(); + return function ($30) { + return $29(fromCharArray(Data_Array_NonEmpty.toArray($30))); + }; +}(); + +var dropWhile = function dropWhile(f) { + var $31 = liftS(Data_String_CodeUnits.dropWhile(f)); + return function ($32) { + return Data_String_NonEmpty_Internal.fromString($31($32)); + }; +}; + +var dropRight = function dropRight(i) { + return function (nes) { + var s = fromNonEmptyString(nes); + var $11 = i >= Data_String_CodeUnits.length(s); + + if ($11) { + return Data_Maybe.Nothing.value; + } + + ; + return new Data_Maybe.Just(toNonEmptyString(Data_String_CodeUnits.dropRight(i)(s))); + }; +}; + +var drop = function drop(i) { + return function (nes) { + var s = fromNonEmptyString(nes); + var $12 = i >= Data_String_CodeUnits.length(s); + + if ($12) { + return Data_Maybe.Nothing.value; + } + + ; + return new Data_Maybe.Just(toNonEmptyString(Data_String_CodeUnits.drop(i)(s))); + }; +}; + +var countPrefix = function countPrefix($33) { + return liftS(Data_String_CodeUnits.countPrefix($33)); +}; + +var cons = function cons(c) { + return function (s) { + return toNonEmptyString(Data_String_CodeUnits.singleton(c) + s); + }; +}; + +var charAt = function charAt($34) { + return liftS(Data_String_CodeUnits.charAt($34)); +}; + +module.exports = { + fromCharArray: fromCharArray, + fromNonEmptyCharArray: fromNonEmptyCharArray, + singleton: singleton, + cons: cons, + snoc: snoc, + fromFoldable1: fromFoldable1, + toCharArray: toCharArray, + toNonEmptyCharArray: toNonEmptyCharArray, + charAt: charAt, + toChar: toChar, + indexOf: indexOf, + "indexOf'": indexOf$prime, + lastIndexOf: lastIndexOf, + "lastIndexOf'": lastIndexOf$prime, + uncons: uncons, + length: length, + take: take, + takeRight: takeRight, + takeWhile: takeWhile, + drop: drop, + dropRight: dropRight, + dropWhile: dropWhile, + countPrefix: countPrefix, + splitAt: splitAt +}; +},{"../Data.Array.NonEmpty/index.js":"eTKN","../Data.Maybe/index.js":"5mN7","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.String.CodeUnits/index.js":"6c6X","../Data.String.NonEmpty.Internal/index.js":"Ph6A","../Data.String.Unsafe/index.js":"5UWM","../Unsafe.Coerce/index.js":"ETUV"}],"nKWe":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Replacement = function Replacement(x) { + return x; +}; + +var Pattern = function Pattern(x) { + return x; +}; + +var showReplacement = new Data_Show.Show(function (v) { + return "(Replacement " + (Data_Show.show(Data_Show.showString)(v) + ")"); +}); +var showPattern = new Data_Show.Show(function (v) { + return "(Pattern " + (Data_Show.show(Data_Show.showString)(v) + ")"); +}); +var newtypeReplacement = new Data_Newtype.Newtype(function (n) { + return n; +}, Replacement); +var newtypePattern = new Data_Newtype.Newtype(function (n) { + return n; +}, Pattern); +var eqReplacement = new Data_Eq.Eq(function (x) { + return function (y) { + return x === y; + }; +}); +var ordReplacement = new Data_Ord.Ord(function () { + return eqReplacement; +}, function (x) { + return function (y) { + return Data_Ord.compare(Data_Ord.ordString)(x)(y); + }; +}); +var eqPattern = new Data_Eq.Eq(function (x) { + return function (y) { + return x === y; + }; +}); +var ordPattern = new Data_Ord.Ord(function () { + return eqPattern; +}, function (x) { + return function (y) { + return Data_Ord.compare(Data_Ord.ordString)(x)(y); + }; +}); +module.exports = { + Pattern: Pattern, + Replacement: Replacement, + eqPattern: eqPattern, + ordPattern: ordPattern, + newtypePattern: newtypePattern, + showPattern: showPattern, + eqReplacement: eqReplacement, + ordReplacement: ordReplacement, + newtypeReplacement: newtypeReplacement, + showReplacement: showReplacement +}; +},{"../Data.Eq/index.js":"Pq4F","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7"}],"3koD":[function(require,module,exports) { +"use strict"; + +exports.unsafeUnionFn = function (r1, r2) { + var copy = {}; + + for (var k1 in r2) { + if ({}.hasOwnProperty.call(r2, k1)) { + copy[k1] = r2[k1]; + } + } + + for (var k2 in r1) { + if ({}.hasOwnProperty.call(r1, k2)) { + copy[k2] = r1[k2]; + } + } + + return copy; +}; +},{}],"cB+g":[function(require,module,exports) { +"use strict"; // module Data.Function.Uncurried + +exports.mkFn0 = function (fn) { + return function () { + return fn({}); + }; +}; + +exports.mkFn2 = function (fn) { + /* jshint maxparams: 2 */ + return function (a, b) { + return fn(a)(b); + }; +}; + +exports.mkFn3 = function (fn) { + /* jshint maxparams: 3 */ + return function (a, b, c) { + return fn(a)(b)(c); + }; +}; + +exports.mkFn4 = function (fn) { + /* jshint maxparams: 4 */ + return function (a, b, c, d) { + return fn(a)(b)(c)(d); + }; +}; + +exports.mkFn5 = function (fn) { + /* jshint maxparams: 5 */ + return function (a, b, c, d, e) { + return fn(a)(b)(c)(d)(e); + }; +}; + +exports.mkFn6 = function (fn) { + /* jshint maxparams: 6 */ + return function (a, b, c, d, e, f) { + return fn(a)(b)(c)(d)(e)(f); + }; +}; + +exports.mkFn7 = function (fn) { + /* jshint maxparams: 7 */ + return function (a, b, c, d, e, f, g) { + return fn(a)(b)(c)(d)(e)(f)(g); + }; +}; + +exports.mkFn8 = function (fn) { + /* jshint maxparams: 8 */ + return function (a, b, c, d, e, f, g, h) { + return fn(a)(b)(c)(d)(e)(f)(g)(h); + }; +}; + +exports.mkFn9 = function (fn) { + /* jshint maxparams: 9 */ + return function (a, b, c, d, e, f, g, h, i) { + return fn(a)(b)(c)(d)(e)(f)(g)(h)(i); + }; +}; + +exports.mkFn10 = function (fn) { + /* jshint maxparams: 10 */ + return function (a, b, c, d, e, f, g, h, i, j) { + return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)(j); + }; +}; + +exports.runFn0 = function (fn) { + return fn(); +}; + +exports.runFn2 = function (fn) { + return function (a) { + return function (b) { + return fn(a, b); + }; + }; +}; + +exports.runFn3 = function (fn) { + return function (a) { + return function (b) { + return function (c) { + return fn(a, b, c); + }; + }; + }; +}; + +exports.runFn4 = function (fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return fn(a, b, c, d); + }; + }; + }; + }; +}; + +exports.runFn5 = function (fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return fn(a, b, c, d, e); + }; + }; + }; + }; + }; +}; + +exports.runFn6 = function (fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return fn(a, b, c, d, e, f); + }; + }; + }; + }; + }; + }; +}; + +exports.runFn7 = function (fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function (g) { + return fn(a, b, c, d, e, f, g); + }; + }; + }; + }; + }; + }; + }; +}; + +exports.runFn8 = function (fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function (g) { + return function (h) { + return fn(a, b, c, d, e, f, g, h); + }; + }; + }; + }; + }; + }; + }; + }; +}; + +exports.runFn9 = function (fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function (g) { + return function (h) { + return function (i) { + return fn(a, b, c, d, e, f, g, h, i); + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; + +exports.runFn10 = function (fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function (g) { + return function (h) { + return function (i) { + return function (j) { + return fn(a, b, c, d, e, f, g, h, i, j); + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; +},{}],"TowT":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var runFn1 = function runFn1(f) { + return f; +}; + +var mkFn1 = function mkFn1(f) { + return f; +}; + +module.exports = { + mkFn1: mkFn1, + runFn1: runFn1, + mkFn0: $foreign.mkFn0, + mkFn2: $foreign.mkFn2, + mkFn3: $foreign.mkFn3, + mkFn4: $foreign.mkFn4, + mkFn5: $foreign.mkFn5, + mkFn6: $foreign.mkFn6, + mkFn7: $foreign.mkFn7, + mkFn8: $foreign.mkFn8, + mkFn9: $foreign.mkFn9, + mkFn10: $foreign.mkFn10, + runFn0: $foreign.runFn0, + runFn2: $foreign.runFn2, + runFn3: $foreign.runFn3, + runFn4: $foreign.runFn4, + runFn5: $foreign.runFn5, + runFn6: $foreign.runFn6, + runFn7: $foreign.runFn7, + runFn8: $foreign.runFn8, + runFn9: $foreign.runFn9, + runFn10: $foreign.runFn10 +}; +},{"./foreign.js":"cB+g"}],"WmUk":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Function_Uncurried = require("../Data.Function.Uncurried/index.js"); + +var unsafeUnion = Data_Function_Uncurried.runFn2($foreign.unsafeUnionFn); +module.exports = { + unsafeUnion: unsafeUnion, + unsafeUnionFn: $foreign.unsafeUnionFn +}; +},{"./foreign.js":"3koD","../Data.Function.Uncurried/index.js":"TowT"}],"0gG4":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Record_Unsafe = require("../Record.Unsafe/index.js"); + +var Record_Unsafe_Union = require("../Record.Unsafe.Union/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var EqualFields = function EqualFields(equalFields) { + this.equalFields = equalFields; +}; + +var union = function union(dictUnion) { + return function (l) { + return function (r) { + return Record_Unsafe_Union.unsafeUnionFn(l, r); + }; + }; +}; + +var set = function set(dictIsSymbol) { + return function (dictCons) { + return function (dictCons1) { + return function (l) { + return function (b) { + return function (r) { + return Record_Unsafe.unsafeSet(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(b)(r); + }; + }; + }; + }; + }; +}; + +var nub = function nub(dictNub) { + return Unsafe_Coerce.unsafeCoerce; +}; + +var merge = function merge(dictUnion) { + return function (dictNub) { + return function (l) { + return function (r) { + return Record_Unsafe_Union.unsafeUnionFn(l, r); + }; + }; + }; +}; + +var insert = function insert(dictIsSymbol) { + return function (dictLacks) { + return function (dictCons) { + return function (l) { + return function (a) { + return function (r) { + return Record_Unsafe.unsafeSet(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(a)(r); + }; + }; + }; + }; + }; +}; + +var get = function get(dictIsSymbol) { + return function (dictCons) { + return function (l) { + return function (r) { + return Record_Unsafe.unsafeGet(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(r); + }; + }; + }; +}; + +var modify = function modify(dictIsSymbol) { + return function (dictCons) { + return function (dictCons1) { + return function (l) { + return function (f) { + return function (r) { + return set(dictIsSymbol)(dictCons)(dictCons1)(l)(f(get(dictIsSymbol)(dictCons)(l)(r)))(r); + }; + }; + }; + }; + }; +}; + +var equalFieldsNil = new EqualFields(function (v) { + return function (v1) { + return function (v2) { + return true; + }; + }; +}); + +var equalFields = function equalFields(dict) { + return dict.equalFields; +}; + +var equalFieldsCons = function equalFieldsCons(dictIsSymbol) { + return function (dictEq) { + return function (dictCons) { + return function (dictEqualFields) { + return new EqualFields(function (v) { + return function (a) { + return function (b) { + var get$prime = get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value); + var equalRest = equalFields(dictEqualFields)(Type_Data_RowList.RLProxy.value); + return Data_Eq.eq(dictEq)(get$prime(a))(get$prime(b)) && equalRest(a)(b); + }; + }; + }); + }; + }; + }; +}; + +var equal = function equal(dictRowToList) { + return function (dictEqualFields) { + return function (a) { + return function (b) { + return equalFields(dictEqualFields)(Type_Data_RowList.RLProxy.value)(a)(b); + }; + }; + }; +}; + +var disjointUnion = function disjointUnion(dictUnion) { + return function (dictNub) { + return function (l) { + return function (r) { + return Record_Unsafe_Union.unsafeUnionFn(l, r); + }; + }; + }; +}; + +var $$delete = function $$delete(dictIsSymbol) { + return function (dictLacks) { + return function (dictCons) { + return function (l) { + return function (r) { + return Record_Unsafe.unsafeDelete(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(r); + }; + }; + }; + }; +}; + +var rename = function rename(dictIsSymbol) { + return function (dictIsSymbol1) { + return function (dictCons) { + return function (dictLacks) { + return function (dictCons1) { + return function (dictLacks1) { + return function (prev) { + return function (next) { + return function (record) { + return insert(dictIsSymbol1)(dictLacks1)(dictCons1)(next)(get(dictIsSymbol)(dictCons)(prev)(record))($$delete(dictIsSymbol)(dictLacks)(dictCons)(prev)(record)); + }; + }; + }; + }; + }; + }; + }; + }; +}; + +module.exports = { + get: get, + set: set, + modify: modify, + insert: insert, + "delete": $$delete, + rename: rename, + equal: equal, + merge: merge, + union: union, + disjointUnion: disjointUnion, + nub: nub, + EqualFields: EqualFields, + equalFields: equalFields, + equalFieldsCons: equalFieldsCons, + equalFieldsNil: equalFieldsNil +}; +},{"../Data.Eq/index.js":"Pq4F","../Data.Symbol/index.js":"4oJQ","../Record.Unsafe/index.js":"KG04","../Record.Unsafe.Union/index.js":"WmUk","../Type.Data.RowList/index.js":"XaXP","../Unsafe.Coerce/index.js":"ETUV"}],"/s47":[function(require,module,exports) { +/* global exports, ArrayBuffer, Float32Array, Int32Array */ +"use strict"; // module Test.QuickCheck.Gen + +exports.float32ToInt32 = function (n) { + var arr = new ArrayBuffer(4); + var fv = new Float32Array(arr); + var iv = new Int32Array(arr); + fv[0] = n; + return iv[0]; +}; +},{}],"34Kp":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Lazy = require("../Control.Lazy/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js"); + +var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js"); + +var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js"); + +var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js"); + +var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js"); + +var Control_MonadPlus = require("../Control.MonadPlus/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var StateT = function StateT(x) { + return x; +}; + +var withStateT = function withStateT(f) { + return function (v) { + return function ($107) { + return v(f($107)); + }; + }; +}; + +var runStateT = function runStateT(v) { + return v; +}; + +var newtypeStateT = new Data_Newtype.Newtype(function (n) { + return n; +}, StateT); +var monadTransStateT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) { + return function (m) { + return function (s) { + return Control_Bind.bind(dictMonad.Bind1())(m)(function (v) { + return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(v, s)); + }); + }; + }; +}); + +var mapStateT = function mapStateT(f) { + return function (v) { + return function ($108) { + return f(v($108)); + }; + }; +}; + +var lazyStateT = new Control_Lazy.Lazy(function (f) { + return function (s) { + var v = f(Data_Unit.unit); + return v(s); + }; +}); + +var functorStateT = function functorStateT(dictFunctor) { + return new Data_Functor.Functor(function (f) { + return function (v) { + return function (s) { + return Data_Functor.map(dictFunctor)(function (v1) { + return new Data_Tuple.Tuple(f(v1.value0), v1.value1); + })(v(s)); + }; + }; + }); +}; + +var execStateT = function execStateT(dictFunctor) { + return function (v) { + return function (s) { + return Data_Functor.map(dictFunctor)(Data_Tuple.snd)(v(s)); + }; + }; +}; + +var evalStateT = function evalStateT(dictFunctor) { + return function (v) { + return function (s) { + return Data_Functor.map(dictFunctor)(Data_Tuple.fst)(v(s)); + }; + }; +}; + +var monadStateT = function monadStateT(dictMonad) { + return new Control_Monad.Monad(function () { + return applicativeStateT(dictMonad); + }, function () { + return bindStateT(dictMonad); + }); +}; + +var bindStateT = function bindStateT(dictMonad) { + return new Control_Bind.Bind(function () { + return applyStateT(dictMonad); + }, function (v) { + return function (f) { + return function (s) { + return Control_Bind.bind(dictMonad.Bind1())(v(s))(function (v1) { + var v3 = f(v1.value0); + return v3(v1.value1); + }); + }; + }; + }); +}; + +var applyStateT = function applyStateT(dictMonad) { + return new Control_Apply.Apply(function () { + return functorStateT(dictMonad.Bind1().Apply0().Functor0()); + }, Control_Monad.ap(monadStateT(dictMonad))); +}; + +var applicativeStateT = function applicativeStateT(dictMonad) { + return new Control_Applicative.Applicative(function () { + return applyStateT(dictMonad); + }, function (a) { + return function (s) { + return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(a, s)); + }; + }); +}; + +var monadAskStateT = function monadAskStateT(dictMonadAsk) { + return new Control_Monad_Reader_Class.MonadAsk(function () { + return monadStateT(dictMonadAsk.Monad0()); + }, Control_Monad_Trans_Class.lift(monadTransStateT)(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk))); +}; + +var monadReaderStateT = function monadReaderStateT(dictMonadReader) { + return new Control_Monad_Reader_Class.MonadReader(function () { + return monadAskStateT(dictMonadReader.MonadAsk0()); + }, function () { + var $109 = Control_Monad_Reader_Class.local(dictMonadReader); + return function ($110) { + return mapStateT($109($110)); + }; + }()); +}; + +var monadContStateT = function monadContStateT(dictMonadCont) { + return new Control_Monad_Cont_Class.MonadCont(function () { + return monadStateT(dictMonadCont.Monad0()); + }, function (f) { + return function (s) { + return Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) { + var v = f(function (a) { + return function (s$prime) { + return c(new Data_Tuple.Tuple(a, s$prime)); + }; + }); + return v(s); + }); + }; + }); +}; + +var monadEffectState = function monadEffectState(dictMonadEffect) { + return new Effect_Class.MonadEffect(function () { + return monadStateT(dictMonadEffect.Monad0()); + }, function () { + var $111 = Control_Monad_Trans_Class.lift(monadTransStateT)(dictMonadEffect.Monad0()); + var $112 = Effect_Class.liftEffect(dictMonadEffect); + return function ($113) { + return $111($112($113)); + }; + }()); +}; + +var monadRecStateT = function monadRecStateT(dictMonadRec) { + return new Control_Monad_Rec_Class.MonadRec(function () { + return monadStateT(dictMonadRec.Monad0()); + }, function (f) { + return function (a) { + var f$prime = function f$prime(v) { + var v1 = f(v.value0); + return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(v1(v.value1))(function (v2) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(function () { + if (v2.value0 instanceof Control_Monad_Rec_Class.Loop) { + return new Control_Monad_Rec_Class.Loop(new Data_Tuple.Tuple(v2.value0.value0, v2.value1)); + } + + ; + + if (v2.value0 instanceof Control_Monad_Rec_Class.Done) { + return new Control_Monad_Rec_Class.Done(new Data_Tuple.Tuple(v2.value0.value0, v2.value1)); + } + + ; + throw new Error("Failed pattern match at Control.Monad.State.Trans (line 87, column 16 - line 89, column 40): " + [v2.value0.constructor.name]); + }()); + }); + }; + + return function (s) { + return Control_Monad_Rec_Class.tailRecM(dictMonadRec)(f$prime)(new Data_Tuple.Tuple(a, s)); + }; + }; + }); +}; + +var monadStateStateT = function monadStateStateT(dictMonad) { + return new Control_Monad_State_Class.MonadState(function () { + return monadStateT(dictMonad); + }, function (f) { + return StateT(function () { + var $114 = Control_Applicative.pure(dictMonad.Applicative0()); + return function ($115) { + return $114(f($115)); + }; + }()); + }); +}; + +var monadTellStateT = function monadTellStateT(dictMonadTell) { + return new Control_Monad_Writer_Class.MonadTell(function () { + return monadStateT(dictMonadTell.Monad0()); + }, function () { + var $116 = Control_Monad_Trans_Class.lift(monadTransStateT)(dictMonadTell.Monad0()); + var $117 = Control_Monad_Writer_Class.tell(dictMonadTell); + return function ($118) { + return $116($117($118)); + }; + }()); +}; + +var monadWriterStateT = function monadWriterStateT(dictMonadWriter) { + return new Control_Monad_Writer_Class.MonadWriter(function () { + return monadTellStateT(dictMonadWriter.MonadTell0()); + }, function (m) { + return function (s) { + return Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(Control_Monad_Writer_Class.listen(dictMonadWriter)(m(s)))(function (v) { + return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value0, v.value1), v.value0.value1)); + }); + }; + }, function (m) { + return function (s) { + return Control_Monad_Writer_Class.pass(dictMonadWriter)(Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(m(s))(function (v) { + return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value0, v.value1), v.value0.value1)); + })); + }; + }); +}; + +var monadThrowStateT = function monadThrowStateT(dictMonadThrow) { + return new Control_Monad_Error_Class.MonadThrow(function () { + return monadStateT(dictMonadThrow.Monad0()); + }, function (e) { + return Control_Monad_Trans_Class.lift(monadTransStateT)(dictMonadThrow.Monad0())(Control_Monad_Error_Class.throwError(dictMonadThrow)(e)); + }); +}; + +var monadErrorStateT = function monadErrorStateT(dictMonadError) { + return new Control_Monad_Error_Class.MonadError(function () { + return monadThrowStateT(dictMonadError.MonadThrow0()); + }, function (v) { + return function (h) { + return function (s) { + return Control_Monad_Error_Class.catchError(dictMonadError)(v(s))(function (e) { + var v1 = h(e); + return v1(s); + }); + }; + }; + }); +}; + +var altStateT = function altStateT(dictMonad) { + return function (dictAlt) { + return new Control_Alt.Alt(function () { + return functorStateT(dictAlt.Functor0()); + }, function (v) { + return function (v1) { + return function (s) { + return Control_Alt.alt(dictAlt)(v(s))(v1(s)); + }; + }; + }); + }; +}; + +var plusStateT = function plusStateT(dictMonad) { + return function (dictPlus) { + return new Control_Plus.Plus(function () { + return altStateT(dictMonad)(dictPlus.Alt0()); + }, function (v) { + return Control_Plus.empty(dictPlus); + }); + }; +}; + +var alternativeStateT = function alternativeStateT(dictMonad) { + return function (dictAlternative) { + return new Control_Alternative.Alternative(function () { + return applicativeStateT(dictMonad); + }, function () { + return plusStateT(dictMonad)(dictAlternative.Plus1()); + }); + }; +}; + +var monadZeroStateT = function monadZeroStateT(dictMonadZero) { + return new Control_MonadZero.MonadZero(function () { + return alternativeStateT(dictMonadZero.Monad0())(dictMonadZero.Alternative1()); + }, function () { + return monadStateT(dictMonadZero.Monad0()); + }); +}; + +var monadPlusStateT = function monadPlusStateT(dictMonadPlus) { + return new Control_MonadPlus.MonadPlus(function () { + return monadZeroStateT(dictMonadPlus.MonadZero0()); + }); +}; + +module.exports = { + StateT: StateT, + runStateT: runStateT, + evalStateT: evalStateT, + execStateT: execStateT, + mapStateT: mapStateT, + withStateT: withStateT, + newtypeStateT: newtypeStateT, + functorStateT: functorStateT, + applyStateT: applyStateT, + applicativeStateT: applicativeStateT, + altStateT: altStateT, + plusStateT: plusStateT, + alternativeStateT: alternativeStateT, + bindStateT: bindStateT, + monadStateT: monadStateT, + monadRecStateT: monadRecStateT, + monadZeroStateT: monadZeroStateT, + monadPlusStateT: monadPlusStateT, + monadTransStateT: monadTransStateT, + lazyStateT: lazyStateT, + monadEffectState: monadEffectState, + monadContStateT: monadContStateT, + monadThrowStateT: monadThrowStateT, + monadErrorStateT: monadErrorStateT, + monadAskStateT: monadAskStateT, + monadReaderStateT: monadReaderStateT, + monadStateStateT: monadStateStateT, + monadTellStateT: monadTellStateT, + monadWriterStateT: monadWriterStateT +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Lazy/index.js":"y9cE","../Control.Monad/index.js":"U/Ix","../Control.Monad.Cont.Class/index.js":"IpNh","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Class/index.js":"gxgA","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk","../Effect.Class/index.js":"dWtH"}],"mGZW":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Monad_State_Trans = require("../Control.Monad.State.Trans/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var withState = Control_Monad_State_Trans.withStateT; + +var runState = function runState(v) { + var $16 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity); + return function ($17) { + return $16(v($17)); + }; +}; + +var mapState = function mapState(f) { + return Control_Monad_State_Trans.mapStateT(function () { + var $18 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity); + return function ($19) { + return Data_Identity.Identity(f($18($19))); + }; + }()); +}; + +var execState = function execState(v) { + return function (s) { + var v1 = v(s); + return v1.value1; + }; +}; + +var evalState = function evalState(v) { + return function (s) { + var v1 = v(s); + return v1.value0; + }; +}; + +module.exports = { + runState: runState, + evalState: evalState, + execState: execState, + mapState: mapState, + withState: withState +}; +},{"../Control.Monad.State.Trans/index.js":"34Kp","../Data.Identity/index.js":"2OKT","../Data.Newtype/index.js":"lz8k"}],"7S1u":[function(require,module,exports) { +"use strict"; + +exports.random = Math.random; +},{}],"V+tx":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Effect = require("../Effect/index.js"); + +var randomRange = function randomRange(min) { + return function (max) { + return function __do() { + var v = $foreign.random(); + return v * (max - min) + min; + }; + }; +}; + +var randomInt = function randomInt(low) { + return function (high) { + return function __do() { + var v = $foreign.random(); + var asNumber = (Data_Int.toNumber(high) - Data_Int.toNumber(low) + 1) * v + Data_Int.toNumber(low); + return Data_Int.floor(asNumber); + }; + }; +}; + +var randomBool = Data_Functor.map(Effect.functorEffect)(function (v) { + return v < 0.5; +})($foreign.random); +module.exports = { + randomInt: randomInt, + randomRange: randomRange, + randomBool: randomBool, + random: $foreign.random +}; +},{"./foreign.js":"7S1u","../Data.Functor/index.js":"+0AE","../Data.Int/index.js":"xNJb","../Effect/index.js":"oTWB"}],"1RqQ":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_EuclideanRing = require("../Data.EuclideanRing/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Effect = require("../Effect/index.js"); + +var Effect_Random = require("../Effect.Random/index.js"); + +var $$Math = require("../Math/index.js"); + +var Seed = function Seed(x) { + return x; +}; + +var unSeed = function unSeed(v) { + return v; +}; + +var showSeed = new Data_Show.Show(function (v) { + return "Seed " + Data_Show.show(Data_Show.showInt)(v); +}); +var seedMin = 1; +var lcgM = 2147483647; +var seedMax = lcgM - 1 | 0; + +var mkSeed = function mkSeed(x) { + var ensureBetween = function ensureBetween(min) { + return function (max) { + return function (n) { + var rangeSize = max - min | 0; + var n$prime = Data_EuclideanRing.mod(Data_EuclideanRing.euclideanRingInt)(n)(rangeSize); + var $14 = n$prime < min; + + if ($14) { + return n$prime + max | 0; + } + + ; + return n$prime; + }; + }; + }; + + return ensureBetween(seedMin)(seedMax)(x); +}; + +var randomSeed = Data_Functor.map(Effect.functorEffect)(mkSeed)(Effect_Random.randomInt(seedMin)(seedMax)); +var lcgC = 0; +var lcgA = 48271; + +var lcgPerturb = function lcgPerturb(d) { + return function (v) { + return Seed(Data_Maybe.fromJust()(Data_Int.fromNumber($$Math.remainder(Data_Int.toNumber(lcgA) * Data_Int.toNumber(v) + d)(Data_Int.toNumber(lcgM))))); + }; +}; + +var lcgNext = lcgPerturb(Data_Int.toNumber(lcgC)); +var eqSeed = new Data_Eq.Eq(function (x) { + return function (y) { + return x === y; + }; +}); +var ordSeed = new Data_Ord.Ord(function () { + return eqSeed; +}, function (x) { + return function (y) { + return Data_Ord.compare(Data_Ord.ordInt)(x)(y); + }; +}); +module.exports = { + mkSeed: mkSeed, + unSeed: unSeed, + randomSeed: randomSeed, + lcgA: lcgA, + lcgC: lcgC, + lcgM: lcgM, + lcgNext: lcgNext, + lcgPerturb: lcgPerturb, + eqSeed: eqSeed, + ordSeed: ordSeed, + showSeed: showSeed +}; +},{"../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Functor/index.js":"+0AE","../Data.Int/index.js":"xNJb","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7","../Effect/index.js":"oTWB","../Effect.Random/index.js":"V+tx","../Math/index.js":"Rpaz"}],"9U+U":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_Gen_Class = require("../Control.Monad.Gen.Class/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Control_Monad_State = require("../Control.Monad.State/index.js"); + +var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js"); + +var Control_Monad_State_Trans = require("../Control.Monad.State.Trans/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_Enum = require("../Data.Enum/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Data_List = require("../Data.List/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_NonEmpty = require("../Data.NonEmpty/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var $$Math = require("../Math/index.js"); + +var Random_LCG = require("../Random.LCG/index.js"); + +var Gen = function Gen(x) { + return x; +}; + +var unGen = function unGen(v) { + return v; +}; + +var runGen = function runGen($78) { + return Control_Monad_State.runState(unGen($78)); +}; + +var stateful = function stateful(f) { + return Gen(Control_Monad_State_Class.state(Control_Monad_State_Trans.monadStateStateT(Data_Identity.monadIdentity))(function (s) { + return runGen(f(s))(s); + })); +}; + +var sized = function sized(f) { + return stateful(function (s) { + return f(s.size); + }); +}; + +var variant = function variant(n) { + return function (g) { + return Gen(Control_Monad_State_Class.state(Control_Monad_State_Trans.monadStateStateT(Data_Identity.monadIdentity))(function (s) { + return runGen(g)({ + newSeed: n, + size: s.size + }); + })); + }; +}; + +var resize = function resize(sz) { + return function (g) { + return Gen(Control_Monad_State_Class.state(Control_Monad_State_Trans.monadStateStateT(Data_Identity.monadIdentity))(function (v) { + return Data_Functor.map(Data_Tuple.functorTuple)(function (v1) { + return { + size: v.size, + newSeed: v1.newSeed + }; + })(runGen(g)({ + newSeed: v.newSeed, + size: sz + })); + })); + }; +}; + +var replicateMRec = function replicateMRec(dictMonadRec) { + return function (k) { + return function (v) { + if (k <= 0) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(Data_List_Types.Nil.value); + } + + ; + + var go = function go(v1) { + if (v1.value1 === 0) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Done(v1.value0)); + } + + ; + return Data_Functor.mapFlipped(dictMonadRec.Monad0().Bind1().Apply0().Functor0())(v)(function (x) { + return new Control_Monad_Rec_Class.Loop(new Data_Tuple.Tuple(new Data_List_Types.Cons(x, v1.value0), v1.value1 - 1 | 0)); + }); + }; + + return Control_Monad_Rec_Class.tailRecM(dictMonadRec)(go)(new Data_Tuple.Tuple(Data_List_Types.Nil.value, k)); + }; + }; +}; + +var repeatable = function repeatable(f) { + return Gen(Control_Monad_State_Class.state(Control_Monad_State_Trans.monadStateStateT(Data_Identity.monadIdentity))(function (s) { + return new Data_Tuple.Tuple(function (a) { + return Data_Tuple.fst(runGen(f(a))(s)); + }, { + newSeed: Random_LCG.lcgNext(s.newSeed), + size: s.size + }); + })); +}; + +var perturbGen = function perturbGen(n) { + return function (gen) { + return Control_Bind.discard(Control_Bind.discardUnit)(Control_Monad_State_Trans.bindStateT(Data_Identity.monadIdentity))(Data_Functor["void"](Control_Monad_State_Trans.functorStateT(Data_Identity.functorIdentity))(Control_Monad_State_Class.modify(Control_Monad_State_Trans.monadStateStateT(Data_Identity.monadIdentity))(function (s) { + var $40 = {}; + + for (var $41 in s) { + if ({}.hasOwnProperty.call(s, $41)) { + $40[$41] = s[$41]; + } + + ; + } + + ; + $40.newSeed = Random_LCG.lcgPerturb(Data_Int.toNumber($foreign.float32ToInt32(n)))(s.newSeed); + return $40; + })))(function () { + return unGen(gen); + }); + }; +}; + +var monadRecGen = Control_Monad_State_Trans.monadRecStateT(Control_Monad_Rec_Class.monadRecIdentity); +var monadGen = Control_Monad_State_Trans.monadStateT(Data_Identity.monadIdentity); +var listOf = replicateMRec(monadRecGen); + +var lcgStep = function () { + var f = function f(s) { + return new Data_Tuple.Tuple(Random_LCG.unSeed(s.newSeed), function () { + var $43 = {}; + + for (var $44 in s) { + if ({}.hasOwnProperty.call(s, $44)) { + $43[$44] = s[$44]; + } + + ; + } + + ; + $43.newSeed = Random_LCG.lcgNext(s.newSeed); + return $43; + }()); + }; + + return Gen(Control_Monad_State_Class.state(Control_Monad_State_Trans.monadStateStateT(Data_Identity.monadIdentity))(f)); +}(); + +var lazyGen = Control_Monad_State_Trans.lazyStateT; +var functorGen = Control_Monad_State_Trans.functorStateT(Data_Identity.functorIdentity); +var uniform = Data_Functor.map(functorGen)(function (n) { + return Data_Int.toNumber(n) / Data_Int.toNumber(Random_LCG.lcgM); +})(lcgStep); + +var vectorOf = function vectorOf(k) { + return function (g) { + return Data_Functor.map(functorGen)(Data_List.toUnfoldable(Data_Unfoldable.unfoldableArray))(listOf(k)(g)); + }; +}; + +var evalGen = function evalGen($79) { + return Control_Monad_State.evalState(unGen($79)); +}; + +var sample = function sample(seed) { + return function (sz) { + return function (g) { + return evalGen(vectorOf(sz)(g))({ + newSeed: seed, + size: sz + }); + }; + }; +}; + +var randomSample$prime = function randomSample$prime(n) { + return function (g) { + return function __do() { + var v = Random_LCG.randomSeed(); + return sample(v)(n)(g); + }; + }; +}; + +var randomSample = randomSample$prime(10); + +var choose = function choose(a) { + return function (b) { + var min$prime = Data_Ord.min(Data_Ord.ordNumber)(a)(b); + var max$prime = Data_Ord.max(Data_Ord.ordNumber)(a)(b); + return Data_Functor.map(functorGen)(function () { + var $80 = Data_Semiring.add(Data_Semiring.semiringNumber)(min$prime); + var $81 = Data_Semiring.mul(Data_Semiring.semiringNumber)(max$prime - min$prime); + return function ($82) { + return $80($81($82)); + }; + }())(uniform); + }; +}; + +var bindGen = Control_Monad_State_Trans.bindStateT(Data_Identity.monadIdentity); + +var frequency = function frequency(v) { + var xxs = new Data_List_Types.Cons(v.value0, v.value1); + var total = Data_Newtype.unwrap(Data_Newtype.newtypeAdditive)(Data_Foldable.fold(Data_List_Types.foldableList)(Data_Monoid_Additive.monoidAdditive(Data_Semiring.semiringNumber))(Data_Functor.map(Data_List_Types.functorList)(function ($83) { + return Data_Monoid_Additive.Additive(Data_Tuple.fst($83)); + })(xxs))); + + var pick = function pick($copy_n) { + return function ($copy_d) { + return function ($copy_v1) { + var $tco_var_n = $copy_n; + var $tco_var_d = $copy_d; + var $tco_done = false; + var $tco_result; + + function $tco_loop(n, d, v1) { + if (v1 instanceof Data_List_Types.Nil) { + $tco_done = true; + return d; + } + + ; + + if (v1 instanceof Data_List_Types.Cons) { + var $51 = n <= v1.value0.value0; + + if ($51) { + $tco_done = true; + return v1.value0.value1; + } + + ; + $tco_var_n = n - v1.value0.value0; + $tco_var_d = d; + $copy_v1 = v1.value1; + return; + } + + ; + throw new Error("Failed pattern match at Test.QuickCheck.Gen (line 162, column 5 - line 162, column 21): " + [n.constructor.name, d.constructor.name, v1.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_n, $tco_var_d, $copy_v1); + } + + ; + return $tco_result; + }; + }; + }; + + return Control_Bind.bind(bindGen)(choose(0)(total))(function (v1) { + return pick(v1)(Data_Tuple.snd(v.value0))(xxs); + }); +}; + +var applyGen = Control_Monad_State_Trans.applyStateT(Data_Identity.monadIdentity); + +var chooseInt$prime = function chooseInt$prime(a) { + return function (b) { + var numB = Data_Int.toNumber(b); + var numA = Data_Int.toNumber(a); + + var clamp = function clamp(x) { + return numA + $$Math.remainder(x)(numB - numA + 1); + }; + + var choose31BitPosNumber = Data_Functor.map(functorGen)(Data_Int.toNumber)(lcgStep); + var choose32BitPosNumber = Control_Apply.apply(applyGen)(Data_Functor.map(functorGen)(Data_Semiring.add(Data_Semiring.semiringNumber))(choose31BitPosNumber))(Data_Functor.map(functorGen)(Data_Semiring.mul(Data_Semiring.semiringNumber)(2.0))(choose31BitPosNumber)); + return Data_Functor.map(functorGen)(function ($84) { + return Data_Int.floor(clamp($84)); + })(choose32BitPosNumber); + }; +}; + +var chooseInt = function chooseInt(a) { + return function (b) { + var $59 = a <= b; + + if ($59) { + return chooseInt$prime(a)(b); + } + + ; + return chooseInt$prime(b)(a); + }; +}; + +var arrayOf = function arrayOf(g) { + return sized(function (n) { + return Control_Bind.bind(bindGen)(chooseInt(0)(n))(function (v) { + return vectorOf(v)(g); + }); + }); +}; + +var monadGenGen = new Control_Monad_Gen_Class.MonadGen(function () { + return monadGen; +}, Data_Functor.map(functorGen)(function (v) { + return v < 0.5; +})(uniform), choose, chooseInt, function (f) { + return function (g) { + return sized(function (s) { + return resize(f(s))(g); + }); + }; +}, sized); + +var oneOf = function oneOf(v) { + return Control_Bind.bind(bindGen)(chooseInt(0)(Data_Array.length(v.value1)))(function (v1) { + var $63 = v1 < 1; + + if ($63) { + return v.value0; + } + + ; + return Data_Maybe.fromMaybe(v.value0)(Data_Array.index(v.value1)(v1 - 1 | 0)); + }); +}; + +var applicativeGen = Control_Monad_State_Trans.applicativeStateT(Data_Identity.monadIdentity); + +var arrayOf1 = function arrayOf1(g) { + return sized(function (n) { + return Control_Bind.bind(bindGen)(chooseInt(0)(n))(function (v) { + return Control_Bind.bind(bindGen)(g)(function (v1) { + return Control_Bind.bind(bindGen)(vectorOf(v - 1 | 0)(g))(function (v2) { + return Control_Applicative.pure(applicativeGen)(new Data_NonEmpty.NonEmpty(v1, v2)); + }); + }); + }); + }); +}; + +var elements = function elements(v) { + return Control_Bind.bind(bindGen)(chooseInt(0)(Data_Array.length(v.value1)))(function (v1) { + return Control_Applicative.pure(applicativeGen)(function () { + var $71 = v1 === 0; + + if ($71) { + return v.value0; + } + + ; + return Data_Maybe.fromMaybe(v.value0)(Data_Array.index(v.value1)(v1 - 1 | 0)); + }()); + }); +}; + +var $$enum = function $$enum(dictBoundedEnum) { + return Control_Bind.bind(bindGen)(chooseInt(Data_Enum.fromEnum(dictBoundedEnum)(Data_Bounded.bottom(dictBoundedEnum.Bounded0())))(Data_Enum.fromEnum(dictBoundedEnum)(Data_Bounded.top(dictBoundedEnum.Bounded0()))))(function (v) { + return Control_Applicative.pure(applicativeGen)(Data_Maybe.fromJust()(Data_Enum.toEnum(dictBoundedEnum)(v))); + }); +}; + +var shuffle = function shuffle(xs) { + return Control_Bind.bind(bindGen)(vectorOf(Data_Array.length(xs))(chooseInt(0)(Data_Bounded.top(Data_Bounded.boundedInt))))(function (v) { + return Control_Applicative.pure(applicativeGen)(Data_Functor.map(Data_Functor.functorArray)(Data_Tuple.snd)(Data_Array.sortBy(Data_Ord.comparing(Data_Ord.ordInt)(Data_Tuple.fst))(Data_Array.zip(v)(xs)))); + }); +}; + +var suchThat = function suchThat(gen) { + return function (pred) { + var go = function go(v) { + return Control_Bind.bind(bindGen)(gen)(function (v1) { + return Control_Applicative.pure(applicativeGen)(function () { + var $77 = pred(v1); + + if ($77) { + return new Control_Monad_Rec_Class.Done(v1); + } + + ; + return new Control_Monad_Rec_Class.Loop(Data_Unit.unit); + }()); + }); + }; + + return Control_Monad_Rec_Class.tailRecM(monadRecGen)(go)(Data_Unit.unit); + }; +}; + +var altGen = Control_Monad_State_Trans.altStateT(Data_Identity.monadIdentity)(Data_Identity.altIdentity); +module.exports = { + unGen: unGen, + repeatable: repeatable, + stateful: stateful, + variant: variant, + suchThat: suchThat, + sized: sized, + resize: resize, + choose: choose, + chooseInt: chooseInt, + oneOf: oneOf, + frequency: frequency, + arrayOf: arrayOf, + arrayOf1: arrayOf1, + listOf: listOf, + vectorOf: vectorOf, + elements: elements, + shuffle: shuffle, + runGen: runGen, + evalGen: evalGen, + perturbGen: perturbGen, + uniform: uniform, + sample: sample, + randomSample: randomSample, + "randomSample'": randomSample$prime, + functorGen: functorGen, + applyGen: applyGen, + applicativeGen: applicativeGen, + bindGen: bindGen, + monadGen: monadGen, + altGen: altGen, + monadRecGen: monadRecGen, + lazyGen: lazyGen, + monadGenGen: monadGenGen +}; +},{"./foreign.js":"/s47","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad.Gen.Class/index.js":"ONWB","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State/index.js":"mGZW","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.State.Trans/index.js":"34Kp","../Data.Array/index.js":"4t4C","../Data.Bounded/index.js":"kcUU","../Data.Enum/index.js":"oOsU","../Data.Foldable/index.js":"eVDl","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Int/index.js":"xNJb","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Monoid.Additive/index.js":"fHyj","../Data.Newtype/index.js":"lz8k","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Semiring/index.js":"11NF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unit/index.js":"NhVk","../Math/index.js":"Rpaz","../Random.LCG/index.js":"1RqQ"}],"rKI8":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Monad_Gen_Class = require("../Control.Monad.Gen.Class/index.js"); + +var Control_Monad_Gen_Common = require("../Control.Monad.Gen.Common/index.js"); + +var Data_Array_NonEmpty = require("../Data.Array.NonEmpty/index.js"); + +var Data_Array_ST = require("../Data.Array.ST/index.js"); + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Enum = require("../Data.Enum/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Generic_Rep = require("../Data.Generic.Rep/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Data_Lazy = require("../Data.Lazy/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_NonEmpty = require("../Data.NonEmpty/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_String_CodeUnits = require("../Data.String.CodeUnits/index.js"); + +var Data_String_Common = require("../Data.String.Common/index.js"); + +var Data_String_NonEmpty_CodeUnits = require("../Data.String.NonEmpty.CodeUnits/index.js"); + +var Data_String_NonEmpty_Internal = require("../Data.String.NonEmpty.Internal/index.js"); + +var Data_String_Pattern = require("../Data.String.Pattern/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Record = require("../Record/index.js"); + +var Test_QuickCheck_Gen = require("../Test.QuickCheck.Gen/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var Coarbitrary = function Coarbitrary(coarbitrary) { + this.coarbitrary = coarbitrary; +}; + +var ArbitraryRowList = function ArbitraryRowList(arbitraryRecord) { + this.arbitraryRecord = arbitraryRecord; +}; + +var ArbitraryGenericSum = function ArbitraryGenericSum(arbitraryGenericSum) { + this.arbitraryGenericSum = arbitraryGenericSum; +}; + +var Arbitrary = function Arbitrary(arbitrary) { + this.arbitrary = arbitrary; +}; + +var coarbitraryNoArguments = new Coarbitrary(function (v) { + return Control_Category.identity(Control_Category.categoryFn); +}); + +var coarbitrary = function coarbitrary(dict) { + return dict.coarbitrary; +}; + +var coarbitraryArgument = function coarbitraryArgument(dictCoarbitrary) { + return new Coarbitrary(function (v) { + return coarbitrary(dictCoarbitrary)(v); + }); +}; + +var coarbitraryConstructor = function coarbitraryConstructor(dictCoarbitrary) { + return new Coarbitrary(function (v) { + return coarbitrary(dictCoarbitrary)(v); + }); +}; + +var coarbitraryProduct = function coarbitraryProduct(dictCoarbitrary) { + return function (dictCoarbitrary1) { + return new Coarbitrary(function (v) { + var $111 = coarbitrary(dictCoarbitrary1)(v.value1); + var $112 = coarbitrary(dictCoarbitrary)(v.value0); + return function ($113) { + return $111($112($113)); + }; + }); + }; +}; + +var coarbitrarySum = function coarbitrarySum(dictCoarbitrary) { + return function (dictCoarbitrary1) { + return new Coarbitrary(function (v) { + if (v instanceof Data_Generic_Rep.Inl) { + return coarbitrary(dictCoarbitrary)(v.value0); + } + + ; + + if (v instanceof Data_Generic_Rep.Inr) { + return coarbitrary(dictCoarbitrary1)(v.value0); + } + + ; + throw new Error("Failed pattern match at Test.QuickCheck.Arbitrary (line 216, column 1 - line 218, column 38): " + [v.constructor.name]); + }); + }; +}; + +var genericCoarbitrary = function genericCoarbitrary(dictGeneric) { + return function (dictCoarbitrary) { + return function (x) { + return function (g) { + return Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Generic_Rep.to(dictGeneric))(coarbitrary(dictCoarbitrary)(Data_Generic_Rep.from(dictGeneric)(x))(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Generic_Rep.from(dictGeneric))(g))); + }; + }; + }; +}; + +var coarbUnit = new Coarbitrary(function (v) { + return Test_QuickCheck_Gen.perturbGen(1.0); +}); + +var coarbTuple = function coarbTuple(dictCoarbitrary) { + return function (dictCoarbitrary1) { + return new Coarbitrary(function (v) { + var $114 = coarbitrary(dictCoarbitrary1)(v.value1); + var $115 = coarbitrary(dictCoarbitrary)(v.value0); + return function ($116) { + return $114($115($116)); + }; + }); + }; +}; + +var coarbOrdering = new Coarbitrary(function (v) { + if (v instanceof Data_Ordering.LT) { + return Test_QuickCheck_Gen.perturbGen(1.0); + } + + ; + + if (v instanceof Data_Ordering.EQ) { + return Test_QuickCheck_Gen.perturbGen(2.0); + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Test_QuickCheck_Gen.perturbGen(3.0); + } + + ; + throw new Error("Failed pattern match at Test.QuickCheck.Arbitrary (line 114, column 1 - line 117, column 34): " + [v.constructor.name]); +}); +var coarbNumber = new Coarbitrary(Test_QuickCheck_Gen.perturbGen); + +var coarbNonEmpty = function coarbNonEmpty(dictCoarbitrary) { + return function (dictCoarbitrary1) { + return new Coarbitrary(function (v) { + var $117 = coarbitrary(dictCoarbitrary)(v.value1); + var $118 = coarbitrary(dictCoarbitrary1)(v.value0); + return function ($119) { + return $117($118($119)); + }; + }); + }; +}; + +var coarbMaybe = function coarbMaybe(dictCoarbitrary) { + return new Coarbitrary(function (v) { + if (v instanceof Data_Maybe.Nothing) { + return Test_QuickCheck_Gen.perturbGen(1.0); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return coarbitrary(dictCoarbitrary)(v.value0); + } + + ; + throw new Error("Failed pattern match at Test.QuickCheck.Arbitrary (line 154, column 1 - line 156, column 39): " + [v.constructor.name]); + }); +}; + +var coarbList = function coarbList(dictCoarbitrary) { + return new Coarbitrary(Data_Foldable.foldl(Data_List_Types.foldableList)(function (f) { + return function (x) { + var $120 = coarbitrary(dictCoarbitrary)(x); + return function ($121) { + return f($120($121)); + }; + }; + })(Control_Category.identity(Control_Category.categoryFn))); +}; + +var coarbNonEmptyList = function coarbNonEmptyList(dictCoarbitrary) { + return new Coarbitrary(function (v) { + return coarbitrary(coarbNonEmpty(coarbList(dictCoarbitrary))(dictCoarbitrary))(v); + }); +}; + +var coarbLazy = function coarbLazy(dictCoarbitrary) { + return new Coarbitrary(function (a) { + return coarbitrary(dictCoarbitrary)(Data_Lazy.force(a)); + }); +}; + +var coarbInt = new Coarbitrary(function ($122) { + return Test_QuickCheck_Gen.perturbGen(Data_Int.toNumber($122)); +}); + +var coarbIdentity = function coarbIdentity(dictCoarbitrary) { + return new Coarbitrary(function (v) { + return coarbitrary(dictCoarbitrary)(v); + }); +}; + +var coarbEither = function coarbEither(dictCoarbitrary) { + return function (dictCoarbitrary1) { + return new Coarbitrary(function (v) { + if (v instanceof Data_Either.Left) { + return coarbitrary(dictCoarbitrary)(v.value0); + } + + ; + + if (v instanceof Data_Either.Right) { + return coarbitrary(dictCoarbitrary1)(v.value0); + } + + ; + throw new Error("Failed pattern match at Test.QuickCheck.Arbitrary (line 161, column 1 - line 163, column 40): " + [v.constructor.name]); + }); + }; +}; + +var coarbChar = new Coarbitrary(function (c) { + return coarbitrary(coarbInt)(Data_Enum.fromEnum(Data_Enum.boundedEnumChar)(c)); +}); +var coarbBoolean = new Coarbitrary(function (v) { + if (v) { + return Test_QuickCheck_Gen.perturbGen(1.0); + } + + ; + + if (!v) { + return Test_QuickCheck_Gen.perturbGen(2.0); + } + + ; + throw new Error("Failed pattern match at Test.QuickCheck.Arbitrary (line 71, column 1 - line 73, column 37): " + [v.constructor.name]); +}); + +var coarbArray = function coarbArray(dictCoarbitrary) { + return new Coarbitrary(Data_Foldable.foldl(Data_Foldable.foldableArray)(function (f) { + return function (x) { + var $123 = coarbitrary(dictCoarbitrary)(x); + return function ($124) { + return f($123($124)); + }; + }; + })(Control_Category.identity(Control_Category.categoryFn))); +}; + +var coarbNonEmptyArray = function coarbNonEmptyArray(dictCoarbitrary) { + return new Coarbitrary(function () { + var $125 = coarbitrary(coarbArray(dictCoarbitrary)); + return function ($126) { + return $125(Data_Array_NonEmpty.toArray($126)); + }; + }()); +}; + +var coarbString = new Coarbitrary(function (s) { + return coarbitrary(coarbArray(coarbMaybe(coarbChar)))(Data_Functor.map(Data_Functor.functorArray)(Data_String_CodeUnits.charAt(0))(Data_String_Common.split(Data_Newtype.wrap(Data_String_Pattern.newtypePattern)(""))(s))); +}); +var coarbNonEmptyString = new Coarbitrary(function () { + var $127 = coarbitrary(coarbString); + return function ($128) { + return $127(Data_String_NonEmpty_Internal.toString($128)); + }; +}()); +var arbitraryRowListNil = new ArbitraryRowList(function (v) { + return Control_Applicative.pure(Test_QuickCheck_Gen.applicativeGen)({}); +}); + +var arbitraryRecord = function arbitraryRecord(dict) { + return dict.arbitraryRecord; +}; + +var arbitraryRecordInstance = function arbitraryRecordInstance(dictRowToList) { + return function (dictArbitraryRowList) { + return new Arbitrary(arbitraryRecord(dictArbitraryRowList)(Type_Data_RowList.RLProxy.value)); + }; +}; + +var arbitraryNoArguments = new Arbitrary(Control_Applicative.pure(Test_QuickCheck_Gen.applicativeGen)(Data_Generic_Rep.NoArguments.value)); + +var arbitraryGenericSum = function arbitraryGenericSum(dict) { + return dict.arbitraryGenericSum; +}; + +var arbitrary = function arbitrary(dict) { + return dict.arbitrary; +}; + +var arbitraryArgument = function arbitraryArgument(dictArbitrary) { + return new Arbitrary(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Generic_Rep.Argument)(arbitrary(dictArbitrary))); +}; + +var arbitraryConstructor = function arbitraryConstructor(dictArbitrary) { + return new Arbitrary(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Generic_Rep.Constructor)(arbitrary(dictArbitrary))); +}; + +var arbitraryIdentity = function arbitraryIdentity(dictArbitrary) { + return new Arbitrary(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Identity.Identity)(arbitrary(dictArbitrary))); +}; + +var arbitraryLazy = function arbitraryLazy(dictArbitrary) { + return new Arbitrary(Control_Bind.bind(Test_QuickCheck_Gen.bindGen)(arbitrary(dictArbitrary))(function () { + var $129 = Control_Applicative.pure(Test_QuickCheck_Gen.applicativeGen); + return function ($130) { + return $129(Data_Lazy.defer(Data_Function["const"]($130))); + }; + }())); +}; + +var arbitraryList = function arbitraryList(dictArbitrary) { + return new Arbitrary(Test_QuickCheck_Gen.sized(function (n) { + return Control_Bind.bind(Test_QuickCheck_Gen.bindGen)(Test_QuickCheck_Gen.chooseInt(0)(n))(Data_Function.flip(Test_QuickCheck_Gen.listOf)(arbitrary(dictArbitrary))); + })); +}; + +var arbitraryProduct = function arbitraryProduct(dictArbitrary) { + return function (dictArbitrary1) { + return new Arbitrary(Control_Apply.apply(Test_QuickCheck_Gen.applyGen)(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Generic_Rep.Product.create)(arbitrary(dictArbitrary)))(arbitrary(dictArbitrary1))); + }; +}; + +var arbitraryRowListCons = function arbitraryRowListCons(dictArbitrary) { + return function (dictArbitraryRowList) { + return function (dictLacks) { + return function (dictCons) { + return function (dictRowToList) { + return function (dictIsSymbol) { + return new ArbitraryRowList(function (v) { + return Control_Bind.bind(Test_QuickCheck_Gen.bindGen)(arbitrary(dictArbitrary))(function (v1) { + return Control_Bind.bind(Test_QuickCheck_Gen.bindGen)(arbitraryRecord(dictArbitraryRowList)(Type_Data_RowList.RLProxy.value))(function (v2) { + return Control_Applicative.pure(Test_QuickCheck_Gen.applicativeGen)(Record.insert(dictIsSymbol)(dictLacks)(dictCons)(Data_Symbol.SProxy.value)(v1)(v2)); + }); + }); + }); + }; + }; + }; + }; + }; +}; + +var arbitrarySum = function arbitrarySum(dictArbitrary) { + return function (dictArbitraryGenericSum) { + return new Arbitrary(Test_QuickCheck_Gen.oneOf(new Data_NonEmpty.NonEmpty(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Generic_Rep.Inl.create)(arbitrary(dictArbitrary)), Data_Functor.map(Data_Functor.functorArray)(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Generic_Rep.Inr.create))(arbitraryGenericSum(dictArbitraryGenericSum))))); + }; +}; + +var genericArbitrary = function genericArbitrary(dictGeneric) { + return function (dictArbitrary) { + return Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Generic_Rep.to(dictGeneric))(arbitrary(dictArbitrary)); + }; +}; + +var arbUnit = new Arbitrary(Control_Applicative.pure(Test_QuickCheck_Gen.applicativeGen)(Data_Unit.unit)); + +var arbTuple = function arbTuple(dictArbitrary) { + return function (dictArbitrary1) { + return new Arbitrary(Control_Apply.apply(Test_QuickCheck_Gen.applyGen)(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Tuple.Tuple.create)(arbitrary(dictArbitrary)))(arbitrary(dictArbitrary1))); + }; +}; + +var arbOrdering = new Arbitrary(Test_QuickCheck_Gen.elements(new Data_NonEmpty.NonEmpty(Data_Ordering.LT.value, [Data_Ordering.EQ.value, Data_Ordering.GT.value]))); +var arbNumber = new Arbitrary(Test_QuickCheck_Gen.uniform); + +var arbNonEmpty = function arbNonEmpty(dictArbitrary) { + return function (dictArbitrary1) { + return new Arbitrary(Control_Apply.apply(Test_QuickCheck_Gen.applyGen)(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_NonEmpty.NonEmpty.create)(arbitrary(dictArbitrary1)))(arbitrary(dictArbitrary))); + }; +}; + +var arbNonEmptyList = function arbNonEmptyList(dictArbitrary) { + return new Arbitrary(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_List_Types.NonEmptyList)(arbitrary(arbNonEmpty(arbitraryList(dictArbitrary))(dictArbitrary)))); +}; + +var arbMaybe = function arbMaybe(dictArbitrary) { + return new Arbitrary(Control_Monad_Gen_Common.genMaybe(Test_QuickCheck_Gen.monadGenGen)(arbitrary(dictArbitrary))); +}; + +var arbInt = new Arbitrary(Test_QuickCheck_Gen.chooseInt(-1000000 | 0)(1000000)); + +var arbGenSumSum = function arbGenSumSum(dictArbitrary) { + return function (dictArbitraryGenericSum) { + return new ArbitraryGenericSum(Data_Semigroup.append(Data_Semigroup.semigroupArray)([Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Generic_Rep.Inl.create)(arbitrary(dictArbitrary))])(Data_Functor.map(Data_Functor.functorArray)(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Generic_Rep.Inr.create))(arbitraryGenericSum(dictArbitraryGenericSum)))); + }; +}; + +var arbGenSumConstructor = function arbGenSumConstructor(dictArbitrary) { + return new ArbitraryGenericSum([arbitrary(arbitraryConstructor(dictArbitrary))]); +}; + +var arbFunction = function arbFunction(dictCoarbitrary) { + return function (dictArbitrary) { + return new Arbitrary(Test_QuickCheck_Gen.repeatable(function (a) { + return coarbitrary(dictCoarbitrary)(a)(arbitrary(dictArbitrary)); + })); + }; +}; + +var arbEither = function arbEither(dictArbitrary) { + return function (dictArbitrary1) { + return new Arbitrary(Control_Monad_Gen_Common.genEither(Test_QuickCheck_Gen.monadGenGen)(arbitrary(dictArbitrary))(arbitrary(dictArbitrary1))); + }; +}; + +var arbChar = new Arbitrary(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_Enum.toEnumWithDefaults(Data_Enum.boundedEnumChar)(Data_Bounded.bottom(Data_Bounded.boundedChar))(Data_Bounded.top(Data_Bounded.boundedChar)))(Test_QuickCheck_Gen.chooseInt(0)(65536))); +var arbBoolean = new Arbitrary(Control_Monad_Gen_Class.chooseBool(Test_QuickCheck_Gen.monadGenGen)); + +var arbArray = function arbArray(dictArbitrary) { + return new Arbitrary(Test_QuickCheck_Gen.arrayOf(arbitrary(dictArbitrary))); +}; + +var arbNonEmptyArray = function arbNonEmptyArray(dictArbitrary) { + return new Arbitrary(Control_Bind.bind(Test_QuickCheck_Gen.bindGen)(arbitrary(dictArbitrary))(function (v) { + return Control_Bind.bind(Test_QuickCheck_Gen.bindGen)(arbitrary(arbArray(dictArbitrary)))(function (v1) { + return Control_Applicative.pure(Test_QuickCheck_Gen.applicativeGen)(Data_Maybe.fromJust()(Data_Array_NonEmpty.fromArray(function __do() { + var v2 = Data_Array_ST.unsafeThaw(v1)(); + var v3 = Data_Array_ST.push(v)(v2)(); + return Data_Array_ST.unsafeFreeze(v2)(); + }()))); + }); + })); +}; + +var arbString = new Arbitrary(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_String_CodeUnits.fromCharArray)(arbitrary(arbArray(arbChar)))); +var arbNonEmptyString = new Arbitrary(Control_Apply.apply(Test_QuickCheck_Gen.applyGen)(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Data_String_NonEmpty_CodeUnits.cons)(arbitrary(arbChar)))(arbitrary(arbString))); + +var coarbFunction = function coarbFunction(dictArbitrary) { + return function (dictCoarbitrary) { + return new Coarbitrary(function (f) { + return function (gen) { + return Control_Bind.bind(Test_QuickCheck_Gen.bindGen)(arbitrary(arbArray(dictArbitrary)))(function (v) { + return coarbitrary(coarbArray(dictCoarbitrary))(Data_Functor.map(Data_Functor.functorArray)(f)(v))(gen); + }); + }; + }); + }; +}; + +module.exports = { + Arbitrary: Arbitrary, + arbitrary: arbitrary, + Coarbitrary: Coarbitrary, + coarbitrary: coarbitrary, + genericArbitrary: genericArbitrary, + genericCoarbitrary: genericCoarbitrary, + ArbitraryGenericSum: ArbitraryGenericSum, + arbitraryGenericSum: arbitraryGenericSum, + ArbitraryRowList: ArbitraryRowList, + arbitraryRecord: arbitraryRecord, + arbBoolean: arbBoolean, + coarbBoolean: coarbBoolean, + arbNumber: arbNumber, + coarbNumber: coarbNumber, + arbInt: arbInt, + coarbInt: coarbInt, + arbString: arbString, + coarbString: coarbString, + arbNonEmptyString: arbNonEmptyString, + coarbNonEmptyString: coarbNonEmptyString, + arbChar: arbChar, + coarbChar: coarbChar, + arbUnit: arbUnit, + coarbUnit: coarbUnit, + arbOrdering: arbOrdering, + coarbOrdering: coarbOrdering, + arbArray: arbArray, + coarbArray: coarbArray, + arbNonEmptyArray: arbNonEmptyArray, + coarbNonEmptyArray: coarbNonEmptyArray, + arbFunction: arbFunction, + coarbFunction: coarbFunction, + arbTuple: arbTuple, + coarbTuple: coarbTuple, + arbMaybe: arbMaybe, + coarbMaybe: coarbMaybe, + arbEither: arbEither, + coarbEither: coarbEither, + arbitraryList: arbitraryList, + coarbList: coarbList, + arbitraryIdentity: arbitraryIdentity, + coarbIdentity: coarbIdentity, + arbitraryLazy: arbitraryLazy, + coarbLazy: coarbLazy, + arbNonEmpty: arbNonEmpty, + coarbNonEmpty: coarbNonEmpty, + arbNonEmptyList: arbNonEmptyList, + coarbNonEmptyList: coarbNonEmptyList, + arbitraryNoArguments: arbitraryNoArguments, + coarbitraryNoArguments: coarbitraryNoArguments, + arbGenSumSum: arbGenSumSum, + arbGenSumConstructor: arbGenSumConstructor, + arbitrarySum: arbitrarySum, + coarbitrarySum: coarbitrarySum, + arbitraryProduct: arbitraryProduct, + coarbitraryProduct: coarbitraryProduct, + arbitraryConstructor: arbitraryConstructor, + coarbitraryConstructor: coarbitraryConstructor, + arbitraryArgument: arbitraryArgument, + coarbitraryArgument: coarbitraryArgument, + arbitraryRowListNil: arbitraryRowListNil, + arbitraryRowListCons: arbitraryRowListCons, + arbitraryRecordInstance: arbitraryRecordInstance +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad.Gen.Class/index.js":"ONWB","../Control.Monad.Gen.Common/index.js":"K4TW","../Data.Array.NonEmpty/index.js":"eTKN","../Data.Array.ST/index.js":"s8si","../Data.Bounded/index.js":"kcUU","../Data.Either/index.js":"B2JL","../Data.Enum/index.js":"oOsU","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Generic.Rep/index.js":"AuzG","../Data.Identity/index.js":"2OKT","../Data.Int/index.js":"xNJb","../Data.Lazy/index.js":"aRUE","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.NonEmpty/index.js":"qF8i","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.String.CodeUnits/index.js":"6c6X","../Data.String.Common/index.js":"OSrc","../Data.String.NonEmpty.CodeUnits/index.js":"EM+K","../Data.String.NonEmpty.Internal/index.js":"Ph6A","../Data.String.Pattern/index.js":"nKWe","../Data.Symbol/index.js":"4oJQ","../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk","../Record/index.js":"0gG4","../Test.QuickCheck.Gen/index.js":"9U+U","../Type.Data.RowList/index.js":"XaXP"}],"PpsX":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_Distributive = require("../Data.Distributive/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Test_QuickCheck_Arbitrary = require("../Test.QuickCheck.Arbitrary/index.js"); + +var Test_QuickCheck_Gen = require("../Test.QuickCheck.Gen/index.js"); + +var Pair = function () { + function Pair(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Pair.create = function (value0) { + return function (value1) { + return new Pair(value0, value1); + }; + }; + + return Pair; +}(); + +var uncurry = function uncurry(f) { + return function (v) { + return f(v.value0)(v.value1); + }; +}; + +var swap = function swap(v) { + return new Pair(v.value1, v.value0); +}; + +var snd = function snd(v) { + return v.value1; +}; + +var showPair = function showPair(dictShow) { + return new Data_Show.Show(function (v) { + return "(" + (Data_Show.show(dictShow)(v.value0) + (" ~ " + (Data_Show.show(dictShow)(v.value1) + ")"))); + }); +}; + +var semigroupPair = function semigroupPair(dictSemigroup) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return new Pair(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), Data_Semigroup.append(dictSemigroup)(v.value1)(v1.value1)); + }; + }); +}; + +var monoidPair = function monoidPair(dictMonoid) { + return new Data_Monoid.Monoid(function () { + return semigroupPair(dictMonoid.Semigroup0()); + }, new Pair(Data_Monoid.mempty(dictMonoid), Data_Monoid.mempty(dictMonoid))); +}; + +var functorPair = new Data_Functor.Functor(function (f) { + return function (v) { + return new Pair(f(v.value0), f(v.value1)); + }; +}); + +var fst = function fst(v) { + return v.value0; +}; + +var foldablePair = new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(f(v.value0))(f(v.value1)); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(f(z)(v.value0))(v.value1); + }; + }; +}, function (f) { + return function (z) { + return function (v) { + return f(v.value0)(f(v.value1)(z)); + }; + }; +}); +var traversablePair = new Data_Traversable.Traversable(function () { + return foldablePair; +}, function () { + return functorPair; +}, function (dictApplicative) { + return function (v) { + return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Pair.create)(v.value0))(v.value1); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Pair.create)(f(v.value0)))(f(v.value1)); + }; + }; +}); + +var eqPair = function eqPair(dictEq) { + return new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq(dictEq)(x.value1)(y.value1); + }; + }); +}; + +var ordPair = function ordPair(dictOrd) { + return new Data_Ord.Ord(function () { + return eqPair(dictOrd.Eq0()); + }, function (x) { + return function (y) { + var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0); + + if (v instanceof Data_Ordering.LT) { + return Data_Ordering.LT.value; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Data_Ordering.GT.value; + } + + ; + return Data_Ord.compare(dictOrd)(x.value1)(y.value1); + }; + }); +}; + +var distributivePair = new Data_Distributive.Distributive(function () { + return functorPair; +}, function (dictFunctor) { + return function (f) { + return function (xs) { + return new Pair(Data_Functor.map(dictFunctor)(function ($111) { + return fst(f($111)); + })(xs), Data_Functor.map(dictFunctor)(function ($112) { + return snd(f($112)); + })(xs)); + }; + }; +}, function (dictFunctor) { + return function (xs) { + return new Pair(Data_Functor.map(dictFunctor)(fst)(xs), Data_Functor.map(dictFunctor)(snd)(xs)); + }; +}); + +var curry = function curry(f) { + return function (x) { + return function (y) { + return f(new Pair(x, y)); + }; + }; +}; + +var arbitraryPair = function arbitraryPair(dictArbitrary) { + return new Test_QuickCheck_Arbitrary.Arbitrary(Control_Apply.apply(Test_QuickCheck_Gen.applyGen)(Data_Functor.map(Test_QuickCheck_Gen.functorGen)(Pair.create)(Test_QuickCheck_Arbitrary.arbitrary(dictArbitrary)))(Test_QuickCheck_Arbitrary.arbitrary(dictArbitrary))); +}; + +var applyPair = new Control_Apply.Apply(function () { + return functorPair; +}, function (v) { + return function (v1) { + return new Pair(v.value0(v1.value0), v.value1(v1.value1)); + }; +}); +var bindPair = new Control_Bind.Bind(function () { + return applyPair; +}, function (v) { + return function (f) { + return new Pair(fst(f(v.value0)), snd(f(v.value1))); + }; +}); +var applicativePair = new Control_Applicative.Applicative(function () { + return applyPair; +}, function (x) { + return new Pair(x, x); +}); +var monadPair = new Control_Monad.Monad(function () { + return applicativePair; +}, function () { + return bindPair; +}); +module.exports = { + Pair: Pair, + fst: fst, + snd: snd, + curry: curry, + uncurry: uncurry, + swap: swap, + eqPair: eqPair, + ordPair: ordPair, + showPair: showPair, + functorPair: functorPair, + applyPair: applyPair, + applicativePair: applicativePair, + bindPair: bindPair, + monadPair: monadPair, + semigroupPair: semigroupPair, + monoidPair: monoidPair, + foldablePair: foldablePair, + traversablePair: traversablePair, + distributivePair: distributivePair, + arbitraryPair: arbitraryPair +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Distributive/index.js":"8PTu","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Test.QuickCheck.Arbitrary/index.js":"rKI8","../Test.QuickCheck.Gen/index.js":"9U+U"}],"AnkF":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Seconds = function Seconds(x) { + return x; +}; + +var Minutes = function Minutes(x) { + return x; +}; + +var Milliseconds = function Milliseconds(x) { + return x; +}; + +var Hours = function Hours(x) { + return x; +}; + +var Days = function Days(x) { + return x; +}; + +var Duration = function Duration(fromDuration, toDuration) { + this.fromDuration = fromDuration; + this.toDuration = toDuration; +}; + +var toDuration = function toDuration(dict) { + return dict.toDuration; +}; + +var showSeconds = new Data_Show.Show(function (v) { + return "(Seconds " + (Data_Show.show(Data_Show.showNumber)(v) + ")"); +}); +var showMinutes = new Data_Show.Show(function (v) { + return "(Minutes " + (Data_Show.show(Data_Show.showNumber)(v) + ")"); +}); +var showMilliseconds = new Data_Show.Show(function (v) { + return "(Milliseconds " + (Data_Show.show(Data_Show.showNumber)(v) + ")"); +}); +var showHours = new Data_Show.Show(function (v) { + return "(Hours " + (Data_Show.show(Data_Show.showNumber)(v) + ")"); +}); +var showDays = new Data_Show.Show(function (v) { + return "(Days " + (Data_Show.show(Data_Show.showNumber)(v) + ")"); +}); +var semigroupSeconds = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return v + v1; + }; +}); +var semigroupMinutes = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return v + v1; + }; +}); +var semigroupMilliseconds = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return v + v1; + }; +}); +var semigroupHours = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return v + v1; + }; +}); +var semigroupDays = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return v + v1; + }; +}); +var ordSeconds = Data_Ord.ordNumber; +var ordMinutes = Data_Ord.ordNumber; +var ordMilliseconds = Data_Ord.ordNumber; +var ordHours = Data_Ord.ordNumber; +var ordDays = Data_Ord.ordNumber; +var newtypeSeconds = new Data_Newtype.Newtype(function (n) { + return n; +}, Seconds); +var newtypeMinutes = new Data_Newtype.Newtype(function (n) { + return n; +}, Minutes); +var newtypeMilliseconds = new Data_Newtype.Newtype(function (n) { + return n; +}, Milliseconds); +var newtypeHours = new Data_Newtype.Newtype(function (n) { + return n; +}, Hours); +var newtypeDays = new Data_Newtype.Newtype(function (n) { + return n; +}, Days); +var monoidSeconds = new Data_Monoid.Monoid(function () { + return semigroupSeconds; +}, 0.0); +var monoidMinutes = new Data_Monoid.Monoid(function () { + return semigroupMinutes; +}, 0.0); +var monoidMilliseconds = new Data_Monoid.Monoid(function () { + return semigroupMilliseconds; +}, 0.0); +var monoidHours = new Data_Monoid.Monoid(function () { + return semigroupHours; +}, 0.0); +var monoidDays = new Data_Monoid.Monoid(function () { + return semigroupDays; +}, 0.0); + +var fromDuration = function fromDuration(dict) { + return dict.fromDuration; +}; + +var negateDuration = function negateDuration(dictDuration) { + var $56 = toDuration(dictDuration); + var $57 = Data_Newtype.over(newtypeMilliseconds)(newtypeMilliseconds)(Milliseconds)(Data_Ring.negate(Data_Ring.ringNumber)); + var $58 = fromDuration(dictDuration); + return function ($59) { + return $56($57($58($59))); + }; +}; + +var eqSeconds = Data_Eq.eqNumber; +var eqMinutes = Data_Eq.eqNumber; +var eqMilliseconds = Data_Eq.eqNumber; +var eqHours = Data_Eq.eqNumber; +var eqDays = Data_Eq.eqNumber; +var durationSeconds = new Duration(Data_Newtype.over(newtypeSeconds)(newtypeMilliseconds)(Seconds)(function (v) { + return v * 1000.0; +}), Data_Newtype.over(newtypeMilliseconds)(newtypeSeconds)(Milliseconds)(function (v) { + return v / 1000.0; +})); +var durationMinutes = new Duration(Data_Newtype.over(newtypeMinutes)(newtypeMilliseconds)(Minutes)(function (v) { + return v * 60000.0; +}), Data_Newtype.over(newtypeMilliseconds)(newtypeMinutes)(Milliseconds)(function (v) { + return v / 60000.0; +})); +var durationMilliseconds = new Duration(Control_Category.identity(Control_Category.categoryFn), Control_Category.identity(Control_Category.categoryFn)); +var durationHours = new Duration(Data_Newtype.over(newtypeHours)(newtypeMilliseconds)(Hours)(function (v) { + return v * 3600000.0; +}), Data_Newtype.over(newtypeMilliseconds)(newtypeHours)(Milliseconds)(function (v) { + return v / 3600000.0; +})); +var durationDays = new Duration(Data_Newtype.over(newtypeDays)(newtypeMilliseconds)(Days)(function (v) { + return v * 8.64e7; +}), Data_Newtype.over(newtypeMilliseconds)(newtypeDays)(Milliseconds)(function (v) { + return v / 8.64e7; +})); + +var convertDuration = function convertDuration(dictDuration) { + return function (dictDuration1) { + var $60 = toDuration(dictDuration1); + var $61 = fromDuration(dictDuration); + return function ($62) { + return $60($61($62)); + }; + }; +}; + +module.exports = { + fromDuration: fromDuration, + toDuration: toDuration, + Milliseconds: Milliseconds, + Seconds: Seconds, + Minutes: Minutes, + Hours: Hours, + Days: Days, + Duration: Duration, + convertDuration: convertDuration, + negateDuration: negateDuration, + newtypeMilliseconds: newtypeMilliseconds, + eqMilliseconds: eqMilliseconds, + ordMilliseconds: ordMilliseconds, + semigroupMilliseconds: semigroupMilliseconds, + monoidMilliseconds: monoidMilliseconds, + showMilliseconds: showMilliseconds, + newtypeSeconds: newtypeSeconds, + eqSeconds: eqSeconds, + ordSeconds: ordSeconds, + semigroupSeconds: semigroupSeconds, + monoidSeconds: monoidSeconds, + showSeconds: showSeconds, + newtypeMinutes: newtypeMinutes, + eqMinutes: eqMinutes, + ordMinutes: ordMinutes, + semigroupMinutes: semigroupMinutes, + monoidMinutes: monoidMinutes, + showMinutes: showMinutes, + newtypeHours: newtypeHours, + eqHours: eqHours, + ordHours: ordHours, + semigroupHours: semigroupHours, + monoidHours: monoidHours, + showHours: showHours, + newtypeDays: newtypeDays, + eqDays: eqDays, + ordDays: ordDays, + semigroupDays: semigroupDays, + monoidDays: monoidDays, + showDays: showDays, + durationMilliseconds: durationMilliseconds, + durationSeconds: durationSeconds, + durationMinutes: durationMinutes, + durationHours: durationHours, + durationDays: durationDays +}; +},{"../Control.Category/index.js":"IAi2","../Data.Eq/index.js":"Pq4F","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Ring/index.js":"E2qH","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"0f5O":[function(require,module,exports) { +"use strict"; // module Partial.Unsafe + +exports.unsafePartial = function (f) { + return f(); +}; +},{}],"vcP9":[function(require,module,exports) { +"use strict"; // module Partial + +exports.crashWith = function () { + return function (msg) { + throw new Error(msg); + }; +}; +},{}],"HAG3":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var crash = function crash(dictPartial) { + return $foreign.crashWith(dictPartial)("Partial.crash: partial function"); +}; + +module.exports = { + crash: crash, + crashWith: $foreign.crashWith +}; +},{"./foreign.js":"vcP9"}],"aoR+":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Partial = require("../Partial/index.js"); + +var unsafePartialBecause = function unsafePartialBecause(v) { + return function (x) { + return $foreign.unsafePartial(function (dictPartial) { + return x(dictPartial); + }); + }; +}; + +var unsafeCrashWith = function unsafeCrashWith(msg) { + return $foreign.unsafePartial(function (dictPartial) { + return Partial.crashWith(dictPartial)(msg); + }); +}; + +module.exports = { + unsafePartialBecause: unsafePartialBecause, + unsafeCrashWith: unsafeCrashWith, + unsafePartial: $foreign.unsafePartial +}; +},{"./foreign.js":"0f5O","../Partial/index.js":"HAG3"}],"kYoO":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Partial_Unsafe = require("../Partial.Unsafe/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var VariantRep = function VariantRep(x) { + return x; +}; + +var FProxy = function () { + function FProxy() {} + + ; + FProxy.value = new FProxy(); + return FProxy; +}(); + +var VariantTags = function VariantTags(variantTags) { + this.variantTags = variantTags; +}; + +var VariantMatchCases = {}; +var VariantFMatchCases = {}; + +var Contractable = function Contractable(contractWith) { + this.contractWith = contractWith; +}; + +var variantTagsNil = new VariantTags(function (v) { + return Data_List_Types.Nil.value; +}); + +var variantTags = function variantTags(dict) { + return dict.variantTags; +}; + +var variantTagsCons = function variantTagsCons(dictVariantTags) { + return function (dictIsSymbol) { + return new VariantTags(function (v) { + return new Data_List_Types.Cons(Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value), variantTags(dictVariantTags)(Type_Data_RowList.RLProxy.value)); + }); + }; +}; + +var variantMatchNil = VariantMatchCases; + +var variantMatchCons = function variantMatchCons(dictVariantMatchCases) { + return function (dictCons) { + return function (dictTypeEquals) { + return VariantMatchCases; + }; + }; +}; + +var variantFMatchNil = VariantFMatchCases; + +var variantFMatchCons = function variantFMatchCons(dictVariantFMatchCases) { + return function (dictCons) { + return function (dictTypeEquals) { + return VariantFMatchCases; + }; + }; +}; + +var lookupToEnum = function () { + var go = function go($copy_ix) { + return function ($copy_v) { + return function ($copy_v1) { + var $tco_var_ix = $copy_ix; + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(ix, v, v1) { + if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) { + if (v1.value0.cardinality > ix) { + var v2 = v1.value0.toEnum(ix); + + if (v2 instanceof Data_Maybe.Just) { + $tco_done = true; + return Data_Maybe.Just.create({ + type: v.value0, + value: v2.value0 + }); + } + + ; + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + + if (Data_Boolean.otherwise) { + $tco_var_ix = ix - v1.value0.cardinality | 0; + $tco_var_v = v.value1; + $copy_v1 = v1.value1; + return; + } + + ; + } + + ; + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_ix, $tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; + }; + }; + + return go; +}(); + +var lookupTag = function lookupTag(tag) { + var go = function go($copy_v) { + var $tco_done = false; + var $tco_result; + + function $tco_loop(v) { + if (v instanceof Data_List_Types.Cons) { + if (v.value0 === tag) { + $tco_done = true; + return true; + } + + ; + + if (Data_Boolean.otherwise) { + $copy_v = v.value1; + return; + } + + ; + } + + ; + + if (v instanceof Data_List_Types.Nil) { + $tco_done = true; + return false; + } + + ; + throw new Error("Failed pattern match at Data.Variant.Internal (line 94, column 8 - line 98, column 18): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($copy_v); + } + + ; + return $tco_result; + }; + + return go; +}; + +var lookupCardinality = function () { + var go = function go($copy_acc) { + return function ($copy_v) { + var $tco_var_acc = $copy_acc; + var $tco_done = false; + var $tco_result; + + function $tco_loop(acc, v) { + if (v instanceof Data_List_Types.Cons) { + $tco_var_acc = acc + v.value0.cardinality | 0; + $copy_v = v.value1; + return; + } + + ; + + if (v instanceof Data_List_Types.Nil) { + $tco_done = true; + return acc; + } + + ; + throw new Error("Failed pattern match at Data.Variant.Internal (line 216, column 12 - line 218, column 16): " + [v.constructor.name]); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_acc, $copy_v); + } + + ; + return $tco_result; + }; + }; + + return go(0); +}(); + +var impossible = function impossible(str) { + return Partial_Unsafe.unsafeCrashWith("Data.Variant: impossible `" + (str + "`")); +}; + +var lookup = function lookup(name) { + return function (tag) { + var go = function go($copy_v) { + return function ($copy_v1) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1) { + if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) { + if (v.value0 === tag) { + $tco_done = true; + return v1.value0; + } + + ; + + if (Data_Boolean.otherwise) { + $tco_var_v = v.value1; + $copy_v1 = v1.value1; + return; + } + + ; + } + + ; + $tco_done = true; + return impossible(name); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; + }; + + return go; + }; +}; + +var lookupEq = function lookupEq(tags) { + return function (eqs) { + return function (v) { + return function (v1) { + if (v.type === v1.type) { + return lookup("eq")(v.type)(tags)(eqs)(v.value)(v1.value); + } + + ; + + if (Data_Boolean.otherwise) { + return false; + } + + ; + throw new Error("Failed pattern match at Data.Variant.Internal (line 100, column 1 - line 105, column 12): " + [tags.constructor.name, eqs.constructor.name, v.constructor.name, v1.constructor.name]); + }; + }; + }; +}; + +var lookupOrd = function lookupOrd(tags) { + return function (ords) { + return function (v) { + return function (v1) { + var v3 = Data_Ord.compare(Data_Ord.ordString)(v.type)(v1.type); + + if (v3 instanceof Data_Ordering.EQ) { + return lookup("compare")(v.type)(tags)(ords)(v.value)(v1.value); + } + + ; + return v3; + }; + }; + }; +}; + +var lookupFirst = function lookupFirst(name) { + return function (f) { + var go = function go(v) { + return function (v1) { + if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) { + return { + type: v.value0, + value: f(v1.value0) + }; + } + + ; + return impossible(name); + }; + }; + + return go; + }; +}; + +var lookupFromEnum = function lookupFromEnum(v) { + var go = function go($copy_acc) { + return function ($copy_v1) { + return function ($copy_v2) { + var $tco_var_acc = $copy_acc; + var $tco_var_v1 = $copy_v1; + var $tco_done = false; + var $tco_result; + + function $tco_loop(acc, v1, v2) { + if (v1 instanceof Data_List_Types.Cons && v2 instanceof Data_List_Types.Cons) { + if (v1.value0 === v.type) { + $tco_done = true; + return acc + v2.value0.fromEnum(v.value) | 0; + } + + ; + + if (Data_Boolean.otherwise) { + $tco_var_acc = acc + v2.value0.cardinality | 0; + $tco_var_v1 = v1.value1; + $copy_v2 = v2.value1; + return; + } + + ; + } + + ; + $tco_done = true; + return impossible("fromEnum"); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_acc, $tco_var_v1, $copy_v2); + } + + ; + return $tco_result; + }; + }; + }; + + return go(0); +}; + +var lookupLast = function lookupLast(name) { + return function (f) { + var go = function go($copy_v) { + return function ($copy_v1) { + var $tco_var_v = $copy_v; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v, v1) { + if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil && v1 instanceof Data_List_Types.Cons && v1.value1 instanceof Data_List_Types.Nil) { + $tco_done = true; + return { + type: v.value0, + value: f(v1.value0) + }; + } + + ; + + if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) { + $tco_var_v = v.value1; + $copy_v1 = v1.value1; + return; + } + + ; + $tco_done = true; + return impossible(name); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v, $copy_v1); + } + + ; + return $tco_result; + }; + }; + + return go; + }; +}; + +var lookupPred = function lookupPred(v) { + var go2 = function go2($copy_t1) { + return function ($copy_b1) { + return function ($copy_d1) { + return function ($copy_v1) { + return function ($copy_v2) { + return function ($copy_v3) { + var $tco_var_t1 = $copy_t1; + var $tco_var_b1 = $copy_b1; + var $tco_var_d1 = $copy_d1; + var $tco_var_v1 = $copy_v1; + var $tco_var_v2 = $copy_v2; + var $tco_done = false; + var $tco_result; + + function $tco_loop(t1, b1, d1, v1, v2, v3) { + if (v1 instanceof Data_List_Types.Cons && v2 instanceof Data_List_Types.Cons && v3 instanceof Data_List_Types.Cons) { + if (v1.value0 === v.type) { + var v4 = v3.value0.pred(v.value); + + if (v4 instanceof Data_Maybe.Nothing) { + $tco_done = true; + return Data_Maybe.Just.create({ + type: t1, + value: b1.top + }); + } + + ; + + if (v4 instanceof Data_Maybe.Just) { + $tco_done = true; + return Data_Maybe.Just.create({ + type: v.type, + value: v4.value0 + }); + } + + ; + throw new Error("Failed pattern match at Data.Variant.Internal (line 184, column 11 - line 186, column 69): " + [v4.constructor.name]); + } + + ; + + if (Data_Boolean.otherwise) { + $tco_var_t1 = v1.value0; + $tco_var_b1 = v2.value0; + $tco_var_d1 = v3.value0; + $tco_var_v1 = v1.value1; + $tco_var_v2 = v2.value1; + $copy_v3 = v3.value1; + return; + } + + ; + } + + ; + $tco_done = true; + return impossible("pred"); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_t1, $tco_var_b1, $tco_var_d1, $tco_var_v1, $tco_var_v2, $copy_v3); + } + + ; + return $tco_result; + }; + }; + }; + }; + }; + }; + + var go1 = function go1(v1) { + return function (v2) { + return function (v3) { + if (v1 instanceof Data_List_Types.Cons && v2 instanceof Data_List_Types.Cons && v3 instanceof Data_List_Types.Cons) { + if (v1.value0 === v.type) { + var v4 = v3.value0.pred(v.value); + + if (v4 instanceof Data_Maybe.Nothing) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v4 instanceof Data_Maybe.Just) { + return Data_Maybe.Just.create({ + type: v.type, + value: v4.value0 + }); + } + + ; + throw new Error("Failed pattern match at Data.Variant.Internal (line 175, column 11 - line 177, column 69): " + [v4.constructor.name]); + } + + ; + + if (Data_Boolean.otherwise) { + return go2(v1.value0)(v2.value0)(v3.value0)(v1.value1)(v2.value1)(v3.value1); + } + + ; + } + + ; + return impossible("pred"); + }; + }; + }; + + return go1; +}; + +var lookupSucc = function lookupSucc(v) { + var go = function go($copy_v1) { + return function ($copy_v2) { + return function ($copy_v3) { + var $tco_var_v1 = $copy_v1; + var $tco_var_v2 = $copy_v2; + var $tco_done = false; + var $tco_result; + + function $tco_loop(v1, v2, v3) { + if (v1 instanceof Data_List_Types.Cons && v2 instanceof Data_List_Types.Cons && v3 instanceof Data_List_Types.Cons) { + if (v1.value0 === v.type) { + var v4 = v3.value0.succ(v.value); + + if (v4 instanceof Data_Maybe.Just) { + $tco_done = true; + return Data_Maybe.Just.create({ + type: v1.value0, + value: v4.value0 + }); + } + + ; + + if (v4 instanceof Data_Maybe.Nothing) { + if (v1.value1 instanceof Data_List_Types.Cons && v2.value1 instanceof Data_List_Types.Cons) { + $tco_done = true; + return Data_Maybe.Just.create({ + type: v1.value1.value0, + value: v2.value1.value0.bottom + }); + } + + ; + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.Variant.Internal (line 202, column 11 - line 206, column 29): " + [v4.constructor.name]); + } + + ; + + if (Data_Boolean.otherwise) { + $tco_var_v1 = v1.value1; + $tco_var_v2 = v2.value1; + $copy_v3 = v3.value1; + return; + } + + ; + } + + ; + $tco_done = true; + return impossible("succ"); + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_v1, $tco_var_v2, $copy_v3); + } + + ; + return $tco_result; + }; + }; + }; + + return go; +}; + +var contractWithInstance = function contractWithInstance(dictRowToList) { + return function (dictUnion) { + return function (dictVariantTags) { + return new Contractable(function (dictAlternative) { + return function (v) { + return function (v1) { + return function (tag) { + return function (a) { + if (lookupTag(tag)(variantTags(dictVariantTags)(Type_Data_RowList.RLProxy.value))) { + return Control_Applicative.pure(dictAlternative.Applicative0())(a); + } + + ; + + if (Data_Boolean.otherwise) { + return Control_Plus.empty(dictAlternative.Plus1()); + } + + ; + throw new Error("Failed pattern match at Data.Variant.Internal (line 254, column 1 - line 263, column 24): " + [v.constructor.name, v1.constructor.name, tag.constructor.name, a.constructor.name]); + }; + }; + }; + }; + }); + }; + }; +}; + +var contractWith = function contractWith(dict) { + return dict.contractWith; +}; + +module.exports = { + FProxy: FProxy, + VariantRep: VariantRep, + VariantTags: VariantTags, + variantTags: variantTags, + Contractable: Contractable, + contractWith: contractWith, + VariantMatchCases: VariantMatchCases, + VariantFMatchCases: VariantFMatchCases, + lookup: lookup, + lookupTag: lookupTag, + lookupEq: lookupEq, + lookupOrd: lookupOrd, + lookupLast: lookupLast, + lookupFirst: lookupFirst, + lookupPred: lookupPred, + lookupSucc: lookupSucc, + lookupCardinality: lookupCardinality, + lookupFromEnum: lookupFromEnum, + lookupToEnum: lookupToEnum, + impossible: impossible, + variantMatchCons: variantMatchCons, + variantMatchNil: variantMatchNil, + variantFMatchCons: variantFMatchCons, + variantFMatchNil: variantFMatchNil, + variantTagsNil: variantTagsNil, + variantTagsCons: variantTagsCons, + contractWithInstance: contractWithInstance +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Plus/index.js":"oMBg","../Data.Boolean/index.js":"ObQr","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Symbol/index.js":"4oJQ","../Partial.Unsafe/index.js":"aoR+","../Type.Data.RowList/index.js":"XaXP"}],"hgdh":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_Enum = require("../Data.Enum/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Variant_Internal = require("../Data.Variant.Internal/index.js"); + +var Partial_Unsafe = require("../Partial.Unsafe/index.js"); + +var Record_Unsafe = require("../Record.Unsafe/index.js"); + +var Type_Data_Row = require("../Type.Data.Row/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var Unvariant = function Unvariant(x) { + return x; +}; + +var VariantShows = function VariantShows(variantShows) { + this.variantShows = variantShows; +}; + +var VariantOrds = function VariantOrds(variantOrds) { + this.variantOrds = variantOrds; +}; + +var VariantEqs = function VariantEqs(variantEqs) { + this.variantEqs = variantEqs; +}; + +var VariantBounded = function VariantBounded(variantBounded) { + this.variantBounded = variantBounded; +}; + +var VariantBoundedEnums = function VariantBoundedEnums(VariantBounded0, variantBoundedEnums) { + this.VariantBounded0 = VariantBounded0; + this.variantBoundedEnums = variantBoundedEnums; +}; + +var variantShows = function variantShows(dict) { + return dict.variantShows; +}; + +var variantOrds = function variantOrds(dict) { + return dict.variantOrds; +}; + +var variantEqs = function variantEqs(dict) { + return dict.variantEqs; +}; + +var variantBoundedEnums = function variantBoundedEnums(dict) { + return dict.variantBoundedEnums; +}; + +var variantBounded = function variantBounded(dict) { + return dict.variantBounded; +}; + +var unvariant = function unvariant(v) { + return function (f) { + return function (dictIsSymbol) { + return function (dictCons) { + return f(dictIsSymbol)(dictCons); + }; + }({ + reflectSymbol: Data_Function["const"](v.type) + })({})(Data_Symbol.SProxy.value)(v.value); + }; +}; + +var showVariantNil = new VariantShows(function (v) { + return Data_List_Types.Nil.value; +}); + +var showVariantCons = function showVariantCons(dictVariantShows) { + return function (dictShow) { + return new VariantShows(function (v) { + return new Data_List_Types.Cons(Data_Show.show(dictShow), variantShows(dictVariantShows)(Type_Data_RowList.RLProxy.value)); + }); + }; +}; + +var showVariant = function showVariant(dictRowToList) { + return function (dictVariantTags) { + return function (dictVariantShows) { + return new Data_Show.Show(function (v1) { + var tags = Data_Variant_Internal.variantTags(dictVariantTags)(Type_Data_RowList.RLProxy.value); + var shows = variantShows(dictVariantShows)(Type_Data_RowList.RLProxy.value); + var body = Data_Variant_Internal.lookup("show")(v1.type)(tags)(shows)(v1.value); + return "(inj @" + (Data_Show.show(Data_Show.showString)(v1.type) + (" " + (body + ")"))); + }); + }; + }; +}; + +var ordVariantNil = new VariantOrds(function (v) { + return Data_List_Types.Nil.value; +}); + +var ordVariantCons = function ordVariantCons(dictVariantOrds) { + return function (dictOrd) { + return new VariantOrds(function (v) { + return new Data_List_Types.Cons(Data_Ord.compare(dictOrd), variantOrds(dictVariantOrds)(Type_Data_RowList.RLProxy.value)); + }); + }; +}; + +var onMatch = function onMatch(dictRowToList) { + return function (dictVariantMatchCases) { + return function (dictUnion) { + return function (r) { + return function (k) { + return function (v) { + if (Record_Unsafe.unsafeHas(v.type)(r)) { + return Record_Unsafe.unsafeGet(v.type)(r)(v.value); + } + + ; + return k(v); + }; + }; + }; + }; + }; +}; + +var on = function on(dictCons) { + return function (dictIsSymbol) { + return function (p) { + return function (f) { + return function (g) { + return function (r) { + if (r.type === Data_Symbol.reflectSymbol(dictIsSymbol)(p)) { + return f(r.value); + } + + ; + return g(r); + }; + }; + }; + }; + }; +}; + +var prj = function prj(dictCons) { + return function (dictIsSymbol) { + return function (dictAlternative) { + return function (p) { + return on(dictCons)(dictIsSymbol)(p)(Control_Applicative.pure(dictAlternative.Applicative0()))(Data_Function["const"](Control_Plus.empty(dictAlternative.Plus1()))); + }; + }; + }; +}; + +var inj = function inj(dictCons) { + return function (dictIsSymbol) { + return function (p) { + return function (value) { + return { + type: Data_Symbol.reflectSymbol(dictIsSymbol)(p), + value: value + }; + }; + }; + }; +}; + +var revariant = function revariant(v) { + return v(function (dictIsSymbol) { + return function (dictCons) { + return inj(dictCons)(dictIsSymbol); + }; + }); +}; + +var expand = function expand(dictUnion) { + return Unsafe_Coerce.unsafeCoerce; +}; + +var eqVariantNil = new VariantEqs(function (v) { + return Data_List_Types.Nil.value; +}); + +var eqVariantCons = function eqVariantCons(dictVariantEqs) { + return function (dictEq) { + return new VariantEqs(function (v) { + return new Data_List_Types.Cons(Data_Eq.eq(dictEq), variantEqs(dictVariantEqs)(Type_Data_RowList.RLProxy.value)); + }); + }; +}; + +var eqVariant = function eqVariant(dictRowToList) { + return function (dictVariantTags) { + return function (dictVariantEqs) { + return new Data_Eq.Eq(function (v1) { + return function (v2) { + var tags = Data_Variant_Internal.variantTags(dictVariantTags)(Type_Data_RowList.RLProxy.value); + var eqs = variantEqs(dictVariantEqs)(Type_Data_RowList.RLProxy.value); + return Data_Variant_Internal.lookupEq(tags)(eqs)(v1)(v2); + }; + }); + }; + }; +}; + +var ordVariant = function ordVariant(dictRowToList) { + return function (dictVariantTags) { + return function (dictVariantEqs) { + return function (dictVariantOrds) { + return new Data_Ord.Ord(function () { + return eqVariant(dictRowToList)(dictVariantTags)(dictVariantEqs); + }, function (v1) { + return function (v2) { + var tags = Data_Variant_Internal.variantTags(dictVariantTags)(Type_Data_RowList.RLProxy.value); + var ords = variantOrds(dictVariantOrds)(Type_Data_RowList.RLProxy.value); + return Data_Variant_Internal.lookupOrd(tags)(ords)(v1)(v2); + }; + }); + }; + }; + }; +}; + +var enumVariant = function enumVariant(dictRowToList) { + return function (dictVariantTags) { + return function (dictVariantEqs) { + return function (dictVariantOrds) { + return function (dictVariantBoundedEnums) { + return new Data_Enum.Enum(function () { + return ordVariant(dictRowToList)(dictVariantTags)(dictVariantEqs)(dictVariantOrds); + }, function (a) { + var tags = Data_Variant_Internal.variantTags(dictVariantTags)(Type_Data_RowList.RLProxy.value); + var dicts = variantBoundedEnums(dictVariantBoundedEnums)(Type_Data_RowList.RLProxy.value); + var bounds = variantBounded(dictVariantBoundedEnums.VariantBounded0())(Type_Data_RowList.RLProxy.value); + return Data_Variant_Internal.lookupPred(a)(tags)(bounds)(dicts); + }, function (a) { + var tags = Data_Variant_Internal.variantTags(dictVariantTags)(Type_Data_RowList.RLProxy.value); + var dicts = variantBoundedEnums(dictVariantBoundedEnums)(Type_Data_RowList.RLProxy.value); + var bounds = variantBounded(dictVariantBoundedEnums.VariantBounded0())(Type_Data_RowList.RLProxy.value); + return Data_Variant_Internal.lookupSucc(a)(tags)(bounds)(dicts); + }); + }; + }; + }; + }; +}; + +var $$default = function $$default(a) { + return function (v) { + return a; + }; +}; + +var contract = function contract(dictAlternative) { + return function (dictContractable) { + return function (v) { + return Data_Variant_Internal.contractWith(dictContractable)(dictAlternative)(Type_Data_Row.RProxy.value)(Type_Data_Row.RProxy.value)(v.type)(v); + }; + }; +}; + +var case_ = function case_(r) { + return Partial_Unsafe.unsafeCrashWith("Data.Variant: pattern match failure [" + (r.type + "]")); +}; + +var match = function match(dictRowToList) { + return function (dictVariantMatchCases) { + return function (dictUnion) { + return function (r) { + return onMatch(dictRowToList)(dictVariantMatchCases)(dictUnion)(r)(case_); + }; + }; + }; +}; + +var boundedVariantNil = new VariantBounded(function (v) { + return Data_List_Types.Nil.value; +}); +var enumVariantNil = new VariantBoundedEnums(function () { + return boundedVariantNil; +}, function (v) { + return Data_List_Types.Nil.value; +}); + +var boundedVariantCons = function boundedVariantCons(dictVariantBounded) { + return function (dictBounded) { + return new VariantBounded(function (v) { + var dict = { + top: Data_Bounded.top(dictBounded), + bottom: Data_Bounded.bottom(dictBounded) + }; + return new Data_List_Types.Cons(dict, variantBounded(dictVariantBounded)(Type_Data_RowList.RLProxy.value)); + }); + }; +}; + +var enumVariantCons = function enumVariantCons(dictVariantBoundedEnums) { + return function (dictBoundedEnum) { + return new VariantBoundedEnums(function () { + return boundedVariantCons(dictVariantBoundedEnums.VariantBounded0())(dictBoundedEnum.Bounded0()); + }, function (v) { + var dict = { + pred: Data_Enum.pred(dictBoundedEnum.Enum1()), + succ: Data_Enum.succ(dictBoundedEnum.Enum1()), + fromEnum: Data_Enum.fromEnum(dictBoundedEnum), + toEnum: Data_Enum.toEnum(dictBoundedEnum), + cardinality: Data_Enum.cardinality(dictBoundedEnum) + }; + return new Data_List_Types.Cons(dict, variantBoundedEnums(dictVariantBoundedEnums)(Type_Data_RowList.RLProxy.value)); + }); + }; +}; + +var boundedVariant = function boundedVariant(dictRowToList) { + return function (dictVariantTags) { + return function (dictVariantEqs) { + return function (dictVariantOrds) { + return function (dictVariantBounded) { + return new Data_Bounded.Bounded(function () { + return ordVariant(dictRowToList)(dictVariantTags)(dictVariantEqs)(dictVariantOrds); + }, function () { + var tags = Data_Variant_Internal.variantTags(dictVariantTags)(Type_Data_RowList.RLProxy.value); + var dicts = variantBounded(dictVariantBounded)(Type_Data_RowList.RLProxy.value); + return Data_Variant_Internal.VariantRep(Data_Variant_Internal.lookupFirst("bottom")(function (v) { + return v.bottom; + })(tags)(dicts)); + }(), function () { + var tags = Data_Variant_Internal.variantTags(dictVariantTags)(Type_Data_RowList.RLProxy.value); + var dicts = variantBounded(dictVariantBounded)(Type_Data_RowList.RLProxy.value); + return Data_Variant_Internal.VariantRep(Data_Variant_Internal.lookupLast("top")(function (v) { + return v.top; + })(tags)(dicts)); + }()); + }; + }; + }; + }; +}; + +var boundedEnumVariant = function boundedEnumVariant(dictRowToList) { + return function (dictVariantTags) { + return function (dictVariantEqs) { + return function (dictVariantOrds) { + return function (dictVariantBoundedEnums) { + return new Data_Enum.BoundedEnum(function () { + return boundedVariant(dictRowToList)(dictVariantTags)(dictVariantEqs)(dictVariantOrds)(dictVariantBoundedEnums.VariantBounded0()); + }, function () { + return enumVariant(dictRowToList)(dictVariantTags)(dictVariantEqs)(dictVariantOrds)(dictVariantBoundedEnums); + }, Data_Enum.Cardinality(Data_Variant_Internal.lookupCardinality(variantBoundedEnums(dictVariantBoundedEnums)(Type_Data_RowList.RLProxy.value))), function (a) { + var tags = Data_Variant_Internal.variantTags(dictVariantTags)(Type_Data_RowList.RLProxy.value); + var dicts = variantBoundedEnums(dictVariantBoundedEnums)(Type_Data_RowList.RLProxy.value); + return Data_Variant_Internal.lookupFromEnum(a)(tags)(dicts); + }, function (n) { + var tags = Data_Variant_Internal.variantTags(dictVariantTags)(Type_Data_RowList.RLProxy.value); + var dicts = variantBoundedEnums(dictVariantBoundedEnums)(Type_Data_RowList.RLProxy.value); + return Data_Variant_Internal.lookupToEnum(n)(tags)(dicts); + }); + }; + }; + }; + }; +}; + +module.exports = { + inj: inj, + prj: prj, + on: on, + onMatch: onMatch, + case_: case_, + match: match, + "default": $$default, + expand: expand, + contract: contract, + Unvariant: Unvariant, + unvariant: unvariant, + revariant: revariant, + VariantEqs: VariantEqs, + variantEqs: variantEqs, + VariantOrds: VariantOrds, + variantOrds: variantOrds, + VariantShows: VariantShows, + variantShows: variantShows, + VariantBounded: VariantBounded, + variantBounded: variantBounded, + VariantBoundedEnums: VariantBoundedEnums, + variantBoundedEnums: variantBoundedEnums, + eqVariantNil: eqVariantNil, + eqVariantCons: eqVariantCons, + eqVariant: eqVariant, + boundedVariantNil: boundedVariantNil, + boundedVariantCons: boundedVariantCons, + boundedVariant: boundedVariant, + enumVariantNil: enumVariantNil, + enumVariantCons: enumVariantCons, + enumVariant: enumVariant, + boundedEnumVariant: boundedEnumVariant, + ordVariantNil: ordVariantNil, + ordVariantCons: ordVariantCons, + ordVariant: ordVariant, + showVariantNil: showVariantNil, + showVariantCons: showVariantCons, + showVariant: showVariant +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Plus/index.js":"oMBg","../Data.Bounded/index.js":"kcUU","../Data.Enum/index.js":"oOsU","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.List.Types/index.js":"Xxuc","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7","../Data.Symbol/index.js":"4oJQ","../Data.Variant.Internal/index.js":"kYoO","../Partial.Unsafe/index.js":"aoR+","../Record.Unsafe/index.js":"KG04","../Type.Data.Row/index.js":"ukdD","../Type.Data.RowList/index.js":"XaXP","../Unsafe.Coerce/index.js":"ETUV"}],"idq0":[function(require,module,exports) { +/* globals setImmediate, clearImmediate, setTimeout, clearTimeout */ + +/* jshint -W083, -W098, -W003 */ +"use strict"; + +var Aff = function () { + // A unique value for empty. + var EMPTY = {}; + /* + An awkward approximation. We elide evidence we would otherwise need in PS for + efficiency sake. + data Aff eff a + = Pure a + | Throw Error + | Catch (Aff eff a) (Error -> Aff eff a) + | Sync (Eff eff a) + | Async ((Either Error a -> Eff eff Unit) -> Eff eff (Canceler eff)) + | forall b. Bind (Aff eff b) (b -> Aff eff a) + | forall b. Bracket (Aff eff b) (BracketConditions eff b) (b -> Aff eff a) + | forall b. Fork Boolean (Aff eff b) ?(Fiber eff b -> a) + | Sequential (ParAff aff a) + */ + + var PURE = "Pure"; + var THROW = "Throw"; + var CATCH = "Catch"; + var SYNC = "Sync"; + var ASYNC = "Async"; + var BIND = "Bind"; + var BRACKET = "Bracket"; + var FORK = "Fork"; + var SEQ = "Sequential"; + /* + data ParAff eff a + = forall b. Map (b -> a) (ParAff eff b) + | forall b. Apply (ParAff eff (b -> a)) (ParAff eff b) + | Alt (ParAff eff a) (ParAff eff a) + | ?Par (Aff eff a) + */ + + var MAP = "Map"; + var APPLY = "Apply"; + var ALT = "Alt"; // Various constructors used in interpretation + + var CONS = "Cons"; // Cons-list, for stacks + + var RESUME = "Resume"; // Continue indiscriminately + + var RELEASE = "Release"; // Continue with bracket finalizers + + var FINALIZER = "Finalizer"; // A non-interruptible effect + + var FINALIZED = "Finalized"; // Marker for finalization + + var FORKED = "Forked"; // Reference to a forked fiber, with resumption stack + + var FIBER = "Fiber"; // Actual fiber reference + + var THUNK = "Thunk"; // Primed effect, ready to invoke + + function Aff(tag, _1, _2, _3) { + this.tag = tag; + this._1 = _1; + this._2 = _2; + this._3 = _3; + } + + function AffCtr(tag) { + var fn = function fn(_1, _2, _3) { + return new Aff(tag, _1, _2, _3); + }; + + fn.tag = tag; + return fn; + } + + function nonCanceler(error) { + return new Aff(PURE, void 0); + } + + function runEff(eff) { + try { + eff(); + } catch (error) { + setTimeout(function () { + throw error; + }, 0); + } + } + + function runSync(left, right, eff) { + try { + return right(eff()); + } catch (error) { + return left(error); + } + } + + function runAsync(left, eff, k) { + try { + return eff(k)(); + } catch (error) { + k(left(error))(); + return nonCanceler; + } + } + + var Scheduler = function () { + var limit = 1024; + var size = 0; + var ix = 0; + var queue = new Array(limit); + var draining = false; + + function drain() { + var thunk; + draining = true; + + while (size !== 0) { + size--; + thunk = queue[ix]; + queue[ix] = void 0; + ix = (ix + 1) % limit; + thunk(); + } + + draining = false; + } + + return { + isDraining: function isDraining() { + return draining; + }, + enqueue: function enqueue(cb) { + var i, tmp; + + if (size === limit) { + tmp = draining; + drain(); + draining = tmp; + } + + queue[(ix + size) % limit] = cb; + size++; + + if (!draining) { + drain(); + } + } + }; + }(); + + function Supervisor(util) { + var fibers = {}; + var fiberId = 0; + var count = 0; + return { + register: function register(fiber) { + var fid = fiberId++; + fiber.onComplete({ + rethrow: true, + handler: function handler(result) { + return function () { + count--; + delete fibers[fid]; + }; + } + }); + fibers[fid] = fiber; + count++; + }, + isEmpty: function isEmpty() { + return count === 0; + }, + killAll: function killAll(killError, cb) { + return function () { + if (count === 0) { + return cb(); + } + + var killCount = 0; + var kills = {}; + + function kill(fid) { + kills[fid] = fibers[fid].kill(killError, function (result) { + return function () { + delete kills[fid]; + killCount--; + + if (util.isLeft(result) && util.fromLeft(result)) { + setTimeout(function () { + throw util.fromLeft(result); + }, 0); + } + + if (killCount === 0) { + cb(); + } + }; + })(); + } + + for (var k in fibers) { + if (fibers.hasOwnProperty(k)) { + killCount++; + kill(k); + } + } + + fibers = {}; + fiberId = 0; + count = 0; + return function (error) { + return new Aff(SYNC, function () { + for (var k in kills) { + if (kills.hasOwnProperty(k)) { + kills[k](); + } + } + }); + }; + }; + } + }; + } // Fiber state machine + + + var SUSPENDED = 0; // Suspended, pending a join. + + var CONTINUE = 1; // Interpret the next instruction. + + var STEP_BIND = 2; // Apply the next bind. + + var STEP_RESULT = 3; // Handle potential failure from a result. + + var PENDING = 4; // An async effect is running. + + var RETURN = 5; // The current stack has returned. + + var COMPLETED = 6; // The entire fiber has completed. + + function Fiber(util, supervisor, aff) { + // Monotonically increasing tick, increased on each asynchronous turn. + var runTick = 0; // The current branch of the state machine. + + var status = SUSPENDED; // The current point of interest for the state machine branch. + + var step = aff; // Successful step + + var fail = null; // Failure step + + var interrupt = null; // Asynchronous interrupt + // Stack of continuations for the current fiber. + + var bhead = null; + var btail = null; // Stack of attempts and finalizers for error recovery. Every `Cons` is also + // tagged with current `interrupt` state. We use this to track which items + // should be ignored or evaluated as a result of a kill. + + var attempts = null; // A special state is needed for Bracket, because it cannot be killed. When + // we enter a bracket acquisition or finalizer, we increment the counter, + // and then decrement once complete. + + var bracketCount = 0; // Each join gets a new id so they can be revoked. + + var joinId = 0; + var joins = null; + var rethrow = true; // Each invocation of `run` requires a tick. When an asynchronous effect is + // resolved, we must check that the local tick coincides with the fiber + // tick before resuming. This prevents multiple async continuations from + // accidentally resuming the same fiber. A common example may be invoking + // the provided callback in `makeAff` more than once, but it may also be an + // async effect resuming after the fiber was already cancelled. + + function _run(localRunTick) { + var tmp, result, attempt; + + while (true) { + tmp = null; + result = null; + attempt = null; + + switch (status) { + case STEP_BIND: + status = CONTINUE; + step = bhead(step); + + if (btail === null) { + bhead = null; + } else { + bhead = btail._1; + btail = btail._2; + } + + break; + + case STEP_RESULT: + if (util.isLeft(step)) { + status = RETURN; + fail = step; + step = null; + } else if (bhead === null) { + status = RETURN; + } else { + status = STEP_BIND; + step = util.fromRight(step); + } + + break; + + case CONTINUE: + switch (step.tag) { + case BIND: + if (bhead) { + btail = new Aff(CONS, bhead, btail); + } + + bhead = step._2; + status = CONTINUE; + step = step._1; + break; + + case PURE: + if (bhead === null) { + status = RETURN; + step = util.right(step._1); + } else { + status = STEP_BIND; + step = step._1; + } + + break; + + case SYNC: + status = STEP_RESULT; + step = runSync(util.left, util.right, step._1); + break; + + case ASYNC: + status = PENDING; + step = runAsync(util.left, step._1, function (result) { + return function () { + if (runTick !== localRunTick) { + return; + } + + runTick++; + Scheduler.enqueue(function () { + // It's possible to interrupt the fiber between enqueuing and + // resuming, so we need to check that the runTick is still + // valid. + if (runTick !== localRunTick + 1) { + return; + } + + status = STEP_RESULT; + step = result; + + _run(runTick); + }); + }; + }); + return; + + case THROW: + status = RETURN; + fail = util.left(step._1); + step = null; + break; + // Enqueue the Catch so that we can call the error handler later on + // in case of an exception. + + case CATCH: + if (bhead === null) { + attempts = new Aff(CONS, step, attempts, interrupt); + } else { + attempts = new Aff(CONS, step, new Aff(CONS, new Aff(RESUME, bhead, btail), attempts, interrupt), interrupt); + } + + bhead = null; + btail = null; + status = CONTINUE; + step = step._1; + break; + // Enqueue the Bracket so that we can call the appropriate handlers + // after resource acquisition. + + case BRACKET: + bracketCount++; + + if (bhead === null) { + attempts = new Aff(CONS, step, attempts, interrupt); + } else { + attempts = new Aff(CONS, step, new Aff(CONS, new Aff(RESUME, bhead, btail), attempts, interrupt), interrupt); + } + + bhead = null; + btail = null; + status = CONTINUE; + step = step._1; + break; + + case FORK: + status = STEP_RESULT; + tmp = Fiber(util, supervisor, step._2); + + if (supervisor) { + supervisor.register(tmp); + } + + if (step._1) { + tmp.run(); + } + + step = util.right(tmp); + break; + + case SEQ: + status = CONTINUE; + step = sequential(util, supervisor, step._1); + break; + } + + break; + + case RETURN: + bhead = null; + btail = null; // If the current stack has returned, and we have no other stacks to + // resume or finalizers to run, the fiber has halted and we can + // invoke all join callbacks. Otherwise we need to resume. + + if (attempts === null) { + status = COMPLETED; + step = interrupt || fail || step; + } else { + // The interrupt status for the enqueued item. + tmp = attempts._3; + attempt = attempts._1; + attempts = attempts._2; + + switch (attempt.tag) { + // We cannot recover from an unmasked interrupt. Otherwise we should + // continue stepping, or run the exception handler if an exception + // was raised. + case CATCH: + // We should compare the interrupt status as well because we + // only want it to apply if there has been an interrupt since + // enqueuing the catch. + if (interrupt && interrupt !== tmp && bracketCount === 0) { + status = RETURN; + } else if (fail) { + status = CONTINUE; + step = attempt._2(util.fromLeft(fail)); + fail = null; + } + + break; + // We cannot resume from an unmasked interrupt or exception. + + case RESUME: + // As with Catch, we only want to ignore in the case of an + // interrupt since enqueing the item. + if (interrupt && interrupt !== tmp && bracketCount === 0 || fail) { + status = RETURN; + } else { + bhead = attempt._1; + btail = attempt._2; + status = STEP_BIND; + step = util.fromRight(step); + } + + break; + // If we have a bracket, we should enqueue the handlers, + // and continue with the success branch only if the fiber has + // not been interrupted. If the bracket acquisition failed, we + // should not run either. + + case BRACKET: + bracketCount--; + + if (fail === null) { + result = util.fromRight(step); // We need to enqueue the Release with the same interrupt + // status as the Bracket that is initiating it. + + attempts = new Aff(CONS, new Aff(RELEASE, attempt._2, result), attempts, tmp); // We should only coninue as long as the interrupt status has not changed or + // we are currently within a non-interruptable finalizer. + + if (interrupt === tmp || bracketCount > 0) { + status = CONTINUE; + step = attempt._3(result); + } + } + + break; + // Enqueue the appropriate handler. We increase the bracket count + // because it should not be cancelled. + + case RELEASE: + attempts = new Aff(CONS, new Aff(FINALIZED, step, fail), attempts, interrupt); + status = CONTINUE; // It has only been killed if the interrupt status has changed + // since we enqueued the item, and the bracket count is 0. If the + // bracket count is non-zero then we are in a masked state so it's + // impossible to be killed. + + if (interrupt && interrupt !== tmp && bracketCount === 0) { + step = attempt._1.killed(util.fromLeft(interrupt))(attempt._2); + } else if (fail) { + step = attempt._1.failed(util.fromLeft(fail))(attempt._2); + } else { + step = attempt._1.completed(util.fromRight(step))(attempt._2); + } + + fail = null; + bracketCount++; + break; + + case FINALIZER: + bracketCount++; + attempts = new Aff(CONS, new Aff(FINALIZED, step, fail), attempts, interrupt); + status = CONTINUE; + step = attempt._1; + break; + + case FINALIZED: + bracketCount--; + status = RETURN; + step = attempt._1; + fail = attempt._2; + break; + } + } + + break; + + case COMPLETED: + for (var k in joins) { + if (joins.hasOwnProperty(k)) { + rethrow = rethrow && joins[k].rethrow; + runEff(joins[k].handler(step)); + } + } + + joins = null; // If we have an interrupt and a fail, then the thread threw while + // running finalizers. This should always rethrow in a fresh stack. + + if (interrupt && fail) { + setTimeout(function () { + throw util.fromLeft(fail); + }, 0); // If we have an unhandled exception, and no other fiber has joined + // then we need to throw the exception in a fresh stack. + } else if (util.isLeft(step) && rethrow) { + setTimeout(function () { + // Guard on reathrow because a completely synchronous fiber can + // still have an observer which was added after-the-fact. + if (rethrow) { + throw util.fromLeft(step); + } + }, 0); + } + + return; + + case SUSPENDED: + status = CONTINUE; + break; + + case PENDING: + return; + } + } + } + + function onComplete(join) { + return function () { + if (status === COMPLETED) { + rethrow = rethrow && join.rethrow; + join.handler(step)(); + return function () {}; + } + + var jid = joinId++; + joins = joins || {}; + joins[jid] = join; + return function () { + if (joins !== null) { + delete joins[jid]; + } + }; + }; + } + + function kill(error, cb) { + return function () { + if (status === COMPLETED) { + cb(util.right(void 0))(); + return function () {}; + } + + var canceler = onComplete({ + rethrow: false, + handler: function handler() + /* unused */ + { + return cb(util.right(void 0)); + } + })(); + + switch (status) { + case SUSPENDED: + interrupt = util.left(error); + status = COMPLETED; + step = interrupt; + + _run(runTick); + + break; + + case PENDING: + if (interrupt === null) { + interrupt = util.left(error); + } + + if (bracketCount === 0) { + if (status === PENDING) { + attempts = new Aff(CONS, new Aff(FINALIZER, step(error)), attempts, interrupt); + } + + status = RETURN; + step = null; + fail = null; + + _run(++runTick); + } + + break; + + default: + if (interrupt === null) { + interrupt = util.left(error); + } + + if (bracketCount === 0) { + status = RETURN; + step = null; + fail = null; + } + + } + + return canceler; + }; + } + + function join(cb) { + return function () { + var canceler = onComplete({ + rethrow: false, + handler: cb + })(); + + if (status === SUSPENDED) { + _run(runTick); + } + + return canceler; + }; + } + + return { + kill: kill, + join: join, + onComplete: onComplete, + isSuspended: function isSuspended() { + return status === SUSPENDED; + }, + run: function run() { + if (status === SUSPENDED) { + if (!Scheduler.isDraining()) { + Scheduler.enqueue(function () { + _run(runTick); + }); + } else { + _run(runTick); + } + } + } + }; + } + + function runPar(util, supervisor, par, cb) { + // Table of all forked fibers. + var fiberId = 0; + var fibers = {}; // Table of currently running cancelers, as a product of `Alt` behavior. + + var killId = 0; + var kills = {}; // Error used for early cancelation on Alt branches. + + var early = new Error("[ParAff] Early exit"); // Error used to kill the entire tree. + + var interrupt = null; // The root pointer of the tree. + + var root = EMPTY; // Walks a tree, invoking all the cancelers. Returns the table of pending + // cancellation fibers. + + function kill(error, par, cb) { + var step = par; + var head = null; + var tail = null; + var count = 0; + var kills = {}; + var tmp, kid; + + loop: while (true) { + tmp = null; + + switch (step.tag) { + case FORKED: + if (step._3 === EMPTY) { + tmp = fibers[step._1]; + kills[count++] = tmp.kill(error, function (result) { + return function () { + count--; + + if (count === 0) { + cb(result)(); + } + }; + }); + } // Terminal case. + + + if (head === null) { + break loop; + } // Go down the right side of the tree. + + + step = head._2; + + if (tail === null) { + head = null; + } else { + head = tail._1; + tail = tail._2; + } + + break; + + case MAP: + step = step._2; + break; + + case APPLY: + case ALT: + if (head) { + tail = new Aff(CONS, head, tail); + } + + head = step; + step = step._1; + break; + } + } + + if (count === 0) { + cb(util.right(void 0))(); + } else { + // Run the cancelation effects. We alias `count` because it's mutable. + kid = 0; + tmp = count; + + for (; kid < tmp; kid++) { + kills[kid] = kills[kid](); + } + } + + return kills; + } // When a fiber resolves, we need to bubble back up the tree with the + // result, computing the applicative nodes. + + + function join(result, head, tail) { + var fail, step, lhs, rhs, tmp, kid; + + if (util.isLeft(result)) { + fail = result; + step = null; + } else { + step = result; + fail = null; + } + + loop: while (true) { + lhs = null; + rhs = null; + tmp = null; + kid = null; // We should never continue if the entire tree has been interrupted. + + if (interrupt !== null) { + return; + } // We've made it all the way to the root of the tree, which means + // the tree has fully evaluated. + + + if (head === null) { + cb(fail || step)(); + return; + } // The tree has already been computed, so we shouldn't try to do it + // again. This should never happen. + // TODO: Remove this? + + + if (head._3 !== EMPTY) { + return; + } + + switch (head.tag) { + case MAP: + if (fail === null) { + head._3 = util.right(head._1(util.fromRight(step))); + step = head._3; + } else { + head._3 = fail; + } + + break; + + case APPLY: + lhs = head._1._3; + rhs = head._2._3; // If we have a failure we should kill the other side because we + // can't possible yield a result anymore. + + if (fail) { + head._3 = fail; + tmp = true; + kid = killId++; + kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function () + /* unused */ + { + return function () { + delete kills[kid]; + + if (tmp) { + tmp = false; + } else if (tail === null) { + join(fail, null, null); + } else { + join(fail, tail._1, tail._2); + } + }; + }); + + if (tmp) { + tmp = false; + return; + } + } else if (lhs === EMPTY || rhs === EMPTY) { + // We can only proceed if both sides have resolved. + return; + } else { + step = util.right(util.fromRight(lhs)(util.fromRight(rhs))); + head._3 = step; + } + + break; + + case ALT: + lhs = head._1._3; + rhs = head._2._3; // We can only proceed if both have resolved or we have a success + + if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) { + return; + } // If both sides resolve with an error, we should continue with the + // first error + + + if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) { + fail = step === lhs ? rhs : lhs; + step = null; + head._3 = fail; + } else { + head._3 = step; + tmp = true; + kid = killId++; // Once a side has resolved, we need to cancel the side that is still + // pending before we can continue. + + kills[kid] = kill(early, step === lhs ? head._2 : head._1, function () + /* unused */ + { + return function () { + delete kills[kid]; + + if (tmp) { + tmp = false; + } else if (tail === null) { + join(step, null, null); + } else { + join(step, tail._1, tail._2); + } + }; + }); + + if (tmp) { + tmp = false; + return; + } + } + + break; + } + + if (tail === null) { + head = null; + } else { + head = tail._1; + tail = tail._2; + } + } + } + + function resolve(fiber) { + return function (result) { + return function () { + delete fibers[fiber._1]; + fiber._3 = result; + join(result, fiber._2._1, fiber._2._2); + }; + }; + } // Walks the applicative tree, substituting non-applicative nodes with + // `FORKED` nodes. In this tree, all applicative nodes use the `_3` slot + // as a mutable slot for memoization. In an unresolved state, the `_3` + // slot is `EMPTY`. In the cases of `ALT` and `APPLY`, we always walk + // the left side first, because both operations are left-associative. As + // we `RETURN` from those branches, we then walk the right side. + + + function run() { + var status = CONTINUE; + var step = par; + var head = null; + var tail = null; + var tmp, fid; + + loop: while (true) { + tmp = null; + fid = null; + + switch (status) { + case CONTINUE: + switch (step.tag) { + case MAP: + if (head) { + tail = new Aff(CONS, head, tail); + } + + head = new Aff(MAP, step._1, EMPTY, EMPTY); + step = step._2; + break; + + case APPLY: + if (head) { + tail = new Aff(CONS, head, tail); + } + + head = new Aff(APPLY, EMPTY, step._2, EMPTY); + step = step._1; + break; + + case ALT: + if (head) { + tail = new Aff(CONS, head, tail); + } + + head = new Aff(ALT, EMPTY, step._2, EMPTY); + step = step._1; + break; + + default: + // When we hit a leaf value, we suspend the stack in the `FORKED`. + // When the fiber resolves, it can bubble back up the tree. + fid = fiberId++; + status = RETURN; + tmp = step; + step = new Aff(FORKED, fid, new Aff(CONS, head, tail), EMPTY); + tmp = Fiber(util, supervisor, tmp); + tmp.onComplete({ + rethrow: false, + handler: resolve(step) + })(); + fibers[fid] = tmp; + + if (supervisor) { + supervisor.register(tmp); + } + + } + + break; + + case RETURN: + // Terminal case, we are back at the root. + if (head === null) { + break loop; + } // If we are done with the right side, we need to continue down the + // left. Otherwise we should continue up the stack. + + + if (head._1 === EMPTY) { + head._1 = step; + status = CONTINUE; + step = head._2; + head._2 = EMPTY; + } else { + head._2 = step; + step = head; + + if (tail === null) { + head = null; + } else { + head = tail._1; + tail = tail._2; + } + } + + } + } // Keep a reference to the tree root so it can be cancelled. + + + root = step; + + for (fid = 0; fid < fiberId; fid++) { + fibers[fid].run(); + } + } // Cancels the entire tree. If there are already subtrees being canceled, + // we need to first cancel those joins. We will then add fresh joins for + // all pending branches including those that were in the process of being + // canceled. + + + function cancel(error, cb) { + interrupt = util.left(error); + var innerKills; + + for (var kid in kills) { + if (kills.hasOwnProperty(kid)) { + innerKills = kills[kid]; + + for (kid in innerKills) { + if (innerKills.hasOwnProperty(kid)) { + innerKills[kid](); + } + } + } + } + + kills = null; + var newKills = kill(error, root, cb); + return function (killError) { + return new Aff(ASYNC, function (killCb) { + return function () { + for (var kid in newKills) { + if (newKills.hasOwnProperty(kid)) { + newKills[kid](); + } + } + + return nonCanceler; + }; + }); + }; + } + + run(); + return function (killError) { + return new Aff(ASYNC, function (killCb) { + return function () { + return cancel(killError, killCb); + }; + }); + }; + } + + function sequential(util, supervisor, par) { + return new Aff(ASYNC, function (cb) { + return function () { + return runPar(util, supervisor, par, cb); + }; + }); + } + + Aff.EMPTY = EMPTY; + Aff.Pure = AffCtr(PURE); + Aff.Throw = AffCtr(THROW); + Aff.Catch = AffCtr(CATCH); + Aff.Sync = AffCtr(SYNC); + Aff.Async = AffCtr(ASYNC); + Aff.Bind = AffCtr(BIND); + Aff.Bracket = AffCtr(BRACKET); + Aff.Fork = AffCtr(FORK); + Aff.Seq = AffCtr(SEQ); + Aff.ParMap = AffCtr(MAP); + Aff.ParApply = AffCtr(APPLY); + Aff.ParAlt = AffCtr(ALT); + Aff.Fiber = Fiber; + Aff.Supervisor = Supervisor; + Aff.Scheduler = Scheduler; + Aff.nonCanceler = nonCanceler; + return Aff; +}(); + +exports._pure = Aff.Pure; +exports._throwError = Aff.Throw; + +exports._catchError = function (aff) { + return function (k) { + return Aff.Catch(aff, k); + }; +}; + +exports._map = function (f) { + return function (aff) { + if (aff.tag === Aff.Pure.tag) { + return Aff.Pure(f(aff._1)); + } else { + return Aff.Bind(aff, function (value) { + return Aff.Pure(f(value)); + }); + } + }; +}; + +exports._bind = function (aff) { + return function (k) { + return Aff.Bind(aff, k); + }; +}; + +exports._fork = function (immediate) { + return function (aff) { + return Aff.Fork(immediate, aff); + }; +}; + +exports._liftEffect = Aff.Sync; + +exports._parAffMap = function (f) { + return function (aff) { + return Aff.ParMap(f, aff); + }; +}; + +exports._parAffApply = function (aff1) { + return function (aff2) { + return Aff.ParApply(aff1, aff2); + }; +}; + +exports._parAffAlt = function (aff1) { + return function (aff2) { + return Aff.ParAlt(aff1, aff2); + }; +}; + +exports.makeAff = Aff.Async; + +exports.generalBracket = function (acquire) { + return function (options) { + return function (k) { + return Aff.Bracket(acquire, options, k); + }; + }; +}; + +exports._makeFiber = function (util, aff) { + return function () { + return Aff.Fiber(util, null, aff); + }; +}; + +exports._makeSupervisedFiber = function (util, aff) { + return function () { + var supervisor = Aff.Supervisor(util); + return { + fiber: Aff.Fiber(util, supervisor, aff), + supervisor: supervisor + }; + }; +}; + +exports._killAll = function (error, supervisor, cb) { + return supervisor.killAll(error, cb); +}; + +exports._delay = function () { + function setDelay(n, k) { + if (n === 0 && typeof setImmediate !== "undefined") { + return setImmediate(k); + } else { + return setTimeout(k, n); + } + } + + function clearDelay(n, t) { + if (n === 0 && typeof clearImmediate !== "undefined") { + return clearImmediate(t); + } else { + return clearTimeout(t); + } + } + + return function (right, ms) { + return Aff.Async(function (cb) { + return function () { + var timer = setDelay(ms, cb(right())); + return function () { + return Aff.Sync(function () { + return right(clearDelay(ms, timer)); + }); + }; + }; + }); + }; +}(); + +exports._sequential = Aff.Seq; +},{}],"XW2d":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js"); + +var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js"); + +var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js"); + +var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var ContT = function ContT(x) { + return x; +}; + +var withContT = function withContT(f) { + return function (v) { + return function (k) { + return v(f(k)); + }; + }; +}; + +var runContT = function runContT(v) { + return function (k) { + return v(k); + }; +}; + +var newtypeContT = new Data_Newtype.Newtype(function (n) { + return n; +}, ContT); +var monadTransContT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) { + return function (m) { + return function (k) { + return Control_Bind.bind(dictMonad.Bind1())(m)(k); + }; + }; +}); + +var mapContT = function mapContT(f) { + return function (v) { + return function (k) { + return f(v(k)); + }; + }; +}; + +var functorContT = function functorContT(dictFunctor) { + return new Data_Functor.Functor(function (f) { + return function (v) { + return function (k) { + return v(function (a) { + return k(f(a)); + }); + }; + }; + }); +}; + +var applyContT = function applyContT(dictApply) { + return new Control_Apply.Apply(function () { + return functorContT(dictApply.Functor0()); + }, function (v) { + return function (v1) { + return function (k) { + return v(function (g) { + return v1(function (a) { + return k(g(a)); + }); + }); + }; + }; + }); +}; + +var bindContT = function bindContT(dictBind) { + return new Control_Bind.Bind(function () { + return applyContT(dictBind.Apply0()); + }, function (v) { + return function (k) { + return function (k$prime) { + return v(function (a) { + var v1 = k(a); + return v1(k$prime); + }); + }; + }; + }); +}; + +var applicativeContT = function applicativeContT(dictApplicative) { + return new Control_Applicative.Applicative(function () { + return applyContT(dictApplicative.Apply0()); + }, function (a) { + return function (k) { + return k(a); + }; + }); +}; + +var monadContT = function monadContT(dictMonad) { + return new Control_Monad.Monad(function () { + return applicativeContT(dictMonad.Applicative0()); + }, function () { + return bindContT(dictMonad.Bind1()); + }); +}; + +var monadAskContT = function monadAskContT(dictMonadAsk) { + return new Control_Monad_Reader_Class.MonadAsk(function () { + return monadContT(dictMonadAsk.Monad0()); + }, Control_Monad_Trans_Class.lift(monadTransContT)(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk))); +}; + +var monadReaderContT = function monadReaderContT(dictMonadReader) { + return new Control_Monad_Reader_Class.MonadReader(function () { + return monadAskContT(dictMonadReader.MonadAsk0()); + }, function (f) { + return function (v) { + return function (k) { + return Control_Bind.bind(dictMonadReader.MonadAsk0().Monad0().Bind1())(Control_Monad_Reader_Class.ask(dictMonadReader.MonadAsk0()))(function (v1) { + return Control_Monad_Reader_Class.local(dictMonadReader)(f)(v(function () { + var $45 = Control_Monad_Reader_Class.local(dictMonadReader)(Data_Function["const"](v1)); + return function ($46) { + return $45(k($46)); + }; + }())); + }); + }; + }; + }); +}; + +var monadContContT = function monadContContT(dictMonad) { + return new Control_Monad_Cont_Class.MonadCont(function () { + return monadContT(dictMonad); + }, function (f) { + return function (k) { + var v = f(function (a) { + return function (v1) { + return k(a); + }; + }); + return v(k); + }; + }); +}; + +var monadEffectContT = function monadEffectContT(dictMonadEffect) { + return new Effect_Class.MonadEffect(function () { + return monadContT(dictMonadEffect.Monad0()); + }, function () { + var $47 = Control_Monad_Trans_Class.lift(monadTransContT)(dictMonadEffect.Monad0()); + var $48 = Effect_Class.liftEffect(dictMonadEffect); + return function ($49) { + return $47($48($49)); + }; + }()); +}; + +var monadStateContT = function monadStateContT(dictMonadState) { + return new Control_Monad_State_Class.MonadState(function () { + return monadContT(dictMonadState.Monad0()); + }, function () { + var $50 = Control_Monad_Trans_Class.lift(monadTransContT)(dictMonadState.Monad0()); + var $51 = Control_Monad_State_Class.state(dictMonadState); + return function ($52) { + return $50($51($52)); + }; + }()); +}; + +module.exports = { + ContT: ContT, + runContT: runContT, + mapContT: mapContT, + withContT: withContT, + newtypeContT: newtypeContT, + monadContContT: monadContContT, + functorContT: functorContT, + applyContT: applyContT, + applicativeContT: applicativeContT, + bindContT: bindContT, + monadContT: monadContT, + monadTransContT: monadTransContT, + monadEffectContT: monadEffectContT, + monadAskContT: monadAskContT, + monadReaderContT: monadReaderContT, + monadStateContT: monadStateContT +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Control.Monad.Cont.Class/index.js":"IpNh","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Effect.Class/index.js":"dWtH"}],"UUIS":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js"); + +var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js"); + +var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js"); + +var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js"); + +var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js"); + +var Control_MonadPlus = require("../Control.MonadPlus/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var MaybeT = function MaybeT(x) { + return x; +}; + +var runMaybeT = function runMaybeT(v) { + return v; +}; + +var newtypeMaybeT = new Data_Newtype.Newtype(function (n) { + return n; +}, MaybeT); +var monadTransMaybeT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) { + var $75 = Control_Monad.liftM1(dictMonad)(Data_Maybe.Just.create); + return function ($76) { + return MaybeT($75($76)); + }; +}); + +var mapMaybeT = function mapMaybeT(f) { + return function (v) { + return f(v); + }; +}; + +var functorMaybeT = function functorMaybeT(dictFunctor) { + return new Data_Functor.Functor(function (f) { + return function (v) { + return Data_Functor.map(dictFunctor)(Data_Functor.map(Data_Maybe.functorMaybe)(f))(v); + }; + }); +}; + +var monadMaybeT = function monadMaybeT(dictMonad) { + return new Control_Monad.Monad(function () { + return applicativeMaybeT(dictMonad); + }, function () { + return bindMaybeT(dictMonad); + }); +}; + +var bindMaybeT = function bindMaybeT(dictMonad) { + return new Control_Bind.Bind(function () { + return applyMaybeT(dictMonad); + }, function (v) { + return function (f) { + return Control_Bind.bind(dictMonad.Bind1())(v)(function (v1) { + if (v1 instanceof Data_Maybe.Nothing) { + return Control_Applicative.pure(dictMonad.Applicative0())(Data_Maybe.Nothing.value); + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + var v2 = f(v1.value0); + return v2; + } + + ; + throw new Error("Failed pattern match at Control.Monad.Maybe.Trans (line 54, column 11 - line 56, column 42): " + [v1.constructor.name]); + }); + }; + }); +}; + +var applyMaybeT = function applyMaybeT(dictMonad) { + return new Control_Apply.Apply(function () { + return functorMaybeT(dictMonad.Bind1().Apply0().Functor0()); + }, Control_Monad.ap(monadMaybeT(dictMonad))); +}; + +var applicativeMaybeT = function applicativeMaybeT(dictMonad) { + return new Control_Applicative.Applicative(function () { + return applyMaybeT(dictMonad); + }, function () { + var $77 = Control_Applicative.pure(dictMonad.Applicative0()); + return function ($78) { + return MaybeT($77(Data_Maybe.Just.create($78))); + }; + }()); +}; + +var monadAskMaybeT = function monadAskMaybeT(dictMonadAsk) { + return new Control_Monad_Reader_Class.MonadAsk(function () { + return monadMaybeT(dictMonadAsk.Monad0()); + }, Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk))); +}; + +var monadReaderMaybeT = function monadReaderMaybeT(dictMonadReader) { + return new Control_Monad_Reader_Class.MonadReader(function () { + return monadAskMaybeT(dictMonadReader.MonadAsk0()); + }, function (f) { + return mapMaybeT(Control_Monad_Reader_Class.local(dictMonadReader)(f)); + }); +}; + +var monadContMaybeT = function monadContMaybeT(dictMonadCont) { + return new Control_Monad_Cont_Class.MonadCont(function () { + return monadMaybeT(dictMonadCont.Monad0()); + }, function (f) { + return MaybeT(Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) { + var v = f(function (a) { + return MaybeT(c(new Data_Maybe.Just(a))); + }); + return v; + })); + }); +}; + +var monadEffectMaybe = function monadEffectMaybe(dictMonadEffect) { + return new Effect_Class.MonadEffect(function () { + return monadMaybeT(dictMonadEffect.Monad0()); + }, function () { + var $79 = Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadEffect.Monad0()); + var $80 = Effect_Class.liftEffect(dictMonadEffect); + return function ($81) { + return $79($80($81)); + }; + }()); +}; + +var monadRecMaybeT = function monadRecMaybeT(dictMonadRec) { + return new Control_Monad_Rec_Class.MonadRec(function () { + return monadMaybeT(dictMonadRec.Monad0()); + }, function (f) { + var $82 = Control_Monad_Rec_Class.tailRecM(dictMonadRec)(function (a) { + var v = f(a); + return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(v)(function (m$prime) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(function () { + if (m$prime instanceof Data_Maybe.Nothing) { + return new Control_Monad_Rec_Class.Done(Data_Maybe.Nothing.value); + } + + ; + + if (m$prime instanceof Data_Maybe.Just && m$prime.value0 instanceof Control_Monad_Rec_Class.Loop) { + return new Control_Monad_Rec_Class.Loop(m$prime.value0.value0); + } + + ; + + if (m$prime instanceof Data_Maybe.Just && m$prime.value0 instanceof Control_Monad_Rec_Class.Done) { + return new Control_Monad_Rec_Class.Done(new Data_Maybe.Just(m$prime.value0.value0)); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Maybe.Trans (line 84, column 16 - line 87, column 43): " + [m$prime.constructor.name]); + }()); + }); + }); + return function ($83) { + return MaybeT($82($83)); + }; + }); +}; + +var monadStateMaybeT = function monadStateMaybeT(dictMonadState) { + return new Control_Monad_State_Class.MonadState(function () { + return monadMaybeT(dictMonadState.Monad0()); + }, function (f) { + return Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadState.Monad0())(Control_Monad_State_Class.state(dictMonadState)(f)); + }); +}; + +var monadTellMaybeT = function monadTellMaybeT(dictMonadTell) { + return new Control_Monad_Writer_Class.MonadTell(function () { + return monadMaybeT(dictMonadTell.Monad0()); + }, function () { + var $84 = Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadTell.Monad0()); + var $85 = Control_Monad_Writer_Class.tell(dictMonadTell); + return function ($86) { + return $84($85($86)); + }; + }()); +}; + +var monadWriterMaybeT = function monadWriterMaybeT(dictMonadWriter) { + return new Control_Monad_Writer_Class.MonadWriter(function () { + return monadTellMaybeT(dictMonadWriter.MonadTell0()); + }, mapMaybeT(function (m) { + return Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(Control_Monad_Writer_Class.listen(dictMonadWriter)(m))(function (v) { + return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(Data_Functor.map(Data_Maybe.functorMaybe)(function (r) { + return new Data_Tuple.Tuple(r, v.value1); + })(v.value0)); + }); + }), mapMaybeT(function (m) { + return Control_Monad_Writer_Class.pass(dictMonadWriter)(Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(m)(function (v) { + return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(function () { + if (v instanceof Data_Maybe.Nothing) { + return new Data_Tuple.Tuple(Data_Maybe.Nothing.value, Control_Category.identity(Control_Category.categoryFn)); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return new Data_Tuple.Tuple(new Data_Maybe.Just(v.value0.value0), v.value0.value1); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Maybe.Trans (line 121, column 10 - line 123, column 43): " + [v.constructor.name]); + }()); + })); + })); +}; + +var monadThrowMaybeT = function monadThrowMaybeT(dictMonadThrow) { + return new Control_Monad_Error_Class.MonadThrow(function () { + return monadMaybeT(dictMonadThrow.Monad0()); + }, function (e) { + return Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadThrow.Monad0())(Control_Monad_Error_Class.throwError(dictMonadThrow)(e)); + }); +}; + +var monadErrorMaybeT = function monadErrorMaybeT(dictMonadError) { + return new Control_Monad_Error_Class.MonadError(function () { + return monadThrowMaybeT(dictMonadError.MonadThrow0()); + }, function (v) { + return function (h) { + return MaybeT(Control_Monad_Error_Class.catchError(dictMonadError)(v)(function (a) { + var v1 = h(a); + return v1; + })); + }; + }); +}; + +var altMaybeT = function altMaybeT(dictMonad) { + return new Control_Alt.Alt(function () { + return functorMaybeT(dictMonad.Bind1().Apply0().Functor0()); + }, function (v) { + return function (v1) { + return Control_Bind.bind(dictMonad.Bind1())(v)(function (v2) { + if (v2 instanceof Data_Maybe.Nothing) { + return v1; + } + + ; + return Control_Applicative.pure(dictMonad.Applicative0())(v2); + }); + }; + }); +}; + +var plusMaybeT = function plusMaybeT(dictMonad) { + return new Control_Plus.Plus(function () { + return altMaybeT(dictMonad); + }, Control_Applicative.pure(dictMonad.Applicative0())(Data_Maybe.Nothing.value)); +}; + +var alternativeMaybeT = function alternativeMaybeT(dictMonad) { + return new Control_Alternative.Alternative(function () { + return applicativeMaybeT(dictMonad); + }, function () { + return plusMaybeT(dictMonad); + }); +}; + +var monadZeroMaybeT = function monadZeroMaybeT(dictMonad) { + return new Control_MonadZero.MonadZero(function () { + return alternativeMaybeT(dictMonad); + }, function () { + return monadMaybeT(dictMonad); + }); +}; + +var monadPlusMaybeT = function monadPlusMaybeT(dictMonad) { + return new Control_MonadPlus.MonadPlus(function () { + return monadZeroMaybeT(dictMonad); + }); +}; + +module.exports = { + MaybeT: MaybeT, + runMaybeT: runMaybeT, + mapMaybeT: mapMaybeT, + newtypeMaybeT: newtypeMaybeT, + functorMaybeT: functorMaybeT, + applyMaybeT: applyMaybeT, + applicativeMaybeT: applicativeMaybeT, + bindMaybeT: bindMaybeT, + monadMaybeT: monadMaybeT, + monadTransMaybeT: monadTransMaybeT, + altMaybeT: altMaybeT, + plusMaybeT: plusMaybeT, + alternativeMaybeT: alternativeMaybeT, + monadPlusMaybeT: monadPlusMaybeT, + monadZeroMaybeT: monadZeroMaybeT, + monadRecMaybeT: monadRecMaybeT, + monadEffectMaybe: monadEffectMaybe, + monadContMaybeT: monadContMaybeT, + monadThrowMaybeT: monadThrowMaybeT, + monadErrorMaybeT: monadErrorMaybeT, + monadAskMaybeT: monadAskMaybeT, + monadReaderMaybeT: monadReaderMaybeT, + monadStateMaybeT: monadStateMaybeT, + monadTellMaybeT: monadTellMaybeT, + monadWriterMaybeT: monadWriterMaybeT +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad/index.js":"U/Ix","../Control.Monad.Cont.Class/index.js":"IpNh","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Class/index.js":"gxgA","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.Tuple/index.js":"II/O","../Effect.Class/index.js":"dWtH"}],"uvht":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js"); + +var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js"); + +var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js"); + +var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js"); + +var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js"); + +var Control_MonadPlus = require("../Control.MonadPlus/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Distributive = require("../Data.Distributive/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var ReaderT = function ReaderT(x) { + return x; +}; + +var withReaderT = function withReaderT(f) { + return function (v) { + return function ($66) { + return v(f($66)); + }; + }; +}; + +var runReaderT = function runReaderT(v) { + return v; +}; + +var newtypeReaderT = new Data_Newtype.Newtype(function (n) { + return n; +}, ReaderT); +var monadTransReaderT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) { + return function ($67) { + return ReaderT(Data_Function["const"]($67)); + }; +}); + +var mapReaderT = function mapReaderT(f) { + return function (v) { + return function ($68) { + return f(v($68)); + }; + }; +}; + +var functorReaderT = function functorReaderT(dictFunctor) { + return new Data_Functor.Functor(function () { + var $69 = Data_Functor.map(dictFunctor); + return function ($70) { + return mapReaderT($69($70)); + }; + }()); +}; + +var distributiveReaderT = function distributiveReaderT(dictDistributive) { + return new Data_Distributive.Distributive(function () { + return functorReaderT(dictDistributive.Functor0()); + }, function (dictFunctor) { + return function (f) { + var $71 = Data_Distributive.distribute(distributiveReaderT(dictDistributive))(dictFunctor); + var $72 = Data_Functor.map(dictFunctor)(f); + return function ($73) { + return $71($72($73)); + }; + }; + }, function (dictFunctor) { + return function (a) { + return function (e) { + return Data_Distributive.collect(dictDistributive)(dictFunctor)(function (r) { + return r(e); + })(a); + }; + }; + }); +}; + +var applyReaderT = function applyReaderT(dictApply) { + return new Control_Apply.Apply(function () { + return functorReaderT(dictApply.Functor0()); + }, function (v) { + return function (v1) { + return function (r) { + return Control_Apply.apply(dictApply)(v(r))(v1(r)); + }; + }; + }); +}; + +var bindReaderT = function bindReaderT(dictBind) { + return new Control_Bind.Bind(function () { + return applyReaderT(dictBind.Apply0()); + }, function (v) { + return function (k) { + return function (r) { + return Control_Bind.bind(dictBind)(v(r))(function (a) { + var v1 = k(a); + return v1(r); + }); + }; + }; + }); +}; + +var semigroupReaderT = function semigroupReaderT(dictApply) { + return function (dictSemigroup) { + return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyReaderT(dictApply))(Data_Semigroup.append(dictSemigroup))); + }; +}; + +var applicativeReaderT = function applicativeReaderT(dictApplicative) { + return new Control_Applicative.Applicative(function () { + return applyReaderT(dictApplicative.Apply0()); + }, function () { + var $74 = Control_Applicative.pure(dictApplicative); + return function ($75) { + return ReaderT(Data_Function["const"]($74($75))); + }; + }()); +}; + +var monadReaderT = function monadReaderT(dictMonad) { + return new Control_Monad.Monad(function () { + return applicativeReaderT(dictMonad.Applicative0()); + }, function () { + return bindReaderT(dictMonad.Bind1()); + }); +}; + +var monadAskReaderT = function monadAskReaderT(dictMonad) { + return new Control_Monad_Reader_Class.MonadAsk(function () { + return monadReaderT(dictMonad); + }, Control_Applicative.pure(dictMonad.Applicative0())); +}; + +var monadReaderReaderT = function monadReaderReaderT(dictMonad) { + return new Control_Monad_Reader_Class.MonadReader(function () { + return monadAskReaderT(dictMonad); + }, withReaderT); +}; + +var monadContReaderT = function monadContReaderT(dictMonadCont) { + return new Control_Monad_Cont_Class.MonadCont(function () { + return monadReaderT(dictMonadCont.Monad0()); + }, function (f) { + return function (r) { + return Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) { + var v = f(function ($76) { + return ReaderT(Data_Function["const"](c($76))); + }); + return v(r); + }); + }; + }); +}; + +var monadEffectReader = function monadEffectReader(dictMonadEffect) { + return new Effect_Class.MonadEffect(function () { + return monadReaderT(dictMonadEffect.Monad0()); + }, function () { + var $77 = Control_Monad_Trans_Class.lift(monadTransReaderT)(dictMonadEffect.Monad0()); + var $78 = Effect_Class.liftEffect(dictMonadEffect); + return function ($79) { + return $77($78($79)); + }; + }()); +}; + +var monadRecReaderT = function monadRecReaderT(dictMonadRec) { + return new Control_Monad_Rec_Class.MonadRec(function () { + return monadReaderT(dictMonadRec.Monad0()); + }, function (k) { + return function (a) { + var k$prime = function k$prime(r) { + return function (a$prime) { + var v = k(a$prime); + return Control_Bind.bindFlipped(dictMonadRec.Monad0().Bind1())(Control_Applicative.pure(dictMonadRec.Monad0().Applicative0()))(v(r)); + }; + }; + + return function (r) { + return Control_Monad_Rec_Class.tailRecM(dictMonadRec)(k$prime(r))(a); + }; + }; + }); +}; + +var monadStateReaderT = function monadStateReaderT(dictMonadState) { + return new Control_Monad_State_Class.MonadState(function () { + return monadReaderT(dictMonadState.Monad0()); + }, function () { + var $80 = Control_Monad_Trans_Class.lift(monadTransReaderT)(dictMonadState.Monad0()); + var $81 = Control_Monad_State_Class.state(dictMonadState); + return function ($82) { + return $80($81($82)); + }; + }()); +}; + +var monadTellReaderT = function monadTellReaderT(dictMonadTell) { + return new Control_Monad_Writer_Class.MonadTell(function () { + return monadReaderT(dictMonadTell.Monad0()); + }, function () { + var $83 = Control_Monad_Trans_Class.lift(monadTransReaderT)(dictMonadTell.Monad0()); + var $84 = Control_Monad_Writer_Class.tell(dictMonadTell); + return function ($85) { + return $83($84($85)); + }; + }()); +}; + +var monadWriterReaderT = function monadWriterReaderT(dictMonadWriter) { + return new Control_Monad_Writer_Class.MonadWriter(function () { + return monadTellReaderT(dictMonadWriter.MonadTell0()); + }, mapReaderT(Control_Monad_Writer_Class.listen(dictMonadWriter)), mapReaderT(Control_Monad_Writer_Class.pass(dictMonadWriter))); +}; + +var monadThrowReaderT = function monadThrowReaderT(dictMonadThrow) { + return new Control_Monad_Error_Class.MonadThrow(function () { + return monadReaderT(dictMonadThrow.Monad0()); + }, function () { + var $86 = Control_Monad_Trans_Class.lift(monadTransReaderT)(dictMonadThrow.Monad0()); + var $87 = Control_Monad_Error_Class.throwError(dictMonadThrow); + return function ($88) { + return $86($87($88)); + }; + }()); +}; + +var monadErrorReaderT = function monadErrorReaderT(dictMonadError) { + return new Control_Monad_Error_Class.MonadError(function () { + return monadThrowReaderT(dictMonadError.MonadThrow0()); + }, function (v) { + return function (h) { + return function (r) { + return Control_Monad_Error_Class.catchError(dictMonadError)(v(r))(function (e) { + var v1 = h(e); + return v1(r); + }); + }; + }; + }); +}; + +var monoidReaderT = function monoidReaderT(dictApplicative) { + return function (dictMonoid) { + return new Data_Monoid.Monoid(function () { + return semigroupReaderT(dictApplicative.Apply0())(dictMonoid.Semigroup0()); + }, Control_Applicative.pure(applicativeReaderT(dictApplicative))(Data_Monoid.mempty(dictMonoid))); + }; +}; + +var altReaderT = function altReaderT(dictAlt) { + return new Control_Alt.Alt(function () { + return functorReaderT(dictAlt.Functor0()); + }, function (v) { + return function (v1) { + return function (r) { + return Control_Alt.alt(dictAlt)(v(r))(v1(r)); + }; + }; + }); +}; + +var plusReaderT = function plusReaderT(dictPlus) { + return new Control_Plus.Plus(function () { + return altReaderT(dictPlus.Alt0()); + }, Data_Function["const"](Control_Plus.empty(dictPlus))); +}; + +var alternativeReaderT = function alternativeReaderT(dictAlternative) { + return new Control_Alternative.Alternative(function () { + return applicativeReaderT(dictAlternative.Applicative0()); + }, function () { + return plusReaderT(dictAlternative.Plus1()); + }); +}; + +var monadZeroReaderT = function monadZeroReaderT(dictMonadZero) { + return new Control_MonadZero.MonadZero(function () { + return alternativeReaderT(dictMonadZero.Alternative1()); + }, function () { + return monadReaderT(dictMonadZero.Monad0()); + }); +}; + +var monadPlusReaderT = function monadPlusReaderT(dictMonadPlus) { + return new Control_MonadPlus.MonadPlus(function () { + return monadZeroReaderT(dictMonadPlus.MonadZero0()); + }); +}; + +module.exports = { + ReaderT: ReaderT, + runReaderT: runReaderT, + withReaderT: withReaderT, + mapReaderT: mapReaderT, + newtypeReaderT: newtypeReaderT, + functorReaderT: functorReaderT, + applyReaderT: applyReaderT, + applicativeReaderT: applicativeReaderT, + altReaderT: altReaderT, + plusReaderT: plusReaderT, + alternativeReaderT: alternativeReaderT, + bindReaderT: bindReaderT, + monadReaderT: monadReaderT, + monadZeroReaderT: monadZeroReaderT, + semigroupReaderT: semigroupReaderT, + monoidReaderT: monoidReaderT, + monadPlusReaderT: monadPlusReaderT, + monadTransReaderT: monadTransReaderT, + monadEffectReader: monadEffectReader, + monadContReaderT: monadContReaderT, + monadThrowReaderT: monadThrowReaderT, + monadErrorReaderT: monadErrorReaderT, + monadAskReaderT: monadAskReaderT, + monadReaderReaderT: monadReaderReaderT, + monadStateReaderT: monadStateReaderT, + monadTellReaderT: monadTellReaderT, + monadWriterReaderT: monadWriterReaderT, + distributiveReaderT: distributiveReaderT, + monadRecReaderT: monadRecReaderT +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Control.Monad.Cont.Class/index.js":"IpNh","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Class/index.js":"gxgA","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Distributive/index.js":"8PTu","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Effect.Class/index.js":"dWtH"}],"VAds":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js"); + +var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js"); + +var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js"); + +var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js"); + +var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js"); + +var Control_MonadPlus = require("../Control.MonadPlus/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var WriterT = function WriterT(x) { + return x; +}; + +var runWriterT = function runWriterT(v) { + return v; +}; + +var newtypeWriterT = new Data_Newtype.Newtype(function (n) { + return n; +}, WriterT); + +var monadTransWriterT = function monadTransWriterT(dictMonoid) { + return new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) { + return function (m) { + return Control_Bind.bind(dictMonad.Bind1())(m)(function (v) { + return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(v, Data_Monoid.mempty(dictMonoid))); + }); + }; + }); +}; + +var mapWriterT = function mapWriterT(f) { + return function (v) { + return f(v); + }; +}; + +var functorWriterT = function functorWriterT(dictFunctor) { + return new Data_Functor.Functor(function (f) { + return mapWriterT(Data_Functor.map(dictFunctor)(function (v) { + return new Data_Tuple.Tuple(f(v.value0), v.value1); + })); + }); +}; + +var execWriterT = function execWriterT(dictFunctor) { + return function (v) { + return Data_Functor.map(dictFunctor)(Data_Tuple.snd)(v); + }; +}; + +var applyWriterT = function applyWriterT(dictSemigroup) { + return function (dictApply) { + return new Control_Apply.Apply(function () { + return functorWriterT(dictApply.Functor0()); + }, function (v) { + return function (v1) { + var k = function k(v3) { + return function (v4) { + return new Data_Tuple.Tuple(v3.value0(v4.value0), Data_Semigroup.append(dictSemigroup)(v3.value1)(v4.value1)); + }; + }; + + return Control_Apply.apply(dictApply)(Data_Functor.map(dictApply.Functor0())(k)(v))(v1); + }; + }); + }; +}; + +var bindWriterT = function bindWriterT(dictSemigroup) { + return function (dictBind) { + return new Control_Bind.Bind(function () { + return applyWriterT(dictSemigroup)(dictBind.Apply0()); + }, function (v) { + return function (k) { + return WriterT(Control_Bind.bind(dictBind)(v)(function (v1) { + var v2 = k(v1.value0); + return Data_Functor.map(dictBind.Apply0().Functor0())(function (v3) { + return new Data_Tuple.Tuple(v3.value0, Data_Semigroup.append(dictSemigroup)(v1.value1)(v3.value1)); + })(v2); + })); + }; + }); + }; +}; + +var applicativeWriterT = function applicativeWriterT(dictMonoid) { + return function (dictApplicative) { + return new Control_Applicative.Applicative(function () { + return applyWriterT(dictMonoid.Semigroup0())(dictApplicative.Apply0()); + }, function (a) { + return WriterT(Control_Applicative.pure(dictApplicative)(new Data_Tuple.Tuple(a, Data_Monoid.mempty(dictMonoid)))); + }); + }; +}; + +var monadWriterT = function monadWriterT(dictMonoid) { + return function (dictMonad) { + return new Control_Monad.Monad(function () { + return applicativeWriterT(dictMonoid)(dictMonad.Applicative0()); + }, function () { + return bindWriterT(dictMonoid.Semigroup0())(dictMonad.Bind1()); + }); + }; +}; + +var monadAskWriterT = function monadAskWriterT(dictMonoid) { + return function (dictMonadAsk) { + return new Control_Monad_Reader_Class.MonadAsk(function () { + return monadWriterT(dictMonoid)(dictMonadAsk.Monad0()); + }, Control_Monad_Trans_Class.lift(monadTransWriterT(dictMonoid))(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk))); + }; +}; + +var monadReaderWriterT = function monadReaderWriterT(dictMonoid) { + return function (dictMonadReader) { + return new Control_Monad_Reader_Class.MonadReader(function () { + return monadAskWriterT(dictMonoid)(dictMonadReader.MonadAsk0()); + }, function (f) { + return mapWriterT(Control_Monad_Reader_Class.local(dictMonadReader)(f)); + }); + }; +}; + +var monadContWriterT = function monadContWriterT(dictMonoid) { + return function (dictMonadCont) { + return new Control_Monad_Cont_Class.MonadCont(function () { + return monadWriterT(dictMonoid)(dictMonadCont.Monad0()); + }, function (f) { + return WriterT(Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) { + var v = f(function (a) { + return WriterT(c(new Data_Tuple.Tuple(a, Data_Monoid.mempty(dictMonoid)))); + }); + return v; + })); + }); + }; +}; + +var monadEffectWriter = function monadEffectWriter(dictMonoid) { + return function (dictMonadEffect) { + return new Effect_Class.MonadEffect(function () { + return monadWriterT(dictMonoid)(dictMonadEffect.Monad0()); + }, function () { + var $123 = Control_Monad_Trans_Class.lift(monadTransWriterT(dictMonoid))(dictMonadEffect.Monad0()); + var $124 = Effect_Class.liftEffect(dictMonadEffect); + return function ($125) { + return $123($124($125)); + }; + }()); + }; +}; + +var monadRecWriterT = function monadRecWriterT(dictMonoid) { + return function (dictMonadRec) { + return new Control_Monad_Rec_Class.MonadRec(function () { + return monadWriterT(dictMonoid)(dictMonadRec.Monad0()); + }, function (f) { + return function (a) { + var f$prime = function f$prime(v) { + var v1 = f(v.value0); + return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(v1)(function (v2) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(function () { + if (v2.value0 instanceof Control_Monad_Rec_Class.Loop) { + return new Control_Monad_Rec_Class.Loop(new Data_Tuple.Tuple(v2.value0.value0, Data_Semigroup.append(dictMonoid.Semigroup0())(v.value1)(v2.value1))); + } + + ; + + if (v2.value0 instanceof Control_Monad_Rec_Class.Done) { + return new Control_Monad_Rec_Class.Done(new Data_Tuple.Tuple(v2.value0.value0, Data_Semigroup.append(dictMonoid.Semigroup0())(v.value1)(v2.value1))); + } + + ; + throw new Error("Failed pattern match at Control.Monad.Writer.Trans (line 83, column 16 - line 85, column 47): " + [v2.value0.constructor.name]); + }()); + }); + }; + + return WriterT(Control_Monad_Rec_Class.tailRecM(dictMonadRec)(f$prime)(new Data_Tuple.Tuple(a, Data_Monoid.mempty(dictMonoid)))); + }; + }); + }; +}; + +var monadStateWriterT = function monadStateWriterT(dictMonoid) { + return function (dictMonadState) { + return new Control_Monad_State_Class.MonadState(function () { + return monadWriterT(dictMonoid)(dictMonadState.Monad0()); + }, function (f) { + return Control_Monad_Trans_Class.lift(monadTransWriterT(dictMonoid))(dictMonadState.Monad0())(Control_Monad_State_Class.state(dictMonadState)(f)); + }); + }; +}; + +var monadTellWriterT = function monadTellWriterT(dictMonoid) { + return function (dictMonad) { + return new Control_Monad_Writer_Class.MonadTell(function () { + return monadWriterT(dictMonoid)(dictMonad); + }, function () { + var $126 = Control_Applicative.pure(dictMonad.Applicative0()); + var $127 = Data_Tuple.Tuple.create(Data_Unit.unit); + return function ($128) { + return WriterT($126($127($128))); + }; + }()); + }; +}; + +var monadWriterWriterT = function monadWriterWriterT(dictMonoid) { + return function (dictMonad) { + return new Control_Monad_Writer_Class.MonadWriter(function () { + return monadTellWriterT(dictMonoid)(dictMonad); + }, function (v) { + return Control_Bind.bind(dictMonad.Bind1())(v)(function (v1) { + return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v1.value0, v1.value1), v1.value1)); + }); + }, function (v) { + return Control_Bind.bind(dictMonad.Bind1())(v)(function (v1) { + return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(v1.value0.value0, v1.value0.value1(v1.value1))); + }); + }); + }; +}; + +var monadThrowWriterT = function monadThrowWriterT(dictMonoid) { + return function (dictMonadThrow) { + return new Control_Monad_Error_Class.MonadThrow(function () { + return monadWriterT(dictMonoid)(dictMonadThrow.Monad0()); + }, function (e) { + return Control_Monad_Trans_Class.lift(monadTransWriterT(dictMonoid))(dictMonadThrow.Monad0())(Control_Monad_Error_Class.throwError(dictMonadThrow)(e)); + }); + }; +}; + +var monadErrorWriterT = function monadErrorWriterT(dictMonoid) { + return function (dictMonadError) { + return new Control_Monad_Error_Class.MonadError(function () { + return monadThrowWriterT(dictMonoid)(dictMonadError.MonadThrow0()); + }, function (v) { + return function (h) { + return WriterT(Control_Monad_Error_Class.catchError(dictMonadError)(v)(function (e) { + var v1 = h(e); + return v1; + })); + }; + }); + }; +}; + +var altWriterT = function altWriterT(dictAlt) { + return new Control_Alt.Alt(function () { + return functorWriterT(dictAlt.Functor0()); + }, function (v) { + return function (v1) { + return Control_Alt.alt(dictAlt)(v)(v1); + }; + }); +}; + +var plusWriterT = function plusWriterT(dictPlus) { + return new Control_Plus.Plus(function () { + return altWriterT(dictPlus.Alt0()); + }, Control_Plus.empty(dictPlus)); +}; + +var alternativeWriterT = function alternativeWriterT(dictMonoid) { + return function (dictAlternative) { + return new Control_Alternative.Alternative(function () { + return applicativeWriterT(dictMonoid)(dictAlternative.Applicative0()); + }, function () { + return plusWriterT(dictAlternative.Plus1()); + }); + }; +}; + +var monadZeroWriterT = function monadZeroWriterT(dictMonoid) { + return function (dictMonadZero) { + return new Control_MonadZero.MonadZero(function () { + return alternativeWriterT(dictMonoid)(dictMonadZero.Alternative1()); + }, function () { + return monadWriterT(dictMonoid)(dictMonadZero.Monad0()); + }); + }; +}; + +var monadPlusWriterT = function monadPlusWriterT(dictMonoid) { + return function (dictMonadPlus) { + return new Control_MonadPlus.MonadPlus(function () { + return monadZeroWriterT(dictMonoid)(dictMonadPlus.MonadZero0()); + }); + }; +}; + +module.exports = { + WriterT: WriterT, + runWriterT: runWriterT, + execWriterT: execWriterT, + mapWriterT: mapWriterT, + newtypeWriterT: newtypeWriterT, + functorWriterT: functorWriterT, + applyWriterT: applyWriterT, + applicativeWriterT: applicativeWriterT, + altWriterT: altWriterT, + plusWriterT: plusWriterT, + alternativeWriterT: alternativeWriterT, + bindWriterT: bindWriterT, + monadWriterT: monadWriterT, + monadRecWriterT: monadRecWriterT, + monadZeroWriterT: monadZeroWriterT, + monadPlusWriterT: monadPlusWriterT, + monadTransWriterT: monadTransWriterT, + monadEffectWriter: monadEffectWriter, + monadContWriterT: monadContWriterT, + monadThrowWriterT: monadThrowWriterT, + monadErrorWriterT: monadErrorWriterT, + monadAskWriterT: monadAskWriterT, + monadReaderWriterT: monadReaderWriterT, + monadStateWriterT: monadStateWriterT, + monadTellWriterT: monadTellWriterT, + monadWriterWriterT: monadWriterWriterT +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Control.Monad.Cont.Class/index.js":"IpNh","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Class/index.js":"gxgA","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk","../Effect.Class/index.js":"dWtH"}],"FExJ":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var App = function App(x) { + return x; +}; + +var traversableWithIndexApp = function traversableWithIndexApp(dictTraversableWithIndex) { + return dictTraversableWithIndex; +}; + +var traversableApp = function traversableApp(dictTraversable) { + return dictTraversable; +}; + +var showApp = function showApp(dictShow) { + return new Data_Show.Show(function (v) { + return "(App " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var semigroupApp = function semigroupApp(dictApply) { + return function (dictSemigroup) { + return new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return Control_Apply.lift2(dictApply)(Data_Semigroup.append(dictSemigroup))(v)(v1); + }; + }); + }; +}; + +var plusApp = function plusApp(dictPlus) { + return dictPlus; +}; + +var newtypeApp = new Data_Newtype.Newtype(function (n) { + return n; +}, App); + +var monoidApp = function monoidApp(dictApplicative) { + return function (dictMonoid) { + return new Data_Monoid.Monoid(function () { + return semigroupApp(dictApplicative.Apply0())(dictMonoid.Semigroup0()); + }, Control_Applicative.pure(dictApplicative)(Data_Monoid.mempty(dictMonoid))); + }; +}; + +var monadZeroApp = function monadZeroApp(dictMonadZero) { + return dictMonadZero; +}; + +var monadPlusApp = function monadPlusApp(dictMonadPlus) { + return dictMonadPlus; +}; + +var monadApp = function monadApp(dictMonad) { + return dictMonad; +}; + +var lazyApp = function lazyApp(dictLazy) { + return dictLazy; +}; + +var hoistLowerApp = Unsafe_Coerce.unsafeCoerce; +var hoistLiftApp = Unsafe_Coerce.unsafeCoerce; + +var hoistApp = function hoistApp(f) { + return function (v) { + return f(v); + }; +}; + +var functorWithIndexApp = function functorWithIndexApp(dictFunctorWithIndex) { + return dictFunctorWithIndex; +}; + +var functorApp = function functorApp(dictFunctor) { + return dictFunctor; +}; + +var foldableWithIndexApp = function foldableWithIndexApp(dictFoldableWithIndex) { + return dictFoldableWithIndex; +}; + +var foldableApp = function foldableApp(dictFoldable) { + return dictFoldable; +}; + +var extendApp = function extendApp(dictExtend) { + return dictExtend; +}; + +var eqApp = function eqApp(dictEq1) { + return function (dictEq) { + return new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq1(dictEq1)(dictEq)(x)(y); + }; + }); + }; +}; + +var ordApp = function ordApp(dictOrd1) { + return function (dictOrd) { + return new Data_Ord.Ord(function () { + return eqApp(dictOrd1.Eq10())(dictOrd.Eq0()); + }, function (x) { + return function (y) { + return Data_Ord.compare1(dictOrd1)(dictOrd)(x)(y); + }; + }); + }; +}; + +var eq1App = function eq1App(dictEq1) { + return new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqApp(dictEq1)(dictEq)); + }); +}; + +var ord1App = function ord1App(dictOrd1) { + return new Data_Ord.Ord1(function () { + return eq1App(dictOrd1.Eq10()); + }, function (dictOrd) { + return Data_Ord.compare(ordApp(dictOrd1)(dictOrd)); + }); +}; + +var comonadApp = function comonadApp(dictComonad) { + return dictComonad; +}; + +var bindApp = function bindApp(dictBind) { + return dictBind; +}; + +var applyApp = function applyApp(dictApply) { + return dictApply; +}; + +var applicativeApp = function applicativeApp(dictApplicative) { + return dictApplicative; +}; + +var alternativeApp = function alternativeApp(dictAlternative) { + return dictAlternative; +}; + +var altApp = function altApp(dictAlt) { + return dictAlt; +}; + +module.exports = { + App: App, + hoistApp: hoistApp, + hoistLiftApp: hoistLiftApp, + hoistLowerApp: hoistLowerApp, + newtypeApp: newtypeApp, + eqApp: eqApp, + eq1App: eq1App, + ordApp: ordApp, + ord1App: ord1App, + showApp: showApp, + semigroupApp: semigroupApp, + monoidApp: monoidApp, + functorApp: functorApp, + functorWithIndexApp: functorWithIndexApp, + applyApp: applyApp, + applicativeApp: applicativeApp, + bindApp: bindApp, + monadApp: monadApp, + altApp: altApp, + plusApp: plusApp, + alternativeApp: alternativeApp, + monadZeroApp: monadZeroApp, + monadPlusApp: monadPlusApp, + lazyApp: lazyApp, + foldableApp: foldableApp, + traversableApp: traversableApp, + foldableWithIndexApp: foldableWithIndexApp, + traversableWithIndexApp: traversableWithIndexApp, + extendApp: extendApp, + comonadApp: comonadApp +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Data.Eq/index.js":"Pq4F","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Unsafe.Coerce/index.js":"ETUV"}],"z8br":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Functor_App = require("../Data.Functor.App/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Compose = function Compose(x) { + return x; +}; + +var showCompose = function showCompose(dictShow) { + return new Data_Show.Show(function (v) { + return "(Compose " + (Data_Show.show(dictShow)(v) + ")"); + }); +}; + +var newtypeCompose = new Data_Newtype.Newtype(function (n) { + return n; +}, Compose); + +var functorCompose = function functorCompose(dictFunctor) { + return function (dictFunctor1) { + return new Data_Functor.Functor(function (f) { + return function (v) { + return Compose(Data_Functor.map(dictFunctor)(Data_Functor.map(dictFunctor1)(f))(v)); + }; + }); + }; +}; + +var functorWithIndexCompose = function functorWithIndexCompose(dictFunctorWithIndex) { + return function (dictFunctorWithIndex1) { + return new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorCompose(dictFunctorWithIndex.Functor0())(dictFunctorWithIndex1.Functor0()); + }, function (f) { + return function (v) { + return Compose(Data_FunctorWithIndex.mapWithIndex(dictFunctorWithIndex)(function () { + var $100 = Data_FunctorWithIndex.mapWithIndex(dictFunctorWithIndex1); + var $101 = Data_Tuple.curry(f); + return function ($102) { + return $100($101($102)); + }; + }())(v)); + }; + }); + }; +}; + +var foldableCompose = function foldableCompose(dictFoldable) { + return function (dictFoldable1) { + return new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(Data_Foldable.foldMap(dictFoldable1)(dictMonoid)(f))(v); + }; + }; + }, function (f) { + return function (i) { + return function (v) { + return Data_Foldable.foldl(dictFoldable)(Data_Foldable.foldl(dictFoldable1)(f))(i)(v); + }; + }; + }, function (f) { + return function (i) { + return function (v) { + return Data_Foldable.foldr(dictFoldable)(Data_Function.flip(Data_Foldable.foldr(dictFoldable1)(f)))(i)(v); + }; + }; + }); + }; +}; + +var foldableWithIndexCompose = function foldableWithIndexCompose(dictFoldableWithIndex) { + return function (dictFoldableWithIndex1) { + return new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableCompose(dictFoldableWithIndex.Foldable0())(dictFoldableWithIndex1.Foldable0()); + }, function (dictMonoid) { + return function (f) { + return function (v) { + return Data_FoldableWithIndex.foldMapWithIndex(dictFoldableWithIndex)(dictMonoid)(function () { + var $103 = Data_FoldableWithIndex.foldMapWithIndex(dictFoldableWithIndex1)(dictMonoid); + var $104 = Data_Tuple.curry(f); + return function ($105) { + return $103($104($105)); + }; + }())(v); + }; + }; + }, function (f) { + return function (i) { + return function (v) { + return Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex)(function () { + var $106 = Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex1); + var $107 = Data_Tuple.curry(f); + return function ($108) { + return $106($107($108)); + }; + }())(i)(v); + }; + }; + }, function (f) { + return function (i) { + return function (v) { + return Data_FoldableWithIndex.foldrWithIndex(dictFoldableWithIndex)(function (a) { + return Data_Function.flip(Data_FoldableWithIndex.foldrWithIndex(dictFoldableWithIndex1)(Data_Tuple.curry(f)(a))); + })(i)(v); + }; + }; + }); + }; +}; + +var traversableCompose = function traversableCompose(dictTraversable) { + return function (dictTraversable1) { + return new Data_Traversable.Traversable(function () { + return foldableCompose(dictTraversable.Foldable1())(dictTraversable1.Foldable1()); + }, function () { + return functorCompose(dictTraversable.Functor0())(dictTraversable1.Functor0()); + }, function (dictApplicative) { + return Data_Traversable.traverse(traversableCompose(dictTraversable)(dictTraversable1))(dictApplicative)(Control_Category.identity(Control_Category.categoryFn)); + }, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Compose)(Data_Traversable.traverse(dictTraversable)(dictApplicative)(Data_Traversable.traverse(dictTraversable1)(dictApplicative)(f))(v)); + }; + }; + }); + }; +}; + +var traversableWithIndexCompose = function traversableWithIndexCompose(dictTraversableWithIndex) { + return function (dictTraversableWithIndex1) { + return new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexCompose(dictTraversableWithIndex.FoldableWithIndex1())(dictTraversableWithIndex1.FoldableWithIndex1()); + }, function () { + return functorWithIndexCompose(dictTraversableWithIndex.FunctorWithIndex0())(dictTraversableWithIndex1.FunctorWithIndex0()); + }, function () { + return traversableCompose(dictTraversableWithIndex.Traversable2())(dictTraversableWithIndex1.Traversable2()); + }, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Compose)(Data_TraversableWithIndex.traverseWithIndex(dictTraversableWithIndex)(dictApplicative)(function () { + var $109 = Data_TraversableWithIndex.traverseWithIndex(dictTraversableWithIndex1)(dictApplicative); + var $110 = Data_Tuple.curry(f); + return function ($111) { + return $109($110($111)); + }; + }())(v)); + }; + }; + }); + }; +}; + +var eqCompose = function eqCompose(dictEq1) { + return function (dictEq11) { + return function (dictEq) { + return new Data_Eq.Eq(function (v) { + return function (v1) { + return Data_Eq.eq1(dictEq1)(Data_Functor_App.eqApp(dictEq11)(dictEq))(Data_Functor_App.hoistLiftApp(v))(Data_Functor_App.hoistLiftApp(v1)); + }; + }); + }; + }; +}; + +var ordCompose = function ordCompose(dictOrd1) { + return function (dictOrd11) { + return function (dictOrd) { + return new Data_Ord.Ord(function () { + return eqCompose(dictOrd1.Eq10())(dictOrd11.Eq10())(dictOrd.Eq0()); + }, function (v) { + return function (v1) { + return Data_Ord.compare1(dictOrd1)(Data_Functor_App.ordApp(dictOrd11)(dictOrd))(Data_Functor_App.hoistLiftApp(v))(Data_Functor_App.hoistLiftApp(v1)); + }; + }); + }; + }; +}; + +var eq1Compose = function eq1Compose(dictEq1) { + return function (dictEq11) { + return new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqCompose(dictEq1)(dictEq11)(dictEq)); + }); + }; +}; + +var ord1Compose = function ord1Compose(dictOrd1) { + return function (dictOrd11) { + return new Data_Ord.Ord1(function () { + return eq1Compose(dictOrd1.Eq10())(dictOrd11.Eq10()); + }, function (dictOrd) { + return Data_Ord.compare(ordCompose(dictOrd1)(dictOrd11)(dictOrd)); + }); + }; +}; + +var bihoistCompose = function bihoistCompose(dictFunctor) { + return function (natF) { + return function (natG) { + return function (v) { + return natF(Data_Functor.map(dictFunctor)(natG)(v)); + }; + }; + }; +}; + +var applyCompose = function applyCompose(dictApply) { + return function (dictApply1) { + return new Control_Apply.Apply(function () { + return functorCompose(dictApply.Functor0())(dictApply1.Functor0()); + }, function (v) { + return function (v1) { + return Compose(Control_Apply.apply(dictApply)(Data_Functor.map(dictApply.Functor0())(Control_Apply.apply(dictApply1))(v))(v1)); + }; + }); + }; +}; + +var applicativeCompose = function applicativeCompose(dictApplicative) { + return function (dictApplicative1) { + return new Control_Applicative.Applicative(function () { + return applyCompose(dictApplicative.Apply0())(dictApplicative1.Apply0()); + }, function () { + var $112 = Control_Applicative.pure(dictApplicative); + var $113 = Control_Applicative.pure(dictApplicative1); + return function ($114) { + return Compose($112($113($114))); + }; + }()); + }; +}; + +var altCompose = function altCompose(dictAlt) { + return function (dictFunctor) { + return new Control_Alt.Alt(function () { + return functorCompose(dictAlt.Functor0())(dictFunctor); + }, function (v) { + return function (v1) { + return Compose(Control_Alt.alt(dictAlt)(v)(v1)); + }; + }); + }; +}; + +var plusCompose = function plusCompose(dictPlus) { + return function (dictFunctor) { + return new Control_Plus.Plus(function () { + return altCompose(dictPlus.Alt0())(dictFunctor); + }, Control_Plus.empty(dictPlus)); + }; +}; + +var alternativeCompose = function alternativeCompose(dictAlternative) { + return function (dictApplicative) { + return new Control_Alternative.Alternative(function () { + return applicativeCompose(dictAlternative.Applicative0())(dictApplicative); + }, function () { + return plusCompose(dictAlternative.Plus1())(dictApplicative.Apply0().Functor0()); + }); + }; +}; + +module.exports = { + Compose: Compose, + bihoistCompose: bihoistCompose, + newtypeCompose: newtypeCompose, + eqCompose: eqCompose, + eq1Compose: eq1Compose, + ordCompose: ordCompose, + ord1Compose: ord1Compose, + showCompose: showCompose, + functorCompose: functorCompose, + functorWithIndexCompose: functorWithIndexCompose, + applyCompose: applyCompose, + applicativeCompose: applicativeCompose, + foldableCompose: foldableCompose, + foldableWithIndexCompose: foldableWithIndexCompose, + traversableCompose: traversableCompose, + traversableWithIndexCompose: traversableWithIndexCompose, + altCompose: altCompose, + plusCompose: plusCompose, + alternativeCompose: alternativeCompose +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Control.Plus/index.js":"oMBg","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Functor.App/index.js":"FExJ","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O"}],"NR5l":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_Cont_Trans = require("../Control.Monad.Cont.Trans/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Control_Monad_Maybe_Trans = require("../Control.Monad.Maybe.Trans/index.js"); + +var Control_Monad_Reader_Trans = require("../Control.Monad.Reader.Trans/index.js"); + +var Control_Monad_Writer_Trans = require("../Control.Monad.Writer.Trans/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Functor_Compose = require("../Data.Functor.Compose/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var Effect_Ref = require("../Effect.Ref/index.js"); + +var ParCont = function ParCont(x) { + return x; +}; + +var Parallel = function Parallel(Applicative1, Monad0, parallel, sequential) { + this.Applicative1 = Applicative1; + this.Monad0 = Monad0; + this.parallel = parallel; + this.sequential = sequential; +}; + +var sequential = function sequential(dict) { + return dict.sequential; +}; + +var parallel = function parallel(dict) { + return dict.parallel; +}; + +var newtypeParCont = new Data_Newtype.Newtype(function (n) { + return n; +}, ParCont); + +var monadParWriterT = function monadParWriterT(dictMonoid) { + return function (dictParallel) { + return new Parallel(function () { + return Control_Monad_Writer_Trans.applicativeWriterT(dictMonoid)(dictParallel.Applicative1()); + }, function () { + return Control_Monad_Writer_Trans.monadWriterT(dictMonoid)(dictParallel.Monad0()); + }, Control_Monad_Writer_Trans.mapWriterT(parallel(dictParallel)), Control_Monad_Writer_Trans.mapWriterT(sequential(dictParallel))); + }; +}; + +var monadParReaderT = function monadParReaderT(dictParallel) { + return new Parallel(function () { + return Control_Monad_Reader_Trans.applicativeReaderT(dictParallel.Applicative1()); + }, function () { + return Control_Monad_Reader_Trans.monadReaderT(dictParallel.Monad0()); + }, Control_Monad_Reader_Trans.mapReaderT(parallel(dictParallel)), Control_Monad_Reader_Trans.mapReaderT(sequential(dictParallel))); +}; + +var monadParMaybeT = function monadParMaybeT(dictParallel) { + return new Parallel(function () { + return Data_Functor_Compose.applicativeCompose(dictParallel.Applicative1())(Data_Maybe.applicativeMaybe); + }, function () { + return Control_Monad_Maybe_Trans.monadMaybeT(dictParallel.Monad0()); + }, function (v) { + return parallel(dictParallel)(v); + }, function (v) { + return sequential(dictParallel)(v); + }); +}; + +var monadParExceptT = function monadParExceptT(dictParallel) { + return new Parallel(function () { + return Data_Functor_Compose.applicativeCompose(dictParallel.Applicative1())(Data_Either.applicativeEither); + }, function () { + return Control_Monad_Except_Trans.monadExceptT(dictParallel.Monad0()); + }, function (v) { + return parallel(dictParallel)(v); + }, function (v) { + return sequential(dictParallel)(v); + }); +}; + +var monadParParCont = function monadParParCont(dictMonadEffect) { + return new Parallel(function () { + return applicativeParCont(dictMonadEffect); + }, function () { + return Control_Monad_Cont_Trans.monadContT(dictMonadEffect.Monad0()); + }, ParCont, function (v) { + return v; + }); +}; + +var functorParCont = function functorParCont(dictMonadEffect) { + return new Data_Functor.Functor(function (f) { + var $54 = parallel(monadParParCont(dictMonadEffect)); + var $55 = Data_Functor.map(Control_Monad_Cont_Trans.functorContT(dictMonadEffect.Monad0().Bind1().Apply0().Functor0()))(f); + var $56 = sequential(monadParParCont(dictMonadEffect)); + return function ($57) { + return $54($55($56($57))); + }; + }); +}; + +var applyParCont = function applyParCont(dictMonadEffect) { + return new Control_Apply.Apply(function () { + return functorParCont(dictMonadEffect); + }, function (v) { + return function (v1) { + return ParCont(function (k) { + return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref["new"](Data_Maybe.Nothing.value)))(function (v2) { + return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref["new"](Data_Maybe.Nothing.value)))(function (v3) { + return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Control_Monad_Cont_Trans.runContT(v)(function (a) { + return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(v3)))(function (v4) { + if (v4 instanceof Data_Maybe.Nothing) { + return Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.write(new Data_Maybe.Just(a))(v2)); + } + + ; + + if (v4 instanceof Data_Maybe.Just) { + return k(a(v4.value0)); + } + + ; + throw new Error("Failed pattern match at Control.Parallel.Class (line 71, column 7 - line 73, column 26): " + [v4.constructor.name]); + }); + }))(function () { + return Control_Monad_Cont_Trans.runContT(v1)(function (b) { + return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(v2)))(function (v4) { + if (v4 instanceof Data_Maybe.Nothing) { + return Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.write(new Data_Maybe.Just(b))(v3)); + } + + ; + + if (v4 instanceof Data_Maybe.Just) { + return k(v4.value0(b)); + } + + ; + throw new Error("Failed pattern match at Control.Parallel.Class (line 77, column 7 - line 79, column 26): " + [v4.constructor.name]); + }); + }); + }); + }); + }); + }); + }; + }); +}; + +var applicativeParCont = function applicativeParCont(dictMonadEffect) { + return new Control_Applicative.Applicative(function () { + return applyParCont(dictMonadEffect); + }, function () { + var $58 = parallel(monadParParCont(dictMonadEffect)); + var $59 = Control_Applicative.pure(Control_Monad_Cont_Trans.applicativeContT(dictMonadEffect.Monad0().Applicative0())); + return function ($60) { + return $58($59($60)); + }; + }()); +}; + +var altParCont = function altParCont(dictMonadEffect) { + return new Control_Alt.Alt(function () { + return functorParCont(dictMonadEffect); + }, function (v) { + return function (v1) { + return ParCont(function (k) { + return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref["new"](false)))(function (v2) { + return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Control_Monad_Cont_Trans.runContT(v)(function (a) { + return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(v2)))(function (v3) { + if (v3) { + return Control_Applicative.pure(dictMonadEffect.Monad0().Applicative0())(Data_Unit.unit); + } + + ; + return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.write(true)(v2)))(function () { + return k(a); + }); + }); + }))(function () { + return Control_Monad_Cont_Trans.runContT(v1)(function (a) { + return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(v2)))(function (v3) { + if (v3) { + return Control_Applicative.pure(dictMonadEffect.Monad0().Applicative0())(Data_Unit.unit); + } + + ; + return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.write(true)(v2)))(function () { + return k(a); + }); + }); + }); + }); + }); + }); + }; + }); +}; + +var plusParCont = function plusParCont(dictMonadEffect) { + return new Control_Plus.Plus(function () { + return altParCont(dictMonadEffect); + }, ParCont(function (v) { + return Control_Applicative.pure(dictMonadEffect.Monad0().Applicative0())(Data_Unit.unit); + })); +}; + +var alternativeParCont = function alternativeParCont(dictMonadEffect) { + return new Control_Alternative.Alternative(function () { + return applicativeParCont(dictMonadEffect); + }, function () { + return plusParCont(dictMonadEffect); + }); +}; + +module.exports = { + parallel: parallel, + sequential: sequential, + Parallel: Parallel, + ParCont: ParCont, + monadParExceptT: monadParExceptT, + monadParReaderT: monadParReaderT, + monadParWriterT: monadParWriterT, + monadParMaybeT: monadParMaybeT, + newtypeParCont: newtypeParCont, + functorParCont: functorParCont, + applyParCont: applyParCont, + applicativeParCont: applicativeParCont, + altParCont: altParCont, + plusParCont: plusParCont, + alternativeParCont: alternativeParCont, + monadParParCont: monadParParCont +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad.Cont.Trans/index.js":"XW2d","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Monad.Maybe.Trans/index.js":"UUIS","../Control.Monad.Reader.Trans/index.js":"uvht","../Control.Monad.Writer.Trans/index.js":"VAds","../Control.Plus/index.js":"oMBg","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Functor.Compose/index.js":"z8br","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.Unit/index.js":"NhVk","../Effect.Class/index.js":"dWtH","../Effect.Ref/index.js":"/Jaj"}],"LNK1":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Parallel_Class = require("../Control.Parallel.Class/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var parTraverse_ = function parTraverse_(dictParallel) { + return function (dictFoldable) { + return function (f) { + var $17 = Control_Parallel_Class.sequential(dictParallel); + var $18 = Data_Foldable.traverse_(dictParallel.Applicative1())(dictFoldable)(function () { + var $20 = Control_Parallel_Class.parallel(dictParallel); + return function ($21) { + return $20(f($21)); + }; + }()); + return function ($19) { + return $17($18($19)); + }; + }; + }; +}; + +var parTraverse = function parTraverse(dictParallel) { + return function (dictTraversable) { + return function (f) { + var $22 = Control_Parallel_Class.sequential(dictParallel); + var $23 = Data_Traversable.traverse(dictTraversable)(dictParallel.Applicative1())(function () { + var $25 = Control_Parallel_Class.parallel(dictParallel); + return function ($26) { + return $25(f($26)); + }; + }()); + return function ($24) { + return $22($23($24)); + }; + }; + }; +}; + +var parSequence_ = function parSequence_(dictParallel) { + return function (dictFoldable) { + return parTraverse_(dictParallel)(dictFoldable)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var parSequence = function parSequence(dictParallel) { + return function (dictTraversable) { + return parTraverse(dictParallel)(dictTraversable)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var parOneOfMap = function parOneOfMap(dictParallel) { + return function (dictAlternative) { + return function (dictFoldable) { + return function (dictFunctor) { + return function (f) { + var $27 = Control_Parallel_Class.sequential(dictParallel); + var $28 = Data_Foldable.oneOfMap(dictFoldable)(dictAlternative.Plus1())(function () { + var $30 = Control_Parallel_Class.parallel(dictParallel); + return function ($31) { + return $30(f($31)); + }; + }()); + return function ($29) { + return $27($28($29)); + }; + }; + }; + }; + }; +}; + +var parOneOf = function parOneOf(dictParallel) { + return function (dictAlternative) { + return function (dictFoldable) { + return function (dictFunctor) { + var $32 = Control_Parallel_Class.sequential(dictParallel); + var $33 = Data_Foldable.oneOfMap(dictFoldable)(dictAlternative.Plus1())(Control_Parallel_Class.parallel(dictParallel)); + return function ($34) { + return $32($33($34)); + }; + }; + }; + }; +}; + +var parApply = function parApply(dictParallel) { + return function (mf) { + return function (ma) { + return Control_Parallel_Class.sequential(dictParallel)(Control_Apply.apply(dictParallel.Applicative1().Apply0())(Control_Parallel_Class.parallel(dictParallel)(mf))(Control_Parallel_Class.parallel(dictParallel)(ma))); + }; + }; +}; + +module.exports = { + parApply: parApply, + parTraverse: parTraverse, + parTraverse_: parTraverse_, + parSequence: parSequence, + parSequence_: parSequence_, + parOneOf: parOneOf, + parOneOfMap: parOneOfMap +}; +},{"../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Control.Parallel.Class/index.js":"NR5l","../Data.Foldable/index.js":"eVDl","../Data.Traversable/index.js":"n7EE"}],"pd0V":[function(require,module,exports) { +"use strict"; + +exports.unsafePerformEffect = function (f) { + return f(); +}; +},{}],"tPW2":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +module.exports = { + unsafePerformEffect: $foreign.unsafePerformEffect +}; +},{"./foreign.js":"pd0V"}],"I7lu":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Lazy = require("../Control.Lazy/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Control_Parallel = require("../Control.Parallel/index.js"); + +var Control_Parallel_Class = require("../Control.Parallel.Class/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Effect = require("../Effect/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var Effect_Exception = require("../Effect.Exception/index.js"); + +var Effect_Unsafe = require("../Effect.Unsafe/index.js"); + +var Partial_Unsafe = require("../Partial.Unsafe/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var Fiber = function Fiber(x) { + return x; +}; + +var FFIUtil = function FFIUtil(x) { + return x; +}; + +var Canceler = function Canceler(x) { + return x; +}; + +var suspendAff = $foreign["_fork"](false); +var newtypeCanceler = new Data_Newtype.Newtype(function (n) { + return n; +}, Canceler); +var functorParAff = new Data_Functor.Functor($foreign["_parAffMap"]); +var functorAff = new Data_Functor.Functor($foreign["_map"]); +var forkAff = $foreign["_fork"](true); + +var ffiUtil = function () { + var unsafeFromRight = function unsafeFromRight(v) { + if (v instanceof Data_Either.Right) { + return v.value0; + } + + ; + + if (v instanceof Data_Either.Left) { + return Partial_Unsafe.unsafeCrashWith("unsafeFromRight: Left"); + } + + ; + throw new Error("Failed pattern match at Effect.Aff (line 400, column 21 - line 402, column 54): " + [v.constructor.name]); + }; + + var unsafeFromLeft = function unsafeFromLeft(v) { + if (v instanceof Data_Either.Left) { + return v.value0; + } + + ; + + if (v instanceof Data_Either.Right) { + return Partial_Unsafe.unsafeCrashWith("unsafeFromLeft: Right"); + } + + ; + throw new Error("Failed pattern match at Effect.Aff (line 395, column 20 - line 397, column 54): " + [v.constructor.name]); + }; + + var isLeft = function isLeft(v) { + if (v instanceof Data_Either.Left) { + return true; + } + + ; + + if (v instanceof Data_Either.Right) { + return false; + } + + ; + throw new Error("Failed pattern match at Effect.Aff (line 390, column 12 - line 392, column 20): " + [v.constructor.name]); + }; + + return { + isLeft: isLeft, + fromLeft: unsafeFromLeft, + fromRight: unsafeFromRight, + left: Data_Either.Left.create, + right: Data_Either.Right.create + }; +}(); + +var makeFiber = function makeFiber(aff) { + return $foreign["_makeFiber"](ffiUtil, aff); +}; + +var launchAff = function launchAff(aff) { + return function __do() { + var v = makeFiber(aff)(); + v.run(); + return v; + }; +}; + +var launchAff_ = function () { + var $49 = Data_Functor["void"](Effect.functorEffect); + return function ($50) { + return $49(launchAff($50)); + }; +}(); + +var launchSuspendedAff = makeFiber; + +var delay = function delay(v) { + return $foreign["_delay"](Data_Either.Right.create, v); +}; + +var bracket = function bracket(acquire) { + return function (completed) { + return $foreign.generalBracket(acquire)({ + killed: Data_Function["const"](completed), + failed: Data_Function["const"](completed), + completed: Data_Function["const"](completed) + }); + }; +}; + +var applyParAff = new Control_Apply.Apply(function () { + return functorParAff; +}, $foreign["_parAffApply"]); + +var semigroupParAff = function semigroupParAff(dictSemigroup) { + return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyParAff)(Data_Semigroup.append(dictSemigroup))); +}; + +var monadAff = new Control_Monad.Monad(function () { + return applicativeAff; +}, function () { + return bindAff; +}); +var bindAff = new Control_Bind.Bind(function () { + return applyAff; +}, $foreign["_bind"]); +var applyAff = new Control_Apply.Apply(function () { + return functorAff; +}, Control_Monad.ap(monadAff)); +var applicativeAff = new Control_Applicative.Applicative(function () { + return applyAff; +}, $foreign["_pure"]); + +var cancelWith = function cancelWith(aff) { + return function (v) { + return $foreign.generalBracket(Control_Applicative.pure(applicativeAff)(Data_Unit.unit))({ + killed: function killed(e) { + return function (v1) { + return v(e); + }; + }, + failed: Data_Function["const"](Control_Applicative.pure(applicativeAff)), + completed: Data_Function["const"](Control_Applicative.pure(applicativeAff)) + })(Data_Function["const"](aff)); + }; +}; + +var $$finally = function $$finally(fin) { + return function (a) { + return bracket(Control_Applicative.pure(applicativeAff)(Data_Unit.unit))(Data_Function["const"](fin))(Data_Function["const"](a)); + }; +}; + +var invincible = function invincible(a) { + return bracket(a)(Data_Function["const"](Control_Applicative.pure(applicativeAff)(Data_Unit.unit)))(Control_Applicative.pure(applicativeAff)); +}; + +var lazyAff = new Control_Lazy.Lazy(function (f) { + return Control_Bind.bind(bindAff)(Control_Applicative.pure(applicativeAff)(Data_Unit.unit))(f); +}); + +var semigroupAff = function semigroupAff(dictSemigroup) { + return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyAff)(Data_Semigroup.append(dictSemigroup))); +}; + +var monadEffectAff = new Effect_Class.MonadEffect(function () { + return monadAff; +}, $foreign["_liftEffect"]); + +var effectCanceler = function () { + var $51 = Effect_Class.liftEffect(monadEffectAff); + return function ($52) { + return Canceler(Data_Function["const"]($51($52))); + }; +}(); + +var joinFiber = function joinFiber(v) { + return $foreign.makeAff(function (k) { + return Data_Functor.map(Effect.functorEffect)(effectCanceler)(v.join(k)); + }); +}; + +var functorFiber = new Data_Functor.Functor(function (f) { + return function (t) { + return Effect_Unsafe.unsafePerformEffect(makeFiber(Data_Functor.map(functorAff)(f)(joinFiber(t)))); + }; +}); +var applyFiber = new Control_Apply.Apply(function () { + return functorFiber; +}, function (t1) { + return function (t2) { + return Effect_Unsafe.unsafePerformEffect(makeFiber(Control_Apply.apply(applyAff)(joinFiber(t1))(joinFiber(t2)))); + }; +}); +var applicativeFiber = new Control_Applicative.Applicative(function () { + return applyFiber; +}, function (a) { + return Effect_Unsafe.unsafePerformEffect(makeFiber(Control_Applicative.pure(applicativeAff)(a))); +}); + +var killFiber = function killFiber(e) { + return function (v) { + return Control_Bind.bind(bindAff)(Effect_Class.liftEffect(monadEffectAff)(v.isSuspended))(function (v1) { + if (v1) { + return Effect_Class.liftEffect(monadEffectAff)(Data_Functor["void"](Effect.functorEffect)(v.kill(e, Data_Function["const"](Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit))))); + } + + ; + return $foreign.makeAff(function (k) { + return Data_Functor.map(Effect.functorEffect)(effectCanceler)(v.kill(e, k)); + }); + }); + }; +}; + +var fiberCanceler = function () { + var $53 = Data_Function.flip(killFiber); + return function ($54) { + return Canceler($53($54)); + }; +}(); + +var monadThrowAff = new Control_Monad_Error_Class.MonadThrow(function () { + return monadAff; +}, $foreign["_throwError"]); +var monadErrorAff = new Control_Monad_Error_Class.MonadError(function () { + return monadThrowAff; +}, $foreign["_catchError"]); +var attempt = Control_Monad_Error_Class["try"](monadErrorAff); + +var runAff = function runAff(k) { + return function (aff) { + return launchAff(Control_Bind.bindFlipped(bindAff)(function () { + var $55 = Effect_Class.liftEffect(monadEffectAff); + return function ($56) { + return $55(k($56)); + }; + }())(Control_Monad_Error_Class["try"](monadErrorAff)(aff))); + }; +}; + +var runAff_ = function runAff_(k) { + return function (aff) { + return Data_Functor["void"](Effect.functorEffect)(runAff(k)(aff)); + }; +}; + +var runSuspendedAff = function runSuspendedAff(k) { + return function (aff) { + return launchSuspendedAff(Control_Bind.bindFlipped(bindAff)(function () { + var $57 = Effect_Class.liftEffect(monadEffectAff); + return function ($58) { + return $57(k($58)); + }; + }())(Control_Monad_Error_Class["try"](monadErrorAff)(aff))); + }; +}; + +var parallelAff = new Control_Parallel_Class.Parallel(function () { + return applicativeParAff; +}, function () { + return monadAff; +}, Unsafe_Coerce.unsafeCoerce, $foreign["_sequential"]); +var applicativeParAff = new Control_Applicative.Applicative(function () { + return applyParAff; +}, function () { + var $59 = Control_Parallel_Class.parallel(parallelAff); + var $60 = Control_Applicative.pure(applicativeAff); + return function ($61) { + return $59($60($61)); + }; +}()); + +var monoidParAff = function monoidParAff(dictMonoid) { + return new Data_Monoid.Monoid(function () { + return semigroupParAff(dictMonoid.Semigroup0()); + }, Control_Applicative.pure(applicativeParAff)(Data_Monoid.mempty(dictMonoid))); +}; + +var semigroupCanceler = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return function (err) { + return Control_Parallel.parSequence_(parallelAff)(Data_Foldable.foldableArray)([v(err), v1(err)]); + }; + }; +}); + +var supervise = function supervise(aff) { + var killError = Effect_Exception.error("[Aff] Child fiber outlived parent"); + + var killAll = function killAll(err) { + return function (sup) { + return $foreign.makeAff(function (k) { + return $foreign["_killAll"](err, sup.supervisor, k(Control_Applicative.pure(Data_Either.applicativeEither)(Data_Unit.unit))); + }); + }; + }; + + var acquire = function __do() { + var v = $foreign["_makeSupervisedFiber"](ffiUtil, aff)(); + v.fiber.run(); + return v; + }; + + return $foreign.generalBracket(Effect_Class.liftEffect(monadEffectAff)(acquire))({ + killed: function killed(err) { + return function (sup) { + return Control_Parallel.parSequence_(parallelAff)(Data_Foldable.foldableArray)([killFiber(err)(sup.fiber), killAll(err)(sup)]); + }; + }, + failed: Data_Function["const"](killAll(killError)), + completed: Data_Function["const"](killAll(killError)) + })(function ($62) { + return joinFiber(function (v) { + return v.fiber; + }($62)); + }); +}; + +var monadRecAff = new Control_Monad_Rec_Class.MonadRec(function () { + return monadAff; +}, function (k) { + var go = function go(a) { + return Control_Bind.bind(bindAff)(k(a))(function (v) { + if (v instanceof Control_Monad_Rec_Class.Done) { + return Control_Applicative.pure(applicativeAff)(v.value0); + } + + ; + + if (v instanceof Control_Monad_Rec_Class.Loop) { + return go(v.value0); + } + + ; + throw new Error("Failed pattern match at Effect.Aff (line 100, column 7 - line 102, column 22): " + [v.constructor.name]); + }); + }; + + return go; +}); + +var monoidAff = function monoidAff(dictMonoid) { + return new Data_Monoid.Monoid(function () { + return semigroupAff(dictMonoid.Semigroup0()); + }, Control_Applicative.pure(applicativeAff)(Data_Monoid.mempty(dictMonoid))); +}; + +var nonCanceler = Data_Function["const"](Control_Applicative.pure(applicativeAff)(Data_Unit.unit)); +var monoidCanceler = new Data_Monoid.Monoid(function () { + return semigroupCanceler; +}, nonCanceler); +var never = $foreign.makeAff(function (v) { + return Control_Applicative.pure(Effect.applicativeEffect)(Data_Monoid.mempty(monoidCanceler)); +}); + +var apathize = function () { + var $63 = Data_Functor.map(functorAff)(Data_Function["const"](Data_Unit.unit)); + return function ($64) { + return $63(attempt($64)); + }; +}(); + +var altParAff = new Control_Alt.Alt(function () { + return functorParAff; +}, $foreign["_parAffAlt"]); +var altAff = new Control_Alt.Alt(function () { + return functorAff; +}, function (a1) { + return function (a2) { + return Control_Monad_Error_Class.catchError(monadErrorAff)(a1)(Data_Function["const"](a2)); + }; +}); +var plusAff = new Control_Plus.Plus(function () { + return altAff; +}, Control_Monad_Error_Class.throwError(monadThrowAff)(Effect_Exception.error("Always fails"))); +var plusParAff = new Control_Plus.Plus(function () { + return altParAff; +}, Control_Parallel_Class.parallel(parallelAff)(Control_Plus.empty(plusAff))); +var alternativeParAff = new Control_Alternative.Alternative(function () { + return applicativeParAff; +}, function () { + return plusParAff; +}); +module.exports = { + Canceler: Canceler, + launchAff: launchAff, + launchAff_: launchAff_, + launchSuspendedAff: launchSuspendedAff, + runAff: runAff, + runAff_: runAff_, + runSuspendedAff: runSuspendedAff, + forkAff: forkAff, + suspendAff: suspendAff, + supervise: supervise, + attempt: attempt, + apathize: apathize, + delay: delay, + never: never, + "finally": $$finally, + invincible: invincible, + killFiber: killFiber, + joinFiber: joinFiber, + cancelWith: cancelWith, + bracket: bracket, + nonCanceler: nonCanceler, + effectCanceler: effectCanceler, + fiberCanceler: fiberCanceler, + functorAff: functorAff, + applyAff: applyAff, + applicativeAff: applicativeAff, + bindAff: bindAff, + monadAff: monadAff, + semigroupAff: semigroupAff, + monoidAff: monoidAff, + altAff: altAff, + plusAff: plusAff, + monadRecAff: monadRecAff, + monadThrowAff: monadThrowAff, + monadErrorAff: monadErrorAff, + monadEffectAff: monadEffectAff, + lazyAff: lazyAff, + functorParAff: functorParAff, + applyParAff: applyParAff, + applicativeParAff: applicativeParAff, + semigroupParAff: semigroupParAff, + monoidParAff: monoidParAff, + altParAff: altParAff, + plusParAff: plusParAff, + alternativeParAff: alternativeParAff, + parallelAff: parallelAff, + functorFiber: functorFiber, + applyFiber: applyFiber, + applicativeFiber: applicativeFiber, + newtypeCanceler: newtypeCanceler, + semigroupCanceler: semigroupCanceler, + monoidCanceler: monoidCanceler, + makeAff: $foreign.makeAff, + generalBracket: $foreign.generalBracket +}; +},{"./foreign.js":"idq0","../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Lazy/index.js":"y9cE","../Control.Monad/index.js":"U/Ix","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Parallel/index.js":"LNK1","../Control.Parallel.Class/index.js":"NR5l","../Control.Plus/index.js":"oMBg","../Data.Either/index.js":"B2JL","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Unit/index.js":"NhVk","../Effect/index.js":"oTWB","../Effect.Class/index.js":"dWtH","../Effect.Exception/index.js":"0OCW","../Effect.Unsafe/index.js":"tPW2","../Partial.Unsafe/index.js":"aoR+","../Unsafe.Coerce/index.js":"ETUV"}],"89Lg":[function(require,module,exports) { +/* globals exports, setTimeout */ +"use strict"; + +var AVar = function () { + function MutableQueue() { + this.head = null; + this.last = null; + this.size = 0; + } + + function MutableCell(queue, value) { + this.queue = queue; + this.value = value; + this.next = null; + this.prev = null; + } + + function AVar(value) { + this.draining = false; + this.error = null; + this.value = value; + this.takes = new MutableQueue(); + this.reads = new MutableQueue(); + this.puts = new MutableQueue(); + } + + var EMPTY = {}; + + function runEff(eff) { + try { + eff(); + } catch (error) { + setTimeout(function () { + throw error; + }, 0); + } + } + + function putLast(queue, value) { + var cell = new MutableCell(queue, value); + + switch (queue.size) { + case 0: + queue.head = cell; + break; + + case 1: + cell.prev = queue.head; + queue.head.next = cell; + queue.last = cell; + break; + + default: + cell.prev = queue.last; + queue.last.next = cell; + queue.last = cell; + } + + queue.size++; + return cell; + } + + function takeLast(queue) { + var cell; + + switch (queue.size) { + case 0: + return null; + + case 1: + cell = queue.head; + queue.head = null; + break; + + case 2: + cell = queue.last; + queue.head.next = null; + queue.last = null; + break; + + default: + cell = queue.last; + queue.last = cell.prev; + queue.last.next = null; + } + + cell.prev = null; + cell.queue = null; + queue.size--; + return cell.value; + } + + function takeHead(queue) { + var cell; + + switch (queue.size) { + case 0: + return null; + + case 1: + cell = queue.head; + queue.head = null; + break; + + case 2: + cell = queue.head; + queue.last.prev = null; + queue.head = queue.last; + queue.last = null; + break; + + default: + cell = queue.head; + queue.head = cell.next; + queue.head.prev = null; + } + + cell.next = null; + cell.queue = null; + queue.size--; + return cell.value; + } + + function deleteCell(cell) { + if (cell.queue === null) { + return; + } + + if (cell.queue.last === cell) { + takeLast(cell.queue); + return; + } + + if (cell.queue.head === cell) { + takeHead(cell.queue); + return; + } + + if (cell.prev) { + cell.prev.next = cell.next; + } + + if (cell.next) { + cell.next.prev = cell.prev; + } + + cell.queue.size--; + cell.queue = null; + cell.value = null; + cell.next = null; + cell.prev = null; + } + + function drainVar(util, avar) { + if (avar.draining) { + return; + } + + var ps = avar.puts; + var ts = avar.takes; + var rs = avar.reads; + var p, r, t, value, rsize; + avar.draining = true; + + while (1) { + // eslint-disable-line no-constant-condition + p = null; + r = null; + t = null; + value = avar.value; + rsize = rs.size; + + if (avar.error !== null) { + value = util.left(avar.error); + + while (p = takeHead(ps)) { + // eslint-disable-line no-cond-assign + runEff(p.cb(value)); + } + + while (r = takeHead(rs)) { + // eslint-disable-line no-cond-assign + runEff(r(value)); + } + + while (t = takeHead(ts)) { + // eslint-disable-line no-cond-assign + runEff(t(value)); + } + + break; + } // Process the next put. We do not immediately invoke the callback + // because we want to preserve ordering. If there are takes/reads + // we want to run those first. + + + if (value === EMPTY && (p = takeHead(ps))) { + avar.value = value = p.value; + } + + if (value !== EMPTY) { + // We go ahead and queue up the next take for the same reasons as + // above. Invoking the read callbacks can affect the mutable queue. + t = takeHead(ts); // We only want to process the reads queued up before running these + // callbacks so we guard on rsize. + + while (rsize-- && (r = takeHead(rs))) { + runEff(r(util.right(value))); + } + + if (t !== null) { + avar.value = EMPTY; + runEff(t(util.right(value))); + } + } + + if (p !== null) { + runEff(p.cb(util.right(void 0))); + } // Callbacks could have queued up more items so we need to guard on the + // actual mutable properties. + + + if (avar.value === EMPTY && ps.size === 0 || avar.value !== EMPTY && ts.size === 0) { + break; + } + } + + avar.draining = false; + } + + AVar.EMPTY = EMPTY; + AVar.putLast = putLast; + AVar.takeLast = takeLast; + AVar.takeHead = takeHead; + AVar.deleteCell = deleteCell; + AVar.drainVar = drainVar; + return AVar; +}(); + +exports.empty = function () { + return new AVar(AVar.EMPTY); +}; + +exports._newVar = function (value) { + return function () { + return new AVar(value); + }; +}; + +exports._killVar = function (util, error, avar) { + return function () { + if (avar.error === null) { + avar.error = error; + avar.value = AVar.EMPTY; + AVar.drainVar(util, avar); + } + }; +}; + +exports._putVar = function (util, value, avar, cb) { + return function () { + var cell = AVar.putLast(avar.puts, { + cb: cb, + value: value + }); + AVar.drainVar(util, avar); + return function () { + AVar.deleteCell(cell); + }; + }; +}; + +exports._takeVar = function (util, avar, cb) { + return function () { + var cell = AVar.putLast(avar.takes, cb); + AVar.drainVar(util, avar); + return function () { + AVar.deleteCell(cell); + }; + }; +}; + +exports._readVar = function (util, avar, cb) { + return function () { + var cell = AVar.putLast(avar.reads, cb); + AVar.drainVar(util, avar); + return function () { + AVar.deleteCell(cell); + }; + }; +}; + +exports._tryPutVar = function (util, value, avar) { + return function () { + if (avar.value === AVar.EMPTY && avar.error === null) { + avar.value = value; + AVar.drainVar(util, avar); + return true; + } else { + return false; + } + }; +}; + +exports._tryTakeVar = function (util, avar) { + return function () { + var value = avar.value; + + if (value === AVar.EMPTY) { + return util.nothing; + } else { + avar.value = AVar.EMPTY; + AVar.drainVar(util, avar); + return util.just(value); + } + }; +}; + +exports._tryReadVar = function (util, avar) { + return function () { + if (avar.value === AVar.EMPTY) { + return util.nothing; + } else { + return util.just(avar.value); + } + }; +}; + +exports._status = function (util, avar) { + return function () { + if (avar.error) { + return util.killed(avar.error); + } + + if (avar.value === AVar.EMPTY) { + return util.empty; + } + + return util.filled(avar.value); + }; +}; +},{}],"XiHq":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Killed = function () { + function Killed(value0) { + this.value0 = value0; + } + + ; + + Killed.create = function (value0) { + return new Killed(value0); + }; + + return Killed; +}(); + +var Filled = function () { + function Filled(value0) { + this.value0 = value0; + } + + ; + + Filled.create = function (value0) { + return new Filled(value0); + }; + + return Filled; +}(); + +var Empty = function () { + function Empty() {} + + ; + Empty.value = new Empty(); + return Empty; +}(); + +var $$new = $foreign["_newVar"]; + +var isKilled = function isKilled(v) { + if (v instanceof Killed) { + return true; + } + + ; + return false; +}; + +var isFilled = function isFilled(v) { + if (v instanceof Filled) { + return true; + } + + ; + return false; +}; + +var isEmpty = function isEmpty(v) { + if (v instanceof Empty) { + return true; + } + + ; + return false; +}; + +var ffiUtil = { + left: Data_Either.Left.create, + right: Data_Either.Right.create, + nothing: Data_Maybe.Nothing.value, + just: Data_Maybe.Just.create, + killed: Killed.create, + filled: Filled.create, + empty: Empty.value +}; + +var kill = function kill(err) { + return function (avar) { + return $foreign["_killVar"](ffiUtil, err, avar); + }; +}; + +var put = function put(value) { + return function (avar) { + return function (cb) { + return $foreign["_putVar"](ffiUtil, value, avar, cb); + }; + }; +}; + +var read = function read(avar) { + return function (cb) { + return $foreign["_readVar"](ffiUtil, avar, cb); + }; +}; + +var status = function status(avar) { + return $foreign["_status"](ffiUtil, avar); +}; + +var take = function take(avar) { + return function (cb) { + return $foreign["_takeVar"](ffiUtil, avar, cb); + }; +}; + +var tryPut = function tryPut(value) { + return function (avar) { + return $foreign["_tryPutVar"](ffiUtil, value, avar); + }; +}; + +var tryRead = function tryRead(avar) { + return $foreign["_tryReadVar"](ffiUtil, avar); +}; + +var tryTake = function tryTake(avar) { + return $foreign["_tryTakeVar"](ffiUtil, avar); +}; + +module.exports = { + Killed: Killed, + Filled: Filled, + Empty: Empty, + "new": $$new, + take: take, + tryTake: tryTake, + put: put, + tryPut: tryPut, + read: read, + tryRead: tryRead, + kill: kill, + status: status, + isEmpty: isEmpty, + isFilled: isFilled, + isKilled: isKilled, + empty: $foreign.empty +}; +},{"./foreign.js":"89Lg","../Data.Either/index.js":"B2JL","../Data.Maybe/index.js":"5mN7"}],"hACG":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Effect_AVar = require("../Effect.AVar/index.js"); + +var Effect_Aff = require("../Effect.Aff/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var tryTake = function () { + var $6 = Effect_Class.liftEffect(Effect_Aff.monadEffectAff); + return function ($7) { + return $6(Effect_AVar.tryTake($7)); + }; +}(); + +var tryRead = function () { + var $8 = Effect_Class.liftEffect(Effect_Aff.monadEffectAff); + return function ($9) { + return $8(Effect_AVar.tryRead($9)); + }; +}(); + +var tryPut = function tryPut(value) { + var $10 = Effect_Class.liftEffect(Effect_Aff.monadEffectAff); + var $11 = Effect_AVar.tryPut(value); + return function ($12) { + return $10($11($12)); + }; +}; + +var take = function take(avar) { + return Effect_Aff.makeAff(function (k) { + return function __do() { + var v = Effect_AVar.take(avar)(k)(); + return Effect_Aff.effectCanceler(v); + }; + }); +}; + +var status = function () { + var $13 = Effect_Class.liftEffect(Effect_Aff.monadEffectAff); + return function ($14) { + return $13(Effect_AVar.status($14)); + }; +}(); + +var read = function read(avar) { + return Effect_Aff.makeAff(function (k) { + return function __do() { + var v = Effect_AVar.read(avar)(k)(); + return Effect_Aff.effectCanceler(v); + }; + }); +}; + +var put = function put(value) { + return function (avar) { + return Effect_Aff.makeAff(function (k) { + return function __do() { + var v = Effect_AVar.put(value)(avar)(k)(); + return Effect_Aff.effectCanceler(v); + }; + }); + }; +}; + +var $$new = function () { + var $15 = Effect_Class.liftEffect(Effect_Aff.monadEffectAff); + return function ($16) { + return $15(Effect_AVar["new"]($16)); + }; +}(); + +var kill = function kill(error) { + var $17 = Effect_Class.liftEffect(Effect_Aff.monadEffectAff); + var $18 = Effect_AVar.kill(error); + return function ($19) { + return $17($18($19)); + }; +}; + +var empty = Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Effect_AVar.empty); +module.exports = { + "new": $$new, + empty: empty, + status: status, + take: take, + tryTake: tryTake, + put: put, + tryPut: tryPut, + read: read, + tryRead: tryRead, + kill: kill +}; +},{"../Effect.AVar/index.js":"XiHq","../Effect.Aff/index.js":"I7lu","../Effect.Class/index.js":"dWtH"}],"ty16":[function(require,module,exports) { +"use strict"; + +exports.log = function (s) { + return function () { + console.log(s); + return {}; + }; +}; + +exports.warn = function (s) { + return function () { + console.warn(s); + return {}; + }; +}; + +exports.error = function (s) { + return function () { + console.error(s); + return {}; + }; +}; + +exports.info = function (s) { + return function () { + console.info(s); + return {}; + }; +}; + +exports.time = function (s) { + return function () { + console.time(s); + return {}; + }; +}; + +exports.timeEnd = function (s) { + return function () { + console.timeEnd(s); + return {}; + }; +}; +},{}],"+3bp":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var warnShow = function warnShow(dictShow) { + return function (a) { + return $foreign.warn(Data_Show.show(dictShow)(a)); + }; +}; + +var logShow = function logShow(dictShow) { + return function (a) { + return $foreign.log(Data_Show.show(dictShow)(a)); + }; +}; + +var infoShow = function infoShow(dictShow) { + return function (a) { + return $foreign.info(Data_Show.show(dictShow)(a)); + }; +}; + +var errorShow = function errorShow(dictShow) { + return function (a) { + return $foreign.error(Data_Show.show(dictShow)(a)); + }; +}; + +module.exports = { + logShow: logShow, + warnShow: warnShow, + errorShow: errorShow, + infoShow: infoShow, + log: $foreign.log, + warn: $foreign.warn, + error: $foreign.error, + info: $foreign.info, + time: $foreign.time, + timeEnd: $foreign.timeEnd +}; +},{"./foreign.js":"ty16","../Data.Show/index.js":"mFY7"}],"3Dts":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Effect_Class = require("../Effect.Class/index.js"); + +var Effect_Console = require("../Effect.Console/index.js"); + +var warnShow = function warnShow(dictMonadEffect) { + return function (dictShow) { + var $14 = Effect_Class.liftEffect(dictMonadEffect); + var $15 = Effect_Console.warnShow(dictShow); + return function ($16) { + return $14($15($16)); + }; + }; +}; + +var warn = function warn(dictMonadEffect) { + var $17 = Effect_Class.liftEffect(dictMonadEffect); + return function ($18) { + return $17(Effect_Console.warn($18)); + }; +}; + +var timeEnd = function timeEnd(dictMonadEffect) { + var $19 = Effect_Class.liftEffect(dictMonadEffect); + return function ($20) { + return $19(Effect_Console.timeEnd($20)); + }; +}; + +var time = function time(dictMonadEffect) { + var $21 = Effect_Class.liftEffect(dictMonadEffect); + return function ($22) { + return $21(Effect_Console.time($22)); + }; +}; + +var logShow = function logShow(dictMonadEffect) { + return function (dictShow) { + var $23 = Effect_Class.liftEffect(dictMonadEffect); + var $24 = Effect_Console.logShow(dictShow); + return function ($25) { + return $23($24($25)); + }; + }; +}; + +var log = function log(dictMonadEffect) { + var $26 = Effect_Class.liftEffect(dictMonadEffect); + return function ($27) { + return $26(Effect_Console.log($27)); + }; +}; + +var infoShow = function infoShow(dictMonadEffect) { + return function (dictShow) { + var $28 = Effect_Class.liftEffect(dictMonadEffect); + var $29 = Effect_Console.infoShow(dictShow); + return function ($30) { + return $28($29($30)); + }; + }; +}; + +var info = function info(dictMonadEffect) { + var $31 = Effect_Class.liftEffect(dictMonadEffect); + return function ($32) { + return $31(Effect_Console.info($32)); + }; +}; + +var errorShow = function errorShow(dictMonadEffect) { + return function (dictShow) { + var $33 = Effect_Class.liftEffect(dictMonadEffect); + var $34 = Effect_Console.errorShow(dictShow); + return function ($35) { + return $33($34($35)); + }; + }; +}; + +var error = function error(dictMonadEffect) { + var $36 = Effect_Class.liftEffect(dictMonadEffect); + return function ($37) { + return $36(Effect_Console.error($37)); + }; +}; + +module.exports = { + log: log, + logShow: logShow, + warn: warn, + warnShow: warnShow, + error: error, + errorShow: errorShow, + info: info, + infoShow: infoShow, + time: time, + timeEnd: timeEnd +}; +},{"../Effect.Class/index.js":"dWtH","../Effect.Console/index.js":"+3bp"}],"kKQF":[function(require,module,exports) { +"use strict"; + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.unsafeToForeign = function (value) { + return value; +}; + +exports.unsafeFromForeign = function (value) { + return value; +}; + +exports.typeOf = function (value) { + return _typeof(value); +}; + +exports.tagOf = function (value) { + return Object.prototype.toString.call(value).slice(8, -1); +}; + +exports.isNull = function (value) { + return value === null; +}; + +exports.isUndefined = function (value) { + return value === undefined; +}; + +exports.isArray = Array.isArray || function (value) { + return Object.prototype.toString.call(value) === "[object Array]"; +}; +},{}],"XAY7":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_List = require("../Data.List/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_NonEmpty = require("../Data.NonEmpty/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Partial_Unsafe = require("../Partial.Unsafe/index.js"); + +var zipWith = function zipWith(f) { + return function (v) { + return function (v1) { + return new Data_NonEmpty.NonEmpty(f(v.value0)(v1.value0), Data_List.zipWith(f)(v.value1)(v1.value1)); + }; + }; +}; + +var zipWithA = function zipWithA(dictApplicative) { + return function (f) { + return function (xs) { + return function (ys) { + return Data_Semigroup_Traversable.sequence1(Data_List_Types.traversable1NonEmptyList)(dictApplicative.Apply0())(zipWith(f)(xs)(ys)); + }; + }; + }; +}; + +var zip = zipWith(Data_Tuple.Tuple.create); + +var wrappedOperation2 = function wrappedOperation2(name) { + return function (f) { + return function (v) { + return function (v1) { + var v2 = f(new Data_List_Types.Cons(v.value0, v.value1))(new Data_List_Types.Cons(v1.value0, v1.value1)); + + if (v2 instanceof Data_List_Types.Cons) { + return new Data_NonEmpty.NonEmpty(v2.value0, v2.value1); + } + + ; + + if (v2 instanceof Data_List_Types.Nil) { + return Partial_Unsafe.unsafeCrashWith("Impossible: empty list in NonEmptyList " + name); + } + + ; + throw new Error("Failed pattern match at Data.List.NonEmpty (line 104, column 3 - line 106, column 81): " + [v2.constructor.name]); + }; + }; + }; +}; + +var wrappedOperation = function wrappedOperation(name) { + return function (f) { + return function (v) { + var v1 = f(new Data_List_Types.Cons(v.value0, v.value1)); + + if (v1 instanceof Data_List_Types.Cons) { + return new Data_NonEmpty.NonEmpty(v1.value0, v1.value1); + } + + ; + + if (v1 instanceof Data_List_Types.Nil) { + return Partial_Unsafe.unsafeCrashWith("Impossible: empty list in NonEmptyList " + name); + } + + ; + throw new Error("Failed pattern match at Data.List.NonEmpty (line 91, column 3 - line 93, column 81): " + [v1.constructor.name]); + }; + }; +}; + +var updateAt = function updateAt(i) { + return function (a) { + return function (v) { + if (i === 0) { + return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(a, v.value1)); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function ($161) { + return Data_List_Types.NonEmptyList(function (v1) { + return new Data_NonEmpty.NonEmpty(v.value0, v1); + }($161)); + })(Data_List.updateAt(i - 1 | 0)(a)(v.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.NonEmpty (line 197, column 1 - line 197, column 75): " + [i.constructor.name, a.constructor.name, v.constructor.name]); + }; + }; +}; + +var unzip = function unzip(ts) { + return new Data_Tuple.Tuple(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Data_Tuple.fst)(ts), Data_Functor.map(Data_List_Types.functorNonEmptyList)(Data_Tuple.snd)(ts)); +}; + +var unsnoc = function unsnoc(v) { + var v1 = Data_List.unsnoc(v.value1); + + if (v1 instanceof Data_Maybe.Nothing) { + return { + init: Data_List_Types.Nil.value, + last: v.value0 + }; + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + return { + init: new Data_List_Types.Cons(v.value0, v1.value0.init), + last: v1.value0.last + }; + } + + ; + throw new Error("Failed pattern match at Data.List.NonEmpty (line 159, column 35 - line 161, column 50): " + [v1.constructor.name]); +}; + +var unionBy = function () { + var $162 = wrappedOperation2("unionBy"); + return function ($163) { + return $162(Data_List.unionBy($163)); + }; +}(); + +var union = function union(dictEq) { + return wrappedOperation2("union")(Data_List.union(dictEq)); +}; + +var uncons = function uncons(v) { + return { + head: v.value0, + tail: v.value1 + }; +}; + +var toList = function toList(v) { + return new Data_List_Types.Cons(v.value0, v.value1); +}; + +var toUnfoldable = function toUnfoldable(dictUnfoldable) { + var $164 = Data_Unfoldable.unfoldr(dictUnfoldable)(function (xs) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (rec) { + return new Data_Tuple.Tuple(rec.head, rec.tail); + })(Data_List.uncons(xs)); + }); + return function ($165) { + return $164(toList($165)); + }; +}; + +var tail = function tail(v) { + return v.value1; +}; + +var sortBy = function () { + var $166 = wrappedOperation("sortBy"); + return function ($167) { + return $166(Data_List.sortBy($167)); + }; +}(); + +var sort = function sort(dictOrd) { + return function (xs) { + return sortBy(Data_Ord.compare(dictOrd))(xs); + }; +}; + +var snoc = function snoc(v) { + return function (y) { + return new Data_NonEmpty.NonEmpty(v.value0, Data_List.snoc(v.value1)(y)); + }; +}; + +var singleton = function () { + var $168 = Data_NonEmpty.singleton(Data_List_Types.plusList); + return function ($169) { + return Data_List_Types.NonEmptyList($168($169)); + }; +}(); + +var snoc$prime = function snoc$prime(v) { + return function (y) { + if (v instanceof Data_List_Types.Cons) { + return new Data_NonEmpty.NonEmpty(v.value0, Data_List.snoc(v.value1)(y)); + } + + ; + + if (v instanceof Data_List_Types.Nil) { + return singleton(y); + } + + ; + throw new Error("Failed pattern match at Data.List.NonEmpty (line 139, column 1 - line 139, column 51): " + [v.constructor.name, y.constructor.name]); + }; +}; + +var reverse = wrappedOperation("reverse")(Data_List.reverse); + +var nubBy = function () { + var $170 = wrappedOperation("nubBy"); + return function ($171) { + return $170(Data_List.nubBy($171)); + }; +}(); + +var nub = function nub(dictEq) { + return wrappedOperation("nub")(Data_List.nub(dictEq)); +}; + +var modifyAt = function modifyAt(i) { + return function (f) { + return function (v) { + if (i === 0) { + return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(f(v.value0), v.value1)); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function ($172) { + return Data_List_Types.NonEmptyList(function (v1) { + return new Data_NonEmpty.NonEmpty(v.value0, v1); + }($172)); + })(Data_List.modifyAt(i - 1 | 0)(f)(v.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.NonEmpty (line 202, column 1 - line 202, column 82): " + [i.constructor.name, f.constructor.name, v.constructor.name]); + }; + }; +}; + +var mapWithIndex = Data_FunctorWithIndex.mapWithIndex(Data_List_Types.functorWithIndexNonEmptyList); + +var lift = function lift(f) { + return function (v) { + return f(new Data_List_Types.Cons(v.value0, v.value1)); + }; +}; + +var mapMaybe = function mapMaybe($173) { + return lift(Data_List.mapMaybe($173)); +}; + +var partition = function partition($174) { + return lift(Data_List.partition($174)); +}; + +var span = function span($175) { + return lift(Data_List.span($175)); +}; + +var take = function take($176) { + return lift(Data_List.take($176)); +}; + +var takeWhile = function takeWhile($177) { + return lift(Data_List.takeWhile($177)); +}; + +var length = function length(v) { + return 1 + Data_List.length(v.value1) | 0; +}; + +var last = function last(v) { + return Data_Maybe.fromMaybe(v.value0)(Data_List.last(v.value1)); +}; + +var intersectBy = function () { + var $178 = wrappedOperation2("intersectBy"); + return function ($179) { + return $178(Data_List.intersectBy($179)); + }; +}(); + +var intersect = function intersect(dictEq) { + return wrappedOperation2("intersect")(Data_List.intersect(dictEq)); +}; + +var insertAt = function insertAt(i) { + return function (a) { + return function (v) { + if (i === 0) { + return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(a, new Data_List_Types.Cons(v.value0, v.value1))); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function ($180) { + return Data_List_Types.NonEmptyList(function (v1) { + return new Data_NonEmpty.NonEmpty(v.value0, v1); + }($180)); + })(Data_List.insertAt(i - 1 | 0)(a)(v.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.NonEmpty (line 192, column 1 - line 192, column 75): " + [i.constructor.name, a.constructor.name, v.constructor.name]); + }; + }; +}; + +var init = function init(v) { + return Data_Maybe.maybe(Data_List_Types.Nil.value)(function (v1) { + return new Data_List_Types.Cons(v.value0, v1); + })(Data_List.init(v.value1)); +}; + +var index = function index(v) { + return function (i) { + if (i === 0) { + return new Data_Maybe.Just(v.value0); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_List.index(v.value1)(i - 1 | 0); + } + + ; + throw new Error("Failed pattern match at Data.List.NonEmpty (line 166, column 1 - line 166, column 52): " + [v.constructor.name, i.constructor.name]); + }; +}; + +var head = function head(v) { + return v.value0; +}; + +var groupBy = function () { + var $181 = wrappedOperation("groupBy"); + return function ($182) { + return $181(Data_List.groupBy($182)); + }; +}(); + +var group$prime = function group$prime(dictOrd) { + return wrappedOperation("group'")(Data_List["group'"](dictOrd)); +}; + +var group = function group(dictEq) { + return wrappedOperation("group")(Data_List.group(dictEq)); +}; + +var fromList = function fromList(v) { + if (v instanceof Data_List_Types.Nil) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Data_List_Types.Cons) { + return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(v.value0, v.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.NonEmpty (line 120, column 1 - line 120, column 57): " + [v.constructor.name]); +}; + +var fromFoldable = function fromFoldable(dictFoldable) { + var $183 = Data_List.fromFoldable(dictFoldable); + return function ($184) { + return fromList($183($184)); + }; +}; + +var foldM = function foldM(dictMonad) { + return function (f) { + return function (a) { + return function (v) { + return Control_Bind.bind(dictMonad.Bind1())(f(a)(v.value0))(function (a$prime) { + return Data_List.foldM(dictMonad)(f)(a$prime)(v.value1); + }); + }; + }; + }; +}; + +var findLastIndex = function findLastIndex(f) { + return function (v) { + var v1 = Data_List.findLastIndex(f)(v.value1); + + if (v1 instanceof Data_Maybe.Just) { + return new Data_Maybe.Just(v1.value0 + 1 | 0); + } + + ; + + if (v1 instanceof Data_Maybe.Nothing) { + if (f(v.value0)) { + return new Data_Maybe.Just(0); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Maybe.Nothing.value; + } + + ; + } + + ; + throw new Error("Failed pattern match at Data.List.NonEmpty (line 186, column 3 - line 190, column 29): " + [v1.constructor.name]); + }; +}; + +var findIndex = function findIndex(f) { + return function (v) { + if (f(v.value0)) { + return new Data_Maybe.Just(0); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) { + return v1 + 1 | 0; + })(Data_List.findIndex(f)(v.value1)); + } + + ; + throw new Error("Failed pattern match at Data.List.NonEmpty (line 179, column 1 - line 179, column 69): " + [f.constructor.name, v.constructor.name]); + }; +}; + +var filterM = function filterM(dictMonad) { + var $185 = Data_List.filterM(dictMonad); + return function ($186) { + return lift($185($186)); + }; +}; + +var filter = function filter($187) { + return lift(Data_List.filter($187)); +}; + +var elemLastIndex = function elemLastIndex(dictEq) { + return function (x) { + return findLastIndex(function (v) { + return Data_Eq.eq(dictEq)(v)(x); + }); + }; +}; + +var elemIndex = function elemIndex(dictEq) { + return function (x) { + return findIndex(function (v) { + return Data_Eq.eq(dictEq)(v)(x); + }); + }; +}; + +var dropWhile = function dropWhile($188) { + return lift(Data_List.dropWhile($188)); +}; + +var drop = function drop($189) { + return lift(Data_List.drop($189)); +}; + +var cons$prime = function cons$prime(x) { + return function (xs) { + return new Data_NonEmpty.NonEmpty(x, xs); + }; +}; + +var cons = function cons(y) { + return function (v) { + return new Data_NonEmpty.NonEmpty(y, new Data_List_Types.Cons(v.value0, v.value1)); + }; +}; + +var concatMap = Data_Function.flip(Control_Bind.bind(Data_List_Types.bindNonEmptyList)); + +var concat = function concat(v) { + return Control_Bind.bind(Data_List_Types.bindNonEmptyList)(v)(Control_Category.identity(Control_Category.categoryFn)); +}; + +var catMaybes = lift(Data_List.catMaybes); + +var appendFoldable = function appendFoldable(dictFoldable) { + return function (v) { + return function (ys) { + return new Data_NonEmpty.NonEmpty(v.value0, Data_Semigroup.append(Data_List_Types.semigroupList)(v.value1)(Data_List.fromFoldable(dictFoldable)(ys))); + }; + }; +}; + +module.exports = { + toUnfoldable: toUnfoldable, + fromFoldable: fromFoldable, + fromList: fromList, + toList: toList, + singleton: singleton, + length: length, + cons: cons, + "cons'": cons$prime, + snoc: snoc, + "snoc'": snoc$prime, + head: head, + last: last, + tail: tail, + init: init, + uncons: uncons, + unsnoc: unsnoc, + index: index, + elemIndex: elemIndex, + elemLastIndex: elemLastIndex, + findIndex: findIndex, + findLastIndex: findLastIndex, + insertAt: insertAt, + updateAt: updateAt, + modifyAt: modifyAt, + reverse: reverse, + concat: concat, + concatMap: concatMap, + filter: filter, + filterM: filterM, + mapMaybe: mapMaybe, + catMaybes: catMaybes, + appendFoldable: appendFoldable, + mapWithIndex: mapWithIndex, + sort: sort, + sortBy: sortBy, + take: take, + takeWhile: takeWhile, + drop: drop, + dropWhile: dropWhile, + span: span, + group: group, + "group'": group$prime, + groupBy: groupBy, + partition: partition, + nub: nub, + nubBy: nubBy, + union: union, + unionBy: unionBy, + intersect: intersect, + intersectBy: intersectBy, + zipWith: zipWith, + zipWithA: zipWithA, + zip: zip, + unzip: unzip, + foldM: foldM +}; +},{"../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Partial.Unsafe/index.js":"aoR+"}],"pu1p":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js"); + +var Control_Monad_Except = require("../Control.Monad.Except/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Data_List_NonEmpty = require("../Data.List.NonEmpty/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_String_CodeUnits = require("../Data.String.CodeUnits/index.js"); + +var ForeignError = function () { + function ForeignError(value0) { + this.value0 = value0; + } + + ; + + ForeignError.create = function (value0) { + return new ForeignError(value0); + }; + + return ForeignError; +}(); + +var TypeMismatch = function () { + function TypeMismatch(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + TypeMismatch.create = function (value0) { + return function (value1) { + return new TypeMismatch(value0, value1); + }; + }; + + return TypeMismatch; +}(); + +var ErrorAtIndex = function () { + function ErrorAtIndex(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + ErrorAtIndex.create = function (value0) { + return function (value1) { + return new ErrorAtIndex(value0, value1); + }; + }; + + return ErrorAtIndex; +}(); + +var ErrorAtProperty = function () { + function ErrorAtProperty(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + ErrorAtProperty.create = function (value0) { + return function (value1) { + return new ErrorAtProperty(value0, value1); + }; + }; + + return ErrorAtProperty; +}(); + +var showForeignError = new Data_Show.Show(function (v) { + if (v instanceof ForeignError) { + return "(ForeignError " + (Data_Show.show(Data_Show.showString)(v.value0) + ")"); + } + + ; + + if (v instanceof ErrorAtIndex) { + return "(ErrorAtIndex " + (Data_Show.show(Data_Show.showInt)(v.value0) + (" " + (Data_Show.show(showForeignError)(v.value1) + ")"))); + } + + ; + + if (v instanceof ErrorAtProperty) { + return "(ErrorAtProperty " + (Data_Show.show(Data_Show.showString)(v.value0) + (" " + (Data_Show.show(showForeignError)(v.value1) + ")"))); + } + + ; + + if (v instanceof TypeMismatch) { + return "(TypeMismatch " + (Data_Show.show(Data_Show.showString)(v.value0) + (" " + (Data_Show.show(Data_Show.showString)(v.value1) + ")"))); + } + + ; + throw new Error("Failed pattern match at Foreign (line 63, column 1 - line 67, column 89): " + [v.constructor.name]); +}); + +var renderForeignError = function renderForeignError(v) { + if (v instanceof ForeignError) { + return v.value0; + } + + ; + + if (v instanceof ErrorAtIndex) { + return "Error at array index " + (Data_Show.show(Data_Show.showInt)(v.value0) + (": " + renderForeignError(v.value1))); + } + + ; + + if (v instanceof ErrorAtProperty) { + return "Error at property " + (Data_Show.show(Data_Show.showString)(v.value0) + (": " + renderForeignError(v.value1))); + } + + ; + + if (v instanceof TypeMismatch) { + return "Type mismatch: expected " + (v.value0 + (", found " + v.value1)); + } + + ; + throw new Error("Failed pattern match at Foreign (line 72, column 1 - line 72, column 45): " + [v.constructor.name]); +}; + +var readUndefined = function readUndefined(value) { + if ($foreign.isUndefined(value)) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value); + } + + ; + + if (Data_Boolean.otherwise) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Maybe.Just(value)); + } + + ; + throw new Error("Failed pattern match at Foreign (line 157, column 1 - line 157, column 46): " + [value.constructor.name]); +}; + +var readNullOrUndefined = function readNullOrUndefined(value) { + if ($foreign.isNull(value) || $foreign.isUndefined(value)) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value); + } + + ; + + if (Data_Boolean.otherwise) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Maybe.Just(value)); + } + + ; + throw new Error("Failed pattern match at Foreign (line 162, column 1 - line 162, column 52): " + [value.constructor.name]); +}; + +var readNull = function readNull(value) { + if ($foreign.isNull(value)) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value); + } + + ; + + if (Data_Boolean.otherwise) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Maybe.Just(value)); + } + + ; + throw new Error("Failed pattern match at Foreign (line 152, column 1 - line 152, column 41): " + [value.constructor.name]); +}; + +var fail = function () { + var $107 = Control_Monad_Error_Class.throwError(Control_Monad_Except_Trans.monadThrowExceptT(Data_Identity.monadIdentity)); + return function ($108) { + return $107(Data_List_NonEmpty.singleton($108)); + }; +}(); + +var readArray = function readArray(value) { + if ($foreign.isArray(value)) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))($foreign.unsafeFromForeign(value)); + } + + ; + + if (Data_Boolean.otherwise) { + return fail(new TypeMismatch("array", $foreign.tagOf(value))); + } + + ; + throw new Error("Failed pattern match at Foreign (line 147, column 1 - line 147, column 42): " + [value.constructor.name]); +}; + +var unsafeReadTagged = function unsafeReadTagged(tag) { + return function (value) { + if ($foreign.tagOf(value) === tag) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))($foreign.unsafeFromForeign(value)); + } + + ; + + if (Data_Boolean.otherwise) { + return fail(new TypeMismatch(tag, $foreign.tagOf(value))); + } + + ; + throw new Error("Failed pattern match at Foreign (line 106, column 1 - line 106, column 55): " + [tag.constructor.name, value.constructor.name]); + }; +}; + +var readBoolean = unsafeReadTagged("Boolean"); +var readNumber = unsafeReadTagged("Number"); + +var readInt = function readInt(value) { + var error = Data_Either.Left.create(Data_List_NonEmpty.singleton(new TypeMismatch("Int", $foreign.tagOf(value)))); + + var fromNumber = function () { + var $109 = Data_Maybe.maybe(error)(Control_Applicative.pure(Data_Either.applicativeEither)); + return function ($110) { + return $109(Data_Int.fromNumber($110)); + }; + }(); + + return Control_Monad_Except.mapExcept(Data_Either.either(Data_Function["const"](error))(fromNumber))(readNumber(value)); +}; + +var readString = unsafeReadTagged("String"); + +var readChar = function readChar(value) { + var error = Data_Either.Left.create(Data_List_NonEmpty.singleton(new TypeMismatch("Char", $foreign.tagOf(value)))); + + var fromString = function () { + var $111 = Data_Maybe.maybe(error)(Control_Applicative.pure(Data_Either.applicativeEither)); + return function ($112) { + return $111(Data_String_CodeUnits.toChar($112)); + }; + }(); + + return Control_Monad_Except.mapExcept(Data_Either.either(Data_Function["const"](error))(fromString))(readString(value)); +}; + +var eqForeignError = new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof ForeignError && y instanceof ForeignError) { + return x.value0 === y.value0; + } + + ; + + if (x instanceof TypeMismatch && y instanceof TypeMismatch) { + return x.value0 === y.value0 && x.value1 === y.value1; + } + + ; + + if (x instanceof ErrorAtIndex && y instanceof ErrorAtIndex) { + return x.value0 === y.value0 && Data_Eq.eq(eqForeignError)(x.value1)(y.value1); + } + + ; + + if (x instanceof ErrorAtProperty && y instanceof ErrorAtProperty) { + return x.value0 === y.value0 && Data_Eq.eq(eqForeignError)(x.value1)(y.value1); + } + + ; + return false; + }; +}); +var ordForeignError = new Data_Ord.Ord(function () { + return eqForeignError; +}, function (x) { + return function (y) { + if (x instanceof ForeignError && y instanceof ForeignError) { + return Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0); + } + + ; + + if (x instanceof ForeignError) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof ForeignError) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof TypeMismatch && y instanceof TypeMismatch) { + var v = Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0); + + if (v instanceof Data_Ordering.LT) { + return Data_Ordering.LT.value; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Data_Ordering.GT.value; + } + + ; + return Data_Ord.compare(Data_Ord.ordString)(x.value1)(y.value1); + } + + ; + + if (x instanceof TypeMismatch) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof TypeMismatch) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof ErrorAtIndex && y instanceof ErrorAtIndex) { + var v = Data_Ord.compare(Data_Ord.ordInt)(x.value0)(y.value0); + + if (v instanceof Data_Ordering.LT) { + return Data_Ordering.LT.value; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Data_Ordering.GT.value; + } + + ; + return Data_Ord.compare(ordForeignError)(x.value1)(y.value1); + } + + ; + + if (x instanceof ErrorAtIndex) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof ErrorAtIndex) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof ErrorAtProperty && y instanceof ErrorAtProperty) { + var v = Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0); + + if (v instanceof Data_Ordering.LT) { + return Data_Ordering.LT.value; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Data_Ordering.GT.value; + } + + ; + return Data_Ord.compare(ordForeignError)(x.value1)(y.value1); + } + + ; + throw new Error("Failed pattern match at Foreign (line 61, column 1 - line 61, column 52): " + [x.constructor.name, y.constructor.name]); + }; +}); +module.exports = { + ForeignError: ForeignError, + TypeMismatch: TypeMismatch, + ErrorAtIndex: ErrorAtIndex, + ErrorAtProperty: ErrorAtProperty, + renderForeignError: renderForeignError, + unsafeReadTagged: unsafeReadTagged, + readString: readString, + readChar: readChar, + readBoolean: readBoolean, + readNumber: readNumber, + readInt: readInt, + readArray: readArray, + readNull: readNull, + readUndefined: readUndefined, + readNullOrUndefined: readNullOrUndefined, + fail: fail, + eqForeignError: eqForeignError, + ordForeignError: ordForeignError, + showForeignError: showForeignError, + unsafeToForeign: $foreign.unsafeToForeign, + unsafeFromForeign: $foreign.unsafeFromForeign, + typeOf: $foreign.typeOf, + tagOf: $foreign.tagOf, + isNull: $foreign.isNull, + isUndefined: $foreign.isUndefined, + isArray: $foreign.isArray +}; +},{"./foreign.js":"kKQF","../Control.Applicative/index.js":"qYya","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Except/index.js":"Fye2","../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Boolean/index.js":"ObQr","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Identity/index.js":"2OKT","../Data.Int/index.js":"xNJb","../Data.List.NonEmpty/index.js":"XAY7","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7","../Data.String.CodeUnits/index.js":"6c6X"}],"t65A":[function(require,module,exports) { +"use strict"; +/* global Symbol */ + +var hasArrayFrom = typeof Array.from === "function"; +var hasStringIterator = typeof Symbol !== "undefined" && Symbol != null && typeof Symbol.iterator !== "undefined" && typeof String.prototype[Symbol.iterator] === "function"; +var hasFromCodePoint = typeof String.prototype.fromCodePoint === "function"; +var hasCodePointAt = typeof String.prototype.codePointAt === "function"; + +exports._unsafeCodePointAt0 = function (fallback) { + return hasCodePointAt ? function (str) { + return str.codePointAt(0); + } : fallback; +}; + +exports._codePointAt = function (fallback) { + return function (Just) { + return function (Nothing) { + return function (unsafeCodePointAt0) { + return function (index) { + return function (str) { + var length = str.length; + if (index < 0 || index >= length) return Nothing; + + if (hasStringIterator) { + var iter = str[Symbol.iterator](); + + for (var i = index;; --i) { + var o = iter.next(); + if (o.done) return Nothing; + if (i === 0) return Just(unsafeCodePointAt0(o.value)); + } + } + + return fallback(index)(str); + }; + }; + }; + }; + }; +}; + +exports._countPrefix = function (fallback) { + return function (unsafeCodePointAt0) { + if (hasStringIterator) { + return function (pred) { + return function (str) { + var iter = str[Symbol.iterator](); + + for (var cpCount = 0;; ++cpCount) { + var o = iter.next(); + if (o.done) return cpCount; + var cp = unsafeCodePointAt0(o.value); + if (!pred(cp)) return cpCount; + } + }; + }; + } + + return fallback; + }; +}; + +exports._fromCodePointArray = function (singleton) { + return hasFromCodePoint ? function (cps) { + // Function.prototype.apply will fail for very large second parameters, + // so we don't use it for arrays with 10,000 or more entries. + if (cps.length < 10e3) { + return String.fromCodePoint.apply(String, cps); + } + + return cps.map(singleton).join(""); + } : function (cps) { + return cps.map(singleton).join(""); + }; +}; + +exports._singleton = function (fallback) { + return hasFromCodePoint ? String.fromCodePoint : fallback; +}; + +exports._take = function (fallback) { + return function (n) { + if (hasStringIterator) { + return function (str) { + var accum = ""; + var iter = str[Symbol.iterator](); + + for (var i = 0; i < n; ++i) { + var o = iter.next(); + if (o.done) return accum; + accum += o.value; + } + + return accum; + }; + } + + return fallback(n); + }; +}; + +exports._toCodePointArray = function (fallback) { + return function (unsafeCodePointAt0) { + if (hasArrayFrom) { + return function (str) { + return Array.from(str, unsafeCodePointAt0); + }; + } + + return fallback; + }; +}; +},{}],"mAJY":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_Enum = require("../Data.Enum/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_EuclideanRing = require("../Data.EuclideanRing/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_String_CodeUnits = require("../Data.String.CodeUnits/index.js"); + +var Data_String_Common = require("../Data.String.Common/index.js"); + +var Data_String_Unsafe = require("../Data.String.Unsafe/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var CodePoint = function CodePoint(x) { + return x; +}; + +var unsurrogate = function unsurrogate(lead) { + return function (trail) { + return (((lead - 55296 | 0) * 1024 | 0) + (trail - 56320 | 0) | 0) + 65536 | 0; + }; +}; + +var showCodePoint = new Data_Show.Show(function (v) { + return "(CodePoint 0x" + (Data_String_Common.toUpper(Data_Int.toStringAs(Data_Int.hexadecimal)(v)) + ")"); +}); + +var isTrail = function isTrail(cu) { + return 56320 <= cu && cu <= 57343; +}; + +var isLead = function isLead(cu) { + return 55296 <= cu && cu <= 56319; +}; + +var uncons = function uncons(s) { + var v = Data_String_CodeUnits.length(s); + + if (v === 0) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v === 1) { + return new Data_Maybe.Just({ + head: Data_Enum.fromEnum(Data_Enum.boundedEnumChar)(Data_String_Unsafe.charAt(0)(s)), + tail: "" + }); + } + + ; + var cu1 = Data_Enum.fromEnum(Data_Enum.boundedEnumChar)(Data_String_Unsafe.charAt(1)(s)); + var cu0 = Data_Enum.fromEnum(Data_Enum.boundedEnumChar)(Data_String_Unsafe.charAt(0)(s)); + var $21 = isLead(cu0) && isTrail(cu1); + + if ($21) { + return new Data_Maybe.Just({ + head: unsurrogate(cu0)(cu1), + tail: Data_String_CodeUnits.drop(2)(s) + }); + } + + ; + return new Data_Maybe.Just({ + head: cu0, + tail: Data_String_CodeUnits.drop(1)(s) + }); +}; + +var unconsButWithTuple = function unconsButWithTuple(s) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) { + return new Data_Tuple.Tuple(v.head, v.tail); + })(uncons(s)); +}; + +var toCodePointArrayFallback = function toCodePointArrayFallback(s) { + return Data_Unfoldable.unfoldr(Data_Unfoldable.unfoldableArray)(unconsButWithTuple)(s); +}; + +var unsafeCodePointAt0Fallback = function unsafeCodePointAt0Fallback(s) { + var cu0 = Data_Enum.fromEnum(Data_Enum.boundedEnumChar)(Data_String_Unsafe.charAt(0)(s)); + var $25 = isLead(cu0) && Data_String_CodeUnits.length(s) > 1; + + if ($25) { + var cu1 = Data_Enum.fromEnum(Data_Enum.boundedEnumChar)(Data_String_Unsafe.charAt(1)(s)); + var $26 = isTrail(cu1); + + if ($26) { + return unsurrogate(cu0)(cu1); + } + + ; + return cu0; + } + + ; + return cu0; +}; + +var unsafeCodePointAt0 = $foreign["_unsafeCodePointAt0"](unsafeCodePointAt0Fallback); +var toCodePointArray = $foreign["_toCodePointArray"](toCodePointArrayFallback)(unsafeCodePointAt0); + +var length = function length($52) { + return Data_Array.length(toCodePointArray($52)); +}; + +var lastIndexOf = function lastIndexOf(p) { + return function (s) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (i) { + return length(Data_String_CodeUnits.take(i)(s)); + })(Data_String_CodeUnits.lastIndexOf(p)(s)); + }; +}; + +var indexOf = function indexOf(p) { + return function (s) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (i) { + return length(Data_String_CodeUnits.take(i)(s)); + })(Data_String_CodeUnits.indexOf(p)(s)); + }; +}; + +var fromCharCode = function () { + var $53 = Data_Enum.toEnumWithDefaults(Data_Enum.boundedEnumChar)(Data_Bounded.bottom(Data_Bounded.boundedChar))(Data_Bounded.top(Data_Bounded.boundedChar)); + return function ($54) { + return Data_String_CodeUnits.singleton($53($54)); + }; +}(); + +var singletonFallback = function singletonFallback(v) { + if (v <= 65535) { + return fromCharCode(v); + } + + ; + var lead = Data_EuclideanRing.div(Data_EuclideanRing.euclideanRingInt)(v - 65536 | 0)(1024) + 55296 | 0; + var trail = Data_EuclideanRing.mod(Data_EuclideanRing.euclideanRingInt)(v - 65536 | 0)(1024) + 56320 | 0; + return fromCharCode(lead) + fromCharCode(trail); +}; + +var fromCodePointArray = $foreign["_fromCodePointArray"](singletonFallback); +var singleton = $foreign["_singleton"](singletonFallback); + +var takeFallback = function takeFallback(n) { + return function (v) { + if (n < 1) { + return ""; + } + + ; + var v1 = uncons(v); + + if (v1 instanceof Data_Maybe.Just) { + return singleton(v1.value0.head) + takeFallback(n - 1 | 0)(v1.value0.tail); + } + + ; + return v; + }; +}; + +var take = $foreign["_take"](takeFallback); + +var lastIndexOf$prime = function lastIndexOf$prime(p) { + return function (i) { + return function (s) { + var i$prime = Data_String_CodeUnits.length(take(i)(s)); + return Data_Functor.map(Data_Maybe.functorMaybe)(function (k) { + return length(Data_String_CodeUnits.take(k)(s)); + })(Data_String_CodeUnits["lastIndexOf'"](p)(i$prime)(s)); + }; + }; +}; + +var splitAt = function splitAt(i) { + return function (s) { + var before = take(i)(s); + return { + before: before, + after: Data_String_CodeUnits.drop(Data_String_CodeUnits.length(before))(s) + }; + }; +}; + +var eqCodePoint = new Data_Eq.Eq(function (x) { + return function (y) { + return x === y; + }; +}); +var ordCodePoint = new Data_Ord.Ord(function () { + return eqCodePoint; +}, function (x) { + return function (y) { + return Data_Ord.compare(Data_Ord.ordInt)(x)(y); + }; +}); + +var drop = function drop(n) { + return function (s) { + return Data_String_CodeUnits.drop(Data_String_CodeUnits.length(take(n)(s)))(s); + }; +}; + +var indexOf$prime = function indexOf$prime(p) { + return function (i) { + return function (s) { + var s$prime = drop(i)(s); + return Data_Functor.map(Data_Maybe.functorMaybe)(function (k) { + return i + length(Data_String_CodeUnits.take(k)(s$prime)) | 0; + })(Data_String_CodeUnits.indexOf(p)(s$prime)); + }; + }; +}; + +var countTail = function countTail($copy_p) { + return function ($copy_s) { + return function ($copy_accum) { + var $tco_var_p = $copy_p; + var $tco_var_s = $copy_s; + var $tco_done = false; + var $tco_result; + + function $tco_loop(p, s, accum) { + var v = uncons(s); + + if (v instanceof Data_Maybe.Just) { + var $39 = p(v.value0.head); + + if ($39) { + $tco_var_p = p; + $tco_var_s = v.value0.tail; + $copy_accum = accum + 1 | 0; + return; + } + + ; + $tco_done = true; + return accum; + } + + ; + $tco_done = true; + return accum; + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_p, $tco_var_s, $copy_accum); + } + + ; + return $tco_result; + }; + }; +}; + +var countFallback = function countFallback(p) { + return function (s) { + return countTail(p)(s)(0); + }; +}; + +var countPrefix = $foreign["_countPrefix"](countFallback)(unsafeCodePointAt0); + +var dropWhile = function dropWhile(p) { + return function (s) { + return drop(countPrefix(p)(s))(s); + }; +}; + +var takeWhile = function takeWhile(p) { + return function (s) { + return take(countPrefix(p)(s))(s); + }; +}; + +var codePointFromChar = function () { + var $55 = Data_Enum.fromEnum(Data_Enum.boundedEnumChar); + return function ($56) { + return CodePoint($55($56)); + }; +}(); + +var codePointAtFallback = function codePointAtFallback($copy_n) { + return function ($copy_s) { + var $tco_var_n = $copy_n; + var $tco_done = false; + var $tco_result; + + function $tco_loop(n, s) { + var v = uncons(s); + + if (v instanceof Data_Maybe.Just) { + var $44 = n === 0; + + if ($44) { + $tco_done = true; + return new Data_Maybe.Just(v.value0.head); + } + + ; + $tco_var_n = n - 1 | 0; + $copy_s = v.value0.tail; + return; + } + + ; + $tco_done = true; + return Data_Maybe.Nothing.value; + } + + ; + + while (!$tco_done) { + $tco_result = $tco_loop($tco_var_n, $copy_s); + } + + ; + return $tco_result; + }; +}; + +var codePointAt = function codePointAt(v) { + return function (v1) { + if (v < 0) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v === 0 && v1 === "") { + return Data_Maybe.Nothing.value; + } + + ; + + if (v === 0) { + return new Data_Maybe.Just(unsafeCodePointAt0(v1)); + } + + ; + return $foreign["_codePointAt"](codePointAtFallback)(Data_Maybe.Just.create)(Data_Maybe.Nothing.value)(unsafeCodePointAt0)(v)(v1); + }; +}; + +var boundedCodePoint = new Data_Bounded.Bounded(function () { + return ordCodePoint; +}, 0, 1114111); +var boundedEnumCodePoint = new Data_Enum.BoundedEnum(function () { + return boundedCodePoint; +}, function () { + return enumCodePoint; +}, 1114111 + 1 | 0, function (v) { + return v; +}, function (n) { + if (n >= 0 && n <= 1114111) { + return new Data_Maybe.Just(n); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Data.String.CodePoints (line 63, column 1 - line 68, column 26): " + [n.constructor.name]); +}); +var enumCodePoint = new Data_Enum.Enum(function () { + return ordCodePoint; +}, Data_Enum.defaultPred(Data_Enum.toEnum(boundedEnumCodePoint))(Data_Enum.fromEnum(boundedEnumCodePoint)), Data_Enum.defaultSucc(Data_Enum.toEnum(boundedEnumCodePoint))(Data_Enum.fromEnum(boundedEnumCodePoint))); +module.exports = { + codePointFromChar: codePointFromChar, + singleton: singleton, + fromCodePointArray: fromCodePointArray, + toCodePointArray: toCodePointArray, + codePointAt: codePointAt, + uncons: uncons, + length: length, + countPrefix: countPrefix, + indexOf: indexOf, + "indexOf'": indexOf$prime, + lastIndexOf: lastIndexOf, + "lastIndexOf'": lastIndexOf$prime, + take: take, + takeWhile: takeWhile, + drop: drop, + dropWhile: dropWhile, + splitAt: splitAt, + eqCodePoint: eqCodePoint, + ordCodePoint: ordCodePoint, + showCodePoint: showCodePoint, + boundedCodePoint: boundedCodePoint, + enumCodePoint: enumCodePoint, + boundedEnumCodePoint: boundedEnumCodePoint +}; +},{"./foreign.js":"t65A","../Data.Array/index.js":"4t4C","../Data.Boolean/index.js":"ObQr","../Data.Bounded/index.js":"kcUU","../Data.Enum/index.js":"oOsU","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Functor/index.js":"+0AE","../Data.Int/index.js":"xNJb","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7","../Data.String.CodeUnits/index.js":"6c6X","../Data.String.Common/index.js":"OSrc","../Data.String.Unsafe/index.js":"5UWM","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z"}],"rsyP":[function(require,module,exports) { +"use strict"; + +exports["showRegex'"] = function (r) { + return "" + r; +}; + +exports["regex'"] = function (left) { + return function (right) { + return function (s1) { + return function (s2) { + try { + return right(new RegExp(s1, s2)); + } catch (e) { + return left(e.message); + } + }; + }; + }; +}; + +exports.source = function (r) { + return r.source; +}; + +exports["flags'"] = function (r) { + return { + multiline: r.multiline, + ignoreCase: r.ignoreCase, + global: r.global, + sticky: !!r.sticky, + unicode: !!r.unicode + }; +}; + +exports.test = function (r) { + return function (s) { + var lastIndex = r.lastIndex; + var result = r.test(s); + r.lastIndex = lastIndex; + return result; + }; +}; + +exports._match = function (just) { + return function (nothing) { + return function (r) { + return function (s) { + var m = s.match(r); + + if (m == null || m.length === 0) { + return nothing; + } else { + for (var i = 0; i < m.length; i++) { + m[i] = m[i] == null ? nothing : just(m[i]); + } + + return just(m); + } + }; + }; + }; +}; + +exports.replace = function (r) { + return function (s1) { + return function (s2) { + return s2.replace(r, s1); + }; + }; +}; + +exports["replace'"] = function (r) { + return function (f) { + return function (s2) { + return s2.replace(r, function (match) { + return f(match)(Array.prototype.splice.call(arguments, 1, arguments.length - 3)); + }); + }; + }; +}; + +exports._search = function (just) { + return function (nothing) { + return function (r) { + return function (s) { + var result = s.search(r); + return result === -1 ? nothing : just(result); + }; + }; + }; +}; + +exports.split = function (r) { + return function (s) { + return s.split(r); + }; +}; +},{}],"W1/V":[function(require,module,exports) { + +// Generated by purs version 0.13.2 +"use strict"; + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_String_Common = require("../Data.String.Common/index.js"); + +var RegexFlags = function () { + function RegexFlags(value0) { + this.value0 = value0; + } + + ; + + RegexFlags.create = function (value0) { + return new RegexFlags(value0); + }; + + return RegexFlags; +}(); + +var unicode = new RegexFlags({ + global: false, + ignoreCase: false, + multiline: false, + sticky: false, + unicode: true +}); +var sticky = new RegexFlags({ + global: false, + ignoreCase: false, + multiline: false, + sticky: true, + unicode: false +}); +var showRegexFlags = new Data_Show.Show(function (v) { + var usedFlags = Data_Semigroup.append(Data_Semigroup.semigroupArray)([])(Data_Semigroup.append(Data_Semigroup.semigroupArray)(Data_Functor.voidLeft(Data_Functor.functorArray)(Control_MonadZero.guard(Control_MonadZero.monadZeroArray)(v.value0.global))("global"))(Data_Semigroup.append(Data_Semigroup.semigroupArray)(Data_Functor.voidLeft(Data_Functor.functorArray)(Control_MonadZero.guard(Control_MonadZero.monadZeroArray)(v.value0.ignoreCase))("ignoreCase"))(Data_Semigroup.append(Data_Semigroup.semigroupArray)(Data_Functor.voidLeft(Data_Functor.functorArray)(Control_MonadZero.guard(Control_MonadZero.monadZeroArray)(v.value0.multiline))("multiline"))(Data_Semigroup.append(Data_Semigroup.semigroupArray)(Data_Functor.voidLeft(Data_Functor.functorArray)(Control_MonadZero.guard(Control_MonadZero.monadZeroArray)(v.value0.sticky))("sticky"))(Data_Functor.voidLeft(Data_Functor.functorArray)(Control_MonadZero.guard(Control_MonadZero.monadZeroArray)(v.value0.unicode))("unicode")))))); + var $6 = Data_Eq.eq(Data_Eq.eqArray(Data_Eq.eqString))(usedFlags)([]); + + if ($6) { + return "noFlags"; + } + + ; + return "(" + (Data_String_Common.joinWith(" <> ")(usedFlags) + ")"); +}); +var semigroupRegexFlags = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return new RegexFlags({ + global: v.value0.global || v1.value0.global, + ignoreCase: v.value0.ignoreCase || v1.value0.ignoreCase, + multiline: v.value0.multiline || v1.value0.multiline, + sticky: v.value0.sticky || v1.value0.sticky, + unicode: v.value0.unicode || v1.value0.unicode + }); + }; +}); +var noFlags = new RegexFlags({ + global: false, + ignoreCase: false, + multiline: false, + sticky: false, + unicode: false +}); +var multiline = new RegexFlags({ + global: false, + ignoreCase: false, + multiline: true, + sticky: false, + unicode: false +}); +var monoidRegexFlags = new Data_Monoid.Monoid(function () { + return semigroupRegexFlags; +}, noFlags); +var ignoreCase = new RegexFlags({ + global: false, + ignoreCase: true, + multiline: false, + sticky: false, + unicode: false +}); +var global = new RegexFlags({ + global: true, + ignoreCase: false, + multiline: false, + sticky: false, + unicode: false +}); +var eqRegexFlags = new Data_Eq.Eq(function (v) { + return function (v1) { + return v.value0.global === v1.value0.global && v.value0.ignoreCase === v1.value0.ignoreCase && v.value0.multiline === v1.value0.multiline && v.value0.sticky === v1.value0.sticky && v.value0.unicode === v1.value0.unicode; + }; +}); +module.exports = { + RegexFlags: RegexFlags, + noFlags: noFlags, + global: global, + ignoreCase: ignoreCase, + multiline: multiline, + sticky: sticky, + unicode: unicode, + semigroupRegexFlags: semigroupRegexFlags, + monoidRegexFlags: monoidRegexFlags, + eqRegexFlags: eqRegexFlags, + showRegexFlags: showRegexFlags +}; +},{"../Control.MonadZero/index.js":"lD5R","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.String.Common/index.js":"OSrc"}],"lBFq":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_String_CodeUnits = require("../Data.String.CodeUnits/index.js"); + +var Data_String_Regex_Flags = require("../Data.String.Regex.Flags/index.js"); + +var showRegex = new Data_Show.Show($foreign["showRegex'"]); +var search = $foreign["_search"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var renderFlags = function renderFlags(v) { + return function () { + if (v.value0.global) { + return "g"; + } + + ; + return ""; + }() + (function () { + if (v.value0.ignoreCase) { + return "i"; + } + + ; + return ""; + }() + (function () { + if (v.value0.multiline) { + return "m"; + } + + ; + return ""; + }() + (function () { + if (v.value0.sticky) { + return "y"; + } + + ; + return ""; + }() + function () { + if (v.value0.unicode) { + return "u"; + } + + ; + return ""; + }()))); +}; + +var regex = function regex(s) { + return function (f) { + return $foreign["regex'"](Data_Either.Left.create)(Data_Either.Right.create)(s)(renderFlags(f)); + }; +}; + +var parseFlags = function parseFlags(s) { + return new Data_String_Regex_Flags.RegexFlags({ + global: Data_String_CodeUnits.contains("g")(s), + ignoreCase: Data_String_CodeUnits.contains("i")(s), + multiline: Data_String_CodeUnits.contains("m")(s), + sticky: Data_String_CodeUnits.contains("y")(s), + unicode: Data_String_CodeUnits.contains("u")(s) + }); +}; + +var match = $foreign["_match"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value); + +var flags = function flags($8) { + return Data_String_Regex_Flags.RegexFlags.create($foreign["flags'"]($8)); +}; + +module.exports = { + regex: regex, + flags: flags, + renderFlags: renderFlags, + parseFlags: parseFlags, + match: match, + search: search, + showRegex: showRegex, + source: $foreign.source, + test: $foreign.test, + replace: $foreign.replace, + "replace'": $foreign["replace'"], + split: $foreign.split +}; +},{"./foreign.js":"rsyP","../Data.Either/index.js":"B2JL","../Data.Maybe/index.js":"5mN7","../Data.Show/index.js":"mFY7","../Data.String.CodeUnits/index.js":"6c6X","../Data.String.Regex.Flags/index.js":"W1/V"}],"f3ma":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Data_Array_NonEmpty = require("../Data.Array.NonEmpty/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_String_CodePoints = require("../Data.String.CodePoints/index.js"); + +var Data_String_Regex = require("../Data.String.Regex/index.js"); + +var $$Math = require("../Math/index.js"); + +var UnclippedHue = function UnclippedHue(x) { + return x; +}; + +var RGB = function () { + function RGB() {} + + ; + RGB.value = new RGB(); + return RGB; +}(); + +var HSL = function () { + function HSL() {} + + ; + HSL.value = new HSL(); + return HSL; +}(); + +var LCh = function () { + function LCh() {} + + ; + LCh.value = new LCh(); + return LCh; +}(); + +var Lab = function () { + function Lab() {} + + ; + Lab.value = new Lab(); + return Lab; +}(); + +var HSLA = function () { + function HSLA(value0, value1, value2, value3) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + this.value3 = value3; + } + + ; + + HSLA.create = function (value0) { + return function (value1) { + return function (value2) { + return function (value3) { + return new HSLA(value0, value1, value2, value3); + }; + }; + }; + }; + + return HSLA; +}(); + +var modPos = function modPos(x) { + return function (y) { + return $$Math.remainder($$Math.remainder(x)(y) + y)(y); + }; +}; + +var rgba = function rgba(red$prime) { + return function (green$prime) { + return function (blue$prime) { + return function (alpha) { + var red = Data_Ord.clamp(Data_Ord.ordInt)(0)(255)(red$prime); + var r = Data_Int.toNumber(red) / 255.0; + var green = Data_Ord.clamp(Data_Ord.ordInt)(0)(255)(green$prime); + var g = Data_Int.toNumber(green) / 255.0; + var blue = Data_Ord.clamp(Data_Ord.ordInt)(0)(255)(blue$prime); + var maxChroma = Data_Ord.max(Data_Ord.ordInt)(Data_Ord.max(Data_Ord.ordInt)(red)(green))(blue); + var minChroma = Data_Ord.min(Data_Ord.ordInt)(Data_Ord.min(Data_Ord.ordInt)(red)(green))(blue); + var chroma = maxChroma - minChroma | 0; + var chroma$prime = Data_Int.toNumber(chroma) / 255.0; + var lightness = Data_Int.toNumber(maxChroma + minChroma | 0) / (255.0 * 2.0); + + var saturation = function () { + if (chroma === 0) { + return 0.0; + } + + ; + + if (Data_Boolean.otherwise) { + return chroma$prime / (1.0 - $$Math.abs(2.0 * lightness - 1.0)); + } + + ; + throw new Error("Failed pattern match at Color (line 157, column 5 - line 158, column 75): " + []); + }(); + + var b = Data_Int.toNumber(blue) / 255.0; + + var hue$prime = function hue$prime(v) { + if (v === 0) { + return 0.0; + } + + ; + + if (maxChroma === red) { + return modPos((g - b) / chroma$prime)(6.0); + } + + ; + + if (maxChroma === green) { + return (b - r) / chroma$prime + 2.0; + } + + ; + + if (Data_Boolean.otherwise) { + return (r - g) / chroma$prime + 4.0; + } + + ; + throw new Error("Failed pattern match at Color (line 148, column 5 - line 148, column 17): " + [v.constructor.name]); + }; + + var hue = 60.0 * hue$prime(chroma); + return new HSLA(hue, saturation, lightness, alpha); + }; + }; + }; +}; + +var rgb = function rgb(r) { + return function (g) { + return function (b) { + return rgba(r)(g)(b)(1.0); + }; + }; +}; + +var rgba$prime = function rgba$prime(r) { + return function (g) { + return function (b) { + return function (a) { + return rgba(Data_Int.round(r * 255.0))(Data_Int.round(g * 255.0))(Data_Int.round(b * 255.0))(a); + }; + }; + }; +}; + +var rgb$prime = function rgb$prime(r) { + return function (g) { + return function (b) { + return rgba$prime(r)(g)(b)(1.0); + }; + }; +}; + +var xyz = function xyz(x) { + return function (y) { + return function (z) { + var f = function f(c) { + if (c <= 3.1308e-3) { + return 12.92 * c; + } + + ; + + if (Data_Boolean.otherwise) { + return 1.055 * $$Math.pow(c)(1.0 / 2.4) - 5.5e-2; + } + + ; + throw new Error("Failed pattern match at Color (line 224, column 5 - line 225, column 65): " + [c.constructor.name]); + }; + + var g = f(-0.9689 * x + 1.8758 * y + 4.15e-2 * z); + var r = f(3.2406 * x - 1.5372 * y - 0.4986 * z); + var b = f(5.57e-2 * x - 0.204 * y + 1.057 * z); + return rgb$prime(r)(g)(b); + }; + }; +}; + +var interpolate = function interpolate(fraction) { + return function (a) { + return function (b) { + return a + fraction * (b - a); + }; + }; +}; + +var interpolateAngle = function interpolateAngle(fraction) { + return function (a) { + return function (b) { + var paths = [{ + from: a, + to: b + }, { + from: a, + to: b + 360.0 + }, { + from: a + 360.0, + to: b + }]; + + var dist = function dist(v) { + return $$Math.abs(v.to - v.from); + }; + + var shortest = Data_Maybe.fromJust()(Data_Foldable.minimumBy(Data_Foldable.foldableArray)(Data_Ord.comparing(Data_Ord.ordNumber)(dist))(paths)); + return interpolate(fraction)(shortest.from)(shortest.to); + }; + }; +}; + +var mixCubehelix = function mixCubehelix(gamma) { + return function (v) { + return function (v1) { + var radians = $$Math.pi / 180.0; + var bs = v1.value1 - v.value1; + var bl = v1.value2 - v.value2; + var ah = (v.value0 + 120.0) * radians; + var bh = (v1.value0 + 120.0) * radians - ah; + return function (t) { + var fract = $$Math.pow(v.value2 + bl * t)(gamma); + var angle = ah + bh * t; + var amp = (v.value1 + bs * t) * fract * (1.0 - fract); + var b = fract + amp * (1.97294 * $$Math.cos(angle)); + var g = fract + amp * (-0.29227 * $$Math.cos(angle) - 0.90649 * $$Math.sin(angle)); + var r = fract + amp * (-0.14861 * $$Math.cos(angle) + 1.78277 * $$Math.sin(angle)); + var a = interpolate(t)(v.value3)(v1.value3); + return rgba$prime(r)(g)(b)(a); + }; + }; + }; +}; + +var hsla = function hsla(h) { + return function (s) { + return function (l) { + return function (a) { + var s$prime = Data_Ord.clamp(Data_Ord.ordNumber)(0.0)(1.0)(s); + var l$prime = Data_Ord.clamp(Data_Ord.ordNumber)(0.0)(1.0)(l); + var a$prime = Data_Ord.clamp(Data_Ord.ordNumber)(0.0)(1.0)(a); + return new HSLA(h, s$prime, l$prime, a$prime); + }; + }; + }; +}; + +var hsva = function hsva(h) { + return function (v) { + return function (v1) { + return function (a) { + var s = v; + + if (v1 === 0.0) { + return hsla(h)(s / (2.0 - s))(0.0)(a); + } + + ; + + if (v === 0.0 && v1 === 1.0) { + return hsla(h)(0.0)(1.0)(a); + } + + ; + var tmp = (2.0 - v) * v1; + + var s = v * v1 / function () { + var $41 = tmp < 1.0; + + if ($41) { + return tmp; + } + + ; + return 2.0 - tmp; + }(); + + var l = tmp / 2.0; + return hsla(h)(s)(l)(a); + }; + }; + }; +}; + +var hsv = function hsv(h) { + return function (s) { + return function (v) { + return hsva(h)(s)(v)(1.0); + }; + }; +}; + +var lighten = function lighten(f) { + return function (v) { + return hsla(v.value0)(v.value1)(v.value2 + f)(v.value3); + }; +}; + +var rotateHue = function rotateHue(angle) { + return function (v) { + return hsla(v.value0 + angle)(v.value1)(v.value2)(v.value3); + }; +}; + +var saturate = function saturate(f) { + return function (v) { + return hsla(v.value0)(v.value1 + f)(v.value2)(v.value3); + }; +}; + +var hsl = function hsl(h) { + return function (s) { + return function (l) { + return hsla(h)(s)(l)(1.0); + }; + }; +}; + +var white = hsl(0.0)(0.0)(1.0); + +var graytone = function graytone(l) { + return hsl(0.0)(0.0)(l); +}; + +var fromInt = function fromInt(m) { + var n = Data_Ord.clamp(Data_Ord.ordInt)(0)(16777215)(m); + var r = n >> 16 & 255; + var g = n >> 8 & 255; + var b = n & 255; + return rgb(r)(g)(b); +}; + +var fromHexString = function fromHexString(str) { + var parseHex = function () { + var $111 = Data_Maybe.fromMaybe(0); + var $112 = Data_Int.fromStringAs(Data_Int.hexadecimal); + return function ($113) { + return $111($112($113)); + }; + }(); + + var isShort = Data_String_CodePoints.length(str) === 4; + var hush = Data_Either.either(Data_Function["const"](Data_Maybe.Nothing.value))(Data_Maybe.Just.create); + var pair = "(" + ("[0-9a-f]" + ("[0-9a-f]" + ")")); + var single = "(" + ("[0-9a-f]" + ")"); + + var variant = function () { + if (isShort) { + return single + (single + single); + } + + ; + return pair + (pair + pair); + }(); + + var mPattern = Data_String_Regex.regex("^#(?:" + (variant + ")$"))(Data_String_Regex.parseFlags("i")); + return Control_Bind.bind(Data_Maybe.bindMaybe)(hush(mPattern))(function (v) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(Data_String_Regex.match(v)(str))(function (v1) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Functor.map(Data_Maybe.functorMaybe)(parseHex)(Control_Bind.join(Data_Maybe.bindMaybe)(Data_Array_NonEmpty.index(v1)(1))))(function (v2) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Functor.map(Data_Maybe.functorMaybe)(parseHex)(Control_Bind.join(Data_Maybe.bindMaybe)(Data_Array_NonEmpty.index(v1)(2))))(function (v3) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Functor.map(Data_Maybe.functorMaybe)(parseHex)(Control_Bind.join(Data_Maybe.bindMaybe)(Data_Array_NonEmpty.index(v1)(3))))(function (v4) { + if (isShort) { + return Control_Applicative.pure(Data_Maybe.applicativeMaybe)(rgb((16 * v2 | 0) + v2 | 0)((16 * v3 | 0) + v3 | 0)((16 * v4 | 0) + v4 | 0)); + } + + ; + return Control_Applicative.pure(Data_Maybe.applicativeMaybe)(rgb(v2)(v3)(v4)); + }); + }); + }); + }); + }); +}; + +var desaturate = function desaturate(f) { + return saturate(-f); +}; + +var darken = function darken(f) { + return lighten(-f); +}; + +var d65 = { + xn: 0.95047, + yn: 1.0, + zn: 1.08883 +}; + +var lab = function lab(l) { + return function (a) { + return function (b) { + var l$prime = (l + 16.0) / 116.0; + var delta = 6.0 / 29.0; + + var finv = function finv(t) { + if (t > delta) { + return $$Math.pow(t)(3.0); + } + + ; + + if (Data_Boolean.otherwise) { + return 3.0 * delta * delta * (t - 4.0 / 29.0); + } + + ; + throw new Error("Failed pattern match at Color (line 249, column 5 - line 250, column 64): " + [t.constructor.name]); + }; + + var x = d65.xn * finv(l$prime + a / 500.0); + var y = d65.yn * finv(l$prime); + var z = d65.zn * finv(l$prime - b / 200.0); + return xyz(x)(y)(z); + }; + }; +}; + +var lch = function lch(l) { + return function (c) { + return function (h) { + var deg2rad = $$Math.pi / 180.0; + var b = c * $$Math.sin(h * deg2rad); + var a = c * $$Math.cos(h * deg2rad); + return lab(l)(a)(b); + }; + }; +}; + +var cssStringHSLA = function cssStringHSLA(v) { + var toString = function toString(n) { + return Data_Show.show(Data_Show.showNumber)(Data_Int.toNumber(Data_Int.round(100.0 * n)) / 100.0); + }; + + var saturation = toString(v.value1 * 100.0) + "%"; + var lightness = toString(v.value2 * 100.0) + "%"; + var hue = toString(v.value0); + var alpha = Data_Show.show(Data_Show.showNumber)(v.value3); + var $69 = v.value3 === 1.0; + + if ($69) { + return "hsl(" + (hue + (", " + (saturation + (", " + (lightness + ")"))))); + } + + ; + return "hsla(" + (hue + (", " + (saturation + (", " + (lightness + (", " + (alpha + ")"))))))); +}; + +var complementary = rotateHue(180.0); + +var clipHue = function clipHue(v) { + var $75 = 360.0 === v; + + if ($75) { + return v; + } + + ; + return modPos(v)(360.0); +}; + +var toHSLA = function toHSLA(v) { + return { + h: clipHue(v.value0), + s: v.value1, + l: v.value2, + a: v.value3 + }; +}; + +var toHSVA = function toHSVA(v) { + var s = v.value1; + + if (v.value2 === 0.0) { + return { + h: clipHue(v.value0), + s: 2.0 * s / (1.0 + s), + v: 0.0, + a: v.value3 + }; + } + + ; + + if (v.value1 === 0.0 && v.value2 === 1.0) { + return { + h: clipHue(v.value0), + s: 0.0, + v: 1.0, + a: v.value3 + }; + } + + ; + + var tmp = v.value1 * function () { + var $90 = v.value2 < 0.5; + + if ($90) { + return v.value2; + } + + ; + return 1.0 - v.value2; + }(); + + var v1 = v.value2 + tmp; + var s = 2.0 * tmp / (v.value2 + tmp); + return { + h: clipHue(v.value0), + s: s, + v: v1, + a: v.value3 + }; +}; + +var toRGBA$prime = function toRGBA$prime(v) { + var h$prime = clipHue(v.value0) / 60.0; + var chr = (1.0 - $$Math.abs(2.0 * v.value2 - 1.0)) * v.value1; + var m = v.value2 - chr / 2.0; + var x = chr * (1.0 - $$Math.abs($$Math.remainder(h$prime)(2.0) - 1.0)); + + var col = function () { + if (h$prime < 1.0) { + return { + r: chr, + g: x, + b: 0.0 + }; + } + + ; + + if (1.0 <= h$prime && h$prime < 2.0) { + return { + r: x, + g: chr, + b: 0.0 + }; + } + + ; + + if (2.0 <= h$prime && h$prime < 3.0) { + return { + r: 0.0, + g: chr, + b: x + }; + } + + ; + + if (3.0 <= h$prime && h$prime < 4.0) { + return { + r: 0.0, + g: x, + b: chr + }; + } + + ; + + if (4.0 <= h$prime && h$prime < 5.0) { + return { + r: x, + g: 0.0, + b: chr + }; + } + + ; + + if (Data_Boolean.otherwise) { + return { + r: chr, + g: 0.0, + b: x + }; + } + + ; + throw new Error("Failed pattern match at Color (line 342, column 5 - line 347, column 61): " + []); + }(); + + return { + r: col.r + m, + g: col.g + m, + b: col.b + m, + a: v.value3 + }; +}; + +var luminance = function luminance(col) { + var val = toRGBA$prime(col); + + var f = function f(c) { + if (c <= 3.928e-2) { + return c / 12.92; + } + + ; + + if (Data_Boolean.otherwise) { + return $$Math.pow((c + 5.5e-2) / 1.055)(2.4); + } + + ; + throw new Error("Failed pattern match at Color (line 604, column 9 - line 605, column 61): " + [c.constructor.name]); + }; + + var g = f(val.g); + var r = f(val.r); + var b = f(val.b); + return 0.2126 * r + 0.7152 * g + 7.22e-2 * b; +}; + +var contrast = function contrast(c1) { + return function (c2) { + var l2 = luminance(c2); + var l1 = luminance(c1); + var $101 = l1 > l2; + + if ($101) { + return (l1 + 5.0e-2) / (l2 + 5.0e-2); + } + + ; + return (l2 + 5.0e-2) / (l1 + 5.0e-2); + }; +}; + +var isReadable = function isReadable(c1) { + return function (c2) { + return contrast(c1)(c2) > 4.5; + }; +}; + +var toRGBA = function toRGBA(col) { + var c = toRGBA$prime(col); + var g = Data_Int.round(255.0 * c.g); + var r = Data_Int.round(255.0 * c.r); + var b = Data_Int.round(255.0 * c.b); + return { + r: r, + g: g, + b: b, + a: c.a + }; +}; + +var cssStringRGBA = function cssStringRGBA(col) { + var c = toRGBA(col); + var green = Data_Show.show(Data_Show.showInt)(c.g); + var red = Data_Show.show(Data_Show.showInt)(c.r); + var blue = Data_Show.show(Data_Show.showInt)(c.b); + var alpha = Data_Show.show(Data_Show.showNumber)(c.a); + var $102 = c.a === 1.0; + + if ($102) { + return "rgb(" + (red + (", " + (green + (", " + (blue + ")"))))); + } + + ; + return "rgba(" + (red + (", " + (green + (", " + (blue + (", " + (alpha + ")"))))))); +}; + +var eqColor = new Data_Eq.Eq(function (c1) { + return function (c2) { + var rgb2 = toRGBA(c2); + var rgb1 = toRGBA(c1); + return rgb1.r === rgb2.r && rgb1.g === rgb2.g && rgb1.b === rgb2.b && rgb1.a === rgb2.a; + }; +}); +var showColor = new Data_Show.Show(function (c) { + var col = toRGBA(c); + return "rgba " + (Data_Show.show(Data_Show.showInt)(col.r) + (" " + (Data_Show.show(Data_Show.showInt)(col.g) + (" " + (Data_Show.show(Data_Show.showInt)(col.b) + (" " + Data_Show.show(Data_Show.showNumber)(col.a))))))); +}); + +var toHexString = function toHexString(color) { + var toHex = function toHex(num) { + var repr = Data_Int.toStringAs(Data_Int.hexadecimal)(num); + var $103 = Data_String_CodePoints.length(repr) === 1; + + if ($103) { + return "0" + repr; + } + + ; + return repr; + }; + + var c = toRGBA(color); + return "#" + (toHex(c.r) + (toHex(c.g) + toHex(c.b))); +}; + +var toXYZ = function toXYZ(c) { + var rec = toRGBA$prime(c); + + var finv = function finv(c$prime) { + if (c$prime <= 4.045e-2) { + return c$prime / 12.92; + } + + ; + + if (Data_Boolean.otherwise) { + return $$Math.pow((c$prime + 5.5e-2) / 1.055)(2.4); + } + + ; + throw new Error("Failed pattern match at Color (line 366, column 5 - line 367, column 63): " + [c$prime.constructor.name]); + }; + + var g = finv(rec.g); + var r = finv(rec.r); + var b = finv(rec.b); + var x = 0.4124 * r + 0.3576 * g + 0.1805 * b; + var y = 0.2126 * r + 0.7152 * g + 7.22e-2 * b; + var z = 1.93e-2 * r + 0.1192 * g + 0.9505 * b; + return { + x: x, + y: y, + z: z + }; +}; + +var toLab = function toLab(col) { + var rec = toXYZ(col); + var cut = $$Math.pow(6.0 / 29.0)(3.0); + + var f = function f(t) { + if (t > cut) { + return $$Math.pow(t)(1.0 / 3.0); + } + + ; + + if (Data_Boolean.otherwise) { + return 1.0 / 3.0 * $$Math.pow(29.0 / 6.0)(2.0) * t + 4.0 / 29.0; + } + + ; + throw new Error("Failed pattern match at Color (line 384, column 5 - line 385, column 76): " + [t.constructor.name]); + }; + + var fy = f(rec.y / d65.yn); + var l = 116.0 * fy - 16.0; + var b = 200.0 * (fy - f(rec.z / d65.zn)); + var a = 500.0 * (f(rec.x / d65.xn) - fy); + return { + l: l, + a: a, + b: b + }; +}; + +var distance = function distance(col1) { + return function (col2) { + var sq = function sq(x) { + return $$Math.pow(x)(2.0); + }; + + var c2 = toLab(col2); + var c1 = toLab(col1); + return $$Math.sqrt(sq(c1.l - c2.l) + sq(c1.a - c2.a) + sq(c1.b - c2.b)); + }; +}; + +var toLCh = function toLCh(col) { + var rec = toLab(col); + var rad2deg = 180.0 / $$Math.pi; + var c = $$Math.sqrt(rec.a * rec.a + rec.b * rec.b); + var h = modPos($$Math.atan2(rec.b)(rec.a) * rad2deg)(360.0); + return { + l: rec.l, + c: c, + h: h + }; +}; + +var mix = function mix(v) { + return function (c1) { + return function (c2) { + return function (frac) { + if (v instanceof HSL) { + var t = toHSLA(c2); + var f = toHSLA(c1); + return hsla(interpolateAngle(frac)(f.h)(t.h))(interpolate(frac)(f.s)(t.s))(interpolate(frac)(f.l)(t.l))(interpolate(frac)(f.a)(t.a)); + } + + ; + + if (v instanceof RGB) { + var t = toRGBA$prime(c2); + var f = toRGBA$prime(c1); + return rgba$prime(interpolate(frac)(f.r)(t.r))(interpolate(frac)(f.g)(t.g))(interpolate(frac)(f.b)(t.b))(interpolate(frac)(f.a)(t.a)); + } + + ; + + if (v instanceof LCh) { + var t = toLCh(c2); + var f = toLCh(c1); + return lch(interpolate(frac)(f.l)(t.l))(interpolate(frac)(f.c)(t.c))(interpolateAngle(frac)(f.h)(t.h)); + } + + ; + + if (v instanceof Lab) { + var t = toLab(c2); + var f = toLab(c1); + return lab(interpolate(frac)(f.l)(t.l))(interpolate(frac)(f.a)(t.a))(interpolate(frac)(f.b)(t.b)); + } + + ; + throw new Error("Failed pattern match at Color (line 520, column 1 - line 520, column 34): " + [v.constructor.name, c1.constructor.name, c2.constructor.name, frac.constructor.name]); + }; + }; + }; +}; + +var toGray = function toGray(col) { + var res = toLCh(col); + return desaturate(1.0)(lch(res.l)(0.0)(0.0)); +}; + +var brightness = function brightness(col) { + var c = toRGBA$prime(col); + return (299.0 * c.r + 587.0 * c.g + 114.0 * c.b) / 1000.0; +}; + +var isLight = function isLight(c) { + return brightness(c) > 0.5; +}; + +var black = hsl(0.0)(0.0)(0.0); + +var textColor = function textColor(c) { + if (isLight(c)) { + return black; + } + + ; + + if (Data_Boolean.otherwise) { + return white; + } + + ; + throw new Error("Failed pattern match at Color (line 643, column 1 - line 643, column 28): " + [c.constructor.name]); +}; + +module.exports = { + RGB: RGB, + HSL: HSL, + LCh: LCh, + Lab: Lab, + rgba: rgba, + rgb: rgb, + "rgba'": rgba$prime, + "rgb'": rgb$prime, + hsla: hsla, + hsl: hsl, + hsva: hsva, + hsv: hsv, + xyz: xyz, + lab: lab, + lch: lch, + fromHexString: fromHexString, + fromInt: fromInt, + toHSLA: toHSLA, + toHSVA: toHSVA, + toRGBA: toRGBA, + "toRGBA'": toRGBA$prime, + toXYZ: toXYZ, + toLab: toLab, + toLCh: toLCh, + toHexString: toHexString, + cssStringHSLA: cssStringHSLA, + cssStringRGBA: cssStringRGBA, + black: black, + white: white, + graytone: graytone, + rotateHue: rotateHue, + complementary: complementary, + lighten: lighten, + darken: darken, + saturate: saturate, + desaturate: desaturate, + toGray: toGray, + mix: mix, + mixCubehelix: mixCubehelix, + brightness: brightness, + luminance: luminance, + contrast: contrast, + isLight: isLight, + isReadable: isReadable, + textColor: textColor, + distance: distance, + showColor: showColor, + eqColor: eqColor +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Data.Array.NonEmpty/index.js":"eTKN","../Data.Boolean/index.js":"ObQr","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Int/index.js":"xNJb","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7","../Data.String.CodePoints/index.js":"mAJY","../Data.String.Regex/index.js":"lBFq","../Math/index.js":"Rpaz"}],"rp+n":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Color = require("../Color/index.js"); + +var yellow = Color.fromInt(16768000); +var teal = Color.fromInt(3787980); +var silver = Color.fromInt(14540253); +var red = Color.fromInt(16728374); +var purple = Color.fromInt(11603401); +var orange = Color.fromInt(16745755); +var olive = Color.fromInt(4036976); +var navy = Color.fromInt(7999); +var maroon = Color.fromInt(8721483); +var lime = Color.fromInt(130928); +var green = Color.fromInt(3066944); +var gray = Color.fromInt(11184810); +var fuchsia = Color.fromInt(15733438); +var blue = Color.fromInt(29913); +var black$prime = Color.fromInt(1118481); +var aqua = Color.fromInt(8379391); +module.exports = { + navy: navy, + blue: blue, + aqua: aqua, + teal: teal, + olive: olive, + green: green, + lime: lime, + yellow: yellow, + orange: orange, + red: red, + maroon: maroon, + fuchsia: fuchsia, + purple: purple, + "black'": black$prime, + gray: gray, + silver: silver +}; +},{"../Color/index.js":"f3ma"}],"BG0s":[function(require,module,exports) { +function wrap(method) { + return function (d) { + return function (num) { + return method.apply(num, [d]); + }; + }; +} + +exports.toPrecisionNative = wrap(Number.prototype.toPrecision); +exports.toFixedNative = wrap(Number.prototype.toFixed); +exports.toExponentialNative = wrap(Number.prototype.toExponential); + +exports.toString = function (num) { + return num.toString(); +}; +},{}],"VX77":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Precision = function () { + function Precision(value0) { + this.value0 = value0; + } + + ; + + Precision.create = function (value0) { + return new Precision(value0); + }; + + return Precision; +}(); + +var Fixed = function () { + function Fixed(value0) { + this.value0 = value0; + } + + ; + + Fixed.create = function (value0) { + return new Fixed(value0); + }; + + return Fixed; +}(); + +var Exponential = function () { + function Exponential(value0) { + this.value0 = value0; + } + + ; + + Exponential.create = function (value0) { + return new Exponential(value0); + }; + + return Exponential; +}(); + +var toStringWith = function toStringWith(v) { + if (v instanceof Precision) { + return $foreign.toPrecisionNative(v.value0); + } + + ; + + if (v instanceof Fixed) { + return $foreign.toFixedNative(v.value0); + } + + ; + + if (v instanceof Exponential) { + return $foreign.toExponentialNative(v.value0); + } + + ; + throw new Error("Failed pattern match at Data.Number.Format (line 59, column 1 - line 59, column 40): " + [v.constructor.name]); +}; + +var precision = function () { + var $5 = Data_Ord.clamp(Data_Ord.ordInt)(1)(21); + return function ($6) { + return Precision.create($5($6)); + }; +}(); + +var fixed = function () { + var $7 = Data_Ord.clamp(Data_Ord.ordInt)(0)(20); + return function ($8) { + return Fixed.create($7($8)); + }; +}(); + +var exponential = function () { + var $9 = Data_Ord.clamp(Data_Ord.ordInt)(0)(20); + return function ($10) { + return Exponential.create($9($10)); + }; +}(); + +module.exports = { + precision: precision, + fixed: fixed, + exponential: exponential, + toStringWith: toStringWith, + toString: $foreign.toString +}; +},{"./foreign.js":"BG0s","../Data.Ord/index.js":"r4Vb"}],"KkC9":[function(require,module,exports) { +"use strict"; + +exports.unsafeCreateElementImpl = function (type, id, className) { + var c = document.createElement(type); + c.id = id; + c.className = className; + return c; +}; + +exports.initializeCanvasImpl = function (canvas, size) { + canvas.width = size.width; + canvas.height = size.height; + var ctx = canvas.getContext("2d"); + + if (ctx.imageSmoothingEnabled === true) { + ctx.imageSmoothingEnabled = false; + } + + ; +}; + +exports.setElementStyleImpl = function (e, k, v) { + e.style[k] = v; +}; + +exports.appendElem = function (cont) { + return function (canv) { + return function () { + cont.appendChild(canv); + }; + }; +}; + +exports.setContainerStyle = function (e) { + return function (dim) { + return function () { + e.style.position = "relative"; + e.style.border = "1px solid black"; + e.style.display = "block"; + e.style.margin = "0"; + e.style.padding = "0"; + e.style.width = dim.width - 2 + "px"; // remove 2px for the border + + e.style.height = dim.height + "px"; + }; + }; +}; + +exports.drawCopies = function (bfr, bfrDim, ctx, pred, ps) { + var w = Math.round(bfrDim.width); + var h = Math.round(bfrDim.height); + ps.forEach(function (p) { + if (pred(p)) { + ctx.drawImage(bfr, Math.floor(p.x - bfrDim.width / 2.0), Math.floor(p.y - bfrDim.height / 2.0)); + } + }); +}; + +exports.setCanvasTranslation = function (p) { + return function (c) { + return function () { + var ctx = c.getContext('2d'); + ctx.setTransform(1, 0, 0, 1, p.x, p.y); + }; + }; +}; + +exports.elementClickImpl = function (el, cb) { + el.addEventListener('mousedown', function (e) { + var rect = el.getBoundingClientRect(); + var x = e.clientX - rect.left + window.scrollX; + var y = e.clientY - rect.top + window.scrollY; + cb({ + x: x, + y: y + })(); + }); +}; // scrolls a canvas, given a "back buffer" canvas to copy the current context to + + +exports.scrollCanvasImpl = function (backCanvas, canvas, p) { + var bCtx = backCanvas.getContext('2d'); + bCtx.save(); + bCtx.globalCompositeOperation = "copy"; + bCtx.drawImage(canvas, 0, 0); + bCtx.restore(); + var ctx = canvas.getContext('2d'); + ctx.save(); + ctx.globalCompositeOperation = "copy"; + ctx.setTransform(1, 0, 0, 1, 0, 0); + ctx.drawImage(backCanvas, p.x, p.y); + ctx.restore(); +}; + +exports.zoomCanvasImpl = function (backCanvas, canvas, edges) { + var bCtx = backCanvas.getContext('2d'); + bCtx.save(); + bCtx.globalCompositeOperation = "copy"; + bCtx.drawImage(canvas, 0, 0); + bCtx.restore(); + var ctx = canvas.getContext('2d'); + var width = canvas.width; + var height = canvas.height; + var sx = edges.left * width; + var sWidth = (edges.right - edges.left) * width; + ctx.save(); + ctx.globalCompositeOperation = "copy"; + ctx.setTransform(1, 0, 0, 1, 0, 0); + ctx.drawImage(backCanvas, sx, 0.0, sWidth, height, 0.0, 0.0, width, height); + ctx.restore(); +}; + +exports.canvasDragImpl = function (canvas) { + return function (cb) { + return function () { + var cbInner = function cbInner(e) { + var startX = e.clientX; + var startY = e.clientY; + var lastX = e.clientX; + var lastY = e.clientY; + + var f = function f(e2) { + cb({ + during: { + x: lastX - e2.clientX, + y: lastY - e2.clientY + } + })(); + lastX = e2.clientX; + lastY = e2.clientY; + }; + + document.addEventListener('mousemove', f); + document.addEventListener('mouseup', function (e2) { + document.removeEventListener('mousemove', f); + cb({ + total: { + x: e2.clientX - startX, + y: e2.clientY - startY + } + })(); + }, { + once: true + }); + }; + + canvas.addEventListener('mousedown', cbInner); + return function () { + canvas.removeEventListener('mousedown', cbInner); + }; + }; + }; +}; + +exports.canvasWheelCBImpl = function (canvas) { + return function (cb) { + return function () { + var evCb = function evCb(e) { + e.preventDefault(); + var rect = canvas.getBoundingClientRect(); + var x = e.clientX - rect.left + window.scrollX; + var y = e.clientY - rect.top + window.scrollY; + cb({ + x: x, + y: y + })(Math.sign(e.deltaY))(); + }; + + canvas.addEventListener("wheel", evCb); + }; + }; +}; +},{}],"fCig":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js"); + +var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Maybe_First = require("../Data.Maybe.First/index.js"); + +var Data_Maybe_Last = require("../Data.Maybe.Last/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js"); + +var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js"); + +var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js"); + +var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js"); + +var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js"); + +var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var unfolded = function unfolded(dictMonoid) { + return function (f) { + return function (p) { + var go = function () { + var $43 = Data_Maybe.maybe(Data_Monoid.mempty(dictMonoid))(function (v) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(p)(v.value0))(go(v.value1)); + }); + return function ($44) { + return $43(f($44)); + }; + }(); + + return go; + }; + }; +}; + +var replicated = function replicated(dictMonoid) { + return function (i) { + return function (v) { + var go = function go(v1) { + return function (x) { + if (v1 === 0) { + return Data_Monoid.mempty(Data_Monoid.monoidFn(dictMonoid)); + } + + ; + return Data_Semigroup.append(Data_Semigroup.semigroupFn(dictMonoid.Semigroup0()))(x)(go(v1 - 1 | 0)(x)); + }; + }; + + return go(i)(v); + }; + }; +}; + +var ifoldMapOf = function ifoldMapOf(p) { + return function (f) { + return Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(p(Data_Lens_Internal_Indexed.Indexed(Data_Tuple.uncurry(f)))); + }; +}; + +var ifoldlOf = function ifoldlOf(p) { + return function (f) { + return function (r) { + var $45 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r); + var $46 = Data_Newtype.unwrap(Data_Newtype.newtypeDual); + var $47 = ifoldMapOf(p)(function (i) { + var $49 = Data_Function.flip(f(i)); + return function ($50) { + return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($49($50))); + }; + }); + return function ($48) { + return $45($46($47($48))); + }; + }; + }; +}; + +var ifoldrOf = function ifoldrOf(p) { + return function (f) { + return function (r) { + var $51 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r); + var $52 = ifoldMapOf(p)(function (i) { + var $54 = f(i); + return function ($55) { + return Data_Monoid_Endo.Endo($54($55)); + }; + }); + return function ($53) { + return $51($52($53)); + }; + }; + }; +}; + +var itoListOf = function itoListOf(p) { + return ifoldrOf(p)(function (i) { + return function (x) { + return function (xs) { + return new Data_List_Types.Cons(new Data_Tuple.Tuple(i, x), xs); + }; + }; + })(Data_List_Types.Nil.value); +}; + +var itraverseOf_ = function itraverseOf_(dictApplicative) { + return function (p) { + return function (f) { + return ifoldrOf(p)(function (i) { + return function (a) { + return function (fu) { + return Control_Apply.applySecond(dictApplicative.Apply0())(Data_Functor["void"](dictApplicative.Apply0().Functor0())(f(i)(a)))(fu); + }; + }; + })(Control_Applicative.pure(dictApplicative)(Data_Unit.unit)); + }; + }; +}; + +var iforOf_ = function iforOf_(dictApplicative) { + var $56 = itraverseOf_(dictApplicative); + return function ($57) { + return Data_Function.flip($56($57)); + }; +}; + +var ifindOf = function ifindOf(p) { + return function (f) { + return ifoldrOf(p)(function (i) { + return function (a) { + return Data_Maybe.maybe(function () { + var $37 = f(i)(a); + + if ($37) { + return new Data_Maybe.Just(a); + } + + ; + return Data_Maybe.Nothing.value; + }())(Data_Maybe.Just.create); + }; + })(Data_Maybe.Nothing.value); + }; +}; + +var ianyOf = function ianyOf(dictHeytingAlgebra) { + return function (p) { + return function (f) { + var $58 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj); + var $59 = ifoldMapOf(p)(function (i) { + var $61 = f(i); + return function ($62) { + return Data_Monoid_Disj.Disj($61($62)); + }; + }); + return function ($60) { + return $58($59($60)); + }; + }; + }; +}; + +var iallOf = function iallOf(dictHeytingAlgebra) { + return function (p) { + return function (f) { + var $63 = Data_Newtype.unwrap(Data_Newtype.newtypeConj); + var $64 = ifoldMapOf(p)(function (i) { + var $66 = f(i); + return function ($67) { + return Data_Monoid_Conj.Conj($66($67)); + }; + }); + return function ($65) { + return $63($64($65)); + }; + }; + }; +}; + +var folded = function folded(dictMonoid) { + return function (dictFoldable) { + return function (v) { + return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(v); + }; + }; +}; + +var foldMapOf = Data_Newtype.under(Data_Lens_Internal_Forget.newtypeForget)(Data_Lens_Internal_Forget.newtypeForget)(Data_Lens_Internal_Forget.Forget); + +var foldOf = function foldOf(p) { + return foldMapOf(p)(Control_Category.identity(Control_Category.categoryFn)); +}; + +var foldlOf = function foldlOf(p) { + return function (f) { + return function (r) { + var $68 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r); + var $69 = Data_Newtype.unwrap(Data_Newtype.newtypeDual); + var $70 = foldMapOf(p)(function () { + var $72 = Data_Function.flip(f); + return function ($73) { + return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($72($73))); + }; + }()); + return function ($71) { + return $68($69($70($71))); + }; + }; + }; +}; + +var foldrOf = function foldrOf(p) { + return function (f) { + return function (r) { + var $74 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r); + var $75 = foldMapOf(p)(function ($77) { + return Data_Monoid_Endo.Endo(f($77)); + }); + return function ($76) { + return $74($75($76)); + }; + }; + }; +}; + +var maximumOf = function maximumOf(dictOrd) { + return function (p) { + var max = function max(a) { + return function (b) { + var $39 = Data_Ord.greaterThan(dictOrd)(a)(b); + + if ($39) { + return a; + } + + ; + return b; + }; + }; + + return foldrOf(p)(function (a) { + var $78 = Data_Maybe.maybe(a)(max(a)); + return function ($79) { + return Data_Maybe.Just.create($78($79)); + }; + })(Data_Maybe.Nothing.value); + }; +}; + +var minimumOf = function minimumOf(dictOrd) { + return function (p) { + var min = function min(a) { + return function (b) { + var $40 = Data_Ord.lessThan(dictOrd)(a)(b); + + if ($40) { + return a; + } + + ; + return b; + }; + }; + + return foldrOf(p)(function (a) { + var $80 = Data_Maybe.maybe(a)(min(a)); + return function ($81) { + return Data_Maybe.Just.create($80($81)); + }; + })(Data_Maybe.Nothing.value); + }; +}; + +var toListOf = function toListOf(p) { + return foldrOf(p)(Data_List_Types.Cons.create)(Data_List_Types.Nil.value); +}; + +var toListOfOn = function toListOfOn(s) { + return function (p) { + return toListOf(p)(s); + }; +}; + +var traverseOf_ = function traverseOf_(dictApplicative) { + return function (p) { + return function (f) { + return foldrOf(p)(function (a) { + return function (fu) { + return Control_Apply.applySecond(dictApplicative.Apply0())(Data_Functor["void"](dictApplicative.Apply0().Functor0())(f(a)))(fu); + }; + })(Control_Applicative.pure(dictApplicative)(Data_Unit.unit)); + }; + }; +}; + +var has = function has(dictHeytingAlgebra) { + return function (p) { + var $82 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj); + var $83 = foldMapOf(p)(Data_Function["const"](Data_HeytingAlgebra.tt(dictHeytingAlgebra))); + return function ($84) { + return $82($83($84)); + }; + }; +}; + +var hasn$primet = function hasn$primet(dictHeytingAlgebra) { + return function (p) { + var $85 = Data_Newtype.unwrap(Data_Newtype.newtypeConj); + var $86 = foldMapOf(p)(Data_Function["const"](Data_HeytingAlgebra.ff(dictHeytingAlgebra))); + return function ($87) { + return $85($86($87)); + }; + }; +}; + +var lastOf = function lastOf(p) { + var $88 = Data_Newtype.unwrap(Data_Maybe_Last.newtypeLast); + var $89 = foldMapOf(p)(function ($91) { + return Data_Maybe_Last.Last(Data_Maybe.Just.create($91)); + }); + return function ($90) { + return $88($89($90)); + }; +}; + +var lengthOf = function lengthOf(p) { + var $92 = Data_Newtype.unwrap(Data_Newtype.newtypeAdditive); + var $93 = foldMapOf(p)(Data_Function["const"](1)); + return function ($94) { + return $92($93($94)); + }; +}; + +var preview = function preview(p) { + var $95 = Data_Newtype.unwrap(Data_Maybe_First.newtypeFirst); + var $96 = foldMapOf(p)(function ($98) { + return Data_Maybe_First.First(Data_Maybe.Just.create($98)); + }); + return function ($97) { + return $95($96($97)); + }; +}; + +var previewOn = function previewOn(s) { + return function (p) { + return preview(p)(s); + }; +}; + +var productOf = function productOf(dictSemiring) { + return function (p) { + var $99 = Data_Newtype.unwrap(Data_Newtype.newtypeMultiplicative); + var $100 = foldMapOf(p)(Data_Monoid_Multiplicative.Multiplicative); + return function ($101) { + return $99($100($101)); + }; + }; +}; + +var sequenceOf_ = function sequenceOf_(dictApplicative) { + return function (p) { + var $102 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(Control_Applicative.pure(dictApplicative)(Data_Unit.unit)); + var $103 = foldMapOf(p)(function (f) { + return function (v) { + return Control_Apply.applySecond(dictApplicative.Apply0())(f)(v); + }; + }); + return function ($104) { + return $102($103($104)); + }; + }; +}; + +var sumOf = function sumOf(dictSemiring) { + return function (p) { + var $105 = Data_Newtype.unwrap(Data_Newtype.newtypeAdditive); + var $106 = foldMapOf(p)(Data_Monoid_Additive.Additive); + return function ($107) { + return $105($106($107)); + }; + }; +}; + +var firstOf = function firstOf(p) { + var $108 = Data_Newtype.unwrap(Data_Maybe_First.newtypeFirst); + var $109 = foldMapOf(p)(function ($111) { + return Data_Maybe_First.First(Data_Maybe.Just.create($111)); + }); + return function ($110) { + return $108($109($110)); + }; +}; + +var findOf = function findOf(p) { + return function (f) { + return foldrOf(p)(function (a) { + return Data_Maybe.maybe(function () { + var $41 = f(a); + + if ($41) { + return new Data_Maybe.Just(a); + } + + ; + return Data_Maybe.Nothing.value; + }())(Data_Maybe.Just.create); + })(Data_Maybe.Nothing.value); + }; +}; + +var filtered = function filtered(dictChoice) { + return function (f) { + var $112 = Data_Profunctor.dimap(dictChoice.Profunctor0())(function (x) { + var $42 = f(x); + + if ($42) { + return new Data_Either.Right(x); + } + + ; + return new Data_Either.Left(x); + })(Data_Either.either(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn))); + var $113 = Data_Profunctor_Choice.right(dictChoice); + return function ($114) { + return $112($113($114)); + }; + }; +}; + +var anyOf = function anyOf(dictHeytingAlgebra) { + return function (p) { + return function (f) { + var $115 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj); + var $116 = foldMapOf(p)(function ($118) { + return Data_Monoid_Disj.Disj(f($118)); + }); + return function ($117) { + return $115($116($117)); + }; + }; + }; +}; + +var elemOf = function elemOf(dictEq) { + return function (p) { + return function (a) { + return anyOf(Data_HeytingAlgebra.heytingAlgebraBoolean)(p)(function (v) { + return Data_Eq.eq(dictEq)(v)(a); + }); + }; + }; +}; + +var orOf = function orOf(dictHeytingAlgebra) { + return function (p) { + return anyOf(dictHeytingAlgebra)(p)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var allOf = function allOf(dictHeytingAlgebra) { + return function (p) { + return function (f) { + var $119 = Data_Newtype.unwrap(Data_Newtype.newtypeConj); + var $120 = foldMapOf(p)(function ($122) { + return Data_Monoid_Conj.Conj(f($122)); + }); + return function ($121) { + return $119($120($121)); + }; + }; + }; +}; + +var andOf = function andOf(dictHeytingAlgebra) { + return function (p) { + return allOf(dictHeytingAlgebra)(p)(Control_Category.identity(Control_Category.categoryFn)); + }; +}; + +var notElemOf = function notElemOf(dictEq) { + return function (p) { + return function (a) { + return allOf(Data_HeytingAlgebra.heytingAlgebraBoolean)(p)(function (v) { + return Data_Eq.notEq(dictEq)(v)(a); + }); + }; + }; +}; + +module.exports = { + previewOn: previewOn, + toListOfOn: toListOfOn, + preview: preview, + foldOf: foldOf, + foldMapOf: foldMapOf, + foldrOf: foldrOf, + foldlOf: foldlOf, + toListOf: toListOf, + firstOf: firstOf, + lastOf: lastOf, + maximumOf: maximumOf, + minimumOf: minimumOf, + allOf: allOf, + anyOf: anyOf, + andOf: andOf, + orOf: orOf, + elemOf: elemOf, + notElemOf: notElemOf, + sumOf: sumOf, + productOf: productOf, + lengthOf: lengthOf, + findOf: findOf, + sequenceOf_: sequenceOf_, + traverseOf_: traverseOf_, + has: has, + "hasn't": hasn$primet, + replicated: replicated, + filtered: filtered, + folded: folded, + unfolded: unfolded, + ifoldMapOf: ifoldMapOf, + ifoldrOf: ifoldrOf, + ifoldlOf: ifoldlOf, + iallOf: iallOf, + ianyOf: ianyOf, + itoListOf: itoListOf, + itraverseOf_: itraverseOf_ +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.Lens.Internal.Indexed/index.js":"V4/H","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Maybe.First/index.js":"W/l6","../Data.Maybe.Last/index.js":"aQky","../Data.Monoid/index.js":"TiEB","../Data.Monoid.Additive/index.js":"fHyj","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Endo/index.js":"2o47","../Data.Monoid.Multiplicative/index.js":"y5cd","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk"}],"KFxX":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js"); + +var Market = function () { + function Market(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Market.create = function (value0) { + return function (value1) { + return new Market(value0, value1); + }; + }; + + return Market; +}(); + +var profunctorMarket = new Data_Profunctor.Profunctor(function (f) { + return function (g) { + return function (v) { + return new Market(function ($19) { + return g(v.value0($19)); + }, function () { + var $20 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(g); + return function ($21) { + return $20(v.value1(f($21))); + }; + }()); + }; + }; +}); +var functorMarket = new Data_Functor.Functor(function (f) { + return function (v) { + return new Market(function ($22) { + return f(v.value0($22)); + }, function () { + var $23 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(f); + return function ($24) { + return $23(v.value1($24)); + }; + }()); + }; +}); +var choiceMarket = new Data_Profunctor_Choice.Choice(function () { + return profunctorMarket; +}, function (v) { + return new Market(function ($25) { + return Data_Either.Left.create(v.value0($25)); + }, Data_Either.either(function () { + var $26 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Either.Left.create); + return function ($27) { + return $26(v.value1($27)); + }; + }())(function ($28) { + return Data_Either.Left.create(Data_Either.Right.create($28)); + })); +}, function (v) { + return new Market(function ($29) { + return Data_Either.Right.create(v.value0($29)); + }, Data_Either.either(function ($30) { + return Data_Either.Left.create(Data_Either.Left.create($30)); + })(function () { + var $31 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Either.Right.create); + return function ($32) { + return $31(v.value1($32)); + }; + }())); +}); +module.exports = { + Market: Market, + functorMarket: functorMarket, + profunctorMarket: profunctorMarket, + choiceMarket: choiceMarket +}; +},{"../Data.Bifunctor/index.js":"e2Wc","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb"}],"h1YV":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js"); + +var Data_Profunctor_Closed = require("../Data.Profunctor.Closed/index.js"); + +var Data_Profunctor_Costrong = require("../Data.Profunctor.Costrong/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Tagged = function Tagged(x) { + return x; +}; + +var taggedProfunctor = new Data_Profunctor.Profunctor(function (v) { + return function (g) { + return function (v1) { + return g(v1); + }; + }; +}); +var taggedCostrong = new Data_Profunctor_Costrong.Costrong(function () { + return taggedProfunctor; +}, function (v) { + return v.value0; +}, function (v) { + return v.value1; +}); +var taggedClosed = new Data_Profunctor_Closed.Closed(function () { + return taggedProfunctor; +}, function (v) { + return Data_Function["const"](v); +}); +var taggedChoice = new Data_Profunctor_Choice.Choice(function () { + return taggedProfunctor; +}, function (v) { + return new Data_Either.Left(v); +}, function (v) { + return new Data_Either.Right(v); +}); +var newtypeTagged = new Data_Newtype.Newtype(function (n) { + return n; +}, Tagged); +var functorTagged = new Data_Functor.Functor(function (f) { + return function (m) { + return f(m); + }; +}); +var foldableTagged = new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return function (v) { + return f(v); + }; + }; +}, function (f) { + return function (b) { + return function (v) { + return f(b)(v); + }; + }; +}, function (f) { + return function (b) { + return function (v) { + return f(v)(b); + }; + }; +}); +var traversableTagged = new Data_Traversable.Traversable(function () { + return foldableTagged; +}, function () { + return functorTagged; +}, function (dictApplicative) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tagged)(v); + }; +}, function (dictApplicative) { + return function (f) { + return function (v) { + return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tagged)(f(v)); + }; + }; +}); + +var eqTagged = function eqTagged(dictEq) { + return new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(dictEq)(x)(y); + }; + }); +}; + +var ordTagged = function ordTagged(dictOrd) { + return new Data_Ord.Ord(function () { + return eqTagged(dictOrd.Eq0()); + }, function (x) { + return function (y) { + return Data_Ord.compare(dictOrd)(x)(y); + }; + }); +}; + +var eq1Tagged = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqTagged(dictEq)); +}); +var ord1Tagged = new Data_Ord.Ord1(function () { + return eq1Tagged; +}, function (dictOrd) { + return Data_Ord.compare(ordTagged(dictOrd)); +}); +module.exports = { + Tagged: Tagged, + newtypeTagged: newtypeTagged, + eqTagged: eqTagged, + eq1Tagged: eq1Tagged, + ordTagged: ordTagged, + ord1Tagged: ord1Tagged, + functorTagged: functorTagged, + taggedProfunctor: taggedProfunctor, + taggedChoice: taggedChoice, + taggedCostrong: taggedCostrong, + taggedClosed: taggedClosed, + foldableTagged: foldableTagged, + traversableTagged: traversableTagged +}; +},{"../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Profunctor.Closed/index.js":"af4y","../Data.Profunctor.Costrong/index.js":"NfU6","../Data.Traversable/index.js":"n7EE"}],"4AcV":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Lens_Internal_Market = require("../Data.Lens.Internal.Market/index.js"); + +var Data_Lens_Internal_Tagged = require("../Data.Lens.Internal.Tagged/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js"); + +var withPrism = function withPrism(l) { + return function (f) { + var v = l(new Data_Lens_Internal_Market.Market(Control_Category.identity(Control_Category.categoryFn), Data_Either.Right.create)); + return f(v.value0)(v.value1); + }; +}; + +var review = Data_Newtype.under(Data_Lens_Internal_Tagged.newtypeTagged)(Data_Lens_Internal_Tagged.newtypeTagged)(Data_Lens_Internal_Tagged.Tagged); + +var prism = function prism(to) { + return function (fro) { + return function (dictChoice) { + return function (pab) { + return Data_Profunctor.dimap(dictChoice.Profunctor0())(fro)(Data_Either.either(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn)))(Data_Profunctor_Choice.right(dictChoice)(Data_Profunctor.rmap(dictChoice.Profunctor0())(to)(pab))); + }; + }; + }; +}; + +var prism$prime = function prism$prime(to) { + return function (fro) { + return function (dictChoice) { + return prism(to)(function (s) { + return Data_Maybe.maybe(new Data_Either.Left(s))(Data_Either.Right.create)(fro(s)); + })(dictChoice); + }; + }; +}; + +var nearly = function nearly(x) { + return function (f) { + return function (dictChoice) { + return prism$prime(Data_Function["const"](x))(function () { + var $14 = Control_MonadZero.guard(Data_Maybe.monadZeroMaybe); + return function ($15) { + return $14(f($15)); + }; + }())(dictChoice); + }; + }; +}; + +var only = function only(dictEq) { + return function (x) { + return function (dictChoice) { + return nearly(x)(function (v) { + return Data_Eq.eq(dictEq)(v)(x); + })(dictChoice); + }; + }; +}; + +var matching = function matching(l) { + return withPrism(l)(function (v) { + return function (f) { + return f; + }; + }); +}; + +var is = function is(dictHeytingAlgebra) { + return function (l) { + var $16 = Data_Either.either(Data_Function["const"](Data_HeytingAlgebra.ff(dictHeytingAlgebra)))(Data_Function["const"](Data_HeytingAlgebra.tt(dictHeytingAlgebra))); + var $17 = matching(l); + return function ($18) { + return $16($17($18)); + }; + }; +}; + +var isn$primet = function isn$primet(dictHeytingAlgebra) { + return function (l) { + var $19 = Data_HeytingAlgebra.not(dictHeytingAlgebra); + var $20 = is(dictHeytingAlgebra)(l); + return function ($21) { + return $19($20($21)); + }; + }; +}; + +var clonePrism = function clonePrism(l) { + return function (dictChoice) { + return withPrism(l)(function (x) { + return function (y) { + return function (p) { + return prism(x)(y)(dictChoice)(p); + }; + }; + }); + }; +}; + +module.exports = { + "prism'": prism$prime, + prism: prism, + only: only, + nearly: nearly, + review: review, + is: is, + "isn't": isn$primet, + matching: matching, + clonePrism: clonePrism, + withPrism: withPrism +}; +},{"../Control.Category/index.js":"IAi2","../Control.MonadZero/index.js":"lD5R","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.HeytingAlgebra/index.js":"paZe","../Data.Lens.Internal.Market/index.js":"KFxX","../Data.Lens.Internal.Tagged/index.js":"h1YV","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb"}],"kg0W":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Shop = function () { + function Shop(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Shop.create = function (value0) { + return function (value1) { + return new Shop(value0, value1); + }; + }; + + return Shop; +}(); + +var profunctorShop = new Data_Profunctor.Profunctor(function (f) { + return function (g) { + return function (v) { + return new Shop(function ($30) { + return v.value0(f($30)); + }, function (s) { + var $31 = v.value1(f(s)); + return function ($32) { + return g($31($32)); + }; + }); + }; + }; +}); +var strongShop = new Data_Profunctor_Strong.Strong(function () { + return profunctorShop; +}, function (v) { + return new Shop(function (v1) { + return v.value0(v1.value0); + }, function (v1) { + return function (b) { + return new Data_Tuple.Tuple(v.value1(v1.value0)(b), v1.value1); + }; + }); +}, function (v) { + return new Shop(function (v1) { + return v.value0(v1.value1); + }, function (v1) { + return function (b) { + return new Data_Tuple.Tuple(v1.value0, v.value1(v1.value1)(b)); + }; + }); +}); +module.exports = { + Shop: Shop, + profunctorShop: profunctorShop, + strongShop: strongShop +}; +},{"../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Strong/index.js":"w9p6","../Data.Tuple/index.js":"II/O"}],"hi+g":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js"); + +var Data_Lens_Internal_Shop = require("../Data.Lens.Internal.Shop/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Profunctor = require("../Data.Profunctor/index.js"); + +var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var withLens = function withLens(l) { + return function (f) { + var v = l(new Data_Lens_Internal_Shop.Shop(Control_Category.identity(Control_Category.categoryFn), function (v1) { + return function (b) { + return b; + }; + })); + return f(v.value0)(v.value1); + }; +}; + +var withIndexedLens = function withIndexedLens(l) { + return function (f) { + var v = l(new Data_Lens_Internal_Shop.Shop(Control_Category.identity(Control_Category.categoryFn), function (v1) { + return function (b) { + return b; + }; + })); + return f(v.value0)(v.value1); + }; +}; + +var lens$prime = function lens$prime(to) { + return function (dictStrong) { + return function (pab) { + return Data_Profunctor.dimap(dictStrong.Profunctor0())(to)(function (v) { + return v.value1(v.value0); + })(Data_Profunctor_Strong.first(dictStrong)(pab)); + }; + }; +}; + +var lens = function lens(get) { + return function (set) { + return function (dictStrong) { + return lens$prime(function (s) { + return new Data_Tuple.Tuple(get(s), function (b) { + return set(s)(b); + }); + })(dictStrong); + }; + }; +}; + +var ilens$prime = function ilens$prime(to) { + return function (dictStrong) { + return function (pab) { + return Data_Profunctor.dimap(dictStrong.Profunctor0())(to)(function (v) { + return v.value1(v.value0); + })(Data_Profunctor_Strong.first(dictStrong)(Data_Newtype.un(Data_Lens_Internal_Indexed.newtypeIndexed)(Data_Lens_Internal_Indexed.Indexed)(pab))); + }; + }; +}; + +var ilens = function ilens(get) { + return function (set) { + return function (dictStrong) { + return ilens$prime(function (s) { + return new Data_Tuple.Tuple(get(s), function (b) { + return set(s)(b); + }); + })(dictStrong); + }; + }; +}; + +var cloneLens = function cloneLens(l) { + return function (dictStrong) { + return withLens(l)(function (x) { + return function (y) { + return function (p) { + return lens(x)(y)(dictStrong)(p); + }; + }; + }); + }; +}; + +var cloneIndexedLens = function cloneIndexedLens(l) { + return function (dictStrong) { + return withIndexedLens(l)(function (x) { + return function (y) { + return function (p) { + return ilens(x)(y)(dictStrong)(p); + }; + }; + }); + }; +}; + +module.exports = { + lens: lens, + "lens'": lens$prime, + withLens: withLens, + cloneLens: cloneLens, + ilens: ilens, + "ilens'": ilens$prime, + withIndexedLens: withIndexedLens, + cloneIndexedLens: cloneIndexedLens +}; +},{"../Control.Category/index.js":"IAi2","../Data.Lens.Internal.Indexed/index.js":"V4/H","../Data.Lens.Internal.Shop/index.js":"kg0W","../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Strong/index.js":"w9p6","../Data.Tuple/index.js":"II/O"}],"nwoH":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Lens_Lens = require("../Data.Lens.Lens/index.js"); + +var Record = require("../Record/index.js"); + +var prop = function prop(dictIsSymbol) { + return function (dictCons) { + return function (dictCons1) { + return function (l) { + return function (dictStrong) { + return Data_Lens_Lens.lens(Record.get(dictIsSymbol)(dictCons)(l))(Data_Function.flip(Record.set(dictIsSymbol)(dictCons)(dictCons1)(l)))(dictStrong); + }; + }; + }; + }; +}; + +module.exports = { + prop: prop +}; +},{"../Data.Function/index.js":"ImXJ","../Data.Lens.Lens/index.js":"hi+g","../Record/index.js":"0gG4"}],"62zx":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Map_Internal = require("../Data.Map.Internal/index.js"); + +var keys = function () { + var $0 = Data_Functor["void"](Data_Map_Internal.functorMap); + return function ($1) { + return $0($1); + }; +}(); + +module.exports = { + keys: keys +}; +},{"../Data.Functor/index.js":"+0AE","../Data.Map.Internal/index.js":"RRDs"}],"10U2":[function(require,module,exports) { +"use strict"; + +exports["null"] = null; + +exports.nullable = function (a, r, f) { + return a == null ? r : f(a); +}; + +exports.notNull = function (x) { + return x; +}; +},{}],"YQ8o":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var toNullable = Data_Maybe.maybe($foreign["null"])($foreign.notNull); + +var toMaybe = function toMaybe(n) { + return $foreign.nullable(n, Data_Maybe.Nothing.value, Data_Maybe.Just.create); +}; + +var showNullable = function showNullable(dictShow) { + return new Data_Show.Show(function () { + var $5 = Data_Maybe.maybe("null")(Data_Show.show(dictShow)); + return function ($6) { + return $5(toMaybe($6)); + }; + }()); +}; + +var eqNullable = function eqNullable(dictEq) { + return new Data_Eq.Eq(Data_Function.on(Data_Eq.eq(Data_Maybe.eqMaybe(dictEq)))(toMaybe)); +}; + +var ordNullable = function ordNullable(dictOrd) { + return new Data_Ord.Ord(function () { + return eqNullable(dictOrd.Eq0()); + }, Data_Function.on(Data_Ord.compare(Data_Maybe.ordMaybe(dictOrd)))(toMaybe)); +}; + +var eq1Nullable = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqNullable(dictEq)); +}); +var ord1Nullable = new Data_Ord.Ord1(function () { + return eq1Nullable; +}, function (dictOrd) { + return Data_Ord.compare(ordNullable(dictOrd)); +}); +module.exports = { + toMaybe: toMaybe, + toNullable: toNullable, + showNullable: showNullable, + eqNullable: eqNullable, + eq1Nullable: eq1Nullable, + ordNullable: ordNullable, + ord1Nullable: ord1Nullable, + "null": $foreign["null"], + notNull: $foreign.notNull +}; +},{"./foreign.js":"10U2","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7"}],"+Eae":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_Array_ST = require("../Data.Array.ST/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_List = require("../Data.List/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Map_Internal = require("../Data.Map.Internal/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var $$Set = function $$Set(x) { + return x; +}; + +var union = function union(dictOrd) { + return function (v) { + return function (v1) { + return Data_Map_Internal.union(dictOrd)(v)(v1); + }; + }; +}; + +var toList = function toList(v) { + return Data_Map_Internal.keys(v); +}; + +var toUnfoldable = function toUnfoldable(dictUnfoldable) { + var $64 = Data_List.toUnfoldable(dictUnfoldable); + return function ($65) { + return $64(toList($65)); + }; +}; + +var size = function size(v) { + return Data_Map_Internal.size(v); +}; + +var singleton = function singleton(a) { + return Data_Map_Internal.singleton(a)(Data_Unit.unit); +}; + +var showSet = function showSet(dictShow) { + return new Data_Show.Show(function (s) { + return "(fromFoldable " + (Data_Show.show(Data_List_Types.showList(dictShow))(toList(s)) + ")"); + }); +}; + +var semigroupSet = function semigroupSet(dictOrd) { + return new Data_Semigroup.Semigroup(union(dictOrd)); +}; + +var member = function member(dictOrd) { + return function (a) { + return function (v) { + return Data_Map_Internal.member(dictOrd)(a)(v); + }; + }; +}; + +var isEmpty = function isEmpty(v) { + return Data_Map_Internal.isEmpty(v); +}; + +var insert = function insert(dictOrd) { + return function (a) { + return function (v) { + return Data_Map_Internal.insert(dictOrd)(a)(Data_Unit.unit)(v); + }; + }; +}; + +var foldableSet = new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + var $66 = Data_Foldable.foldMap(Data_List_Types.foldableList)(dictMonoid)(f); + return function ($67) { + return $66(toList($67)); + }; + }; +}, function (f) { + return function (x) { + var $68 = Data_Foldable.foldl(Data_List_Types.foldableList)(f)(x); + return function ($69) { + return $68(toList($69)); + }; + }; +}, function (f) { + return function (x) { + var $70 = Data_Foldable.foldr(Data_List_Types.foldableList)(f)(x); + return function ($71) { + return $70(toList($71)); + }; + }; +}); + +var findMin = function findMin(v) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) { + return v1.key; + })(Data_Map_Internal.findMin(v)); +}; + +var findMax = function findMax(v) { + return Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) { + return v1.key; + })(Data_Map_Internal.findMax(v)); +}; + +var filter = function filter(dictOrd) { + return function (f) { + return function (v) { + return Data_Map_Internal.filterWithKey(dictOrd)(function (k) { + return function (v1) { + return f(k); + }; + })(v); + }; + }; +}; + +var eqSet = function eqSet(dictEq) { + return new Data_Eq.Eq(function (v) { + return function (v1) { + return Data_Eq.eq(Data_Map_Internal.eqMap(dictEq)(Data_Eq.eqUnit))(v)(v1); + }; + }); +}; + +var ordSet = function ordSet(dictOrd) { + return new Data_Ord.Ord(function () { + return eqSet(dictOrd.Eq0()); + }, function (s1) { + return function (s2) { + return Data_Ord.compare(Data_List_Types.ordList(dictOrd))(toList(s1))(toList(s2)); + }; + }); +}; + +var eq1Set = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqSet(dictEq)); +}); +var ord1Set = new Data_Ord.Ord1(function () { + return eq1Set; +}, function (dictOrd) { + return Data_Ord.compare(ordSet(dictOrd)); +}); +var empty = Data_Map_Internal.empty; + +var fromFoldable = function fromFoldable(dictFoldable) { + return function (dictOrd) { + return Data_Foldable.foldl(dictFoldable)(function (m) { + return function (a) { + return insert(dictOrd)(a)(m); + }; + })(empty); + }; +}; + +var intersection = function intersection(dictOrd) { + return function (s1) { + return function (s2) { + var toArray = function () { + var $72 = Data_Array.fromFoldable(Data_List_Types.foldableList); + return function ($73) { + return $72(toList($73)); + }; + }(); + + var rs = toArray(s2); + var rl = Data_Array.length(rs); + var ls = toArray(s1); + var ll = Data_Array.length(ls); + + var intersect = function intersect(acc) { + var go = function go(l) { + return function (r) { + var $59 = l < ll && r < rl; + + if ($59) { + var v = Data_Ord.compare(dictOrd)(ls[l])(rs[r]); + + if (v instanceof Data_Ordering.EQ) { + return function __do() { + var v1 = Data_Array_ST.push(ls[l])(acc)(); + return new Control_Monad_Rec_Class.Loop({ + a: l + 1 | 0, + b: r + 1 | 0 + }); + }; + } + + ; + + if (v instanceof Data_Ordering.LT) { + return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(new Control_Monad_Rec_Class.Loop({ + a: l + 1 | 0, + b: r + })); + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(new Control_Monad_Rec_Class.Loop({ + a: l, + b: r + 1 | 0 + })); + } + + ; + throw new Error("Failed pattern match at Data.Set (line 176, column 12 - line 181, column 43): " + [v.constructor.name]); + } + + ; + return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(new Control_Monad_Rec_Class.Done(acc)); + }; + }; + + return Control_Monad_Rec_Class.tailRecM2(Control_Monad_ST_Internal.monadRecST)(go)(0)(0); + }; + + return fromFoldable(Data_Foldable.foldableArray)(dictOrd)(Control_Bind.bind(Control_Monad_ST_Internal.bindST)(Control_Bind.bind(Control_Monad_ST_Internal.bindST)(Data_Array_ST.empty)(intersect))(Data_Array_ST.unsafeFreeze)()); + }; + }; +}; + +var map = function map(dictOrd) { + return function (f) { + return Data_Foldable.foldl(foldableSet)(function (m) { + return function (a) { + return insert(dictOrd)(f(a))(m); + }; + })(empty); + }; +}; + +var mapMaybe = function mapMaybe(dictOrd) { + return function (f) { + return Data_Foldable.foldr(foldableSet)(function (a) { + return function (acc) { + return Data_Maybe.maybe(acc)(function (b) { + return insert(dictOrd)(b)(acc); + })(f(a)); + }; + })(empty); + }; +}; + +var monoidSet = function monoidSet(dictOrd) { + return new Data_Monoid.Monoid(function () { + return semigroupSet(dictOrd); + }, empty); +}; + +var unions = function unions(dictFoldable) { + return function (dictOrd) { + return Data_Foldable.foldl(dictFoldable)(union(dictOrd))(empty); + }; +}; + +var $$delete = function $$delete(dictOrd) { + return function (a) { + return function (v) { + return Data_Map_Internal["delete"](dictOrd)(a)(v); + }; + }; +}; + +var difference = function difference(dictOrd) { + return function (s1) { + return function (s2) { + return Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip($$delete(dictOrd)))(s1)(toList(s2)); + }; + }; +}; + +var subset = function subset(dictOrd) { + return function (s1) { + return function (s2) { + return isEmpty(difference(dictOrd)(s1)(s2)); + }; + }; +}; + +var properSubset = function properSubset(dictOrd) { + return function (s1) { + return function (s2) { + return subset(dictOrd)(s1)(s2) && Data_Eq.notEq(eqSet(dictOrd.Eq0()))(s1)(s2); + }; + }; +}; + +var checkValid = function checkValid(v) { + return Data_Map_Internal.checkValid(v); +}; + +module.exports = { + fromFoldable: fromFoldable, + toUnfoldable: toUnfoldable, + empty: empty, + isEmpty: isEmpty, + singleton: singleton, + map: map, + checkValid: checkValid, + insert: insert, + member: member, + "delete": $$delete, + size: size, + findMin: findMin, + findMax: findMax, + union: union, + unions: unions, + difference: difference, + subset: subset, + properSubset: properSubset, + intersection: intersection, + filter: filter, + mapMaybe: mapMaybe, + eqSet: eqSet, + eq1Set: eq1Set, + showSet: showSet, + ordSet: ordSet, + ord1Set: ord1Set, + monoidSet: monoidSet, + semigroupSet: semigroupSet, + foldableSet: foldableSet +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.ST.Internal/index.js":"Sedc","../Data.Array/index.js":"4t4C","../Data.Array.ST/index.js":"s8si","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Unit/index.js":"NhVk"}],"NCVa":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js"); + +var Control_MonadPlus = require("../Control.MonadPlus/index.js"); + +var Control_MonadZero = require("../Control.MonadZero/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Lazy = require("../Data.Lazy/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var Yield = function () { + function Yield(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Yield.create = function (value0) { + return function (value1) { + return new Yield(value0, value1); + }; + }; + + return Yield; +}(); + +var Skip = function () { + function Skip(value0) { + this.value0 = value0; + } + + ; + + Skip.create = function (value0) { + return new Skip(value0); + }; + + return Skip; +}(); + +var Done = function () { + function Done() {} + + ; + Done.value = new Done(); + return Done; +}(); + +var ListT = function ListT(x) { + return x; +}; + +var wrapLazy = function wrapLazy(dictApplicative) { + return function (v) { + return ListT(Control_Applicative.pure(dictApplicative)(new Skip(v))); + }; +}; + +var wrapEffect = function wrapEffect(dictFunctor) { + return function (v) { + return ListT(Data_Functor.map(dictFunctor)(function ($187) { + return Skip.create(Data_Lazy.defer(Data_Function["const"]($187))); + })(v)); + }; +}; + +var unfold = function unfold(dictMonad) { + return function (f) { + return function (z) { + var g = function g(v) { + if (v instanceof Data_Maybe.Just) { + return new Yield(v.value0.value1, Data_Lazy.defer(function (v1) { + return unfold(dictMonad)(f)(v.value0.value0); + })); + } + + ; + + if (v instanceof Data_Maybe.Nothing) { + return Done.value; + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 130, column 3 - line 130, column 60): " + [v.constructor.name]); + }; + + return ListT(Data_Functor.map(dictMonad.Bind1().Apply0().Functor0())(g)(f(z))); + }; + }; +}; + +var uncons = function uncons(dictMonad) { + return function (v) { + var g = function g(v1) { + if (v1 instanceof Yield) { + return Control_Applicative.pure(dictMonad.Applicative0())(Data_Maybe.Just.create(new Data_Tuple.Tuple(v1.value0, Data_Lazy.force(v1.value1)))); + } + + ; + + if (v1 instanceof Skip) { + return uncons(dictMonad)(Data_Lazy.force(v1.value0)); + } + + ; + + if (v1 instanceof Done) { + return Control_Applicative.pure(dictMonad.Applicative0())(Data_Maybe.Nothing.value); + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 195, column 3 - line 195, column 50): " + [v1.constructor.name]); + }; + + return Control_Bind.bind(dictMonad.Bind1())(v)(g); + }; +}; + +var tail = function tail(dictMonad) { + return function (l) { + return Data_Functor.map(dictMonad.Bind1().Apply0().Functor0())(Data_Functor.map(Data_Maybe.functorMaybe)(Data_Tuple.snd))(uncons(dictMonad)(l)); + }; +}; + +var stepMap = function stepMap(dictFunctor) { + return function (f) { + return function (v) { + return ListT(Data_Functor.map(dictFunctor)(f)(v)); + }; + }; +}; + +var takeWhile = function takeWhile(dictApplicative) { + return function (f) { + var g = function g(v) { + if (v instanceof Yield) { + var $101 = f(v.value0); + + if ($101) { + return new Yield(v.value0, Data_Functor.map(Data_Lazy.functorLazy)(takeWhile(dictApplicative)(f))(v.value1)); + } + + ; + return Done.value; + } + + ; + + if (v instanceof Skip) { + return Skip.create(Data_Functor.map(Data_Lazy.functorLazy)(takeWhile(dictApplicative)(f))(v.value0)); + } + + ; + + if (v instanceof Done) { + return Done.value; + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 154, column 3 - line 154, column 68): " + [v.constructor.name]); + }; + + return stepMap(dictApplicative.Apply0().Functor0())(g); + }; +}; + +var scanl = function scanl(dictMonad) { + return function (f) { + return function (b) { + return function (l) { + var g = function g(v) { + var h = function h(v1) { + if (v1 instanceof Yield) { + var b$prime$prime = f(v.value0)(v1.value0); + return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(b$prime$prime, Data_Lazy.force(v1.value1)), v.value0)); + } + + ; + + if (v1 instanceof Skip) { + return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0, Data_Lazy.force(v1.value0)), v.value0)); + } + + ; + + if (v1 instanceof Done) { + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 248, column 5 - line 248, column 78): " + [v1.constructor.name]); + }; + + return Data_Functor.map(dictMonad.Bind1().Apply0().Functor0())(h)(v.value1); + }; + + return unfold(dictMonad)(g)(new Data_Tuple.Tuple(b, l)); + }; + }; + }; +}; + +var prepend$prime = function prepend$prime(dictApplicative) { + return function (h) { + return function (t) { + return ListT(Control_Applicative.pure(dictApplicative)(new Yield(h, t))); + }; + }; +}; + +var prepend = function prepend(dictApplicative) { + return function (h) { + return function (t) { + return prepend$prime(dictApplicative)(h)(Data_Lazy.defer(Data_Function["const"](t))); + }; + }; +}; + +var nil = function nil(dictApplicative) { + return ListT(Control_Applicative.pure(dictApplicative)(Done.value)); +}; + +var singleton = function singleton(dictApplicative) { + return function (a) { + return prepend(dictApplicative)(a)(nil(dictApplicative)); + }; +}; + +var take = function take(dictApplicative) { + return function (v) { + return function (fa) { + if (v === 0) { + return nil(dictApplicative); + } + + ; + + var f = function f(v1) { + if (v1 instanceof Yield) { + return new Yield(v1.value0, Data_Functor.map(Data_Lazy.functorLazy)(take(dictApplicative)(v - 1 | 0))(v1.value1)); + } + + ; + + if (v1 instanceof Skip) { + return new Skip(Data_Functor.map(Data_Lazy.functorLazy)(take(dictApplicative)(v))(v1.value0)); + } + + ; + + if (v1 instanceof Done) { + return Done.value; + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 147, column 3 - line 147, column 47): " + [v1.constructor.name]); + }; + + return stepMap(dictApplicative.Apply0().Functor0())(f)(fa); + }; + }; +}; + +var zipWith$prime = function zipWith$prime(dictMonad) { + return function (f) { + var g = function g(v) { + return function (v1) { + if (v1 instanceof Data_Maybe.Nothing) { + return Control_Applicative.pure(dictMonad.Applicative0())(nil(dictMonad.Applicative0())); + } + + ; + + if (v instanceof Data_Maybe.Nothing) { + return Control_Applicative.pure(dictMonad.Applicative0())(nil(dictMonad.Applicative0())); + } + + ; + + if (v instanceof Data_Maybe.Just && v1 instanceof Data_Maybe.Just) { + return Data_Functor.map(dictMonad.Bind1().Apply0().Functor0())(Data_Function.flip(prepend$prime(dictMonad.Applicative0()))(Data_Lazy.defer(function (v2) { + return zipWith$prime(dictMonad)(f)(v.value0.value1)(v1.value0.value1); + })))(f(v.value0.value0)(v1.value0.value0)); + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 260, column 3 - line 260, column 25): " + [v.constructor.name, v1.constructor.name]); + }; + }; + + var loop = function loop(fa) { + return function (fb) { + return wrapEffect(dictMonad.Bind1().Apply0().Functor0())(Control_Bind.bind(dictMonad.Bind1())(uncons(dictMonad)(fa))(function (v) { + return Control_Bind.bind(dictMonad.Bind1())(uncons(dictMonad)(fb))(function (v1) { + return g(v)(v1); + }); + })); + }; + }; + + return loop; + }; +}; + +var zipWith = function zipWith(dictMonad) { + return function (f) { + var g = function g(a) { + return function (b) { + return Control_Applicative.pure(dictMonad.Applicative0())(f(a)(b)); + }; + }; + + return zipWith$prime(dictMonad)(g); + }; +}; + +var newtypeListT = new Data_Newtype.Newtype(function (n) { + return n; +}, ListT); + +var mapMaybe = function mapMaybe(dictFunctor) { + return function (f) { + var g = function g(v) { + if (v instanceof Yield) { + return Data_Maybe.fromMaybe(Skip.create)(Data_Functor.map(Data_Maybe.functorMaybe)(Yield.create)(f(v.value0)))(Data_Functor.map(Data_Lazy.functorLazy)(mapMaybe(dictFunctor)(f))(v.value1)); + } + + ; + + if (v instanceof Skip) { + return Skip.create(Data_Functor.map(Data_Lazy.functorLazy)(mapMaybe(dictFunctor)(f))(v.value0)); + } + + ; + + if (v instanceof Done) { + return Done.value; + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 183, column 3 - line 183, column 72): " + [v.constructor.name]); + }; + + return stepMap(dictFunctor)(g); + }; +}; + +var iterate = function iterate(dictMonad) { + return function (f) { + return function (a) { + var g = function g(x) { + return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Maybe.Just(new Data_Tuple.Tuple(f(x), x))); + }; + + return unfold(dictMonad)(g)(a); + }; + }; +}; + +var repeat = function repeat(dictMonad) { + return iterate(dictMonad)(Control_Category.identity(Control_Category.categoryFn)); +}; + +var head = function head(dictMonad) { + return function (l) { + return Data_Functor.map(dictMonad.Bind1().Apply0().Functor0())(Data_Functor.map(Data_Maybe.functorMaybe)(Data_Tuple.fst))(uncons(dictMonad)(l)); + }; +}; + +var functorListT = function functorListT(dictFunctor) { + return new Data_Functor.Functor(function (f) { + var g = function g(v) { + if (v instanceof Yield) { + return new Yield(f(v.value0), Data_Functor.map(Data_Lazy.functorLazy)(Data_Functor.map(functorListT(dictFunctor))(f))(v.value1)); + } + + ; + + if (v instanceof Skip) { + return new Skip(Data_Functor.map(Data_Lazy.functorLazy)(Data_Functor.map(functorListT(dictFunctor))(f))(v.value0)); + } + + ; + + if (v instanceof Done) { + return Done.value; + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 280, column 5 - line 280, column 48): " + [v.constructor.name]); + }; + + return stepMap(dictFunctor)(g); + }); +}; + +var fromEffect = function fromEffect(dictApplicative) { + return function (fa) { + return ListT(Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Function.flip(Yield.create)(Data_Lazy.defer(function (v) { + return nil(dictApplicative); + })))(fa)); + }; +}; + +var monadTransListT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) { + return fromEffect(dictMonad.Applicative0()); +}); + +var foldlRec$prime = function foldlRec$prime(dictMonadRec) { + return function (f) { + var loop = function loop(b) { + return function (l) { + var g = function g(v) { + if (v instanceof Data_Maybe.Nothing) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Done(b)); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(f(b)(v.value0.value0))(function (b$prime) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Loop({ + a: b$prime, + b: v.value0.value1 + })); + }); + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 221, column 5 - line 221, column 45): " + [v.constructor.name]); + }; + + return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(uncons(dictMonadRec.Monad0())(l))(g); + }; + }; + + return Control_Monad_Rec_Class.tailRecM2(dictMonadRec)(loop); + }; +}; + +var runListTRec = function runListTRec(dictMonadRec) { + return foldlRec$prime(dictMonadRec)(function (v) { + return function (v1) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(Data_Unit.unit); + }; + })(Data_Unit.unit); +}; + +var foldlRec = function foldlRec(dictMonadRec) { + return function (f) { + var loop = function loop(b) { + return function (l) { + var g = function g(v) { + if (v instanceof Data_Maybe.Nothing) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Done(b)); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Loop({ + a: f(b)(v.value0.value0), + b: v.value0.value1 + })); + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 239, column 7 - line 239, column 47): " + [v.constructor.name]); + }; + + return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(uncons(dictMonadRec.Monad0())(l))(g); + }; + }; + + return Control_Monad_Rec_Class.tailRecM2(dictMonadRec)(loop); + }; +}; + +var foldl$prime = function foldl$prime(dictMonad) { + return function (f) { + var loop = function loop(b) { + return function (l) { + var g = function g(v) { + if (v instanceof Data_Maybe.Nothing) { + return Control_Applicative.pure(dictMonad.Applicative0())(b); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return Control_Bind.bind(dictMonad.Bind1())(f(b)(v.value0.value0))(Data_Function.flip(loop)(v.value0.value1)); + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 212, column 5 - line 212, column 35): " + [v.constructor.name]); + }; + + return Control_Bind.bind(dictMonad.Bind1())(uncons(dictMonad)(l))(g); + }; + }; + + return loop; + }; +}; + +var runListT = function runListT(dictMonad) { + return foldl$prime(dictMonad)(function (v) { + return function (v1) { + return Control_Applicative.pure(dictMonad.Applicative0())(Data_Unit.unit); + }; + })(Data_Unit.unit); +}; + +var foldl = function foldl(dictMonad) { + return function (f) { + var loop = function loop(b) { + return function (l) { + var g = function g(v) { + if (v instanceof Data_Maybe.Nothing) { + return Control_Applicative.pure(dictMonad.Applicative0())(b); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return loop(f(b)(v.value0.value0))(v.value0.value1); + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 229, column 5 - line 229, column 35): " + [v.constructor.name]); + }; + + return Control_Bind.bind(dictMonad.Bind1())(uncons(dictMonad)(l))(g); + }; + }; + + return loop; + }; +}; + +var filter = function filter(dictFunctor) { + return function (f) { + var g = function g(v) { + if (v instanceof Yield) { + var s$prime = Data_Functor.map(Data_Lazy.functorLazy)(filter(dictFunctor)(f))(v.value1); + var $154 = f(v.value0); + + if ($154) { + return new Yield(v.value0, s$prime); + } + + ; + return new Skip(s$prime); + } + + ; + + if (v instanceof Skip) { + var s$prime = Data_Functor.map(Data_Lazy.functorLazy)(filter(dictFunctor)(f))(v.value0); + return new Skip(s$prime); + } + + ; + + if (v instanceof Done) { + return Done.value; + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 176, column 3 - line 176, column 80): " + [v.constructor.name]); + }; + + return stepMap(dictFunctor)(g); + }; +}; + +var dropWhile = function dropWhile(dictApplicative) { + return function (f) { + var g = function g(v) { + if (v instanceof Yield) { + var $159 = f(v.value0); + + if ($159) { + return new Skip(Data_Functor.map(Data_Lazy.functorLazy)(dropWhile(dictApplicative)(f))(v.value1)); + } + + ; + return new Yield(v.value0, v.value1); + } + + ; + + if (v instanceof Skip) { + return Skip.create(Data_Functor.map(Data_Lazy.functorLazy)(dropWhile(dictApplicative)(f))(v.value0)); + } + + ; + + if (v instanceof Done) { + return Done.value; + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 169, column 3 - line 169, column 70): " + [v.constructor.name]); + }; + + return stepMap(dictApplicative.Apply0().Functor0())(g); + }; +}; + +var drop = function drop(dictApplicative) { + return function (v) { + return function (fa) { + if (v === 0) { + return fa; + } + + ; + + var f = function f(v1) { + if (v1 instanceof Yield) { + return new Skip(Data_Functor.map(Data_Lazy.functorLazy)(drop(dictApplicative)(v - 1 | 0))(v1.value1)); + } + + ; + + if (v1 instanceof Skip) { + return new Skip(Data_Functor.map(Data_Lazy.functorLazy)(drop(dictApplicative)(v))(v1.value0)); + } + + ; + + if (v1 instanceof Done) { + return Done.value; + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 162, column 3 - line 162, column 44): " + [v1.constructor.name]); + }; + + return stepMap(dictApplicative.Apply0().Functor0())(f)(fa); + }; + }; +}; + +var cons = function cons(dictApplicative) { + return function (lh) { + return function (t) { + return ListT(Control_Applicative.pure(dictApplicative)(new Yield(Data_Lazy.force(lh), t))); + }; + }; +}; + +var unfoldable1ListT = function unfoldable1ListT(dictMonad) { + return new Data_Unfoldable1.Unfoldable1(function (f) { + return function (b) { + var go = function go(v) { + if (v.value1 instanceof Data_Maybe.Nothing) { + return singleton(dictMonad.Applicative0())(v.value0); + } + + ; + + if (v.value1 instanceof Data_Maybe.Just) { + return cons(dictMonad.Applicative0())(Control_Applicative.pure(Data_Lazy.applicativeLazy)(v.value0))(Data_Lazy.defer(function (v1) { + return go(f(v.value1.value0)); + })); + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 294, column 12 - line 296, column 67): " + [v.constructor.name]); + }; + + return go(f(b)); + }; + }); +}; + +var unfoldableListT = function unfoldableListT(dictMonad) { + return new Data_Unfoldable.Unfoldable(function () { + return unfoldable1ListT(dictMonad); + }, function (f) { + return function (b) { + var go = function go(v) { + if (v instanceof Data_Maybe.Nothing) { + return nil(dictMonad.Applicative0()); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return cons(dictMonad.Applicative0())(Control_Applicative.pure(Data_Lazy.applicativeLazy)(v.value0.value0))(Data_Lazy.defer(function (v1) { + return go(f(v.value0.value1)); + })); + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 287, column 12 - line 289, column 67): " + [v.constructor.name]); + }; + + return go(f(b)); + }; + }); +}; + +var semigroupListT = function semigroupListT(dictApplicative) { + return new Data_Semigroup.Semigroup(concat(dictApplicative)); +}; + +var concat = function concat(dictApplicative) { + return function (x) { + return function (y) { + var f = function f(v) { + if (v instanceof Yield) { + return new Yield(v.value0, Data_Functor.map(Data_Lazy.functorLazy)(function (v1) { + return Data_Semigroup.append(semigroupListT(dictApplicative))(v1)(y); + })(v.value1)); + } + + ; + + if (v instanceof Skip) { + return new Skip(Data_Functor.map(Data_Lazy.functorLazy)(function (v1) { + return Data_Semigroup.append(semigroupListT(dictApplicative))(v1)(y); + })(v.value0)); + } + + ; + + if (v instanceof Done) { + return new Skip(Data_Lazy.defer(Data_Function["const"](y))); + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 106, column 3 - line 106, column 43): " + [v.constructor.name]); + }; + + return stepMap(dictApplicative.Apply0().Functor0())(f)(x); + }; + }; +}; + +var monoidListT = function monoidListT(dictApplicative) { + return new Data_Monoid.Monoid(function () { + return semigroupListT(dictApplicative); + }, nil(dictApplicative)); +}; + +var catMaybes = function catMaybes(dictFunctor) { + return mapMaybe(dictFunctor)(Control_Category.identity(Control_Category.categoryFn)); +}; + +var monadListT = function monadListT(dictMonad) { + return new Control_Monad.Monad(function () { + return applicativeListT(dictMonad); + }, function () { + return bindListT(dictMonad); + }); +}; + +var bindListT = function bindListT(dictMonad) { + return new Control_Bind.Bind(function () { + return applyListT(dictMonad); + }, function (fa) { + return function (f) { + var g = function g(v) { + if (v instanceof Yield) { + var h = function h(s$prime) { + return Data_Semigroup.append(semigroupListT(dictMonad.Applicative0()))(f(v.value0))(Control_Bind.bind(bindListT(dictMonad))(s$prime)(f)); + }; + + return new Skip(Data_Functor.map(Data_Lazy.functorLazy)(h)(v.value1)); + } + + ; + + if (v instanceof Skip) { + return new Skip(Data_Functor.map(Data_Lazy.functorLazy)(function (v1) { + return Control_Bind.bind(bindListT(dictMonad))(v1)(f); + })(v.value0)); + } + + ; + + if (v instanceof Done) { + return Done.value; + } + + ; + throw new Error("Failed pattern match at Control.Monad.List.Trans (line 306, column 5 - line 308, column 31): " + [v.constructor.name]); + }; + + return stepMap(dictMonad.Bind1().Apply0().Functor0())(g)(fa); + }; + }); +}; + +var applyListT = function applyListT(dictMonad) { + return new Control_Apply.Apply(function () { + return functorListT(dictMonad.Bind1().Apply0().Functor0()); + }, Control_Monad.ap(monadListT(dictMonad))); +}; + +var applicativeListT = function applicativeListT(dictMonad) { + return new Control_Applicative.Applicative(function () { + return applyListT(dictMonad); + }, singleton(dictMonad.Applicative0())); +}; + +var monadEffectListT = function monadEffectListT(dictMonadEffect) { + return new Effect_Class.MonadEffect(function () { + return monadListT(dictMonadEffect.Monad0()); + }, function () { + var $188 = Control_Monad_Trans_Class.lift(monadTransListT)(dictMonadEffect.Monad0()); + var $189 = Effect_Class.liftEffect(dictMonadEffect); + return function ($190) { + return $188($189($190)); + }; + }()); +}; + +var altListT = function altListT(dictApplicative) { + return new Control_Alt.Alt(function () { + return functorListT(dictApplicative.Apply0().Functor0()); + }, concat(dictApplicative)); +}; + +var plusListT = function plusListT(dictMonad) { + return new Control_Plus.Plus(function () { + return altListT(dictMonad.Applicative0()); + }, nil(dictMonad.Applicative0())); +}; + +var alternativeListT = function alternativeListT(dictMonad) { + return new Control_Alternative.Alternative(function () { + return applicativeListT(dictMonad); + }, function () { + return plusListT(dictMonad); + }); +}; + +var monadZeroListT = function monadZeroListT(dictMonad) { + return new Control_MonadZero.MonadZero(function () { + return alternativeListT(dictMonad); + }, function () { + return monadListT(dictMonad); + }); +}; + +var monadPlusListT = function monadPlusListT(dictMonad) { + return new Control_MonadPlus.MonadPlus(function () { + return monadZeroListT(dictMonad); + }); +}; + +module.exports = { + ListT: ListT, + Yield: Yield, + Skip: Skip, + Done: Done, + catMaybes: catMaybes, + cons: cons, + drop: drop, + dropWhile: dropWhile, + filter: filter, + foldl: foldl, + foldlRec: foldlRec, + "foldl'": foldl$prime, + "foldlRec'": foldlRec$prime, + fromEffect: fromEffect, + head: head, + iterate: iterate, + mapMaybe: mapMaybe, + nil: nil, + prepend: prepend, + "prepend'": prepend$prime, + repeat: repeat, + runListT: runListT, + runListTRec: runListTRec, + scanl: scanl, + singleton: singleton, + tail: tail, + take: take, + takeWhile: takeWhile, + uncons: uncons, + unfold: unfold, + wrapEffect: wrapEffect, + wrapLazy: wrapLazy, + zipWith: zipWith, + "zipWith'": zipWith$prime, + newtypeListT: newtypeListT, + semigroupListT: semigroupListT, + monoidListT: monoidListT, + functorListT: functorListT, + unfoldableListT: unfoldableListT, + unfoldable1ListT: unfoldable1ListT, + applyListT: applyListT, + applicativeListT: applicativeListT, + bindListT: bindListT, + monadListT: monadListT, + monadTransListT: monadTransListT, + altListT: altListT, + plusListT: plusListT, + alternativeListT: alternativeListT, + monadZeroListT: monadZeroListT, + monadPlusListT: monadPlusListT, + monadEffectListT: monadEffectListT +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad/index.js":"U/Ix","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Lazy/index.js":"aRUE","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unfoldable1/index.js":"S0Nl","../Data.Unit/index.js":"NhVk","../Effect.Class/index.js":"dWtH"}],"8Fyn":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Alternative = require("../Control.Alternative/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Lazy = require("../Control.Lazy/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js"); + +var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js"); + +var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js"); + +var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js"); + +var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js"); + +var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js"); + +var Control_Plus = require("../Control.Plus/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var RWSResult = function () { + function RWSResult(value0, value1, value2) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + } + + ; + + RWSResult.create = function (value0) { + return function (value1) { + return function (value2) { + return new RWSResult(value0, value1, value2); + }; + }; + }; + + return RWSResult; +}(); + +var RWST = function RWST(x) { + return x; +}; + +var withRWST = function withRWST(f) { + return function (m) { + return function (r) { + return function (s) { + return Data_Tuple.uncurry(m)(f(r)(s)); + }; + }; + }; +}; + +var runRWST = function runRWST(v) { + return v; +}; + +var newtypeRWST = new Data_Newtype.Newtype(function (n) { + return n; +}, RWST); + +var monadTransRWST = function monadTransRWST(dictMonoid) { + return new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) { + return function (m) { + return function (v) { + return function (s) { + return Control_Bind.bind(dictMonad.Bind1())(m)(function (a) { + return Control_Applicative.pure(dictMonad.Applicative0())(new RWSResult(s, a, Data_Monoid.mempty(dictMonoid))); + }); + }; + }; + }; + }); +}; + +var mapRWST = function mapRWST(f) { + return function (v) { + return function (r) { + return function (s) { + return f(v(r)(s)); + }; + }; + }; +}; + +var lazyRWST = new Control_Lazy.Lazy(function (f) { + return function (r) { + return function (s) { + var v = f(Data_Unit.unit); + return v(r)(s); + }; + }; +}); + +var functorRWST = function functorRWST(dictFunctor) { + return new Data_Functor.Functor(function (f) { + return function (v) { + return function (r) { + return function (s) { + return Data_Functor.map(dictFunctor)(function (v1) { + return new RWSResult(v1.value0, f(v1.value1), v1.value2); + })(v(r)(s)); + }; + }; + }; + }); +}; + +var execRWST = function execRWST(dictMonad) { + return function (v) { + return function (r) { + return function (s) { + return Control_Bind.bind(dictMonad.Bind1())(v(r)(s))(function (v1) { + return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(v1.value0, v1.value2)); + }); + }; + }; + }; +}; + +var evalRWST = function evalRWST(dictMonad) { + return function (v) { + return function (r) { + return function (s) { + return Control_Bind.bind(dictMonad.Bind1())(v(r)(s))(function (v1) { + return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(v1.value1, v1.value2)); + }); + }; + }; + }; +}; + +var applyRWST = function applyRWST(dictBind) { + return function (dictMonoid) { + return new Control_Apply.Apply(function () { + return functorRWST(dictBind.Apply0().Functor0()); + }, function (v) { + return function (v1) { + return function (r) { + return function (s) { + return Control_Bind.bind(dictBind)(v(r)(s))(function (v2) { + return Data_Functor.mapFlipped(dictBind.Apply0().Functor0())(v1(r)(v2.value0))(function (v3) { + return new RWSResult(v3.value0, v2.value1(v3.value1), Data_Semigroup.append(dictMonoid.Semigroup0())(v2.value2)(v3.value2)); + }); + }); + }; + }; + }; + }); + }; +}; + +var bindRWST = function bindRWST(dictBind) { + return function (dictMonoid) { + return new Control_Bind.Bind(function () { + return applyRWST(dictBind)(dictMonoid); + }, function (v) { + return function (f) { + return function (r) { + return function (s) { + return Control_Bind.bind(dictBind)(v(r)(s))(function (v1) { + var v2 = f(v1.value1); + return Data_Functor.mapFlipped(dictBind.Apply0().Functor0())(v2(r)(v1.value0))(function (v3) { + return new RWSResult(v3.value0, v3.value1, Data_Semigroup.append(dictMonoid.Semigroup0())(v1.value2)(v3.value2)); + }); + }); + }; + }; + }; + }); + }; +}; + +var applicativeRWST = function applicativeRWST(dictMonad) { + return function (dictMonoid) { + return new Control_Applicative.Applicative(function () { + return applyRWST(dictMonad.Bind1())(dictMonoid); + }, function (a) { + return function (v) { + return function (s) { + return Control_Applicative.pure(dictMonad.Applicative0())(new RWSResult(s, a, Data_Monoid.mempty(dictMonoid))); + }; + }; + }); + }; +}; + +var monadRWST = function monadRWST(dictMonad) { + return function (dictMonoid) { + return new Control_Monad.Monad(function () { + return applicativeRWST(dictMonad)(dictMonoid); + }, function () { + return bindRWST(dictMonad.Bind1())(dictMonoid); + }); + }; +}; + +var monadAskRWST = function monadAskRWST(dictMonad) { + return function (dictMonoid) { + return new Control_Monad_Reader_Class.MonadAsk(function () { + return monadRWST(dictMonad)(dictMonoid); + }, function (r) { + return function (s) { + return Control_Applicative.pure(dictMonad.Applicative0())(new RWSResult(s, r, Data_Monoid.mempty(dictMonoid))); + }; + }); + }; +}; + +var monadReaderRWST = function monadReaderRWST(dictMonad) { + return function (dictMonoid) { + return new Control_Monad_Reader_Class.MonadReader(function () { + return monadAskRWST(dictMonad)(dictMonoid); + }, function (f) { + return function (m) { + return function (r) { + return function (s) { + return m(f(r))(s); + }; + }; + }; + }); + }; +}; + +var monadEffectRWS = function monadEffectRWS(dictMonoid) { + return function (dictMonadEffect) { + return new Effect_Class.MonadEffect(function () { + return monadRWST(dictMonadEffect.Monad0())(dictMonoid); + }, function () { + var $155 = Control_Monad_Trans_Class.lift(monadTransRWST(dictMonoid))(dictMonadEffect.Monad0()); + var $156 = Effect_Class.liftEffect(dictMonadEffect); + return function ($157) { + return $155($156($157)); + }; + }()); + }; +}; + +var monadRecRWST = function monadRecRWST(dictMonadRec) { + return function (dictMonoid) { + return new Control_Monad_Rec_Class.MonadRec(function () { + return monadRWST(dictMonadRec.Monad0())(dictMonoid); + }, function (k) { + return function (a) { + var k$prime = function k$prime(r) { + return function (v) { + var v1 = k(v.value1); + return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(v1(r)(v.value0))(function (v2) { + return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(function () { + if (v2.value1 instanceof Control_Monad_Rec_Class.Loop) { + return new Control_Monad_Rec_Class.Loop(new RWSResult(v2.value0, v2.value1.value0, Data_Semigroup.append(dictMonoid.Semigroup0())(v.value2)(v2.value2))); + } + + ; + + if (v2.value1 instanceof Control_Monad_Rec_Class.Done) { + return new Control_Monad_Rec_Class.Done(new RWSResult(v2.value0, v2.value1.value0, Data_Semigroup.append(dictMonoid.Semigroup0())(v.value2)(v2.value2))); + } + + ; + throw new Error("Failed pattern match at Control.Monad.RWS.Trans (line 127, column 16 - line 129, column 68): " + [v2.value1.constructor.name]); + }()); + }); + }; + }; + + return function (r) { + return function (s) { + return Control_Monad_Rec_Class.tailRecM(dictMonadRec)(k$prime(r))(new RWSResult(s, a, Data_Monoid.mempty(dictMonoid))); + }; + }; + }; + }); + }; +}; + +var monadStateRWST = function monadStateRWST(dictMonad) { + return function (dictMonoid) { + return new Control_Monad_State_Class.MonadState(function () { + return monadRWST(dictMonad)(dictMonoid); + }, function (f) { + return function (v) { + return function (s) { + var v1 = f(s); + return Control_Applicative.pure(dictMonad.Applicative0())(new RWSResult(v1.value1, v1.value0, Data_Monoid.mempty(dictMonoid))); + }; + }; + }); + }; +}; + +var monadTellRWST = function monadTellRWST(dictMonad) { + return function (dictMonoid) { + return new Control_Monad_Writer_Class.MonadTell(function () { + return monadRWST(dictMonad)(dictMonoid); + }, function (w) { + return function (v) { + return function (s) { + return Control_Applicative.pure(dictMonad.Applicative0())(new RWSResult(s, Data_Unit.unit, w)); + }; + }; + }); + }; +}; + +var monadWriterRWST = function monadWriterRWST(dictMonad) { + return function (dictMonoid) { + return new Control_Monad_Writer_Class.MonadWriter(function () { + return monadTellRWST(dictMonad)(dictMonoid); + }, function (m) { + return function (r) { + return function (s) { + return Control_Bind.bind(dictMonad.Bind1())(m(r)(s))(function (v) { + return Control_Applicative.pure(dictMonad.Applicative0())(new RWSResult(v.value0, new Data_Tuple.Tuple(v.value1, v.value2), v.value2)); + }); + }; + }; + }, function (m) { + return function (r) { + return function (s) { + return Control_Bind.bind(dictMonad.Bind1())(m(r)(s))(function (v) { + return Control_Applicative.pure(dictMonad.Applicative0())(new RWSResult(v.value0, v.value1.value0, v.value1.value1(v.value2))); + }); + }; + }; + }); + }; +}; + +var monadThrowRWST = function monadThrowRWST(dictMonadThrow) { + return function (dictMonoid) { + return new Control_Monad_Error_Class.MonadThrow(function () { + return monadRWST(dictMonadThrow.Monad0())(dictMonoid); + }, function (e) { + return Control_Monad_Trans_Class.lift(monadTransRWST(dictMonoid))(dictMonadThrow.Monad0())(Control_Monad_Error_Class.throwError(dictMonadThrow)(e)); + }); + }; +}; + +var monadErrorRWST = function monadErrorRWST(dictMonadError) { + return function (dictMonoid) { + return new Control_Monad_Error_Class.MonadError(function () { + return monadThrowRWST(dictMonadError.MonadThrow0())(dictMonoid); + }, function (m) { + return function (h) { + return RWST(function (r) { + return function (s) { + return Control_Monad_Error_Class.catchError(dictMonadError)(m(r)(s))(function (e) { + var v = h(e); + return v(r)(s); + }); + }; + }); + }; + }); + }; +}; + +var altRWST = function altRWST(dictAlt) { + return new Control_Alt.Alt(function () { + return functorRWST(dictAlt.Functor0()); + }, function (v) { + return function (v1) { + return RWST(function (r) { + return function (s) { + return Control_Alt.alt(dictAlt)(v(r)(s))(v1(r)(s)); + }; + }); + }; + }); +}; + +var plusRWST = function plusRWST(dictPlus) { + return new Control_Plus.Plus(function () { + return altRWST(dictPlus.Alt0()); + }, function (v) { + return function (v1) { + return Control_Plus.empty(dictPlus); + }; + }); +}; + +var alternativeRWST = function alternativeRWST(dictMonoid) { + return function (dictAlternative) { + return function (dictMonad) { + return new Control_Alternative.Alternative(function () { + return applicativeRWST(dictMonad)(dictMonoid); + }, function () { + return plusRWST(dictAlternative.Plus1()); + }); + }; + }; +}; + +module.exports = { + RWSResult: RWSResult, + RWST: RWST, + runRWST: runRWST, + evalRWST: evalRWST, + execRWST: execRWST, + mapRWST: mapRWST, + withRWST: withRWST, + newtypeRWST: newtypeRWST, + functorRWST: functorRWST, + applyRWST: applyRWST, + altRWST: altRWST, + alternativeRWST: alternativeRWST, + bindRWST: bindRWST, + applicativeRWST: applicativeRWST, + monadRWST: monadRWST, + monadTransRWST: monadTransRWST, + lazyRWST: lazyRWST, + monadEffectRWS: monadEffectRWS, + monadAskRWST: monadAskRWST, + monadReaderRWST: monadReaderRWST, + monadStateRWST: monadStateRWST, + monadTellRWST: monadTellRWST, + monadWriterRWST: monadWriterRWST, + monadThrowRWST: monadThrowRWST, + monadErrorRWST: monadErrorRWST, + monadRecRWST: monadRecRWST, + plusRWST: plusRWST +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Lazy/index.js":"y9cE","../Control.Monad/index.js":"U/Ix","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Class/index.js":"gxgA","../Control.Plus/index.js":"oMBg","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk","../Effect.Class/index.js":"dWtH"}],"I4H+":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Monad_Cont_Trans = require("../Control.Monad.Cont.Trans/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Control_Monad_List_Trans = require("../Control.Monad.List.Trans/index.js"); + +var Control_Monad_Maybe_Trans = require("../Control.Monad.Maybe.Trans/index.js"); + +var Control_Monad_RWS_Trans = require("../Control.Monad.RWS.Trans/index.js"); + +var Control_Monad_Reader_Trans = require("../Control.Monad.Reader.Trans/index.js"); + +var Control_Monad_State_Trans = require("../Control.Monad.State.Trans/index.js"); + +var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js"); + +var Control_Monad_Writer_Trans = require("../Control.Monad.Writer.Trans/index.js"); + +var Effect_Aff = require("../Effect.Aff/index.js"); + +var MonadAff = function MonadAff(MonadEffect0, liftAff) { + this.MonadEffect0 = MonadEffect0; + this.liftAff = liftAff; +}; + +var monadAffAff = new MonadAff(function () { + return Effect_Aff.monadEffectAff; +}, Control_Category.identity(Control_Category.categoryFn)); + +var liftAff = function liftAff(dict) { + return dict.liftAff; +}; + +var monadAffContT = function monadAffContT(dictMonadAff) { + return new MonadAff(function () { + return Control_Monad_Cont_Trans.monadEffectContT(dictMonadAff.MonadEffect0()); + }, function () { + var $10 = Control_Monad_Trans_Class.lift(Control_Monad_Cont_Trans.monadTransContT)(dictMonadAff.MonadEffect0().Monad0()); + var $11 = liftAff(dictMonadAff); + return function ($12) { + return $10($11($12)); + }; + }()); +}; + +var monadAffExceptT = function monadAffExceptT(dictMonadAff) { + return new MonadAff(function () { + return Control_Monad_Except_Trans.monadEffectExceptT(dictMonadAff.MonadEffect0()); + }, function () { + var $13 = Control_Monad_Trans_Class.lift(Control_Monad_Except_Trans.monadTransExceptT)(dictMonadAff.MonadEffect0().Monad0()); + var $14 = liftAff(dictMonadAff); + return function ($15) { + return $13($14($15)); + }; + }()); +}; + +var monadAffListT = function monadAffListT(dictMonadAff) { + return new MonadAff(function () { + return Control_Monad_List_Trans.monadEffectListT(dictMonadAff.MonadEffect0()); + }, function () { + var $16 = Control_Monad_Trans_Class.lift(Control_Monad_List_Trans.monadTransListT)(dictMonadAff.MonadEffect0().Monad0()); + var $17 = liftAff(dictMonadAff); + return function ($18) { + return $16($17($18)); + }; + }()); +}; + +var monadAffMaybe = function monadAffMaybe(dictMonadAff) { + return new MonadAff(function () { + return Control_Monad_Maybe_Trans.monadEffectMaybe(dictMonadAff.MonadEffect0()); + }, function () { + var $19 = Control_Monad_Trans_Class.lift(Control_Monad_Maybe_Trans.monadTransMaybeT)(dictMonadAff.MonadEffect0().Monad0()); + var $20 = liftAff(dictMonadAff); + return function ($21) { + return $19($20($21)); + }; + }()); +}; + +var monadAffRWS = function monadAffRWS(dictMonadAff) { + return function (dictMonoid) { + return new MonadAff(function () { + return Control_Monad_RWS_Trans.monadEffectRWS(dictMonoid)(dictMonadAff.MonadEffect0()); + }, function () { + var $22 = Control_Monad_Trans_Class.lift(Control_Monad_RWS_Trans.monadTransRWST(dictMonoid))(dictMonadAff.MonadEffect0().Monad0()); + var $23 = liftAff(dictMonadAff); + return function ($24) { + return $22($23($24)); + }; + }()); + }; +}; + +var monadAffReader = function monadAffReader(dictMonadAff) { + return new MonadAff(function () { + return Control_Monad_Reader_Trans.monadEffectReader(dictMonadAff.MonadEffect0()); + }, function () { + var $25 = Control_Monad_Trans_Class.lift(Control_Monad_Reader_Trans.monadTransReaderT)(dictMonadAff.MonadEffect0().Monad0()); + var $26 = liftAff(dictMonadAff); + return function ($27) { + return $25($26($27)); + }; + }()); +}; + +var monadAffState = function monadAffState(dictMonadAff) { + return new MonadAff(function () { + return Control_Monad_State_Trans.monadEffectState(dictMonadAff.MonadEffect0()); + }, function () { + var $28 = Control_Monad_Trans_Class.lift(Control_Monad_State_Trans.monadTransStateT)(dictMonadAff.MonadEffect0().Monad0()); + var $29 = liftAff(dictMonadAff); + return function ($30) { + return $28($29($30)); + }; + }()); +}; + +var monadAffWriter = function monadAffWriter(dictMonadAff) { + return function (dictMonoid) { + return new MonadAff(function () { + return Control_Monad_Writer_Trans.monadEffectWriter(dictMonoid)(dictMonadAff.MonadEffect0()); + }, function () { + var $31 = Control_Monad_Trans_Class.lift(Control_Monad_Writer_Trans.monadTransWriterT(dictMonoid))(dictMonadAff.MonadEffect0().Monad0()); + var $32 = liftAff(dictMonadAff); + return function ($33) { + return $31($32($33)); + }; + }()); + }; +}; + +module.exports = { + liftAff: liftAff, + MonadAff: MonadAff, + monadAffAff: monadAffAff, + monadAffContT: monadAffContT, + monadAffExceptT: monadAffExceptT, + monadAffListT: monadAffListT, + monadAffMaybe: monadAffMaybe, + monadAffReader: monadAffReader, + monadAffRWS: monadAffRWS, + monadAffState: monadAffState, + monadAffWriter: monadAffWriter +}; +},{"../Control.Category/index.js":"IAi2","../Control.Monad.Cont.Trans/index.js":"XW2d","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Monad.List.Trans/index.js":"NCVa","../Control.Monad.Maybe.Trans/index.js":"UUIS","../Control.Monad.RWS.Trans/index.js":"8Fyn","../Control.Monad.Reader.Trans/index.js":"uvht","../Control.Monad.State.Trans/index.js":"34Kp","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Trans/index.js":"VAds","../Effect.Aff/index.js":"I7lu"}],"ViyF":[function(require,module,exports) { +"use strict"; + +exports.mkEffectFn1 = function mkEffectFn1(fn) { + return function (x) { + return fn(x)(); + }; +}; + +exports.mkEffectFn2 = function mkEffectFn2(fn) { + return function (a, b) { + return fn(a)(b)(); + }; +}; + +exports.mkEffectFn3 = function mkEffectFn3(fn) { + return function (a, b, c) { + return fn(a)(b)(c)(); + }; +}; + +exports.mkEffectFn4 = function mkEffectFn4(fn) { + return function (a, b, c, d) { + return fn(a)(b)(c)(d)(); + }; +}; + +exports.mkEffectFn5 = function mkEffectFn5(fn) { + return function (a, b, c, d, e) { + return fn(a)(b)(c)(d)(e)(); + }; +}; + +exports.mkEffectFn6 = function mkEffectFn6(fn) { + return function (a, b, c, d, e, f) { + return fn(a)(b)(c)(d)(e)(f)(); + }; +}; + +exports.mkEffectFn7 = function mkEffectFn7(fn) { + return function (a, b, c, d, e, f, g) { + return fn(a)(b)(c)(d)(e)(f)(g)(); + }; +}; + +exports.mkEffectFn8 = function mkEffectFn8(fn) { + return function (a, b, c, d, e, f, g, h) { + return fn(a)(b)(c)(d)(e)(f)(g)(h)(); + }; +}; + +exports.mkEffectFn9 = function mkEffectFn9(fn) { + return function (a, b, c, d, e, f, g, h, i) { + return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)(); + }; +}; + +exports.mkEffectFn10 = function mkEffectFn10(fn) { + return function (a, b, c, d, e, f, g, h, i, j) { + return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(); + }; +}; + +exports.runEffectFn1 = function runEffectFn1(fn) { + return function (a) { + return function () { + return fn(a); + }; + }; +}; + +exports.runEffectFn2 = function runEffectFn2(fn) { + return function (a) { + return function (b) { + return function () { + return fn(a, b); + }; + }; + }; +}; + +exports.runEffectFn3 = function runEffectFn3(fn) { + return function (a) { + return function (b) { + return function (c) { + return function () { + return fn(a, b, c); + }; + }; + }; + }; +}; + +exports.runEffectFn4 = function runEffectFn4(fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function () { + return fn(a, b, c, d); + }; + }; + }; + }; + }; +}; + +exports.runEffectFn5 = function runEffectFn5(fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function () { + return fn(a, b, c, d, e); + }; + }; + }; + }; + }; + }; +}; + +exports.runEffectFn6 = function runEffectFn6(fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function () { + return fn(a, b, c, d, e, f); + }; + }; + }; + }; + }; + }; + }; +}; + +exports.runEffectFn7 = function runEffectFn7(fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function (g) { + return function () { + return fn(a, b, c, d, e, f, g); + }; + }; + }; + }; + }; + }; + }; + }; +}; + +exports.runEffectFn8 = function runEffectFn8(fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function (g) { + return function (h) { + return function () { + return fn(a, b, c, d, e, f, g, h); + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; + +exports.runEffectFn9 = function runEffectFn9(fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function (g) { + return function (h) { + return function (i) { + return function () { + return fn(a, b, c, d, e, f, g, h, i); + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; + +exports.runEffectFn10 = function runEffectFn10(fn) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function (g) { + return function (h) { + return function (i) { + return function (j) { + return function () { + return fn(a, b, c, d, e, f, g, h, i, j); + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; +},{}],"qn3Z":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +module.exports = { + mkEffectFn1: $foreign.mkEffectFn1, + mkEffectFn2: $foreign.mkEffectFn2, + mkEffectFn3: $foreign.mkEffectFn3, + mkEffectFn4: $foreign.mkEffectFn4, + mkEffectFn5: $foreign.mkEffectFn5, + mkEffectFn6: $foreign.mkEffectFn6, + mkEffectFn7: $foreign.mkEffectFn7, + mkEffectFn8: $foreign.mkEffectFn8, + mkEffectFn9: $foreign.mkEffectFn9, + mkEffectFn10: $foreign.mkEffectFn10, + runEffectFn1: $foreign.runEffectFn1, + runEffectFn2: $foreign.runEffectFn2, + runEffectFn3: $foreign.runEffectFn3, + runEffectFn4: $foreign.runEffectFn4, + runEffectFn5: $foreign.runEffectFn5, + runEffectFn6: $foreign.runEffectFn6, + runEffectFn7: $foreign.runEffectFn7, + runEffectFn8: $foreign.runEffectFn8, + runEffectFn9: $foreign.runEffectFn9, + runEffectFn10: $foreign.runEffectFn10 +}; +},{"./foreign.js":"ViyF"}],"61ee":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Effect_Aff = require("../Effect.Aff/index.js"); + +var Effect_Aff_AVar = require("../Effect.Aff.AVar/index.js"); + +var Record = require("../Record/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var Type_Equality = require("../Type.Equality/index.js"); + +var CacherAff = function CacherAff(compile) { + this.compile = compile; +}; + +var compile = function compile(dict) { + return dict.compile; +}; + +var $$new = function $$new(dictRowToList) { + return function (dictCacherAff) { + return function (fun) { + return compile(dictCacherAff)(Type_Data_RowList.RLProxy.value)(fun); + }; + }; +}; + +var cacherAffNil = function cacherAffNil(dictTypeEquals) { + return new CacherAff(function (v) { + return function (v1) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)({ + run: function run(v2) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(Data_Unit.unit); + }, + last: Type_Equality.from(dictTypeEquals)({}) + }); + }; + }); +}; + +var cacherAffCons = function cacherAffCons(dictIsSymbol) { + return function (dictLacks) { + return function (dictCons) { + return function (dictLacks1) { + return function (dictCons1) { + return function (dictCacherAff) { + return new CacherAff(function (v) { + return function (fun) { + return Control_Bind.bind(Effect_Aff.bindAff)(compile(dictCacherAff)(Type_Data_RowList.RLProxy.value)(fun))(function (v1) { + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Aff_AVar.empty)(function (v2) { + var run = function run(a) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(v1.run(a))(function () { + var val = Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(fun(a)); + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Aff_AVar.tryTake(v2))(function (v3) { + return Effect_Aff_AVar.put(val)(v2); + }); + }); + }; + + var last = Record.insert(dictIsSymbol)(dictLacks1)(dictCons1)(Data_Symbol.SProxy.value)(Effect_Aff_AVar.read(v2))(v1.last); + return Control_Applicative.pure(Effect_Aff.applicativeAff)({ + last: last, + run: run + }); + }); + }); + }; + }); + }; + }; + }; + }; + }; +}; + +module.exports = { + compile: compile, + CacherAff: CacherAff, + "new": $$new, + cacherAffCons: cacherAffCons, + cacherAffNil: cacherAffNil +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Effect.Aff/index.js":"I7lu","../Effect.Aff.AVar/index.js":"hACG","../Record/index.js":"0gG4","../Type.Data.RowList/index.js":"XaXP","../Type.Equality/index.js":"Uq/R"}],"1Q0x":[function(require,module,exports) { +"use strict"; + +exports.setContextTranslation = function (p) { + return function (ctx) { + return function () { + ctx.setTransform(1, 0, 0, 1, p.x, p.y); + }; + }; +}; +},{}],"RCTS":[function(require,module,exports) { +/* global exports */ +"use strict"; + +exports.canvasElementToImageSource = function (e) { + return e; +}; + +exports.tryLoadImageImpl = function (src) { + return function (e) { + return function (f) { + return function () { + var img = new Image(); + img.src = src; + img.addEventListener("load", function () { + f(img)(); + }, false); + img.addEventListener("error", function (error) { + e(); + }, false); + }; + }; + }; +}; + +exports.getCanvasElementByIdImpl = function (id, Just, Nothing) { + return function () { + var el = document.getElementById(id); + + if (el && el instanceof HTMLCanvasElement) { + return Just(el); + } else { + return Nothing; + } + }; +}; + +exports.getContext2D = function (c) { + return function () { + return c.getContext('2d'); + }; +}; + +exports.getCanvasWidth = function (canvas) { + return function () { + return canvas.width; + }; +}; + +exports.getCanvasHeight = function (canvas) { + return function () { + return canvas.height; + }; +}; + +exports.setCanvasWidth = function (canvas) { + return function (width) { + return function () { + canvas.width = width; + }; + }; +}; + +exports.setCanvasHeight = function (canvas) { + return function (height) { + return function () { + canvas.height = height; + }; + }; +}; + +exports.canvasToDataURL = function (canvas) { + return function () { + return canvas.toDataURL(); + }; +}; + +exports.setLineWidth = function (ctx) { + return function (width) { + return function () { + ctx.lineWidth = width; + }; + }; +}; + +exports.setLineDash = function (ctx) { + return function (dash) { + return function () { + ctx.setLineDash(dash); + }; + }; +}; + +exports.setFillStyle = function (ctx) { + return function (style) { + return function () { + ctx.fillStyle = style; + }; + }; +}; + +exports.setStrokeStyle = function (ctx) { + return function (style) { + return function () { + ctx.strokeStyle = style; + }; + }; +}; + +exports.setShadowColor = function (ctx) { + return function (color) { + return function () { + ctx.shadowColor = color; + }; + }; +}; + +exports.setShadowBlur = function (ctx) { + return function (blur) { + return function () { + ctx.shadowBlur = blur; + }; + }; +}; + +exports.setShadowOffsetX = function (ctx) { + return function (offsetX) { + return function () { + ctx.shadowOffsetX = offsetX; + }; + }; +}; + +exports.setShadowOffsetY = function (ctx) { + return function (offsetY) { + return function () { + ctx.shadowOffsetY = offsetY; + }; + }; +}; + +exports.setMiterLimit = function (ctx) { + return function (limit) { + return function () { + ctx.miterLimit = limit; + }; + }; +}; + +exports.setLineCapImpl = function (ctx) { + return function (cap) { + return function () { + ctx.lineCap = cap; + }; + }; +}; + +exports.setLineJoinImpl = function (ctx) { + return function (join) { + return function () { + ctx.lineJoin = join; + }; + }; +}; + +exports.setGlobalCompositeOperationImpl = function (ctx) { + return function (op) { + return function () { + ctx.globalCompositeOperation = op; + }; + }; +}; + +exports.setGlobalAlpha = function (ctx) { + return function (alpha) { + return function () { + ctx.globalAlpha = alpha; + }; + }; +}; + +exports.beginPath = function (ctx) { + return function () { + ctx.beginPath(); + }; +}; + +exports.stroke = function (ctx) { + return function () { + ctx.stroke(); + }; +}; + +exports.fill = function (ctx) { + return function () { + ctx.fill(); + }; +}; + +exports.clip = function (ctx) { + return function () { + ctx.clip(); + }; +}; + +exports.lineTo = function (ctx) { + return function (x) { + return function (y) { + return function () { + ctx.lineTo(x, y); + }; + }; + }; +}; + +exports.moveTo = function (ctx) { + return function (x) { + return function (y) { + return function () { + ctx.moveTo(x, y); + }; + }; + }; +}; + +exports.closePath = function (ctx) { + return function () { + ctx.closePath(); + }; +}; + +exports.arc = function (ctx) { + return function (a) { + return function () { + ctx.arc(a.x, a.y, a.radius, a.start, a.end); + }; + }; +}; + +exports.rect = function (ctx) { + return function (r) { + return function () { + ctx.rect(r.x, r.y, r.width, r.height); + }; + }; +}; + +exports.fillRect = function (ctx) { + return function (r) { + return function () { + ctx.fillRect(r.x, r.y, r.width, r.height); + }; + }; +}; + +exports.strokeRect = function (ctx) { + return function (r) { + return function () { + ctx.strokeRect(r.x, r.y, r.width, r.height); + }; + }; +}; + +exports.clearRect = function (ctx) { + return function (r) { + return function () { + ctx.clearRect(r.x, r.y, r.width, r.height); + }; + }; +}; + +exports.scale = function (ctx) { + return function (t) { + return function () { + ctx.scale(t.scaleX, t.scaleY); + }; + }; +}; + +exports.rotate = function (ctx) { + return function (angle) { + return function () { + ctx.rotate(angle); + }; + }; +}; + +exports.translate = function (ctx) { + return function (t) { + return function () { + ctx.translate(t.translateX, t.translateY); + }; + }; +}; + +exports.transform = function (ctx) { + return function (t) { + return function () { + ctx.transform(t.m11, t.m12, t.m21, t.m22, t.m31, t.m32); + }; + }; +}; + +exports.setTransform = function (ctx) { + return function (t) { + return function () { + ctx.setTransform(t.m11, t.m12, t.m21, t.m22, t.m31, t.m32); + }; + }; +}; + +exports.textAlignImpl = function (ctx) { + return function () { + return ctx.textAlign; + }; +}; + +exports.setTextAlignImpl = function (ctx) { + return function (textAlign) { + return function () { + ctx.textAlign = textAlign; + }; + }; +}; + +exports.font = function (ctx) { + return function () { + return ctx.font; + }; +}; + +exports.setFont = function (ctx) { + return function (fontspec) { + return function () { + ctx.font = fontspec; + }; + }; +}; + +exports.fillText = function (ctx) { + return function (text) { + return function (x) { + return function (y) { + return function () { + ctx.fillText(text, x, y); + }; + }; + }; + }; +}; + +exports.strokeText = function (ctx) { + return function (text) { + return function (x) { + return function (y) { + return function () { + ctx.strokeText(text, x, y); + }; + }; + }; + }; +}; + +exports.measureText = function (ctx) { + return function (text) { + return function () { + return ctx.measureText(text); + }; + }; +}; + +exports.save = function (ctx) { + return function () { + ctx.save(); + }; +}; + +exports.restore = function (ctx) { + return function () { + ctx.restore(); + }; +}; + +exports.imageDataWidth = function (image) { + return image.width; +}; + +exports.imageDataHeight = function (image) { + return image.height; +}; + +exports.imageDataBuffer = function (image) { + return image.data; +}; + +exports.getImageData = function (ctx) { + return function (x) { + return function (y) { + return function (w) { + return function (h) { + return function () { + return ctx.getImageData(x, y, w, h); + }; + }; + }; + }; + }; +}; + +exports.putImageDataFull = function (ctx) { + return function (image_data) { + return function (x) { + return function (y) { + return function (dx) { + return function (dy) { + return function (dw) { + return function (dh) { + return function () { + ctx.putImageData(image_data, x, y, dx, dy, dw, dh); + }; + }; + }; + }; + }; + }; + }; + }; +}; + +exports.putImageData = function (ctx) { + return function (image_data) { + return function (x) { + return function (y) { + return function () { + ctx.putImageData(image_data, x, y); + }; + }; + }; + }; +}; + +exports.createImageData = function (ctx) { + return function (sw) { + return function (sh) { + return function () { + return ctx.createImageData(sw, sh); + }; + }; + }; +}; + +exports.createImageDataCopy = function (ctx) { + return function (image_data) { + return function () { + return ctx.createImageData(image_data); + }; + }; +}; + +exports.drawImage = function (ctx) { + return function (image_source) { + return function (dx) { + return function (dy) { + return function () { + ctx.drawImage(image_source, dx, dy); + }; + }; + }; + }; +}; + +exports.drawImageScale = function (ctx) { + return function (image_source) { + return function (dx) { + return function (dy) { + return function (dWidth) { + return function (dHeight) { + return function () { + ctx.drawImage(image_source, dx, dy, dWidth, dHeight); + }; + }; + }; + }; + }; + }; +}; + +exports.drawImageFull = function (ctx) { + return function (image_source) { + return function (sx) { + return function (sy) { + return function (sWidth) { + return function (sHeight) { + return function (dx) { + return function (dy) { + return function (dWidth) { + return function (dHeight) { + return function () { + ctx.drawImage(image_source, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight); + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; + +exports.createPatternImpl = function (ctx) { + return function (img) { + return function (repeat) { + return function () { + return ctx.createPattern(img, repeat); + }; + }; + }; +}; + +exports.setPatternFillStyle = function (ctx) { + return function (pattern) { + return function () { + ctx.fillStyle = pattern; + }; + }; +}; + +exports.createLinearGradient = function (ctx) { + return function (linearGradient) { + return function () { + return ctx.createLinearGradient(linearGradient.x0, linearGradient.y0, linearGradient.x1, linearGradient.y1); + }; + }; +}; + +exports.createRadialGradient = function (ctx) { + return function (radialGradient) { + return function () { + return ctx.createRadialGradient(radialGradient.x0, radialGradient.y0, radialGradient.r0, radialGradient.x1, radialGradient.y1, radialGradient.r1); + }; + }; +}; + +exports.addColorStop = function (gradient) { + return function (stop) { + return function (color) { + return function () { + gradient.addColorStop(stop, color); + }; + }; + }; +}; + +exports.setGradientFillStyle = function (ctx) { + return function (gradient) { + return function () { + ctx.fillStyle = gradient; + }; + }; +}; + +exports.quadraticCurveTo = function (ctx) { + return function (qCurve) { + return function () { + ctx.quadraticCurveTo(qCurve.cpx, qCurve.cpy, qCurve.x, qCurve.y); + }; + }; +}; + +exports.bezierCurveTo = function (ctx) { + return function (bCurve) { + return function () { + ctx.bezierCurveTo(bCurve.cp1x, bCurve.cp1y, bCurve.cp2x, bCurve.cp2y, bCurve.x, bCurve.y); + }; + }; +}; +},{}],"IZvR":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Effect_Exception = require("../Effect.Exception/index.js"); + +var Effect_Unsafe = require("../Effect.Unsafe/index.js"); + +var unsafeThrowException = function unsafeThrowException($0) { + return Effect_Unsafe.unsafePerformEffect(Effect_Exception.throwException($0)); +}; + +var unsafeThrow = function unsafeThrow($1) { + return unsafeThrowException(Effect_Exception.error($1)); +}; + +module.exports = { + unsafeThrowException: unsafeThrowException, + unsafeThrow: unsafeThrow +}; +},{"../Effect.Exception/index.js":"0OCW","../Effect.Unsafe/index.js":"tPW2"}],"rm6N":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Effect = require("../Effect/index.js"); + +var Effect_Exception_Unsafe = require("../Effect.Exception.Unsafe/index.js"); + +var AlignLeft = function () { + function AlignLeft() {} + + ; + AlignLeft.value = new AlignLeft(); + return AlignLeft; +}(); + +var AlignRight = function () { + function AlignRight() {} + + ; + AlignRight.value = new AlignRight(); + return AlignRight; +}(); + +var AlignCenter = function () { + function AlignCenter() {} + + ; + AlignCenter.value = new AlignCenter(); + return AlignCenter; +}(); + +var AlignStart = function () { + function AlignStart() {} + + ; + AlignStart.value = new AlignStart(); + return AlignStart; +}(); + +var AlignEnd = function () { + function AlignEnd() {} + + ; + AlignEnd.value = new AlignEnd(); + return AlignEnd; +}(); + +var Repeat = function () { + function Repeat() {} + + ; + Repeat.value = new Repeat(); + return Repeat; +}(); + +var RepeatX = function () { + function RepeatX() {} + + ; + RepeatX.value = new RepeatX(); + return RepeatX; +}(); + +var RepeatY = function () { + function RepeatY() {} + + ; + RepeatY.value = new RepeatY(); + return RepeatY; +}(); + +var NoRepeat = function () { + function NoRepeat() {} + + ; + NoRepeat.value = new NoRepeat(); + return NoRepeat; +}(); + +var BevelJoin = function () { + function BevelJoin() {} + + ; + BevelJoin.value = new BevelJoin(); + return BevelJoin; +}(); + +var RoundJoin = function () { + function RoundJoin() {} + + ; + RoundJoin.value = new RoundJoin(); + return RoundJoin; +}(); + +var MiterJoin = function () { + function MiterJoin() {} + + ; + MiterJoin.value = new MiterJoin(); + return MiterJoin; +}(); + +var Round = function () { + function Round() {} + + ; + Round.value = new Round(); + return Round; +}(); + +var Square = function () { + function Square() {} + + ; + Square.value = new Square(); + return Square; +}(); + +var Butt = function () { + function Butt() {} + + ; + Butt.value = new Butt(); + return Butt; +}(); + +var SourceOver = function () { + function SourceOver() {} + + ; + SourceOver.value = new SourceOver(); + return SourceOver; +}(); + +var SourceIn = function () { + function SourceIn() {} + + ; + SourceIn.value = new SourceIn(); + return SourceIn; +}(); + +var SourceOut = function () { + function SourceOut() {} + + ; + SourceOut.value = new SourceOut(); + return SourceOut; +}(); + +var SourceAtop = function () { + function SourceAtop() {} + + ; + SourceAtop.value = new SourceAtop(); + return SourceAtop; +}(); + +var DestinationOver = function () { + function DestinationOver() {} + + ; + DestinationOver.value = new DestinationOver(); + return DestinationOver; +}(); + +var DestinationIn = function () { + function DestinationIn() {} + + ; + DestinationIn.value = new DestinationIn(); + return DestinationIn; +}(); + +var DestinationOut = function () { + function DestinationOut() {} + + ; + DestinationOut.value = new DestinationOut(); + return DestinationOut; +}(); + +var DestinationAtop = function () { + function DestinationAtop() {} + + ; + DestinationAtop.value = new DestinationAtop(); + return DestinationAtop; +}(); + +var Lighter = function () { + function Lighter() {} + + ; + Lighter.value = new Lighter(); + return Lighter; +}(); + +var Copy = function () { + function Copy() {} + + ; + Copy.value = new Copy(); + return Copy; +}(); + +var Xor = function () { + function Xor() {} + + ; + Xor.value = new Xor(); + return Xor; +}(); + +var Multiply = function () { + function Multiply() {} + + ; + Multiply.value = new Multiply(); + return Multiply; +}(); + +var Screen = function () { + function Screen() {} + + ; + Screen.value = new Screen(); + return Screen; +}(); + +var Overlay = function () { + function Overlay() {} + + ; + Overlay.value = new Overlay(); + return Overlay; +}(); + +var Darken = function () { + function Darken() {} + + ; + Darken.value = new Darken(); + return Darken; +}(); + +var Lighten = function () { + function Lighten() {} + + ; + Lighten.value = new Lighten(); + return Lighten; +}(); + +var ColorDodge = function () { + function ColorDodge() {} + + ; + ColorDodge.value = new ColorDodge(); + return ColorDodge; +}(); + +var ColorBurn = function () { + function ColorBurn() {} + + ; + ColorBurn.value = new ColorBurn(); + return ColorBurn; +}(); + +var HardLight = function () { + function HardLight() {} + + ; + HardLight.value = new HardLight(); + return HardLight; +}(); + +var SoftLight = function () { + function SoftLight() {} + + ; + SoftLight.value = new SoftLight(); + return SoftLight; +}(); + +var Difference = function () { + function Difference() {} + + ; + Difference.value = new Difference(); + return Difference; +}(); + +var Exclusion = function () { + function Exclusion() {} + + ; + Exclusion.value = new Exclusion(); + return Exclusion; +}(); + +var Hue = function () { + function Hue() {} + + ; + Hue.value = new Hue(); + return Hue; +}(); + +var Saturation = function () { + function Saturation() {} + + ; + Saturation.value = new Saturation(); + return Saturation; +}(); + +var Color = function () { + function Color() {} + + ; + Color.value = new Color(); + return Color; +}(); + +var Luminosity = function () { + function Luminosity() {} + + ; + Luminosity.value = new Luminosity(); + return Luminosity; +}(); + +var withContext = function withContext(ctx) { + return function (action) { + return function __do() { + var v = $foreign.save(ctx)(); + var v1 = action(); + var v2 = $foreign.restore(ctx)(); + return v1; + }; + }; +}; + +var tryLoadImage = function tryLoadImage(path) { + return function (k) { + return $foreign.tryLoadImageImpl(path)(k(Data_Maybe.Nothing.value))(function ($40) { + return k(Data_Maybe.Just.create($40)); + }); + }; +}; + +var textAlign = function textAlign(ctx) { + var unsafeParseTextAlign = function unsafeParseTextAlign(v) { + if (v === "left") { + return AlignLeft.value; + } + + ; + + if (v === "right") { + return AlignRight.value; + } + + ; + + if (v === "center") { + return AlignCenter.value; + } + + ; + + if (v === "start") { + return AlignStart.value; + } + + ; + + if (v === "end") { + return AlignEnd.value; + } + + ; + return Effect_Exception_Unsafe.unsafeThrow("invalid TextAlign: " + v); + }; + + return Data_Functor.map(Effect.functorEffect)(unsafeParseTextAlign)($foreign.textAlignImpl(ctx)); +}; + +var strokePath = function strokePath(ctx) { + return function (path) { + return function __do() { + var v = $foreign.beginPath(ctx)(); + var v1 = path(); + var v2 = $foreign.stroke(ctx)(); + return v1; + }; + }; +}; + +var showTextAlign = new Data_Show.Show(function (v) { + if (v instanceof AlignLeft) { + return "AlignLeft"; + } + + ; + + if (v instanceof AlignRight) { + return "AlignRight"; + } + + ; + + if (v instanceof AlignCenter) { + return "AlignCenter"; + } + + ; + + if (v instanceof AlignStart) { + return "AlignStart"; + } + + ; + + if (v instanceof AlignEnd) { + return "AlignEnd"; + } + + ; + throw new Error("Failed pattern match at Graphics.Canvas (line 489, column 1 - line 494, column 29): " + [v.constructor.name]); +}); +var showPatternRepeat = new Data_Show.Show(function (v) { + if (v instanceof Repeat) { + return "Repeat"; + } + + ; + + if (v instanceof RepeatX) { + return "RepeatX"; + } + + ; + + if (v instanceof RepeatY) { + return "RepeatY"; + } + + ; + + if (v instanceof NoRepeat) { + return "NoRepeat"; + } + + ; + throw new Error("Failed pattern match at Graphics.Canvas (line 599, column 1 - line 603, column 29): " + [v.constructor.name]); +}); +var showComposite = new Data_Show.Show(function (v) { + if (v instanceof SourceOver) { + return "SourceOver"; + } + + ; + + if (v instanceof SourceIn) { + return "SourceIn"; + } + + ; + + if (v instanceof SourceOut) { + return "SourceOut"; + } + + ; + + if (v instanceof SourceAtop) { + return "SourceAtop"; + } + + ; + + if (v instanceof DestinationOver) { + return "DestinationOver"; + } + + ; + + if (v instanceof DestinationIn) { + return "DestinationIn"; + } + + ; + + if (v instanceof DestinationOut) { + return "DestinationOut"; + } + + ; + + if (v instanceof DestinationAtop) { + return "DestinationAtop"; + } + + ; + + if (v instanceof Lighter) { + return "Lighter"; + } + + ; + + if (v instanceof Copy) { + return "Copy"; + } + + ; + + if (v instanceof Xor) { + return "Xor"; + } + + ; + + if (v instanceof Multiply) { + return "Multiply"; + } + + ; + + if (v instanceof Screen) { + return "Screen"; + } + + ; + + if (v instanceof Overlay) { + return "Overlay"; + } + + ; + + if (v instanceof Darken) { + return "Darken"; + } + + ; + + if (v instanceof Lighten) { + return "Lighten"; + } + + ; + + if (v instanceof ColorDodge) { + return "ColorDodge"; + } + + ; + + if (v instanceof ColorBurn) { + return "ColorBurn"; + } + + ; + + if (v instanceof HardLight) { + return "HardLight"; + } + + ; + + if (v instanceof SoftLight) { + return "SoftLight"; + } + + ; + + if (v instanceof Difference) { + return "Difference"; + } + + ; + + if (v instanceof Exclusion) { + return "Exclusion"; + } + + ; + + if (v instanceof Hue) { + return "Hue"; + } + + ; + + if (v instanceof Saturation) { + return "Saturation"; + } + + ; + + if (v instanceof Color) { + return "Color"; + } + + ; + + if (v instanceof Luminosity) { + return "Luminosity"; + } + + ; + throw new Error("Failed pattern match at Graphics.Canvas (line 284, column 1 - line 310, column 38): " + [v.constructor.name]); +}); + +var setTextAlign = function setTextAlign(ctx) { + return function (textalign) { + var toString = function toString(v) { + if (v instanceof AlignLeft) { + return "left"; + } + + ; + + if (v instanceof AlignRight) { + return "right"; + } + + ; + + if (v instanceof AlignCenter) { + return "center"; + } + + ; + + if (v instanceof AlignStart) { + return "start"; + } + + ; + + if (v instanceof AlignEnd) { + return "end"; + } + + ; + throw new Error("Failed pattern match at Graphics.Canvas (line 518, column 5 - line 518, column 32): " + [v.constructor.name]); + }; + + return $foreign.setTextAlignImpl(ctx)(toString(textalign)); + }; +}; + +var setLineJoin = function setLineJoin(context) { + return function (v) { + if (v instanceof BevelJoin) { + return $foreign.setLineJoinImpl(context)("bevel"); + } + + ; + + if (v instanceof RoundJoin) { + return $foreign.setLineJoinImpl(context)("round"); + } + + ; + + if (v instanceof MiterJoin) { + return $foreign.setLineJoinImpl(context)("miter"); + } + + ; + throw new Error("Failed pattern match at Graphics.Canvas (line 247, column 1 - line 247, column 52): " + [context.constructor.name, v.constructor.name]); + }; +}; + +var setLineCap = function setLineCap(context) { + return function (v) { + if (v instanceof Round) { + return $foreign.setLineCapImpl(context)("round"); + } + + ; + + if (v instanceof Square) { + return $foreign.setLineCapImpl(context)("square"); + } + + ; + + if (v instanceof Butt) { + return $foreign.setLineCapImpl(context)("butt"); + } + + ; + throw new Error("Failed pattern match at Graphics.Canvas (line 234, column 1 - line 234, column 50): " + [context.constructor.name, v.constructor.name]); + }; +}; + +var setGlobalCompositeOperation = function setGlobalCompositeOperation(ctx) { + return function (composite) { + var toString = function toString(v) { + if (v instanceof SourceOver) { + return "source-over"; + } + + ; + + if (v instanceof SourceIn) { + return "source-in"; + } + + ; + + if (v instanceof SourceOut) { + return "source-out"; + } + + ; + + if (v instanceof SourceAtop) { + return "source-atop"; + } + + ; + + if (v instanceof DestinationOver) { + return "destination-over"; + } + + ; + + if (v instanceof DestinationIn) { + return "destination-in"; + } + + ; + + if (v instanceof DestinationOut) { + return "destination-out"; + } + + ; + + if (v instanceof DestinationAtop) { + return "destination-atop"; + } + + ; + + if (v instanceof Lighter) { + return "lighter"; + } + + ; + + if (v instanceof Copy) { + return "copy"; + } + + ; + + if (v instanceof Xor) { + return "xor"; + } + + ; + + if (v instanceof Multiply) { + return "multiply"; + } + + ; + + if (v instanceof Screen) { + return "screen"; + } + + ; + + if (v instanceof Overlay) { + return "overlay"; + } + + ; + + if (v instanceof Darken) { + return "darken"; + } + + ; + + if (v instanceof Lighten) { + return "lighten"; + } + + ; + + if (v instanceof ColorDodge) { + return "color-dodge"; + } + + ; + + if (v instanceof ColorBurn) { + return "color-burn"; + } + + ; + + if (v instanceof HardLight) { + return "hard-light"; + } + + ; + + if (v instanceof SoftLight) { + return "soft-light"; + } + + ; + + if (v instanceof Difference) { + return "difference"; + } + + ; + + if (v instanceof Exclusion) { + return "exclusion"; + } + + ; + + if (v instanceof Hue) { + return "hue"; + } + + ; + + if (v instanceof Saturation) { + return "saturation"; + } + + ; + + if (v instanceof Color) { + return "color"; + } + + ; + + if (v instanceof Luminosity) { + return "luminosity"; + } + + ; + throw new Error("Failed pattern match at Graphics.Canvas (line 318, column 5 - line 318, column 45): " + [v.constructor.name]); + }; + + return $foreign.setGlobalCompositeOperationImpl(ctx)(toString(composite)); + }; +}; + +var setCanvasDimensions = function setCanvasDimensions(ce) { + return function (d) { + return Control_Apply.applySecond(Effect.applyEffect)($foreign.setCanvasHeight(ce)(d.height))($foreign.setCanvasWidth(ce)(d.width)); + }; +}; + +var getCanvasElementById = function getCanvasElementById(elId) { + return $foreign.getCanvasElementByIdImpl(elId, Data_Maybe.Just.create, Data_Maybe.Nothing.value); +}; + +var getCanvasDimensions = function getCanvasDimensions(ce) { + return function __do() { + var v = $foreign.getCanvasWidth(ce)(); + var v1 = $foreign.getCanvasHeight(ce)(); + return { + width: v, + height: v1 + }; + }; +}; + +var fillPath = function fillPath(ctx) { + return function (path) { + return function __do() { + var v = $foreign.beginPath(ctx)(); + var v1 = path(); + var v2 = $foreign.fill(ctx)(); + return v1; + }; + }; +}; + +var eqLineCap = new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof Round && y instanceof Round) { + return true; + } + + ; + + if (x instanceof Square && y instanceof Square) { + return true; + } + + ; + + if (x instanceof Butt && y instanceof Butt) { + return true; + } + + ; + return false; + }; +}); + +var createPattern = function createPattern(context) { + return function (img) { + return function (repeat) { + var toString = function toString(v) { + if (v instanceof Repeat) { + return "repeat"; + } + + ; + + if (v instanceof RepeatX) { + return "repeat-x"; + } + + ; + + if (v instanceof RepeatY) { + return "repeat-y"; + } + + ; + + if (v instanceof NoRepeat) { + return "no-repeat"; + } + + ; + throw new Error("Failed pattern match at Graphics.Canvas (line 611, column 5 - line 611, column 31): " + [v.constructor.name]); + }; + + return $foreign.createPatternImpl(context)(img)(toString(repeat)); + }; + }; +}; + +module.exports = { + SourceOver: SourceOver, + SourceIn: SourceIn, + SourceOut: SourceOut, + SourceAtop: SourceAtop, + DestinationOver: DestinationOver, + DestinationIn: DestinationIn, + DestinationOut: DestinationOut, + DestinationAtop: DestinationAtop, + Lighter: Lighter, + Copy: Copy, + Xor: Xor, + Multiply: Multiply, + Screen: Screen, + Overlay: Overlay, + Darken: Darken, + Lighten: Lighten, + ColorDodge: ColorDodge, + ColorBurn: ColorBurn, + HardLight: HardLight, + SoftLight: SoftLight, + Difference: Difference, + Exclusion: Exclusion, + Hue: Hue, + Saturation: Saturation, + Color: Color, + Luminosity: Luminosity, + Round: Round, + Square: Square, + Butt: Butt, + BevelJoin: BevelJoin, + RoundJoin: RoundJoin, + MiterJoin: MiterJoin, + AlignLeft: AlignLeft, + AlignRight: AlignRight, + AlignCenter: AlignCenter, + AlignStart: AlignStart, + AlignEnd: AlignEnd, + Repeat: Repeat, + RepeatX: RepeatX, + RepeatY: RepeatY, + NoRepeat: NoRepeat, + getCanvasElementById: getCanvasElementById, + getCanvasDimensions: getCanvasDimensions, + setCanvasDimensions: setCanvasDimensions, + setLineCap: setLineCap, + setLineJoin: setLineJoin, + setGlobalCompositeOperation: setGlobalCompositeOperation, + strokePath: strokePath, + fillPath: fillPath, + textAlign: textAlign, + setTextAlign: setTextAlign, + withContext: withContext, + tryLoadImage: tryLoadImage, + createPattern: createPattern, + eqLineCap: eqLineCap, + showComposite: showComposite, + showTextAlign: showTextAlign, + showPatternRepeat: showPatternRepeat, + getContext2D: $foreign.getContext2D, + getCanvasWidth: $foreign.getCanvasWidth, + setCanvasWidth: $foreign.setCanvasWidth, + getCanvasHeight: $foreign.getCanvasHeight, + setCanvasHeight: $foreign.setCanvasHeight, + canvasToDataURL: $foreign.canvasToDataURL, + setLineWidth: $foreign.setLineWidth, + setLineDash: $foreign.setLineDash, + setFillStyle: $foreign.setFillStyle, + setStrokeStyle: $foreign.setStrokeStyle, + setShadowBlur: $foreign.setShadowBlur, + setShadowOffsetX: $foreign.setShadowOffsetX, + setShadowOffsetY: $foreign.setShadowOffsetY, + setShadowColor: $foreign.setShadowColor, + setMiterLimit: $foreign.setMiterLimit, + setGlobalAlpha: $foreign.setGlobalAlpha, + beginPath: $foreign.beginPath, + stroke: $foreign.stroke, + fill: $foreign.fill, + clip: $foreign.clip, + lineTo: $foreign.lineTo, + moveTo: $foreign.moveTo, + closePath: $foreign.closePath, + arc: $foreign.arc, + rect: $foreign.rect, + fillRect: $foreign.fillRect, + strokeRect: $foreign.strokeRect, + clearRect: $foreign.clearRect, + scale: $foreign.scale, + rotate: $foreign.rotate, + translate: $foreign.translate, + transform: $foreign.transform, + setTransform: $foreign.setTransform, + font: $foreign.font, + setFont: $foreign.setFont, + fillText: $foreign.fillText, + strokeText: $foreign.strokeText, + measureText: $foreign.measureText, + save: $foreign.save, + restore: $foreign.restore, + getImageData: $foreign.getImageData, + putImageData: $foreign.putImageData, + putImageDataFull: $foreign.putImageDataFull, + createImageData: $foreign.createImageData, + createImageDataCopy: $foreign.createImageDataCopy, + imageDataWidth: $foreign.imageDataWidth, + imageDataHeight: $foreign.imageDataHeight, + imageDataBuffer: $foreign.imageDataBuffer, + canvasElementToImageSource: $foreign.canvasElementToImageSource, + drawImage: $foreign.drawImage, + drawImageScale: $foreign.drawImageScale, + drawImageFull: $foreign.drawImageFull, + setPatternFillStyle: $foreign.setPatternFillStyle, + createLinearGradient: $foreign.createLinearGradient, + createRadialGradient: $foreign.createRadialGradient, + addColorStop: $foreign.addColorStop, + setGradientFillStyle: $foreign.setGradientFillStyle, + quadraticCurveTo: $foreign.quadraticCurveTo, + bezierCurveTo: $foreign.bezierCurveTo +}; +},{"./foreign.js":"RCTS","../Control.Apply/index.js":"QcLv","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Show/index.js":"mFY7","../Effect/index.js":"oTWB","../Effect.Exception.Unsafe/index.js":"IZvR"}],"YWUW":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Generic_Rep = require("../Data.Generic.Rep/index.js"); + +var Data_Lens_Getter = require("../Data.Lens.Getter/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Data_Variant = require("../Data.Variant/index.js"); + +var Data_Variant_Internal = require("../Data.Variant.Internal/index.js"); + +var Effect = require("../Effect/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var Graphics_Canvas = require("../Graphics.Canvas/index.js"); + +var Type_Equality = require("../Type.Equality/index.js"); + +var Fixed = function () { + function Fixed() {} + + ; + Fixed.value = new Fixed(); + return Fixed; +}(); + +var Scrolling = function () { + function Scrolling() {} + + ; + Scrolling.value = new Scrolling(); + return Scrolling; +}(); + +var NoMask = function () { + function NoMask() {} + + ; + NoMask.value = new NoMask(); + return NoMask; +}(); + +var Masked = function () { + function Masked(value0) { + this.value0 = value0; + } + + ; + + Masked.create = function (value0) { + return new Masked(value0); + }; + + return Masked; +}(); + +var Full = function () { + function Full(value0) { + this.value0 = value0; + } + + ; + + Full.create = function (value0) { + return new Full(value0); + }; + + return Full; +}(); + +var Center = function () { + function Center(value0) { + this.value0 = value0; + } + + ; + + Center.create = function (value0) { + return new Center(value0); + }; + + return Center; +}(); + +var CTop = function () { + function CTop(value0) { + this.value0 = value0; + } + + ; + + CTop.create = function (value0) { + return new CTop(value0); + }; + + return CTop; +}(); + +var CRight = function () { + function CRight(value0) { + this.value0 = value0; + } + + ; + + CRight.create = function (value0) { + return new CRight(value0); + }; + + return CRight; +}(); + +var CBottom = function () { + function CBottom(value0) { + this.value0 = value0; + } + + ; + + CBottom.create = function (value0) { + return new CBottom(value0); + }; + + return CBottom; +}(); + +var CLeft = function () { + function CLeft(value0) { + this.value0 = value0; + } + + ; + + CLeft.create = function (value0) { + return new CLeft(value0); + }; + + return CLeft; +}(); + +var Layer = function () { + function Layer(value0, value1, value2) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + } + + ; + + Layer.create = function (value0) { + return function (value1) { + return function (value2) { + return new Layer(value0, value1, value2); + }; + }; + }; + + return Layer; +}(); + +var slot = function slot(v) { + var wC = v.size.width - v.padding.right - v.padding.left; + var p0 = { + x: 0.0, + y: 0.0 + }; + return Data_Variant.onMatch()(Data_Variant_Internal.variantMatchCons(Data_Variant_Internal.variantMatchCons(Data_Variant_Internal.variantMatchCons(Data_Variant_Internal.variantMatchCons(Data_Variant_Internal.variantMatchCons(Data_Variant_Internal.variantMatchCons(Data_Variant_Internal.variantMatchNil)()(Type_Equality.refl))()(Type_Equality.refl))()(Type_Equality.refl))()(Type_Equality.refl))()(Type_Equality.refl))()(Type_Equality.refl))()({ + full: function full(v1) { + return { + offset: p0, + size: v.size + }; + }, + center: function center(v1) { + return { + offset: { + x: v.padding.left, + y: v.padding.top + }, + size: { + width: wC, + height: v.size.height - v.padding.top - v.padding.bottom + } + }; + }, + top: function top(v1) { + return { + offset: { + x: v.padding.left, + y: p0.y + }, + size: { + width: wC, + height: v.padding.top + } + }; + }, + right: function right(v1) { + return { + offset: { + x: v.size.width - v.padding.right, + y: v.padding.top + }, + size: { + width: v.padding.right, + height: v.size.height - (v.padding.top + v.padding.bottom) + } + }; + }, + bottom: function bottom(v1) { + return { + offset: { + x: v.padding.left, + y: v.size.height - v.padding.bottom + }, + size: { + width: wC, + height: v.padding.bottom + } + }; + }, + left: function left(v1) { + return { + offset: { + y: v.padding.top, + x: p0.x + }, + size: { + width: v.padding.left, + height: v.size.height - (v.padding.top + v.padding.bottom) + } + }; + } + })(Data_Variant.case_); +}; + +var slotOffset = function slotOffset(sp) { + var $183 = slot(sp); + return function ($184) { + return function (v) { + return v.offset; + }($183($184)); + }; +}; + +var slotSize = function slotSize(sp) { + var $185 = slot(sp); + return function ($186) { + return function (v) { + return v.size; + }($185($186)); + }; +}; + +var genericComponent = new Data_Generic_Rep.Generic(function (x) { + if (x instanceof Full) { + return new Data_Generic_Rep.Inl(x.value0); + } + + ; + + if (x instanceof Center) { + return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0)); + } + + ; + + if (x instanceof CTop) { + return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0))); + } + + ; + + if (x instanceof CRight) { + return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0)))); + } + + ; + + if (x instanceof CBottom) { + return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0))))); + } + + ; + + if (x instanceof CLeft) { + return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(x.value0))))); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Layer (line 64, column 1 - line 64, column 60): " + [x.constructor.name]); +}, function (x) { + if (x instanceof Data_Generic_Rep.Inl) { + return new Full(x.value0); + } + + ; + + if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inl) { + return new Center(x.value0.value0); + } + + ; + + if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inl) { + return new CTop(x.value0.value0.value0); + } + + ; + + if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inl) { + return new CRight(x.value0.value0.value0.value0); + } + + ; + + if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) { + return new CBottom(x.value0.value0.value0.value0.value0); + } + + ; + + if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr) { + return new CLeft(x.value0.value0.value0.value0.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Layer (line 64, column 1 - line 64, column 60): " + [x.constructor.name]); +}); +var functorComponent = new Data_Functor.Functor(function (f) { + return function (m) { + if (m instanceof Full) { + return new Full(f(m.value0)); + } + + ; + + if (m instanceof Center) { + return new Center(f(m.value0)); + } + + ; + + if (m instanceof CTop) { + return new CTop(f(m.value0)); + } + + ; + + if (m instanceof CRight) { + return new CRight(f(m.value0)); + } + + ; + + if (m instanceof CBottom) { + return new CBottom(f(m.value0)); + } + + ; + + if (m instanceof CLeft) { + return new CLeft(f(m.value0)); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Layer (line 63, column 1 - line 63, column 54): " + [m.constructor.name]); + }; +}); +var functorLayer = new Data_Functor.Functor(function (f) { + return function (m) { + return new Layer(m.value0, m.value1, Data_Functor.map(functorComponent)(f)(m.value2)); + }; +}); +var eqLayerMask = new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof NoMask && y instanceof NoMask) { + return true; + } + + ; + + if (x instanceof Masked && y instanceof Masked) { + return x.value0 === y.value0; + } + + ; + return false; + }; +}); + +var eqComponent = function eqComponent(dictEq) { + return new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof Full && y instanceof Full) { + return Data_Eq.eq(dictEq)(x.value0)(y.value0); + } + + ; + + if (x instanceof Center && y instanceof Center) { + return Data_Eq.eq(dictEq)(x.value0)(y.value0); + } + + ; + + if (x instanceof CTop && y instanceof CTop) { + return Data_Eq.eq(dictEq)(x.value0)(y.value0); + } + + ; + + if (x instanceof CRight && y instanceof CRight) { + return Data_Eq.eq(dictEq)(x.value0)(y.value0); + } + + ; + + if (x instanceof CBottom && y instanceof CBottom) { + return Data_Eq.eq(dictEq)(x.value0)(y.value0); + } + + ; + + if (x instanceof CLeft && y instanceof CLeft) { + return Data_Eq.eq(dictEq)(x.value0)(y.value0); + } + + ; + return false; + }; + }); +}; + +var ordComponent = function ordComponent(dictOrd) { + return new Data_Ord.Ord(function () { + return eqComponent(dictOrd.Eq0()); + }, function (x) { + return function (y) { + if (x instanceof Full && y instanceof Full) { + return Data_Ord.compare(dictOrd)(x.value0)(y.value0); + } + + ; + + if (x instanceof Full) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof Full) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof Center && y instanceof Center) { + return Data_Ord.compare(dictOrd)(x.value0)(y.value0); + } + + ; + + if (x instanceof Center) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof Center) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof CTop && y instanceof CTop) { + return Data_Ord.compare(dictOrd)(x.value0)(y.value0); + } + + ; + + if (x instanceof CTop) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof CTop) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof CRight && y instanceof CRight) { + return Data_Ord.compare(dictOrd)(x.value0)(y.value0); + } + + ; + + if (x instanceof CRight) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof CRight) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof CBottom && y instanceof CBottom) { + return Data_Ord.compare(dictOrd)(x.value0)(y.value0); + } + + ; + + if (x instanceof CBottom) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof CBottom) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof CLeft && y instanceof CLeft) { + return Data_Ord.compare(dictOrd)(x.value0)(y.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Layer (line 62, column 1 - line 62, column 59): " + [x.constructor.name, y.constructor.name]); + }; + }); +}; + +var _top = Data_Symbol.SProxy.value; +var _right = Data_Symbol.SProxy.value; +var _left = Data_Symbol.SProxy.value; +var _full = Data_Symbol.SProxy.value; +var _center = Data_Symbol.SProxy.value; +var _bottom = Data_Symbol.SProxy.value; + +var asSlot = function asSlot(v) { + if (v instanceof Full) { + return Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "full"; + }))(_full)(v.value0); + } + + ; + + if (v instanceof Center) { + return Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "center"; + }))(_center)(v.value0); + } + + ; + + if (v instanceof CTop) { + return Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "top"; + }))(_top)(v.value0); + } + + ; + + if (v instanceof CRight) { + return Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "right"; + }))(_right)(v.value0); + } + + ; + + if (v instanceof CBottom) { + return Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "bottom"; + }))(_bottom)(v.value0); + } + + ; + + if (v instanceof CLeft) { + return Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "left"; + }))(_left)(v.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Layer (line 98, column 10 - line 104, column 30): " + [v.constructor.name]); +}; + +var trackSlots = function trackSlots(sp) { + return { + full: slot(sp)(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "full"; + }))(_full)(Data_Unit.unit)), + center: slot(sp)(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "center"; + }))(_center)(Data_Unit.unit)), + top: slot(sp)(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "top"; + }))(_top)(Data_Unit.unit)), + right: slot(sp)(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "right"; + }))(_right)(Data_Unit.unit)), + bottom: slot(sp)(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "bottom"; + }))(_bottom)(Data_Unit.unit)), + left: slot(sp)(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "left"; + }))(_left)(Data_Unit.unit)) + }; +}; + +var slotContext = function slotContext(dictMonadEffect) { + return function (v) { + return function (dims) { + return function (el) { + return Effect_Class.liftEffect(dictMonadEffect)(function __do() { + var v1 = Graphics_Canvas.getContext2D(el)(); + var slots = trackSlots(dims); + + var clipMask = function clipMask(p0) { + return function (p1) { + return function __do() { + var v2 = Graphics_Canvas.beginPath(v1)(); + var v3 = Graphics_Canvas.moveTo(v1)(p0.x)(p0.y)(); + var v4 = Graphics_Canvas.lineTo(v1)(p1.x)(p0.y)(); + var v5 = Graphics_Canvas.lineTo(v1)(p1.x)(p1.y)(); + var v6 = Graphics_Canvas.lineTo(v1)(p0.x)(p1.y)(); + var v7 = Graphics_Canvas.clip(v1)(); + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.closePath(v1))(); + }; + }; + }; + + var size = slotSize(dims)(asSlot(v.value2)); + var offset = slotOffset(dims)(asSlot(v.value2)); + $foreign.setContextTranslation(offset)(v1)(); + + (function () { + if (v.value1 instanceof NoMask) { + return Data_Unit.unit; + } + + ; + + if (v.value1 instanceof Masked) { + return clipMask({ + x: -v.value1.value0, + y: -v.value1.value0 + })({ + x: size.width + v.value1.value0, + y: size.height + v.value1.value0 + })(); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Layer (line 203, column 3 - line 207, column 48): " + [v.value1.constructor.name]); + })(); + + return v1; + }); + }; + }; + }; +}; + +var _Component = Data_Lens_Getter.to(function (v) { + if (v instanceof Full) { + return v.value0; + } + + ; + + if (v instanceof Center) { + return v.value0; + } + + ; + + if (v instanceof CTop) { + return v.value0; + } + + ; + + if (v instanceof CRight) { + return v.value0; + } + + ; + + if (v instanceof CBottom) { + return v.value0; + } + + ; + + if (v instanceof CLeft) { + return v.value0; + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Layer (line 53, column 17 - line 59, column 18): " + [v.constructor.name]); +}); + +module.exports = { + Full: Full, + Center: Center, + CTop: CTop, + CRight: CRight, + CBottom: CBottom, + CLeft: CLeft, + "_Component": _Component, + Layer: Layer, + Fixed: Fixed, + Scrolling: Scrolling, + NoMask: NoMask, + Masked: Masked, + asSlot: asSlot, + slotContext: slotContext, + slotOffset: slotOffset, + slotSize: slotSize, + trackSlots: trackSlots, + eqComponent: eqComponent, + ordComponent: ordComponent, + functorComponent: functorComponent, + genericComponent: genericComponent, + functorLayer: functorLayer, + eqLayerMask: eqLayerMask, + setContextTranslation: $foreign.setContextTranslation +}; +},{"./foreign.js":"1Q0x","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Generic.Rep/index.js":"AuzG","../Data.Lens.Getter/index.js":"OPOX","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Data.Variant/index.js":"hgdh","../Data.Variant.Internal/index.js":"kYoO","../Effect/index.js":"oTWB","../Effect.Class/index.js":"dWtH","../Graphics.Canvas/index.js":"rm6N","../Type.Equality/index.js":"Uq/R"}],"fMOI":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var FontOptions = function FontOptions(x) { + return x; +}; + +var FontFamily = function FontFamily(x) { + return x; +}; + +var Font = function () { + function Font(value0, value1, value2) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + } + + ; + + Font.create = function (value0) { + return function (value1) { + return function (value2) { + return new Font(value0, value1, value2); + }; + }; + }; + + return Font; +}(); + +var smallCaps = { + style: Data_Maybe.Nothing.value, + variant: new Data_Maybe.Just("small-caps"), + weight: Data_Maybe.Nothing.value +}; +var serif = "serif"; +var semigroupFontOptions = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return { + style: Control_Alt.alt(Data_Maybe.altMaybe)(v.style)(v1.style), + variant: Control_Alt.alt(Data_Maybe.altMaybe)(v.variant)(v1.variant), + weight: Control_Alt.alt(Data_Maybe.altMaybe)(v.weight)(v1.weight) + }; + }; +}); +var sansSerif = "sans-serif"; + +var optionsString = function optionsString(v) { + return Data_Foldable.intercalate(Data_Foldable.foldableArray)(Data_Monoid.monoidString)(" ")([Data_Foldable.fold(Data_Foldable.foldableMaybe)(Data_Monoid.monoidString)(v.style), Data_Foldable.fold(Data_Foldable.foldableMaybe)(Data_Monoid.monoidString)(v.variant), Data_Foldable.fold(Data_Foldable.foldableMaybe)(Data_Monoid.monoidString)(v.weight)]); +}; + +var oblique = { + style: new Data_Maybe.Just("oblique"), + variant: Data_Maybe.Nothing.value, + weight: Data_Maybe.Nothing.value +}; +var monospace = "monospace"; +var monoidFontOptions = new Data_Monoid.Monoid(function () { + return semigroupFontOptions; +}, { + style: Data_Maybe.Nothing.value, + variant: Data_Maybe.Nothing.value, + weight: Data_Maybe.Nothing.value +}); +var light = { + style: Data_Maybe.Nothing.value, + variant: Data_Maybe.Nothing.value, + weight: new Data_Maybe.Just("lighter") +}; +var italic = { + style: new Data_Maybe.Just("italic"), + variant: Data_Maybe.Nothing.value, + weight: Data_Maybe.Nothing.value +}; + +var fontString = function fontString(v) { + return optionsString(v.value2) + (" " + (Data_Show.show(Data_Show.showInt)(v.value1) + ("px " + v.value0))); +}; + +var font = Font.create; +var fantasy = "fantasy"; +var eqFontOptions = new Data_Eq.Eq(function (v) { + return function (v1) { + return Data_Eq.eq(Data_Maybe.eqMaybe(Data_Eq.eqString))(v.style)(v1.style) && Data_Eq.eq(Data_Maybe.eqMaybe(Data_Eq.eqString))(v.variant)(v1.variant) && Data_Eq.eq(Data_Maybe.eqMaybe(Data_Eq.eqString))(v.weight)(v1.weight); + }; +}); +var eqFontFamily = new Data_Eq.Eq(function (x) { + return function (y) { + return x === y; + }; +}); +var eqFont = new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(eqFontFamily)(x.value0)(y.value0) && x.value1 === y.value1 && Data_Eq.eq(eqFontOptions)(x.value2)(y.value2); + }; +}); +var customFont = FontFamily; +var cursive = "cursive"; +var bolder = { + style: Data_Maybe.Nothing.value, + variant: Data_Maybe.Nothing.value, + weight: new Data_Maybe.Just("bolder") +}; +var bold = { + style: Data_Maybe.Nothing.value, + variant: Data_Maybe.Nothing.value, + weight: new Data_Maybe.Just("bold") +}; +module.exports = { + font: font, + fontString: fontString, + serif: serif, + sansSerif: sansSerif, + monospace: monospace, + cursive: cursive, + fantasy: fantasy, + customFont: customFont, + bold: bold, + bolder: bolder, + light: light, + italic: italic, + oblique: oblique, + smallCaps: smallCaps, + eqFont: eqFont, + eqFontFamily: eqFontFamily, + eqFontOptions: eqFontOptions, + semigroupFontOptions: semigroupFontOptions, + monoidFontOptions: monoidFontOptions +}; +},{"../Control.Alt/index.js":"lN+m","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"0WVi":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Color = require("../Color/index.js"); + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_List = require("../Data.List/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Effect = require("../Effect/index.js"); + +var Graphics_Canvas = require("../Graphics.Canvas/index.js"); + +var Graphics_Drawing_Font = require("../Graphics.Drawing.Font/index.js"); + +var $$Math = require("../Math/index.js"); + +var Shadow = function Shadow(x) { + return x; +}; + +var Path = function () { + function Path(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Path.create = function (value0) { + return function (value1) { + return new Path(value0, value1); + }; + }; + + return Path; +}(); + +var Rectangle = function () { + function Rectangle(value0) { + this.value0 = value0; + } + + ; + + Rectangle.create = function (value0) { + return new Rectangle(value0); + }; + + return Rectangle; +}(); + +var Arc = function () { + function Arc(value0) { + this.value0 = value0; + } + + ; + + Arc.create = function (value0) { + return new Arc(value0); + }; + + return Arc; +}(); + +var Composite = function () { + function Composite(value0) { + this.value0 = value0; + } + + ; + + Composite.create = function (value0) { + return new Composite(value0); + }; + + return Composite; +}(); + +var OutlineStyle = function OutlineStyle(x) { + return x; +}; + +var FillStyle = function FillStyle(x) { + return x; +}; + +var Fill = function () { + function Fill(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Fill.create = function (value0) { + return function (value1) { + return new Fill(value0, value1); + }; + }; + + return Fill; +}(); + +var Outline = function () { + function Outline(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Outline.create = function (value0) { + return function (value1) { + return new Outline(value0, value1); + }; + }; + + return Outline; +}(); + +var Text = function () { + function Text(value0, value1, value2, value3, value4) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + this.value3 = value3; + this.value4 = value4; + } + + ; + + Text.create = function (value0) { + return function (value1) { + return function (value2) { + return function (value3) { + return function (value4) { + return new Text(value0, value1, value2, value3, value4); + }; + }; + }; + }; + }; + + return Text; +}(); + +var Many = function () { + function Many(value0) { + this.value0 = value0; + } + + ; + + Many.create = function (value0) { + return new Many(value0); + }; + + return Many; +}(); + +var Scale = function () { + function Scale(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Scale.create = function (value0) { + return function (value1) { + return new Scale(value0, value1); + }; + }; + + return Scale; +}(); + +var Translate = function () { + function Translate(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Translate.create = function (value0) { + return function (value1) { + return new Translate(value0, value1); + }; + }; + + return Translate; +}(); + +var Rotate = function () { + function Rotate(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Rotate.create = function (value0) { + return function (value1) { + return new Rotate(value0, value1); + }; + }; + + return Rotate; +}(); + +var Clipped = function () { + function Clipped(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + Clipped.create = function (value0) { + return function (value1) { + return new Clipped(value0, value1); + }; + }; + + return Clipped; +}(); + +var WithShadow = function () { + function WithShadow(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + WithShadow.create = function (value0) { + return function (value1) { + return new WithShadow(value0, value1); + }; + }; + + return WithShadow; +}(); + +var translate = function translate(tx) { + return function (ty) { + return Translate.create({ + translateX: tx, + translateY: ty + }); + }; +}; + +var text = Text.create; + +var shadowOffset = function shadowOffset(x) { + return function (y) { + return { + color: Data_Maybe.Nothing.value, + blur: Data_Maybe.Nothing.value, + offset: new Data_Maybe.Just({ + x: x, + y: y + }) + }; + }; +}; + +var shadowColor = function shadowColor(c) { + return { + color: new Data_Maybe.Just(c), + blur: Data_Maybe.Nothing.value, + offset: Data_Maybe.Nothing.value + }; +}; + +var shadowBlur = function shadowBlur(b) { + return { + color: Data_Maybe.Nothing.value, + blur: new Data_Maybe.Just(b), + offset: Data_Maybe.Nothing.value + }; +}; + +var shadow = WithShadow.create; +var semigroupShape = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + if (v instanceof Composite) { + return new Composite(Data_Semigroup.append(Data_List_Types.semigroupList)(v.value0)(Data_List.singleton(v1))); + } + + ; + + if (v1 instanceof Composite) { + return new Composite(new Data_List_Types.Cons(v, v1.value0)); + } + + ; + return new Composite(new Data_List_Types.Cons(v, new Data_List_Types.Cons(v1, Data_List_Types.Nil.value))); + }; +}); +var semigroupShadow = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return { + color: Control_Alt.alt(Data_Maybe.altMaybe)(v.color)(v1.color), + blur: Control_Alt.alt(Data_Maybe.altMaybe)(v.blur)(v1.blur), + offset: Control_Alt.alt(Data_Maybe.altMaybe)(v.offset)(v1.offset) + }; + }; +}); +var semigroupOutlineStyle = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return { + color: Control_Alt.alt(Data_Maybe.altMaybe)(v.color)(v1.color), + lineWidth: Control_Alt.alt(Data_Maybe.altMaybe)(v.lineWidth)(v1.lineWidth) + }; + }; +}); +var semigroupFillStyle = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return { + color: Control_Alt.alt(Data_Maybe.altMaybe)(v.color)(v1.color) + }; + }; +}); +var semigroupDrawing = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + if (v instanceof Many) { + return new Many(Data_Semigroup.append(Data_List_Types.semigroupList)(v.value0)(Data_List.singleton(v1))); + } + + ; + + if (v1 instanceof Many) { + return new Many(new Data_List_Types.Cons(v, v1.value0)); + } + + ; + return new Many(new Data_List_Types.Cons(v, new Data_List_Types.Cons(v1, Data_List_Types.Nil.value))); + }; +}); + +var scale = function scale(sx) { + return function (sy) { + return Scale.create({ + scaleX: sx, + scaleY: sy + }); + }; +}; + +var rotate = Rotate.create; + +var render = function render(ctx) { + var renderShape = function renderShape(v) { + if (v instanceof Path && v.value1 instanceof Data_List_Types.Nil) { + return Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit); + } + + ; + + if (v instanceof Path && v.value1 instanceof Data_List_Types.Cons) { + return function __do() { + var v1 = Graphics_Canvas.moveTo(ctx)(v.value1.value0.x)(v.value1.value0.y)(); + Data_Foldable.for_(Effect.applicativeEffect)(Data_List_Types.foldableList)(v.value1.value1)(function (pt) { + return Graphics_Canvas.lineTo(ctx)(pt.x)(pt.y); + })(); + return Control_Applicative.when(Effect.applicativeEffect)(v.value0)(Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.closePath(ctx)))(); + }; + } + + ; + + if (v instanceof Rectangle) { + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.rect(ctx)(v.value0)); + } + + ; + + if (v instanceof Arc) { + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.arc(ctx)(v.value0)); + } + + ; + + if (v instanceof Composite) { + return Data_Foldable.for_(Effect.applicativeEffect)(Data_List_Types.foldableList)(v.value0)(renderShape); + } + + ; + throw new Error("Failed pattern match at Graphics.Drawing (line 268, column 3 - line 268, column 38): " + [v.constructor.name]); + }; + + var applyShadow = function applyShadow(v) { + return function __do() { + Data_Foldable.for_(Effect.applicativeEffect)(Data_Foldable.foldableMaybe)(v.color)(function (color) { + return Graphics_Canvas.setShadowColor(ctx)(Color.cssStringHSLA(color)); + })(); + Data_Foldable.for_(Effect.applicativeEffect)(Data_Foldable.foldableMaybe)(v.blur)(function (blur) { + return Graphics_Canvas.setShadowBlur(ctx)(blur); + })(); + return Data_Foldable.for_(Effect.applicativeEffect)(Data_Foldable.foldableMaybe)(v.offset)(function (offset) { + return function __do() { + var v1 = Graphics_Canvas.setShadowOffsetX(ctx)(offset.x)(); + return Graphics_Canvas.setShadowOffsetY(ctx)(offset.y)(); + }; + })(); + }; + }; + + var applyOutlineStyle = function applyOutlineStyle(v) { + return function __do() { + Data_Foldable.for_(Effect.applicativeEffect)(Data_Foldable.foldableMaybe)(v.color)(function (color) { + return Graphics_Canvas.setStrokeStyle(ctx)(Color.cssStringHSLA(color)); + })(); + return Data_Foldable.for_(Effect.applicativeEffect)(Data_Foldable.foldableMaybe)(v.lineWidth)(function (width) { + return Graphics_Canvas.setLineWidth(ctx)(width); + })(); + }; + }; + + var applyFillStyle = function applyFillStyle(v) { + return Data_Foldable.for_(Effect.applicativeEffect)(Data_Foldable.foldableMaybe)(v.color)(function (color) { + return Graphics_Canvas.setFillStyle(ctx)(Color.cssStringHSLA(color)); + }); + }; + + var go = function go(v) { + if (v instanceof Fill) { + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.withContext(ctx)(function __do() { + applyFillStyle(v.value1)(); + return Graphics_Canvas.fillPath(ctx)(renderShape(v.value0))(); + })); + } + + ; + + if (v instanceof Outline) { + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.withContext(ctx)(function __do() { + applyOutlineStyle(v.value1)(); + return Graphics_Canvas.strokePath(ctx)(renderShape(v.value0))(); + })); + } + + ; + + if (v instanceof Many) { + return Data_Foldable.for_(Effect.applicativeEffect)(Data_List_Types.foldableList)(v.value0)(go); + } + + ; + + if (v instanceof Scale) { + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.withContext(ctx)(function __do() { + var v1 = Graphics_Canvas.scale(ctx)(v.value0)(); + return go(v.value1)(); + })); + } + + ; + + if (v instanceof Translate) { + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.withContext(ctx)(function __do() { + var v1 = Graphics_Canvas.translate(ctx)(v.value0)(); + return go(v.value1)(); + })); + } + + ; + + if (v instanceof Rotate) { + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.withContext(ctx)(function __do() { + var v1 = Graphics_Canvas.rotate(ctx)(v.value0)(); + return go(v.value1)(); + })); + } + + ; + + if (v instanceof Clipped) { + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.withContext(ctx)(function __do() { + renderShape(v.value0)(); + var v1 = Graphics_Canvas.clip(ctx)(); + return go(v.value1)(); + })); + } + + ; + + if (v instanceof WithShadow) { + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.withContext(ctx)(function __do() { + applyShadow(v.value0)(); + return go(v.value1)(); + })); + } + + ; + + if (v instanceof Text) { + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.withContext(ctx)(function __do() { + var v1 = Graphics_Canvas.setFont(ctx)(Graphics_Drawing_Font.fontString(v.value0))(); + applyFillStyle(v.value3)(); + return Graphics_Canvas.fillText(ctx)(v.value4)(v.value1)(v.value2)(); + })); + } + + ; + throw new Error("Failed pattern match at Graphics.Drawing (line 221, column 3 - line 224, column 21): " + [v.constructor.name]); + }; + + return go; +}; + +var rectangle = function rectangle(x) { + return function (y) { + return function (width) { + return function (height) { + return new Rectangle({ + x: x, + y: y, + width: width, + height: height + }); + }; + }; + }; +}; + +var path = function path(dictFoldable) { + var $211 = Path.create(false); + var $212 = Data_List.fromFoldable(dictFoldable); + return function ($213) { + return $211($212($213)); + }; +}; + +var outlined = Data_Function.flip(Outline.create); + +var outlineColor = function outlineColor(c) { + return { + color: new Data_Maybe.Just(c), + lineWidth: Data_Maybe.Nothing.value + }; +}; + +var monoidShape = new Data_Monoid.Monoid(function () { + return semigroupShape; +}, new Composite(Data_Monoid.mempty(Data_List_Types.monoidList))); +var monoidShadow = new Data_Monoid.Monoid(function () { + return semigroupShadow; +}, { + color: Data_Maybe.Nothing.value, + blur: Data_Maybe.Nothing.value, + offset: Data_Maybe.Nothing.value +}); +var monoidOutlineStyle = new Data_Monoid.Monoid(function () { + return semigroupOutlineStyle; +}, { + color: Data_Maybe.Nothing.value, + lineWidth: Data_Maybe.Nothing.value +}); +var monoidFillStyle = new Data_Monoid.Monoid(function () { + return semigroupFillStyle; +}, { + color: Data_Maybe.Nothing.value +}); +var monoidDrawing = new Data_Monoid.Monoid(function () { + return semigroupDrawing; +}, new Many(Data_Monoid.mempty(Data_List_Types.monoidList))); + +var lineWidth = function lineWidth(c) { + return { + color: Data_Maybe.Nothing.value, + lineWidth: new Data_Maybe.Just(c) + }; +}; + +var filled = Data_Function.flip(Fill.create); + +var fillColor = function fillColor(c) { + return { + color: new Data_Maybe.Just(c) + }; +}; + +var everywhere = function everywhere(f) { + var go = function go(v) { + if (v instanceof Many) { + return f(new Many(Data_Functor.map(Data_List_Types.functorList)(go)(v.value0))); + } + + ; + + if (v instanceof Scale) { + return f(new Scale(v.value0, go(v.value1))); + } + + ; + + if (v instanceof Translate) { + return f(new Translate(v.value0, go(v.value1))); + } + + ; + + if (v instanceof Rotate) { + return f(new Rotate(v.value0, go(v.value1))); + } + + ; + + if (v instanceof Clipped) { + return f(new Clipped(v.value0, go(v.value1))); + } + + ; + + if (v instanceof WithShadow) { + return f(new WithShadow(v.value0, go(v.value1))); + } + + ; + return f(v); + }; + + return go; +}; + +var eqShape = new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof Path && y instanceof Path) { + return x.value0 === y.value0 && Data_Eq.eq(Data_List_Types.eqList(Data_Eq.eqRec()(Data_Eq.eqRowCons(Data_Eq.eqRowCons(Data_Eq.eqRowNil)()(new Data_Symbol.IsSymbol(function () { + return "y"; + }))(Data_Eq.eqNumber))()(new Data_Symbol.IsSymbol(function () { + return "x"; + }))(Data_Eq.eqNumber))))(x.value1)(y.value1); + } + + ; + + if (x instanceof Rectangle && y instanceof Rectangle) { + return x.value0.height === y.value0.height && x.value0.width === y.value0.width && x.value0.x === y.value0.x && x.value0.y === y.value0.y; + } + + ; + + if (x instanceof Arc && y instanceof Arc) { + return x.value0.end === y.value0.end && x.value0.radius === y.value0.radius && x.value0.start === y.value0.start && x.value0.x === y.value0.x && x.value0.y === y.value0.y; + } + + ; + + if (x instanceof Composite && y instanceof Composite) { + return Data_Eq.eq(Data_List_Types.eqList(eqShape))(x.value0)(y.value0); + } + + ; + return false; + }; +}); +var eqShadow = new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(Data_Maybe.eqMaybe(Data_Eq.eqNumber))(x.blur)(y.blur) && Data_Eq.eq(Data_Maybe.eqMaybe(Color.eqColor))(x.color)(y.color) && Data_Eq.eq(Data_Maybe.eqMaybe(Data_Eq.eqRec()(Data_Eq.eqRowCons(Data_Eq.eqRowCons(Data_Eq.eqRowNil)()(new Data_Symbol.IsSymbol(function () { + return "y"; + }))(Data_Eq.eqNumber))()(new Data_Symbol.IsSymbol(function () { + return "x"; + }))(Data_Eq.eqNumber))))(x.offset)(y.offset); + }; +}); +var eqOutlineStyle = new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(Data_Maybe.eqMaybe(Color.eqColor))(x.color)(y.color) && Data_Eq.eq(Data_Maybe.eqMaybe(Data_Eq.eqNumber))(x.lineWidth)(y.lineWidth); + }; +}); +var eqFillStyle = new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(Data_Maybe.eqMaybe(Color.eqColor))(x.color)(y.color); + }; +}); +var eqDrawing = new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof Fill && y instanceof Fill) { + return Data_Eq.eq(eqShape)(x.value0)(y.value0) && Data_Eq.eq(eqFillStyle)(x.value1)(y.value1); + } + + ; + + if (x instanceof Outline && y instanceof Outline) { + return Data_Eq.eq(eqShape)(x.value0)(y.value0) && Data_Eq.eq(eqOutlineStyle)(x.value1)(y.value1); + } + + ; + + if (x instanceof Text && y instanceof Text) { + return Data_Eq.eq(Graphics_Drawing_Font.eqFont)(x.value0)(y.value0) && x.value1 === y.value1 && x.value2 === y.value2 && Data_Eq.eq(eqFillStyle)(x.value3)(y.value3) && x.value4 === y.value4; + } + + ; + + if (x instanceof Many && y instanceof Many) { + return Data_Eq.eq(Data_List_Types.eqList(eqDrawing))(x.value0)(y.value0); + } + + ; + + if (x instanceof Scale && y instanceof Scale) { + return x.value0.scaleX === y.value0.scaleX && x.value0.scaleY === y.value0.scaleY && Data_Eq.eq(eqDrawing)(x.value1)(y.value1); + } + + ; + + if (x instanceof Translate && y instanceof Translate) { + return x.value0.translateX === y.value0.translateX && x.value0.translateY === y.value0.translateY && Data_Eq.eq(eqDrawing)(x.value1)(y.value1); + } + + ; + + if (x instanceof Rotate && y instanceof Rotate) { + return x.value0 === y.value0 && Data_Eq.eq(eqDrawing)(x.value1)(y.value1); + } + + ; + + if (x instanceof Clipped && y instanceof Clipped) { + return Data_Eq.eq(eqShape)(x.value0)(y.value0) && Data_Eq.eq(eqDrawing)(x.value1)(y.value1); + } + + ; + + if (x instanceof WithShadow && y instanceof WithShadow) { + return Data_Eq.eq(eqShadow)(x.value0)(y.value0) && Data_Eq.eq(eqDrawing)(x.value1)(y.value1); + } + + ; + return false; + }; +}); + +var closed = function closed(dictFoldable) { + var $214 = Path.create(true); + var $215 = Data_List.fromFoldable(dictFoldable); + return function ($216) { + return $214($215($216)); + }; +}; + +var clipped = Clipped.create; + +var arc = function arc(x) { + return function (y) { + return function (start) { + return function (end) { + return function (radius) { + return new Arc({ + x: x, + y: y, + start: start, + end: end, + radius: radius + }); + }; + }; + }; + }; +}; + +var circle = function circle(x) { + return function (y) { + return arc(x)(y)(0.0)($$Math.pi * 2.0); + }; +}; + +module.exports = { + path: path, + closed: closed, + rectangle: rectangle, + circle: circle, + arc: arc, + fillColor: fillColor, + outlineColor: outlineColor, + lineWidth: lineWidth, + shadowOffset: shadowOffset, + shadowBlur: shadowBlur, + shadowColor: shadowColor, + shadow: shadow, + filled: filled, + outlined: outlined, + clipped: clipped, + scale: scale, + translate: translate, + rotate: rotate, + text: text, + everywhere: everywhere, + render: render, + eqShape: eqShape, + semigroupShape: semigroupShape, + monoidShape: monoidShape, + semigroupFillStyle: semigroupFillStyle, + monoidFillStyle: monoidFillStyle, + eqFillStyle: eqFillStyle, + semigroupOutlineStyle: semigroupOutlineStyle, + monoidOutlineStyle: monoidOutlineStyle, + eqOutlineStyle: eqOutlineStyle, + eqShadow: eqShadow, + semigroupShadow: semigroupShadow, + monoidShadow: monoidShadow, + semigroupDrawing: semigroupDrawing, + monoidDrawing: monoidDrawing, + eqDrawing: eqDrawing +}; +},{"../Color/index.js":"f3ma","../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Effect/index.js":"oTWB","../Graphics.Canvas/index.js":"rm6N","../Graphics.Drawing.Font/index.js":"fMOI","../Math/index.js":"Rpaz"}],"QJpD":[function(require,module,exports) { +"use strict"; + +var getProp = function getProp(name) { + return function (doctype) { + return doctype[name]; + }; +}; + +exports._namespaceURI = getProp("namespaceURI"); +exports._prefix = getProp("prefix"); +exports.localName = getProp("localName"); +exports.tagName = getProp("tagName"); + +exports.id = function (node) { + return function () { + return node.id; + }; +}; + +exports.setId = function (id) { + return function (node) { + return function () { + node.id = id; + return {}; + }; + }; +}; + +exports.className = function (node) { + return function () { + return node.className; + }; +}; + +exports.setClassName = function (className) { + return function (node) { + return function () { + node.className = className; + return {}; + }; + }; +}; + +exports.getElementsByTagName = function (localName) { + return function (doc) { + return function () { + return doc.getElementsByTagName(localName); + }; + }; +}; + +exports._getElementsByTagNameNS = function (ns) { + return function (localName) { + return function (doc) { + return function () { + return doc.getElementsByTagNameNS(ns, localName); + }; + }; + }; +}; + +exports.getElementsByClassName = function (classNames) { + return function (doc) { + return function () { + return doc.getElementsByClassName(classNames); + }; + }; +}; + +exports.setAttribute = function (name) { + return function (value) { + return function (element) { + return function () { + element.setAttribute(name, value); + return {}; + }; + }; + }; +}; + +exports._getAttribute = function (name) { + return function (element) { + return function () { + return element.getAttribute(name); + }; + }; +}; + +exports.hasAttribute = function (name) { + return function (element) { + return element.hasAttribute(name); + }; +}; + +exports.removeAttribute = function (name) { + return function (element) { + return function () { + element.removeAttribute(name); + return {}; + }; + }; +}; // - CSSOM --------------------------------------------------------------------- + + +exports.scrollTop = function (node) { + return function () { + return node.scrollTop; + }; +}; + +exports.setScrollTop = function (scrollTop) { + return function (node) { + return function () { + node.scrollTop = scrollTop; + return {}; + }; + }; +}; + +exports.scrollLeft = function (node) { + return function () { + return node.scrollLeft; + }; +}; + +exports.setScrollLeft = function (scrollLeft) { + return function (node) { + return function () { + node.scrollLeft = scrollLeft; + return {}; + }; + }; +}; + +exports.scrollWidth = function (el) { + return function () { + return el.scrollWidth; + }; +}; + +exports.scrollHeight = function (el) { + return function () { + return el.scrollHeight; + }; +}; + +exports.clientTop = function (el) { + return function () { + return el.clientTop; + }; +}; + +exports.clientLeft = function (el) { + return function () { + return el.clientLeft; + }; +}; + +exports.clientWidth = function (el) { + return function () { + return el.clientWidth; + }; +}; + +exports.clientHeight = function (el) { + return function () { + return el.clientHeight; + }; +}; +},{}],"4K7Y":[function(require,module,exports) { +"use strict"; + +exports._unsafeReadProtoTagged = function (nothing, just, name, value) { + if (typeof window !== "undefined") { + var ty = window[name]; + + if (ty != null && value instanceof ty) { + return just(value); + } + + return nothing; + } + + var obj = value; + + while (obj != null) { + var proto = Object.getPrototypeOf(obj); + var constructorName = proto.constructor.name; + + if (constructorName === name) { + return just(value); + } else if (constructorName === "Object") { + return nothing; + } + + obj = proto; + } + + return nothing; +}; +},{}],"fdUh":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var unsafeReadProtoTagged = function unsafeReadProtoTagged(name) { + return function (value) { + return $foreign["_unsafeReadProtoTagged"](Data_Maybe.Nothing.value, Data_Maybe.Just.create, name, value); + }; +}; + +module.exports = { + unsafeReadProtoTagged: unsafeReadProtoTagged +}; +},{"./foreign.js":"4K7Y","../Data.Maybe/index.js":"5mN7"}],"S4h2":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Nullable = require("../Data.Nullable/index.js"); + +var Effect = require("../Effect/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var Web_Internal_FFI = require("../Web.Internal.FFI/index.js"); + +var toParentNode = Unsafe_Coerce.unsafeCoerce; +var toNonDocumentTypeChildNode = Unsafe_Coerce.unsafeCoerce; +var toNode = Unsafe_Coerce.unsafeCoerce; +var toEventTarget = Unsafe_Coerce.unsafeCoerce; +var toChildNode = Unsafe_Coerce.unsafeCoerce; + +var prefix = function prefix($0) { + return Data_Nullable.toMaybe($foreign["_prefix"]($0)); +}; + +var namespaceURI = function namespaceURI($1) { + return Data_Nullable.toMaybe($foreign["_namespaceURI"]($1)); +}; + +var getElementsByTagNameNS = function getElementsByTagNameNS($2) { + return $foreign["_getElementsByTagNameNS"](Data_Nullable.toNullable($2)); +}; + +var getAttribute = function getAttribute(attr) { + var $3 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + var $4 = $foreign["_getAttribute"](attr); + return function ($5) { + return $3($4($5)); + }; +}; + +var fromParentNode = Web_Internal_FFI.unsafeReadProtoTagged("Element"); +var fromNonDocumentTypeChildNode = Web_Internal_FFI.unsafeReadProtoTagged("Element"); +var fromNode = Web_Internal_FFI.unsafeReadProtoTagged("Element"); +var fromEventTarget = Web_Internal_FFI.unsafeReadProtoTagged("Element"); +var fromChildNode = Web_Internal_FFI.unsafeReadProtoTagged("Element"); +module.exports = { + fromNode: fromNode, + fromChildNode: fromChildNode, + fromNonDocumentTypeChildNode: fromNonDocumentTypeChildNode, + fromParentNode: fromParentNode, + fromEventTarget: fromEventTarget, + toNode: toNode, + toChildNode: toChildNode, + toNonDocumentTypeChildNode: toNonDocumentTypeChildNode, + toParentNode: toParentNode, + toEventTarget: toEventTarget, + namespaceURI: namespaceURI, + prefix: prefix, + getElementsByTagNameNS: getElementsByTagNameNS, + getAttribute: getAttribute, + localName: $foreign.localName, + tagName: $foreign.tagName, + id: $foreign.id, + setId: $foreign.setId, + className: $foreign.className, + setClassName: $foreign.setClassName, + getElementsByTagName: $foreign.getElementsByTagName, + getElementsByClassName: $foreign.getElementsByClassName, + setAttribute: $foreign.setAttribute, + hasAttribute: $foreign.hasAttribute, + removeAttribute: $foreign.removeAttribute, + scrollTop: $foreign.scrollTop, + setScrollTop: $foreign.setScrollTop, + scrollLeft: $foreign.scrollLeft, + setScrollLeft: $foreign.setScrollLeft, + scrollWidth: $foreign.scrollWidth, + scrollHeight: $foreign.scrollHeight, + clientTop: $foreign.clientTop, + clientLeft: $foreign.clientLeft, + clientWidth: $foreign.clientWidth, + clientHeight: $foreign.clientHeight +}; +},{"./foreign.js":"QJpD","../Data.Functor/index.js":"+0AE","../Data.Nullable/index.js":"YQ8o","../Effect/index.js":"oTWB","../Unsafe.Coerce/index.js":"ETUV","../Web.Internal.FFI/index.js":"fdUh"}],"FwXA":[function(require,module,exports) { +"use strict"; + +var getEffProp = function getEffProp(name) { + return function (node) { + return function () { + return node[name]; + }; + }; +}; + +exports.nodeTypeIndex = function (node) { + return node.nodeType; +}; + +exports.nodeName = function (node) { + return node.nodeName; +}; + +exports.baseURI = getEffProp("baseURI"); +exports._ownerDocument = getEffProp("ownerDocument"); +exports._parentNode = getEffProp("parentNode"); +exports._parentElement = getEffProp("parentElement"); + +exports.hasChildNodes = function (node) { + return function () { + return node.hasChildNodes(); + }; +}; + +exports.childNodes = getEffProp("childNodes"); +exports._firstChild = getEffProp("firstChild"); +exports._lastChild = getEffProp("lastChild"); +exports._previousSibling = getEffProp("previousSibling"); +exports._nextSibling = getEffProp("nextSibling"); +exports._nodeValue = getEffProp("nodeValue"); + +exports.setNodeValue = function (value) { + return function (node) { + return function () { + node.nodeValue = value; + return {}; + }; + }; +}; + +exports.textContent = getEffProp("textContent"); + +exports.setTextContent = function (value) { + return function (node) { + return function () { + node.textContent = value; + return {}; + }; + }; +}; + +exports.normalize = function (node) { + return function () { + node.normalize(); + return {}; + }; +}; + +exports.clone = function (node) { + return function () { + return node.cloneNode(false); + }; +}; + +exports.deepClone = function (node) { + return function () { + return node.cloneNode(true); + }; +}; + +exports.isEqualNode = function (node1) { + return function (node2) { + return function () { + return node1.isEqualNode(node2); + }; + }; +}; + +exports.compareDocumentPositionBits = function (node1) { + return function (node2) { + return function () { + return node1.compareDocumentPosition(node2); + }; + }; +}; + +exports.contains = function (node1) { + return function (node2) { + return function () { + return node1.contains(node2); + }; + }; +}; + +exports._lookupPrefix = function (prefix) { + return function (node) { + return function () { + return node.lookupPrefix(prefix); + }; + }; +}; + +exports._lookupNamespaceURI = function (ns) { + return function (node) { + return function () { + return node.lookupNamespaceURI(ns); + }; + }; +}; + +exports.isDefaultNamespace = function (ns) { + return function (node) { + return function () { + return node.isDefaultNamespace(ns); + }; + }; +}; + +exports.insertBefore = function (node1) { + return function (node2) { + return function (parent) { + return function () { + return parent.insertBefore(node1, node2); + }; + }; + }; +}; + +exports.appendChild = function (node) { + return function (parent) { + return function () { + return parent.appendChild(node); + }; + }; +}; + +exports.replaceChild = function (newChild) { + return function (oldChild) { + return function (parent) { + return function () { + return parent.replaceChild(newChild, oldChild); + }; + }; + }; +}; + +exports.removeChild = function (node) { + return function (parent) { + return function () { + return parent.removeChild(node); + }; + }; +}; +},{}],"vDH/":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_Enum = require("../Data.Enum/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var ElementNode = function () { + function ElementNode() {} + + ; + ElementNode.value = new ElementNode(); + return ElementNode; +}(); + +var AttributeNode = function () { + function AttributeNode() {} + + ; + AttributeNode.value = new AttributeNode(); + return AttributeNode; +}(); + +var TextNode = function () { + function TextNode() {} + + ; + TextNode.value = new TextNode(); + return TextNode; +}(); + +var CDATASectionNode = function () { + function CDATASectionNode() {} + + ; + CDATASectionNode.value = new CDATASectionNode(); + return CDATASectionNode; +}(); + +var EntityReferenceNode = function () { + function EntityReferenceNode() {} + + ; + EntityReferenceNode.value = new EntityReferenceNode(); + return EntityReferenceNode; +}(); + +var EntityNode = function () { + function EntityNode() {} + + ; + EntityNode.value = new EntityNode(); + return EntityNode; +}(); + +var ProcessingInstructionNode = function () { + function ProcessingInstructionNode() {} + + ; + ProcessingInstructionNode.value = new ProcessingInstructionNode(); + return ProcessingInstructionNode; +}(); + +var CommentNode = function () { + function CommentNode() {} + + ; + CommentNode.value = new CommentNode(); + return CommentNode; +}(); + +var DocumentNode = function () { + function DocumentNode() {} + + ; + DocumentNode.value = new DocumentNode(); + return DocumentNode; +}(); + +var DocumentTypeNode = function () { + function DocumentTypeNode() {} + + ; + DocumentTypeNode.value = new DocumentTypeNode(); + return DocumentTypeNode; +}(); + +var DocumentFragmentNode = function () { + function DocumentFragmentNode() {} + + ; + DocumentFragmentNode.value = new DocumentFragmentNode(); + return DocumentFragmentNode; +}(); + +var NotationNode = function () { + function NotationNode() {} + + ; + NotationNode.value = new NotationNode(); + return NotationNode; +}(); + +var toEnumNodeType = function toEnumNodeType(v) { + if (v === 1) { + return new Data_Maybe.Just(ElementNode.value); + } + + ; + + if (v === 2) { + return new Data_Maybe.Just(AttributeNode.value); + } + + ; + + if (v === 3) { + return new Data_Maybe.Just(TextNode.value); + } + + ; + + if (v === 4) { + return new Data_Maybe.Just(CDATASectionNode.value); + } + + ; + + if (v === 5) { + return new Data_Maybe.Just(EntityReferenceNode.value); + } + + ; + + if (v === 6) { + return new Data_Maybe.Just(EntityNode.value); + } + + ; + + if (v === 7) { + return new Data_Maybe.Just(ProcessingInstructionNode.value); + } + + ; + + if (v === 8) { + return new Data_Maybe.Just(CommentNode.value); + } + + ; + + if (v === 9) { + return new Data_Maybe.Just(DocumentNode.value); + } + + ; + + if (v === 10) { + return new Data_Maybe.Just(DocumentTypeNode.value); + } + + ; + + if (v === 11) { + return new Data_Maybe.Just(DocumentFragmentNode.value); + } + + ; + + if (v === 12) { + return new Data_Maybe.Just(NotationNode.value); + } + + ; + return Data_Maybe.Nothing.value; +}; + +var fromEnumNodeType = function fromEnumNodeType(v) { + if (v instanceof ElementNode) { + return 1; + } + + ; + + if (v instanceof AttributeNode) { + return 2; + } + + ; + + if (v instanceof TextNode) { + return 3; + } + + ; + + if (v instanceof CDATASectionNode) { + return 4; + } + + ; + + if (v instanceof EntityReferenceNode) { + return 5; + } + + ; + + if (v instanceof EntityNode) { + return 6; + } + + ; + + if (v instanceof ProcessingInstructionNode) { + return 7; + } + + ; + + if (v instanceof CommentNode) { + return 8; + } + + ; + + if (v instanceof DocumentNode) { + return 9; + } + + ; + + if (v instanceof DocumentTypeNode) { + return 10; + } + + ; + + if (v instanceof DocumentFragmentNode) { + return 11; + } + + ; + + if (v instanceof NotationNode) { + return 12; + } + + ; + throw new Error("Failed pattern match at Web.DOM.NodeType (line 54, column 1 - line 54, column 36): " + [v.constructor.name]); +}; + +var eqNodeType = new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof ElementNode && y instanceof ElementNode) { + return true; + } + + ; + + if (x instanceof AttributeNode && y instanceof AttributeNode) { + return true; + } + + ; + + if (x instanceof TextNode && y instanceof TextNode) { + return true; + } + + ; + + if (x instanceof CDATASectionNode && y instanceof CDATASectionNode) { + return true; + } + + ; + + if (x instanceof EntityReferenceNode && y instanceof EntityReferenceNode) { + return true; + } + + ; + + if (x instanceof EntityNode && y instanceof EntityNode) { + return true; + } + + ; + + if (x instanceof ProcessingInstructionNode && y instanceof ProcessingInstructionNode) { + return true; + } + + ; + + if (x instanceof CommentNode && y instanceof CommentNode) { + return true; + } + + ; + + if (x instanceof DocumentNode && y instanceof DocumentNode) { + return true; + } + + ; + + if (x instanceof DocumentTypeNode && y instanceof DocumentTypeNode) { + return true; + } + + ; + + if (x instanceof DocumentFragmentNode && y instanceof DocumentFragmentNode) { + return true; + } + + ; + + if (x instanceof NotationNode && y instanceof NotationNode) { + return true; + } + + ; + return false; + }; +}); +var ordNodeType = new Data_Ord.Ord(function () { + return eqNodeType; +}, function (x) { + return function (y) { + return Data_Ord.compare(Data_Ord.ordInt)(fromEnumNodeType(x))(fromEnumNodeType(y)); + }; +}); +var enumNodeType = new Data_Enum.Enum(function () { + return ordNodeType; +}, Data_Enum.defaultPred(toEnumNodeType)(fromEnumNodeType), Data_Enum.defaultSucc(toEnumNodeType)(fromEnumNodeType)); +var boundedNodeType = new Data_Bounded.Bounded(function () { + return ordNodeType; +}, ElementNode.value, NotationNode.value); +var boundedEnumNodeType = new Data_Enum.BoundedEnum(function () { + return boundedNodeType; +}, function () { + return enumNodeType; +}, 12, fromEnumNodeType, toEnumNodeType); +module.exports = { + ElementNode: ElementNode, + AttributeNode: AttributeNode, + TextNode: TextNode, + CDATASectionNode: CDATASectionNode, + EntityReferenceNode: EntityReferenceNode, + EntityNode: EntityNode, + ProcessingInstructionNode: ProcessingInstructionNode, + CommentNode: CommentNode, + DocumentNode: DocumentNode, + DocumentTypeNode: DocumentTypeNode, + DocumentFragmentNode: DocumentFragmentNode, + NotationNode: NotationNode, + eqNodeType: eqNodeType, + ordNodeType: ordNodeType, + boundedNodeType: boundedNodeType, + enumNodeType: enumNodeType, + boundedEnumNodeType: boundedEnumNodeType +}; +},{"../Data.Bounded/index.js":"kcUU","../Data.Enum/index.js":"oOsU","../Data.Eq/index.js":"Pq4F","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb"}],"P+X4":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Enum = require("../Data.Enum/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Nullable = require("../Data.Nullable/index.js"); + +var Effect = require("../Effect/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var Web_DOM_NodeType = require("../Web.DOM.NodeType/index.js"); + +var Web_Internal_FFI = require("../Web.Internal.FFI/index.js"); + +var toEventTarget = Unsafe_Coerce.unsafeCoerce; + +var previousSibling = function () { + var $1 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($2) { + return $1($foreign["_previousSibling"]($2)); + }; +}(); + +var parentNode = function () { + var $3 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($4) { + return $3($foreign["_parentNode"]($4)); + }; +}(); + +var parentElement = function () { + var $5 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($6) { + return $5($foreign["_parentElement"]($6)); + }; +}(); + +var ownerDocument = function () { + var $7 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($8) { + return $7($foreign["_ownerDocument"]($8)); + }; +}(); + +var nodeValue = function () { + var $9 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($10) { + return $9($foreign["_nodeValue"]($10)); + }; +}(); + +var nodeType = function nodeType(dictPartial) { + var $11 = Data_Maybe.fromJust(dictPartial); + var $12 = Data_Enum.toEnum(Web_DOM_NodeType.boundedEnumNodeType); + return function ($13) { + return $11($12($foreign.nodeTypeIndex($13))); + }; +}; + +var nextSibling = function () { + var $14 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($15) { + return $14($foreign["_nextSibling"]($15)); + }; +}(); + +var lookupPrefix = function lookupPrefix(p) { + var $16 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + var $17 = $foreign["_lookupPrefix"](p); + return function ($18) { + return $16($17($18)); + }; +}; + +var lookupNamespaceURI = function lookupNamespaceURI(ns) { + var $19 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + var $20 = $foreign["_lookupNamespaceURI"](ns); + return function ($21) { + return $19($20($21)); + }; +}; + +var lastChild = function () { + var $22 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($23) { + return $22($foreign["_lastChild"]($23)); + }; +}(); + +var fromEventTarget = Web_Internal_FFI.unsafeReadProtoTagged("Node"); + +var firstChild = function () { + var $24 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($25) { + return $24($foreign["_firstChild"]($25)); + }; +}(); + +module.exports = { + fromEventTarget: fromEventTarget, + toEventTarget: toEventTarget, + nodeType: nodeType, + ownerDocument: ownerDocument, + parentNode: parentNode, + parentElement: parentElement, + firstChild: firstChild, + lastChild: lastChild, + previousSibling: previousSibling, + nextSibling: nextSibling, + nodeValue: nodeValue, + lookupPrefix: lookupPrefix, + lookupNamespaceURI: lookupNamespaceURI, + nodeTypeIndex: $foreign.nodeTypeIndex, + nodeName: $foreign.nodeName, + baseURI: $foreign.baseURI, + hasChildNodes: $foreign.hasChildNodes, + childNodes: $foreign.childNodes, + setNodeValue: $foreign.setNodeValue, + textContent: $foreign.textContent, + setTextContent: $foreign.setTextContent, + normalize: $foreign.normalize, + clone: $foreign.clone, + deepClone: $foreign.deepClone, + isEqualNode: $foreign.isEqualNode, + compareDocumentPositionBits: $foreign.compareDocumentPositionBits, + contains: $foreign.contains, + isDefaultNamespace: $foreign.isDefaultNamespace, + insertBefore: $foreign.insertBefore, + appendChild: $foreign.appendChild, + replaceChild: $foreign.replaceChild, + removeChild: $foreign.removeChild +}; +},{"./foreign.js":"FwXA","../Data.Enum/index.js":"oOsU","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Nullable/index.js":"YQ8o","../Effect/index.js":"oTWB","../Unsafe.Coerce/index.js":"ETUV","../Web.DOM.NodeType/index.js":"vDH/","../Web.Internal.FFI/index.js":"fdUh"}],"VVkU":[function(require,module,exports) { + +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Filterable = require("../Data.Filterable/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Data_Lens_Fold = require("../Data.Lens.Fold/index.js"); + +var Data_Lens_Getter = require("../Data.Lens.Getter/index.js"); + +var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js"); + +var Data_Lens_Iso_Newtype = require("../Data.Lens.Iso.Newtype/index.js"); + +var Data_Lens_Prism = require("../Data.Lens.Prism/index.js"); + +var Data_Lens_Record = require("../Data.Lens.Record/index.js"); + +var Data_List = require("../Data.List/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Map = require("../Data.Map/index.js"); + +var Data_Map_Internal = require("../Data.Map.Internal/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Maybe_First = require("../Data.Maybe.First/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Nullable = require("../Data.Nullable/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Pair = require("../Data.Pair/index.js"); + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Set = require("../Data.Set/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Time_Duration = require("../Data.Time.Duration/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Data_Variant = require("../Data.Variant/index.js"); + +var Data_Variant_Internal = require("../Data.Variant.Internal/index.js"); + +var Effect = require("../Effect/index.js"); + +var Effect_Aff = require("../Effect.Aff/index.js"); + +var Effect_Aff_Class = require("../Effect.Aff.Class/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var Effect_Exception = require("../Effect.Exception/index.js"); + +var Effect_Ref = require("../Effect.Ref/index.js"); + +var Effect_Uncurried = require("../Effect.Uncurried/index.js"); + +var Genetics_Browser_Cacher = require("../Genetics.Browser.Cacher/index.js"); + +var Genetics_Browser_Layer = require("../Genetics.Browser.Layer/index.js"); + +var Graphics_Canvas = require("../Graphics.Canvas/index.js"); + +var Graphics_Drawing = require("../Graphics.Drawing/index.js"); + +var Graphics_Drawing_Font = require("../Graphics.Drawing.Font/index.js"); + +var Partial_Unsafe = require("../Partial.Unsafe/index.js"); + +var Record = require("../Record/index.js"); + +var Type_Equality = require("../Type.Equality/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var Web_DOM_Element = require("../Web.DOM.Element/index.js"); + +var Web_DOM_Node = require("../Web.DOM.Node/index.js"); + +var Scrolling = function () { + function Scrolling(value0) { + this.value0 = value0; + } + + ; + + Scrolling.create = function (value0) { + return new Scrolling(value0); + }; + + return Scrolling; +}(); + +var Zooming = function () { + function Zooming(value0) { + this.value0 = value0; + } + + ; + + Zooming.create = function (value0) { + return new Zooming(value0); + }; + + return Zooming; +}(); + +var Jump = function () { + function Jump() {} + + ; + Jump.value = new Jump(); + return Jump; +}(); + +var LLeft = function () { + function LLeft() {} + + ; + LLeft.value = new LLeft(); + return LLeft; +}(); + +var LCenter = function () { + function LCenter() {} + + ; + LCenter.value = new LCenter(); + return LCenter; +}(); + +var LRight = function () { + function LRight() {} + + ; + LRight.value = new LRight(); + return LRight; +}(); + +var BufferedCanvas = function BufferedCanvas(x) { + return x; +}; + +var Static = function () { + function Static(value0) { + this.value0 = value0; + } + + ; + + Static.create = function (value0) { + return new Static(value0); + }; + + return Static; +}(); + +var Buffer = function () { + function Buffer(value0) { + this.value0 = value0; + } + + ; + + Buffer.create = function (value0) { + return new Buffer(value0); + }; + + return Buffer; +}(); + +var TrackContainer = function TrackContainer(x) { + return x; +}; + +var BrowserContainer = function BrowserContainer(x) { + return x; +}; + +var zoomCanvas = function zoomCanvas(v) { + return function (v1) { + return function () { + return $foreign.zoomCanvasImpl(v.back, v.front, { + left: v1.value0, + right: v1.value1 + }); + }; + }; +}; + +var wheelZoom = function wheelZoom(dictNewtype) { + return function (bc) { + return function (cb) { + return $foreign.canvasWheelCBImpl(function (v) { + return v.element; + }(Data_Newtype.unwrap(dictNewtype)(bc)))(Data_Function["const"](cb)); + }; + }; +}; + +var unsafeCreateElement = function unsafeCreateElement(args) { + return function () { + return $foreign.unsafeCreateElementImpl(args.elementType, args.id); + }; +}; + +var translateBuffer = function translateBuffer(p) { + return function (v) { + return function __do() { + $foreign.setCanvasTranslation(p)(v.back)(); + return $foreign.setCanvasTranslation(p)(v.front)(); + }; + }; +}; + +var setElementStyle = Effect_Uncurried.runEffectFn3($foreign.setElementStyleImpl); + +var setElementStyles = function setElementStyles(el) { + return Data_Foldable.traverse_(Effect.applicativeEffect)(Data_Foldable.foldableArray)(Data_Tuple.uncurry(setElementStyle(el))); +}; + +var setCanvasStyles = function setCanvasStyles($271) { + return setElementStyles($271); +}; + +var setCanvasStyle = function setCanvasStyle($272) { + return setElementStyle($272); +}; + +var setCanvasZIndex = function setCanvasZIndex(ce) { + return function (i) { + return setCanvasStyle(ce)("z-index")(Data_Show.show(Data_Show.showInt)(i)); + }; +}; + +var setCanvasPosition = function setCanvasPosition(v) { + return function (ce) { + return setCanvasStyles(ce)([new Data_Tuple.Tuple("position", "absolute"), new Data_Tuple.Tuple("top", Data_Show.show(Data_Show.showNumber)(v.top) + "px"), new Data_Tuple.Tuple("left", Data_Show.show(Data_Show.showNumber)(v.left) + "px")]); + }; +}; + +var scrollCanvas = function scrollCanvas(v) { + return Effect_Uncurried.runEffectFn3($foreign.scrollCanvasImpl)(v.back)(v.front); +}; + +var newtypeTrackContainer = new Data_Newtype.Newtype(function (n) { + return n; +}, TrackContainer); +var newtypeBufferedCanvas = new Data_Newtype.Newtype(function (n) { + return n; +}, BufferedCanvas); +var newtypeBrowserContainer = new Data_Newtype.Newtype(function (n) { + return n; +}, BrowserContainer); +var labelFontSize = 14; +var labelFont = Graphics_Drawing_Font.fontString(Graphics_Drawing_Font.font(Graphics_Drawing_Font.sansSerif)(labelFontSize)(Data_Monoid.mempty(Graphics_Drawing_Font.monoidFontOptions))); + +var labelBox = function labelBox(v) { + return function (ctx) { + return function (v1) { + return function __do() { + var v2 = Graphics_Canvas.withContext(ctx)(function __do() { + var v2 = Graphics_Canvas.setFont(ctx)(labelFont)(); + return Graphics_Canvas.measureText(ctx)(v1.text)(); + })(); + var pad = 14.0 + v2.width / 2.0; + + var x = function () { + if (v1.gravity instanceof LCenter) { + return v1.point.x; + } + + ; + + if (v1.gravity instanceof LLeft) { + return v1.point.x - pad; + } + + ; + + if (v1.gravity instanceof LRight) { + return v1.point.x + pad; + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 694, column 11 - line 697, column 33): " + [v1.gravity.constructor.name]); + }(); + + var height = Data_Int.toNumber(labelFontSize); + return { + x: x, + y: v1.point.y - height, + width: v2.width, + height: height + }; + }; + }; + }; +}; + +var isOverlapping = function isOverlapping(r1) { + return function (r2) { + return r1.x < r2.x + r2.width && r1.x + r1.width > r2.x && r1.y < r2.y + r2.height && r1.height + r1.y > r2.y; + }; +}; + +var glyphBufferSize = { + width: 15.0, + height: 300.0 +}; + +var getTrack = function getTrack(n) { + return function (v) { + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Effect_Ref.read(v.tracks)))(function (v1) { + var v2 = Data_Map_Internal.lookup(Data_Ord.ordString)(n)(v1); + + if (v2 instanceof Data_Maybe.Just) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(v2.value0); + } + + ; + + if (v2 instanceof Data_Maybe.Nothing) { + return Control_Monad_Error_Class.throwError(Effect_Aff.monadThrowAff)(Effect_Exception.error("Could not find track '" + (n + "'!"))); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 448, column 3 - line 452, column 55): " + [v2.constructor.name]); + }); + }; +}; + +var getLayers = function getLayers(dictMonadEffect) { + return function (v) { + return Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(v.layers)); + }; +}; + +var getDimensions = function getDimensions(dictMonadEffect) { + return function (v) { + return Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(v.dimensions)); + }; +}; + +var getBufferedContext = Data_Functor.map(Data_Functor.functorFn)(Graphics_Canvas.getContext2D)(function () { + var $273 = Data_Newtype.unwrap(newtypeBufferedCanvas); + return function ($274) { + return function (v) { + return v.front; + }($273($274)); + }; +}()); + +var forTracks = function forTracks(dictMonadEffect) { + return function (v) { + return function (f) { + return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(v.tracks)))(function (v1) { + return Data_Traversable["for"](dictMonadEffect.Monad0().Applicative0())(Data_Map_Internal.traversableMap)(v1)(f); + }); + }; + }; +}; + +var forTracks_ = function forTracks_(dictMonadEffect) { + return function (bc) { + var $275 = Data_Functor["void"](dictMonadEffect.Monad0().Bind1().Apply0().Functor0()); + var $276 = forTracks(dictMonadEffect)(bc); + return function ($277) { + return $275($276($277)); + }; + }; +}; + +var eqLabelPlace = new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof LLeft && y instanceof LLeft) { + return true; + } + + ; + + if (x instanceof LCenter && y instanceof LCenter) { + return true; + } + + ; + + if (x instanceof LRight && y instanceof LRight) { + return true; + } + + ; + return false; + }; +}); + +var elementClick = function elementClick(e) { + return Effect_Uncurried.runEffectFn2($foreign.elementClickImpl)(e); +}; + +var createCanvas = function createCanvas(size) { + return function (name) { + return function __do() { + var v = Data_Functor.map(Effect.functorEffect)(Unsafe_Coerce.unsafeCoerce)(unsafeCreateElement({ + elementType: "canvas", + id: name + }))(); + $foreign.initializeCanvasImpl(v, size); + return v; + }; + }; +}; + +var trackContainer = function trackContainer(size) { + return function (padding) { + return function (name) { + return function __do() { + var v = unsafeCreateElement({ + elementType: "div", + id: name + })(); + $foreign.setContainerStyle(v)(size)(); + var v1 = createCanvas(glyphBufferSize)("glyphBuffer")(); + var v2 = Effect_Ref["new"]({ + size: size, + padding: padding + })(); + var v3 = Effect_Ref["new"](Data_Monoid.mempty(Data_Map_Internal.monoidMap(Data_Ord.ordString)))(); + return { + layers: v3, + dimensions: v2, + element: v, + glyphBuffer: v1 + }; + }; + }; + }; +}; + +var clearCanvas = function clearCanvas(ctx) { + return function (v) { + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.clearRect(ctx)({ + x: 0.0, + y: 0.0, + width: v.width, + height: v.height + })); + }; +}; + +var renderGlyphs = function renderGlyphs(glyphBuffer) { + return function (ctx) { + return function (v) { + return function (v1) { + return function __do() { + var v2 = Graphics_Canvas.getContext2D(glyphBuffer)(); + var x0 = glyphBufferSize.width / 2.0; + var y0 = glyphBufferSize.height / 2.0; + clearCanvas(v2)(glyphBufferSize)(); + Graphics_Drawing.render(v2)(Graphics_Drawing.translate(x0)(y0)(v1.drawing))(); + + var pred = function pred(v3) { + return v3.x >= v.value0 && v3.x <= v.value1; + }; + + return $foreign.drawCopies(glyphBuffer, glyphBufferSize, ctx, pred, v1.points); + }; + }; + }; + }; +}; + +var canvasDrag = function canvasDrag(el) { + return function (f) { + var toEither = function toEither(g) { + return function (v) { + var v1 = Data_Nullable.toMaybe(v.during); + + if (v1 instanceof Data_Maybe.Just) { + return g(new Data_Either.Right(v1.value0)); + } + + ; + + if (v1 instanceof Data_Maybe.Nothing) { + return g(Data_Either.Left.create(Data_Maybe.fromMaybe({ + x: 0, + y: 0 + })(Data_Nullable.toMaybe(v.total)))); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 311, column 36 - line 313, column 73): " + [v1.constructor.name]); + }; + }; + + return $foreign.canvasDragImpl(el)(toEither(f)); + }; +}; + +var dragScroll = function dragScroll(v) { + return function (cb) { + return function __do() { + var v1 = Effect_Ref.read(v.tracks)(); + return canvasDrag(v.element)(function (v2) { + if (v2 instanceof Data_Either.Left) { + return Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit); + } + + ; + + if (v2 instanceof Data_Either.Right) { + return cb(v2.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 326, column 40 - line 328, column 20): " + [v2.constructor.name]); + })(); + }; + }; +}; + +var dragScrollTrack = function dragScrollTrack(v) { + return function (cb) { + return canvasDrag(v.element)(function (v1) { + if (v1 instanceof Data_Either.Left) { + return Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit); + } + + ; + + if (v1 instanceof Data_Either.Right) { + return cb(v1.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 335, column 40 - line 337, column 20): " + [v1.constructor.name]); + }); + }; +}; + +var browserContainer = function browserContainer(dictMonadEffect) { + return function (element) { + return Effect_Class.liftEffect(dictMonadEffect)(function __do() { + var v = Effect_Ref["new"](Data_Monoid.mempty(Data_Map_Internal.monoidMap(Data_Ord.ordString)))(); + return { + tracks: v, + element: element + }; + }); + }; +}; + +var blankBuffer = function blankBuffer(v) { + return function __do() { + translateBuffer({ + x: 0, + y: 0 + })(v)(); + var v1 = Graphics_Canvas.getCanvasDimensions(v.back)(); + return Data_Foldable.for_(Effect.applicativeEffect)(Data_Foldable.foldableArray)([v.back, v.front])(Control_Bind.composeKleisliFlipped(Effect.bindEffect)(Data_Function.flip(clearCanvas)(v1))(Graphics_Canvas.getContext2D))(); + }; +}; + +var createBufferedCanvas = function createBufferedCanvas(dim) { + return function (name) { + return function __do() { + var v = createCanvas(dim)(name + "-buffer")(); + var v1 = createCanvas(dim)(name)(); + var bc = { + back: v, + front: v1 + }; + blankBuffer(bc)(); + return bc; + }; + }; +}; + +var setBufferedCanvasSize = function setBufferedCanvasSize(dim) { + return function (v) { + return function __do() { + var v1 = Graphics_Canvas.setCanvasDimensions(v.back)(dim)(); + var v2 = Graphics_Canvas.setCanvasDimensions(v.front)(dim)(); + blankBuffer(v)(); + return Data_Unit.unit; + }; + }; +}; + +var resizeLayer = function resizeLayer(dictMonadEffect) { + return function (dims) { + return function (lc) { + return Effect_Class.liftEffect(dictMonadEffect)(function () { + if (lc instanceof Static) { + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.setCanvasDimensions(lc.value0)(dims)); + } + + ; + + if (lc instanceof Buffer) { + return setBufferedCanvasSize(dims)(lc.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 594, column 3 - line 596, column 45): " + [lc.constructor.name]); + }()); + }; + }; +}; + +var setTrackContainerSize = function setTrackContainerSize(dictMonadEffect) { + return function (dim) { + return function (v) { + return Effect_Class.liftEffect(dictMonadEffect)(function __do() { + Effect_Ref.modify_(function (v1) { + return { + size: dim, + padding: v1.padding + }; + })(v.dimensions)(); + $foreign.setContainerStyle(v.element)(dim)(); + return Control_Bind.bindFlipped(Effect.bindEffect)(Data_Foldable.traverse_(Effect.applicativeEffect)(Data_Map_Internal.foldableMap)(resizeLayer(Effect_Class.monadEffectEffect)(dim)))(getLayers(Effect_Class.monadEffectEffect)(v))(); + }); + }; + }; +}; + +var appendCanvasElem = function appendCanvasElem(e) { + return function (c) { + return $foreign.appendElem(e)(c); + }; +}; + +var appendBoxed = function appendBoxed(sofar) { + return function (next) { + var overlapsAny = function () { + var overlaps = function overlaps(r$prime) { + return !Data_Eq.eq(Data_Eq.eqRec()(Data_Eq.eqRowCons(Data_Eq.eqRowCons(Data_Eq.eqRowCons(Data_Eq.eqRowCons(Data_Eq.eqRowNil)()(new Data_Symbol.IsSymbol(function () { + return "y"; + }))(Data_Eq.eqNumber))()(new Data_Symbol.IsSymbol(function () { + return "x"; + }))(Data_Eq.eqNumber))()(new Data_Symbol.IsSymbol(function () { + return "width"; + }))(Data_Eq.eqNumber))()(new Data_Symbol.IsSymbol(function () { + return "height"; + }))(Data_Eq.eqNumber)))(next.rect)(r$prime.rect) && isOverlapping(next.rect)(r$prime.rect); + }; + + return Data_Foldable.any(Data_List_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(overlaps)(sofar); + }(); + + if (overlapsAny) { + return sofar; + } + + ; + return new Data_List_Types.Cons(next, sofar); + }; +}; + +var renderLabels = function renderLabels(v) { + return function (ls$prime) { + return function (ctx) { + var arr = Data_Filterable.filter(Data_Filterable.filterableArray)(function (l) { + return l.point.x < v.value1 && l.point.x + 100.0 > v.value0; + })(Data_Array.fromFoldable(Data_List_Types.foldableList)(ls$prime)); + return function __do() { + var v1 = Data_Traversable["for"](Effect.applicativeEffect)(Data_Traversable.traversableArray)(arr)(function (lb) { + return Data_Functor.map(Effect.functorEffect)(function (v1) { + return { + text: lb.text, + rect: v1 + }; + })(labelBox(v)(ctx)(lb)); + })(); + var toRender = Data_Foldable.foldl(Data_Foldable.foldableArray)(appendBoxed)(Data_Monoid.mempty(Data_List_Types.monoidList))(v1); + return Graphics_Canvas.withContext(ctx)(function __do() { + var v2 = Graphics_Canvas.setFont(ctx)(labelFont)(); + return Data_Foldable.for_(Effect.applicativeEffect)(Data_List_Types.foldableList)(toRender)(function (box) { + return Graphics_Canvas.fillText(ctx)(box.text)(box.rect.x - box.rect.width / 2.0)(box.rect.y); + })(); + })(); + }; + }; + }; +}; + +var addTrack = function addTrack(dictMonadEffect) { + return function (v) { + return function (name) { + return function (v1) { + return Effect_Class.liftEffect(dictMonadEffect)(function __do() { + Effect_Ref.modify_(Data_Map_Internal.insert(Data_Ord.ordString)(name)(Data_Newtype.wrap(newtypeTrackContainer)(v1)))(v.tracks)(); + return $foreign.appendElem(v.element)(v1.element)(); + }); + }; + }; + }; +}; + +var _labels = Data_Symbol.SProxy.value; +var _drawingBatch = Data_Symbol.SProxy.value; +var _drawing = Data_Symbol.SProxy.value; +var _bigDrawing = Data_Symbol.SProxy.value; + +var _Static = function _Static(dictChoice) { + return Data_Lens_Prism["prism'"](Static.create)(function (v) { + if (v instanceof Static) { + return new Data_Maybe.Just(v.value0); + } + + ; + + if (v instanceof Buffer) { + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 769, column 27 - line 771, column 23): " + [v.constructor.name]); + })(dictChoice); +}; + +var _Layers = function _Layers(dictStrong) { + var $278 = Data_Lens_Iso_Newtype["_Newtype"](newtypeTrackContainer)(newtypeTrackContainer)(dictStrong.Profunctor0()); + var $279 = Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () { + return "layers"; + }))()()(Data_Symbol.SProxy.value)(dictStrong); + return function ($280) { + return $278($279($280)); + }; +}; + +var _FrontCanvas = Data_Lens_Getter.to(function (v) { + if (v instanceof Static) { + return v.value0; + } + + ; + + if (v instanceof Buffer) { + return Data_Newtype.unwrap(newtypeBufferedCanvas)(v.value0).front; + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 759, column 19 - line 761, column 31): " + [v.constructor.name]); +}); + +var newLayer = function newLayer(dictMonadAff) { + return function (dictRowToList) { + return function (dictCacherAff) { + return function (tc) { + return function (name) { + return function (v) { + return Control_Bind.bind(dictMonadAff.MonadEffect0().Monad0().Bind1())(Data_Functor.map(dictMonadAff.MonadEffect0().Monad0().Bind1().Apply0().Functor0())(function (v1) { + return v1.size; + })(getDimensions(dictMonadAff.MonadEffect0())(tc)))(function (v1) { + return Control_Bind.bind(dictMonadAff.MonadEffect0().Monad0().Bind1())(getDimensions(dictMonadAff.MonadEffect0())(tc))(function (v2) { + var pos = { + left: 0.0, + top: 0.0 + }; + + var renderFuns = function renderFuns(c) { + return Data_Lens_Getter.viewOn(v.value2)(Genetics_Browser_Layer["_Component"])(new Data_Tuple.Tuple(c, Genetics_Browser_Layer.slotSize(v2)(Genetics_Browser_Layer.asSlot(v.value2)))); + }; + + return Control_Bind.bind(dictMonadAff.MonadEffect0().Monad0().Bind1())(Effect_Class.liftEffect(dictMonadAff.MonadEffect0())(function __do() { + var v3 = function () { + if (v.value0 instanceof Genetics_Browser_Layer.Fixed) { + return Data_Functor.map(Effect.functorEffect)(Static.create)(createCanvas(v1)(name))(); + } + + ; + + if (v.value0 instanceof Genetics_Browser_Layer.Scrolling) { + return Data_Functor.map(Effect.functorEffect)(Buffer.create)(createBufferedCanvas(v1)(name))(); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 812, column 11 - line 814, column 67): " + [v.value0.constructor.name]); + }(); + + setCanvasPosition(pos)(Data_Lens_Getter.viewOn(v3)(_FrontCanvas))(); + return v3; + }))(function (v3) { + var layerRef = function (v4) { + return v4.layers; + }(Data_Newtype.unwrap(newtypeTrackContainer)(tc)); + + return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadAff.MonadEffect0().Monad0().Bind1())(Effect_Class.liftEffect(dictMonadAff.MonadEffect0())(function __do() { + Effect_Ref.modify_(Data_Map_Internal.insert(Data_Ord.ordString)(name)(v3))(layerRef)(); + return appendCanvasElem(Data_Newtype.unwrap(newtypeTrackContainer)(tc).element)(Data_Lens_Getter.viewOn(v3)(_FrontCanvas))(); + }))(function () { + return Control_Bind.bind(dictMonadAff.MonadEffect0().Monad0().Bind1())(Effect_Aff_Class.liftAff(dictMonadAff)(Genetics_Browser_Cacher["new"](dictRowToList)(dictCacherAff)(renderFuns)))(function (v4) { + var drawOnCanvas = function drawOnCanvas(v5) { + return function (renderables) { + return Control_Bind.bind(dictMonadAff.MonadEffect0().Monad0().Bind1())(getLayers(dictMonadAff.MonadEffect0())(tc))(function (v6) { + return Control_Bind.bind(dictMonadAff.MonadEffect0().Monad0().Bind1())(function () { + var v7 = Data_Map_Internal.lookup(Data_Ord.ordString)(name)(v6); + + if (v7 instanceof Data_Maybe.Nothing) { + return Partial_Unsafe.unsafeCrashWith("Tried to render layer '" + (name + "', but it did not exist!")); + } + + ; + + if (v7 instanceof Data_Maybe.Just) { + return Control_Applicative.pure(dictMonadAff.MonadEffect0().Monad0().Applicative0())(Data_Lens_Getter.viewOn(v7.value0)(_FrontCanvas)); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 830, column 16 - line 832, column 53): " + [v7.constructor.name]); + }())(function (v7) { + return Control_Bind.bind(dictMonadAff.MonadEffect0().Monad0().Bind1())(getDimensions(dictMonadAff.MonadEffect0())(tc))(function (v8) { + return Control_Bind.bind(dictMonadAff.MonadEffect0().Monad0().Bind1())(Genetics_Browser_Layer.slotContext(dictMonadAff.MonadEffect0())(v)(v8)(v7))(function (v9) { + return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadAff.MonadEffect0().Monad0().Bind1())(Effect_Class.liftEffect(dictMonadAff.MonadEffect0())(Graphics_Canvas.withContext(v9)(function __do() { + Genetics_Browser_Layer.setContextTranslation(Data_Semiring.zero(Data_Semiring.semiringRecord()(Data_Semiring.semiringRecordCons(new Data_Symbol.IsSymbol(function () { + return "x"; + }))()(Data_Semiring.semiringRecordCons(new Data_Symbol.IsSymbol(function () { + return "y"; + }))()(Data_Semiring.semiringRecordNil)(Data_Semiring.semiringNumber))(Data_Semiring.semiringNumber))))(v9)(); + return Data_Functor["void"](Effect.functorEffect)(Graphics_Canvas.clearRect(v9)(Record.merge()()({ + x: 0.0, + y: 0.0 + })(v8.size)))(); + })))(function () { + return Control_Bind.bind(dictMonadAff.MonadEffect0().Monad0().Bind1())(Effect_Class.liftEffect(dictMonadAff.MonadEffect0())(Graphics_Canvas.translate(v9)({ + translateX: -v5.value0, + translateY: 0.0 + })))(function (v10) { + var labels = function labels(ls) { + return Effect_Class.liftEffect(dictMonadAff.MonadEffect0())(renderLabels(new Data_Pair.Pair(v5.value0, v5.value1))(ls)(v9)); + }; + + var drawingBatch = function drawingBatch(ds) { + return Effect_Class.liftEffect(dictMonadAff.MonadEffect0())(Data_Foldable.for_(Effect.applicativeEffect)(Data_Foldable.foldableArray)(ds)(renderGlyphs(function (v11) { + return v11.glyphBuffer; + }(Data_Newtype.unwrap(newtypeTrackContainer)(tc)))(v9)(new Data_Pair.Pair(v5.value0, v5.value1)))); + }; + + var drawing = function drawing(d) { + return Effect_Class.liftEffect(dictMonadAff.MonadEffect0())(Graphics_Drawing.render(v9)(d)); + }; + + var bigDrawing = function bigDrawing(d) { + return Effect_Class.liftEffect(dictMonadAff.MonadEffect0())(Control_Applicative.when(Effect.applicativeEffect)(d.topLeft.x <= v5.value1 && d.bottomRight.x >= v5.value0)(Graphics_Drawing.render(v9)(Graphics_Drawing.translate(d.topLeft.x)(d.topLeft.y)(d.drawing(Data_Unit.unit))))); + }; + + var chunkF = function chunkF(l1) { + var $239 = Data_List["null"](l1); + + if ($239) { + return Data_Maybe.Nothing.value; + } + + ; + return new Data_Maybe.Just(new Data_Tuple.Tuple(Data_List.take(250)(l1), Data_List.drop(250)(l1))); + }; + + var chunks = Data_Unfoldable.unfoldr(Data_List_Types.unfoldableList)(chunkF)(renderables); + return Data_Foldable.for_(dictMonadAff.MonadEffect0().Monad0().Applicative0())(Data_List_Types.foldableList)(chunks)(function (c) { + return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadAff.MonadEffect0().Monad0().Bind1())(Data_Foldable.for_(dictMonadAff.MonadEffect0().Monad0().Applicative0())(Data_List_Types.foldableList)(c)(function (d) { + return Data_Variant.onMatch()(Data_Variant_Internal.variantMatchCons(Data_Variant_Internal.variantMatchCons(Data_Variant_Internal.variantMatchCons(Data_Variant_Internal.variantMatchCons(Data_Variant_Internal.variantMatchNil)()(Type_Equality.refl))()(Type_Equality.refl))()(Type_Equality.refl))()(Type_Equality.refl))()({ + drawing: drawing, + bigDrawing: bigDrawing, + drawingBatch: drawingBatch, + labels: labels + })(Data_Variant.case_)(d); + }))(function () { + return Effect_Aff_Class.liftAff(dictMonadAff)(Effect_Aff.delay(Data_Newtype.wrap(Data_Time_Duration.newtypeMilliseconds)(1.0e-2))); + }); + }); + }); + }); + }); + }); + }); + }); + }; + }; + + return Control_Applicative.pure(dictMonadAff.MonadEffect0().Monad0().Applicative0())({ + drawOnCanvas: drawOnCanvas, + run: v4.run, + last: v4.last + }); + }); + }); + }); + }); + }); + }; + }; + }; + }; + }; +}; + +var zIndexLayers = function zIndexLayers(dictMonadEffect) { + return function (v) { + return function (order) { + return Effect_Class.liftEffect(dictMonadEffect)(function __do() { + var v1 = Effect_Ref.read(v.layers)(); + var layerNames = Data_Map.keys(v1); + var n = Data_Foldable.length(Data_Set.foldableSet)(Data_Semiring.semiringInt)(layerNames); + var $248 = Data_List["null"](Data_List.difference(Data_Eq.eqString)(order)(Data_List.fromFoldable(Data_Set.foldableSet)(layerNames))); + + if ($248) { + return Data_Functor["void"](Effect.functorEffect)(Data_TraversableWithIndex.forWithIndex(Effect.applicativeEffect)(Data_List_Types.traversableWithIndexList)(order)(function (i) { + return function (ln) { + return Data_Foldable.traverse_(Effect.applicativeEffect)(Data_Foldable.foldableMaybe)(function (l) { + return setCanvasZIndex(Data_Lens_Getter.viewOn(l)(_FrontCanvas))(i); + })(Data_Map_Internal.lookup(Data_Ord.ordString)(ln)(v1)); + }; + }))(); + } + + ; + return Partial_Unsafe.unsafeCrashWith("Called `zIndexLayers` with an order that did not contain all layers")(); + }); + }; + }; +}; + +var _Container = function _Container(dictNewtype) { + return function (dictStrong) { + var $281 = Data_Lens_Iso_Newtype["_Newtype"](dictNewtype)(dictNewtype)(dictStrong.Profunctor0()); + var $282 = Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () { + return "element"; + }))()()(Data_Symbol.SProxy.value)(dictStrong); + return function ($283) { + return $281($282($283)); + }; + }; +}; + +var addLayer = function addLayer(dictMonadEffect) { + return function (bc) { + return function (name) { + return function (lc) { + return Effect_Class.liftEffect(dictMonadEffect)(function __do() { + var v = getLayers(Effect_Class.monadEffectEffect)(bc)(); + Effect_Ref.modify_(Data_Map_Internal.insert(Data_Ord.ordString)(name)(lc))(Data_Lens_Getter.viewOn(bc)(_Layers(Data_Lens_Internal_Forget.strongForget)))(); + + var toNode = function toNode(l) { + return Data_Lens_Getter.viewOn(l)(_FrontCanvas); + }; + + return Data_Functor["void"](Effect.functorEffect)(function () { + var v1 = Data_Map_Internal.lookup(Data_Ord.ordString)(name)(v); + + if (v1 instanceof Data_Maybe.Just) { + return Web_DOM_Node.replaceChild(toNode(lc))(toNode(v1.value0))(Data_Lens_Getter.viewOn(bc)(_Container(newtypeTrackContainer)(Data_Lens_Internal_Forget.strongForget))); + } + + ; + + if (v1 instanceof Data_Maybe.Nothing) { + return Web_DOM_Node.appendChild(toNode(lc))(Data_Lens_Getter.viewOn(bc)(_Container(newtypeTrackContainer)(Data_Lens_Internal_Forget.strongForget))); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 613, column 10 - line 615, column 95): " + [v1.constructor.name]); + }())(); + }); + }; + }; + }; +}; + +var deleteLayer = function deleteLayer(dictMonadEffect) { + return function (bc) { + return function (name) { + return Effect_Class.liftEffect(dictMonadEffect)(function __do() { + var v = getLayers(Effect_Class.monadEffectEffect)(bc)(); + + var toNode = function toNode(l) { + return Data_Lens_Getter.viewOn(l)(_FrontCanvas); + }; + + (function () { + var v1 = Data_Map_Internal.lookup(Data_Ord.ordString)(name)(v); + + if (v1 instanceof Data_Maybe.Nothing) { + return Data_Unit.unit; + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + return Data_Functor["void"](Effect.functorEffect)(Web_DOM_Node.removeChild(toNode(v1.value0))(Data_Lens_Getter.viewOn(bc)(_Container(newtypeTrackContainer)(Data_Lens_Internal_Forget.strongForget))))(); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 628, column 3 - line 630, column 83): " + [v1.constructor.name]); + })(); + + return Effect_Ref.modify_(Data_Map_Internal["delete"](Data_Ord.ordString)(name))(Data_Lens_Getter.viewOn(bc)(_Layers(Data_Lens_Internal_Forget.strongForget)))(); + }); + }; + }; +}; + +var trackClickHandler = function trackClickHandler(dictMonadEffect) { + return function (bc) { + return function (com) { + return Effect_Class.liftEffect(dictMonadEffect)(function __do() { + var v = getDimensions(Effect_Class.monadEffectEffect)(bc)(); + + var translate = function translate(p) { + return Data_Ring.sub(Data_Ring.ringRecord()(Data_Ring.ringRecordCons(new Data_Symbol.IsSymbol(function () { + return "x"; + }))()(Data_Ring.ringRecordCons(new Data_Symbol.IsSymbol(function () { + return "y"; + }))()(Data_Ring.ringRecordNil)(Data_Ring.ringNumber))(Data_Ring.ringNumber)))(p)(Genetics_Browser_Layer.slotOffset(v)(Genetics_Browser_Layer.asSlot(com))); + }; + + var cb = Data_Lens_Getter.viewOn(com)(Genetics_Browser_Layer["_Component"]); + return elementClick(Data_Lens_Getter.viewOn(bc)(_Container(newtypeTrackContainer)(Data_Lens_Internal_Forget.strongForget)))(function ($284) { + return cb(translate($284)); + })(); + }); + }; + }; +}; + +var trackWheel = function trackWheel(tc) { + return function (com) { + return function __do() { + var v = getDimensions(Effect_Class.monadEffectEffect)(tc)(); + + var translate = function translate(p) { + return Data_Ring.sub(Data_Ring.ringRecord()(Data_Ring.ringRecordCons(new Data_Symbol.IsSymbol(function () { + return "x"; + }))()(Data_Ring.ringRecordCons(new Data_Symbol.IsSymbol(function () { + return "y"; + }))()(Data_Ring.ringRecordNil)(Data_Ring.ringNumber))(Data_Ring.ringNumber)))(p)(Genetics_Browser_Layer.slotOffset(v)(Genetics_Browser_Layer.asSlot(com))); + }; + + var cb = Data_Lens_Getter.viewOn(com)(Genetics_Browser_Layer["_Component"]); + return $foreign.canvasWheelCBImpl(Data_Lens_Getter.viewOn(tc)(_Container(newtypeTrackContainer)(Data_Lens_Internal_Forget.strongForget)))(function ($285) { + return cb(translate($285)); + })(); + }; + }; +}; + +var withLoadingIndicator = function withLoadingIndicator(dictMonadEffect) { + return function (tc) { + return function (cb) { + var nd = Web_DOM_Element.toNode(Data_Lens_Getter.viewOn(tc)(_Container(newtypeTrackContainer)(Data_Lens_Internal_Forget.strongForget))); + return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Web_DOM_Node.setTextContent("loading")(nd)))(function () { + return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(cb)(function (v) { + return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Web_DOM_Node.setTextContent("")(nd)))(function () { + return Control_Applicative.pure(dictMonadEffect.Monad0().Applicative0())(v); + }); + }); + }); + }; + }; +}; + +var _Buffer = function _Buffer(dictChoice) { + var from = function from(v) { + if (v instanceof Static) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v instanceof Buffer) { + return new Data_Maybe.Just(v.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 765, column 9 - line 765, column 34): " + [v.constructor.name]); + }; + + return Data_Lens_Prism["prism'"](Buffer.create)(from)(dictChoice); +}; + +var animateTrack = function animateTrack(v) { + return function (a) { + return function __do() { + var v1 = Effect_Ref.read(v.layers)(); + var toAnimate = Data_Filterable.filterMap(Data_Filterable.filterableMap(Data_Ord.ordString))(Data_Lens_Fold.preview(_Buffer(Data_Lens_Internal_Forget.choiceForget(Data_Maybe_First.monoidFirst))))(v1); + return Data_Foldable.for_(Effect.applicativeEffect)(Data_Map_Internal.foldableMap)(toAnimate)(function (bc$prime) { + if (a instanceof Scrolling) { + return function __do() { + var v2 = Data_Functor.map(Effect.functorEffect)(function ($286) { + return function (v2) { + return v2.center.size.width; + }(Genetics_Browser_Layer.trackSlots($286)); + })(getDimensions(Effect_Class.monadEffectEffect)(Data_Newtype.wrap(newtypeTrackContainer)(v)))(); + return scrollCanvas(bc$prime)({ + x: -a.value0 * v2, + y: 0 + })(); + }; + } + + ; + + if (a instanceof Zooming) { + return zoomCanvas(bc$prime)(a.value0); + } + + ; + + if (a instanceof Jump) { + return Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 284, column 26 - line 293, column 29): " + [a.constructor.name]); + })(); + }; + }; +}; + +var scrollTrack = function scrollTrack(v) { + return function (pt) { + return function __do() { + var v1 = Effect_Ref.read(v.layers)(); + var scrolling = Data_Filterable.filterMap(Data_Filterable.filterableMap(Data_Ord.ordString))(Data_Lens_Fold.preview(_Buffer(Data_Lens_Internal_Forget.choiceForget(Data_Maybe_First.monoidFirst))))(v1); + return Data_Foldable.for_(Effect.applicativeEffect)(Data_Map_Internal.foldableMap)(scrolling)(function (bc$prime) { + return scrollCanvas(bc$prime)(pt); + })(); + }; + }; +}; + +module.exports = { + LLeft: LLeft, + LCenter: LCenter, + LRight: LRight, + "_drawing": _drawing, + "_bigDrawing": _bigDrawing, + "_drawingBatch": _drawingBatch, + "_labels": _labels, + newLayer: newLayer, + getDimensions: getDimensions, + "_Container": _Container, + dragScroll: dragScroll, + dragScrollTrack: dragScrollTrack, + wheelZoom: wheelZoom, + trackWheel: trackWheel, + trackClickHandler: trackClickHandler, + trackContainer: trackContainer, + withLoadingIndicator: withLoadingIndicator, + setTrackContainerSize: setTrackContainerSize, + setElementStyle: setElementStyle, + browserContainer: browserContainer, + addTrack: addTrack, + getTrack: getTrack, + forTracks: forTracks, + forTracks_: forTracks_, + Scrolling: Scrolling, + Zooming: Zooming, + Jump: Jump, + animateTrack: animateTrack, + newtypeBrowserContainer: newtypeBrowserContainer, + eqLabelPlace: eqLabelPlace +}; +},{"./foreign.js":"KkC9","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Error.Class/index.js":"L8Lk","../Data.Array/index.js":"4t4C","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Filterable/index.js":"6hfS","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Int/index.js":"xNJb","../Data.Lens.Fold/index.js":"fCig","../Data.Lens.Getter/index.js":"OPOX","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.Lens.Iso.Newtype/index.js":"CiFJ","../Data.Lens.Prism/index.js":"4AcV","../Data.Lens.Record/index.js":"nwoH","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map/index.js":"62zx","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Maybe.First/index.js":"W/l6","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Nullable/index.js":"YQ8o","../Data.Ord/index.js":"r4Vb","../Data.Pair/index.js":"PpsX","../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF","../Data.Set/index.js":"+Eae","../Data.Show/index.js":"mFY7","../Data.Symbol/index.js":"4oJQ","../Data.Time.Duration/index.js":"AnkF","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unit/index.js":"NhVk","../Data.Variant/index.js":"hgdh","../Data.Variant.Internal/index.js":"kYoO","../Effect/index.js":"oTWB","../Effect.Aff/index.js":"I7lu","../Effect.Aff.Class/index.js":"I4H+","../Effect.Class/index.js":"dWtH","../Effect.Exception/index.js":"0OCW","../Effect.Ref/index.js":"/Jaj","../Effect.Uncurried/index.js":"qn3Z","../Genetics.Browser.Cacher/index.js":"61ee","../Genetics.Browser.Layer/index.js":"YWUW","../Graphics.Canvas/index.js":"rm6N","../Graphics.Drawing/index.js":"0WVi","../Graphics.Drawing.Font/index.js":"fMOI","../Partial.Unsafe/index.js":"aoR+","../Record/index.js":"0gG4","../Type.Equality/index.js":"Uq/R","../Unsafe.Coerce/index.js":"ETUV","../Web.DOM.Element/index.js":"S4h2","../Web.DOM.Node/index.js":"P+X4"}],"eqin":[function(require,module,exports) { +"use strict"; + +exports.unsafeReadPropImpl = function (f, s, key, value) { + return value == null ? f : s(value[key]); +}; + +exports.unsafeHasOwnProperty = function (prop, value) { + return Object.prototype.hasOwnProperty.call(value, prop); +}; + +exports.unsafeHasProperty = function (prop, value) { + return prop in value; +}; +},{}],"Ryy1":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var Indexable = function Indexable(ix) { + this.ix = ix; +}; + +var Index = function Index(errorAt, hasOwnProperty, hasProperty, index) { + this.errorAt = errorAt; + this.hasOwnProperty = hasOwnProperty; + this.hasProperty = hasProperty; + this.index = index; +}; + +var unsafeReadProp = function unsafeReadProp(k) { + return function (value) { + return $foreign.unsafeReadPropImpl(Foreign.fail(new Foreign.TypeMismatch("object", Foreign.typeOf(value))), Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity)), k, value); + }; +}; + +var readProp = unsafeReadProp; +var readIndex = unsafeReadProp; + +var ix = function ix(dict) { + return dict.ix; +}; + +var index = function index(dict) { + return dict.index; +}; + +var indexableExceptT = new Indexable(function (dictIndex) { + return function (f) { + return function (i) { + return Control_Bind.bindFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Data_Function.flip(index(dictIndex))(i))(f); + }; + }; +}); +var indexableForeign = new Indexable(function (dictIndex) { + return index(dictIndex); +}); + +var hasPropertyImpl = function hasPropertyImpl(v) { + return function (value) { + if (Foreign.isNull(value)) { + return false; + } + + ; + + if (Foreign.isUndefined(value)) { + return false; + } + + ; + + if (Foreign.typeOf(value) === "object" || Foreign.typeOf(value) === "function") { + return $foreign.unsafeHasProperty(v, value); + } + + ; + return false; + }; +}; + +var hasProperty = function hasProperty(dict) { + return dict.hasProperty; +}; + +var hasOwnPropertyImpl = function hasOwnPropertyImpl(v) { + return function (value) { + if (Foreign.isNull(value)) { + return false; + } + + ; + + if (Foreign.isUndefined(value)) { + return false; + } + + ; + + if (Foreign.typeOf(value) === "object" || Foreign.typeOf(value) === "function") { + return $foreign.unsafeHasOwnProperty(v, value); + } + + ; + return false; + }; +}; + +var indexInt = new Index(Foreign.ErrorAtIndex.create, hasOwnPropertyImpl, hasPropertyImpl, Data_Function.flip(readIndex)); +var indexString = new Index(Foreign.ErrorAtProperty.create, hasOwnPropertyImpl, hasPropertyImpl, Data_Function.flip(readProp)); + +var hasOwnProperty = function hasOwnProperty(dict) { + return dict.hasOwnProperty; +}; + +var errorAt = function errorAt(dict) { + return dict.errorAt; +}; + +module.exports = { + Index: Index, + Indexable: Indexable, + readProp: readProp, + readIndex: readIndex, + ix: ix, + index: index, + hasProperty: hasProperty, + hasOwnProperty: hasOwnProperty, + errorAt: errorAt, + indexString: indexString, + indexInt: indexInt, + indexableForeign: indexableForeign, + indexableExceptT: indexableExceptT +}; +},{"./foreign.js":"eqin","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Function/index.js":"ImXJ","../Data.Identity/index.js":"2OKT","../Foreign/index.js":"pu1p"}],"71qG":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var isObject = function isObject(v) { + return Foreign.tagOf(v) === "Object"; +}; + +var readObject = function readObject(value) { + if (isObject(value)) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Foreign.unsafeFromForeign(value)); + } + + ; + + if (Data_Boolean.otherwise) { + return Foreign.fail(new Foreign.TypeMismatch("Object", Foreign.tagOf(value))); + } + + ; + throw new Error("Failed pattern match at Foreign.Generic.Internal (line 13, column 1 - line 13, column 44): " + [value.constructor.name]); +}; + +module.exports = { + isObject: isObject, + readObject: readObject +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Boolean/index.js":"ObQr","../Data.Identity/index.js":"2OKT","../Foreign/index.js":"pu1p"}],"dhzu":[function(require,module,exports) { +exports['null'] = null; +exports['undefined'] = undefined; +},{}],"k5yP":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var readNullOrUndefined = function readNullOrUndefined(v) { + return function (value) { + if (Foreign.isNull(value) || Foreign.isUndefined(value)) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value); + } + + ; + return Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Maybe.Just.create)(v(value)); + }; +}; + +module.exports = { + readNullOrUndefined: readNullOrUndefined, + "undefined": $foreign["undefined"], + "null": $foreign["null"] +}; +},{"./foreign.js":"dhzu","../Control.Applicative/index.js":"qYya","../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Maybe/index.js":"5mN7","../Foreign/index.js":"pu1p"}],"cO3i":[function(require,module,exports) { +"use strict"; + +exports._copyST = function (m) { + return function () { + var r = {}; + + for (var k in m) { + if (hasOwnProperty.call(m, k)) { + r[k] = m[k]; + } + } + + return r; + }; +}; + +exports.empty = {}; + +exports.runST = function (f) { + return f(); +}; + +exports._fmapObject = function (m0, f) { + var m = {}; + + for (var k in m0) { + if (hasOwnProperty.call(m0, k)) { + m[k] = f(m0[k]); + } + } + + return m; +}; + +exports._mapWithKey = function (m0, f) { + var m = {}; + + for (var k in m0) { + if (hasOwnProperty.call(m0, k)) { + m[k] = f(k)(m0[k]); + } + } + + return m; +}; + +exports._foldM = function (bind) { + return function (f) { + return function (mz) { + return function (m) { + var acc = mz; + + function g(k) { + return function (z) { + return f(z)(k)(m[k]); + }; + } + + for (var k in m) { + if (hasOwnProperty.call(m, k)) { + acc = bind(acc)(g(k)); + } + } + + return acc; + }; + }; + }; +}; + +exports._foldSCObject = function (m, z, f, fromMaybe) { + var acc = z; + + for (var k in m) { + if (hasOwnProperty.call(m, k)) { + var maybeR = f(acc)(k)(m[k]); + var r = fromMaybe(null)(maybeR); + if (r === null) return acc;else acc = r; + } + } + + return acc; +}; + +exports.all = function (f) { + return function (m) { + for (var k in m) { + if (hasOwnProperty.call(m, k) && !f(k)(m[k])) return false; + } + + return true; + }; +}; + +exports.size = function (m) { + var s = 0; + + for (var k in m) { + if (hasOwnProperty.call(m, k)) { + ++s; + } + } + + return s; +}; + +exports._lookup = function (no, yes, k, m) { + return k in m ? yes(m[k]) : no; +}; + +exports._unsafeDeleteObject = function (m, k) { + delete m[k]; + return m; +}; + +exports._lookupST = function (no, yes, k, m) { + return function () { + return k in m ? yes(m[k]) : no; + }; +}; + +function toArrayWithKey(f) { + return function (m) { + var r = []; + + for (var k in m) { + if (hasOwnProperty.call(m, k)) { + r.push(f(k)(m[k])); + } + } + + return r; + }; +} + +exports.toArrayWithKey = toArrayWithKey; +exports.keys = Object.keys || toArrayWithKey(function (k) { + return function () { + return k; + }; +}); +},{}],"hgKu":[function(require,module,exports) { +"use strict"; + +exports["new"] = function () { + return {}; +}; + +exports.peekImpl = function (just) { + return function (nothing) { + return function (k) { + return function (m) { + return function () { + return {}.hasOwnProperty.call(m, k) ? just(m[k]) : nothing; + }; + }; + }; + }; +}; + +exports.poke = function (k) { + return function (v) { + return function (m) { + return function () { + m[k] = v; + return m; + }; + }; + }; +}; + +exports["delete"] = function (k) { + return function (m) { + return function () { + delete m[k]; + return m; + }; + }; +}; +},{}],"fXGJ":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var peek = $foreign.peekImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value); +module.exports = { + peek: peek, + "new": $foreign["new"], + poke: $foreign.poke, + "delete": $foreign["delete"] +}; +},{"./foreign.js":"hgKu","../Data.Maybe/index.js":"5mN7"}],"jsiz":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Function_Uncurried = require("../Data.Function.Uncurried/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Foreign_Object_ST = require("../Foreign.Object.ST/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var values = $foreign.toArrayWithKey(function (v) { + return function (v1) { + return v1; + }; +}); + +var toUnfoldable = function toUnfoldable(dictUnfoldable) { + var $45 = Data_Array.toUnfoldable(dictUnfoldable); + var $46 = $foreign.toArrayWithKey(Data_Tuple.Tuple.create); + return function ($47) { + return $45($46($47)); + }; +}; + +var toAscUnfoldable = function toAscUnfoldable(dictUnfoldable) { + var $48 = Data_Array.toUnfoldable(dictUnfoldable); + var $49 = Data_Array.sortWith(Data_Ord.ordString)(Data_Tuple.fst); + var $50 = $foreign.toArrayWithKey(Data_Tuple.Tuple.create); + return function ($51) { + return $48($49($50($51))); + }; +}; + +var toAscArray = toAscUnfoldable(Data_Unfoldable.unfoldableArray); +var toArray = $foreign.toArrayWithKey(Data_Tuple.Tuple.create); +var thawST = $foreign["_copyST"]; + +var singleton = function singleton(k) { + return function (v) { + return $foreign.runST(Control_Bind.bindFlipped(Control_Monad_ST_Internal.bindST)(Foreign_Object_ST.poke(k)(v))(Foreign_Object_ST["new"])); + }; +}; + +var showObject = function showObject(dictShow) { + return new Data_Show.Show(function (m) { + return "(fromFoldable " + (Data_Show.show(Data_Show.showArray(Data_Tuple.showTuple(Data_Show.showString)(dictShow)))(toArray(m)) + ")"); + }); +}; + +var mutate = function mutate(f) { + return function (m) { + return $foreign.runST(function __do() { + var v = thawST(m)(); + var v1 = f(v)(); + return v; + }); + }; +}; + +var member = Data_Function_Uncurried.runFn4($foreign["_lookup"])(false)(Data_Function["const"](true)); + +var mapWithKey = function mapWithKey(f) { + return function (m) { + return $foreign["_mapWithKey"](m, f); + }; +}; + +var lookup = Data_Function_Uncurried.runFn4($foreign["_lookup"])(Data_Maybe.Nothing.value)(Data_Maybe.Just.create); + +var isSubmap = function isSubmap(dictEq) { + return function (m1) { + return function (m2) { + var f = function f(k) { + return function (v) { + return $foreign["_lookup"](false, Data_Eq.eq(dictEq)(v), k, m2); + }; + }; + + return $foreign.all(f)(m1); + }; + }; +}; + +var isEmpty = $foreign.all(function (v) { + return function (v1) { + return false; + }; +}); + +var insert = function insert(k) { + return function (v) { + return mutate(Foreign_Object_ST.poke(k)(v)); + }; +}; + +var functorObject = new Data_Functor.Functor(function (f) { + return function (m) { + return $foreign["_fmapObject"](m, f); + }; +}); +var functorWithIndexObject = new Data_FunctorWithIndex.FunctorWithIndex(function () { + return functorObject; +}, mapWithKey); + +var fromHomogeneous = function fromHomogeneous(dictHomogeneous) { + return Unsafe_Coerce.unsafeCoerce; +}; + +var fromFoldableWith = function fromFoldableWith(dictFoldable) { + return function (f) { + return function (l) { + return $foreign.runST(function __do() { + var v = Foreign_Object_ST["new"](); + Data_Foldable.for_(Control_Monad_ST_Internal.applicativeST)(dictFoldable)(l)(function (v1) { + return function __do() { + var v$prime = $foreign["_lookupST"](v1.value1, f(v1.value1), v1.value0, v)(); + return Foreign_Object_ST.poke(v1.value0)(v$prime)(v)(); + }; + })(); + return v; + }); + }; + }; +}; + +var fromFoldable = function fromFoldable(dictFoldable) { + return function (l) { + return $foreign.runST(function __do() { + var v = Foreign_Object_ST["new"](); + Control_Monad_ST_Internal.foreach(Data_Array.fromFoldable(dictFoldable)(l))(function (v1) { + return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Foreign_Object_ST.poke(v1.value0)(v1.value1)(v)); + })(); + return v; + }); + }; +}; + +var freezeST = $foreign["_copyST"]; + +var foldMaybe = function foldMaybe(f) { + return function (z) { + return function (m) { + return $foreign["_foldSCObject"](m, z, f, Data_Maybe.fromMaybe); + }; + }; +}; + +var foldM = function foldM(dictMonad) { + return function (f) { + return function (z) { + return $foreign["_foldM"](Control_Bind.bind(dictMonad.Bind1()))(f)(Control_Applicative.pure(dictMonad.Applicative0())(z)); + }; + }; +}; + +var semigroupObject = function semigroupObject(dictSemigroup) { + return new Data_Semigroup.Semigroup(function (m1) { + return function (m2) { + return mutate(function (s1) { + return foldM(Control_Monad_ST_Internal.monadST)(function (s2) { + return function (k) { + return function (v2) { + return Foreign_Object_ST.poke(k)($foreign["_lookup"](v2, function (v1) { + return Data_Semigroup.append(dictSemigroup)(v1)(v2); + }, k, m2))(s2); + }; + }; + })(s1)(m1); + })(m2); + }; + }); +}; + +var monoidObject = function monoidObject(dictSemigroup) { + return new Data_Monoid.Monoid(function () { + return semigroupObject(dictSemigroup); + }, $foreign.empty); +}; + +var union = function union(m) { + return mutate(function (s) { + return foldM(Control_Monad_ST_Internal.monadST)(function (s$prime) { + return function (k) { + return function (v) { + return Foreign_Object_ST.poke(k)(v)(s$prime); + }; + }; + })(s)(m); + }); +}; + +var unions = function unions(dictFoldable) { + return Data_Foldable.foldl(dictFoldable)(union)($foreign.empty); +}; + +var fold = $foreign["_foldM"](Data_Function.applyFlipped); + +var foldMap = function foldMap(dictMonoid) { + return function (f) { + return fold(function (acc) { + return function (k) { + return function (v) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(acc)(f(k)(v)); + }; + }; + })(Data_Monoid.mempty(dictMonoid)); + }; +}; + +var foldableObject = new Data_Foldable.Foldable(function (dictMonoid) { + return function (f) { + return foldMap(dictMonoid)(Data_Function["const"](f)); + }; +}, function (f) { + return fold(function (z) { + return function (v) { + return f(z); + }; + }); +}, function (f) { + return function (z) { + return function (m) { + return Data_Foldable.foldr(Data_Foldable.foldableArray)(f)(z)(values(m)); + }; + }; +}); +var foldableWithIndexObject = new Data_FoldableWithIndex.FoldableWithIndex(function () { + return foldableObject; +}, function (dictMonoid) { + return foldMap(dictMonoid); +}, function (f) { + return fold(Data_Function.flip(f)); +}, function (f) { + return function (z) { + return function (m) { + return Data_Foldable.foldr(Data_Foldable.foldableArray)(Data_Tuple.uncurry(f))(z)($foreign.toArrayWithKey(Data_Tuple.Tuple.create)(m)); + }; + }; +}); +var traversableWithIndexObject = new Data_TraversableWithIndex.TraversableWithIndex(function () { + return foldableWithIndexObject; +}, function () { + return functorWithIndexObject; +}, function () { + return traversableObject; +}, function (dictApplicative) { + return function (f) { + return function (ms) { + return fold(function (acc) { + return function (k) { + return function (v) { + return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Function.flip(insert(k)))(acc))(f(k)(v)); + }; + }; + })(Control_Applicative.pure(dictApplicative)($foreign.empty))(ms); + }; + }; +}); +var traversableObject = new Data_Traversable.Traversable(function () { + return foldableObject; +}, function () { + return functorObject; +}, function (dictApplicative) { + return Data_Traversable.traverse(traversableObject)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn)); +}, function (dictApplicative) { + var $52 = Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexObject)(dictApplicative); + return function ($53) { + return $52(Data_Function["const"]($53)); + }; +}); + +var filterWithKey = function filterWithKey(predicate) { + return function (m) { + var go = function () { + var step = function step(acc) { + return function (k) { + return function (v) { + var $41 = predicate(k)(v); + + if ($41) { + return Foreign_Object_ST.poke(k)(v)(acc); + } + + ; + return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(acc); + }; + }; + }; + + return function __do() { + var v = Foreign_Object_ST["new"](); + return foldM(Control_Monad_ST_Internal.monadST)(step)(v)(m)(); + }; + }(); + + return $foreign.runST(go); + }; +}; + +var filterKeys = function filterKeys(predicate) { + return filterWithKey(function ($54) { + return Data_Function["const"](predicate($54)); + }); +}; + +var filter = function filter(predicate) { + return filterWithKey(Data_Function["const"](predicate)); +}; + +var eqObject = function eqObject(dictEq) { + return new Data_Eq.Eq(function (m1) { + return function (m2) { + return isSubmap(dictEq)(m1)(m2) && isSubmap(dictEq)(m2)(m1); + }; + }); +}; + +var ordObject = function ordObject(dictOrd) { + return new Data_Ord.Ord(function () { + return eqObject(dictOrd.Eq0()); + }, function (m1) { + return function (m2) { + return Data_Ord.compare(Data_Ord.ordArray(Data_Tuple.ordTuple(Data_Ord.ordString)(dictOrd)))(toAscArray(m1))(toAscArray(m2)); + }; + }); +}; + +var eq1Object = new Data_Eq.Eq1(function (dictEq) { + return Data_Eq.eq(eqObject(dictEq)); +}); + +var $$delete = function $$delete(k) { + return mutate(Foreign_Object_ST["delete"](k)); +}; + +var pop = function pop(k) { + return function (m) { + return Data_Functor.mapFlipped(Data_Maybe.functorMaybe)(lookup(k)(m))(function (a) { + return new Data_Tuple.Tuple(a, $$delete(k)(m)); + }); + }; +}; + +var alter = function alter(f) { + return function (k) { + return function (m) { + var v = f(lookup(k)(m)); + + if (v instanceof Data_Maybe.Nothing) { + return $$delete(k)(m); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return insert(k)(v.value0)(m); + } + + ; + throw new Error("Failed pattern match at Foreign.Object (line 208, column 15 - line 210, column 25): " + [v.constructor.name]); + }; + }; +}; + +var update = function update(f) { + return function (k) { + return function (m) { + return alter(Data_Maybe.maybe(Data_Maybe.Nothing.value)(f))(k)(m); + }; + }; +}; + +module.exports = { + isEmpty: isEmpty, + singleton: singleton, + insert: insert, + lookup: lookup, + toUnfoldable: toUnfoldable, + toAscUnfoldable: toAscUnfoldable, + fromFoldable: fromFoldable, + fromFoldableWith: fromFoldableWith, + fromHomogeneous: fromHomogeneous, + "delete": $$delete, + pop: pop, + member: member, + alter: alter, + update: update, + mapWithKey: mapWithKey, + filterWithKey: filterWithKey, + filterKeys: filterKeys, + filter: filter, + values: values, + union: union, + unions: unions, + isSubmap: isSubmap, + fold: fold, + foldMap: foldMap, + foldM: foldM, + foldMaybe: foldMaybe, + thawST: thawST, + freezeST: freezeST, + functorObject: functorObject, + functorWithIndexObject: functorWithIndexObject, + foldableObject: foldableObject, + foldableWithIndexObject: foldableWithIndexObject, + traversableObject: traversableObject, + traversableWithIndexObject: traversableWithIndexObject, + eqObject: eqObject, + eq1Object: eq1Object, + ordObject: ordObject, + showObject: showObject, + semigroupObject: semigroupObject, + monoidObject: monoidObject, + empty: $foreign.empty, + size: $foreign.size, + keys: $foreign.keys, + all: $foreign.all, + runST: $foreign.runST, + toArrayWithKey: $foreign.toArrayWithKey +}; +},{"./foreign.js":"cO3i","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad.ST.Internal/index.js":"Sedc","../Data.Array/index.js":"4t4C","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Function.Uncurried/index.js":"TowT","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Foreign.Object.ST/index.js":"fXGJ","../Unsafe.Coerce/index.js":"ETUV"}],"hJ/N":[function(require,module,exports) { +"use strict"; + +exports.copyRecord = function (rec) { + var copy = {}; + + for (var key in rec) { + if ({}.hasOwnProperty.call(rec, key)) { + copy[key] = rec[key]; + } + } + + return copy; +}; + +exports.unsafeInsert = function (l) { + return function (a) { + return function (rec) { + rec[l] = a; + return rec; + }; + }; +}; + +exports.unsafeModify = function (l) { + return function (f) { + return function (rec) { + rec[l] = f(rec[l]); + return rec; + }; + }; +}; + +exports.unsafeDelete = function (l) { + return function (rec) { + delete rec[l]; + return rec; + }; +}; + +exports.unsafeRename = function (l1) { + return function (l2) { + return function (rec) { + rec[l2] = rec[l1]; + delete rec[l1]; + return rec; + }; + }; +}; +},{}],"VeY4":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Record_Unsafe_Union = require("../Record.Unsafe.Union/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var Builder = function Builder(x) { + return x; +}; + +var union = function union(dictUnion) { + return function (r2) { + return function (r1) { + return Record_Unsafe_Union.unsafeUnionFn(r1, r2); + }; + }; +}; + +var semigroupoidBuilder = Control_Semigroupoid.semigroupoidFn; + +var rename = function rename(dictIsSymbol) { + return function (dictIsSymbol1) { + return function (dictCons) { + return function (dictLacks) { + return function (dictCons1) { + return function (dictLacks1) { + return function (l1) { + return function (l2) { + return function (r1) { + return $foreign.unsafeRename(Data_Symbol.reflectSymbol(dictIsSymbol)(l1))(Data_Symbol.reflectSymbol(dictIsSymbol1)(l2))(r1); + }; + }; + }; + }; + }; + }; + }; + }; +}; + +var nub = function nub(dictNub) { + return Unsafe_Coerce.unsafeCoerce; +}; + +var modify = function modify(dictCons) { + return function (dictCons1) { + return function (dictIsSymbol) { + return function (l) { + return function (f) { + return function (r1) { + return $foreign.unsafeModify(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(f)(r1); + }; + }; + }; + }; + }; +}; + +var merge = function merge(dictUnion) { + return function (dictNub) { + return function (r2) { + return function (r1) { + return Record_Unsafe_Union.unsafeUnionFn(r1, r2); + }; + }; + }; +}; + +var insert = function insert(dictCons) { + return function (dictLacks) { + return function (dictIsSymbol) { + return function (l) { + return function (a) { + return function (r1) { + return $foreign.unsafeInsert(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(a)(r1); + }; + }; + }; + }; + }; +}; + +var disjointUnion = function disjointUnion(dictUnion) { + return function (dictNub) { + return function (r1) { + return function (r2) { + return Record_Unsafe_Union.unsafeUnionFn(r1, r2); + }; + }; + }; +}; + +var $$delete = function $$delete(dictIsSymbol) { + return function (dictLacks) { + return function (dictCons) { + return function (l) { + return function (r2) { + return $foreign.unsafeDelete(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(r2); + }; + }; + }; + }; +}; + +var categoryBuilder = Control_Category.categoryFn; + +var build = function build(v) { + return function (r1) { + return v($foreign.copyRecord(r1)); + }; +}; + +module.exports = { + build: build, + insert: insert, + modify: modify, + "delete": $$delete, + rename: rename, + merge: merge, + union: union, + disjointUnion: disjointUnion, + nub: nub, + semigroupoidBuilder: semigroupoidBuilder, + categoryBuilder: categoryBuilder +}; +},{"./foreign.js":"hJ/N","../Control.Category/index.js":"IAi2","../Control.Semigroupoid/index.js":"/riR","../Data.Symbol/index.js":"4oJQ","../Record.Unsafe.Union/index.js":"WmUk","../Unsafe.Coerce/index.js":"ETUV"}],"ZOFT":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad = require("../Control.Monad/index.js"); + +var Data_BooleanAlgebra = require("../Data.BooleanAlgebra/index.js"); + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_CommutativeRing = require("../Data.CommutativeRing/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Proxy3 = function () { + function Proxy3() {} + + ; + Proxy3.value = new Proxy3(); + return Proxy3; +}(); + +var Proxy2 = function () { + function Proxy2() {} + + ; + Proxy2.value = new Proxy2(); + return Proxy2; +}(); + +var $$Proxy = function () { + function $$Proxy() {} + + ; + $$Proxy.value = new $$Proxy(); + return $$Proxy; +}(); + +var showProxy3 = new Data_Show.Show(function (v) { + return "Proxy3"; +}); +var showProxy2 = new Data_Show.Show(function (v) { + return "Proxy2"; +}); +var showProxy = new Data_Show.Show(function (v) { + return "Proxy"; +}); +var semiringProxy3 = new Data_Semiring.Semiring(function (v) { + return function (v1) { + return Proxy3.value; + }; +}, function (v) { + return function (v1) { + return Proxy3.value; + }; +}, Proxy3.value, Proxy3.value); +var semiringProxy2 = new Data_Semiring.Semiring(function (v) { + return function (v1) { + return Proxy2.value; + }; +}, function (v) { + return function (v1) { + return Proxy2.value; + }; +}, Proxy2.value, Proxy2.value); +var semiringProxy = new Data_Semiring.Semiring(function (v) { + return function (v1) { + return $$Proxy.value; + }; +}, function (v) { + return function (v1) { + return $$Proxy.value; + }; +}, $$Proxy.value, $$Proxy.value); +var semigroupProxy3 = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return Proxy3.value; + }; +}); +var semigroupProxy2 = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return Proxy2.value; + }; +}); +var semigroupProxy = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + return $$Proxy.value; + }; +}); +var ringProxy3 = new Data_Ring.Ring(function () { + return semiringProxy3; +}, function (v) { + return function (v1) { + return Proxy3.value; + }; +}); +var ringProxy2 = new Data_Ring.Ring(function () { + return semiringProxy2; +}, function (v) { + return function (v1) { + return Proxy2.value; + }; +}); +var ringProxy = new Data_Ring.Ring(function () { + return semiringProxy; +}, function (v) { + return function (v1) { + return $$Proxy.value; + }; +}); +var heytingAlgebraProxy3 = new Data_HeytingAlgebra.HeytingAlgebra(function (v) { + return function (v1) { + return Proxy3.value; + }; +}, function (v) { + return function (v1) { + return Proxy3.value; + }; +}, Proxy3.value, function (v) { + return function (v1) { + return Proxy3.value; + }; +}, function (v) { + return Proxy3.value; +}, Proxy3.value); +var heytingAlgebraProxy2 = new Data_HeytingAlgebra.HeytingAlgebra(function (v) { + return function (v1) { + return Proxy2.value; + }; +}, function (v) { + return function (v1) { + return Proxy2.value; + }; +}, Proxy2.value, function (v) { + return function (v1) { + return Proxy2.value; + }; +}, function (v) { + return Proxy2.value; +}, Proxy2.value); +var heytingAlgebraProxy = new Data_HeytingAlgebra.HeytingAlgebra(function (v) { + return function (v1) { + return $$Proxy.value; + }; +}, function (v) { + return function (v1) { + return $$Proxy.value; + }; +}, $$Proxy.value, function (v) { + return function (v1) { + return $$Proxy.value; + }; +}, function (v) { + return $$Proxy.value; +}, $$Proxy.value); +var functorProxy = new Data_Functor.Functor(function (f) { + return function (m) { + return $$Proxy.value; + }; +}); +var eqProxy3 = new Data_Eq.Eq(function (x) { + return function (y) { + return true; + }; +}); +var ordProxy3 = new Data_Ord.Ord(function () { + return eqProxy3; +}, function (x) { + return function (y) { + return Data_Ordering.EQ.value; + }; +}); +var eqProxy2 = new Data_Eq.Eq(function (x) { + return function (y) { + return true; + }; +}); +var ordProxy2 = new Data_Ord.Ord(function () { + return eqProxy2; +}, function (x) { + return function (y) { + return Data_Ordering.EQ.value; + }; +}); +var eqProxy = new Data_Eq.Eq(function (x) { + return function (y) { + return true; + }; +}); +var ordProxy = new Data_Ord.Ord(function () { + return eqProxy; +}, function (x) { + return function (y) { + return Data_Ordering.EQ.value; + }; +}); +var discardProxy3 = new Control_Bind.Discard(function (dictBind) { + return Control_Bind.bind(dictBind); +}); +var discardProxy2 = new Control_Bind.Discard(function (dictBind) { + return Control_Bind.bind(dictBind); +}); +var discardProxy = new Control_Bind.Discard(function (dictBind) { + return Control_Bind.bind(dictBind); +}); +var commutativeRingProxy3 = new Data_CommutativeRing.CommutativeRing(function () { + return ringProxy3; +}); +var commutativeRingProxy2 = new Data_CommutativeRing.CommutativeRing(function () { + return ringProxy2; +}); +var commutativeRingProxy = new Data_CommutativeRing.CommutativeRing(function () { + return ringProxy; +}); +var boundedProxy3 = new Data_Bounded.Bounded(function () { + return ordProxy3; +}, Proxy3.value, Proxy3.value); +var boundedProxy2 = new Data_Bounded.Bounded(function () { + return ordProxy2; +}, Proxy2.value, Proxy2.value); +var boundedProxy = new Data_Bounded.Bounded(function () { + return ordProxy; +}, $$Proxy.value, $$Proxy.value); +var booleanAlgebraProxy3 = new Data_BooleanAlgebra.BooleanAlgebra(function () { + return heytingAlgebraProxy3; +}); +var booleanAlgebraProxy2 = new Data_BooleanAlgebra.BooleanAlgebra(function () { + return heytingAlgebraProxy2; +}); +var booleanAlgebraProxy = new Data_BooleanAlgebra.BooleanAlgebra(function () { + return heytingAlgebraProxy; +}); +var applyProxy = new Control_Apply.Apply(function () { + return functorProxy; +}, function (v) { + return function (v1) { + return $$Proxy.value; + }; +}); +var bindProxy = new Control_Bind.Bind(function () { + return applyProxy; +}, function (v) { + return function (v1) { + return $$Proxy.value; + }; +}); +var applicativeProxy = new Control_Applicative.Applicative(function () { + return applyProxy; +}, function (v) { + return $$Proxy.value; +}); +var monadProxy = new Control_Monad.Monad(function () { + return applicativeProxy; +}, function () { + return bindProxy; +}); +module.exports = { + "Proxy": $$Proxy, + Proxy2: Proxy2, + Proxy3: Proxy3, + eqProxy: eqProxy, + functorProxy: functorProxy, + ordProxy: ordProxy, + applicativeProxy: applicativeProxy, + applyProxy: applyProxy, + bindProxy: bindProxy, + booleanAlgebraProxy: booleanAlgebraProxy, + boundedProxy: boundedProxy, + commutativeRingProxy: commutativeRingProxy, + discardProxy: discardProxy, + heytingAlgebraProxy: heytingAlgebraProxy, + monadProxy: monadProxy, + ringProxy: ringProxy, + semigroupProxy: semigroupProxy, + semiringProxy: semiringProxy, + showProxy: showProxy, + eqProxy2: eqProxy2, + ordProxy2: ordProxy2, + booleanAlgebraProxy2: booleanAlgebraProxy2, + boundedProxy2: boundedProxy2, + commutativeRingProxy2: commutativeRingProxy2, + discardProxy2: discardProxy2, + heytingAlgebraProxy2: heytingAlgebraProxy2, + ringProxy2: ringProxy2, + semigroupProxy2: semigroupProxy2, + semiringProxy2: semiringProxy2, + showProxy2: showProxy2, + eqProxy3: eqProxy3, + ordProxy3: ordProxy3, + booleanAlgebraProxy3: booleanAlgebraProxy3, + boundedProxy3: boundedProxy3, + commutativeRingProxy3: commutativeRingProxy3, + discardProxy3: discardProxy3, + heytingAlgebraProxy3: heytingAlgebraProxy3, + ringProxy3: ringProxy3, + semigroupProxy3: semigroupProxy3, + semiringProxy3: semiringProxy3, + showProxy3: showProxy3 +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.BooleanAlgebra/index.js":"e7y+","../Data.Bounded/index.js":"kcUU","../Data.CommutativeRing/index.js":"60TQ","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Ring/index.js":"E2qH","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7"}],"aDiV":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Monad_Except = require("../Control.Monad.Except/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Generic_Rep = require("../Data.Generic.Rep/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_List = require("../Data.List/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Data_Void = require("../Data.Void/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var Foreign_Generic_Internal = require("../Foreign.Generic.Internal/index.js"); + +var Foreign_Index = require("../Foreign.Index/index.js"); + +var Foreign_NullOrUndefined = require("../Foreign.NullOrUndefined/index.js"); + +var Foreign_Object = require("../Foreign.Object/index.js"); + +var Record = require("../Record/index.js"); + +var Record_Builder = require("../Record.Builder/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var Type_Proxy = require("../Type.Proxy/index.js"); + +var TaggedObject = function () { + function TaggedObject(value0) { + this.value0 = value0; + } + + ; + + TaggedObject.create = function (value0) { + return new TaggedObject(value0); + }; + + return TaggedObject; +}(); + +var GenericEncodeArgs = function GenericEncodeArgs(encodeArgs) { + this.encodeArgs = encodeArgs; +}; + +var GenericEncode = function GenericEncode(encodeOpts) { + this.encodeOpts = encodeOpts; +}; + +var GenericDecodeArgs = function GenericDecodeArgs(decodeArgs) { + this.decodeArgs = decodeArgs; +}; + +var GenericDecode = function GenericDecode(decodeOpts) { + this.decodeOpts = decodeOpts; +}; + +var GenericCountArgs = function GenericCountArgs(countArgs) { + this.countArgs = countArgs; +}; + +var EncodeWithOptions = function EncodeWithOptions(encodeWithOptions) { + this.encodeWithOptions = encodeWithOptions; +}; + +var EncodeRecord = function EncodeRecord(encodeRecordWithOptions) { + this.encodeRecordWithOptions = encodeRecordWithOptions; +}; + +var Encode = function Encode(encode) { + this.encode = encode; +}; + +var DecodeWithOptions = function DecodeWithOptions(decodeWithOptions) { + this.decodeWithOptions = decodeWithOptions; +}; + +var DecodeRecord = function DecodeRecord(decodeRecordWithOptions) { + this.decodeRecordWithOptions = decodeRecordWithOptions; +}; + +var Decode = function Decode(decode) { + this.decode = decode; +}; + +var voidEncode = new Encode(Data_Void.absurd); +var voidDecode = new Decode(function (v) { + return Control_Monad_Except_Trans.except(Data_Identity.applicativeIdentity)(new Data_Either.Left(Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList)(new Foreign.ForeignError("Decode: void")))); +}); +var unitEncode = new Encode(function (v) { + return Foreign.unsafeToForeign({}); +}); +var unitDecode = new Decode(function (v) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Unit.unit); +}); +var stringEncode = new Encode(Foreign.unsafeToForeign); +var stringDecode = new Decode(Foreign.readString); +var numberEncode = new Encode(Foreign.unsafeToForeign); +var numberDecode = new Decode(Foreign.readNumber); +var intEncode = new Encode(Foreign.unsafeToForeign); +var intDecode = new Decode(Foreign.readInt); +var genericEncodeArgsNoArguments = new GenericEncodeArgs(function (v) { + return Data_Monoid.mempty(Data_Monoid.monoidFn(Data_List_Types.monoidList)); +}); +var genericDecodeNoConstructors = new GenericDecode(function (opts) { + return function (v) { + return Foreign.fail(new Foreign.ForeignError("No constructors")); + }; +}); +var genericDecodeArgsNoArguments = new GenericDecodeArgs(function (v) { + return function (v1) { + return function (v2) { + if (v2 instanceof Data_List_Types.Nil) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({ + result: Data_Generic_Rep.NoArguments.value, + rest: Data_List_Types.Nil.value, + next: v1 + }); + } + + ; + return Foreign.fail(new Foreign.ForeignError("Too many constructor arguments")); + }; + }; +}); +var genericCountArgsNoArguments = new GenericCountArgs(function (v) { + return new Data_Either.Left(Data_Generic_Rep.NoArguments.value); +}); +var genericCountArgsArgument = new GenericCountArgs(function (v) { + return new Data_Either.Right(1); +}); +var foreignEncode = new Encode(Control_Category.identity(Control_Category.categoryFn)); +var foreignDecode = new Decode(Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))); + +var encodeWithOptions = function encodeWithOptions(dict) { + return dict.encodeWithOptions; +}; + +var genericEncodeArgsArgument = function genericEncodeArgsArgument(dictEncodeWithOptions) { + return new GenericEncodeArgs(function (opts) { + return function (v) { + return Data_List.singleton(encodeWithOptions(dictEncodeWithOptions)(opts)(v)); + }; + }); +}; + +var encodeRecordWithOptions = function encodeRecordWithOptions(dict) { + return dict.encodeRecordWithOptions; +}; + +var encodeWithOptionsRecord = function encodeWithOptionsRecord(dictRowToList) { + return function (dictEncodeRecord) { + return new EncodeWithOptions(function (opts) { + var $164 = encodeRecordWithOptions(dictEncodeRecord)(Type_Data_RowList.RLProxy.value)(opts); + return function ($165) { + return Foreign.unsafeToForeign($164($165)); + }; + }); + }; +}; + +var encodeRecordNil = new EncodeRecord(function (v) { + return function (v1) { + return function (v2) { + return Foreign_Object.empty; + }; + }; +}); + +var encodeRecordCons = function encodeRecordCons(dictCons) { + return function (dictEncodeRecord) { + return function (dictIsSymbol) { + return function (dictEncodeWithOptions) { + return new EncodeRecord(function (v) { + return function (opts) { + return function (rec) { + var obj = encodeRecordWithOptions(dictEncodeRecord)(Type_Data_RowList.RLProxy.value)(opts)(rec); + var l = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + return Foreign_Object.insert(opts.fieldTransform(l))(encodeWithOptions(dictEncodeWithOptions)(opts)(Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(rec)))(obj); + }; + }; + }); + }; + }; + }; +}; + +var encodeOpts = function encodeOpts(dict) { + return dict.encodeOpts; +}; + +var genericEncodeNoConstructors = new GenericEncode(function (opts) { + return function (a) { + return encodeOpts(genericEncodeNoConstructors)(opts)(a); + }; +}); + +var genericEncodeSum = function genericEncodeSum(dictGenericEncode) { + return function (dictGenericEncode1) { + return new GenericEncode(function (opts) { + return function (v) { + if (v instanceof Data_Generic_Rep.Inl) { + return encodeOpts(dictGenericEncode)({ + sumEncoding: opts.sumEncoding, + unwrapSingleConstructors: false, + unwrapSingleArguments: opts.unwrapSingleArguments, + fieldTransform: opts.fieldTransform + })(v.value0); + } + + ; + + if (v instanceof Data_Generic_Rep.Inr) { + return encodeOpts(dictGenericEncode1)({ + sumEncoding: opts.sumEncoding, + unwrapSingleConstructors: false, + unwrapSingleArguments: opts.unwrapSingleArguments, + fieldTransform: opts.fieldTransform + })(v.value0); + } + + ; + throw new Error("Failed pattern match at Foreign.Generic.Class (line 351, column 1 - line 355, column 85): " + [opts.constructor.name, v.constructor.name]); + }; + }); + }; +}; + +var encodeArgs = function encodeArgs(dict) { + return dict.encodeArgs; +}; + +var genericEncodeArgsProduct = function genericEncodeArgsProduct(dictGenericEncodeArgs) { + return function (dictGenericEncodeArgs1) { + return new GenericEncodeArgs(function (opts) { + return function (v) { + return Data_Semigroup.append(Data_List_Types.semigroupList)(encodeArgs(dictGenericEncodeArgs)(opts)(v.value0))(encodeArgs(dictGenericEncodeArgs1)(opts)(v.value1)); + }; + }); + }; +}; + +var genericEncodeConstructor = function genericEncodeConstructor(dictIsSymbol) { + return function (dictGenericEncodeArgs) { + return new GenericEncode(function (opts) { + return function (v) { + var unwrapArguments = function unwrapArguments(v1) { + if (v1.length === 0) { + return Data_Maybe.Nothing.value; + } + + ; + + if (v1.length === 1 && opts.unwrapSingleArguments) { + return new Data_Maybe.Just(v1[0]); + } + + ; + return new Data_Maybe.Just(Foreign.unsafeToForeign(v1)); + }; + + var encodeArgsArray = function () { + var $166 = Data_List.toUnfoldable(Data_Unfoldable.unfoldableArray); + var $167 = encodeArgs(dictGenericEncodeArgs)(opts); + return function ($168) { + return unwrapArguments($166($167($168))); + }; + }(); + + var ctorName = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + + if (opts.unwrapSingleConstructors) { + return Data_Maybe.maybe(Foreign.unsafeToForeign({}))(Foreign.unsafeToForeign)(encodeArgsArray(v)); + } + + ; + return Foreign.unsafeToForeign(Foreign_Object.union(Foreign_Object.singleton(opts.sumEncoding.value0.tagFieldName)(Foreign.unsafeToForeign(opts.sumEncoding.value0.constructorTagTransform(ctorName))))(Data_Maybe.maybe(Foreign_Object.empty)(Foreign_Object.singleton(opts.sumEncoding.value0.contentsFieldName))(encodeArgsArray(v)))); + }; + }); + }; +}; + +var encode = function encode(dict) { + return dict.encode; +}; + +var encodeWithOptionsOther = function encodeWithOptionsOther(dictEncode) { + return new EncodeWithOptions(function (v) { + return encode(dictEncode); + }); +}; + +var identityEncode = function identityEncode(dictEncode) { + return new Encode(function () { + var $169 = encode(dictEncode); + var $170 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity); + return function ($171) { + return $169($170($171)); + }; + }()); +}; + +var maybeEncode = function maybeEncode(dictEncode) { + return new Encode(Data_Maybe.maybe(Foreign_NullOrUndefined["null"])(encode(dictEncode))); +}; + +var objectEncode = function objectEncode(dictEncode) { + return new Encode(function () { + var $172 = Foreign_Object.mapWithKey(function (v) { + return encode(dictEncode); + }); + return function ($173) { + return Foreign.unsafeToForeign($172($173)); + }; + }()); +}; + +var defaultOptions = { + sumEncoding: new TaggedObject({ + tagFieldName: "tag", + contentsFieldName: "contents", + constructorTagTransform: Control_Category.identity(Control_Category.categoryFn) + }), + unwrapSingleConstructors: false, + unwrapSingleArguments: true, + fieldTransform: Control_Category.identity(Control_Category.categoryFn) +}; + +var recordEncode = function recordEncode(dictRowToList) { + return function (dictEncodeRecord) { + return new Encode(encodeWithOptions(encodeWithOptionsRecord(dictRowToList)(dictEncodeRecord))(defaultOptions)); + }; +}; + +var decodeWithOptions = function decodeWithOptions(dict) { + return dict.decodeWithOptions; +}; + +var genericDecodeArgsArgument = function genericDecodeArgsArgument(dictDecodeWithOptions) { + return new GenericDecodeArgs(function (v) { + return function (v1) { + return function (v2) { + if (v2 instanceof Data_List_Types.Cons) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtIndex.create(v1))))(decodeWithOptions(dictDecodeWithOptions)(v)(v2.value0)))(function (v3) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({ + result: v3, + rest: v2.value1, + next: v1 + 1 | 0 + }); + }); + } + + ; + return Foreign.fail(new Foreign.ForeignError("Not enough constructor arguments")); + }; + }; + }); +}; + +var decodeRecordWithOptions = function decodeRecordWithOptions(dict) { + return dict.decodeRecordWithOptions; +}; + +var decodeWithOptionsRecord = function decodeWithOptionsRecord(dictRowToList) { + return function (dictDecodeRecord) { + return new DecodeWithOptions(function (opts) { + return Data_Functor.map(Data_Functor.functorFn)(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Function.flip(Record_Builder.build)({})))(decodeRecordWithOptions(dictDecodeRecord)(Type_Data_RowList.RLProxy.value)(opts)); + }); + }; +}; + +var recordDecode = function recordDecode(dictRowToList) { + return function (dictDecodeRecord) { + return new Decode(decodeWithOptions(decodeWithOptionsRecord(dictRowToList)(dictDecodeRecord))(defaultOptions)); + }; +}; + +var decodeRecordNil = new DecodeRecord(function (v) { + return function (v1) { + return function (v2) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Control_Category.identity(Record_Builder.categoryBuilder)); + }; + }; +}); + +var decodeRecordCons = function decodeRecordCons(dictCons) { + return function (dictDecodeRecord) { + return function (dictIsSymbol) { + return function (dictDecodeWithOptions) { + return function (dictLacks) { + return new DecodeRecord(function (v) { + return function (opts) { + return function (f) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeRecordWithOptions(dictDecodeRecord)(Type_Data_RowList.RLProxy.value)(opts)(f))(function (v1) { + var l = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var l_transformed = opts.fieldTransform(l); + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign_Index.index(Foreign_Index.indexString)(f)(l_transformed))(function (v2) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtProperty.create(l_transformed))))(decodeWithOptions(dictDecodeWithOptions)(opts)(v2)))(function (v3) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Control_Semigroupoid.composeFlipped(Record_Builder.semigroupoidBuilder)(v1)(Record_Builder.insert(dictCons)(dictLacks)(dictIsSymbol)(Data_Symbol.SProxy.value)(v3))); + }); + }); + }); + }; + }; + }); + }; + }; + }; + }; +}; + +var decodeOpts = function decodeOpts(dict) { + return dict.decodeOpts; +}; + +var genericDecodeSum = function genericDecodeSum(dictGenericDecode) { + return function (dictGenericDecode1) { + return new GenericDecode(function (opts) { + return function (f) { + var opts$prime = { + unwrapSingleConstructors: false, + fieldTransform: opts.fieldTransform, + sumEncoding: opts.sumEncoding, + unwrapSingleArguments: opts.unwrapSingleArguments + }; + return Control_Alt.alt(Control_Monad_Except_Trans.altExceptT(Data_List_Types.semigroupNonEmptyList)(Data_Identity.monadIdentity))(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.Inl.create)(decodeOpts(dictGenericDecode)(opts$prime)(f)))(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.Inr.create)(decodeOpts(dictGenericDecode1)(opts$prime)(f))); + }; + }); + }; +}; + +var decodeArgs = function decodeArgs(dict) { + return dict.decodeArgs; +}; + +var genericDecodeArgsProduct = function genericDecodeArgsProduct(dictGenericDecodeArgs) { + return function (dictGenericDecodeArgs1) { + return new GenericDecodeArgs(function (opts) { + return function (i) { + return function (xs) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs)(opts)(i)(xs))(function (v) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs1)(opts)(v.next)(v.rest))(function (v1) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({ + result: new Data_Generic_Rep.Product(v.result, v1.result), + rest: v1.rest, + next: v1.next + }); + }); + }); + }; + }; + }); + }; +}; + +var decode = function decode(dict) { + return dict.decode; +}; + +var decodeWithOptionsOther = function decodeWithOptionsOther(dictDecode) { + return new DecodeWithOptions(function (v) { + return decode(dictDecode); + }); +}; + +var identityDecode = function identityDecode(dictDecode) { + return new Decode(function () { + var $174 = Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Identity.Identity); + var $175 = decode(dictDecode); + return function ($176) { + return $174($175($176)); + }; + }()); +}; + +var maybeDecode = function maybeDecode(dictDecode) { + return new Decode(Foreign_NullOrUndefined.readNullOrUndefined(decode(dictDecode))); +}; + +var objectDecode = function objectDecode(dictDecode) { + return new Decode(Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(function () { + var $177 = Data_Traversable.sequence(Foreign_Object.traversableObject)(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity)); + var $178 = Foreign_Object.mapWithKey(function (v) { + return decode(dictDecode); + }); + return function ($179) { + return $177($178($179)); + }; + }())(Foreign_Generic_Internal.readObject)); +}; + +var countArgs = function countArgs(dict) { + return dict.countArgs; +}; + +var genericCountArgsProduct = function genericCountArgsProduct(dictGenericCountArgs) { + return function (dictGenericCountArgs1) { + return new GenericCountArgs(function (v) { + var v1 = countArgs(dictGenericCountArgs1)(Type_Proxy["Proxy"].value); + var v2 = countArgs(dictGenericCountArgs)(Type_Proxy["Proxy"].value); + + if (v2 instanceof Data_Either.Left && v1 instanceof Data_Either.Left) { + return new Data_Either.Left(new Data_Generic_Rep.Product(v2.value0, v1.value0)); + } + + ; + + if (v2 instanceof Data_Either.Left && v1 instanceof Data_Either.Right) { + return new Data_Either.Right(v1.value0); + } + + ; + + if (v2 instanceof Data_Either.Right && v1 instanceof Data_Either.Left) { + return new Data_Either.Right(v2.value0); + } + + ; + + if (v2 instanceof Data_Either.Right && v1 instanceof Data_Either.Right) { + return new Data_Either.Right(v2.value0 + v1.value0 | 0); + } + + ; + throw new Error("Failed pattern match at Foreign.Generic.Class (line 400, column 5 - line 404, column 40): " + [v2.constructor.name, v1.constructor.name]); + }); + }; +}; + +var genericDecodeConstructor = function genericDecodeConstructor(dictIsSymbol) { + return function (dictGenericDecodeArgs) { + return function (dictGenericCountArgs) { + return new GenericDecode(function (opts) { + return function (f) { + var numArgs = countArgs(dictGenericCountArgs)(Type_Proxy["Proxy"].value); + + var readArguments = function readArguments(args) { + if (numArgs instanceof Data_Either.Left) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(numArgs.value0); + } + + ; + + if (numArgs instanceof Data_Either.Right && numArgs.value0 === 1 && opts.unwrapSingleArguments) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs)(opts)(0)(Data_List.singleton(args)))(function (v) { + return Control_Bind.discard(Control_Bind.discardUnit)(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Applicative.unless(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_List["null"](v.rest))(Foreign.fail(new Foreign.ForeignError("Expected a single argument"))))(function () { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(v.result); + }); + }); + } + + ; + + if (numArgs instanceof Data_Either.Right) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign.readArray(args))(function (v) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs)(opts)(0)(Data_List.fromFoldable(Data_Foldable.foldableArray)(v)))(function (v1) { + return Control_Bind.discard(Control_Bind.discardUnit)(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Applicative.unless(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_List["null"](v1.rest))(Foreign.fail(new Foreign.ForeignError("Expected " + (Data_Show.show(Data_Show.showInt)(numArgs.value0) + " constructor arguments")))))(function () { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(v1.result); + }); + }); + }); + } + + ; + throw new Error("Failed pattern match at Foreign.Generic.Class (line 307, column 9 - line 319, column 24): " + [numArgs.constructor.name]); + }; + + var ctorName = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + + if (opts.unwrapSingleConstructors) { + return Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.Constructor)(readArguments(f)); + } + + ; + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtProperty.create(opts.sumEncoding.value0.tagFieldName))))(Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign_Index.index(Foreign_Index.indexString)(f)(opts.sumEncoding.value0.tagFieldName))(Foreign.readString))(function (v) { + var expected = opts.sumEncoding.value0.constructorTagTransform(ctorName); + return Control_Bind.discard(Control_Bind.discardUnit)(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Applicative.unless(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(v === expected)(Foreign.fail(new Foreign.ForeignError("Expected " + (Data_Show.show(Data_Show.showString)(expected) + " tag")))))(function () { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(v); + }); + })))(function (v) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtProperty.create(opts.sumEncoding.value0.contentsFieldName))))(Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign_Index.index(Foreign_Index.indexString)(f)(opts.sumEncoding.value0.contentsFieldName))(readArguments)))(function (v1) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(v1); + }); + }); + }; + }); + }; + }; +}; + +var charEncode = new Encode(Foreign.unsafeToForeign); +var charDecode = new Decode(Foreign.readChar); +var booleanEncode = new Encode(Foreign.unsafeToForeign); +var booleanDecode = new Decode(Foreign.readBoolean); + +var arrayEncode = function arrayEncode(dictEncode) { + return new Encode(function () { + var $180 = Data_Functor.map(Data_Functor.functorArray)(encode(dictEncode)); + return function ($181) { + return Foreign.unsafeToForeign($180($181)); + }; + }()); +}; + +var arrayDecode = function arrayDecode(dictDecode) { + return new Decode(function () { + var readElement = function readElement(i) { + return function (value) { + return Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtIndex.create(i))))(decode(dictDecode)(value)); + }; + }; + + var readElements = function readElements(arr) { + return Data_Traversable.sequence(Data_Traversable.traversableArray)(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Array.zipWith(readElement)(Data_Array.range(0)(Data_Array.length(arr)))(arr)); + }; + + return Control_Bind.composeKleisli(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign.readArray)(readElements); + }()); +}; + +module.exports = { + countArgs: countArgs, + decode: decode, + decodeArgs: decodeArgs, + decodeOpts: decodeOpts, + decodeRecordWithOptions: decodeRecordWithOptions, + decodeWithOptions: decodeWithOptions, + encode: encode, + encodeArgs: encodeArgs, + encodeOpts: encodeOpts, + encodeRecordWithOptions: encodeRecordWithOptions, + encodeWithOptions: encodeWithOptions, + TaggedObject: TaggedObject, + defaultOptions: defaultOptions, + Decode: Decode, + Encode: Encode, + DecodeWithOptions: DecodeWithOptions, + EncodeWithOptions: EncodeWithOptions, + DecodeRecord: DecodeRecord, + EncodeRecord: EncodeRecord, + GenericDecode: GenericDecode, + GenericEncode: GenericEncode, + GenericDecodeArgs: GenericDecodeArgs, + GenericEncodeArgs: GenericEncodeArgs, + GenericCountArgs: GenericCountArgs, + voidDecode: voidDecode, + unitDecode: unitDecode, + foreignDecode: foreignDecode, + stringDecode: stringDecode, + charDecode: charDecode, + booleanDecode: booleanDecode, + numberDecode: numberDecode, + intDecode: intDecode, + identityDecode: identityDecode, + arrayDecode: arrayDecode, + maybeDecode: maybeDecode, + objectDecode: objectDecode, + recordDecode: recordDecode, + voidEncode: voidEncode, + unitEncode: unitEncode, + foreignEncode: foreignEncode, + stringEncode: stringEncode, + charEncode: charEncode, + booleanEncode: booleanEncode, + numberEncode: numberEncode, + intEncode: intEncode, + identityEncode: identityEncode, + arrayEncode: arrayEncode, + maybeEncode: maybeEncode, + objectEncode: objectEncode, + recordEncode: recordEncode, + decodeWithOptionsRecord: decodeWithOptionsRecord, + decodeWithOptionsOther: decodeWithOptionsOther, + encodeWithOptionsRecord: encodeWithOptionsRecord, + encodeWithOptionsOther: encodeWithOptionsOther, + decodeRecordNil: decodeRecordNil, + encodeRecordNil: encodeRecordNil, + decodeRecordCons: decodeRecordCons, + encodeRecordCons: encodeRecordCons, + genericDecodeNoConstructors: genericDecodeNoConstructors, + genericEncodeNoConstructors: genericEncodeNoConstructors, + genericDecodeConstructor: genericDecodeConstructor, + genericEncodeConstructor: genericEncodeConstructor, + genericDecodeSum: genericDecodeSum, + genericEncodeSum: genericEncodeSum, + genericDecodeArgsNoArguments: genericDecodeArgsNoArguments, + genericEncodeArgsNoArguments: genericEncodeArgsNoArguments, + genericDecodeArgsArgument: genericDecodeArgsArgument, + genericEncodeArgsArgument: genericEncodeArgsArgument, + genericDecodeArgsProduct: genericDecodeArgsProduct, + genericEncodeArgsProduct: genericEncodeArgsProduct, + genericCountArgsNoArguments: genericCountArgsNoArguments, + genericCountArgsArgument: genericCountArgsArgument, + genericCountArgsProduct: genericCountArgsProduct +}; +},{"../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad.Except/index.js":"Fye2","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Semigroupoid/index.js":"/riR","../Data.Array/index.js":"4t4C","../Data.Bifunctor/index.js":"e2Wc","../Data.Either/index.js":"B2JL","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Generic.Rep/index.js":"AuzG","../Data.Identity/index.js":"2OKT","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Symbol/index.js":"4oJQ","../Data.Traversable/index.js":"n7EE","../Data.Unfoldable/index.js":"77+Z","../Data.Unit/index.js":"NhVk","../Data.Void/index.js":"bncE","../Foreign/index.js":"pu1p","../Foreign.Generic.Internal/index.js":"71qG","../Foreign.Index/index.js":"Ryy1","../Foreign.NullOrUndefined/index.js":"k5yP","../Foreign.Object/index.js":"jsiz","../Record/index.js":"0gG4","../Record.Builder/index.js":"VeY4","../Type.Data.RowList/index.js":"XaXP","../Type.Proxy/index.js":"ZOFT"}],"HhmG":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_CommutativeRing = require("../Data.CommutativeRing/index.js"); + +var Data_DivisionRing = require("../Data.DivisionRing/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_EuclideanRing = require("../Data.EuclideanRing/index.js"); + +var Data_Lens_Getter = require("../Data.Lens.Getter/index.js"); + +var Data_Lens_Iso = require("../Data.Lens.Iso/index.js"); + +var Data_Lens_Iso_Newtype = require("../Data.Lens.Iso.Newtype/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Number_Format = require("../Data.Number.Format/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_String_CodeUnits = require("../Data.String.CodeUnits/index.js"); + +var Data_String_Common = require("../Data.String.Common/index.js"); + +var Data_String_Pattern = require("../Data.String.Pattern/index.js"); + +var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js"); + +var $$Math = require("../Math/index.js"); + +var NegLog10 = function NegLog10(x) { + return x; +}; + +var ChrId = function ChrId(x) { + return x; +}; + +var Bp = function Bp(x) { + return x; +}; + +var showChrId = new Data_Show.Show(function (v) { + return v; +}); +var showBp = new Data_Show.Show(function (v) { + return Data_Number_Format.toStringWith(Data_Number_Format.fixed(0))(v) + " Bp"; +}); +var semiringBp = Data_Semiring.semiringNumber; +var ringBp = Data_Ring.ringNumber; +var ordBp = Data_Ord.ordNumber; +var newtypeNegLog10 = new Data_Newtype.Newtype(function (n) { + return n; +}, NegLog10); +var newtypeChrId = new Data_Newtype.Newtype(function (n) { + return n; +}, ChrId); + +var validChrId = function validChrId(chr) { + var chr$prime = Data_String_Common.toLower(Data_Newtype.unwrap(newtypeChrId)(chr)); + var v = Data_String_CodeUnits.stripPrefix(Data_Newtype.wrap(Data_String_Pattern.newtypePattern)("chr"))(chr$prime); + + if (v instanceof Data_Maybe.Nothing) { + return Data_Newtype.wrap(newtypeChrId)("chr" + chr$prime); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return Data_Newtype.wrap(newtypeChrId)(v.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Types (line 54, column 6 - line 56, column 27): " + [v.constructor.name]); +}; + +var newtypeBp = new Data_Newtype.Newtype(function (n) { + return n; +}, Bp); +var euclideanRingBp = Data_EuclideanRing.euclideanRingNumber; +var eqChrId = new Data_Eq.Eq(function (chrA) { + return function (chrB) { + var v = validChrId(chrA); + var v1 = validChrId(chrB); + return v === v1; + }; +}); +var ordChrId = new Data_Ord.Ord(function () { + return eqChrId; +}, function (chrA) { + return function (chrB) { + var v = validChrId(chrA); + var v1 = validChrId(chrB); + return Data_Ord.compare(Data_Ord.ordString)(v)(v1); + }; +}); +var eqBp = Data_Eq.eqNumber; +var encodeChrId = Foreign_Generic_Class.stringEncode; +var encodeBp = Foreign_Generic_Class.numberEncode; +var divisionRingBp = Data_DivisionRing.divisionringNumber; +var decodeChrId = Foreign_Generic_Class.stringDecode; +var decodeBp = Foreign_Generic_Class.numberDecode; +var commutativeRingBp = Data_CommutativeRing.commutativeRingNumber; + +var chrId = function chrId(str) { + var str$prime = Data_String_Common.toLower(str); + var v = Data_String_CodeUnits.stripPrefix(Data_Newtype.wrap(Data_String_Pattern.newtypePattern)("chr"))(str$prime); + + if (v instanceof Data_Maybe.Nothing) { + return Data_Newtype.wrap(newtypeChrId)("chr" + str$prime); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return Data_Newtype.wrap(newtypeChrId)(v.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Types (line 47, column 6 - line 49, column 28): " + [v.constructor.name]); +}; + +var _prec = function _prec(i) { + return Data_Lens_Getter.to(Data_Number_Format.toStringWith(Data_Number_Format.precision(i))); +}; + +var _fixed = function _fixed(i) { + return Data_Lens_Getter.to(Data_Number_Format.toStringWith(Data_Number_Format.fixed(i))); +}; + +var _exp = function _exp(i) { + return Data_Lens_Getter.to(Data_Number_Format.toStringWith(Data_Number_Format.exponential(i))); +}; + +var _NegLog10 = function _NegLog10(dictProfunctor) { + var to = function to(p) { + return Data_Newtype.wrap(newtypeNegLog10)(-($$Math.log(p) / $$Math.ln10)); + }; + + var from = function from(v) { + return $$Math.pow(10.0)(-v); + }; + + return Data_Lens_Iso.iso(to)(from)(dictProfunctor); +}; + +var _ChrId = function _ChrId(dictProfunctor) { + return Data_Lens_Iso_Newtype["_Newtype"](newtypeChrId)(newtypeChrId)(dictProfunctor); +}; + +var _Bp = function _Bp(dictProfunctor) { + return Data_Lens_Iso_Newtype["_Newtype"](newtypeBp)(newtypeBp)(dictProfunctor); +}; + +module.exports = { + Bp: Bp, + "_Bp": _Bp, + ChrId: ChrId, + chrId: chrId, + validChrId: validChrId, + "_ChrId": _ChrId, + NegLog10: NegLog10, + "_NegLog10": _NegLog10, + "_prec": _prec, + "_fixed": _fixed, + "_exp": _exp, + newtypeBp: newtypeBp, + eqBp: eqBp, + ordBp: ordBp, + semiringBp: semiringBp, + ringBp: ringBp, + divisionRingBp: divisionRingBp, + euclideanRingBp: euclideanRingBp, + commutativeRingBp: commutativeRingBp, + encodeBp: encodeBp, + decodeBp: decodeBp, + showBp: showBp, + newtypeChrId: newtypeChrId, + eqChrId: eqChrId, + ordChrId: ordChrId, + encodeChrId: encodeChrId, + decodeChrId: decodeChrId, + showChrId: showChrId, + newtypeNegLog10: newtypeNegLog10 +}; +},{"../Data.CommutativeRing/index.js":"60TQ","../Data.DivisionRing/index.js":"xYq2","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Lens.Getter/index.js":"OPOX","../Data.Lens.Iso/index.js":"fFCp","../Data.Lens.Iso.Newtype/index.js":"CiFJ","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.Number.Format/index.js":"VX77","../Data.Ord/index.js":"r4Vb","../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.String.CodeUnits/index.js":"6c6X","../Data.String.Common/index.js":"OSrc","../Data.String.Pattern/index.js":"nKWe","../Foreign.Generic.Class/index.js":"aDiV","../Math/index.js":"Rpaz"}],"7rcn":[function(require,module,exports) { +/* globals exports, JSON */ +"use strict"; + +exports.unsafeStringify = function (x) { + return JSON.stringify(x); +}; + +exports.unsafeToFixed = function (digits) { + return function (n) { + return n.toFixed(digits); + }; +}; + +exports.unsafeToExponential = function (digits) { + return function (n) { + return n.toExponential(digits); + }; +}; + +exports.unsafeToPrecision = function (digits) { + return function (n) { + return n.toPrecision(digits); + }; +}; + +exports.unsafeDecodeURI = decodeURI; +exports.unsafeEncodeURI = encodeURI; +exports.unsafeDecodeURIComponent = decodeURIComponent; +exports.unsafeEncodeURIComponent = encodeURIComponent; +},{}],"qSZP":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +module.exports = { + unsafeStringify: $foreign.unsafeStringify, + unsafeToFixed: $foreign.unsafeToFixed, + unsafeToExponential: $foreign.unsafeToExponential, + unsafeToPrecision: $foreign.unsafeToPrecision, + unsafeDecodeURI: $foreign.unsafeDecodeURI, + unsafeEncodeURI: $foreign.unsafeEncodeURI, + unsafeDecodeURIComponent: $foreign.unsafeDecodeURIComponent, + unsafeEncodeURIComponent: $foreign.unsafeEncodeURIComponent +}; +},{"./foreign.js":"7rcn"}],"7bYH":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_BigInt = require("../Data.BigInt/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_EuclideanRing = require("../Data.EuclideanRing/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Generic_Rep = require("../Data.Generic.Rep/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Lens_Getter = require("../Data.Lens.Getter/index.js"); + +var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js"); + +var Data_Lens_Iso_Newtype = require("../Data.Lens.Iso.Newtype/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Map_Internal = require("../Data.Map.Internal/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Pair = require("../Data.Pair/index.js"); + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var Foreign_Index = require("../Foreign.Index/index.js"); + +var Genetics_Browser_Types = require("../Genetics.Browser.Types/index.js"); + +var Global_Unsafe = require("../Global.Unsafe/index.js"); + +var ViewScale = function ViewScale(x) { + return x; +}; + +var Normalized = function Normalized(x) { + return x; +}; + +var CoordSysView = function CoordSysView(x) { + return x; +}; + +var CoordSys = function CoordSys(x) { + return x; +}; + +var xPerPixel = function xPerPixel(v) { + return Data_BigInt.toNumber(v.coordWidth) / v.pixelWidth; +}; + +var showViewScale = Global_Unsafe.unsafeStringify; + +var scaleToScreen = function scaleToScreen(v) { + return function (x) { + return Data_BigInt.toNumber(x) * (v.pixelWidth / Data_BigInt.toNumber(v.coordWidth)); + }; +}; + +var pairsOverlap = function pairsOverlap(dictOrd) { + return function (v) { + return function (v1) { + var v2 = new Data_Pair.Pair(Data_Ord.min(dictOrd)(v.value0)(v1.value0), Data_Ord.min(dictOrd)(v.value1)(v1.value1)); + var v3 = new Data_Pair.Pair(Data_Ord.max(dictOrd)(v.value0)(v1.value0), Data_Ord.max(dictOrd)(v.value1)(v1.value1)); + return Data_Ord.greaterThanOrEq(dictOrd)(v2.value1)(v3.value0); + }; + }; +}; + +var pairSize = function pairSize(dictRing) { + return function (v) { + return Data_Ring.sub(dictRing)(v.value1)(v.value0); + }; +}; + +var scalePairBy = function scalePairBy(p) { + return function (x) { + var x$prime = Data_Ord.max(Data_Ord.ordNumber)(0)(x); + var v = Data_Functor.map(Data_Pair.functorPair)(Data_BigInt.toNumber)(p); + var delta = (pairSize(Data_Ring.ringNumber)(v) * x$prime - pairSize(Data_Ring.ringNumber)(v)) / 2.0; + var result = Data_Functor.map(Data_Pair.functorPair)(Data_BigInt.fromNumber)(new Data_Pair.Pair(v.value0 - delta, v.value1 + delta)); + return Data_Functor.map(Data_Pair.functorPair)(Data_Maybe.fromJust())(result); + }; +}; + +var setViewWidth = function setViewWidth(newW) { + return function (v) { + var oldW = pairSize(Data_BigInt.ringBigInt)(v); + var d = Data_EuclideanRing.div(Data_BigInt.euclideanRingBigInt)(Data_Ring.sub(Data_BigInt.ringBigInt)(newW)(oldW))(Data_BigInt.fromInt(2)); + return new Data_Pair.Pair(Data_Ring.sub(Data_BigInt.ringBigInt)(v.value0)(d), Data_Semiring.add(Data_BigInt.semiringBigInt)(v.value1)(d)); + }; +}; + +var translatePairBy = function translatePairBy(p) { + return function (x) { + var delta = Data_Functor.map(Data_Functor.functorFn)(Data_Maybe.fromJust())(Data_BigInt.fromNumber)(x * Data_BigInt.toNumber(pairSize(Data_BigInt.ringBigInt)(p))); + return Data_Functor.map(Data_Pair.functorPair)(function (v) { + return Data_Semiring.add(Data_BigInt.semiringBigInt)(v)(delta); + })(p); + }; +}; + +var viewScale = function viewScale(v) { + return function (v1) { + var coordWidth = pairSize(Data_BigInt.ringBigInt)(v1); + return { + pixelWidth: v.width, + coordWidth: coordWidth + }; + }; +}; + +var normalize = function normalize(dictEuclideanRing) { + return function (x0) { + return function (x1) { + return function (t) { + return Data_EuclideanRing.div(dictEuclideanRing)(Data_Ring.sub(dictEuclideanRing.CommutativeRing0().Ring0())(t)(x0))(Data_Ring.sub(dictEuclideanRing.CommutativeRing0().Ring0())(x1)(x0)); + }; + }; + }; +}; + +var newtypeNormalized = new Data_Newtype.Newtype(function (n) { + return n; +}, Normalized); +var newtypeCoordSys = new Data_Newtype.Newtype(function (n) { + return n; +}, CoordSys); + +var lerp = function lerp(dictRing) { + return function (x0) { + return function (x1) { + return function (t) { + return Data_Semiring.add(dictRing.Semiring0())(Data_Semiring.mul(dictRing.Semiring0())(Data_Ring.sub(dictRing)(Data_Semiring.one(dictRing.Semiring0()))(t))(x0))(Data_Semiring.mul(dictRing.Semiring0())(t)(x1)); + }; + }; + }; +}; + +var genericCoordSys = new Data_Generic_Rep.Generic(function (x) { + return x; +}, function (x) { + return x; +}); +var functorCoordSys = new Data_Functor.Functor(function (f) { + return function (v) { + return CoordSys(Data_Functor.map(Data_Map_Internal.functorMap)(Data_Functor.map(Data_Pair.functorPair)(f))(v)); + }; +}); +var eqViewScale = new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(Data_BigInt.eqBigInt)(x.coordWidth)(y.coordWidth) && x.pixelWidth === y.pixelWidth; + }; +}); +var coordsysviewNewtype = new Data_Newtype.Newtype(function (n) { + return n; +}, CoordSysView); + +var coordSys = function coordSys(dictOrd) { + return function (dictSemiring) { + return function (segs) { + var v = Data_Array.unzip(segs); + + var offsets = function offsets(xs) { + var os = Data_Traversable.scanl(Data_Traversable.traversableArray)(function (x) { + return function (y) { + return Data_Semiring.add(dictSemiring)(x)(y); + }; + })(Data_Semiring.zero(dictSemiring))(xs); + return Data_Array.zipWith(Data_Pair.Pair.create)(Data_Array.cons(Data_Semiring.zero(dictSemiring))(os))(os); + }; + + return CoordSys(Data_Map_Internal.fromFoldable(dictOrd)(Data_Foldable.foldableArray)(Data_Array.zip(v.value0)(offsets(v.value1)))); + }; + }; +}; + +var parseCoordSys = function parseCoordSys(a) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign.readArray(a))(function (v) { + var f = function f(o) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Newtype.wrap(Genetics_Browser_Types.newtypeChrId))(Control_Bind.bindFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign.readString)(Foreign_Index.ix(Foreign_Index.indexableForeign)(Foreign_Index.indexString)(o)("chr"))))(function (v1) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Bind.bindFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(function () { + var $118 = Control_Monad_Except_Trans.except(Data_Identity.applicativeIdentity); + var $119 = Data_Either.note(Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList)(new Foreign.ForeignError("error parsing size for chr"))); + return function ($120) { + return $118($119(Data_BigInt.fromString($120))); + }; + }())(Control_Bind.bindFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign.readString)(Foreign_Index.ix(Foreign_Index.indexableForeign)(Foreign_Index.indexString)(o)("size"))))(function (v2) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Tuple.Tuple(v1, v2)); + }); + }); + }; + + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Data_Traversable.traverse(Data_Traversable.traversableArray)(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(f)(v))(function (v1) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(coordSys(Genetics_Browser_Types.ordChrId)(Data_BigInt.semiringBigInt)(v1)); + }); + }); +}; + +var aroundPair = function aroundPair(dictRing) { + return function (radius) { + return function (v) { + return new Data_Pair.Pair(Data_Ring.sub(dictRing)(v.value0)(radius), Data_Semiring.add(dictRing.Semiring0())(v.value1)(radius)); + }; + }; +}; + +var _Segments = function _Segments(dictStrong) { + return Data_Lens_Iso_Newtype["_Newtype"](newtypeCoordSys)(newtypeCoordSys)(dictStrong.Profunctor0()); +}; + +var _TotalSize = function _TotalSize(dictRing) { + var $121 = _Segments(Data_Lens_Internal_Forget.strongForget); + + var $122 = Data_Lens_Getter.to(Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Newtype.newtypeAdditive)(Data_Newtype.newtypeAdditive)(Data_Monoid_Additive.Additive)(Data_Foldable.foldMap(Data_Map_Internal.foldableMap)(Data_Monoid_Additive.monoidAdditive(dictRing.Semiring0())))(pairSize(dictRing))); + return function ($123) { + return $121($122($123)); + }; +}; + +var normalizeView = function normalizeView(cs) { + return function (minWidth) { + return function (csv) { + var limR = Data_Lens_Getter.viewOn(cs)(_TotalSize(Data_BigInt.ringBigInt)); + var v = Data_Newtype.unwrap(coordsysviewNewtype)(csv); + var width = Data_Ring.sub(Data_BigInt.ringBigInt)(v.value1)(v.value0); + + var v1 = function () { + var v2 = Data_Ord.greaterThan(Data_BigInt.ordBigInt)(v.value1)(limR); + var v3 = Data_Ord.lessThan(Data_BigInt.ordBigInt)(v.value0)(Data_Semiring.zero(Data_BigInt.semiringBigInt)); + + if (v3 && !v2) { + return new Data_Pair.Pair(Data_Semiring.zero(Data_BigInt.semiringBigInt), width); + } + + ; + + if (!v3 && v2) { + return new Data_Pair.Pair(Data_Ring.sub(Data_BigInt.ringBigInt)(limR)(width), limR); + } + + ; + + if (v3 && v2) { + return new Data_Pair.Pair(Data_Semiring.zero(Data_BigInt.semiringBigInt), limR); + } + + ; + + if (!v3 && !v2) { + return new Data_Pair.Pair(v.value0, v.value1); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Coordinates (line 207, column 22 - line 211, column 39): " + [v3.constructor.name, v2.constructor.name]); + }(); + + var vr$prime = setViewWidth(Data_Ord.min(Data_BigInt.ordBigInt)(limR)(Data_Ord.max(Data_BigInt.ordBigInt)(width)(minWidth)))(new Data_Pair.Pair(v1.value0, v1.value1)); + return vr$prime; + }; + }; +}; + +var scaledSegments = function scaledSegments(cs) { + return function (scale) { + return Data_Functor.map(Data_Map_Internal.functorMap)(Data_Functor.map(Data_Pair.functorPair)(scaleToScreen(scale)))(Data_Lens_Getter.viewOn(cs)(_Segments(Data_Lens_Internal_Forget.strongForget))); + }; +}; + +var segmentsInPair = function segmentsInPair(dictOrd) { + return function (dictOrd1) { + return function (cs) { + return function (v) { + var f = function f(v1) { + if (Data_Ord.lessThan(dictOrd1)(v1.value0)(v.value0) && Data_Ord.greaterThan(dictOrd1)(v1.value1)(v.value1)) { + return true; + } + + ; + + if (Data_Ord.lessThan(dictOrd1)(v1.value0)(v.value0) && Data_Ord.lessThan(dictOrd1)(v1.value1)(v.value0)) { + return false; + } + + ; + + if (Data_Ord.greaterThan(dictOrd1)(v1.value0)(v.value1) && Data_Ord.greaterThan(dictOrd1)(v1.value1)(v.value1)) { + return false; + } + + ; + + if (Data_Boolean.otherwise) { + return true; + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Coordinates (line 167, column 9 - line 171, column 29): " + [v1.constructor.name]); + }; + + return Data_Map_Internal.filter(dictOrd)(f)(Data_Lens_Getter.viewOn(cs)(_Segments(Data_Lens_Internal_Forget.strongForget))); + }; + }; + }; +}; + +var scaledSegments$prime = function scaledSegments$prime(dictOrd) { + return function (cs) { + return function (csv) { + return function (scale) { + return Data_Functor.map(Data_Map_Internal.functorMap)(Data_Functor.map(Data_Pair.functorPair)(scaleToScreen(scale)))(segmentsInPair(dictOrd)(Data_BigInt.ordBigInt)(cs)(Data_Newtype.unwrap(coordsysviewNewtype)(csv))); + }; + }; + }; +}; + +module.exports = { + CoordSysView: CoordSysView, + pairSize: pairSize, + "_TotalSize": _TotalSize, + normalizeView: normalizeView, + aroundPair: aroundPair, + normalize: normalize, + scalePairBy: scalePairBy, + scaledSegments: scaledSegments, + "scaledSegments'": scaledSegments$prime, + translatePairBy: translatePairBy, + viewScale: viewScale, + xPerPixel: xPerPixel, + "_Segments": _Segments, + pairsOverlap: pairsOverlap, + coordSys: coordSys, + parseCoordSys: parseCoordSys, + scaleToScreen: scaleToScreen, + newtypeNormalized: newtypeNormalized, + functorCoordSys: functorCoordSys, + newtypeCoordSys: newtypeCoordSys, + genericCoordSys: genericCoordSys, + eqViewScale: eqViewScale, + coordsysviewNewtype: coordsysviewNewtype +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Array/index.js":"4t4C","../Data.BigInt/index.js":"Zx+T","../Data.Boolean/index.js":"ObQr","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Foldable/index.js":"eVDl","../Data.Functor/index.js":"+0AE","../Data.Generic.Rep/index.js":"AuzG","../Data.Identity/index.js":"2OKT","../Data.Lens.Getter/index.js":"OPOX","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.Lens.Iso.Newtype/index.js":"CiFJ","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid.Additive/index.js":"fHyj","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Pair/index.js":"PpsX","../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Foreign/index.js":"pu1p","../Foreign.Index/index.js":"Ryy1","../Genetics.Browser.Types/index.js":"HhmG","../Global.Unsafe/index.js":"qSZP"}],"BQGe":[function(require,module,exports) { +exports._parseJSON = JSON.parse; +exports._undefined = undefined; +},{}],"DqNI":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Alt = require("../Control.Alt/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Monad_Except = require("../Control.Monad.Except/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Bifunctor = require("../Data.Bifunctor/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Nullable = require("../Data.Nullable/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js"); + +var Data_Variant = require("../Data.Variant/index.js"); + +var Effect_Exception = require("../Effect.Exception/index.js"); + +var Effect_Uncurried = require("../Effect.Uncurried/index.js"); + +var Effect_Unsafe = require("../Effect.Unsafe/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var Foreign_Index = require("../Foreign.Index/index.js"); + +var Foreign_Object = require("../Foreign.Object/index.js"); + +var Global_Unsafe = require("../Global.Unsafe/index.js"); + +var Partial_Unsafe = require("../Partial.Unsafe/index.js"); + +var Record = require("../Record/index.js"); + +var Record_Builder = require("../Record.Builder/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var WriteForeignVariant = function WriteForeignVariant(writeVariantImpl) { + this.writeVariantImpl = writeVariantImpl; +}; + +var WriteForeignFields = function WriteForeignFields(writeImplFields) { + this.writeImplFields = writeImplFields; +}; + +var WriteForeign = function WriteForeign(writeImpl) { + this.writeImpl = writeImpl; +}; + +var ReadForeignVariant = function ReadForeignVariant(readVariantImpl) { + this.readVariantImpl = readVariantImpl; +}; + +var ReadForeignFields = function ReadForeignFields(getFields) { + this.getFields = getFields; +}; + +var ReadForeign = function ReadForeign(readImpl) { + this.readImpl = readImpl; +}; + +var writeVariantImpl = function writeVariantImpl(dict) { + return dict.writeVariantImpl; +}; + +var writeImplFields = function writeImplFields(dict) { + return dict.writeImplFields; +}; + +var writeImpl = function writeImpl(dict) { + return dict.writeImpl; +}; + +var writeJSON = function writeJSON(dictWriteForeign) { + var $85 = writeImpl(dictWriteForeign); + return function ($86) { + return Global_Unsafe.unsafeStringify($85($86)); + }; +}; + +var writeForeignVariant = function writeForeignVariant(dictRowToList) { + return function (dictWriteForeignVariant) { + return new WriteForeign(function (variant) { + return writeVariantImpl(dictWriteForeignVariant)(Type_Data_RowList.RLProxy.value)(variant); + }); + }; +}; + +var writeForeignString = new WriteForeign(Foreign.unsafeToForeign); + +var writeForeignObject = function writeForeignObject(dictWriteForeign) { + return new WriteForeign(function () { + var $87 = Foreign_Object.mapWithKey(Data_Function["const"](writeImpl(dictWriteForeign))); + return function ($88) { + return Foreign.unsafeToForeign($87($88)); + }; + }()); +}; + +var writeForeignNumber = new WriteForeign(Foreign.unsafeToForeign); + +var writeForeignNullable = function writeForeignNullable(dictWriteForeign) { + return new WriteForeign(function () { + var $89 = Data_Maybe.maybe(Foreign.unsafeToForeign(Data_Nullable.toNullable(Data_Maybe.Nothing.value)))(writeImpl(dictWriteForeign)); + return function ($90) { + return $89(Data_Nullable.toMaybe($90)); + }; + }()); +}; + +var writeForeignInt = new WriteForeign(Foreign.unsafeToForeign); +var writeForeignForeign = new WriteForeign(Control_Category.identity(Control_Category.categoryFn)); +var writeForeignChar = new WriteForeign(Foreign.unsafeToForeign); +var writeForeignBoolean = new WriteForeign(Foreign.unsafeToForeign); + +var writeForeignArray = function writeForeignArray(dictWriteForeign) { + return new WriteForeign(function (xs) { + return Foreign.unsafeToForeign(Data_Functor.map(Data_Functor.functorArray)(writeImpl(dictWriteForeign))(xs)); + }); +}; + +var write = function write(dictWriteForeign) { + return writeImpl(dictWriteForeign); +}; + +var $$undefined = $foreign["_undefined"]; + +var writeForeignMaybe = function writeForeignMaybe(dictWriteForeign) { + return new WriteForeign(Data_Maybe.maybe($$undefined)(writeImpl(dictWriteForeign))); +}; + +var recordWriteForeign = function recordWriteForeign(dictRowToList) { + return function (dictWriteForeignFields) { + return new WriteForeign(function (rec) { + var steps = writeImplFields(dictWriteForeignFields)(Type_Data_RowList.RLProxy.value)(rec); + return Foreign.unsafeToForeign(Record_Builder.build(steps)({})); + }); + }; +}; + +var readVariantNil = new ReadForeignVariant(function (v) { + return function (v1) { + return Foreign.fail(new Foreign.ForeignError("Unable to match any variant member.")); + }; +}); + +var readVariantImpl = function readVariantImpl(dict) { + return dict.readVariantImpl; +}; + +var readString = new ReadForeign(Foreign.readString); +var readNumber = new ReadForeign(Foreign.readNumber); +var readInt = new ReadForeign(Foreign.readInt); + +var readImpl = function readImpl(dict) { + return dict.readImpl; +}; + +var readMaybe = function readMaybe(dictReadForeign) { + return new ReadForeign(function () { + var readNullOrUndefined = function readNullOrUndefined(v) { + return function (value) { + if (Foreign.isNull(value) || Foreign.isUndefined(value)) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value); + } + + ; + return Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Maybe.Just.create)(v(value)); + }; + }; + + return readNullOrUndefined(readImpl(dictReadForeign)); + }()); +}; + +var readNullable = function readNullable(dictReadForeign) { + return new ReadForeign(function (o) { + var reformat = function reformat(error) { + if (error instanceof Foreign.TypeMismatch) { + return new Foreign.TypeMismatch("Nullable " + error.value0, error.value1); + } + + ; + return error; + }; + + return Control_Monad_Except.withExcept(Data_Functor.map(Data_List_Types.functorNonEmptyList)(reformat))(Control_Bind.bindFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Data_Functor.map(Data_Functor.functorFn)(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Nullable.toNullable))(Data_Traversable.traverse(Data_Traversable.traversableMaybe)(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(readImpl(dictReadForeign))))(Foreign.readNull(o))); + }); +}; + +var readObject = function readObject(dictReadForeign) { + return new ReadForeign(function () { + var readObject$prime = function readObject$prime(value) { + if (Foreign.tagOf(value) === "Object") { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Foreign.unsafeFromForeign(value)); + } + + ; + + if (Data_Boolean.otherwise) { + return Foreign.fail(new Foreign.TypeMismatch("Object", Foreign.tagOf(value))); + } + + ; + throw new Error("Failed pattern match at Simple.JSON (line 188, column 7 - line 188, column 51): " + [value.constructor.name]); + }; + + return Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(function () { + var $91 = Data_Traversable.sequence(Foreign_Object.traversableObject)(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity)); + var $92 = Foreign_Object.mapWithKey(Data_Function["const"](readImpl(dictReadForeign))); + return function ($93) { + return $91($92($93)); + }; + }())(readObject$prime); + }()); +}; + +var readForeignVariant = function readForeignVariant(dictRowToList) { + return function (dictReadForeignVariant) { + return new ReadForeign(function (o) { + return readVariantImpl(dictReadForeignVariant)(Type_Data_RowList.RLProxy.value)(o); + }); + }; +}; + +var readForeign = new ReadForeign(Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))); +var readFieldsNil = new ReadForeignFields(function (v) { + return function (v1) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Control_Category.identity(Record_Builder.categoryBuilder)); + }; +}); +var readChar = new ReadForeign(Foreign.readChar); +var readBoolean = new ReadForeign(Foreign.readBoolean); + +var readArray = function readArray(dictReadForeign) { + return new ReadForeign(function () { + var readAtIdx = function readAtIdx(i) { + return function (f) { + return Control_Monad_Except.withExcept(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtIndex.create(i)))(readImpl(dictReadForeign)(f)); + }; + }; + + return Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Data_TraversableWithIndex.traverseWithIndex(Data_TraversableWithIndex.traversableWithIndexArray)(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(readAtIdx))(Foreign.readArray); + }()); +}; + +var read$prime = function read$prime(dictReadForeign) { + return readImpl(dictReadForeign); +}; + +var read = function read(dictReadForeign) { + var $94 = readImpl(dictReadForeign); + return function ($95) { + return Control_Monad_Except.runExcept($94($95)); + }; +}; + +var readAsForeign = function readAsForeign(dictReadForeign) { + var $96 = read(dictReadForeign); + return function ($97) { + return $96(Foreign.unsafeToForeign($97)); + }; +}; + +var read_ = function read_(dictReadForeign) { + var $98 = read(dictReadForeign); + return function ($99) { + return Data_Either.hush($98($99)); + }; +}; + +var parseJSON = function () { + var $100 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(function () { + var $103 = Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList); + return function ($104) { + return $103(Foreign.ForeignError.create(Effect_Exception.message($104))); + }; + }()); + var $101 = Effect_Uncurried.runEffectFn1($foreign["_parseJSON"]); + return function ($102) { + return Control_Monad_Except_Trans.ExceptT(Data_Identity.Identity($100(Effect_Unsafe.unsafePerformEffect(Effect_Exception["try"]($101($102)))))); + }; +}(); + +var readJSON = function readJSON(dictReadForeign) { + var $105 = Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(readImpl(dictReadForeign))(parseJSON); + return function ($106) { + return Control_Monad_Except.runExcept($105($106)); + }; +}; + +var readJSON_ = function readJSON_(dictReadForeign) { + var $107 = readJSON(dictReadForeign); + return function ($108) { + return Data_Either.hush($107($108)); + }; +}; + +var readJSON$prime = function readJSON$prime(dictReadForeign) { + return Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(readImpl(dictReadForeign))(parseJSON); +}; + +var nilWriteForeignVariant = new WriteForeignVariant(function (v) { + return function (v1) { + return Partial_Unsafe.unsafeCrashWith("Variant was not able to be writen row WriteForeign."); + }; +}); +var nilWriteForeignFields = new WriteForeignFields(function (v) { + return function (v1) { + return Control_Category.identity(Record_Builder.categoryBuilder); + }; +}); + +var getFields = function getFields(dict) { + return dict.getFields; +}; + +var readRecord = function readRecord(dictRowToList) { + return function (dictReadForeignFields) { + return new ReadForeign(function (o) { + return Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Function.flip(Record_Builder.build)({}))(getFields(dictReadForeignFields)(Type_Data_RowList.RLProxy.value)(o)); + }); + }; +}; + +var consWriteForeignVariant = function consWriteForeignVariant(dictIsSymbol) { + return function (dictWriteForeign) { + return function (dictCons) { + return function (dictWriteForeignVariant) { + return new WriteForeignVariant(function (v) { + return function (variant) { + var writeVariant = function writeVariant(value) { + return Foreign.unsafeToForeign({ + type: Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value), + value: writeImpl(dictWriteForeign)(value) + }); + }; + + return Data_Variant.on(dictCons)(dictIsSymbol)(Data_Symbol.SProxy.value)(writeVariant)(writeVariantImpl(dictWriteForeignVariant)(Type_Data_RowList.RLProxy.value))(variant); + }; + }); + }; + }; + }; +}; + +var consWriteForeignFields = function consWriteForeignFields(dictIsSymbol) { + return function (dictWriteForeign) { + return function (dictWriteForeignFields) { + return function (dictCons) { + return function (dictLacks) { + return function (dictCons1) { + return new WriteForeignFields(function (v) { + return function (rec) { + var rest = writeImplFields(dictWriteForeignFields)(Type_Data_RowList.RLProxy.value)(rec); + var value = writeImpl(dictWriteForeign)(Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(rec)); + var result = Control_Semigroupoid.compose(Record_Builder.semigroupoidBuilder)(Record_Builder.insert(dictCons1)(dictLacks)(dictIsSymbol)(Data_Symbol.SProxy.value)(value))(rest); + return result; + }; + }); + }; + }; + }; + }; + }; +}; + +var applyEither = function applyEither(dictSemigroup) { + return function (v) { + return function (v1) { + if (v instanceof Data_Either.Left && v1 instanceof Data_Either.Right) { + return new Data_Either.Left(v.value0); + } + + ; + + if (v instanceof Data_Either.Left && v1 instanceof Data_Either.Left) { + return new Data_Either.Left(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0)); + } + + ; + + if (v instanceof Data_Either.Right && v1 instanceof Data_Either.Left) { + return new Data_Either.Left(v1.value0); + } + + ; + + if (v instanceof Data_Either.Right && v1 instanceof Data_Either.Right) { + return new Data_Either.Right(v.value0(v1.value0)); + } + + ; + throw new Error("Failed pattern match at Simple.JSON (line 232, column 1 - line 232, column 90): " + [v.constructor.name, v1.constructor.name]); + }; + }; +}; + +var exceptTApply = function exceptTApply(dictSemigroup) { + return function (dictApplicative) { + return function (fun) { + return function (a) { + return Control_Monad_Except_Trans.ExceptT(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(applyEither(dictSemigroup))(Control_Monad_Except_Trans.runExceptT(fun)))(Control_Monad_Except_Trans.runExceptT(a))); + }; + }; + }; +}; + +var readFieldsCons = function readFieldsCons(dictIsSymbol) { + return function (dictReadForeign) { + return function (dictReadForeignFields) { + return function (dictLacks) { + return function (dictCons) { + return new ReadForeignFields(function (v) { + return function (obj) { + var rest = getFields(dictReadForeignFields)(Type_Data_RowList.RLProxy.value)(obj); + var name = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + var withExcept$prime = Control_Monad_Except.withExcept(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtProperty.create(name))); + var first = Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(withExcept$prime(Control_Bind.bindFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(readImpl(dictReadForeign))(Foreign_Index.readProp(name)(obj))))(function (v1) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Record_Builder.insert(dictCons)(dictLacks)(dictIsSymbol)(Data_Symbol.SProxy.value)(v1)); + }); + return exceptTApply(Data_List_Types.semigroupNonEmptyList)(Data_Identity.applicativeIdentity)(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Control_Semigroupoid.compose(Record_Builder.semigroupoidBuilder))(first))(rest); + }; + }); + }; + }; + }; + }; +}; + +var readVariantCons = function readVariantCons(dictIsSymbol) { + return function (dictReadForeign) { + return function (dictCons) { + return function (dictReadForeignVariant) { + return new ReadForeignVariant(function (v) { + return function (o) { + var name = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + return Control_Alt.alt(Control_Monad_Except_Trans.altExceptT(Data_List_Types.semigroupNonEmptyList)(Data_Identity.monadIdentity))(Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(readImpl(readRecord()(readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "type"; + }))(readString)(readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "value"; + }))(readForeign)(readFieldsNil)()())()()))(o))(function (v1) { + var $83 = v1.type === name; + + if ($83) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(readImpl(dictReadForeign)(v1.value))(function (v2) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Variant.inj(dictCons)(dictIsSymbol)(Data_Symbol.SProxy.value)(v2)); + }); + } + + ; + return Foreign.fail(Foreign.ForeignError.create("Did not match variant tag " + name)); + }))(readVariantImpl(dictReadForeignVariant)(Type_Data_RowList.RLProxy.value)(o)); + }; + }); + }; + }; + }; +}; + +module.exports = { + readJSON: readJSON, + "readJSON'": readJSON$prime, + readJSON_: readJSON_, + writeJSON: writeJSON, + write: write, + read: read, + "read'": read$prime, + read_: read_, + parseJSON: parseJSON, + "undefined": $$undefined, + ReadForeign: ReadForeign, + readImpl: readImpl, + ReadForeignFields: ReadForeignFields, + getFields: getFields, + ReadForeignVariant: ReadForeignVariant, + readVariantImpl: readVariantImpl, + WriteForeign: WriteForeign, + writeImpl: writeImpl, + WriteForeignFields: WriteForeignFields, + writeImplFields: writeImplFields, + WriteForeignVariant: WriteForeignVariant, + writeVariantImpl: writeVariantImpl, + readForeign: readForeign, + readChar: readChar, + readNumber: readNumber, + readInt: readInt, + readString: readString, + readBoolean: readBoolean, + readArray: readArray, + readMaybe: readMaybe, + readNullable: readNullable, + readObject: readObject, + readRecord: readRecord, + readFieldsCons: readFieldsCons, + readFieldsNil: readFieldsNil, + readForeignVariant: readForeignVariant, + readVariantNil: readVariantNil, + readVariantCons: readVariantCons, + writeForeignForeign: writeForeignForeign, + writeForeignString: writeForeignString, + writeForeignInt: writeForeignInt, + writeForeignChar: writeForeignChar, + writeForeignNumber: writeForeignNumber, + writeForeignBoolean: writeForeignBoolean, + writeForeignArray: writeForeignArray, + writeForeignMaybe: writeForeignMaybe, + writeForeignNullable: writeForeignNullable, + writeForeignObject: writeForeignObject, + recordWriteForeign: recordWriteForeign, + consWriteForeignFields: consWriteForeignFields, + nilWriteForeignFields: nilWriteForeignFields, + writeForeignVariant: writeForeignVariant, + nilWriteForeignVariant: nilWriteForeignVariant, + consWriteForeignVariant: consWriteForeignVariant +}; +},{"./foreign.js":"BQGe","../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad.Except/index.js":"Fye2","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Semigroupoid/index.js":"/riR","../Data.Bifunctor/index.js":"e2Wc","../Data.Boolean/index.js":"ObQr","../Data.Either/index.js":"B2JL","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Nullable/index.js":"YQ8o","../Data.Semigroup/index.js":"EsAJ","../Data.Symbol/index.js":"4oJQ","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Variant/index.js":"hgdh","../Effect.Exception/index.js":"0OCW","../Effect.Uncurried/index.js":"qn3Z","../Effect.Unsafe/index.js":"tPW2","../Foreign/index.js":"pu1p","../Foreign.Index/index.js":"Ryy1","../Foreign.Object/index.js":"jsiz","../Global.Unsafe/index.js":"qSZP","../Partial.Unsafe/index.js":"aoR+","../Record/index.js":"0gG4","../Record.Builder/index.js":"VeY4","../Type.Data.RowList/index.js":"XaXP"}],"X0te":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Color = require("../Color/index.js"); + +var Color_Scheme_Clrs = require("../Color.Scheme.Clrs/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Control_Monad_State = require("../Control.Monad.State/index.js"); + +var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js"); + +var Control_Monad_State_Trans = require("../Control.Monad.State.Trans/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_BigInt = require("../Data.BigInt/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_EuclideanRing = require("../Data.EuclideanRing/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Data_Lens_Getter = require("../Data.Lens.Getter/index.js"); + +var Data_List = require("../Data.List/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Map_Internal = require("../Data.Map.Internal/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Number_Format = require("../Data.Number.Format/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Pair = require("../Data.Pair/index.js"); + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_String_CodePoints = require("../Data.String.CodePoints/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Variant = require("../Data.Variant/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var Genetics_Browser_Canvas = require("../Genetics.Browser.Canvas/index.js"); + +var Genetics_Browser_Coordinates = require("../Genetics.Browser.Coordinates/index.js"); + +var Genetics_Browser_Layer = require("../Genetics.Browser.Layer/index.js"); + +var Genetics_Browser_Types = require("../Genetics.Browser.Types/index.js"); + +var Graphics_Drawing = require("../Graphics.Drawing/index.js"); + +var Graphics_Drawing_Font = require("../Graphics.Drawing.Font/index.js"); + +var $$Math = require("../Math/index.js"); + +var Simple_JSON = require("../Simple.JSON/index.js"); + +var HexColor = function HexColor(x) { + return x; +}; + +var trackLegend = function trackLegend(dictFoldable) { + return function (dictFunctor) { + return function (f) { + return function (as) { + return Data_Array.nubBy(Data_Function.on(Data_Ord.compare(Data_Ord.ordString))(function (v) { + return v.text; + }))(Data_Array.fromFoldable(dictFoldable)(Data_Functor.map(dictFunctor)(f)(as))); + }; + }; + }; +}; + +var pixelSegmentsOpt = function pixelSegmentsOpt(dictOrd) { + return function (conf) { + return function (cSys) { + return function (trackDim) { + return function (csView) { + return Data_Functor.map(Data_Map_Internal.functorMap)(Genetics_Browser_Coordinates.aroundPair(Data_Ring.ringNumber)(-conf.segmentPadding))(Genetics_Browser_Coordinates["scaledSegments'"](dictOrd)(cSys)(csView)(Genetics_Browser_Coordinates.viewScale(trackDim)(csView))); + }; + }; + }; + }; +}; + +var pixelSegments = function pixelSegments(conf) { + return function (cSys) { + return function (trackDim) { + return function (csView) { + return Data_Functor.map(Data_Map_Internal.functorMap)(Genetics_Browser_Coordinates.aroundPair(Data_Ring.ringNumber)(-conf.segmentPadding))(Genetics_Browser_Coordinates.scaledSegments(cSys)(Genetics_Browser_Coordinates.viewScale(trackDim)(csView))); + }; + }; + }; +}; + +var trackLikeLayer = function trackLikeLayer(conf) { + return function (com) { + var segs = pixelSegments(conf)(conf.coordinateSystem); + + var fun = function fun(f) { + return function (v) { + return f(segs(v.value1)(v.value0))(v.value1); + }; + }; + + var com$prime = Data_Functor.map(Genetics_Browser_Layer.functorComponent)(fun)(com); + return new Genetics_Browser_Layer.Layer(Genetics_Browser_Layer.Scrolling.value, new Genetics_Browser_Layer.Masked(5.0), com$prime); + }; +}; + +var parseColor = function () { + var readColor = function readColor(c) { + return Control_Monad_Except_Trans.except(Data_Identity.applicativeIdentity)(Data_Either.note(Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList)(new Foreign.ForeignError("Could not parse color: expected hex string")))(Color.fromHexString(c))); + }; + + return Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(readColor)(Foreign.readString); +}(); + +var newtypeHexColor = new Data_Newtype.Newtype(function (n) { + return n; +}, HexColor); +var readforeignHexColor = new Simple_JSON.ReadForeign(Data_Functor.map(Data_Functor.functorFn)(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Newtype.wrap(newtypeHexColor)))(parseColor)); + +var thresholdRuler = function thresholdRuler(v) { + var y = v.value1.height - Genetics_Browser_Coordinates.normalize(Data_EuclideanRing.euclideanRingNumber)(v.value0.threshold.min)(v.value0.threshold.max)(v.value0.threshold.sig) * v.value1.height; + var text = "P = " + Data_Lens_Getter.viewOn($$Math.pow(10.0)(-v.value0.threshold.sig))(Genetics_Browser_Types["_exp"](1)); + var outline = Data_Semigroup.append(Graphics_Drawing.semigroupOutlineStyle)(Graphics_Drawing.outlineColor(Data_Newtype.unwrap(newtypeHexColor)(v.value0.rulerColor)))(Graphics_Drawing.lineWidth(2.0)); + var rulerDrawing = Graphics_Drawing.outlined(outline)(Graphics_Drawing.path(Data_Foldable.foldableArray)([{ + x: -5.0, + y: y + }, { + x: v.value1.width + 5.0, + y: y + }])); + var font$prime = Graphics_Drawing_Font.font(Graphics_Drawing_Font.sansSerif)(16)(Data_Monoid.mempty(Graphics_Drawing_Font.monoidFontOptions)); + var label = Graphics_Drawing.text(font$prime)(v.value1.width + 10.0)(y - 6.0)(Graphics_Drawing.fillColor(Data_Newtype.unwrap(newtypeHexColor)(v.value0.rulerColor)))(text); + return { + renderables: Data_List.fromFoldable(Data_Foldable.foldableArray)([Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "drawing"; + }))(Genetics_Browser_Canvas["_drawing"])(rulerDrawing), Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "drawing"; + }))(Genetics_Browser_Canvas["_drawing"])(label)]) + }; +}; + +var groupToMap = function groupToMap(dictMonoid) { + return function (dictOrd) { + return function (dictFoldable) { + return function (dictApplicative) { + return function (f) { + var add = function add(x) { + return function (xs) { + return Data_Semigroup.append(Data_Maybe.semigroupMaybe(dictMonoid.Semigroup0()))(Control_Applicative.pure(Data_Maybe.applicativeMaybe)(Control_Applicative.pure(dictApplicative)(x)))(xs); + }; + }; + + return Data_Foldable.foldl(dictFoldable)(function (grp) { + return function (a) { + return Data_Map_Internal.alter(dictOrd)(add(a))(f(a))(grp); + }; + })(Data_Monoid.mempty(Data_Map_Internal.monoidMap(dictOrd))); + }; + }; + }; + }; +}; + +var fixedUILayer = function fixedUILayer(com) { + var f = function f(draw) { + return function (v) { + return { + renderables: Control_Applicative.pure(Data_List_Types.applicativeList)(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "drawing"; + }))(Genetics_Browser_Canvas["_drawing"])(draw(v.value1))) + }; + }; + }; + + return Genetics_Browser_Layer.Layer.create(Genetics_Browser_Layer.Fixed.value)(Genetics_Browser_Layer.NoMask.value)(Data_Functor.map(Genetics_Browser_Layer.functorComponent)(f)(com)); +}; + +var featureNormX = function featureNormX(v) { + return Data_Newtype.wrap(Genetics_Browser_Coordinates.newtypeNormalized)(Data_Newtype.unwrap(Genetics_Browser_Types.newtypeBp)(Data_EuclideanRing.div(Genetics_Browser_Types.euclideanRingBp)(v.position.value0)(v.frameSize))); +}; + +var drawVScaleInSlot = function drawVScaleInSlot(vscale) { + return function (size) { + var spokes = Data_Functor.map(Data_Functor.functorArray)(function ($82) { + return function (v) { + return v / Data_Int.toNumber(vscale.numSteps); + }(Data_Int.toNumber($82)); + })(Data_Array.range(0)(vscale.numSteps)); + var hPad = size.width * vscale.hPad; + + var label = function label(yN) { + return Graphics_Drawing.text(Graphics_Drawing_Font.font(Graphics_Drawing_Font.sansSerif)(vscale.fonts.scaleSize)(Data_Monoid.mempty(Graphics_Drawing_Font.monoidFontOptions)))(size.width * 0.6 - hPad)(yN * size.height + 5.0)(Graphics_Drawing.fillColor(Color.black))(Data_Number_Format.toStringWith(Data_Number_Format.fixed(0))(function (p) { + return Data_Ord.min(Data_Ord.ordNumber)(vscale.max)(p); + }(vscale.min + (1.0 - yN) * (vscale.max - vscale.min)))); + }; + + var labels = Data_Foldable.foldMap(Data_Foldable.foldableArray)(Graphics_Drawing.monoidDrawing)(label)(spokes); + var unitLabel = Graphics_Drawing.translate(size.width * 0.4 - hPad)(size.height * 0.72)(Graphics_Drawing.rotate(-$$Math.pi / 2.0)(Graphics_Drawing.text(Graphics_Drawing_Font.font(Graphics_Drawing_Font.sansSerif)(vscale.fonts.labelSize)(Data_Monoid.mempty(Graphics_Drawing_Font.monoidFontOptions)))(0.0)(0.0)(Graphics_Drawing.fillColor(Color.black))("-log10 (P value)"))); + var x = 7.0 * hPad; + var vBar = Graphics_Drawing.path(Data_Foldable.foldableArray)([{ + x: x, + y: 0.0 + }, { + x: x, + y: size.height + }]); + + var hBar = function hBar(w) { + return function (y) { + return Graphics_Drawing.path(Data_Foldable.foldableArray)([{ + x: x - w, + y: y + }, { + x: x, + y: y + }]); + }; + }; + + var bars = Data_Semigroup.append(Graphics_Drawing.semigroupShape)(vBar)(Data_Foldable.foldMap(Data_Foldable.foldableArray)(Graphics_Drawing.monoidShape)(function (i) { + return hBar(8.0)(i * size.height); + })(spokes)); + var barOutline = Data_Semigroup.append(Graphics_Drawing.semigroupOutlineStyle)(Graphics_Drawing.outlineColor(Data_Newtype.unwrap(newtypeHexColor)(vscale.color)))(Graphics_Drawing.lineWidth(2.0)); + return Data_Semigroup.append(Graphics_Drawing.semigroupDrawing)(Graphics_Drawing.outlined(barOutline)(bars))(Data_Semigroup.append(Graphics_Drawing.semigroupDrawing)(labels)(unitLabel)); + }; +}; + +var drawLegendItem = function drawLegendItem(v) { + var ft = Graphics_Drawing_Font.font(Graphics_Drawing_Font.sansSerif)(12)(Data_Monoid.mempty(Graphics_Drawing_Font.monoidFontOptions)); + var t = Graphics_Drawing.text(ft)(12.0)(0.0)(Graphics_Drawing.fillColor(Color.black))(v.text); + return Data_Semigroup.append(Graphics_Drawing.semigroupDrawing)(v.icon)(t); +}; + +var drawLegendInSlot = function drawLegendInSlot(v) { + return function (size) { + var vPad = size.height * v.vPad; + var hPad = size.width * v.hPad; + var font$prime = Graphics_Drawing_Font.font(Graphics_Drawing_Font.sansSerif)(v.fontSize)(Data_Monoid.mempty(Graphics_Drawing_Font.monoidFontOptions)); + + var drawEntry = function drawEntry(y) { + return function (v1) { + return Graphics_Drawing.translate(hPad)(y)(Data_Semigroup.append(Graphics_Drawing.semigroupDrawing)(v1.icon)(Graphics_Drawing.text(font$prime)(12.0)(0.0)(Graphics_Drawing.fillColor(Color.black))(v1.text))); + }; + }; + + var ds = Data_FunctorWithIndex.mapWithIndex(Data_FunctorWithIndex.functorWithIndexArray)(function (i) { + return function (ic) { + return drawEntry(vPad * Data_Int.toNumber(i + 1 | 0))(ic); + }; + })(v.entries); + var d = (size.height - 2.0 * vPad) / Data_Foldable.length(Data_Foldable.foldableArray)(Data_Semiring.semiringNumber)(v.entries); + return Data_Foldable.fold(Data_Foldable.foldableArray)(Graphics_Drawing.monoidDrawing)(ds); + }; +}; + +var defaultVScaleConfig = { + color: Data_Newtype.wrap(newtypeHexColor)(Color.black), + hPad: 0.125, + numSteps: 3, + fonts: { + labelSize: 18, + scaleSize: 14 + } +}; +var defaultLegendConfig = { + hPad: 0.2, + vPad: 0.2, + fontSize: 12 +}; + +var chrLabelsLayer = function chrLabelsLayer(trackConf) { + return function (v) { + var viewPixels = function viewPixels(d) { + return function (v1) { + var v$prime = Data_Functor.map(Data_Pair.functorPair)(Data_BigInt.toNumber)(Data_Newtype.unwrap(Genetics_Browser_Coordinates.coordsysviewNewtype)(v1)); + var s = Genetics_Browser_Coordinates.viewScale(d)(v1); + return Data_Functor.map(Data_Pair.functorPair)(function (v2) { + return v2 / Genetics_Browser_Coordinates.xPerPixel(s); + })(v$prime); + }; + }; + + var segMidPoint = function segMidPoint(v1) { + return function (v2) { + var r$prime = Data_Ord.min(Data_Ord.ordNumber)(v1.value1)(v2.value1); + var l$prime = Data_Ord.max(Data_Ord.ordNumber)(v1.value0)(v2.value0); + return l$prime + (r$prime - l$prime) / 2.0; + }; + }; + + var labelOffset = function labelOffset(chrId) { + return 0.3 * Data_Int.toNumber(v.fontSize * Data_String_CodePoints.length(Data_Show.show(Genetics_Browser_Types.showChrId)(chrId)) | 0); + }; + + var labelSeg = function labelSeg(d) { + return function (v1) { + return function (v2) { + return Graphics_Drawing.text(Graphics_Drawing_Font.font(Graphics_Drawing_Font.sansSerif)(v.fontSize)(Data_Monoid.mempty(Graphics_Drawing_Font.monoidFontOptions)))(segMidPoint(viewPixels(d)(v1))(v2.value1) - labelOffset(v2.value0))(0.7 * d.height)(Graphics_Drawing.fillColor(Color.black))(Data_Show.show(Genetics_Browser_Types.showChrId)(v2.value0)); + }; + }; + }; + + return Genetics_Browser_Layer.Layer.create(Genetics_Browser_Layer.Scrolling.value)(new Genetics_Browser_Layer.Masked(5.0))(new Genetics_Browser_Layer.CBottom(function (v1) { + return { + renderables: Data_Functor.map(Data_List_Types.functorList)(function () { + var $83 = Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "drawing"; + }))(Genetics_Browser_Canvas["_drawing"]); + var $84 = labelSeg(v1.value1)(v1.value0); + return function ($85) { + return $83($84($85)); + }; + }())(Data_Map_Internal.toUnfoldable(Data_List_Types.unfoldableList)(pixelSegments(trackConf)(trackConf.coordinateSystem)(v1.value1)(v1.value0))) + }; + })); + }; +}; + +var chrBackgroundLayer = function chrBackgroundLayer(conf) { + return function (seg) { + return function (size) { + var segBG = function segBG(v) { + return Control_Bind.bind(Control_Monad_State_Trans.bindStateT(Data_Identity.monadIdentity))(Control_Monad_State_Class.get(Control_Monad_State_Trans.monadStateStateT(Data_Identity.monadIdentity)))(function (v1) { + return Control_Bind.discard(Control_Bind.discardUnit)(Control_Monad_State_Trans.bindStateT(Data_Identity.monadIdentity))(Control_Monad_State_Class.modify_(Control_Monad_State_Trans.monadStateStateT(Data_Identity.monadIdentity))(Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean)))(function () { + return Control_Applicative.pure(Control_Monad_State_Trans.applicativeStateT(Data_Identity.monadIdentity))(new Data_Tuple.Tuple(Data_Newtype.unwrap(newtypeHexColor)(function () { + if (v1) { + return conf.chrBG1; + } + + ; + return conf.chrBG2; + }()), Graphics_Drawing.rectangle(v.value0 - conf.segmentPadding)(-5.0)(v.value1 - v.value0 + 2.0 * conf.segmentPadding)(size.height + 10.0))); + }); + }); + }; + + var col = function col(c) { + if (c) { + return Color.black; + } + + ; + return Color_Scheme_Clrs.gray; + }; + + return { + renderables: Data_Functor.map(Data_List_Types.functorList)(function () { + var $86 = Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "drawing"; + }))(Genetics_Browser_Canvas["_drawing"]); + var $87 = Data_Tuple.uncurry(function (c) { + return function (s) { + return Graphics_Drawing.filled(Graphics_Drawing.fillColor(c))(s); + }; + }); + return function ($88) { + return $86($87($88)); + }; + }())(Control_Monad_State.evalState(Data_Traversable.traverse(Data_List_Types.traversableList)(Control_Monad_State_Trans.applicativeStateT(Data_Identity.monadIdentity))(segBG)(Data_Map_Internal.values(seg)))(false)) + }; + }; + }; +}; + +module.exports = { + featureNormX: featureNormX, + groupToMap: groupToMap, + pixelSegments: pixelSegments, + pixelSegmentsOpt: pixelSegmentsOpt, + trackLikeLayer: trackLikeLayer, + fixedUILayer: fixedUILayer, + thresholdRuler: thresholdRuler, + chrLabelsLayer: chrLabelsLayer, + chrBackgroundLayer: chrBackgroundLayer, + HexColor: HexColor, + parseColor: parseColor, + defaultVScaleConfig: defaultVScaleConfig, + drawVScaleInSlot: drawVScaleInSlot, + drawLegendItem: drawLegendItem, + defaultLegendConfig: defaultLegendConfig, + drawLegendInSlot: drawLegendInSlot, + trackLegend: trackLegend, + newtypeHexColor: newtypeHexColor, + readforeignHexColor: readforeignHexColor +}; +},{"../Color/index.js":"f3ma","../Color.Scheme.Clrs/index.js":"rp+n","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Monad.State/index.js":"mGZW","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.State.Trans/index.js":"34Kp","../Data.Array/index.js":"4t4C","../Data.BigInt/index.js":"Zx+T","../Data.Either/index.js":"B2JL","../Data.EuclideanRing/index.js":"2IRB","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.HeytingAlgebra/index.js":"paZe","../Data.Identity/index.js":"2OKT","../Data.Int/index.js":"xNJb","../Data.Lens.Getter/index.js":"OPOX","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Number.Format/index.js":"VX77","../Data.Ord/index.js":"r4Vb","../Data.Pair/index.js":"PpsX","../Data.Ring/index.js":"E2qH","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.String.CodePoints/index.js":"mAJY","../Data.Symbol/index.js":"4oJQ","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Variant/index.js":"hgdh","../Foreign/index.js":"pu1p","../Genetics.Browser.Canvas/index.js":"VVkU","../Genetics.Browser.Coordinates/index.js":"7bYH","../Genetics.Browser.Layer/index.js":"YWUW","../Genetics.Browser.Types/index.js":"HhmG","../Graphics.Drawing/index.js":"0WVi","../Graphics.Drawing.Font/index.js":"fMOI","../Math/index.js":"Rpaz","../Simple.JSON/index.js":"DqNI"}],"UG8G":[function(require,module,exports) { + +// shim for using process in browser +var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} + +function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined'); +} + +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +})(); + +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } // if setTimeout wasn't available but was latter defined + + + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } +} + +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } // if clearTimeout wasn't available but was latter defined + + + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } +} + +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + + draining = false; + + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + + var timeout = runTimeout(cleanUpNextTick); + draining = true; + var len = queue.length; + + while (len) { + currentQueue = queue; + queue = []; + + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + + queueIndex = -1; + len = queue.length; + } + + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + + queue.push(new Item(fun, args)); + + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; // v8 likes predictible objects + + +function Item(fun, array) { + this.fun = fun; + this.array = array; +} + +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; + +process.title = 'browser'; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues + +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { + return []; +}; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { + return '/'; +}; + +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; + +process.umask = function () { + return 0; +}; +},{}],"sseR":[function(require,module,exports) { +var process = require("process"); +/* global exports */ + +/* global XMLHttpRequest */ + +/* global module */ + +/* global process */ +"use strict"; + +exports._ajax = function () { + var platformSpecific = {}; + + if (typeof module !== "undefined" && module.require && !(typeof process !== "undefined" && process.versions["electron"])) { + // We are on node.js + platformSpecific.newXHR = function () { + var XHR = module.require("xhr2"); + + return new XHR(); + }; + + platformSpecific.fixupUrl = function (url) { + var urllib = module.require("url"); + + var u = urllib.parse(url); + u.protocol = u.protocol || "http:"; + u.hostname = u.hostname || "localhost"; + return urllib.format(u); + }; + + platformSpecific.getResponse = function (xhr) { + return xhr.response; + }; + } else { + // We are in the browser + platformSpecific.newXHR = function () { + return new XMLHttpRequest(); + }; + + platformSpecific.fixupUrl = function (url) { + return url || "/"; + }; + + platformSpecific.getResponse = function (xhr) { + return xhr.response; + }; + } + + return function (mkHeader, options) { + return function (errback, callback) { + var xhr = platformSpecific.newXHR(); + var fixedUrl = platformSpecific.fixupUrl(options.url); + xhr.open(options.method || "GET", fixedUrl, true, options.username, options.password); + + if (options.headers) { + try { + for (var i = 0, header; (header = options.headers[i]) != null; i++) { + xhr.setRequestHeader(header.field, header.value); + } + } catch (e) { + errback(e); + } + } + + var onerror = function onerror(msg) { + return function () { + errback(new Error(msg + ": " + options.method + " " + options.url)); + }; + }; + + xhr.onerror = onerror("AJAX request failed"); + xhr.ontimeout = onerror("AJAX request timed out"); + + xhr.onload = function () { + callback({ + status: xhr.status, + statusText: xhr.statusText, + headers: xhr.getAllResponseHeaders().split("\r\n").filter(function (header) { + return header.length > 0; + }).map(function (header) { + var i = header.indexOf(":"); + return mkHeader(header.substring(0, i))(header.substring(i + 2)); + }), + body: platformSpecific.getResponse(xhr) + }); + }; + + xhr.responseType = options.responseType; + xhr.withCredentials = options.withCredentials; + xhr.send(options.content); + return function (error, cancelErrback, cancelCallback) { + try { + xhr.abort(); + } catch (e) { + return cancelErrback(e); + } + + return cancelCallback(); + }; + }; + }; +}(); +},{"process":"UG8G"}],"PJcd":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var textXML = "text/xml"; +var textPlain = "text/plain"; +var textHTML = "text/html"; +var textCSV = "text/csv"; +var multipartFormData = "multipart/form-data"; +var imagePNG = "image/png"; +var imageJPEG = "image/jpeg"; +var imageGIF = "image/gif"; +var applicationXML = "application/xml"; +var applicationOctetStream = "application/octet-stream"; +var applicationJavascript = "application/javascript"; +var applicationJSON = "application/json"; +var applicationFormURLEncoded = "application/x-www-form-urlencoded"; +module.exports = { + applicationFormURLEncoded: applicationFormURLEncoded, + applicationJSON: applicationJSON, + applicationJavascript: applicationJavascript, + applicationOctetStream: applicationOctetStream, + applicationXML: applicationXML, + imageGIF: imageGIF, + imageJPEG: imageJPEG, + imagePNG: imagePNG, + multipartFormData: multipartFormData, + textCSV: textCSV, + textHTML: textHTML, + textPlain: textPlain, + textXML: textXML +}; +},{}],"TX3z":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_MediaType_Common = require("../Data.MediaType.Common/index.js"); + +var ArrayView = function () { + function ArrayView(value0) { + this.value0 = value0; + } + + ; + + ArrayView.create = function (value0) { + return new ArrayView(value0); + }; + + return ArrayView; +}(); + +var Blob = function () { + function Blob(value0) { + this.value0 = value0; + } + + ; + + Blob.create = function (value0) { + return new Blob(value0); + }; + + return Blob; +}(); + +var Document = function () { + function Document(value0) { + this.value0 = value0; + } + + ; + + Document.create = function (value0) { + return new Document(value0); + }; + + return Document; +}(); + +var $$String = function () { + function $$String(value0) { + this.value0 = value0; + } + + ; + + $$String.create = function (value0) { + return new $$String(value0); + }; + + return $$String; +}(); + +var FormData = function () { + function FormData(value0) { + this.value0 = value0; + } + + ; + + FormData.create = function (value0) { + return new FormData(value0); + }; + + return FormData; +}(); + +var FormURLEncoded = function () { + function FormURLEncoded(value0) { + this.value0 = value0; + } + + ; + + FormURLEncoded.create = function (value0) { + return new FormURLEncoded(value0); + }; + + return FormURLEncoded; +}(); + +var Json = function () { + function Json(value0) { + this.value0 = value0; + } + + ; + + Json.create = function (value0) { + return new Json(value0); + }; + + return Json; +}(); + +var toMediaType = function toMediaType(v) { + if (v instanceof FormURLEncoded) { + return new Data_Maybe.Just(Data_MediaType_Common.applicationFormURLEncoded); + } + + ; + + if (v instanceof Json) { + return new Data_Maybe.Just(Data_MediaType_Common.applicationJSON); + } + + ; + return Data_Maybe.Nothing.value; +}; + +var string = $$String.create; +var json = Json.create; +var formURLEncoded = FormURLEncoded.create; +var formData = FormData.create; +var document = Document.create; +var blob = Blob.create; + +var arrayView = function arrayView(av) { + return new ArrayView(function (f) { + return f(av); + }); +}; + +module.exports = { + ArrayView: ArrayView, + Blob: Blob, + Document: Document, + "String": $$String, + FormData: FormData, + FormURLEncoded: FormURLEncoded, + Json: Json, + arrayView: arrayView, + blob: blob, + document: document, + string: string, + formData: formData, + formURLEncoded: formURLEncoded, + json: json, + toMediaType: toMediaType +}; +},{"../Data.Maybe/index.js":"5mN7","../Data.MediaType.Common/index.js":"PJcd"}],"cjQ0":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var MediaType = function MediaType(x) { + return x; +}; + +var showMediaType = new Data_Show.Show(function (v) { + return "(MediaType " + (Data_Show.show(Data_Show.showString)(v) + ")"); +}); +var newtypeMediaType = new Data_Newtype.Newtype(function (n) { + return n; +}, MediaType); +var eqMediaType = new Data_Eq.Eq(function (x) { + return function (y) { + return x === y; + }; +}); +var ordMediaType = new Data_Ord.Ord(function () { + return eqMediaType; +}, function (x) { + return function (y) { + return Data_Ord.compare(Data_Ord.ordString)(x)(y); + }; +}); +module.exports = { + MediaType: MediaType, + newtypeMediaType: newtypeMediaType, + eqMediaType: eqMediaType, + ordMediaType: ordMediaType, + showMediaType: showMediaType +}; +},{"../Data.Eq/index.js":"Pq4F","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7"}],"QBMh":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_MediaType = require("../Data.MediaType/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Accept = function () { + function Accept(value0) { + this.value0 = value0; + } + + ; + + Accept.create = function (value0) { + return new Accept(value0); + }; + + return Accept; +}(); + +var ContentType = function () { + function ContentType(value0) { + this.value0 = value0; + } + + ; + + ContentType.create = function (value0) { + return new ContentType(value0); + }; + + return ContentType; +}(); + +var RequestHeader = function () { + function RequestHeader(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + RequestHeader.create = function (value0) { + return function (value1) { + return new RequestHeader(value0, value1); + }; + }; + + return RequestHeader; +}(); + +var value = function value(v) { + if (v instanceof Accept) { + return Data_Newtype.unwrap(Data_MediaType.newtypeMediaType)(v.value0); + } + + ; + + if (v instanceof ContentType) { + return Data_Newtype.unwrap(Data_MediaType.newtypeMediaType)(v.value0); + } + + ; + + if (v instanceof RequestHeader) { + return v.value1; + } + + ; + throw new Error("Failed pattern match at Affjax.RequestHeader (line 26, column 1 - line 26, column 33): " + [v.constructor.name]); +}; + +var showRequestHeader = new Data_Show.Show(function (v) { + if (v instanceof Accept) { + return "(Accept " + (Data_Show.show(Data_MediaType.showMediaType)(v.value0) + ")"); + } + + ; + + if (v instanceof ContentType) { + return "(ContentType " + (Data_Show.show(Data_MediaType.showMediaType)(v.value0) + ")"); + } + + ; + + if (v instanceof RequestHeader) { + return "(RequestHeader " + (Data_Show.show(Data_Show.showString)(v.value0) + (" " + (Data_Show.show(Data_Show.showString)(v.value1) + ")"))); + } + + ; + throw new Error("Failed pattern match at Affjax.RequestHeader (line 16, column 1 - line 19, column 81): " + [v.constructor.name]); +}); + +var name = function name(v) { + if (v instanceof Accept) { + return "Accept"; + } + + ; + + if (v instanceof ContentType) { + return "Content-Type"; + } + + ; + + if (v instanceof RequestHeader) { + return v.value0; + } + + ; + throw new Error("Failed pattern match at Affjax.RequestHeader (line 21, column 1 - line 21, column 32): " + [v.constructor.name]); +}; + +var eqRequestHeader = new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof Accept && y instanceof Accept) { + return Data_Eq.eq(Data_MediaType.eqMediaType)(x.value0)(y.value0); + } + + ; + + if (x instanceof ContentType && y instanceof ContentType) { + return Data_Eq.eq(Data_MediaType.eqMediaType)(x.value0)(y.value0); + } + + ; + + if (x instanceof RequestHeader && y instanceof RequestHeader) { + return x.value0 === y.value0 && x.value1 === y.value1; + } + + ; + return false; + }; +}); +var ordRequestHeader = new Data_Ord.Ord(function () { + return eqRequestHeader; +}, function (x) { + return function (y) { + if (x instanceof Accept && y instanceof Accept) { + return Data_Ord.compare(Data_MediaType.ordMediaType)(x.value0)(y.value0); + } + + ; + + if (x instanceof Accept) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof Accept) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof ContentType && y instanceof ContentType) { + return Data_Ord.compare(Data_MediaType.ordMediaType)(x.value0)(y.value0); + } + + ; + + if (x instanceof ContentType) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof ContentType) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof RequestHeader && y instanceof RequestHeader) { + var v = Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0); + + if (v instanceof Data_Ordering.LT) { + return Data_Ordering.LT.value; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Data_Ordering.GT.value; + } + + ; + return Data_Ord.compare(Data_Ord.ordString)(x.value1)(y.value1); + } + + ; + throw new Error("Failed pattern match at Affjax.RequestHeader (line 14, column 1 - line 14, column 54): " + [x.constructor.name, y.constructor.name]); + }; +}); +module.exports = { + Accept: Accept, + ContentType: ContentType, + RequestHeader: RequestHeader, + name: name, + value: value, + eqRequestHeader: eqRequestHeader, + ordRequestHeader: ordRequestHeader, + showRequestHeader: showRequestHeader +}; +},{"../Data.Eq/index.js":"Pq4F","../Data.MediaType/index.js":"cjQ0","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7"}],"QSsR":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Category = require("../Control.Category/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_MediaType_Common = require("../Data.MediaType.Common/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var ResponseFormatError = function () { + function ResponseFormatError(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + ResponseFormatError.create = function (value0) { + return function (value1) { + return new ResponseFormatError(value0, value1); + }; + }; + + return ResponseFormatError; +}(); + +var $$ArrayBuffer = function () { + function $$ArrayBuffer(value0) { + this.value0 = value0; + } + + ; + + $$ArrayBuffer.create = function (value0) { + return new $$ArrayBuffer(value0); + }; + + return $$ArrayBuffer; +}(); + +var Blob = function () { + function Blob(value0) { + this.value0 = value0; + } + + ; + + Blob.create = function (value0) { + return new Blob(value0); + }; + + return Blob; +}(); + +var Document = function () { + function Document(value0) { + this.value0 = value0; + } + + ; + + Document.create = function (value0) { + return new Document(value0); + }; + + return Document; +}(); + +var Json = function () { + function Json(value0) { + this.value0 = value0; + } + + ; + + Json.create = function (value0) { + return new Json(value0); + }; + + return Json; +}(); + +var $$String = function () { + function $$String(value0) { + this.value0 = value0; + } + + ; + + $$String.create = function (value0) { + return new $$String(value0); + }; + + return $$String; +}(); + +var Ignore = function () { + function Ignore(value0) { + this.value0 = value0; + } + + ; + + Ignore.create = function (value0) { + return new Ignore(value0); + }; + + return Ignore; +}(); + +var toResponseType = function toResponseType(v) { + if (v instanceof $$ArrayBuffer) { + return "arraybuffer"; + } + + ; + + if (v instanceof Blob) { + return "blob"; + } + + ; + + if (v instanceof Document) { + return "document"; + } + + ; + + if (v instanceof Json) { + return "text"; + } + + ; + + if (v instanceof $$String) { + return "text"; + } + + ; + + if (v instanceof Ignore) { + return ""; + } + + ; + throw new Error("Failed pattern match at Affjax.ResponseFormat (line 46, column 3 - line 52, column 19): " + [v.constructor.name]); +}; + +var toMediaType = function toMediaType(v) { + if (v instanceof Json) { + return new Data_Maybe.Just(Data_MediaType_Common.applicationJSON); + } + + ; + return Data_Maybe.Nothing.value; +}; + +var string = new $$String(Control_Category.identity(Control_Category.categoryFn)); + +var printResponseFormatError = function printResponseFormatError(v) { + return Foreign.renderForeignError(v.value0); +}; + +var json = new Json(Control_Category.identity(Control_Category.categoryFn)); +var ignore = new Ignore(Control_Category.identity(Control_Category.categoryFn)); +var document = new Document(Control_Category.identity(Control_Category.categoryFn)); +var blob = new Blob(Control_Category.identity(Control_Category.categoryFn)); +var arrayBuffer = new $$ArrayBuffer(Control_Category.identity(Control_Category.categoryFn)); +module.exports = { + "ArrayBuffer": $$ArrayBuffer, + Blob: Blob, + Document: Document, + Json: Json, + "String": $$String, + Ignore: Ignore, + arrayBuffer: arrayBuffer, + blob: blob, + document: document, + json: json, + string: string, + ignore: ignore, + toResponseType: toResponseType, + toMediaType: toMediaType, + ResponseFormatError: ResponseFormatError, + printResponseFormatError: printResponseFormatError +}; +},{"../Control.Category/index.js":"IAi2","../Data.Maybe/index.js":"5mN7","../Data.MediaType.Common/index.js":"PJcd","../Foreign/index.js":"pu1p"}],"ev5/":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var ResponseHeader = function () { + function ResponseHeader(value0, value1) { + this.value0 = value0; + this.value1 = value1; + } + + ; + + ResponseHeader.create = function (value0) { + return function (value1) { + return new ResponseHeader(value0, value1); + }; + }; + + return ResponseHeader; +}(); + +var value = function value(v) { + return v.value1; +}; + +var showResponseHeader = new Data_Show.Show(function (v) { + return "(ResponseHeader " + (Data_Show.show(Data_Show.showString)(v.value0) + (" " + (Data_Show.show(Data_Show.showString)(v.value1) + ")"))); +}); + +var name = function name(v) { + return v.value0; +}; + +var eqResponseHeader = new Data_Eq.Eq(function (x) { + return function (y) { + return x.value0 === y.value0 && x.value1 === y.value1; + }; +}); +var ordResponseHeader = new Data_Ord.Ord(function () { + return eqResponseHeader; +}, function (x) { + return function (y) { + var v = Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0); + + if (v instanceof Data_Ordering.LT) { + return Data_Ordering.LT.value; + } + + ; + + if (v instanceof Data_Ordering.GT) { + return Data_Ordering.GT.value; + } + + ; + return Data_Ord.compare(Data_Ord.ordString)(x.value1)(y.value1); + }; +}); +module.exports = { + ResponseHeader: ResponseHeader, + name: name, + value: value, + eqResponseHeader: eqResponseHeader, + ordResponseHeader: ordResponseHeader, + showResponseHeader: showResponseHeader +}; +},{"../Data.Eq/index.js":"Pq4F","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7"}],"fv/y":[function(require,module,exports) { +"use strict"; + +function id(x) { + return x; +} + +exports.fromBoolean = id; +exports.fromNumber = id; +exports.fromString = id; +exports.fromArray = id; +exports.fromObject = id; +exports.jsonNull = null; + +exports.stringify = function (j) { + return JSON.stringify(j); +}; + +var objToString = Object.prototype.toString; +var objKeys = Object.keys; + +function isArray(a) { + return objToString.call(a) === "[object Array]"; +} + +exports._caseJson = function (isNull, isBool, isNum, isStr, isArr, isObj, j) { + if (j == null) return isNull();else if (typeof j === "boolean") return isBool(j);else if (typeof j === "number") return isNum(j);else if (typeof j === "string") return isStr(j);else if (objToString.call(j) === "[object Array]") return isArr(j);else return isObj(j); +}; + +exports._compare = function _compare(EQ, GT, LT, a, b) { + if (a == null) { + if (b == null) return EQ;else return LT; + } else if (typeof a === "boolean") { + if (typeof b === "boolean") { + // boolean / boolean + if (a === b) return EQ;else if (a === false) return LT;else return GT; + } else if (b == null) return GT;else return LT; + } else if (typeof a === "number") { + if (typeof b === "number") { + if (a === b) return EQ;else if (a < b) return LT;else return GT; + } else if (b == null) return GT;else if (typeof b === "boolean") return GT;else return LT; + } else if (typeof a === "string") { + if (typeof b === "string") { + if (a === b) return EQ;else if (a < b) return LT;else return GT; + } else if (b == null) return GT;else if (typeof b === "boolean") return GT;else if (typeof b === "number") return GT;else return LT; + } else if (isArray(a)) { + if (isArray(b)) { + for (var i = 0; i < Math.min(a.length, b.length); i++) { + var ca = _compare(EQ, GT, LT, a[i], b[i]); + + if (ca !== EQ) return ca; + } + + if (a.length === b.length) return EQ;else if (a.length < b.length) return LT;else return GT; + } else if (b == null) return GT;else if (typeof b === "boolean") return GT;else if (typeof b === "number") return GT;else if (typeof b === "string") return GT;else return LT; + } else { + if (b == null) return GT;else if (typeof b === "boolean") return GT;else if (typeof b === "number") return GT;else if (typeof b === "string") return GT;else if (isArray(b)) return GT;else { + var akeys = objKeys(a); + var bkeys = objKeys(b); + if (akeys.length < bkeys.length) return LT;else if (akeys.length > bkeys.length) return GT; + var keys = akeys.concat(bkeys).sort(); + + for (var j = 0; j < keys.length; j++) { + var k = keys[j]; + if (a[k] === undefined) return LT;else if (b[k] === undefined) return GT; + + var ck = _compare(EQ, GT, LT, a[k], b[k]); + + if (ck !== EQ) return ck; + } + + return EQ; + } + } +}; +},{}],"pA4l":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Foreign_Object = require("../Foreign.Object/index.js"); + +var verbJsonType = function verbJsonType(def) { + return function (f) { + return function (g) { + return g(def)(f); + }; + }; +}; + +var toJsonType = verbJsonType(Data_Maybe.Nothing.value)(Data_Maybe.Just.create); +var jsonZero = $foreign.fromNumber(0.0); +var jsonTrue = $foreign.fromBoolean(true); + +var jsonSingletonObject = function jsonSingletonObject(key) { + return function (val) { + return $foreign.fromObject(Foreign_Object.singleton(key)(val)); + }; +}; + +var jsonSingletonArray = function jsonSingletonArray(j) { + return $foreign.fromArray([j]); +}; + +var jsonFalse = $foreign.fromBoolean(false); +var jsonEmptyString = $foreign.fromString(""); +var jsonEmptyObject = $foreign.fromObject(Foreign_Object.empty); +var jsonEmptyArray = $foreign.fromArray([]); +var isJsonType = verbJsonType(false)(Data_Function["const"](true)); +var ordJson = new Data_Ord.Ord(function () { + return eqJson; +}, function (a) { + return function (b) { + return $foreign["_compare"](Data_Ordering.EQ.value, Data_Ordering.GT.value, Data_Ordering.LT.value, a, b); + }; +}); +var eqJson = new Data_Eq.Eq(function (j1) { + return function (j2) { + return Data_Eq.eq(Data_Ordering.eqOrdering)(Data_Ord.compare(ordJson)(j1)(j2))(Data_Ordering.EQ.value); + }; +}); +var eqJNull = new Data_Eq.Eq(function (v) { + return function (v1) { + return true; + }; +}); +var ordJNull = new Data_Ord.Ord(function () { + return eqJNull; +}, function (v) { + return function (v1) { + return Data_Ordering.EQ.value; + }; +}); + +var caseJsonString = function caseJsonString(d) { + return function (f) { + return function (j) { + return $foreign["_caseJson"](Data_Function["const"](d), Data_Function["const"](d), Data_Function["const"](d), f, Data_Function["const"](d), Data_Function["const"](d), j); + }; + }; +}; + +var isString = isJsonType(caseJsonString); +var toString = toJsonType(caseJsonString); + +var caseJsonObject = function caseJsonObject(d) { + return function (f) { + return function (j) { + return $foreign["_caseJson"](Data_Function["const"](d), Data_Function["const"](d), Data_Function["const"](d), Data_Function["const"](d), Data_Function["const"](d), f, j); + }; + }; +}; + +var isObject = isJsonType(caseJsonObject); +var toObject = toJsonType(caseJsonObject); + +var caseJsonNumber = function caseJsonNumber(d) { + return function (f) { + return function (j) { + return $foreign["_caseJson"](Data_Function["const"](d), Data_Function["const"](d), f, Data_Function["const"](d), Data_Function["const"](d), Data_Function["const"](d), j); + }; + }; +}; + +var isNumber = isJsonType(caseJsonNumber); +var toNumber = toJsonType(caseJsonNumber); + +var caseJsonNull = function caseJsonNull(d) { + return function (f) { + return function (j) { + return $foreign["_caseJson"](f, Data_Function["const"](d), Data_Function["const"](d), Data_Function["const"](d), Data_Function["const"](d), Data_Function["const"](d), j); + }; + }; +}; + +var isNull = isJsonType(caseJsonNull); +var toNull = toJsonType(caseJsonNull); + +var caseJsonBoolean = function caseJsonBoolean(d) { + return function (f) { + return function (j) { + return $foreign["_caseJson"](Data_Function["const"](d), f, Data_Function["const"](d), Data_Function["const"](d), Data_Function["const"](d), Data_Function["const"](d), j); + }; + }; +}; + +var isBoolean = isJsonType(caseJsonBoolean); +var toBoolean = toJsonType(caseJsonBoolean); + +var caseJsonArray = function caseJsonArray(d) { + return function (f) { + return function (j) { + return $foreign["_caseJson"](Data_Function["const"](d), Data_Function["const"](d), Data_Function["const"](d), Data_Function["const"](d), f, Data_Function["const"](d), j); + }; + }; +}; + +var isArray = isJsonType(caseJsonArray); +var toArray = toJsonType(caseJsonArray); + +var caseJson = function caseJson(a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function (json) { + return $foreign["_caseJson"](a, b, c, d, e, f, json); + }; + }; + }; + }; + }; + }; +}; + +module.exports = { + caseJson: caseJson, + caseJsonNull: caseJsonNull, + caseJsonBoolean: caseJsonBoolean, + caseJsonNumber: caseJsonNumber, + caseJsonString: caseJsonString, + caseJsonArray: caseJsonArray, + caseJsonObject: caseJsonObject, + isNull: isNull, + isBoolean: isBoolean, + isNumber: isNumber, + isString: isString, + isArray: isArray, + isObject: isObject, + toNull: toNull, + toBoolean: toBoolean, + toNumber: toNumber, + toString: toString, + toArray: toArray, + toObject: toObject, + jsonTrue: jsonTrue, + jsonFalse: jsonFalse, + jsonZero: jsonZero, + jsonEmptyString: jsonEmptyString, + jsonEmptyArray: jsonEmptyArray, + jsonSingletonArray: jsonSingletonArray, + jsonEmptyObject: jsonEmptyObject, + jsonSingletonObject: jsonSingletonObject, + eqJson: eqJson, + ordJson: ordJson, + fromBoolean: $foreign.fromBoolean, + fromNumber: $foreign.fromNumber, + fromString: $foreign.fromString, + fromArray: $foreign.fromArray, + fromObject: $foreign.fromObject, + jsonNull: $foreign.jsonNull, + stringify: $foreign.stringify +}; +},{"./foreign.js":"fv/y","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Foreign.Object/index.js":"jsiz"}],"p7JN":[function(require,module,exports) { +"use strict"; + +exports._jsonParser = function (fail, succ, s) { + try { + return succ(JSON.parse(s)); + } catch (e) { + return fail(e.message); + } +}; +},{}],"QxUV":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var jsonParser = function jsonParser(j) { + return $foreign["_jsonParser"](Data_Either.Left.create, Data_Either.Right.create, j); +}; + +module.exports = { + jsonParser: jsonParser +}; +},{"./foreign.js":"p7JN","../Data.Either/index.js":"B2JL"}],"7T8V":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_String_Common = require("../Data.String.Common/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Global_Unsafe = require("../Global.Unsafe/index.js"); + +var FormURLEncoded = function FormURLEncoded(x) { + return x; +}; + +var toArray = function toArray(v) { + return v; +}; + +var showFormUrlEncoded = new Data_Show.Show(function (v) { + return "(FormURLEncoded " + (Data_Show.show(Data_Show.showArray(Data_Tuple.showTuple(Data_Show.showString)(Data_Maybe.showMaybe(Data_Show.showString))))(v) + ")"); +}); +var semigroupFormUrlEncoded = Data_Semigroup.semigroupArray; +var ordFormUrlEncoded = Data_Ord.ordArray(Data_Tuple.ordTuple(Data_Ord.ordString)(Data_Maybe.ordMaybe(Data_Ord.ordString))); +var newtypeFormUrlEncoded = new Data_Newtype.Newtype(function (n) { + return n; +}, FormURLEncoded); +var monoidFormUrlEncoded = Data_Monoid.monoidArray; +var fromArray = FormURLEncoded; +var eqFormUrlEncoded = Data_Eq.eqArray(Data_Tuple.eqTuple(Data_Eq.eqString)(Data_Maybe.eqMaybe(Data_Eq.eqString))); + +var encode = function () { + var encodePart = function encodePart(v) { + if (v.value1 instanceof Data_Maybe.Nothing) { + return Global_Unsafe.unsafeEncodeURIComponent(v.value0); + } + + ; + + if (v.value1 instanceof Data_Maybe.Just) { + return Global_Unsafe.unsafeEncodeURIComponent(v.value0) + ("=" + Global_Unsafe.unsafeEncodeURIComponent(v.value1.value0)); + } + + ; + throw new Error("Failed pattern match at Data.FormURLEncoded (line 35, column 18 - line 37, column 90): " + [v.constructor.name]); + }; + + var $14 = Data_String_Common.joinWith("&"); + var $15 = Data_Functor.map(Data_Functor.functorArray)(encodePart); + return function ($16) { + return $14($15(toArray($16))); + }; +}(); + +module.exports = { + FormURLEncoded: FormURLEncoded, + fromArray: fromArray, + toArray: toArray, + encode: encode, + newtypeFormUrlEncoded: newtypeFormUrlEncoded, + eqFormUrlEncoded: eqFormUrlEncoded, + ordFormUrlEncoded: ordFormUrlEncoded, + semigroupFormUrlEncoded: semigroupFormUrlEncoded, + monoidFormUrlEncoded: monoidFormUrlEncoded, + showFormUrlEncoded: showFormUrlEncoded +}; +},{"../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.String.Common/index.js":"OSrc","../Data.Tuple/index.js":"II/O","../Global.Unsafe/index.js":"qSZP"}],"7p2I":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_String_Common = require("../Data.String.Common/index.js"); + +var OPTIONS = function () { + function OPTIONS() {} + + ; + OPTIONS.value = new OPTIONS(); + return OPTIONS; +}(); + +var GET = function () { + function GET() {} + + ; + GET.value = new GET(); + return GET; +}(); + +var HEAD = function () { + function HEAD() {} + + ; + HEAD.value = new HEAD(); + return HEAD; +}(); + +var POST = function () { + function POST() {} + + ; + POST.value = new POST(); + return POST; +}(); + +var PUT = function () { + function PUT() {} + + ; + PUT.value = new PUT(); + return PUT; +}(); + +var DELETE = function () { + function DELETE() {} + + ; + DELETE.value = new DELETE(); + return DELETE; +}(); + +var TRACE = function () { + function TRACE() {} + + ; + TRACE.value = new TRACE(); + return TRACE; +}(); + +var CONNECT = function () { + function CONNECT() {} + + ; + CONNECT.value = new CONNECT(); + return CONNECT; +}(); + +var PROPFIND = function () { + function PROPFIND() {} + + ; + PROPFIND.value = new PROPFIND(); + return PROPFIND; +}(); + +var PROPPATCH = function () { + function PROPPATCH() {} + + ; + PROPPATCH.value = new PROPPATCH(); + return PROPPATCH; +}(); + +var MKCOL = function () { + function MKCOL() {} + + ; + MKCOL.value = new MKCOL(); + return MKCOL; +}(); + +var COPY = function () { + function COPY() {} + + ; + COPY.value = new COPY(); + return COPY; +}(); + +var MOVE = function () { + function MOVE() {} + + ; + MOVE.value = new MOVE(); + return MOVE; +}(); + +var LOCK = function () { + function LOCK() {} + + ; + LOCK.value = new LOCK(); + return LOCK; +}(); + +var UNLOCK = function () { + function UNLOCK() {} + + ; + UNLOCK.value = new UNLOCK(); + return UNLOCK; +}(); + +var PATCH = function () { + function PATCH() {} + + ; + PATCH.value = new PATCH(); + return PATCH; +}(); + +var CustomMethod = function CustomMethod(x) { + return x; +}; + +var unCustomMethod = function unCustomMethod(v) { + return v; +}; + +var showMethod = new Data_Show.Show(function (v) { + if (v instanceof OPTIONS) { + return "OPTIONS"; + } + + ; + + if (v instanceof GET) { + return "GET"; + } + + ; + + if (v instanceof HEAD) { + return "HEAD"; + } + + ; + + if (v instanceof POST) { + return "POST"; + } + + ; + + if (v instanceof PUT) { + return "PUT"; + } + + ; + + if (v instanceof DELETE) { + return "DELETE"; + } + + ; + + if (v instanceof TRACE) { + return "TRACE"; + } + + ; + + if (v instanceof CONNECT) { + return "CONNECT"; + } + + ; + + if (v instanceof PROPFIND) { + return "PROPFIND"; + } + + ; + + if (v instanceof PROPPATCH) { + return "PROPPATCH"; + } + + ; + + if (v instanceof MKCOL) { + return "MKCOL"; + } + + ; + + if (v instanceof COPY) { + return "COPY"; + } + + ; + + if (v instanceof MOVE) { + return "MOVE"; + } + + ; + + if (v instanceof LOCK) { + return "LOCK"; + } + + ; + + if (v instanceof UNLOCK) { + return "UNLOCK"; + } + + ; + + if (v instanceof PATCH) { + return "PATCH"; + } + + ; + throw new Error("Failed pattern match at Data.HTTP.Method (line 40, column 1 - line 56, column 23): " + [v.constructor.name]); +}); +var showCustomMethod = new Data_Show.Show(function (v) { + return "(CustomMethod " + (Data_Show.show(Data_Show.showString)(v) + ")"); +}); +var print = Data_Either.either(Data_Show.show(showMethod))(unCustomMethod); + +var fromString = function fromString(s) { + var v = Data_String_Common.toUpper(s); + + if (v === "OPTIONS") { + return new Data_Either.Left(OPTIONS.value); + } + + ; + + if (v === "GET") { + return new Data_Either.Left(GET.value); + } + + ; + + if (v === "HEAD") { + return new Data_Either.Left(HEAD.value); + } + + ; + + if (v === "POST") { + return new Data_Either.Left(POST.value); + } + + ; + + if (v === "PUT") { + return new Data_Either.Left(PUT.value); + } + + ; + + if (v === "DELETE") { + return new Data_Either.Left(DELETE.value); + } + + ; + + if (v === "TRACE") { + return new Data_Either.Left(TRACE.value); + } + + ; + + if (v === "CONNECT") { + return new Data_Either.Left(CONNECT.value); + } + + ; + + if (v === "PROPFIND") { + return new Data_Either.Left(PROPFIND.value); + } + + ; + + if (v === "PROPPATCH") { + return new Data_Either.Left(PROPPATCH.value); + } + + ; + + if (v === "MKCOL") { + return new Data_Either.Left(MKCOL.value); + } + + ; + + if (v === "COPY") { + return new Data_Either.Left(COPY.value); + } + + ; + + if (v === "MOVE") { + return new Data_Either.Left(MOVE.value); + } + + ; + + if (v === "LOCK") { + return new Data_Either.Left(LOCK.value); + } + + ; + + if (v === "UNLOCK") { + return new Data_Either.Left(UNLOCK.value); + } + + ; + + if (v === "PATCH") { + return new Data_Either.Left(PATCH.value); + } + + ; + return new Data_Either.Right(v); +}; + +var eqMethod = new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof OPTIONS && y instanceof OPTIONS) { + return true; + } + + ; + + if (x instanceof GET && y instanceof GET) { + return true; + } + + ; + + if (x instanceof HEAD && y instanceof HEAD) { + return true; + } + + ; + + if (x instanceof POST && y instanceof POST) { + return true; + } + + ; + + if (x instanceof PUT && y instanceof PUT) { + return true; + } + + ; + + if (x instanceof DELETE && y instanceof DELETE) { + return true; + } + + ; + + if (x instanceof TRACE && y instanceof TRACE) { + return true; + } + + ; + + if (x instanceof CONNECT && y instanceof CONNECT) { + return true; + } + + ; + + if (x instanceof PROPFIND && y instanceof PROPFIND) { + return true; + } + + ; + + if (x instanceof PROPPATCH && y instanceof PROPPATCH) { + return true; + } + + ; + + if (x instanceof MKCOL && y instanceof MKCOL) { + return true; + } + + ; + + if (x instanceof COPY && y instanceof COPY) { + return true; + } + + ; + + if (x instanceof MOVE && y instanceof MOVE) { + return true; + } + + ; + + if (x instanceof LOCK && y instanceof LOCK) { + return true; + } + + ; + + if (x instanceof UNLOCK && y instanceof UNLOCK) { + return true; + } + + ; + + if (x instanceof PATCH && y instanceof PATCH) { + return true; + } + + ; + return false; + }; +}); +var ordMethod = new Data_Ord.Ord(function () { + return eqMethod; +}, function (x) { + return function (y) { + if (x instanceof OPTIONS && y instanceof OPTIONS) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof OPTIONS) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof OPTIONS) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof GET && y instanceof GET) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof GET) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof GET) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof HEAD && y instanceof HEAD) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof HEAD) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof HEAD) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof POST && y instanceof POST) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof POST) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof POST) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof PUT && y instanceof PUT) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof PUT) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof PUT) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof DELETE && y instanceof DELETE) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof DELETE) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof DELETE) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof TRACE && y instanceof TRACE) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof TRACE) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof TRACE) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof CONNECT && y instanceof CONNECT) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof CONNECT) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof CONNECT) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof PROPFIND && y instanceof PROPFIND) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof PROPFIND) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof PROPFIND) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof PROPPATCH && y instanceof PROPPATCH) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof PROPPATCH) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof PROPPATCH) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof MKCOL && y instanceof MKCOL) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof MKCOL) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof MKCOL) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof COPY && y instanceof COPY) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof COPY) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof COPY) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof MOVE && y instanceof MOVE) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof MOVE) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof MOVE) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof LOCK && y instanceof LOCK) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof LOCK) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof LOCK) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof UNLOCK && y instanceof UNLOCK) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof UNLOCK) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof UNLOCK) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof PATCH && y instanceof PATCH) { + return Data_Ordering.EQ.value; + } + + ; + throw new Error("Failed pattern match at Data.HTTP.Method (line 38, column 1 - line 38, column 40): " + [x.constructor.name, y.constructor.name]); + }; +}); +var eqCustomMethod = new Data_Eq.Eq(function (x) { + return function (y) { + return x === y; + }; +}); +var ordCustomMethod = new Data_Ord.Ord(function () { + return eqCustomMethod; +}, function (x) { + return function (y) { + return Data_Ord.compare(Data_Ord.ordString)(x)(y); + }; +}); +module.exports = { + OPTIONS: OPTIONS, + GET: GET, + HEAD: HEAD, + POST: POST, + PUT: PUT, + DELETE: DELETE, + TRACE: TRACE, + CONNECT: CONNECT, + PROPFIND: PROPFIND, + PROPPATCH: PROPPATCH, + MKCOL: MKCOL, + COPY: COPY, + MOVE: MOVE, + LOCK: LOCK, + UNLOCK: UNLOCK, + PATCH: PATCH, + unCustomMethod: unCustomMethod, + fromString: fromString, + print: print, + eqMethod: eqMethod, + ordMethod: ordMethod, + showMethod: showMethod, + eqCustomMethod: eqCustomMethod, + ordCustomMethod: ordCustomMethod, + showCustomMethod: showCustomMethod +}; +},{"../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7","../Data.String.Common/index.js":"OSrc"}],"z+2M":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Either = require("../Data.Either/index.js"); + +var Effect_Aff = require("../Effect.Aff/index.js"); + +var EffectFnCanceler = function EffectFnCanceler(x) { + return x; +}; + +var EffectFnAff = function EffectFnAff(x) { + return x; +}; + +var fromEffectFnAff = function fromEffectFnAff(v) { + return Effect_Aff.makeAff(function (k) { + return function __do() { + var v1 = v(function ($4) { + return k(Data_Either.Left.create($4))(); + }, function ($5) { + return k(Data_Either.Right.create($5))(); + }); + return function (e) { + return Effect_Aff.makeAff(function (k2) { + return function __do() { + v1(e, function ($6) { + return k2(Data_Either.Left.create($6))(); + }, function ($7) { + return k2(Data_Either.Right.create($7))(); + }); + return Effect_Aff.nonCanceler; + }; + }); + }; + }; + }); +}; + +module.exports = { + EffectFnAff: EffectFnAff, + EffectFnCanceler: EffectFnCanceler, + fromEffectFnAff: fromEffectFnAff +}; +},{"../Data.Either/index.js":"B2JL","../Effect.Aff/index.js":"I7lu"}],"IjAr":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Affjax_RequestBody = require("../Affjax.RequestBody/index.js"); + +var Affjax_RequestHeader = require("../Affjax.RequestHeader/index.js"); + +var Affjax_ResponseFormat = require("../Affjax.ResponseFormat/index.js"); + +var Affjax_ResponseHeader = require("../Affjax.ResponseHeader/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js"); + +var Control_Monad_Except = require("../Control.Monad.Except/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Control_Parallel = require("../Control.Parallel/index.js"); + +var Data_Argonaut_Core = require("../Data.Argonaut.Core/index.js"); + +var Data_Argonaut_Parser = require("../Data.Argonaut.Parser/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FormURLEncoded = require("../Data.FormURLEncoded/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_HTTP_Method = require("../Data.HTTP.Method/index.js"); + +var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Data_List_NonEmpty = require("../Data.List.NonEmpty/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Nullable = require("../Data.Nullable/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Time_Duration = require("../Data.Time.Duration/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Effect_Aff = require("../Effect.Aff/index.js"); + +var Effect_Aff_Compat = require("../Effect.Aff.Compat/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var Effect_Exception = require("../Effect.Exception/index.js"); + +var Effect_Ref = require("../Effect.Ref/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var $$Math = require("../Math/index.js"); + +var retry = function retry(policy) { + return function (run) { + return function (req) { + var retryState = function retryState(v) { + if (v instanceof Data_Either.Left) { + return Data_Either.Left.create(new Data_Either.Left(v.value0)); + } + + ; + + if (v instanceof Data_Either.Right) { + if (v.value0.status === 200) { + return new Data_Either.Right(v.value0); + } + + ; + var $29 = policy.shouldRetryWithStatusCode(v.value0.status); + + if ($29) { + return Data_Either.Left.create(new Data_Either.Right(v.value0)); + } + + ; + return new Data_Either.Right(v.value0); + } + + ; + throw new Error("Failed pattern match at Affjax (line 206, column 5 - line 208, column 39): " + [v.constructor.name]); + }; + + var go = function go(failureRef) { + return function (n) { + return Control_Bind.bind(Effect_Aff.bindAff)(Data_Functor.map(Effect_Aff.functorAff)(retryState)(Control_Monad_Error_Class["try"](Effect_Aff.monadErrorAff)(run(req))))(function (v) { + if (v instanceof Data_Either.Left) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Effect_Ref.write(new Data_Maybe.Just(v.value0))(failureRef)))(function () { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Effect_Aff.delay(policy.delayCurve(n)))(function () { + return go(failureRef)(n + 1 | 0); + }); + }); + } + + ; + + if (v instanceof Data_Either.Right) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(v.value0); + } + + ; + throw new Error("Failed pattern match at Affjax (line 221, column 7 - line 226, column 32): " + [v.constructor.name]); + }); + }; + }; + + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Effect_Ref["new"](Data_Maybe.Nothing.value)))(function (v) { + var loop = go(v); + + if (policy.timeout instanceof Data_Maybe.Nothing) { + return loop(1); + } + + ; + + if (policy.timeout instanceof Data_Maybe.Just) { + return Control_Bind.bind(Effect_Aff.bindAff)(Control_Parallel.parOneOf(Effect_Aff.parallelAff)(Effect_Aff.alternativeParAff)(Data_Foldable.foldableArray)(Data_Functor.functorArray)([Data_Functor.map(Effect_Aff.functorAff)(Data_Maybe.Just.create)(loop(1)), Data_Functor.voidRight(Effect_Aff.functorAff)(Data_Maybe.Nothing.value)(Effect_Aff.delay(policy.timeout.value0))]))(function (v1) { + if (v1 instanceof Data_Maybe.Nothing) { + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Effect_Ref.read(v)))(function (v2) { + if (v2 instanceof Data_Maybe.Nothing) { + return Control_Monad_Error_Class.throwError(Effect_Aff.monadThrowAff)(Effect_Exception.error("Timeout")); + } + + ; + + if (v2 instanceof Data_Maybe.Just) { + return Data_Either.either(Control_Monad_Error_Class.throwError(Effect_Aff.monadThrowAff))(Control_Applicative.pure(Effect_Aff.applicativeAff))(v2.value0); + } + + ; + throw new Error("Failed pattern match at Affjax (line 201, column 11 - line 203, column 61): " + [v2.constructor.name]); + }); + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(v1.value0); + } + + ; + throw new Error("Failed pattern match at Affjax (line 198, column 7 - line 204, column 31): " + [v1.constructor.name]); + }); + } + + ; + throw new Error("Failed pattern match at Affjax (line 194, column 3 - line 204, column 31): " + [policy.timeout.constructor.name]); + }); + }; + }; +}; + +var request = function request(req) { + var parseJSON = function parseJSON(v) { + if (v === "") { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Argonaut_Core.jsonEmptyObject); + } + + ; + return Data_Either.either(function ($66) { + return Foreign.fail(Foreign.ForeignError.create($66)); + })(Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity)))(Data_Argonaut_Parser.jsonParser(v)); + }; + + var fromResponse$prime = function () { + if (req.responseFormat instanceof Affjax_ResponseFormat["ArrayBuffer"]) { + return Foreign.unsafeReadTagged("ArrayBuffer"); + } + + ; + + if (req.responseFormat instanceof Affjax_ResponseFormat.Blob) { + return Foreign.unsafeReadTagged("Blob"); + } + + ; + + if (req.responseFormat instanceof Affjax_ResponseFormat.Document) { + return Foreign.unsafeReadTagged("Document"); + } + + ; + + if (req.responseFormat instanceof Affjax_ResponseFormat.Json) { + return Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(function ($67) { + return req.responseFormat.value0(parseJSON($67)); + })(Foreign.unsafeReadTagged("String")); + } + + ; + + if (req.responseFormat instanceof Affjax_ResponseFormat["String"]) { + return Foreign.unsafeReadTagged("String"); + } + + ; + + if (req.responseFormat instanceof Affjax_ResponseFormat.Ignore) { + return Data_Function["const"](req.responseFormat.value0(Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Unit.unit))); + } + + ; + throw new Error("Failed pattern match at Affjax (line 294, column 19 - line 300, column 57): " + [req.responseFormat.constructor.name]); + }(); + + var extractContent = function extractContent(v) { + if (v instanceof Affjax_RequestBody.ArrayView) { + return v.value0(Foreign.unsafeToForeign); + } + + ; + + if (v instanceof Affjax_RequestBody.Blob) { + return Foreign.unsafeToForeign(v.value0); + } + + ; + + if (v instanceof Affjax_RequestBody.Document) { + return Foreign.unsafeToForeign(v.value0); + } + + ; + + if (v instanceof Affjax_RequestBody["String"]) { + return Foreign.unsafeToForeign(v.value0); + } + + ; + + if (v instanceof Affjax_RequestBody.FormData) { + return Foreign.unsafeToForeign(v.value0); + } + + ; + + if (v instanceof Affjax_RequestBody.FormURLEncoded) { + return Foreign.unsafeToForeign(Data_FormURLEncoded.encode(v.value0)); + } + + ; + + if (v instanceof Affjax_RequestBody.Json) { + return Foreign.unsafeToForeign(Data_Argonaut_Core.stringify(v.value0)); + } + + ; + throw new Error("Failed pattern match at Affjax (line 268, column 20 - line 275, column 57): " + [v.constructor.name]); + }; + + var addHeader = function addHeader(mh) { + return function (hs) { + if (mh instanceof Data_Maybe.Just && !Data_Foldable.any(Data_Foldable.foldableArray)(Data_HeytingAlgebra.heytingAlgebraBoolean)(Data_Function.on(Data_Eq.eq(Data_Eq.eqString))(Affjax_RequestHeader.name)(mh.value0))(hs)) { + return Data_Array.snoc(hs)(mh.value0); + } + + ; + return hs; + }; + }; + + var headers = function headers(reqContent) { + return addHeader(Data_Functor.map(Data_Maybe.functorMaybe)(Affjax_RequestHeader.ContentType.create)(Control_Bind.bindFlipped(Data_Maybe.bindMaybe)(Affjax_RequestBody.toMediaType)(reqContent)))(addHeader(Data_Functor.map(Data_Maybe.functorMaybe)(Affjax_RequestHeader.Accept.create)(Affjax_ResponseFormat.toMediaType(req.responseFormat)))(req.headers)); + }; + + var req$prime = { + method: Data_HTTP_Method.print(req.method), + url: req.url, + headers: Data_Functor.map(Data_Functor.functorArray)(function (h) { + return { + field: Affjax_RequestHeader.name(h), + value: Affjax_RequestHeader.value(h) + }; + })(headers(req.content)), + content: Data_Nullable.toNullable(Data_Functor.map(Data_Maybe.functorMaybe)(extractContent)(req.content)), + responseType: Affjax_ResponseFormat.toResponseType(req.responseFormat), + username: Data_Nullable.toNullable(req.username), + password: Data_Nullable.toNullable(req.password), + withCredentials: req.withCredentials + }; + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Aff_Compat.fromEffectFnAff($foreign["_ajax"](Affjax_ResponseHeader.ResponseHeader.create, req$prime)))(function (v) { + var v1 = Control_Monad_Except.runExcept(fromResponse$prime(v.body)); + + if (v1 instanceof Data_Either.Left) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)({ + body: new Data_Either.Left(new Affjax_ResponseFormat.ResponseFormatError(Data_List_NonEmpty.head(v1.value0), v.body)), + headers: v.headers, + status: v.status, + statusText: v.statusText + }); + } + + ; + + if (v1 instanceof Data_Either.Right) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)({ + body: new Data_Either.Right(v1.value0), + headers: v.headers, + status: v.status, + statusText: v.statusText + }); + } + + ; + throw new Error("Failed pattern match at Affjax (line 248, column 3 - line 252, column 39): " + [v1.constructor.name]); + }); +}; + +var defaultRetryPolicy = { + timeout: Data_Maybe.Nothing.value, + delayCurve: function delayCurve(n) { + return Data_Time_Duration.Milliseconds(Data_Ord.max(Data_Ord.ordNumber)(30.0 * 1000.0)(100.0 * $$Math.pow(2.0)(Data_Int.toNumber(n - 1 | 0)))); + }, + shouldRetryWithStatusCode: Data_Function["const"](false) +}; +var defaultRequest = { + method: new Data_Either.Left(Data_HTTP_Method.GET.value), + url: "/", + headers: [], + content: Data_Maybe.Nothing.value, + username: Data_Maybe.Nothing.value, + password: Data_Maybe.Nothing.value, + withCredentials: false, + responseFormat: Affjax_ResponseFormat.ignore +}; + +var $$delete = function $$delete(rf) { + return function (u) { + return request({ + method: new Data_Either.Left(Data_HTTP_Method.DELETE.value), + url: u, + headers: defaultRequest.headers, + content: defaultRequest.content, + username: defaultRequest.username, + password: defaultRequest.password, + withCredentials: defaultRequest.withCredentials, + responseFormat: rf + }); + }; +}; + +var delete_ = function () { + var $68 = Data_Functor.map(Effect_Aff.functorAff)(function (v) { + return { + body: Data_Unit.unit, + headers: v.headers, + status: v.status, + statusText: v.statusText + }; + }); + var $69 = $$delete(Affjax_ResponseFormat.ignore); + return function ($70) { + return $68($69($70)); + }; +}(); + +var get = function get(rf) { + return function (u) { + return request({ + method: defaultRequest.method, + url: u, + headers: defaultRequest.headers, + content: defaultRequest.content, + username: defaultRequest.username, + password: defaultRequest.password, + withCredentials: defaultRequest.withCredentials, + responseFormat: rf + }); + }; +}; + +var patch = function patch(rf) { + return function (u) { + return function (c) { + return request({ + method: new Data_Either.Left(Data_HTTP_Method.PATCH.value), + url: u, + headers: defaultRequest.headers, + content: new Data_Maybe.Just(c), + username: defaultRequest.username, + password: defaultRequest.password, + withCredentials: defaultRequest.withCredentials, + responseFormat: rf + }); + }; + }; +}; + +var patch_ = function patch_(url) { + var $71 = Data_Functor.map(Effect_Aff.functorAff)(function (v) { + return { + body: Data_Unit.unit, + headers: v.headers, + status: v.status, + statusText: v.statusText + }; + }); + var $72 = patch(Affjax_ResponseFormat.ignore)(url); + return function ($73) { + return $71($72($73)); + }; +}; + +var patch$prime = function patch$prime(rf) { + return function (u) { + return function (c) { + return request({ + method: new Data_Either.Left(Data_HTTP_Method.PATCH.value), + url: u, + headers: defaultRequest.headers, + content: c, + username: defaultRequest.username, + password: defaultRequest.password, + withCredentials: defaultRequest.withCredentials, + responseFormat: rf + }); + }; + }; +}; + +var patch_$prime = function patch_$prime(url) { + var $74 = Data_Functor.map(Effect_Aff.functorAff)(function (v) { + return { + body: Data_Unit.unit, + headers: v.headers, + status: v.status, + statusText: v.statusText + }; + }); + var $75 = patch$prime(Affjax_ResponseFormat.ignore)(url); + return function ($76) { + return $74($75($76)); + }; +}; + +var post = function post(rf) { + return function (u) { + return function (c) { + return request({ + method: new Data_Either.Left(Data_HTTP_Method.POST.value), + url: u, + headers: defaultRequest.headers, + content: new Data_Maybe.Just(c), + username: defaultRequest.username, + password: defaultRequest.password, + withCredentials: defaultRequest.withCredentials, + responseFormat: rf + }); + }; + }; +}; + +var post_ = function post_(url) { + var $77 = Data_Functor.map(Effect_Aff.functorAff)(function (v) { + return { + body: Data_Unit.unit, + headers: v.headers, + status: v.status, + statusText: v.statusText + }; + }); + var $78 = post(Affjax_ResponseFormat.ignore)(url); + return function ($79) { + return $77($78($79)); + }; +}; + +var post$prime = function post$prime(rf) { + return function (u) { + return function (c) { + return request({ + method: new Data_Either.Left(Data_HTTP_Method.POST.value), + url: u, + headers: defaultRequest.headers, + content: c, + username: defaultRequest.username, + password: defaultRequest.password, + withCredentials: defaultRequest.withCredentials, + responseFormat: rf + }); + }; + }; +}; + +var post_$prime = function post_$prime(url) { + var $80 = Data_Functor.map(Effect_Aff.functorAff)(function (v) { + return { + body: Data_Unit.unit, + headers: v.headers, + status: v.status, + statusText: v.statusText + }; + }); + var $81 = post$prime(Affjax_ResponseFormat.ignore)(url); + return function ($82) { + return $80($81($82)); + }; +}; + +var put = function put(rf) { + return function (u) { + return function (c) { + return request({ + method: new Data_Either.Left(Data_HTTP_Method.PUT.value), + url: u, + headers: defaultRequest.headers, + content: new Data_Maybe.Just(c), + username: defaultRequest.username, + password: defaultRequest.password, + withCredentials: defaultRequest.withCredentials, + responseFormat: rf + }); + }; + }; +}; + +var put_ = function put_(url) { + var $83 = Data_Functor.map(Effect_Aff.functorAff)(function (v) { + return { + body: Data_Unit.unit, + headers: v.headers, + status: v.status, + statusText: v.statusText + }; + }); + var $84 = put(Affjax_ResponseFormat.ignore)(url); + return function ($85) { + return $83($84($85)); + }; +}; + +var put$prime = function put$prime(rf) { + return function (u) { + return function (c) { + return request({ + method: new Data_Either.Left(Data_HTTP_Method.PUT.value), + url: u, + headers: defaultRequest.headers, + content: c, + username: defaultRequest.username, + password: defaultRequest.password, + withCredentials: defaultRequest.withCredentials, + responseFormat: rf + }); + }; + }; +}; + +var put_$prime = function put_$prime(url) { + var $86 = Data_Functor.map(Effect_Aff.functorAff)(function (v) { + return { + body: Data_Unit.unit, + headers: v.headers, + status: v.status, + statusText: v.statusText + }; + }); + var $87 = put$prime(Affjax_ResponseFormat.ignore)(url); + return function ($88) { + return $86($87($88)); + }; +}; + +module.exports = { + defaultRequest: defaultRequest, + request: request, + get: get, + post: post, + post_: post_, + "post'": post$prime, + "post_'": post_$prime, + put: put, + put_: put_, + "put'": put$prime, + "put_'": put_$prime, + "delete": $$delete, + delete_: delete_, + patch: patch, + patch_: patch_, + "patch'": patch$prime, + "patch_'": patch_$prime, + defaultRetryPolicy: defaultRetryPolicy, + retry: retry +}; +},{"./foreign.js":"sseR","../Affjax.RequestBody/index.js":"TX3z","../Affjax.RequestHeader/index.js":"QBMh","../Affjax.ResponseFormat/index.js":"QSsR","../Affjax.ResponseHeader/index.js":"ev5/","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Except/index.js":"Fye2","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Parallel/index.js":"LNK1","../Data.Argonaut.Core/index.js":"pA4l","../Data.Argonaut.Parser/index.js":"QxUV","../Data.Array/index.js":"4t4C","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FormURLEncoded/index.js":"7T8V","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HTTP.Method/index.js":"7p2I","../Data.HeytingAlgebra/index.js":"paZe","../Data.Identity/index.js":"2OKT","../Data.Int/index.js":"xNJb","../Data.List.NonEmpty/index.js":"XAY7","../Data.Maybe/index.js":"5mN7","../Data.Nullable/index.js":"YQ8o","../Data.Ord/index.js":"r4Vb","../Data.Time.Duration/index.js":"AnkF","../Data.Unit/index.js":"NhVk","../Effect.Aff/index.js":"I7lu","../Effect.Aff.Compat/index.js":"z+2M","../Effect.Class/index.js":"dWtH","../Effect.Exception/index.js":"0OCW","../Effect.Ref/index.js":"/Jaj","../Foreign/index.js":"pu1p","../Math/index.js":"Rpaz"}],"cxC4":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_Array_NonEmpty = require("../Data.Array.NonEmpty/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js"); + +var Data_Map_Internal = require("../Data.Map.Internal/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Set = require("../Data.Set/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Foreign_Object = require("../Foreign.Object/index.js"); + +var Index = function Index(ix) { + this.ix = ix; +}; + +var ix = function ix(dict) { + return dict.ix; +}; + +var indexSet = function indexSet(dictOrd) { + return new Index(function (x) { + return function (dictWander) { + return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) { + return function (coalg) { + var $22 = Control_Applicative.pure(dictApplicative); + var $23 = Data_Set.insert(dictOrd)(x); + return function ($24) { + return $22($23($24)); + }; + }; + }); + }; + }); +}; + +var indexNonEmptyArray = new Index(function (n) { + return function (dictWander) { + return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) { + return function (coalg) { + return function (xs) { + return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(xs))(function () { + var $25 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (x) { + return Data_Maybe.fromMaybe(xs)(Data_Array_NonEmpty.updateAt(n)(x)(xs)); + }); + return function ($26) { + return $25(coalg($26)); + }; + }())(Data_Array_NonEmpty.index(xs)(n)); + }; + }; + }); + }; +}); +var indexMaybe = new Index(function (v) { + return function (dictWander) { + return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) { + return Data_Traversable.traverse(Data_Traversable.traversableMaybe)(dictApplicative); + }); + }; +}); + +var indexMap = function indexMap(dictOrd) { + return new Index(function (k) { + return function (dictWander) { + return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) { + return function (coalg) { + return function (m) { + return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(m))(function () { + var $27 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (v) { + return Data_Map_Internal.insert(dictOrd)(k)(v)(m); + }); + return function ($28) { + return $27(coalg($28)); + }; + }())(Data_Map_Internal.lookup(dictOrd)(k)(m)); + }; + }; + }); + }; + }); +}; + +var indexIdentity = new Index(function (v) { + return function (dictWander) { + return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) { + return Data_Traversable.traverse(Data_Identity.traversableIdentity)(dictApplicative); + }); + }; +}); +var indexForeignObject = new Index(function (k) { + return function (dictWander) { + return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) { + return function (coalg) { + return function (m) { + return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(m))(function () { + var $29 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (v) { + return Foreign_Object.insert(k)(v)(m); + }); + return function ($30) { + return $29(coalg($30)); + }; + }())(Foreign_Object.lookup(k)(m)); + }; + }; + }); + }; +}); +var indexArray = new Index(function (n) { + return function (dictWander) { + return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) { + return function (coalg) { + return function (xs) { + return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(xs))(function () { + var $31 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (x) { + return Data_Maybe.fromMaybe(xs)(Data_Array.updateAt(n)(x)(xs)); + }); + return function ($32) { + return $31(coalg($32)); + }; + }())(Data_Array.index(xs)(n)); + }; + }; + }); + }; +}); + +var indexArr = function indexArr(dictEq) { + return new Index(function (i) { + return function (dictWander) { + return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) { + return function (coalg) { + return function (f) { + return Data_Functor.mapFlipped(dictApplicative.Apply0().Functor0())(coalg(f(i)))(function (a) { + return function (j) { + var $21 = Data_Eq.eq(dictEq)(i)(j); + + if ($21) { + return a; + } + + ; + return f(j); + }; + }); + }; + }; + }); + }; + }); +}; + +module.exports = { + Index: Index, + ix: ix, + indexArr: indexArr, + indexMaybe: indexMaybe, + indexIdentity: indexIdentity, + indexArray: indexArray, + indexNonEmptyArray: indexNonEmptyArray, + indexSet: indexSet, + indexMap: indexMap, + indexForeignObject: indexForeignObject +}; +},{"../Control.Applicative/index.js":"qYya","../Data.Array/index.js":"4t4C","../Data.Array.NonEmpty/index.js":"eTKN","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Lens.Internal.Wander/index.js":"i7fd","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Set/index.js":"+Eae","../Data.Traversable/index.js":"n7EE","../Foreign.Object/index.js":"jsiz"}],"kMIS":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var V = function V(x) { + return x; +}; + +var unV = function unV(v) { + return function (v1) { + return function (v2) { + if (v2 instanceof Data_Either.Left) { + return v(v2.value0); + } + + ; + + if (v2 instanceof Data_Either.Right) { + return v1(v2.value0); + } + + ; + throw new Error("Failed pattern match at Data.Validation.Semigroup (line 47, column 1 - line 47, column 77): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]); + }; + }; +}; + +var toEither = function toEither(v) { + return v; +}; + +var showV = function showV(dictShow) { + return function (dictShow1) { + return new Data_Show.Show(function (v) { + if (v instanceof Data_Either.Left) { + return "invalid (" + (Data_Show.show(dictShow)(v.value0) + ")"); + } + + ; + + if (v instanceof Data_Either.Right) { + return "pure (" + (Data_Show.show(dictShow1)(v.value0) + ")"); + } + + ; + throw new Error("Failed pattern match at Data.Validation.Semigroup (line 80, column 10 - line 82, column 55): " + [v.constructor.name]); + }); + }; +}; + +var newtypeV = new Data_Newtype.Newtype(function (n) { + return n; +}, V); + +var isValid = function isValid(v) { + if (v instanceof Data_Either.Right) { + return true; + } + + ; + return false; +}; + +var invalid = function invalid($61) { + return V(Data_Either.Left.create($61)); +}; + +var functorV = Data_Either.functorEither; +var foldableV = new Data_Foldable.Foldable(function (dictMonoid) { + return unV(Data_Function["const"](Data_Monoid.mempty(dictMonoid))); +}, function (f) { + return function (b) { + return unV(Data_Function["const"](b))(f(b)); + }; +}, function (f) { + return function (b) { + return unV(Data_Function["const"](b))(Data_Function.flip(f)(b)); + }; +}); +var traversableV = new Data_Traversable.Traversable(function () { + return foldableV; +}, function () { + return functorV; +}, function (dictApplicative) { + return unV(function () { + var $62 = Control_Applicative.pure(dictApplicative); + return function ($63) { + return $62(V(Data_Either.Left.create($63))); + }; + }())(Data_Functor.map(dictApplicative.Apply0().Functor0())(function ($64) { + return V(Data_Either.Right.create($64)); + })); +}, function (dictApplicative) { + return function (f) { + return unV(function () { + var $65 = Control_Applicative.pure(dictApplicative); + return function ($66) { + return $65(V(Data_Either.Left.create($66))); + }; + }())(function () { + var $67 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function ($69) { + return V(Data_Either.Right.create($69)); + }); + return function ($68) { + return $67(f($68)); + }; + }()); + }; +}); + +var eqV = function eqV(dictEq) { + return function (dictEq1) { + return new Data_Eq.Eq(function (x) { + return function (y) { + return Data_Eq.eq(Data_Either.eqEither(dictEq)(dictEq1))(x)(y); + }; + }); + }; +}; + +var ordV = function ordV(dictOrd) { + return function (dictOrd1) { + return new Data_Ord.Ord(function () { + return eqV(dictOrd.Eq0())(dictOrd1.Eq0()); + }, function (x) { + return function (y) { + return Data_Ord.compare(Data_Either.ordEither(dictOrd)(dictOrd1))(x)(y); + }; + }); + }; +}; + +var eq1V = function eq1V(dictEq) { + return new Data_Eq.Eq1(function (dictEq1) { + return Data_Eq.eq(eqV(dictEq)(dictEq1)); + }); +}; + +var ord1V = function ord1V(dictOrd) { + return new Data_Ord.Ord1(function () { + return eq1V(dictOrd.Eq0()); + }, function (dictOrd1) { + return Data_Ord.compare(ordV(dictOrd)(dictOrd1)); + }); +}; + +var bifunctorV = Data_Either.bifunctorEither; + +var applyV = function applyV(dictSemigroup) { + return new Control_Apply.Apply(function () { + return functorV; + }, function (v) { + return function (v1) { + if (v instanceof Data_Either.Left && v1 instanceof Data_Either.Left) { + return new Data_Either.Left(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0)); + } + + ; + + if (v instanceof Data_Either.Left) { + return new Data_Either.Left(v.value0); + } + + ; + + if (v1 instanceof Data_Either.Left) { + return new Data_Either.Left(v1.value0); + } + + ; + + if (v instanceof Data_Either.Right && v1 instanceof Data_Either.Right) { + return new Data_Either.Right(v.value0(v1.value0)); + } + + ; + throw new Error("Failed pattern match at Data.Validation.Semigroup (line 88, column 1 - line 92, column 54): " + [v.constructor.name, v1.constructor.name]); + }; + }); +}; + +var semigroupV = function semigroupV(dictSemigroup) { + return function (dictSemigroup1) { + return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyV(dictSemigroup))(Data_Semigroup.append(dictSemigroup1))); + }; +}; + +var applicativeV = function applicativeV(dictSemigroup) { + return new Control_Applicative.Applicative(function () { + return applyV(dictSemigroup); + }, function ($70) { + return V(Data_Either.Right.create($70)); + }); +}; + +var monoidV = function monoidV(dictSemigroup) { + return function (dictMonoid) { + return new Data_Monoid.Monoid(function () { + return semigroupV(dictSemigroup)(dictMonoid.Semigroup0()); + }, Control_Applicative.pure(applicativeV(dictSemigroup))(Data_Monoid.mempty(dictMonoid))); + }; +}; + +var andThen = function andThen(v1) { + return function (f) { + return unV(invalid)(f)(v1); + }; +}; + +module.exports = { + V: V, + unV: unV, + invalid: invalid, + isValid: isValid, + toEither: toEither, + andThen: andThen, + newtypeV: newtypeV, + eqV: eqV, + eq1V: eq1V, + ordV: ordV, + ord1V: ord1V, + showV: showV, + functorV: functorV, + bifunctorV: bifunctorV, + applyV: applyV, + applicativeV: applicativeV, + semigroupV: semigroupV, + monoidV: monoidV, + foldableV: foldableV, + traversableV: traversableV +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE"}],"UuEA":[function(require,module,exports) { +var process = require("process"); +// Generated by purs version 0.13.2 +"use strict"; + +var Affjax = require("../Affjax/index.js"); + +var Affjax_ResponseFormat = require("../Affjax.ResponseFormat/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js"); + +var Control_Monad_Except = require("../Control.Monad.Except/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_BigInt = require("../Data.BigInt/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Filterable = require("../Data.Filterable/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Data_Lens_Fold = require("../Data.Lens.Fold/index.js"); + +var Data_Lens_Index = require("../Data.Lens.Index/index.js"); + +var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js"); + +var Data_List = require("../Data.List/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Map_Internal = require("../Data.Map.Internal/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Maybe_First = require("../Data.Maybe.First/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Pair = require("../Data.Pair/index.js"); + +var Data_String_CodePoints = require("../Data.String.CodePoints/index.js"); + +var Data_String_Common = require("../Data.String.Common/index.js"); + +var Data_String_Pattern = require("../Data.String.Pattern/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Time_Duration = require("../Data.Time.Duration/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Data_Validation_Semigroup = require("../Data.Validation.Semigroup/index.js"); + +var Effect_Aff = require("../Effect.Aff/index.js"); + +var Effect_Exception = require("../Effect.Exception/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var Genetics_Browser = require("../Genetics.Browser/index.js"); + +var Genetics_Browser_Coordinates = require("../Genetics.Browser.Coordinates/index.js"); + +var Genetics_Browser_Types = require("../Genetics.Browser.Types/index.js"); + +var Simple_JSON = require("../Simple.JSON/index.js"); + +var validInt = function validInt(s) { + var v = Data_Int.fromString(s); + + if (v instanceof Data_Maybe.Nothing) { + return Data_Validation_Semigroup.invalid(Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList)("Error parsing int " + s)); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return Control_Applicative.pure(Data_Validation_Semigroup.applicativeV(Data_List_Types.semigroupNonEmptyList))(v.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Bed (line 98, column 14 - line 100, column 20): " + [v.constructor.name]); +}; + +var validChrId = function () { + var $39 = Control_Applicative.pure(Data_Validation_Semigroup.applicativeV(Data_List_Types.semigroupNonEmptyList)); + var $40 = Data_Newtype.wrap(Genetics_Browser_Types.newtypeChrId); + var $41 = Data_String_CodePoints.drop(3); + return function ($42) { + return $39($40($41($42))); + }; +}(); + +var validBigInt = function validBigInt(s) { + var v = Data_BigInt.fromString(s); + + if (v instanceof Data_Maybe.Nothing) { + return Data_Validation_Semigroup.invalid(Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList)("Error parsing int " + s)); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return Control_Applicative.pure(Data_Validation_Semigroup.applicativeV(Data_List_Types.semigroupNonEmptyList))(v.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Bed (line 103, column 17 - line 105, column 20): " + [v.constructor.name]); +}; + +var validList = function validList(x) { + return Data_Traversable.traverse(Data_Traversable.traversableArray)(Data_Validation_Semigroup.applicativeV(Data_List_Types.semigroupNonEmptyList))(validBigInt)(Data_String_Common.split(Data_Newtype.wrap(Data_String_Pattern.newtypePattern)(","))(x)); +}; + +var validLine = function validLine(l) { + return Control_Apply.apply(Data_Validation_Semigroup.applyV(Data_List_Types.semigroupNonEmptyList))(Control_Apply.apply(Data_Validation_Semigroup.applyV(Data_List_Types.semigroupNonEmptyList))(Control_Apply.apply(Data_Validation_Semigroup.applyV(Data_List_Types.semigroupNonEmptyList))(Control_Apply.apply(Data_Validation_Semigroup.applyV(Data_List_Types.semigroupNonEmptyList))(Control_Apply.apply(Data_Validation_Semigroup.applyV(Data_List_Types.semigroupNonEmptyList))(Control_Apply.apply(Data_Validation_Semigroup.applyV(Data_List_Types.semigroupNonEmptyList))(Control_Apply.apply(Data_Validation_Semigroup.applyV(Data_List_Types.semigroupNonEmptyList))(Control_Apply.apply(Data_Validation_Semigroup.applyV(Data_List_Types.semigroupNonEmptyList))(Data_Functor.map(Data_Validation_Semigroup.functorV)(function (v) { + return function (v1) { + return function (v2) { + return function (v3) { + return function (v4) { + return function (v5) { + return function (v6) { + return function (v7) { + return function (v8) { + return { + chrom: v, + chromStart: v1, + chromEnd: v2, + score: v3, + thickStart: v4, + thickEnd: v5, + blockCount: v6, + blockSizes: v7, + blockStarts: v8, + geneId: l.geneId, + geneName: l.geneName, + itemRgb: l.itemRgb, + name: l.name, + strand: l.strand, + tags: l.tags, + type: l.type + }; + }; + }; + }; + }; + }; + }; + }; + }; + })(validChrId(l.chrom)))(validBigInt(l.chromStart)))(validBigInt(l.chromEnd)))(validInt(l.score)))(validBigInt(l.thickStart)))(validBigInt(l.thickEnd)))(validInt(l.blockCount)))(validList(l.blockSizes)))(validList(l.blockStarts)); +}; + +var bedToFeature = function bedToFeature(cs) { + return function (pl) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Lens_Fold.previewOn(cs)(function () { + var $43 = Genetics_Browser_Coordinates["_Segments"](Data_Lens_Internal_Forget.strongForget); + var $44 = Data_Lens_Index.ix(Data_Lens_Index.indexMap(Genetics_Browser_Types.ordChrId))(pl.chrom)(Data_Lens_Internal_Forget.wanderForget(Data_Maybe_First.monoidFirst)); + return function ($45) { + return $43($44($45)); + }; + }()))(function (v) { + var toBp = function () { + var $46 = Data_Newtype.wrap(Genetics_Browser_Types.newtypeBp); + return function ($47) { + return $46(Data_BigInt.toNumber($47)); + }; + }(); + + var thickRange = Data_Functor.map(Data_Pair.functorPair)(toBp)(new Data_Pair.Pair(pl.thickStart, pl.thickEnd)); + var position = Data_Functor.map(Data_Pair.functorPair)(toBp)(new Data_Pair.Pair(pl.chromStart, pl.chromEnd)); + var frameSize = toBp(Genetics_Browser_Coordinates.pairSize(Data_BigInt.ringBigInt)(v)); + var blocks = Data_Array.zipWith(function (start) { + return function (size) { + return Data_Functor.map(Data_Pair.functorPair)(toBp)(new Data_Pair.Pair(start, size)); + }; + })(pl.blockStarts)(pl.blockSizes); + return Control_Applicative.pure(Data_Maybe.applicativeMaybe)({ + position: position, + frameSize: frameSize, + feature: { + thickRange: thickRange, + blocks: blocks, + geneId: pl.geneId, + geneName: pl.geneName, + chrId: pl.chrom + } + }); + }); + }; +}; + +var parseBed = function parseBed(cs) { + return function (o) { + return Control_Bind.bind(Data_Either.bindEither)(Simple_JSON.read(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "blockCount"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "blockSizes"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "blockStarts"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "chrom"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "chromEnd"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "chromStart"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "geneId"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "geneName"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "itemRgb"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "name"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "score"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "strand"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "tags"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "thickEnd"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "thickStart"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "type"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsNil)()())()())()())()())()())()())()())()())()())()())()())()())()())()())()())()()))(o))(function (v) { + return Control_Bind.bind(Data_Either.bindEither)(Data_Validation_Semigroup.unV(function () { + var $48 = Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ForeignError.create); + return function ($49) { + return Data_Either.Left.create($48($49)); + }; + }())(Control_Applicative.pure(Data_Either.applicativeEither))(validLine(v)))(function (v1) { + return Data_Maybe.maybe(Data_Either.Left.create(Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList)(new Foreign.ForeignError("Error parsing BedFeature"))))(Control_Applicative.pure(Data_Either.applicativeEither))(bedToFeature(cs)(v1)); + }); + }); + }; +}; + +var getGenes = function getGenes(cs) { + return function (url) { + return Control_Bind.bind(Effect_Aff.bindAff)(Affjax.get(Affjax_ResponseFormat.json)(url))(function (v) { + return Control_Bind.bind(Effect_Aff.bindAff)(Data_Either.either(function () { + var $50 = Control_Monad_Error_Class.throwError(Effect_Aff.monadThrowAff); + return function ($51) { + return $50(Effect_Exception.error(Affjax_ResponseFormat.printResponseFormatError($51))); + }; + }())(Control_Applicative.pure(Effect_Aff.applicativeAff))(v.body))(function (v1) { + var throwParseError = function () { + var $52 = Control_Monad_Error_Class.throwError(Effect_Aff.monadThrowAff); + var $53 = Data_Foldable.foldMap(Data_List_Types.foldableNonEmptyList)(Data_Monoid.monoidString)(function (v2) { + return v2 + ", "; + }); + return function ($54) { + return $52(Effect_Exception.error($53($54))); + }; + }(); + + return Control_Bind.bind(Effect_Aff.bindAff)(function () { + var v2 = Control_Monad_Except.runExcept(Foreign.readArray(v1)); + + if (v2 instanceof Data_Either.Left) { + return throwParseError(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.renderForeignError)(v2.value0)); + } + + ; + + if (v2 instanceof Data_Either.Right) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(v2.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Bed (line 193, column 12 - line 195, column 24): " + [v2.constructor.name]); + }())(function (v2) { + var chunkF = function chunkF(l) { + var $37 = Data_List["null"](l); + + if ($37) { + return Data_Maybe.Nothing.value; + } + + ; + return new Data_Maybe.Just(new Data_Tuple.Tuple(Data_List.take(100)(l), Data_List.drop(100)(l))); + }; + + var chunks = Data_Unfoldable.unfoldr(Data_List_Types.unfoldableList)(chunkF)(Data_List.fromFoldable(Data_Foldable.foldableArray)(v2)); + + var process = function process(chnk) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Effect_Aff.delay(Data_Newtype.wrap(Data_Time_Duration.newtypeMilliseconds)(0.1)))(function () { + var o = Data_Filterable.partitionMap(Data_Filterable.filterableList)(parseBed(cs))(chnk); + return Control_Applicative.pure(Effect_Aff.applicativeAff)(o.right); + }); + }; + + return Control_Bind.bind(Effect_Aff.bindAff)(Data_Traversable.traverse(Data_List_Types.traversableList)(Effect_Aff.applicativeAff)(process)(chunks))(function (v3) { + var output = Data_Functor.map(Data_Map_Internal.functorMap)(Data_Array.fromFoldable(Data_List_Types.foldableList))(Genetics_Browser.groupToMap(Data_List_Types.monoidList)(Genetics_Browser_Types.ordChrId)(Data_List_Types.foldableList)(Data_List_Types.applicativeList)(function (v4) { + return v4.feature.chrId; + })(Data_List.concat(v3))); + return Control_Applicative.pure(Effect_Aff.applicativeAff)(output); + }); + }); + }); + }); + }; +}; + +module.exports = { + validChrId: validChrId, + validInt: validInt, + validBigInt: validBigInt, + validList: validList, + validLine: validLine, + parseBed: parseBed, + bedToFeature: bedToFeature, + getGenes: getGenes +}; +},{"../Affjax/index.js":"IjAr","../Affjax.ResponseFormat/index.js":"QSsR","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Except/index.js":"Fye2","../Data.Array/index.js":"4t4C","../Data.BigInt/index.js":"Zx+T","../Data.Either/index.js":"B2JL","../Data.Filterable/index.js":"6hfS","../Data.Foldable/index.js":"eVDl","../Data.Functor/index.js":"+0AE","../Data.Int/index.js":"xNJb","../Data.Lens.Fold/index.js":"fCig","../Data.Lens.Index/index.js":"cxC4","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Maybe.First/index.js":"W/l6","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Pair/index.js":"PpsX","../Data.String.CodePoints/index.js":"mAJY","../Data.String.Common/index.js":"OSrc","../Data.String.Pattern/index.js":"nKWe","../Data.Symbol/index.js":"4oJQ","../Data.Time.Duration/index.js":"AnkF","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Validation.Semigroup/index.js":"kMIS","../Effect.Aff/index.js":"I7lu","../Effect.Exception/index.js":"0OCW","../Foreign/index.js":"pu1p","../Genetics.Browser/index.js":"X0te","../Genetics.Browser.Coordinates/index.js":"7bYH","../Genetics.Browser.Types/index.js":"HhmG","../Simple.JSON/index.js":"DqNI","process":"UG8G"}],"bDzA":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Color = require("../Color/index.js"); + +var yellowgreen = Color.rgb(154)(205)(50); +var yellow = Color.rgb(255)(255)(0); +var whitesmoke = Color.rgb(245)(245)(245); +var wheat = Color.rgb(245)(222)(179); +var violet = Color.rgb(238)(130)(238); +var turquoise = Color.rgb(64)(224)(208); +var tomato = Color.rgb(255)(99)(71); +var thistle = Color.rgb(216)(191)(216); +var teal = Color.rgb(0)(128)(128); +var tan = Color.rgb(210)(180)(140); +var steelblue = Color.rgb(70)(130)(180); +var springgreen = Color.rgb(0)(255)(127); +var snow = Color.rgb(255)(250)(250); +var slategrey = Color.rgb(112)(128)(144); +var slategray = Color.rgb(112)(128)(144); +var slateblue = Color.rgb(106)(90)(205); +var skyblue = Color.rgb(135)(206)(235); +var silver = Color.rgb(192)(192)(192); +var sienna = Color.rgb(160)(82)(45); +var seashell = Color.rgb(255)(245)(238); +var seagreen = Color.rgb(46)(139)(87); +var sandybrown = Color.rgb(244)(164)(96); +var salmon = Color.rgb(250)(128)(114); +var saddlebrown = Color.rgb(139)(69)(19); +var royalblue = Color.rgb(65)(105)(225); +var rosybrown = Color.rgb(188)(143)(143); +var red = Color.rgb(255)(0)(0); +var purple = Color.rgb(128)(0)(128); +var powderblue = Color.rgb(176)(224)(230); +var plum = Color.rgb(221)(160)(221); +var pink = Color.rgb(255)(192)(203); +var peru = Color.rgb(205)(133)(63); +var peachpuff = Color.rgb(255)(218)(185); +var papayawhip = Color.rgb(255)(239)(213); +var palevioletred = Color.rgb(219)(112)(147); +var paleturquoise = Color.rgb(175)(238)(238); +var palegreen = Color.rgb(152)(251)(152); +var palegoldenrod = Color.rgb(238)(232)(170); +var orchid = Color.rgb(218)(112)(214); +var orangered = Color.rgb(255)(69)(0); +var orange = Color.rgb(255)(165)(0); +var olivedrab = Color.rgb(107)(142)(35); +var olive = Color.rgb(128)(128)(0); +var oldlace = Color.rgb(253)(245)(230); +var navy = Color.rgb(0)(0)(128); +var navajowhite = Color.rgb(255)(222)(173); +var moccasin = Color.rgb(255)(228)(181); +var mistyrose = Color.rgb(255)(228)(225); +var mintcream = Color.rgb(245)(255)(250); +var midnightblue = Color.rgb(25)(25)(112); +var mediumvioletred = Color.rgb(199)(21)(133); +var mediumturquoise = Color.rgb(72)(209)(204); +var mediumspringgreen = Color.rgb(0)(250)(154); +var mediumslateblue = Color.rgb(123)(104)(238); +var mediumseagreen = Color.rgb(60)(179)(113); +var mediumpurple = Color.rgb(147)(112)(219); +var mediumorchid = Color.rgb(186)(85)(211); +var mediumblue = Color.rgb(0)(0)(205); +var mediumaquamarine = Color.rgb(102)(205)(170); +var maroon = Color.rgb(128)(0)(0); +var magenta = Color.rgb(255)(0)(255); +var linen = Color.rgb(250)(240)(230); +var limegreen = Color.rgb(50)(205)(50); +var lime = Color.rgb(0)(255)(0); +var lightyellow = Color.rgb(255)(255)(224); +var lightsteelblue = Color.rgb(176)(196)(222); +var lightslategrey = Color.rgb(119)(136)(153); +var lightslategray = Color.rgb(119)(136)(153); +var lightskyblue = Color.rgb(135)(206)(250); +var lightseagreen = Color.rgb(32)(178)(170); +var lightsalmon = Color.rgb(255)(160)(122); +var lightpink = Color.rgb(255)(182)(193); +var lightgrey = Color.rgb(211)(211)(211); +var lightgreen = Color.rgb(144)(238)(144); +var lightgray = Color.rgb(211)(211)(211); +var lightgoldenrodyellow = Color.rgb(250)(250)(210); +var lightcyan = Color.rgb(224)(255)(255); +var lightcoral = Color.rgb(240)(128)(128); +var lightblue = Color.rgb(173)(216)(230); +var lemonchiffon = Color.rgb(255)(250)(205); +var lawngreen = Color.rgb(124)(252)(0); +var lavenderblush = Color.rgb(255)(240)(245); +var lavender = Color.rgb(230)(230)(250); +var khaki = Color.rgb(240)(230)(140); +var ivory = Color.rgb(255)(255)(240); +var indigo = Color.rgb(75)(0)(130); +var indianred = Color.rgb(205)(92)(92); +var hotpink = Color.rgb(255)(105)(180); +var honeydew = Color.rgb(240)(255)(240); +var grey = Color.rgb(128)(128)(128); +var greenyellow = Color.rgb(173)(255)(47); +var green = Color.rgb(0)(128)(0); +var gray = Color.rgb(128)(128)(128); +var goldenrod = Color.rgb(218)(165)(32); +var gold = Color.rgb(255)(215)(0); +var ghostwhite = Color.rgb(248)(248)(255); +var gainsboro = Color.rgb(220)(220)(220); +var fuchsia = Color.rgb(255)(0)(255); +var forestgreen = Color.rgb(34)(139)(34); +var floralwhite = Color.rgb(255)(250)(240); +var firebrick = Color.rgb(178)(34)(34); +var dodgerblue = Color.rgb(30)(144)(255); +var dimgrey = Color.rgb(105)(105)(105); +var dimgray = Color.rgb(105)(105)(105); +var deepskyblue = Color.rgb(0)(191)(255); +var deeppink = Color.rgb(255)(20)(147); +var darkviolet = Color.rgb(148)(0)(211); +var darkturquoise = Color.rgb(0)(206)(209); +var darkslategrey = Color.rgb(47)(79)(79); +var darkslategray = Color.rgb(47)(79)(79); +var darkslateblue = Color.rgb(72)(61)(139); +var darkseagreen = Color.rgb(143)(188)(143); +var darksalmon = Color.rgb(233)(150)(122); +var darkred = Color.rgb(139)(0)(0); +var darkorchid = Color.rgb(153)(50)(204); +var darkorange = Color.rgb(255)(140)(0); +var darkolivegreen = Color.rgb(85)(107)(47); +var darkmagenta = Color.rgb(139)(0)(139); +var darkkhaki = Color.rgb(189)(183)(107); +var darkgrey = Color.rgb(169)(169)(169); +var darkgreen = Color.rgb(0)(100)(0); +var darkgray = Color.rgb(169)(169)(169); +var darkgoldenrod = Color.rgb(184)(134)(11); +var darkcyan = Color.rgb(0)(139)(139); +var darkblue = Color.rgb(0)(0)(139); +var cyan = Color.rgb(0)(255)(255); +var crimson = Color.rgb(220)(20)(60); +var cornsilk = Color.rgb(255)(248)(220); +var cornflowerblue = Color.rgb(100)(149)(237); +var coral = Color.rgb(255)(127)(80); +var chocolate = Color.rgb(210)(105)(30); +var chartreuse = Color.rgb(127)(255)(0); +var cadetblue = Color.rgb(95)(158)(160); +var burlywood = Color.rgb(222)(184)(135); +var brown = Color.rgb(165)(42)(42); +var blueviolet = Color.rgb(138)(43)(226); +var blue = Color.rgb(0)(0)(255); +var blanchedalmond = Color.rgb(255)(235)(205); +var bisque = Color.rgb(255)(228)(196); +var beige = Color.rgb(245)(245)(220); +var azure = Color.rgb(240)(255)(255); +var aquamarine = Color.rgb(127)(255)(212); +var aqua = Color.rgb(0)(255)(255); +var antiquewhite = Color.rgb(250)(235)(215); +var aliceblue = Color.rgb(240)(248)(255); +module.exports = { + aliceblue: aliceblue, + antiquewhite: antiquewhite, + aqua: aqua, + aquamarine: aquamarine, + azure: azure, + beige: beige, + bisque: bisque, + blanchedalmond: blanchedalmond, + blue: blue, + blueviolet: blueviolet, + brown: brown, + burlywood: burlywood, + cadetblue: cadetblue, + chartreuse: chartreuse, + chocolate: chocolate, + coral: coral, + cornflowerblue: cornflowerblue, + cornsilk: cornsilk, + crimson: crimson, + cyan: cyan, + darkblue: darkblue, + darkcyan: darkcyan, + darkgoldenrod: darkgoldenrod, + darkgray: darkgray, + darkgreen: darkgreen, + darkgrey: darkgrey, + darkkhaki: darkkhaki, + darkmagenta: darkmagenta, + darkolivegreen: darkolivegreen, + darkorange: darkorange, + darkorchid: darkorchid, + darkred: darkred, + darksalmon: darksalmon, + darkseagreen: darkseagreen, + darkslateblue: darkslateblue, + darkslategray: darkslategray, + darkslategrey: darkslategrey, + darkturquoise: darkturquoise, + darkviolet: darkviolet, + deeppink: deeppink, + deepskyblue: deepskyblue, + dimgray: dimgray, + dimgrey: dimgrey, + dodgerblue: dodgerblue, + firebrick: firebrick, + floralwhite: floralwhite, + forestgreen: forestgreen, + fuchsia: fuchsia, + gainsboro: gainsboro, + ghostwhite: ghostwhite, + gold: gold, + goldenrod: goldenrod, + gray: gray, + green: green, + greenyellow: greenyellow, + grey: grey, + honeydew: honeydew, + hotpink: hotpink, + indianred: indianred, + indigo: indigo, + ivory: ivory, + khaki: khaki, + lavender: lavender, + lavenderblush: lavenderblush, + lawngreen: lawngreen, + lemonchiffon: lemonchiffon, + lightblue: lightblue, + lightcoral: lightcoral, + lightcyan: lightcyan, + lightgoldenrodyellow: lightgoldenrodyellow, + lightgray: lightgray, + lightgreen: lightgreen, + lightgrey: lightgrey, + lightpink: lightpink, + lightsalmon: lightsalmon, + lightseagreen: lightseagreen, + lightskyblue: lightskyblue, + lightslategray: lightslategray, + lightslategrey: lightslategrey, + lightsteelblue: lightsteelblue, + lightyellow: lightyellow, + lime: lime, + limegreen: limegreen, + linen: linen, + magenta: magenta, + maroon: maroon, + mediumaquamarine: mediumaquamarine, + mediumblue: mediumblue, + mediumorchid: mediumorchid, + mediumpurple: mediumpurple, + mediumseagreen: mediumseagreen, + mediumslateblue: mediumslateblue, + mediumspringgreen: mediumspringgreen, + mediumturquoise: mediumturquoise, + mediumvioletred: mediumvioletred, + midnightblue: midnightblue, + mintcream: mintcream, + mistyrose: mistyrose, + moccasin: moccasin, + navajowhite: navajowhite, + navy: navy, + oldlace: oldlace, + olive: olive, + olivedrab: olivedrab, + orange: orange, + orangered: orangered, + orchid: orchid, + palegoldenrod: palegoldenrod, + palegreen: palegreen, + paleturquoise: paleturquoise, + palevioletred: palevioletred, + papayawhip: papayawhip, + peachpuff: peachpuff, + peru: peru, + pink: pink, + plum: plum, + powderblue: powderblue, + purple: purple, + red: red, + rosybrown: rosybrown, + royalblue: royalblue, + saddlebrown: saddlebrown, + salmon: salmon, + sandybrown: sandybrown, + seagreen: seagreen, + seashell: seashell, + sienna: sienna, + silver: silver, + skyblue: skyblue, + slateblue: slateblue, + slategray: slategray, + slategrey: slategrey, + snow: snow, + springgreen: springgreen, + steelblue: steelblue, + tan: tan, + teal: teal, + thistle: thistle, + tomato: tomato, + turquoise: turquoise, + violet: violet, + wheat: wheat, + whitesmoke: whitesmoke, + yellow: yellow, + yellowgreen: yellowgreen +}; +},{"../Color/index.js":"f3ma"}],"RTVM":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js"); + +var _2 = function _2(dictStrong) { + return Data_Profunctor_Strong.second(dictStrong); +}; + +var _1 = function _1(dictStrong) { + return Data_Profunctor_Strong.first(dictStrong); +}; + +module.exports = { + "_1": _1, + "_2": _2 +}; +},{"../Data.Profunctor.Strong/index.js":"w9p6"}],"3sXk":[function(require,module,exports) { +"use strict"; + +exports.unsafeKeys = Object.keys || function (value) { + var keys = []; + + for (var prop in value) { + if (Object.prototype.hasOwnProperty.call(value, prop)) { + keys.push(prop); + } + } + + return keys; +}; +},{}],"hcOM":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var keys = function keys(value) { + if (Foreign.isNull(value)) { + return Foreign.fail(new Foreign.TypeMismatch("object", "null")); + } + + ; + + if (Foreign.isUndefined(value)) { + return Foreign.fail(new Foreign.TypeMismatch("object", "undefined")); + } + + ; + + if (Foreign.typeOf(value) === "object") { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))($foreign.unsafeKeys(value)); + } + + ; + + if (Data_Boolean.otherwise) { + return Foreign.fail(new Foreign.TypeMismatch("object", Foreign.typeOf(value))); + } + + ; + throw new Error("Failed pattern match at Foreign.Keys (line 15, column 1 - line 15, column 36): " + [value.constructor.name]); +}; + +module.exports = { + keys: keys +}; +},{"./foreign.js":"3sXk","../Control.Applicative/index.js":"qYya","../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Boolean/index.js":"ObQr","../Data.Identity/index.js":"2OKT","../Foreign/index.js":"pu1p"}],"OuXj":[function(require,module,exports) { +"use strict"; + +exports.pickFn = function (ks, r) { + var copy = {}; + + for (var i = 0; i < ks.length; i++) { + copy[ks[i]] = r[ks[i]]; + } + + return copy; +}; +},{}],"KzZr":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_Function_Uncurried = require("../Data.Function.Uncurried/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Record = require("../Record/index.js"); + +var Record_Builder = require("../Record.Builder/index.js"); + +var Type_Data_Row = require("../Type.Data.Row/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var SLProxy = function () { + function SLProxy() {} + + ; + SLProxy.value = new SLProxy(); + return SLProxy; +}(); + +var ZipRecord = function ZipRecord(zipRecordImpl) { + this.zipRecordImpl = zipRecordImpl; +}; + +var SequenceRecord = function SequenceRecord(Functor0, sequenceRecordImpl) { + this.Functor0 = Functor0; + this.sequenceRecordImpl = sequenceRecordImpl; +}; + +var SListToRowList = {}; + +var OrdRecord = function OrdRecord(compareRecordImpl) { + this.compareRecordImpl = compareRecordImpl; +}; + +var MapRecord = function MapRecord(mapRecordBuilder) { + this.mapRecordBuilder = mapRecordBuilder; +}; + +var Keys = function Keys(keysImpl) { + this.keysImpl = keysImpl; +}; + +var zipRecordNil = new ZipRecord(function (v) { + return function (v1) { + return function (v2) { + return function (v3) { + return Control_Category.identity(Record_Builder.categoryBuilder); + }; + }; + }; +}); + +var zipRecordImpl = function zipRecordImpl(dict) { + return dict.zipRecordImpl; +}; + +var zipRecordCons = function zipRecordCons(dictIsSymbol) { + return function (dictCons) { + return function (dictCons1) { + return function (dictCons2) { + return function (dictLacks) { + return function (dictZipRecord) { + return new ZipRecord(function (v) { + return function (ra) { + return function (v1) { + return function (rb) { + var tail = zipRecordImpl(dictZipRecord)(Type_Data_RowList.RLProxy.value)(ra)(Type_Data_RowList.RLProxy.value)(rb); + var head = new Data_Tuple.Tuple(Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(ra), Record.get(dictIsSymbol)(dictCons1)(Data_Symbol.SProxy.value)(rb)); + var first = Record_Builder.insert(dictCons2)(dictLacks)(dictIsSymbol)(Data_Symbol.SProxy.value)(head); + return Control_Semigroupoid.compose(Record_Builder.semigroupoidBuilder)(first)(tail); + }; + }; + }; + }); + }; + }; + }; + }; + }; +}; + +var zipRecord = function zipRecord(dictRowToList) { + return function (dictRowToList1) { + return function (dictZipRecord) { + return function (ra) { + return function (rb) { + var builder = zipRecordImpl(dictZipRecord)(Type_Data_RowList.RLProxy.value)(ra)(Type_Data_RowList.RLProxy.value)(rb); + return Record_Builder.build(builder)({}); + }; + }; + }; + }; +}; + +var slToRlSNil = SListToRowList; + +var slToRlSCons = function slToRlSCons(dictSListToRowList) { + return SListToRowList; +}; + +var sequenceRecordSingle = function sequenceRecordSingle(dictIsSymbol) { + return function (dictCons) { + return function (dictFunctor) { + return function (dictLacks) { + return function (dictCons1) { + return new SequenceRecord(function () { + return dictFunctor; + }, function (v) { + return function (a) { + var valA = Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(a); + return Data_Functor.map(dictFunctor)(Record_Builder.insert(dictCons1)(dictLacks)(dictIsSymbol)(Data_Symbol.SProxy.value))(valA); + }; + }); + }; + }; + }; + }; +}; + +var sequenceRecordNil = function sequenceRecordNil(dictApplicative) { + return new SequenceRecord(dictApplicative.Apply0().Functor0, function (v) { + return function (v1) { + return Control_Applicative.pure(dictApplicative)(Control_Category.identity(Record_Builder.categoryBuilder)); + }; + }); +}; + +var sequenceRecordImpl = function sequenceRecordImpl(dict) { + return dict.sequenceRecordImpl; +}; + +var sequenceRecordCons = function sequenceRecordCons(dictIsSymbol) { + return function (dictCons) { + return function (dictApply) { + return function (dictSequenceRecord) { + return function (dictLacks) { + return function (dictCons1) { + return new SequenceRecord(dictApply.Functor0, function (v) { + return function (a) { + var rest = sequenceRecordImpl(dictSequenceRecord)(Type_Data_RowList.RLProxy.value)(a); + var valA = Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(a); + + var fn = function fn(valA$prime) { + return function (rest$prime) { + return Control_Semigroupoid.compose(Record_Builder.semigroupoidBuilder)(Record_Builder.insert(dictCons1)(dictLacks)(dictIsSymbol)(Data_Symbol.SProxy.value)(valA$prime))(rest$prime); + }; + }; + + return Control_Apply.apply(dictApply)(Data_Functor.map(dictApply.Functor0())(fn)(valA))(rest); + }; + }); + }; + }; + }; + }; + }; +}; + +var sequenceRecord = function sequenceRecord(dictRowToList) { + return function (dictSequenceRecord) { + return function (a) { + var builder = sequenceRecordImpl(dictSequenceRecord)(Type_Data_RowList.RLProxy.value)(a); + return Data_Functor.map(dictSequenceRecord.Functor0())(Data_Functor.flap(Data_Functor.functorFn)(Record_Builder.build)({}))(builder); + }; + }; +}; + +var ordRecordNil = new OrdRecord(function (v) { + return function (v1) { + return function (v2) { + return Data_Ordering.EQ.value; + }; + }; +}); +var nilKeys = new Keys(function (v) { + return Data_Monoid.mempty(Data_List_Types.monoidList); +}); +var mapRecordNil = new MapRecord(function (v) { + return function (v1) { + return function (v2) { + return Control_Category.identity(Record_Builder.categoryBuilder); + }; + }; +}); + +var mapRecordBuilder = function mapRecordBuilder(dict) { + return dict.mapRecordBuilder; +}; + +var mapRecordCons = function mapRecordCons(dictIsSymbol) { + return function (dictCons) { + return function (dictMapRecord) { + return function (dictLacks) { + return function (dictCons1) { + return new MapRecord(function (v) { + return function (f) { + return function (r) { + var rest = mapRecordBuilder(dictMapRecord)(Type_Data_RowList.RLProxy.value)(f)(r); + var val = f(Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(r)); + var first = Record_Builder.insert(dictCons1)(dictLacks)(dictIsSymbol)(Data_Symbol.SProxy.value)(val); + return Control_Semigroupoid.compose(Record_Builder.semigroupoidBuilder)(first)(rest); + }; + }; + }); + }; + }; + }; + }; +}; + +var mapRecord = function mapRecord(dictRowToList) { + return function (dictMapRecord) { + return function (f) { + return function (r) { + var builder = mapRecordBuilder(dictMapRecord)(Type_Data_RowList.RLProxy.value)(f)(r); + return Record_Builder.build(builder)({}); + }; + }; + }; +}; + +var keysImpl = function keysImpl(dict) { + return dict.keysImpl; +}; + +var slistKeys = function slistKeys(dictSListToRowList) { + return function (dictKeys) { + return function (v) { + return keysImpl(dictKeys)(Type_Data_RowList.RLProxy.value); + }; + }; +}; + +var keys = function keys(dictRowToList) { + return function (dictKeys) { + return function (v) { + return keysImpl(dictKeys)(Type_Data_RowList.RLProxy.value); + }; + }; +}; + +var pick = function pick(dictUnion) { + return function (dictRowToList) { + return function (dictKeys) { + var ks = Data_Array.fromFoldable(Data_List_Types.foldableList)(keys(dictRowToList)(dictKeys)(Type_Data_Row.RProxy.value)); + return Data_Function_Uncurried.runFn2($foreign.pickFn)(ks); + }; + }; +}; + +var consKeys = function consKeys(dictIsSymbol) { + return function (dictKeys) { + return new Keys(function (v) { + var rest = keysImpl(dictKeys)(Type_Data_RowList.RLProxy.value); + var first = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value); + return new Data_List_Types.Cons(first, rest); + }); + }; +}; + +var compareRecordImpl = function compareRecordImpl(dict) { + return dict.compareRecordImpl; +}; + +var ordRecordCons = function ordRecordCons(dictIsSymbol) { + return function (dictOrd) { + return function (dictCons) { + return function (dictOrdRecord) { + return new OrdRecord(function (v) { + return function (a) { + return function (b) { + var valA = Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(a); + var valB = Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(b); + var v1 = Data_Ord.compare(dictOrd)(valA)(valB); + + if (v1 instanceof Data_Ordering.EQ) { + return compareRecordImpl(dictOrdRecord)(Type_Data_RowList.RLProxy.value)(a)(b); + } + + ; + return v1; + }; + }; + }); + }; + }; + }; +}; + +var compareRecord = function compareRecord(dictRowToList) { + return function (dictOrdRecord) { + return function (a) { + return function (b) { + return compareRecordImpl(dictOrdRecord)(Type_Data_RowList.RLProxy.value)(a)(b); + }; + }; + }; +}; + +module.exports = { + compareRecordImpl: compareRecordImpl, + keysImpl: keysImpl, + mapRecordBuilder: mapRecordBuilder, + sequenceRecordImpl: sequenceRecordImpl, + zipRecordImpl: zipRecordImpl, + mapRecord: mapRecord, + MapRecord: MapRecord, + ZipRecord: ZipRecord, + zipRecord: zipRecord, + Keys: Keys, + keys: keys, + pick: pick, + slistKeys: slistKeys, + SLProxy: SLProxy, + SListToRowList: SListToRowList, + OrdRecord: OrdRecord, + compareRecord: compareRecord, + SequenceRecord: SequenceRecord, + sequenceRecord: sequenceRecord, + mapRecordCons: mapRecordCons, + mapRecordNil: mapRecordNil, + zipRecordNil: zipRecordNil, + zipRecordCons: zipRecordCons, + nilKeys: nilKeys, + consKeys: consKeys, + slToRlSNil: slToRlSNil, + slToRlSCons: slToRlSCons, + ordRecordCons: ordRecordCons, + ordRecordNil: ordRecordNil, + sequenceRecordSingle: sequenceRecordSingle, + sequenceRecordCons: sequenceRecordCons, + sequenceRecordNil: sequenceRecordNil, + pickFn: $foreign.pickFn +}; +},{"./foreign.js":"OuXj","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Control.Semigroupoid/index.js":"/riR","../Data.Array/index.js":"4t4C","../Data.Function.Uncurried/index.js":"TowT","../Data.Functor/index.js":"+0AE","../Data.List.Types/index.js":"Xxuc","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Symbol/index.js":"4oJQ","../Data.Tuple/index.js":"II/O","../Record/index.js":"0gG4","../Record.Builder/index.js":"VeY4","../Type.Data.Row/index.js":"ukdD","../Type.Data.RowList/index.js":"XaXP"}],"mKwt":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Affjax = require("../Affjax/index.js"); + +var Affjax_ResponseFormat = require("../Affjax.ResponseFormat/index.js"); + +var Color = require("../Color/index.js"); + +var Color_Scheme_Clrs = require("../Color.Scheme.Clrs/index.js"); + +var Color_Scheme_X11 = require("../Color.Scheme.X11/index.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js"); + +var Control_Monad_Except = require("../Control.Monad.Except/index.js"); + +var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js"); + +var Control_Semigroupoid = require("../Control.Semigroupoid/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_BigInt = require("../Data.BigInt/index.js"); + +var Data_Boolean = require("../Data.Boolean/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_EuclideanRing = require("../Data.EuclideanRing/index.js"); + +var Data_Filterable = require("../Data.Filterable/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js"); + +var Data_Identity = require("../Data.Identity/index.js"); + +var Data_Lens_Getter = require("../Data.Lens.Getter/index.js"); + +var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js"); + +var Data_Lens_Internal_Re = require("../Data.Lens.Internal.Re/index.js"); + +var Data_Lens_Iso = require("../Data.Lens.Iso/index.js"); + +var Data_Lens_Lens_Tuple = require("../Data.Lens.Lens.Tuple/index.js"); + +var Data_List = require("../Data.List/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Map_Internal = require("../Data.Map.Internal/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Pair = require("../Data.Pair/index.js"); + +var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js"); + +var Data_Ring = require("../Data.Ring/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Traversable = require("../Data.Traversable/index.js"); + +var Data_Tuple = require("../Data.Tuple/index.js"); + +var Data_Unfoldable = require("../Data.Unfoldable/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Data_Variant = require("../Data.Variant/index.js"); + +var Effect_Aff = require("../Effect.Aff/index.js"); + +var Effect_Aff_Class = require("../Effect.Aff.Class/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var Effect_Class_Console = require("../Effect.Class.Console/index.js"); + +var Effect_Exception = require("../Effect.Exception/index.js"); + +var Effect_Ref = require("../Effect.Ref/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var Foreign_Index = require("../Foreign.Index/index.js"); + +var Foreign_Keys = require("../Foreign.Keys/index.js"); + +var Foreign_Object = require("../Foreign.Object/index.js"); + +var Genetics_Browser = require("../Genetics.Browser/index.js"); + +var Genetics_Browser_Cacher = require("../Genetics.Browser.Cacher/index.js"); + +var Genetics_Browser_Canvas = require("../Genetics.Browser.Canvas/index.js"); + +var Genetics_Browser_Coordinates = require("../Genetics.Browser.Coordinates/index.js"); + +var Genetics_Browser_Layer = require("../Genetics.Browser.Layer/index.js"); + +var Genetics_Browser_Types = require("../Genetics.Browser.Types/index.js"); + +var Graphics_Drawing = require("../Graphics.Drawing/index.js"); + +var $$Math = require("../Math/index.js"); + +var Record = require("../Record/index.js"); + +var Record_Builder = require("../Record.Builder/index.js"); + +var Record_Extra = require("../Record.Extra/index.js"); + +var Simple_JSON = require("../Simple.JSON/index.js"); + +var Type_Equality = require("../Type.Equality/index.js"); + +var snpsUI = function snpsUI(vscale) { + return Genetics_Browser.fixedUILayer(Genetics_Browser_Layer.CLeft.create(Genetics_Browser.drawVScaleInSlot(vscale))); +}; + +var snpPeak = function snpPeak(radius) { + return function (snps) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Foldable.minimumBy(Data_Foldable.foldableArray)(Data_Function.on(Data_Ord.compare(Data_Ord.ordNumber))(function (v) { + return v.feature.score; + }))(snps))(function (v) { + var covers = Genetics_Browser_Coordinates.aroundPair(Genetics_Browser_Types.ringBp)(radius)(v.position); + var v1 = Data_Filterable.partition(Data_Filterable.filterableArray)(function (p) { + return Genetics_Browser_Coordinates.pairsOverlap(Genetics_Browser_Types.ordBp)(p.position)(covers); + })(snps); + return Control_Applicative.pure(Data_Maybe.applicativeMaybe)(new Data_Tuple.Tuple({ + covers: covers, + y: v.feature.score, + elements: v1.yes + }, v1.no)); + }); + }; +}; + +var showAnnotationField = function showAnnotationField(urlConf) { + return function (fv) { + var v = Foreign_Object.lookup(fv.field)(urlConf); + + if (v instanceof Data_Maybe.Nothing) { + return fv.field + (": " + fv.value); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return "<a target='_blank' href='" + (fv.value + ("'>" + (v.value0 + "</a>"))); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Demo (line 253, column 3 - line 258, column 26): " + [v.constructor.name]); + }; +}; + +var showAnnotation = function showAnnotation(urlConf) { + return function (a) { + var chr = "Chr: " + Data_Show.show(Genetics_Browser_Types.showChrId)(a.feature.chr); + var name = Data_Maybe.fromMaybe("SNP: " + a.feature.name)(Data_Functor.map(Data_Maybe.functorMaybe)(function (v) { + return "Gene: " + v; + })(a.feature.gene)); + var pos = "Pos: " + Data_Show.show(Genetics_Browser_Types.showBp)(a.feature.pos); + return Data_Semigroup.append(Data_List_Types.semigroupList)(Data_List.fromFoldable(Data_Foldable.foldableArray)([name, chr, pos]))(Data_Functor.map(Data_List_Types.functorList)(showAnnotationField(urlConf))(a.feature.rest)); + }; +}; + +var peak1 = function peak1(radius) { + return function (snps) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Foldable.minimumBy(Data_Foldable.foldableArray)(Data_Function.on(Data_Ord.compare(Data_Ord.ordNumber))(function (v) { + return v.feature.score; + }))(snps))(function (v) { + var covers = Genetics_Browser_Coordinates.aroundPair(Genetics_Browser_Types.ringBp)(radius)(v.position); + var v1 = Data_Filterable.partition(Data_Filterable.filterableArray)(function (p) { + return Genetics_Browser_Coordinates.pairsOverlap(Genetics_Browser_Types.ordBp)(p.position)(covers); + })(snps); + return Control_Applicative.pure(Data_Maybe.applicativeMaybe)(new Data_Tuple.Tuple({ + covers: covers, + y: v.feature.score, + elements: v1.yes + }, v1.no)); + }); + }; +}; + +var peaks = function peaks(r) { + return function (snps) { + return Data_Unfoldable.unfoldr(Data_Unfoldable.unfoldableArray)(peak1(r))(snps); + }; +}; + +var parseSNP = function parseSNP(cSys) { + return function (a) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Simple_JSON["read'"](Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "chr"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "p_wald"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "ps"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "rs"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsNil)()())()())()())()()))(a))(function (v) { + var position = function (p) { + return Data_Functor.map(Data_Pair.functorPair)(Data_Newtype.wrap(Genetics_Browser_Types.newtypeBp))(new Data_Pair.Pair(p, p)); + }(v.ps); + + var feature = { + score: v.p_wald, + chrId: Data_Newtype.wrap(Genetics_Browser_Types.newtypeChrId)(v.chr), + name: v.rs + }; + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(function () { + var v1 = Data_Map_Internal.lookup(Genetics_Browser_Types.ordChrId)(feature.chrId)(Data_Lens_Getter.view(Genetics_Browser_Coordinates["_Segments"](Data_Lens_Internal_Forget.strongForget))(cSys)); + + if (v1 instanceof Data_Maybe.Nothing) { + return Control_Monad_Error_Class.throwError(Control_Monad_Except_Trans.monadThrowExceptT(Data_Identity.monadIdentity))(Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList)(new Foreign.ForeignError("Annotation chr not found in coordinate system!"))); + } + + ; + + if (v1 instanceof Data_Maybe.Just) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Genetics_Browser_Types.Bp(Data_BigInt.toNumber(Genetics_Browser_Coordinates.pairSize(Data_BigInt.ringBigInt)(v1.value0)))); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Demo (line 173, column 16 - line 179, column 49): " + [v1.constructor.name]); + }())(function (v1) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({ + position: position, + frameSize: v1, + feature: feature + }); + }); + }); + }; +}; + +var normYLogScore = function normYLogScore(s) { + var $184 = Genetics_Browser_Coordinates.normalize(Data_EuclideanRing.euclideanRingNumber)(s.min)(s.max); + var $185 = Data_Newtype.unwrap(Genetics_Browser_Types.newtypeNegLog10); + var $186 = Data_Lens_Getter.view(Genetics_Browser_Types["_NegLog10"](Data_Lens_Internal_Forget.profunctorForget)); + return function ($187) { + return $184($185($186($187))); + }; +}; + +var getSNPs = function getSNPs(cs) { + return function (url) { + return Control_Bind.bind(Effect_Aff.bindAff)(Affjax.get(Affjax_ResponseFormat.json)(url))(function (v) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Effect_Class_Console.log(Effect_Class.monadEffectEffect)(v.body)))(function () { + return Control_Bind.bind(Effect_Aff.bindAff)(Data_Either.either(function () { + var $188 = Control_Monad_Error_Class.throwError(Effect_Aff.monadThrowAff); + return function ($189) { + return $188(Effect_Exception.error(Affjax_ResponseFormat.printResponseFormatError($189))); + }; + }())(Control_Applicative.pure(Effect_Aff.applicativeAff))(v.body))(function (v1) { + return Control_Bind.bind(Effect_Aff.bindAff)(function () { + var v2 = Control_Monad_Except.runExcept(Foreign.readArray(v1)); + + if (v2 instanceof Data_Either.Left) { + return Control_Monad_Error_Class.throwError(Effect_Aff.monadThrowAff)(Effect_Exception.error("SNP data is not an array")); + } + + ; + + if (v2 instanceof Data_Either.Right) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(v2.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Demo (line 287, column 5 - line 291, column 31): " + [v2.constructor.name]); + }())(function (v2) { + var parsed = Data_Filterable.partitionMap(Data_Filterable.filterableArray)(function () { + var $190 = parseSNP(cs); + return function ($191) { + return Control_Monad_Except.runExcept($190($191)); + }; + }())(v2); + return Control_Applicative.pure(Effect_Aff.applicativeAff)(Genetics_Browser.groupToMap(Data_Monoid.monoidArray)(Genetics_Browser_Types.ordChrId)(Data_Foldable.foldableArray)(Control_Applicative.applicativeArray)(function (v3) { + return v3.feature.chrId; + })(Data_Filterable.filter(Data_Filterable.filterableArray)(function (f) { + return Data_Ord.greaterThanOrEq(Genetics_Browser_Types.ordBp)(Data_Pair.fst(f.position))(Data_Newtype.wrap(Genetics_Browser_Types.newtypeBp)(0)); + })(parsed.right))); + }); + }); + }); + }); + }; +}; + +var filterSig = function filterSig(v) { + return Data_Functor.map(Data_Map_Internal.functorMap)(Data_Filterable.filter(Data_Filterable.filterableArray)(function (snp) { + return snp.feature.score <= Data_Lens_Getter.viewOn(v.sig)(Data_Lens_Iso.re(Genetics_Browser_Types["_NegLog10"](Data_Lens_Internal_Re.profunctorRe(Data_Lens_Internal_Forget.profunctorForget)))); + })); +}; + +var drawGene = function drawGene(size) { + return function (seg) { + return function (gene) { + var segWidth = Genetics_Browser_Coordinates.pairSize(Data_Ring.ringNumber)(seg); + + var toLocal = function toLocal(x) { + return segWidth * Data_Newtype.unwrap(Genetics_Browser_Types.newtypeBp)(Data_EuclideanRing.div(Genetics_Browser_Types.euclideanRingBp)(x)(gene.frameSize)); + }; + + var width = toLocal(Data_Ring.sub(Genetics_Browser_Types.ringBp)(gene.position.value1)(gene.position.value0)); + + var introns = function introns(v) { + var s = Graphics_Drawing.rectangle(1.5)(14.0)(width - 1.5)(2.0); + return Data_Semigroup.append(Graphics_Drawing.semigroupDrawing)(Graphics_Drawing.outlined(Data_Semigroup.append(Graphics_Drawing.semigroupOutlineStyle)(Graphics_Drawing.outlineColor(Color.black))(Graphics_Drawing.lineWidth(3.0)))(s))(Graphics_Drawing.filled(Graphics_Drawing.fillColor(Color.black))(s)); + }; + + var exonSize = function exonSize(b) { + return Data_Pair.snd(Data_Functor.map(Data_Pair.functorPair)(toLocal)(b)); + }; + + var exon = function exon(block) { + var v = Data_Functor.map(Data_Pair.functorPair)(toLocal)(block); + return Graphics_Drawing.rectangle(v.value0)(0)(v.value1)(30.0); + }; + + var exons = function exons(v) { + var s$prime = Data_Foldable.foldMap(Data_Foldable.foldableArray)(Graphics_Drawing.monoidShape)(exon)(Data_Filterable.filter(Data_Filterable.filterableArray)(function (b) { + return exonSize(b) > 1; + })(gene.feature.blocks)); + return Data_Semigroup.append(Graphics_Drawing.semigroupDrawing)(Graphics_Drawing.outlined(Data_Semigroup.append(Graphics_Drawing.semigroupOutlineStyle)(Graphics_Drawing.outlineColor(Color_Scheme_X11.darkgrey))(Graphics_Drawing.lineWidth(1.0)))(s$prime))(Graphics_Drawing.filled(Graphics_Drawing.fillColor(Color_Scheme_X11.lightgrey))(s$prime)); + }; + + var drawing = function drawing(v) { + return Data_Semigroup.append(Graphics_Drawing.semigroupDrawing)(introns(Data_Unit.unit))(exons(Data_Unit.unit)); + }; + + var $97 = width < 1; + + if ($97) { + return Data_Maybe.Nothing.value; + } + + ; + var point = { + x: seg.value0 + Genetics_Browser_Coordinates.pairSize(Data_Ring.ringNumber)(seg) * Data_Newtype.unwrap(Genetics_Browser_Coordinates.newtypeNormalized)(Genetics_Browser.featureNormX(gene)), + y: size.height * 0.5 + }; + var bottomRight = { + x: point.x + width, + y: point.y + 15.0 + }; + return Control_Applicative.pure(Data_Maybe.applicativeMaybe)({ + bigDrawing: { + drawing: drawing, + topLeft: point, + bottomRight: bottomRight + }, + label: { + text: gene.feature.geneName, + point: point, + gravity: Genetics_Browser_Canvas.LCenter.value + } + }); + }; + }; +}; + +var renderGenes = function renderGenes(geneData) { + return function (v) { + return function (segs) { + return function (size) { + var geneData$prime = Data_Map_Internal.toUnfoldable(Data_List_Types.unfoldableList)(Data_Functor.map(Data_Map_Internal.functorMap)(Data_List.fromFoldable(Data_Foldable.foldableArray))(geneData)); + + var glyphs = function () { + var f = function f(v1) { + return Data_Maybe.fromMaybe(Data_Monoid.mempty(Data_List_Types.monoidList))(Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Map_Internal.lookup(Genetics_Browser_Types.ordChrId)(v1.value0)(segs))(function (v2) { + return Control_Applicative.pure(Data_Maybe.applicativeMaybe)(Data_Filterable.filterMap(Data_Filterable.filterableList)(drawGene(size)(v2))(v1.value1)); + })); + }; + + return Data_List.concatMap(f)(geneData$prime); + }(); + + var labels = Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "labels"; + }))(Genetics_Browser_Canvas["_labels"])(Data_Functor.map(Data_List_Types.functorList)(function (v1) { + return v1.label; + })(glyphs)); + var drawings = Data_Functor.map(Data_List_Types.functorList)(function () { + var $192 = Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "bigDrawing"; + }))(Genetics_Browser_Canvas["_bigDrawing"]); + return function ($193) { + return $192(function (v1) { + return v1.bigDrawing; + }($193)); + }; + }())(glyphs); + return { + renderables: new Data_List_Types.Cons(labels, drawings) + }; + }; + }; + }; +}; + +var dist = function dist(p1) { + return function (p2) { + var y$prime = p1.y - p2.y; + var x$prime = p1.x - p2.x; + return $$Math.sqrt($$Math.pow(x$prime)(2.0) + $$Math.pow(y$prime)(2.0)); + }; +}; + +var renderSNPs = function renderSNPs(snpData) { + return function (v) { + var snpData$prime = Data_Functor.map(Data_Map_Internal.functorMap)(Data_List.fromFoldable(Data_Foldable.foldableArray))(snpData); + + var pointed = function pointed(size) { + var place = function place(v1) { + return function (s) { + return { + x: v1.value0 + Genetics_Browser_Coordinates.pairSize(Data_Ring.ringNumber)(v1) * Data_Newtype.unwrap(Genetics_Browser_Coordinates.newtypeNormalized)(Genetics_Browser.featureNormX(s)), + y: size.height * (1 - normYLogScore(v.threshold)(s.feature.score)) + }; + }; + }; + + var placeSeg = function placeSeg(chrId) { + return function (seg) { + return Data_Foldable.foldMap(Data_Foldable.foldableMaybe)(Data_List_Types.monoidList)(Data_Functor.map(Data_List_Types.functorList)(Data_Profunctor_Strong.fanout(Control_Category.categoryFn)(Data_Profunctor_Strong.strongFn)(Control_Category.identity(Control_Category.categoryFn))(place(seg))))(Data_Map_Internal.lookup(Genetics_Browser_Types.ordChrId)(chrId)(snpData$prime)); + }; + }; + + return Data_FoldableWithIndex.foldMapWithIndex(Data_Map_Internal.foldableWithIndexMap)(Data_List_Types.monoidList)(placeSeg); + }; + + var hotspots = function hotspots(pts) { + return function (radius$prime) { + return function (pt) { + var covers = function covers(v1) { + if (dist(v1.value1)(pt) <= v.render.radius + radius$prime) { + return new Data_Maybe.Just(v1.value0); + } + + ; + + if (Data_Boolean.otherwise) { + return Data_Maybe.Nothing.value; + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Demo (line 546, column 15 - line 546, column 63): " + [v1.constructor.name]); + }; + + return Data_Array.fromFoldable(Data_List_Types.foldableList)(Data_Filterable.filterMap(Data_Filterable.filterableList)(covers)(pts)); + }; + }; + }; + + var drawing = function () { + var c = Graphics_Drawing.circle(v.render.pixelOffset.x)(v.render.pixelOffset.y)(v.render.radius); + var fill = Graphics_Drawing.filled(Graphics_Drawing.fillColor(Data_Newtype.unwrap(Genetics_Browser.newtypeHexColor)(v.render.color.fill)))(c); + var out = Graphics_Drawing.outlined(Data_Semigroup.append(Graphics_Drawing.semigroupOutlineStyle)(Graphics_Drawing.outlineColor(Data_Newtype.unwrap(Genetics_Browser.newtypeHexColor)(v.render.color.outline)))(Graphics_Drawing.lineWidth(v.render.lineWidth)))(c); + return Data_Semigroup.append(Graphics_Drawing.semigroupDrawing)(out)(fill); + }(); + + var drawings = function drawings(pts) { + return Control_Applicative.pure(Control_Applicative.applicativeArray)({ + drawing: drawing, + points: Data_Functor.map(Data_Functor.functorArray)(Data_Lens_Getter.view(Data_Lens_Lens_Tuple["_2"](Data_Lens_Internal_Forget.strongForget)))(Data_Array.fromFoldable(Data_List_Types.foldableList)(pts)) + }); + }; + + return function (seg) { + return function (size) { + var pts = pointed(size)(seg); + return { + renderables: Control_Applicative.pure(Data_List_Types.applicativeList)(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "drawingBatch"; + }))(Genetics_Browser_Canvas["_drawingBatch"])(drawings(pts))), + hotspots: hotspots(pts) + }; + }; + }; + }; +}; + +var snpLayer = function () { + var f = function f(c) { + return renderSNPs(c.trackConfig.snps)({ + threshold: c.browserConfig.threshold, + render: c.layerConfig + }); + }; + + return f; +}(); + +var defaultSNPConfig = { + radius: 3.75, + lineWidth: 1.0, + color: { + outline: Data_Newtype.wrap(Genetics_Browser.newtypeHexColor)(Color_Scheme_X11.darkblue), + fill: Data_Newtype.wrap(Genetics_Browser.newtypeHexColor)(Color_Scheme_X11.darkblue) + }, + pixelOffset: { + x: 0.0, + y: 0.0 + } +}; +var defaultAnnotationsConfig = { + radius: 5.5, + outline: Data_Newtype.wrap(Genetics_Browser.newtypeHexColor)(Color.black), + snpColor: Data_Newtype.wrap(Genetics_Browser.newtypeHexColor)(Color_Scheme_Clrs.blue), + geneColor: Data_Newtype.wrap(Genetics_Browser.newtypeHexColor)(Color_Scheme_Clrs.red), + urls: Foreign_Object.empty +}; + +var annotationsUI = function annotationsUI(legend) { + return Genetics_Browser.fixedUILayer(Genetics_Browser_Layer.CRight.create(Genetics_Browser.drawLegendInSlot(legend))); +}; + +var annotationsForScale = function annotationsForScale(cSys) { + return function (snps) { + return function (annots) { + return Data_FunctorWithIndex.mapWithIndex(Data_Map_Internal.functorWithIndexMap)(function (chr) { + return function (seg) { + return Data_Maybe.fromMaybe([])(Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Map_Internal.lookup(Genetics_Browser_Types.ordChrId)(chr)(snps))(function (v) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Map_Internal.lookup(Genetics_Browser_Types.ordChrId)(chr)(annots))(function (v1) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Functor.map(Data_Maybe.functorMaybe)(function (v2) { + return v2.frameSize; + })(Data_Array.head(v)))(function (v2) { + var rad = Data_EuclideanRing.div(Genetics_Browser_Types.euclideanRingBp)(Data_Semiring.mul(Genetics_Browser_Types.semiringBp)(Data_Newtype.wrap(Genetics_Browser_Types.newtypeBp)(3.75))(v2))(Data_Newtype.wrap(Genetics_Browser_Types.newtypeBp)(Genetics_Browser_Coordinates.pairSize(Data_Ring.ringNumber)(seg))); + + var f = function f(pk) { + return { + elements: Data_Filterable.filter(Data_Filterable.filterableArray)(function () { + var $194 = Genetics_Browser_Coordinates.pairsOverlap(Genetics_Browser_Types.ordBp)(pk.covers); + return function ($195) { + return $194(function (v4) { + return v4.position; + }($195)); + }; + }())(v1), + covers: pk.covers, + y: pk.y + }; + }; + + return Control_Applicative.pure(Data_Maybe.applicativeMaybe)(Data_Functor.map(Data_Functor.functorArray)(f)(peaks(rad)(v))); + }); + }); + })); + }; + }); + }; + }; +}; + +var annotationLegendEntry = function annotationLegendEntry(conf) { + return function (a) { + var mkIcon = function mkIcon(color) { + return Data_Semigroup.append(Data_Semigroup.semigroupFn(Graphics_Drawing.semigroupDrawing))(Graphics_Drawing.outlined(Data_Semigroup.append(Graphics_Drawing.semigroupOutlineStyle)(Graphics_Drawing.outlineColor(Data_Newtype.unwrap(Genetics_Browser.newtypeHexColor)(conf.outline)))(Graphics_Drawing.lineWidth(2.0))))(Graphics_Drawing.filled(Graphics_Drawing.fillColor(Data_Newtype.unwrap(Genetics_Browser.newtypeHexColor)(color))))(Graphics_Drawing.circle(0.0)(0.0)(conf.radius)); + }; + + if (a.feature.gene instanceof Data_Maybe.Nothing) { + return { + text: "SNP name", + icon: mkIcon(conf.snpColor) + }; + } + + ; + + if (a.feature.gene instanceof Data_Maybe.Just) { + return { + text: "Gene name", + icon: mkIcon(conf.geneColor) + }; + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Demo (line 409, column 6 - line 411, column 69): " + [a.feature.gene.constructor.name]); + }; +}; + +var annotationLegendTest = function annotationLegendTest(dictFoldable) { + return function (dictFunctor) { + return function (config) { + return function (fs) { + var as = Data_Array.concat(Data_Array.fromFoldable(Data_List_Types.foldableList)(Data_Functor.map(Data_List_Types.functorList)(Data_Array.fromFoldable(dictFoldable))(Data_Map_Internal.values(fs)))); + return Genetics_Browser.trackLegend(Data_Foldable.foldableArray)(Data_Functor.functorArray)(annotationLegendEntry(config))(as); + }; + }; + }; +}; + +var renderAnnotationPeaks = function renderAnnotationPeaks(cSys) { + return function (vScale) { + return function (conf) { + return function (annoPks) { + return function (cdim) { + var tailPixels = 6.0e-2 * cdim.height; + + var drawingCovers = function drawingCovers(aPeak) { + var gH = 11.0 - 6.5; + var h = tailPixels + gH * Data_Foldable.length(Data_Foldable.foldableArray)(Data_Semiring.semiringNumber)(aPeak.elements); + var y = aPeak.y - h; + return { + x: aPeak.covers.value0, + y: y, + width: 14.0, + height: h + }; + }; + + var drawAndLabel = function drawAndLabel(aPeak) { + var x = aPeak.covers.value0 + 0.5 * (aPeak.covers.value1 - aPeak.covers.value0); + + var tail = function () { + var $130 = Data_Array["null"](aPeak.elements); + + if ($130) { + return Data_Monoid.mempty(Graphics_Drawing.monoidDrawing); + } + + ; + return Graphics_Drawing.outlined(Data_Semigroup.append(Graphics_Drawing.semigroupOutlineStyle)(Graphics_Drawing.lineWidth(1.3))(Graphics_Drawing.outlineColor(Color.black)))(Graphics_Drawing.path(Data_Foldable.foldableArray)([{ + x: 0.0, + y: 0.0 + }, { + x: 0.0, + y: -tailPixels + }])); + }(); + + var icons = Graphics_Drawing.translate(0.0)(-tailPixels)(Data_Foldable.foldr(Data_Foldable.foldableArray)(function (a) { + return function (d) { + return Graphics_Drawing.translate(0.0)(-6.5)(Data_Semigroup.append(Graphics_Drawing.semigroupDrawing)(annotationLegendEntry(conf)(a).icon)(d)); + }; + })(Data_Monoid.mempty(Graphics_Drawing.monoidDrawing))(aPeak.elements)); + var labelsHeight = Data_Foldable.length(Data_Foldable.foldableArray)(Data_Semiring.semiringNumber)(aPeak.elements) * 14.0; + var drawing = { + drawing: Data_Semigroup.append(Graphics_Drawing.semigroupDrawing)(tail)(icons), + points: [{ + x: x, + y: aPeak.y + }] + }; + var dC = drawingCovers(aPeak); + + var v = function () { + var $131 = dC.y > labelsHeight; + + if ($131) { + return { + g: Genetics_Browser_Canvas.LCenter.value, + y0: dC.y + }; + } + + ; + return { + g: Genetics_Browser_Canvas.LLeft.value, + y0: aPeak.y + }; + }(); + + var f = function f(a) { + return function (v1) { + return Data_Tuple.Tuple.create(v1.value0 - 8.0)(new Data_List_Types.Cons({ + text: Data_Maybe.fromMaybe(a.feature.name)(a.feature.gene), + point: { + x: x, + y: v1.value0 + }, + gravity: v.g + }, v1.value1)); + }; + }; + + var label = Data_Tuple.snd(Data_Foldable.foldr(Data_Foldable.foldableArray)(f)(new Data_Tuple.Tuple(v.y0, Data_Monoid.mempty(Data_List_Types.monoidList)))(aPeak.elements)); + return new Data_Tuple.Tuple([drawing], label); + }; + + var drawAndLabelAll = function drawAndLabelAll(pks) { + return Data_Foldable.foldMap(Data_Map_Internal.foldableMap)(Data_Tuple.monoidTuple(Data_Monoid.monoidArray)(Data_List_Types.monoidList))(Data_Foldable.foldMap(Data_Foldable.foldableArray)(Data_Tuple.monoidTuple(Data_Monoid.monoidArray)(Data_List_Types.monoidList))(drawAndLabel))(pks); + }; + + var curAnnotPeaks = function curAnnotPeaks(segs) { + var f = function f(chr) { + return function (pks) { + return Data_Maybe.fromMaybe([])(Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Functor.map(Data_Maybe.functorMaybe)(function () { + var $196 = Data_Newtype.wrap(Genetics_Browser_Types.newtypeBp); + var $197 = Genetics_Browser_Coordinates.pairSize(Data_BigInt.ringBigInt); + return function ($198) { + return $196(Data_BigInt.toNumber($197($198))); + }; + }())(Data_Map_Internal.lookup(Genetics_Browser_Types.ordChrId)(chr)(Data_Lens_Getter.viewOn(cSys)(Genetics_Browser_Coordinates["_Segments"](Data_Lens_Internal_Forget.strongForget)))))(function (v) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Map_Internal.lookup(Genetics_Browser_Types.ordChrId)(chr)(segs))(function (v1) { + var rescale = function rescale(pk) { + return { + covers: Data_Functor.map(Data_Pair.functorPair)(function (x) { + return v1.value0 + Genetics_Browser_Coordinates.pairSize(Data_Ring.ringNumber)(v1) * Data_Newtype.unwrap(Genetics_Browser_Types.newtypeBp)(Data_EuclideanRing.div(Genetics_Browser_Types.euclideanRingBp)(x)(v)); + })(pk.covers), + y: cdim.height * (1 - normYLogScore(vScale)(pk.y)), + elements: pk.elements + }; + }; + + return Control_Applicative.pure(Data_Maybe.applicativeMaybe)(Data_Functor.map(Data_Functor.functorArray)(rescale)(pks)); + }); + })); + }; + }; + + return Data_FunctorWithIndex.mapWithIndex(Data_Map_Internal.functorWithIndexMap)(f)(annoPks); + }; + + return function (segs) { + var v = drawAndLabelAll(curAnnotPeaks(segs)); + return { + drawingBatch: v.value0, + labels: v.value1 + }; + }; + }; + }; + }; + }; +}; + +var renderAnnotations = function renderAnnotations(cSys) { + return function (sigSnps) { + return function (allAnnots) { + return function (conf) { + var annoPeaks = annotationsForScale(cSys)(sigSnps)(allAnnots); + return function (seg) { + return function (size) { + var v = renderAnnotationPeaks(cSys)(conf.threshold)(conf.render)(annoPeaks(seg))(size)(seg); + return { + renderables: Data_List.fromFoldable(Data_Foldable.foldableArray)([Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "drawingBatch"; + }))(Genetics_Browser_Canvas["_drawingBatch"])(v.drawingBatch), Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "labels"; + }))(Genetics_Browser_Canvas["_labels"])(v.labels)]) + }; + }; + }; + }; + }; + }; +}; + +var annotationFields = function annotationFields(dictKeys) { + return function (dictRowToList) { + return Record_Extra.keys()(Record_Extra.consKeys(new Data_Symbol.IsSymbol(function () { + return "chr"; + }))(Record_Extra.consKeys(new Data_Symbol.IsSymbol(function () { + return "gene"; + }))(Record_Extra.consKeys(new Data_Symbol.IsSymbol(function () { + return "name"; + }))(Record_Extra.consKeys(new Data_Symbol.IsSymbol(function () { + return "pos"; + }))(Record_Extra.consKeys(new Data_Symbol.IsSymbol(function () { + return "url"; + }))(Record_Extra.nilKeys))))))(Data_Unit.unit); + }; +}; + +var parseAnnotationRest = function parseAnnotationRest(a) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_List.fromFoldable(Data_Foldable.foldableArray))(Foreign_Keys.keys(a)))(function (v) { + var restFields = Data_List.difference(Data_Eq.eqString)(v)(annotationFields(Record_Extra.consKeys(new Data_Symbol.IsSymbol(function () { + return "chr"; + }))(Record_Extra.consKeys(new Data_Symbol.IsSymbol(function () { + return "gene"; + }))(Record_Extra.consKeys(new Data_Symbol.IsSymbol(function () { + return "name"; + }))(Record_Extra.consKeys(new Data_Symbol.IsSymbol(function () { + return "pos"; + }))(Record_Extra.consKeys(new Data_Symbol.IsSymbol(function () { + return "url"; + }))(Record_Extra.nilKeys))))))()); + return Data_Traversable["for"](Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_List_Types.traversableList)(restFields)(function (field) { + return Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(function (v1) { + return { + field: field, + value: v1 + }; + })(Foreign_Index.readProp(field)(a)); + }); + }); +}; + +var parseAnnotation = function parseAnnotation(cSys) { + return function (a) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Simple_JSON["read'"](Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "chr"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "gene"; + }))(Simple_JSON.readMaybe(Simple_JSON.readString))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "name"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "pos"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "url"; + }))(Simple_JSON.readMaybe(Simple_JSON.readString))(Simple_JSON.readFieldsNil)()())()())()())()())()()))(a))(function (v) { + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(parseAnnotationRest(a))(function (v1) { + var feature = Record_Builder.build(Control_Semigroupoid.composeFlipped(Record_Builder.semigroupoidBuilder)(Record_Builder.insert()()(new Data_Symbol.IsSymbol(function () { + return "rest"; + }))(Data_Symbol.SProxy.value)(v1))(Control_Semigroupoid.composeFlipped(Record_Builder.semigroupoidBuilder)(Record_Builder.modify()()(new Data_Symbol.IsSymbol(function () { + return "chr"; + }))(Data_Symbol.SProxy.value)(Genetics_Browser_Types.ChrId))(Record_Builder.modify()()(new Data_Symbol.IsSymbol(function () { + return "pos"; + }))(Data_Symbol.SProxy.value)(Genetics_Browser_Types.Bp))))(v); + + var position = function (p) { + return new Data_Pair.Pair(p, p); + }(feature.pos); + + return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(function () { + var v2 = Data_Map_Internal.lookup(Genetics_Browser_Types.ordChrId)(feature.chr)(Data_Lens_Getter.view(Genetics_Browser_Coordinates["_Segments"](Data_Lens_Internal_Forget.strongForget))(cSys)); + + if (v2 instanceof Data_Maybe.Nothing) { + return Control_Monad_Error_Class.throwError(Control_Monad_Except_Trans.monadThrowExceptT(Data_Identity.monadIdentity))(Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList)(new Foreign.ForeignError("Annotation chr not found in coordinate system!"))); + } + + ; + + if (v2 instanceof Data_Maybe.Just) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Genetics_Browser_Types.Bp(Data_BigInt.toNumber(Genetics_Browser_Coordinates.pairSize(Data_BigInt.ringBigInt)(v2.value0)))); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Demo (line 224, column 16 - line 231, column 49): " + [v2.constructor.name]); + }())(function (v2) { + return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({ + position: position, + frameSize: v2, + feature: feature + }); + }); + }); + }); + }; +}; + +var getAnnotations = function getAnnotations(cs) { + return function (url) { + return Control_Bind.bind(Effect_Aff.bindAff)(Affjax.get(Affjax_ResponseFormat.json)(url))(function (v) { + return Control_Bind.bind(Effect_Aff.bindAff)(Data_Either.either(function () { + var $199 = Control_Monad_Error_Class.throwError(Effect_Aff.monadThrowAff); + return function ($200) { + return $199(Effect_Exception.error(Affjax_ResponseFormat.printResponseFormatError($200))); + }; + }())(Control_Applicative.pure(Effect_Aff.applicativeAff))(v.body))(function (v1) { + return Control_Bind.bind(Effect_Aff.bindAff)(function () { + var v2 = Control_Monad_Except.runExcept(Foreign.readArray(v1)); + + if (v2 instanceof Data_Either.Left) { + return Control_Monad_Error_Class.throwError(Effect_Aff.monadThrowAff)(Effect_Exception.error("Annotations data is not an array")); + } + + ; + + if (v2 instanceof Data_Either.Right) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(v2.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.Demo (line 313, column 16 - line 317, column 37): " + [v2.constructor.name]); + }())(function (v2) { + var parsed = Data_Filterable.partitionMap(Data_Filterable.filterableArray)(function () { + var $201 = parseAnnotation(cs); + return function ($202) { + return Control_Monad_Except.runExcept($201($202)); + }; + }())(v2); + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(function __do() { + Effect_Class_Console.log(Effect_Class.monadEffectEffect)("Raw annotations array length: " + Data_Show.show(Data_Show.showInt)(Data_Array.length(v2)))(); + Effect_Class_Console.log(Effect_Class.monadEffectEffect)("Could not parse " + (Data_Show.show(Data_Show.showInt)(Data_Foldable.length(Data_Foldable.foldableArray)(Data_Semiring.semiringInt)(parsed.left)) + " annotations."))(); + Effect_Class_Console.log(Effect_Class.monadEffectEffect)("Successfully parsed " + (Data_Show.show(Data_Show.showInt)(Data_Foldable.length(Data_Foldable.foldableArray)(Data_Semiring.semiringInt)(parsed.right)) + " annotations."))(); + return Effect_Class_Console.log(Effect_Class.monadEffectEffect)(parsed.right)(); + }))(function () { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(Genetics_Browser.groupToMap(Data_Monoid.monoidArray)(Genetics_Browser_Types.ordChrId)(Data_Foldable.foldableArray)(Control_Applicative.applicativeArray)(function (v3) { + return v3.feature.chr; + })(parsed.right)); + }); + }); + }); + }); + }; +}; + +var addGeneLayers = function addGeneLayers(coordinateSystem) { + return function (config) { + return function (trackData) { + return function (tcont) { + var conf = { + segmentPadding: 12.0, + coordinateSystem: coordinateSystem + }; + var geneLayer = Genetics_Browser.trackLikeLayer(conf)(Genetics_Browser_Layer.Center.create(renderGenes(trackData.genes)({ + genes: {} + }))); + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Canvas.newLayer(Effect_Aff_Class.monadAffAff)()(Genetics_Browser_Cacher.cacherAffCons(new Data_Symbol.IsSymbol(function () { + return "renderables"; + }))()()()()(Genetics_Browser_Cacher.cacherAffNil(Type_Equality.refl)))(tcont)("genes")(geneLayer))(function (v) { + var genes = function genes(o) { + return function (v1) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(v.run(v1))(function () { + return Control_Bind.bind(Effect_Aff.bindAff)(v.last.renderables)(v.drawOnCanvas(o)); + }); + }; + }; + + return Control_Applicative.pure(Effect_Aff.applicativeAff)({ + genes: genes + }); + }); + }; + }; + }; +}; + +var addGWASLayers = function addGWASLayers(coordinateSystem) { + return function (config) { + return function (trackData) { + var vscale = Record_Builder.build(Record_Builder.merge()()(config.vscale))(config.score); + var sigSnps = filterSig(config.score)(trackData.snps); + var legend = Record.insert(new Data_Symbol.IsSymbol(function () { + return "entries"; + }))()()(Data_Symbol.SProxy.value)(annotationLegendTest(Data_Foldable.foldableArray)(Data_Functor.functorArray)(config.annotations)(trackData.annotations))(config.legend); + var conf = { + segmentPadding: 12.0, + coordinateSystem: coordinateSystem + }; + var snpLayer$prime = Genetics_Browser.trackLikeLayer(conf)(Genetics_Browser_Layer.Center.create(renderSNPs(trackData.snps)({ + threshold: config.score, + render: config.snps + }))); + var annotationLayer = Genetics_Browser.trackLikeLayer(conf)(Genetics_Browser_Layer.Center.create(renderAnnotations(coordinateSystem)(sigSnps)(trackData.annotations)({ + threshold: config.score, + render: config.annotations + }))); + return function (bc) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Canvas.newLayer(Effect_Aff_Class.monadAffAff)()(Genetics_Browser_Cacher.cacherAffCons(new Data_Symbol.IsSymbol(function () { + return "renderables"; + }))()()()()(Genetics_Browser_Cacher.cacherAffNil(Type_Equality.refl)))(bc)("ruler")(new Genetics_Browser_Layer.Layer(Genetics_Browser_Layer.Fixed.value, Genetics_Browser_Layer.NoMask.value, new Genetics_Browser_Layer.Center(Genetics_Browser.thresholdRuler))))(function (v) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Canvas.newLayer(Effect_Aff_Class.monadAffAff)()(Genetics_Browser_Cacher.cacherAffCons(new Data_Symbol.IsSymbol(function () { + return "hotspots"; + }))()()()()(Genetics_Browser_Cacher.cacherAffCons(new Data_Symbol.IsSymbol(function () { + return "renderables"; + }))()()()()(Genetics_Browser_Cacher.cacherAffNil(Type_Equality.refl))))(bc)("snps")(snpLayer$prime))(function (v1) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Canvas.newLayer(Effect_Aff_Class.monadAffAff)()(Genetics_Browser_Cacher.cacherAffCons(new Data_Symbol.IsSymbol(function () { + return "renderables"; + }))()()()()(Genetics_Browser_Cacher.cacherAffNil(Type_Equality.refl)))(bc)("annotations")(annotationLayer))(function (v2) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Canvas.newLayer(Effect_Aff_Class.monadAffAff)()(Genetics_Browser_Cacher.cacherAffCons(new Data_Symbol.IsSymbol(function () { + return "renderables"; + }))()()()()(Genetics_Browser_Cacher.cacherAffNil(Type_Equality.refl)))(bc)("vscale")(snpsUI(vscale)))(function (v3) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Canvas.newLayer(Effect_Aff_Class.monadAffAff)()(Genetics_Browser_Cacher.cacherAffCons(new Data_Symbol.IsSymbol(function () { + return "renderables"; + }))()()()()(Genetics_Browser_Cacher.cacherAffNil(Type_Equality.refl)))(bc)("legend")(annotationsUI(legend)))(function (v4) { + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Effect_Ref["new"](0.0)))(function (v5) { + var snps = function snps(v6) { + return function (v7) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Effect_Ref.write(v6.value0)(v5)))(function () { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(v1.run(v7))(function () { + return Control_Bind.bind(Effect_Aff.bindAff)(v1.last.renderables)(v1.drawOnCanvas(v6)); + }); + }); + }; + }; + + var hotspots = Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Effect_Ref.read(v5)))(function (v6) { + return Control_Bind.bind(Effect_Aff.bindAff)(v1.last.hotspots)(function (v7) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(function (r) { + return function (p) { + return v7(r)({ + x: p.x + v6, + y: p.y + }); + }; + }); + }); + }); + + var fixedUI = function () { + var uiConf = { + rulerColor: Data_Newtype.wrap(Genetics_Browser.newtypeHexColor)(Color_Scheme_Clrs.red), + threshold: config.score + }; + + var render = function render(l) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(l.run(uiConf))(function () { + return Control_Bind.bind(Effect_Aff.bindAff)(l.last.renderables)(l.drawOnCanvas(new Data_Pair.Pair(0.0, 0.0))); + }); + }; + + return Data_Foldable.traverse_(Effect_Aff.applicativeAff)(Data_Foldable.foldableArray)(render)([v4, v3, v]); + }(); + + var annotations = function annotations(o) { + return function (v6) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(v2.run(v6))(function () { + return Control_Bind.bind(Effect_Aff.bindAff)(v2.last.renderables)(v2.drawOnCanvas(o)); + }); + }; + }; + + return Control_Applicative.pure(Effect_Aff.applicativeAff)({ + snps: snps, + annotations: annotations, + hotspots: hotspots, + fixedUI: fixedUI + }); + }); + }); + }); + }); + }); + }); + }; + }; + }; +}; + +var addChrLayers = function addChrLayers(trackConf) { + return function (v) { + return function (tc) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Canvas.newLayer(Effect_Aff_Class.monadAffAff)()(Genetics_Browser_Cacher.cacherAffCons(new Data_Symbol.IsSymbol(function () { + return "renderables"; + }))()()()()(Genetics_Browser_Cacher.cacherAffNil(Type_Equality.refl)))(tc)("chrBackground")(Genetics_Browser.trackLikeLayer(trackConf)(Genetics_Browser_Layer.Center.create(Genetics_Browser.chrBackgroundLayer({ + chrBG1: v.chrBG1, + chrBG2: v.chrBG2, + segmentPadding: trackConf.segmentPadding + })))))(function (v1) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Canvas.newLayer(Effect_Aff_Class.monadAffAff)()(Genetics_Browser_Cacher.cacherAffCons(new Data_Symbol.IsSymbol(function () { + return "renderables"; + }))()()()()(Genetics_Browser_Cacher.cacherAffNil(Type_Equality.refl)))(tc)("chrLabels")(Genetics_Browser.chrLabelsLayer(trackConf)({ + fontSize: v.chrLabels.fontSize + })))(function (v2) { + var chrs = function chrs(o) { + return function (v3) { + var render = function render(l) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(l.run(v3))(function () { + return Control_Bind.bind(Effect_Aff.bindAff)(l.last.renderables)(l.drawOnCanvas(o)); + }); + }; + + return Data_Foldable.traverse_(Effect_Aff.applicativeAff)(Data_Foldable.foldableArray)(render)([v1, v2]); + }; + }; + + return Control_Applicative.pure(Effect_Aff.applicativeAff)(chrs); + }); + }); + }; + }; +}; + +var _snps = Data_Symbol.SProxy.value; +var _annotations = Data_Symbol.SProxy.value; +module.exports = { + renderGenes: renderGenes, + drawGene: drawGene, + parseSNP: parseSNP, + annotationFields: annotationFields, + parseAnnotation: parseAnnotation, + parseAnnotationRest: parseAnnotationRest, + showAnnotationField: showAnnotationField, + showAnnotation: showAnnotation, + getSNPs: getSNPs, + getAnnotations: getAnnotations, + snpPeak: snpPeak, + peak1: peak1, + peaks: peaks, + defaultAnnotationsConfig: defaultAnnotationsConfig, + annotationLegendEntry: annotationLegendEntry, + annotationLegendTest: annotationLegendTest, + normYLogScore: normYLogScore, + dist: dist, + filterSig: filterSig, + snpsUI: snpsUI, + annotationsUI: annotationsUI, + defaultSNPConfig: defaultSNPConfig, + snpLayer: snpLayer, + renderSNPs: renderSNPs, + annotationsForScale: annotationsForScale, + renderAnnotationPeaks: renderAnnotationPeaks, + renderAnnotations: renderAnnotations, + "_snps": _snps, + "_annotations": _annotations, + addChrLayers: addChrLayers, + addGWASLayers: addGWASLayers, + addGeneLayers: addGeneLayers +}; +},{"../Affjax/index.js":"IjAr","../Affjax.ResponseFormat/index.js":"QSsR","../Color/index.js":"f3ma","../Color.Scheme.Clrs/index.js":"rp+n","../Color.Scheme.X11/index.js":"bDzA","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Except/index.js":"Fye2","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Semigroupoid/index.js":"/riR","../Data.Array/index.js":"4t4C","../Data.BigInt/index.js":"Zx+T","../Data.Boolean/index.js":"ObQr","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Filterable/index.js":"6hfS","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Identity/index.js":"2OKT","../Data.Lens.Getter/index.js":"OPOX","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.Lens.Internal.Re/index.js":"IZDD","../Data.Lens.Iso/index.js":"fFCp","../Data.Lens.Lens.Tuple/index.js":"RTVM","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Pair/index.js":"PpsX","../Data.Profunctor.Strong/index.js":"w9p6","../Data.Ring/index.js":"E2qH","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.Symbol/index.js":"4oJQ","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unit/index.js":"NhVk","../Data.Variant/index.js":"hgdh","../Effect.Aff/index.js":"I7lu","../Effect.Aff.Class/index.js":"I4H+","../Effect.Class/index.js":"dWtH","../Effect.Class.Console/index.js":"3Dts","../Effect.Exception/index.js":"0OCW","../Effect.Ref/index.js":"/Jaj","../Foreign/index.js":"pu1p","../Foreign.Index/index.js":"Ryy1","../Foreign.Keys/index.js":"hcOM","../Foreign.Object/index.js":"jsiz","../Genetics.Browser/index.js":"X0te","../Genetics.Browser.Cacher/index.js":"61ee","../Genetics.Browser.Canvas/index.js":"VVkU","../Genetics.Browser.Coordinates/index.js":"7bYH","../Genetics.Browser.Layer/index.js":"YWUW","../Genetics.Browser.Types/index.js":"HhmG","../Graphics.Drawing/index.js":"0WVi","../Math/index.js":"Rpaz","../Record/index.js":"0gG4","../Record.Builder/index.js":"VeY4","../Record.Extra/index.js":"KzZr","../Simple.JSON/index.js":"DqNI","../Type.Equality/index.js":"Uq/R"}],"HH6s":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Effect = require("../Effect/index.js"); + +var Effect_Aff = require("../Effect.Aff/index.js"); + +var Genetics_Browser_Canvas = require("../Genetics.Browser.Canvas/index.js"); + +var Record = require("../Record/index.js"); + +var Type_Data_RowList = require("../Type.Data.RowList/index.js"); + +var Type_Equality = require("../Type.Equality/index.js"); + +var LayerDef = function LayerDef(x) { + return x; +}; + +var UnionConflict = {}; + +var TrackRecord = function TrackRecord(buildTrack) { + this.buildTrack = buildTrack; +}; + +var TrackData = function TrackData(fetchDataImpl) { + this.fetchDataImpl = fetchDataImpl; +}; + +var TrackConfig = function TrackConfig(makeContainersImpl) { + this.makeContainersImpl = makeContainersImpl; +}; + +var SafeUnion = {}; + +var GetTrackConfig = function GetTrackConfig(getTrackConfigImpl) { + this.getTrackConfigImpl = getTrackConfigImpl; +}; + +var GetLayerConfig = function GetLayerConfig(getLayerConfigImpl) { + this.getLayerConfigImpl = getLayerConfigImpl; +}; + +var GetBrowserConfig = function GetBrowserConfig(getBrowserConfigImpl) { + this.getBrowserConfigImpl = getBrowserConfigImpl; +}; + +var ConflictsWith = {}; +var ConflictingList = {}; + +var CombineFuns = function CombineFuns(combineFunsImpl) { + this.combineFunsImpl = combineFunsImpl; +}; + +var BuildLayers = {}; + +var ApplyLayerDef = function ApplyLayerDef(applyLayerDefImpl) { + this.applyLayerDefImpl = applyLayerDefImpl; +}; + +var unionConflictSuccess = UnionConflict; + +var unionConflictFail = function unionConflictFail(dictFail) { + return UnionConflict; +}; + +var trackRecordNil = function trackRecordNil(dictTypeEquals) { + return new TrackRecord(function (v) { + return function (v1) { + return function (v2) { + return Data_Monoid.mempty(Effect_Aff.monoidAff(Data_Monoid.monoidRecord()(Data_Monoid.monoidRecordCons(new Data_Symbol.IsSymbol(function () { + return "hotspots"; + }))(Effect_Aff.monoidAff(Data_Monoid.monoidFn(Data_Monoid.monoidFn(Data_Monoid.monoidArray))))()(Data_Monoid.monoidRecordCons(new Data_Symbol.IsSymbol(function () { + return "render"; + }))(Data_Monoid.monoidFn(Data_Monoid.monoidFn(Effect_Aff.monoidAff(Data_Monoid.monoidUnit))))()(Data_Monoid.monoidRecordNil))))); + }; + }; + }); +}; + +var trackDataNil = function trackDataNil(dictTypeEquals) { + return new TrackData(function (v) { + return function (v1) { + return function (v2) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(Type_Equality.from(dictTypeEquals)({})); + }; + }; + }); +}; + +var trackConfigNil = function trackConfigNil(dictTypeEquals) { + return new TrackConfig(function (v) { + return function (v1) { + return function (v2) { + return Control_Applicative.pure(Effect.applicativeEffect)(Type_Equality.from(dictTypeEquals)({})); + }; + }; + }); +}; + +var safeUnion = function safeUnion(dictUnionConflict) { + return function (dictUnion) { + return function (dictRowToList) { + return function (dictConflictingList) { + return function (dictNub) { + return SafeUnion; + }; + }; + }; + }; +}; + +var makeContainersImpl = function makeContainersImpl(dict) { + return dict.makeContainersImpl; +}; + +var trackConfigCons = function trackConfigCons(dictIsSymbol) { + return function (dictTrackConfig) { + return function (dictCons) { + return function (dictLacks) { + return function (dictCons1) { + return function (dictLacks1) { + return function (dictTypeEquals) { + return new TrackConfig(function (v) { + return function (width) { + return function (r) { + var c = Type_Equality.from(dictTypeEquals)(Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(r)); + return function __do() { + var v1 = Genetics_Browser_Canvas.trackContainer({ + width: width, + height: c.trackHeight + })(c.padding)(Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value))(); + var v2 = makeContainersImpl(dictTrackConfig)(Type_Data_RowList.RLProxy.value)(width)(Record["delete"](dictIsSymbol)(dictLacks)(dictCons)(Data_Symbol.SProxy.value)(Type_Equality.from(Type_Equality.refl)(r)))(); + return Record.insert(dictIsSymbol)(dictLacks1)(dictCons1)(Data_Symbol.SProxy.value)(v1)(v2); + }; + }; + }; + }); + }; + }; + }; + }; + }; + }; +}; + +var makeContainers = function makeContainers(dictRowToList) { + return function (dictTrackConfig) { + return makeContainersImpl(dictTrackConfig)(Type_Data_RowList.RLProxy.value); + }; +}; + +var getTrackConfigImpl = function getTrackConfigImpl(dict) { + return dict.getTrackConfigImpl; +}; + +var getTrackConfig = function getTrackConfig(dictIsSymbol) { + return function (dictTypeEquals) { + return function (dictIsSymbol1) { + return function (dictTypeEquals1) { + return function (dictIsSymbol2) { + return function (dictCons) { + return function (dictLacks) { + return function (dictCons1) { + return function (dictLacks1) { + return function (dictCons2) { + return function (dictLacks2) { + return new GetTrackConfig(function (total) { + return function (v) { + var tracks$prime = Record.get(dictIsSymbol)(dictCons)(Type_Equality.from(dictTypeEquals)(Data_Symbol.SProxy.value))(total); + var thisTrack = Record.get(dictIsSymbol2)(dictCons1)(Type_Equality.from(Type_Equality.refl)(Data_Symbol.SProxy.value))(tracks$prime); + return Record["delete"](dictIsSymbol1)(dictLacks2)(dictCons2)(Type_Equality.from(dictTypeEquals1)(Data_Symbol.SProxy.value))(thisTrack); + }; + }); + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; + +var getLayerConfigImpl = function getLayerConfigImpl(dict) { + return dict.getLayerConfigImpl; +}; + +var getLayerConfig = function getLayerConfig(dictIsSymbol) { + return function (dictTypeEquals) { + return function (dictIsSymbol1) { + return function (dictTypeEquals1) { + return function (dictIsSymbol2) { + return function (dictIsSymbol3) { + return function (dictCons) { + return function (dictLacks) { + return function (dictCons1) { + return function (dictLacks1) { + return function (dictCons2) { + return function (dictLacks2) { + return function (dictCons3) { + return function (dictLacks3) { + return new GetLayerConfig(function (total) { + return function (v) { + return function (v1) { + var tracks$prime = Record.get(dictIsSymbol)(dictCons)(Type_Equality.from(dictTypeEquals)(Data_Symbol.SProxy.value))(total); + var thisTrack = Record.get(dictIsSymbol2)(dictCons1)(Type_Equality.from(Type_Equality.refl)(Data_Symbol.SProxy.value))(tracks$prime); + var layers = Record.get(dictIsSymbol1)(dictCons2)(Type_Equality.from(dictTypeEquals1)(Data_Symbol.SProxy.value))(thisTrack); + return Record.get(dictIsSymbol3)(dictCons3)(Type_Equality.from(Type_Equality.refl)(Data_Symbol.SProxy.value))(layers); + }; + }; + }); + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; + +var getBrowserConfigImpl = function getBrowserConfigImpl(dict) { + return dict.getBrowserConfigImpl; +}; + +var getBrowserConfig = function getBrowserConfig(dictIsSymbol) { + return function (dictTypeEquals) { + return function (dictIsSymbol1) { + return function (dictTypeEquals1) { + return function (dictCons) { + return function (dictLacks) { + return function (dictCons1) { + return function (dictLacks1) { + return new GetBrowserConfig(function (total) { + var browser$prime = Record.get(dictIsSymbol)(dictCons)(Type_Equality.from(dictTypeEquals)(Data_Symbol.SProxy.value))(total); + return Record["delete"](dictIsSymbol1)(dictLacks1)(dictCons1)(Type_Equality.from(dictTypeEquals1)(Data_Symbol.SProxy.value))(browser$prime); + }); + }; + }; + }; + }; + }; + }; + }; +}; + +var fetchDataImpl = function fetchDataImpl(dict) { + return dict.fetchDataImpl; +}; + +var trackDataCons = function trackDataCons(dictIsSymbol) { + return function (dictLacks) { + return function (dictCons) { + return function (dictMonoid) { + return function (dictCons1) { + return function (dictLacks1) { + return function (dictCons2) { + return function (dictTrackData) { + return new TrackData(function (v) { + return function (fetchers) { + return function (urls) { + return Control_Bind.bind(Effect_Aff.bindAff)(fetchDataImpl(dictTrackData)(Type_Data_RowList.RLProxy.value)(Record["delete"](dictIsSymbol)(dictLacks)(dictCons)(Data_Symbol.SProxy.value)(fetchers))(urls))(function (v1) { + return Control_Bind.bind(Effect_Aff.bindAff)(Data_Foldable.foldMap(Data_Foldable.foldableMaybe)(Effect_Aff.monoidAff(dictMonoid))(Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(fetchers))(Record.get(dictIsSymbol)(dictCons1)(Data_Symbol.SProxy.value)(urls)))(function (v2) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(Record.insert(dictIsSymbol)(dictLacks1)(dictCons2)(Data_Symbol.SProxy.value)(v2)(v1)); + }); + }); + }; + }; + }); + }; + }; + }; + }; + }; + }; + }; +}; + +var fetchData = function fetchData(dictRowToList) { + return function (dictRowToList1) { + return function (dictTrackData) { + return function (tc) { + return function (fs) { + return function (urls) { + return Genetics_Browser_Canvas.withLoadingIndicator(Effect_Aff.monadEffectAff)(tc)(fetchDataImpl(dictTrackData)(Type_Data_RowList.RLProxy.value)(fs)(urls)); + }; + }; + }; + }; + }; +}; + +var conflictsWithNil = ConflictsWith; +var conflictsWithCons3 = ConflictsWith; + +var conflictsWithCons2 = function conflictsWithCons2(dictConflictsWith) { + return ConflictsWith; +}; + +var conflictsWithCons1 = function conflictsWithCons1(dictConflictsWith) { + return ConflictsWith; +}; + +var conflictingListNil = ConflictingList; + +var conflictingListCons = function conflictingListCons(dictConflictsWith) { + return function (dictConflictingList) { + return function (dictOr) { + return ConflictingList; + }; + }; +}; + +var combineFunsImpl = function combineFunsImpl(dict) { + return dict.combineFunsImpl; +}; + +var combineFuns = function combineFuns(dictRowToList) { + return function (dictCombineFuns) { + return function (funs) { + return function (args) { + return combineFunsImpl(dictCombineFuns)(Type_Data_RowList.RLProxy.value)(funs)(args); + }; + }; + }; +}; + +var combineFunNil = function combineFunNil(dictTypeEquals) { + return new CombineFuns(function (v) { + return function (v1) { + return function (v2) { + return Type_Equality.from(dictTypeEquals)({}); + }; + }; + }); +}; + +var combineFunCons = function combineFunCons(dictIsSymbol) { + return function (dictLacks) { + return function (dictCons) { + return function (dictSafeUnion) { + return function (dictLacks1) { + return function (dictCons1) { + return function (dictCombineFuns) { + return new CombineFuns(function (v) { + return function (funs) { + return function (args) { + var rest = combineFunsImpl(dictCombineFuns)(Type_Data_RowList.RLProxy.value)(Record["delete"](dictIsSymbol)(dictLacks)(dictCons)(Data_Symbol.SProxy.value)(funs))(args); + var fn = Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(funs); + return Record.insert(dictIsSymbol)(dictLacks1)(dictCons1)(Data_Symbol.SProxy.value)(fn(args))(rest); + }; + }; + }); + }; + }; + }; + }; + }; + }; +}; + +var buildTrack = function buildTrack(dict) { + return dict.buildTrack; +}; + +var makeTrack = function makeTrack(dictRowToList) { + return function (dictTrackRecord) { + return function (r) { + return function (c) { + return buildTrack(dictTrackRecord)(Type_Data_RowList.RLProxy.value)(r)(c); + }; + }; + }; +}; + +var trackRecordHotspots = function trackRecordHotspots(dictIsSymbol) { + return function (dictLacks) { + return function (dictCons) { + return function (dictTypeEquals) { + return function (dictTrackRecord) { + return new TrackRecord(function (v) { + return function (r) { + return function (tcont) { + return Control_Bind.bind(Effect_Aff.bindAff)(buildTrack(dictTrackRecord)(Type_Data_RowList.RLProxy.value)(Record["delete"](dictIsSymbol)(dictLacks)(dictCons)(Data_Symbol.SProxy.value)(r))(tcont))(function (v1) { + var hotspots = Control_Apply.apply(Effect_Aff.applyAff)(Data_Functor.map(Effect_Aff.functorAff)(function (v2) { + return function (v3) { + return function (rad) { + return function (p) { + return Data_Semigroup.append(Data_Semigroup.semigroupArray)(v2(rad)(Type_Equality.from(dictTypeEquals)(p)))(v3(rad)(p)); + }; + }; + }; + })(Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(r)))(v1.hotspots); + return Control_Applicative.pure(Effect_Aff.applicativeAff)({ + render: v1.render, + hotspots: hotspots + }); + }); + }; + }; + }); + }; + }; + }; + }; +}; + +var trackRecordRender = function trackRecordRender(dictIsSymbol) { + return function (dictLacks) { + return function (dictCons) { + return function (dictTrackRecord) { + return new TrackRecord(function (v) { + return function (r) { + return function (tcont) { + return Control_Bind.bind(Effect_Aff.bindAff)(buildTrack(dictTrackRecord)(Type_Data_RowList.RLProxy.value)(Record["delete"](dictIsSymbol)(dictLacks)(dictCons)(Data_Symbol.SProxy.value)(r))(tcont))(function (v1) { + var rLayer = function rLayer(p) { + return function (c) { + return Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(r)(p)(c); + }; + }; + + return Control_Applicative.pure(Effect_Aff.applicativeAff)({ + render: Data_Semigroup.append(Data_Semigroup.semigroupFn(Data_Semigroup.semigroupFn(Effect_Aff.semigroupAff(Data_Semigroup.semigroupUnit))))(rLayer)(v1.render), + hotspots: v1.hotspots + }); + }); + }; + }; + }); + }; + }; + }; +}; + +var trackRecordUI = function trackRecordUI(dictIsSymbol) { + return function (dictLacks) { + return function (dictCons) { + return function (dictTrackRecord) { + return new TrackRecord(function (v) { + return function (r) { + return function (tcont) { + return Control_Bind.bind(Effect_Aff.bindAff)(buildTrack(dictTrackRecord)(Type_Data_RowList.RLProxy.value)(Record["delete"](dictIsSymbol)(dictLacks)(dictCons)(Data_Symbol.SProxy.value)(r))(tcont))(function (v1) { + var rLayer = function rLayer(v2) { + return function (v3) { + return Record.get(dictIsSymbol)(dictCons)(Data_Symbol.SProxy.value)(r); + }; + }; + + return Control_Applicative.pure(Effect_Aff.applicativeAff)({ + render: Data_Semigroup.append(Data_Semigroup.semigroupFn(Data_Semigroup.semigroupFn(Effect_Aff.semigroupAff(Data_Semigroup.semigroupUnit))))(rLayer)(v1.render), + hotspots: v1.hotspots + }); + }); + }; + }; + }); + }; + }; + }; +}; + +var applyLayerDefInst = function applyLayerDefInst(dictIsSymbol) { + return function (dictIsSymbol1) { + return function (dictGetBrowserConfig) { + return function (dictGetTrackConfig) { + return function (dictGetLayerConfig) { + return new ApplyLayerDef(function (v) { + return function (trackName) { + return function (layerName) { + return function (total) { + var trackConfig = getTrackConfigImpl(dictGetTrackConfig)(total)(trackName); + var layerConfig = getLayerConfigImpl(dictGetLayerConfig)(total)(trackName)(layerName); + var browserConfig = getBrowserConfigImpl(dictGetBrowserConfig)(total); + return v({ + browserConfig: browserConfig, + trackConfig: trackConfig, + layerConfig: layerConfig + }); + }; + }; + }; + }); + }; + }; + }; + }; +}; + +var applyLayerDefImpl = function applyLayerDefImpl(dict) { + return dict.applyLayerDefImpl; +}; + +var applyLayerDef = function applyLayerDef(dictIsSymbol) { + return function (dictIsSymbol1) { + return function (dictApplyLayerDef) { + return applyLayerDefImpl(dictApplyLayerDef); + }; + }; +}; + +module.exports = { + TrackRecord: TrackRecord, + buildTrack: buildTrack, + makeTrack: makeTrack, + TrackConfig: TrackConfig, + makeContainersImpl: makeContainersImpl, + makeContainers: makeContainers, + TrackData: TrackData, + fetchDataImpl: fetchDataImpl, + fetchData: fetchData, + CombineFuns: CombineFuns, + combineFunsImpl: combineFunsImpl, + combineFuns: combineFuns, + SafeUnion: SafeUnion, + UnionConflict: UnionConflict, + ConflictingList: ConflictingList, + ConflictsWith: ConflictsWith, + LayerDef: LayerDef, + trackRecordRender: trackRecordRender, + trackRecordUI: trackRecordUI, + trackRecordHotspots: trackRecordHotspots, + trackRecordNil: trackRecordNil, + trackConfigNil: trackConfigNil, + trackConfigCons: trackConfigCons, + trackDataCons: trackDataCons, + trackDataNil: trackDataNil, + combineFunCons: combineFunCons, + combineFunNil: combineFunNil, + conflictsWithNil: conflictsWithNil, + conflictsWithCons1: conflictsWithCons1, + conflictsWithCons3: conflictsWithCons3, + conflictsWithCons2: conflictsWithCons2, + conflictingListNil: conflictingListNil, + conflictingListCons: conflictingListCons, + unionConflictFail: unionConflictFail, + unionConflictSuccess: unionConflictSuccess, + safeUnion: safeUnion +}; +},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Data.Foldable/index.js":"eVDl","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ","../Data.Symbol/index.js":"4oJQ","../Effect/index.js":"oTWB","../Effect.Aff/index.js":"I7lu","../Genetics.Browser.Canvas/index.js":"VVkU","../Record/index.js":"0gG4","../Type.Data.RowList/index.js":"XaXP","../Type.Equality/index.js":"Uq/R"}],"nvf7":[function(require,module,exports) { +"use strict"; + +exports.onTimeout = function (delay) { + return function (cb) { + return function () { + var timeoutRef = null; + + var throttled = function throttled() { + if (timeoutRef) { + clearTimeout(timeoutRef); + } + + timeoutRef = setTimeout(function () { + timeoutRef = null; + cb(); + }, delay); + }; + + return { + run: throttled, + cancel: function cancel() { + clearTimeout(timeoutRef); + } + }; + }; + }; +}; + +exports.onFrame = function (cb) { + return function () { + var cbRef = null; + + var runCallback = function runCallback() { + if (cbRef) { + window.cancelAnimationFrame(cbRef); + } + + cbRef = window.requestAnimationFrame(function (t) { + cb(); + cbRef = null; + }); + }; + + var cancelCallback = function cancelCallback() { + if (cbRef) { + window.cancelAnimationFrame(cbRef); + cbRef = null; + } + }; + + return { + run: runCallback, + cancel: cancelCallback + }; + }; +}; +},{}],"Tmz+":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Category = require("../Control.Category/index.js"); + +var Data_BigInt = require("../Data.BigInt/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Lens_Getter = require("../Data.Lens.Getter/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Pair = require("../Data.Pair/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Effect = require("../Effect/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var Effect_Ref = require("../Effect.Ref/index.js"); + +var Genetics_Browser_Canvas = require("../Genetics.Browser.Canvas/index.js"); + +var Genetics_Browser_Coordinates = require("../Genetics.Browser.Coordinates/index.js"); + +var ScrollView = function () { + function ScrollView(value0) { + this.value0 = value0; + } + + ; + + ScrollView.create = function (value0) { + return new ScrollView(value0); + }; + + return ScrollView; +}(); + +var ZoomView = function () { + function ZoomView(value0) { + this.value0 = value0; + } + + ; + + ZoomView.create = function (value0) { + return new ZoomView(value0); + }; + + return ZoomView; +}(); + +var ModView = function () { + function ModView(value0) { + this.value0 = value0; + } + + ; + + ModView.create = function (value0) { + return new ModView(value0); + }; + + return ModView; +}(); + +var updateViewFold = function updateViewFold(uv) { + return Data_Newtype.over(Genetics_Browser_Coordinates.coordsysviewNewtype)(Genetics_Browser_Coordinates.coordsysviewNewtype)(Genetics_Browser_Coordinates.CoordSysView)(function () { + if (uv instanceof ZoomView) { + return function (v) { + return Genetics_Browser_Coordinates.scalePairBy(v)(uv.value0); + }; + } + + ; + + if (uv instanceof ScrollView) { + return function (v) { + return Genetics_Browser_Coordinates.translatePairBy(v)(uv.value0); + }; + } + + ; + + if (uv instanceof ModView) { + return uv.value0; + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI.View (line 58, column 39 - line 61, column 20): " + [uv.constructor.name]); + }()); +}; + +var showUpdateView = new Data_Show.Show(function (v) { + if (v instanceof ScrollView) { + return "(Scroll by " + (Data_Show.show(Data_Show.showNumber)(v.value0) + ")"); + } + + ; + + if (v instanceof ZoomView) { + return "(Zoom by " + (Data_Show.show(Data_Show.showNumber)(v.value0) + ")"); + } + + ; + return "(ModView)"; +}); +var semigroupUpdateView = new Data_Semigroup.Semigroup(function (v) { + return function (v1) { + if (v instanceof ScrollView && v1 instanceof ScrollView) { + return new ScrollView(v.value0 + v1.value0); + } + + ; + + if (v instanceof ZoomView && v1 instanceof ZoomView) { + return new ZoomView(v.value0 * v1.value0); + } + + ; + return v1; + }; +}); +var monoidUpdateView = new Data_Monoid.Monoid(function () { + return semigroupUpdateView; +}, new ModView(Control_Category.identity(Control_Category.categoryFn))); + +var animateDelta = function animateDelta(dictMonoid) { + return function (motion) { + return function (cb) { + return function (initial) { + return function (timeout) { + return function __do() { + var v = Effect_Ref["new"](initial.position)(); + var v1 = Effect_Ref["new"](initial.velocity)(); + var v2 = $foreign.onTimeout(timeout)(function __do() { + var v2 = Effect_Ref.read(v)(); + return cb(new Data_Either.Left(v2))(); + })(); + var v3 = $foreign.onFrame(function __do() { + var v3 = Effect_Ref.read(v1)(); + Effect_Ref.write(Data_Monoid.mempty(dictMonoid))(v1)(); + var v4 = Effect_Ref.read(v)(); + Effect_Ref.write(motion.step(v3)(v4))(v)(); + cb(Data_Either.Right.create(motion.animate(v3)(v4)))(); + return v2.run(); + })(); + var velocity = Effect_Ref.read(v1); + + var update = function update(cmd) { + return function __do() { + Effect_Ref.modify_(function (v4) { + return Data_Semigroup.append(dictMonoid.Semigroup0())(v4)(cmd); + })(v1)(); + return v3.run(); + }; + }; + + var position = Effect_Ref.read(v); + return { + update: update, + position: position, + velocity: velocity + }; + }; + }; + }; + }; + }; +}; + +var browserViewManager = function browserViewManager(cSys) { + return function (timeout) { + return function (options) { + return function (bc) { + return function __do() { + var v = Effect_Ref["new"](Data_Monoid.mempty(Data_List_Types.monoidList))(); + + var toZoomRange = function toZoomRange(v1) { + return function (x) { + var dx = (x - 1.0) / 2.0; + + var l$prime = function () { + var $43 = Data_Ord.lessThanOrEq(Data_BigInt.ordBigInt)(v1.value0)(Data_Semiring.zero(Data_BigInt.semiringBigInt)); + + if ($43) { + return 0.0; + } + + ; + return -dx; + }(); + + var r$prime = function () { + var $44 = Data_Ord.greaterThanOrEq(Data_BigInt.ordBigInt)(v1.value1)(Data_Lens_Getter.viewOn(cSys)(Genetics_Browser_Coordinates["_TotalSize"](Data_BigInt.ringBigInt))); + + if ($44) { + return 1.0; + } + + ; + return 1.0 + dx; + }(); + + return new Data_Pair.Pair(l$prime, r$prime); + }; + }; + + var toLengths = function toLengths(v1) { + return function (x) { + var $49 = x < 0; + + if ($49) { + var $50 = Data_Ord.lessThanOrEq(Data_BigInt.ordBigInt)(v1.value0)(Data_Semiring.zero(Data_BigInt.semiringBigInt)); + + if ($50) { + return 0.0; + } + + ; + return x; + } + + ; + var $51 = Data_Ord.greaterThanOrEq(Data_BigInt.ordBigInt)(v1.value1)(Data_Lens_Getter.viewOn(cSys)(Genetics_Browser_Coordinates["_TotalSize"](Data_BigInt.ringBigInt))); + + if ($51) { + return 0.0; + } + + ; + return x; + }; + }; + + var step = function step(uv) { + var $62 = Genetics_Browser_Coordinates.normalizeView(cSys)(Data_BigInt.fromInt(200000)); + var $63 = updateViewFold(uv); + return function ($64) { + return $62($63($64)); + }; + }; + + var initial = { + position: options.initialView, + velocity: Data_Monoid.mempty(monoidUpdateView) + }; + + var callback = function callback(v1) { + if (v1 instanceof Data_Either.Right) { + return Genetics_Browser_Canvas.forTracks_(Effect_Class.monadEffectEffect)(bc)(Data_Function.flip(Genetics_Browser_Canvas.animateTrack)(v1.value0)); + } + + ; + + if (v1 instanceof Data_Either.Left) { + return Control_Bind.bind(Effect.bindEffect)(Effect_Ref.read(v))(Data_Foldable.traverse_(Effect.applicativeEffect)(Data_List_Types.foldableList)(function (v3) { + return v3(v1.value0); + })); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI.View (line 151, column 18 - line 153, column 54): " + [v1.constructor.name]); + }; + + var animate = function animate(uv) { + return function (csv) { + if (uv instanceof ScrollView) { + return new Genetics_Browser_Canvas.Scrolling(toLengths(csv)(uv.value0)); + } + + ; + + if (uv instanceof ZoomView) { + return new Genetics_Browser_Canvas.Zooming(toZoomRange(csv)(uv.value0)); + } + + ; + + if (uv instanceof ModView) { + return Genetics_Browser_Canvas.Jump.value; + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI.View (line 130, column 24 - line 133, column 29): " + [uv.constructor.name]); + }; + }; + + var v1 = animateDelta(monoidUpdateView)({ + step: step, + animate: animate + })(callback)(initial)(timeout)(); + return { + updateView: v1.update, + browserView: v1.position, + addCallback: function addCallback(cb) { + return Effect_Ref.modify_(Data_List_Types.Cons.create(cb))(v); + } + }; + }; + }; + }; + }; +}; + +module.exports = { + ScrollView: ScrollView, + ZoomView: ZoomView, + ModView: ModView, + updateViewFold: updateViewFold, + animateDelta: animateDelta, + browserViewManager: browserViewManager, + showUpdateView: showUpdateView, + semigroupUpdateView: semigroupUpdateView, + monoidUpdateView: monoidUpdateView, + onTimeout: $foreign.onTimeout, + onFrame: $foreign.onFrame +}; +},{"./foreign.js":"nvf7","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Data.BigInt/index.js":"Zx+T","../Data.Either/index.js":"B2JL","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Lens.Getter/index.js":"OPOX","../Data.List.Types/index.js":"Xxuc","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Pair/index.js":"PpsX","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Effect/index.js":"oTWB","../Effect.Class/index.js":"dWtH","../Effect.Ref/index.js":"/Jaj","../Genetics.Browser.Canvas/index.js":"VVkU","../Genetics.Browser.Coordinates/index.js":"7bYH"}],"CI3f":[function(require,module,exports) { +"use strict"; + +var getEffProp = function getEffProp(name) { + return function (doc) { + return function () { + return doc[name]; + }; + }; +}; + +exports.url = getEffProp("URL"); +exports.documentURI = getEffProp("documentURI"); +exports.origin = getEffProp("origin"); +exports.compatMode = getEffProp("compatMode"); +exports.characterSet = getEffProp("characterSet"); +exports.contentType = getEffProp("contentType"); +exports._doctype = getEffProp("doctype"); +exports._documentElement = getEffProp("documentElement"); + +exports.getElementsByTagName = function (localName) { + return function (doc) { + return function () { + return doc.getElementsByTagName(localName); + }; + }; +}; + +exports._getElementsByTagNameNS = function (ns) { + return function (localName) { + return function (doc) { + return function () { + return doc.getElementsByTagNameNS(ns, localName); + }; + }; + }; +}; + +exports.getElementsByClassName = function (classNames) { + return function (doc) { + return function () { + return doc.getElementsByClassName(classNames); + }; + }; +}; + +exports.createElement = function (localName) { + return function (doc) { + return function () { + return doc.createElement(localName); + }; + }; +}; + +exports._createElementNS = function (ns) { + return function (qualifiedName) { + return function (doc) { + return function () { + return doc.createElementNS(ns, qualifiedName); + }; + }; + }; +}; + +exports.createDocumentFragment = function (doc) { + return function () { + return doc.createDocumentFragment(); + }; +}; + +exports.createTextNode = function (data) { + return function (doc) { + return function () { + return doc.createTextNode(data); + }; + }; +}; + +exports.createComment = function (data) { + return function (doc) { + return function () { + return doc.createComment(data); + }; + }; +}; + +exports.createProcessingInstruction = function (target) { + return function (data) { + return function (doc) { + return function () { + return doc.createProcessingInstruction(target, data); + }; + }; + }; +}; + +exports.importNode = function (node) { + return function (deep) { + return function (doc) { + return function () { + return doc.importNode(node, deep); + }; + }; + }; +}; + +exports.adoptNode = function (node) { + return function (doc) { + return function () { + return doc.adoptNode(node); + }; + }; +}; +},{}],"0hiR":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Nullable = require("../Data.Nullable/index.js"); + +var Effect = require("../Effect/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var Web_Internal_FFI = require("../Web.Internal.FFI/index.js"); + +var toParentNode = Unsafe_Coerce.unsafeCoerce; +var toNonElementParentNode = Unsafe_Coerce.unsafeCoerce; +var toNode = Unsafe_Coerce.unsafeCoerce; +var toEventTarget = Unsafe_Coerce.unsafeCoerce; + +var getElementsByTagNameNS = function getElementsByTagNameNS($0) { + return $foreign["_getElementsByTagNameNS"](Data_Nullable.toNullable($0)); +}; + +var fromParentNode = Web_Internal_FFI.unsafeReadProtoTagged("Document"); +var fromNonElementParentNode = Web_Internal_FFI.unsafeReadProtoTagged("Document"); +var fromNode = Web_Internal_FFI.unsafeReadProtoTagged("Document"); +var fromEventTarget = Web_Internal_FFI.unsafeReadProtoTagged("Document"); + +var documentElement = function () { + var $1 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($2) { + return $1($foreign["_documentElement"]($2)); + }; +}(); + +var doctype = function () { + var $3 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($4) { + return $3($foreign["_doctype"]($4)); + }; +}(); + +var createElementNS = function createElementNS($5) { + return $foreign["_createElementNS"](Data_Nullable.toNullable($5)); +}; + +module.exports = { + fromNode: fromNode, + fromParentNode: fromParentNode, + fromNonElementParentNode: fromNonElementParentNode, + fromEventTarget: fromEventTarget, + toNode: toNode, + toParentNode: toParentNode, + toNonElementParentNode: toNonElementParentNode, + toEventTarget: toEventTarget, + doctype: doctype, + documentElement: documentElement, + getElementsByTagNameNS: getElementsByTagNameNS, + createElementNS: createElementNS, + url: $foreign.url, + documentURI: $foreign.documentURI, + origin: $foreign.origin, + compatMode: $foreign.compatMode, + characterSet: $foreign.characterSet, + contentType: $foreign.contentType, + getElementsByTagName: $foreign.getElementsByTagName, + getElementsByClassName: $foreign.getElementsByClassName, + createElement: $foreign.createElement, + createDocumentFragment: $foreign.createDocumentFragment, + createTextNode: $foreign.createTextNode, + createComment: $foreign.createComment, + createProcessingInstruction: $foreign.createProcessingInstruction, + importNode: $foreign.importNode, + adoptNode: $foreign.adoptNode +}; +},{"./foreign.js":"CI3f","../Data.Functor/index.js":"+0AE","../Data.Nullable/index.js":"YQ8o","../Effect/index.js":"oTWB","../Unsafe.Coerce/index.js":"ETUV","../Web.Internal.FFI/index.js":"fdUh"}],"9SEv":[function(require,module,exports) { +"use strict"; + +var getEffProp = function getEffProp(name) { + return function (node) { + return function () { + return node[name]; + }; + }; +}; + +exports.children = getEffProp("children"); +exports._firstElementChild = getEffProp("firstElementChild"); +exports._lastElementChild = getEffProp("lastElementChild"); +exports.childElementCount = getEffProp("childElementCount"); + +exports._querySelector = function (selector) { + return function (node) { + return function () { + return node.querySelector(selector); + }; + }; +}; + +exports.querySelectorAll = function (selector) { + return function (node) { + return function () { + return node.querySelectorAll(selector); + }; + }; +}; +},{}],"lU5U":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Nullable = require("../Data.Nullable/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Effect = require("../Effect/index.js"); + +var QuerySelector = function QuerySelector(x) { + return x; +}; + +var querySelector = function querySelector(qs) { + var $3 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + var $4 = $foreign["_querySelector"](qs); + return function ($5) { + return $3($4($5)); + }; +}; + +var ordQuerySelector = Data_Ord.ordString; +var newtypeQuerySelector = new Data_Newtype.Newtype(function (n) { + return n; +}, QuerySelector); + +var lastElementChild = function () { + var $6 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($7) { + return $6($foreign["_lastElementChild"]($7)); + }; +}(); + +var firstElementChild = function () { + var $8 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($9) { + return $8($foreign["_firstElementChild"]($9)); + }; +}(); + +var eqQuerySelector = Data_Eq.eqString; +module.exports = { + firstElementChild: firstElementChild, + lastElementChild: lastElementChild, + QuerySelector: QuerySelector, + querySelector: querySelector, + eqQuerySelector: eqQuerySelector, + ordQuerySelector: ordQuerySelector, + newtypeQuerySelector: newtypeQuerySelector, + children: $foreign.children, + childElementCount: $foreign.childElementCount, + querySelectorAll: $foreign.querySelectorAll +}; +},{"./foreign.js":"9SEv","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Nullable/index.js":"YQ8o","../Data.Ord/index.js":"r4Vb","../Effect/index.js":"oTWB"}],"UOgE":[function(require,module,exports) { +/* global window */ +"use strict"; + +exports.window = function () { + return window; +}; +},{}],"UQRJ":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +module.exports = { + window: $foreign.window +}; +},{"./foreign.js":"UOgE"}],"dln3":[function(require,module,exports) { +"use strict"; + +exports._body = function (doc) { + return function () { + return doc.body; + }; +}; + +exports._readyState = function (doc) { + return function () { + return doc.readyState; + }; +}; + +exports._activeElement = function (doc) { + return function () { + return doc.activeElement; + }; +}; + +exports._currentScript = function (doc) { + return function () { + return doc.currentScript; + }; +}; + +exports.referrer = function (doc) { + return function () { + return doc.referrer; + }; +}; + +exports.title = function (doc) { + return function () { + return doc.title; + }; +}; + +exports.setTitle = function (title) { + return function (doc) { + return function () { + doc.title = title; + return {}; + }; + }; +}; +},{}],"v4VO":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Loading = function () { + function Loading() {} + + ; + Loading.value = new Loading(); + return Loading; +}(); + +var Interactive = function () { + function Interactive() {} + + ; + Interactive.value = new Interactive(); + return Interactive; +}(); + +var Complete = function () { + function Complete() {} + + ; + Complete.value = new Complete(); + return Complete; +}(); + +var showReadyState = new Data_Show.Show(function (v) { + if (v instanceof Loading) { + return "Loading"; + } + + ; + + if (v instanceof Interactive) { + return "Interactive"; + } + + ; + + if (v instanceof Complete) { + return "Complete"; + } + + ; + throw new Error("Failed pattern match at Web.HTML.HTMLDocument.ReadyState (line 15, column 10 - line 18, column 27): " + [v.constructor.name]); +}); + +var print = function print(v) { + if (v instanceof Loading) { + return "loading"; + } + + ; + + if (v instanceof Interactive) { + return "interactive"; + } + + ; + + if (v instanceof Complete) { + return "complete"; + } + + ; + throw new Error("Failed pattern match at Web.HTML.HTMLDocument.ReadyState (line 21, column 9 - line 24, column 25): " + [v.constructor.name]); +}; + +var parse = function parse(v) { + if (v === "loading") { + return new Data_Maybe.Just(Loading.value); + } + + ; + + if (v === "interactive") { + return new Data_Maybe.Just(Interactive.value); + } + + ; + + if (v === "complete") { + return new Data_Maybe.Just(Complete.value); + } + + ; + return Data_Maybe.Nothing.value; +}; + +var eqReadyState = new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof Loading && y instanceof Loading) { + return true; + } + + ; + + if (x instanceof Interactive && y instanceof Interactive) { + return true; + } + + ; + + if (x instanceof Complete && y instanceof Complete) { + return true; + } + + ; + return false; + }; +}); +var ordReadyState = new Data_Ord.Ord(function () { + return eqReadyState; +}, function (x) { + return function (y) { + if (x instanceof Loading && y instanceof Loading) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof Loading) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof Loading) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof Interactive && y instanceof Interactive) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof Interactive) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof Interactive) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof Complete && y instanceof Complete) { + return Data_Ordering.EQ.value; + } + + ; + throw new Error("Failed pattern match at Web.HTML.HTMLDocument.ReadyState (line 12, column 1 - line 12, column 48): " + [x.constructor.name, y.constructor.name]); + }; +}); +module.exports = { + Loading: Loading, + Interactive: Interactive, + Complete: Complete, + print: print, + parse: parse, + eqReadyState: eqReadyState, + ordReadyState: ordReadyState, + showReadyState: showReadyState +}; +},{"../Data.Eq/index.js":"Pq4F","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7"}],"EU5r":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Nullable = require("../Data.Nullable/index.js"); + +var Effect = require("../Effect/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var Web_HTML_HTMLDocument_ReadyState = require("../Web.HTML.HTMLDocument.ReadyState/index.js"); + +var Web_Internal_FFI = require("../Web.Internal.FFI/index.js"); + +var toParentNode = Unsafe_Coerce.unsafeCoerce; +var toNonElementParentNode = Unsafe_Coerce.unsafeCoerce; +var toNode = Unsafe_Coerce.unsafeCoerce; +var toEventTarget = Unsafe_Coerce.unsafeCoerce; +var toDocument = Unsafe_Coerce.unsafeCoerce; + +var readyState = function () { + var $0 = Data_Functor.map(Effect.functorEffect)(function () { + var $2 = Data_Maybe.fromMaybe(Web_HTML_HTMLDocument_ReadyState.Loading.value); + return function ($3) { + return $2(Web_HTML_HTMLDocument_ReadyState.parse($3)); + }; + }()); + return function ($1) { + return $0($foreign["_readyState"]($1)); + }; +}(); + +var fromParentNode = Web_Internal_FFI.unsafeReadProtoTagged("HTMLDocument"); +var fromNonElementParentNode = Web_Internal_FFI.unsafeReadProtoTagged("HTMLDocument"); +var fromNode = Web_Internal_FFI.unsafeReadProtoTagged("HTMLDocument"); +var fromEventTarget = Web_Internal_FFI.unsafeReadProtoTagged("HTMLDocument"); +var fromDocument = Web_Internal_FFI.unsafeReadProtoTagged("HTMLDocument"); + +var currentScript = function () { + var $4 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($5) { + return $4($foreign["_currentScript"]($5)); + }; +}(); + +var body = function () { + var $6 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($7) { + return $6($foreign["_body"]($7)); + }; +}(); + +var activeElement = function () { + var $8 = Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe); + return function ($9) { + return $8($foreign["_activeElement"]($9)); + }; +}(); + +module.exports = { + fromDocument: fromDocument, + fromNode: fromNode, + fromParentNode: fromParentNode, + fromNonElementParentNode: fromNonElementParentNode, + fromEventTarget: fromEventTarget, + toDocument: toDocument, + toNode: toNode, + toParentNode: toParentNode, + toNonElementParentNode: toNonElementParentNode, + toEventTarget: toEventTarget, + body: body, + readyState: readyState, + activeElement: activeElement, + currentScript: currentScript, + referrer: $foreign.referrer, + title: $foreign.title, + setTitle: $foreign.setTitle +}; +},{"./foreign.js":"dln3","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Nullable/index.js":"YQ8o","../Effect/index.js":"oTWB","../Unsafe.Coerce/index.js":"ETUV","../Web.HTML.HTMLDocument.ReadyState/index.js":"v4VO","../Web.Internal.FFI/index.js":"fdUh"}],"qu+f":[function(require,module,exports) { +"use strict"; + +exports.document = function (window) { + return function () { + return window.document; + }; +}; + +exports.navigator = function (window) { + return function () { + return window.navigator; + }; +}; + +exports.location = function (window) { + return function () { + return window.location; + }; +}; + +exports.history = function (window) { + return function () { + return window.history; + }; +}; + +exports.innerWidth = function (window) { + return function () { + return window.innerWidth; + }; +}; + +exports.innerHeight = function (window) { + return function () { + return window.innerHeight; + }; +}; + +exports.alert = function (str) { + return function (window) { + return function () { + window.alert(str); + return {}; + }; + }; +}; + +exports.confirm = function (str) { + return function (window) { + return function () { + return window.confirm(str); + }; + }; +}; + +exports.moveBy = function (xDelta) { + return function (yDelta) { + return function (window) { + return function () { + window.moveBy(xDelta, yDelta); + return {}; + }; + }; + }; +}; + +exports.moveTo = function (width) { + return function (height) { + return function (window) { + return function () { + window.moveTo(width, height); + return {}; + }; + }; + }; +}; + +exports._open = function (url) { + return function (name) { + return function (features) { + return function (window) { + return function () { + return window.open(url, name, features); + }; + }; + }; + }; +}; + +exports.outerHeight = function (window) { + return function () { + return window.outerHeight; + }; +}; + +exports.outerWidth = function (window) { + return function () { + return window.outerWidth; + }; +}; + +exports.print = function (window) { + return function () { + window.print(); + return {}; + }; +}; + +exports._prompt = function (str) { + return function (defaultText) { + return function (window) { + return function () { + return window.prompt(str, defaultText); + }; + }; + }; +}; + +exports.resizeBy = function (xDelta) { + return function (yDelta) { + return function (window) { + return function () { + window.resizeBy(xDelta, yDelta); + return {}; + }; + }; + }; +}; + +exports.resizeTo = function (width) { + return function (height) { + return function (window) { + return function () { + window.resizeTo(width, height); + return {}; + }; + }; + }; +}; + +exports.screenX = function (window) { + return function () { + return window.screenX; + }; +}; + +exports.screenY = function (window) { + return function () { + return window.screenY; + }; +}; + +exports.scroll = function (xCoord) { + return function (yCoord) { + return function (window) { + return function () { + window.scroll(xCoord, yCoord); + return {}; + }; + }; + }; +}; + +exports.scrollBy = function (xCoord) { + return function (yCoord) { + return function (window) { + return function () { + window.scrollBy(xCoord, yCoord); + return {}; + }; + }; + }; +}; + +exports.scrollX = function (window) { + return function () { + return window.scrollX; + }; +}; + +exports.scrollY = function (window) { + return function () { + return window.scrollY; + }; +}; + +exports.localStorage = function (window) { + return function () { + return window.localStorage; + }; +}; + +exports.sessionStorage = function (window) { + return function () { + return window.sessionStorage; + }; +}; + +exports._requestAnimationFrame = function (fn) { + return function (window) { + return function () { + return window.requestAnimationFrame(fn); + }; + }; +}; + +exports._cancelAnimationFrame = function (id) { + return function (window) { + return function () { + return window.cancelAnimationFrame(id); + }; + }; +}; + +exports._requestIdleCallback = function (opts) { + return function (fn) { + return function (window) { + return function () { + return window.requestIdleCallback(fn, opts); + }; + }; + }; +}; + +exports._cancelIdleCallback = function (id) { + return function (window) { + return function () { + return window.cancelIdleCallback(id); + }; + }; +}; + +exports.parent = function (window) { + return function () { + return window.parent; + }; +}; + +exports._opener = function (window) { + return function () { + return window.opener; + }; +}; +},{}],"o+50":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Nullable = require("../Data.Nullable/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Effect = require("../Effect/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var RequestIdleCallbackId = function RequestIdleCallbackId(x) { + return x; +}; + +var RequestAnimationFrameId = function RequestAnimationFrameId(x) { + return x; +}; + +var toEventTarget = Unsafe_Coerce.unsafeCoerce; + +var requestIdleCallback = function requestIdleCallback(opts) { + return function (fn) { + var $30 = Data_Functor.map(Effect.functorEffect)(RequestIdleCallbackId); + var $31 = $foreign["_requestIdleCallback"](opts)(fn); + return function ($32) { + return $30($31($32)); + }; + }; +}; + +var requestAnimationFrame = function requestAnimationFrame(fn) { + var $33 = Data_Functor.map(Effect.functorEffect)(RequestAnimationFrameId); + var $34 = $foreign["_requestAnimationFrame"](fn); + return function ($35) { + return $33($34($35)); + }; +}; + +var promptDefault = function promptDefault(msg) { + return function (defaultText) { + return function (window) { + return Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe)($foreign["_prompt"](msg)(defaultText)(window)); + }; + }; +}; + +var prompt = function prompt(msg) { + return function (window) { + return Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe)($foreign["_prompt"](msg)("")(window)); + }; +}; + +var opener = function opener(window) { + return Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe)($foreign["_opener"](window)); +}; + +var open = function open(url$prime) { + return function (name) { + return function (features) { + return function (window) { + return Data_Functor.map(Effect.functorEffect)(Data_Nullable.toMaybe)($foreign["_open"](url$prime)(name)(features)(window)); + }; + }; + }; +}; + +var newtypeRequestIdleCallbackId = new Data_Newtype.Newtype(function (n) { + return n; +}, RequestIdleCallbackId); +var newtypeRequestAnimationFrameId = new Data_Newtype.Newtype(function (n) { + return n; +}, RequestAnimationFrameId); +var eqRequestIdleCallbackId = new Data_Eq.Eq(function (x) { + return function (y) { + return x === y; + }; +}); +var ordRequestIdleCallbackId = new Data_Ord.Ord(function () { + return eqRequestIdleCallbackId; +}, function (x) { + return function (y) { + return Data_Ord.compare(Data_Ord.ordInt)(x)(y); + }; +}); +var eqRequestAnimationFrameId = new Data_Eq.Eq(function (x) { + return function (y) { + return x === y; + }; +}); +var ordRequestAnimationFrameId = new Data_Ord.Ord(function () { + return eqRequestAnimationFrameId; +}, function (x) { + return function (y) { + return Data_Ord.compare(Data_Ord.ordInt)(x)(y); + }; +}); + +var cancelIdleCallback = function cancelIdleCallback(idAF) { + return $foreign["_cancelIdleCallback"](Data_Newtype.unwrap(newtypeRequestIdleCallbackId)(idAF)); +}; + +var cancelAnimationFrame = function cancelAnimationFrame(idAF) { + return $foreign["_cancelAnimationFrame"](Data_Newtype.unwrap(newtypeRequestAnimationFrameId)(idAF)); +}; + +module.exports = { + toEventTarget: toEventTarget, + open: open, + prompt: prompt, + promptDefault: promptDefault, + requestAnimationFrame: requestAnimationFrame, + cancelAnimationFrame: cancelAnimationFrame, + requestIdleCallback: requestIdleCallback, + cancelIdleCallback: cancelIdleCallback, + opener: opener, + newtypeRequestAnimationFrameId: newtypeRequestAnimationFrameId, + eqRequestAnimationFrameId: eqRequestAnimationFrameId, + ordRequestAnimationFrameId: ordRequestAnimationFrameId, + newtypeRequestIdleCallbackId: newtypeRequestIdleCallbackId, + eqRequestIdleCallbackId: eqRequestIdleCallbackId, + ordRequestIdleCallbackId: ordRequestIdleCallbackId, + document: $foreign.document, + navigator: $foreign.navigator, + location: $foreign.location, + history: $foreign.history, + innerWidth: $foreign.innerWidth, + innerHeight: $foreign.innerHeight, + alert: $foreign.alert, + confirm: $foreign.confirm, + moveBy: $foreign.moveBy, + moveTo: $foreign.moveTo, + outerHeight: $foreign.outerHeight, + outerWidth: $foreign.outerWidth, + print: $foreign.print, + resizeBy: $foreign.resizeBy, + resizeTo: $foreign.resizeTo, + screenX: $foreign.screenX, + screenY: $foreign.screenY, + scroll: $foreign.scroll, + scrollBy: $foreign.scrollBy, + scrollX: $foreign.scrollX, + scrollY: $foreign.scrollY, + localStorage: $foreign.localStorage, + sessionStorage: $foreign.sessionStorage, + parent: $foreign.parent +}; +},{"./foreign.js":"qu+f","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Nullable/index.js":"YQ8o","../Data.Ord/index.js":"r4Vb","../Effect/index.js":"oTWB","../Unsafe.Coerce/index.js":"ETUV"}],"MKE0":[function(require,module,exports) { +"use strict"; + +exports.key = function (e) { + return e.key; +}; + +exports.code = function (e) { + return e.code; +}; + +exports.locationIndex = function (e) { + return e.location; +}; + +exports.ctrlKey = function (e) { + return e.ctrlKey; +}; + +exports.shiftKey = function (e) { + return e.shiftKey; +}; + +exports.altKey = function (e) { + return e.altKey; +}; + +exports.metaKey = function (e) { + return e.metaKey; +}; + +exports.repeat = function (e) { + return e.repeat; +}; + +exports.isComposing = function (e) { + return e.isComposing; +}; + +exports.getModifierState = function (s) { + return function (e) { + return function () { + return e.getModifierState(s); + }; + }; +}; +},{}],"o/+T":[function(require,module,exports) { +// Generated by purs version 0.13.2 +"use strict"; + +var $foreign = require("./foreign.js"); + +var Data_Bounded = require("../Data.Bounded/index.js"); + +var Data_Enum = require("../Data.Enum/index.js"); + +var Data_Eq = require("../Data.Eq/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Ord = require("../Data.Ord/index.js"); + +var Data_Ordering = require("../Data.Ordering/index.js"); + +var Unsafe_Coerce = require("../Unsafe.Coerce/index.js"); + +var Web_Internal_FFI = require("../Web.Internal.FFI/index.js"); + +var Standard = function () { + function Standard() {} + + ; + Standard.value = new Standard(); + return Standard; +}(); + +var Left = function () { + function Left() {} + + ; + Left.value = new Left(); + return Left; +}(); + +var Right = function () { + function Right() {} + + ; + Right.value = new Right(); + return Right; +}(); + +var Numpad = function () { + function Numpad() {} + + ; + Numpad.value = new Numpad(); + return Numpad; +}(); + +var toUIEvent = Unsafe_Coerce.unsafeCoerce; +var toEvent = Unsafe_Coerce.unsafeCoerce; + +var toEnumKeyLocation = function toEnumKeyLocation(v) { + if (v === 0) { + return new Data_Maybe.Just(Standard.value); + } + + ; + + if (v === 1) { + return new Data_Maybe.Just(Left.value); + } + + ; + + if (v === 2) { + return new Data_Maybe.Just(Right.value); + } + + ; + + if (v === 3) { + return new Data_Maybe.Just(Numpad.value); + } + + ; + return Data_Maybe.Nothing.value; +}; + +var fromUIEvent = Web_Internal_FFI.unsafeReadProtoTagged("KeyboardEvent"); +var fromEvent = Web_Internal_FFI.unsafeReadProtoTagged("KeyboardEvent"); + +var fromEnumKeyLocation = function fromEnumKeyLocation(v) { + if (v instanceof Standard) { + return 0; + } + + ; + + if (v instanceof Left) { + return 1; + } + + ; + + if (v instanceof Right) { + return 2; + } + + ; + + if (v instanceof Numpad) { + return 3; + } + + ; + throw new Error("Failed pattern match at Web.UIEvent.KeyboardEvent (line 107, column 3 - line 111, column 16): " + [v.constructor.name]); +}; + +var eqKeyLocation = new Data_Eq.Eq(function (x) { + return function (y) { + if (x instanceof Standard && y instanceof Standard) { + return true; + } + + ; + + if (x instanceof Left && y instanceof Left) { + return true; + } + + ; + + if (x instanceof Right && y instanceof Right) { + return true; + } + + ; + + if (x instanceof Numpad && y instanceof Numpad) { + return true; + } + + ; + return false; + }; +}); +var ordKeyLocation = new Data_Ord.Ord(function () { + return eqKeyLocation; +}, function (x) { + return function (y) { + if (x instanceof Standard && y instanceof Standard) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof Standard) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof Standard) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof Left && y instanceof Left) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof Left) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof Left) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof Right && y instanceof Right) { + return Data_Ordering.EQ.value; + } + + ; + + if (x instanceof Right) { + return Data_Ordering.LT.value; + } + + ; + + if (y instanceof Right) { + return Data_Ordering.GT.value; + } + + ; + + if (x instanceof Numpad && y instanceof Numpad) { + return Data_Ordering.EQ.value; + } + + ; + throw new Error("Failed pattern match at Web.UIEvent.KeyboardEvent (line 81, column 1 - line 81, column 50): " + [x.constructor.name, y.constructor.name]); + }; +}); +var enumKeyLocation = new Data_Enum.Enum(function () { + return ordKeyLocation; +}, Data_Enum.defaultPred(toEnumKeyLocation)(fromEnumKeyLocation), Data_Enum.defaultSucc(toEnumKeyLocation)(fromEnumKeyLocation)); +var boundedKeyLocation = new Data_Bounded.Bounded(function () { + return ordKeyLocation; +}, Standard.value, Numpad.value); +var boundedEnumKeyLocation = new Data_Enum.BoundedEnum(function () { + return boundedKeyLocation; +}, function () { + return enumKeyLocation; +}, 4, fromEnumKeyLocation, toEnumKeyLocation); + +var location = function location(dictPartial) { + var $13 = Data_Maybe.fromJust(dictPartial); + var $14 = Data_Enum.toEnum(boundedEnumKeyLocation); + return function ($15) { + return $13($14($foreign.locationIndex($15))); + }; +}; + +module.exports = { + fromUIEvent: fromUIEvent, + fromEvent: fromEvent, + toUIEvent: toUIEvent, + toEvent: toEvent, + location: location, + Standard: Standard, + Left: Left, + Right: Right, + Numpad: Numpad, + toEnumKeyLocation: toEnumKeyLocation, + fromEnumKeyLocation: fromEnumKeyLocation, + eqKeyLocation: eqKeyLocation, + ordKeyLocation: ordKeyLocation, + boundedKeyLocation: boundedKeyLocation, + enumKeyLocation: enumKeyLocation, + boundedEnumKeyLocation: boundedEnumKeyLocation, + key: $foreign.key, + code: $foreign.code, + locationIndex: $foreign.locationIndex, + ctrlKey: $foreign.ctrlKey, + shiftKey: $foreign.shiftKey, + altKey: $foreign.altKey, + metaKey: $foreign.metaKey, + repeat: $foreign.repeat, + isComposing: $foreign.isComposing, + getModifierState: $foreign.getModifierState +}; +},{"./foreign.js":"MKE0","../Data.Bounded/index.js":"kcUU","../Data.Enum/index.js":"oOsU","../Data.Eq/index.js":"Pq4F","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Unsafe.Coerce/index.js":"ETUV","../Web.Internal.FFI/index.js":"fdUh"}],"JuOH":[function(require,module,exports) { +"use strict"; + +var $foreign = require("./foreign.js"); + +var Control_Applicative = require("../Control.Applicative/index.js"); + +var Control_Apply = require("../Control.Apply/index.js"); + +var Control_Bind = require("../Control.Bind/index.js"); + +var Control_Monad_Except = require("../Control.Monad.Except/index.js"); + +var Data_Array = require("../Data.Array/index.js"); + +var Data_BigInt = require("../Data.BigInt/index.js"); + +var Data_Either = require("../Data.Either/index.js"); + +var Data_Filterable = require("../Data.Filterable/index.js"); + +var Data_Foldable = require("../Data.Foldable/index.js"); + +var Data_Function = require("../Data.Function/index.js"); + +var Data_Functor = require("../Data.Functor/index.js"); + +var Data_Generic_Rep = require("../Data.Generic.Rep/index.js"); + +var Data_Generic_Rep_Show = require("../Data.Generic.Rep.Show/index.js"); + +var Data_Int = require("../Data.Int/index.js"); + +var Data_Lens_Getter = require("../Data.Lens.Getter/index.js"); + +var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js"); + +var Data_Lens_Iso_Newtype = require("../Data.Lens.Iso.Newtype/index.js"); + +var Data_List_Types = require("../Data.List.Types/index.js"); + +var Data_Map_Internal = require("../Data.Map.Internal/index.js"); + +var Data_Maybe = require("../Data.Maybe/index.js"); + +var Data_Monoid = require("../Data.Monoid/index.js"); + +var Data_Newtype = require("../Data.Newtype/index.js"); + +var Data_Pair = require("../Data.Pair/index.js"); + +var Data_Semigroup = require("../Data.Semigroup/index.js"); + +var Data_Semiring = require("../Data.Semiring/index.js"); + +var Data_Show = require("../Data.Show/index.js"); + +var Data_Symbol = require("../Data.Symbol/index.js"); + +var Data_Time_Duration = require("../Data.Time.Duration/index.js"); + +var Data_Unit = require("../Data.Unit/index.js"); + +var Data_Variant = require("../Data.Variant/index.js"); + +var Data_Variant_Internal = require("../Data.Variant.Internal/index.js"); + +var Effect = require("../Effect/index.js"); + +var Effect_Aff = require("../Effect.Aff/index.js"); + +var Effect_Aff_AVar = require("../Effect.Aff.AVar/index.js"); + +var Effect_Class = require("../Effect.Class/index.js"); + +var Effect_Class_Console = require("../Effect.Class.Console/index.js"); + +var Effect_Exception = require("../Effect.Exception/index.js"); + +var Effect_Ref = require("../Effect.Ref/index.js"); + +var Foreign = require("../Foreign/index.js"); + +var Genetics_Browser = require("../Genetics.Browser/index.js"); + +var Genetics_Browser_Bed = require("../Genetics.Browser.Bed/index.js"); + +var Genetics_Browser_Canvas = require("../Genetics.Browser.Canvas/index.js"); + +var Genetics_Browser_Coordinates = require("../Genetics.Browser.Coordinates/index.js"); + +var Genetics_Browser_Demo = require("../Genetics.Browser.Demo/index.js"); + +var Genetics_Browser_Layer = require("../Genetics.Browser.Layer/index.js"); + +var Genetics_Browser_Track = require("../Genetics.Browser.Track/index.js"); + +var Genetics_Browser_Types = require("../Genetics.Browser.Types/index.js"); + +var Genetics_Browser_UI_View = require("../Genetics.Browser.UI.View/index.js"); + +var $$Math = require("../Math/index.js"); + +var Record = require("../Record/index.js"); + +var Simple_JSON = require("../Simple.JSON/index.js"); + +var Type_Equality = require("../Type.Equality/index.js"); + +var Web_DOM_Document = require("../Web.DOM.Document/index.js"); + +var Web_DOM_Element = require("../Web.DOM.Element/index.js"); + +var Web_DOM_Node = require("../Web.DOM.Node/index.js"); + +var Web_DOM_ParentNode = require("../Web.DOM.ParentNode/index.js"); + +var Web_HTML = require("../Web.HTML/index.js"); + +var Web_HTML_HTMLDocument = require("../Web.HTML.HTMLDocument/index.js"); + +var Web_HTML_Window = require("../Web.HTML.Window/index.js"); + +var Web_UIEvent_KeyboardEvent = require("../Web.UIEvent.KeyboardEvent/index.js"); + +var IBoxShow = function () { + function IBoxShow() {} + + ; + IBoxShow.value = new IBoxShow(); + return IBoxShow; +}(); + +var IBoxHide = function () { + function IBoxHide() {} + + ; + IBoxHide.value = new IBoxHide(); + return IBoxHide; +}(); + +var IBoxSetY = function () { + function IBoxSetY(value0) { + this.value0 = value0; + } + + ; + + IBoxSetY.create = function (value0) { + return new IBoxSetY(value0); + }; + + return IBoxSetY; +}(); + +var IBoxSetX = function () { + function IBoxSetX(value0) { + this.value0 = value0; + } + + ; + + IBoxSetX.create = function (value0) { + return new IBoxSetX(value0); + }; + + return IBoxSetX; +}(); + +var IBoxSetContents = function () { + function IBoxSetContents(value0) { + this.value0 = value0; + } + + ; + + IBoxSetContents.create = function (value0) { + return new IBoxSetContents(value0); + }; + + return IBoxSetContents; +}(); + +var wrapWith = function wrapWith(tag) { + return function (x) { + return "<" + (tag + (">" + (x + ("</" + (tag + ">"))))); + }; +}; + +var updateInfoBox = function updateInfoBox(el) { + return function (cmd) { + if (cmd instanceof IBoxShow) { + return Genetics_Browser_Canvas.setElementStyle(el)("visibility")("visible"); + } + + ; + + if (cmd instanceof IBoxHide) { + return Genetics_Browser_Canvas.setElementStyle(el)("visibility")("hidden"); + } + + ; + + if (cmd instanceof IBoxSetX) { + return Genetics_Browser_Canvas.setElementStyle(el)("left")(Data_Show.show(Data_Show.showInt)(cmd.value0) + "px"); + } + + ; + + if (cmd instanceof IBoxSetY) { + return Genetics_Browser_Canvas.setElementStyle(el)("top")(Data_Show.show(Data_Show.showInt)(cmd.value0) + "px"); + } + + ; + + if (cmd instanceof IBoxSetContents) { + return $foreign.setElementContents(el)(cmd.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 321, column 3 - line 331, column 33): " + [cmd.constructor.name]); + }; +}; + +var snpHTML = function snpHTML(v) { + var contents = Data_Foldable.foldMap(Data_Foldable.foldableArray)(Data_Monoid.monoidString)(wrapWith("p"))(["SNP: " + v.feature.name, "Chr: " + Data_Show.show(Genetics_Browser_Types.showChrId)(v.feature.chrId), "Pos: " + Data_Show.show(Genetics_Browser_Types.showBp)(Data_Pair.fst(v.position)), "-log10: " + Data_Lens_Getter.viewOn(v.feature.score)(function () { + var $183 = Genetics_Browser_Types["_NegLog10"](Data_Lens_Internal_Forget.profunctorForget); + var $184 = Data_Lens_Iso_Newtype["_Newtype"](Genetics_Browser_Types.newtypeNegLog10)(Genetics_Browser_Types.newtypeNegLog10)(Data_Lens_Internal_Forget.profunctorForget); + var $185 = Genetics_Browser_Types["_prec"](4); + return function ($186) { + return $183($184($185($186))); + }; + }())]); + return wrapWith("div")(contents); +}; + +var printSNPInfo = function printSNPInfo(fs) { + var n = Data_Foldable.length(Data_Foldable.foldableArray)(Data_Semiring.semiringInt)(fs); + return function __do() { + Effect_Class_Console.log(Effect_Class.monadEffectEffect)("showing " + (Data_Show.show(Data_Show.showInt)(5) + (" out of " + (Data_Show.show(Data_Show.showInt)(n) + " clicked glyphs"))))(); + return Data_Foldable.for_(Effect.applicativeEffect)(Data_Foldable.foldableArray)(Data_Array.take(5)(fs))(function () { + var $187 = Effect_Class_Console.log(Effect_Class.monadEffectEffect); + return function ($188) { + return $187($188); + }; + }())(); + }; +}; + +var peakHTML = function peakHTML(disp) { + return function (peak) { + var v = Data_Array.uncons(peak.elements); + + if (v instanceof Data_Maybe.Nothing) { + return ""; + } + + ; + + if (v instanceof Data_Maybe.Just && v.value0.tail.length === 0) { + return disp(v.value0.head); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return wrapWith("div")(wrapWith("p")(Data_Show.show(Data_Show.showInt)(Data_Foldable.length(Data_Foldable.foldableArray)(Data_Semiring.semiringInt)(v.value0.tail) + 1 | 0) + " annotations")); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 241, column 3 - line 246, column 51): " + [v.constructor.name]); + }; +}; + +var keyUI = function keyUI(el) { + return function (mods) { + return function (cb) { + var f = function f(ke) { + var v = Web_UIEvent_KeyboardEvent.key(ke); + + if (v === "ArrowLeft") { + return cb(new Genetics_Browser_UI_View.ScrollView(-mods.scrollMod)); + } + + ; + + if (v === "ArrowRight") { + return cb(new Genetics_Browser_UI_View.ScrollView(mods.scrollMod)); + } + + ; + return Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit); + }; + + return $foreign.keydownEvent(el)(f); + }; + }; +}; + +var infoBoxId = "infoBox"; + +var initInfoBox = function __do() { + var v = Data_Functor.map(Effect.functorEffect)(Web_HTML_HTMLDocument.toDocument)(Control_Bind.bindFlipped(Effect.bindEffect)(Web_HTML_Window.document)(Web_HTML.window))(); + var v1 = Web_DOM_Document.createElement("div")(v)(); + Web_DOM_Element.setId(infoBoxId)(v1)(); + + (function __do() { + var v2 = Web_DOM_Document.documentElement(v)(); + + if (v2 instanceof Data_Maybe.Nothing) { + return Effect_Exception["throw"]("Couldn't find document body!")(); + } + + ; + + if (v2 instanceof Data_Maybe.Just) { + return Data_Functor["void"](Effect.functorEffect)(Web_DOM_Node.appendChild(Web_DOM_Element.toNode(v1))(Web_DOM_Element.toNode(v2.value0)))(); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 344, column 31 - line 346, column 84): " + [v2.constructor.name]); + })(); + + return updateInfoBox(v1); +}; + +var genericInfoBoxF = new Data_Generic_Rep.Generic(function (x) { + if (x instanceof IBoxShow) { + return new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value); + } + + ; + + if (x instanceof IBoxHide) { + return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value)); + } + + ; + + if (x instanceof IBoxSetY) { + return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0))); + } + + ; + + if (x instanceof IBoxSetX) { + return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0)))); + } + + ; + + if (x instanceof IBoxSetContents) { + return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(x.value0)))); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 314, column 1 - line 314, column 54): " + [x.constructor.name]); +}, function (x) { + if (x instanceof Data_Generic_Rep.Inl) { + return IBoxShow.value; + } + + ; + + if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inl) { + return IBoxHide.value; + } + + ; + + if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inl) { + return new IBoxSetY(x.value0.value0.value0); + } + + ; + + if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inl) { + return new IBoxSetX(x.value0.value0.value0.value0); + } + + ; + + if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr) { + return new IBoxSetContents(x.value0.value0.value0.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 314, column 1 - line 314, column 54): " + [x.constructor.name]); +}); +var showInfoBoxF = new Data_Show.Show(Data_Generic_Rep_Show.genericShow(genericInfoBoxF)(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () { + return "IBoxShow"; +})))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () { + return "IBoxHide"; +})))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Data_Show.showInt))(new Data_Symbol.IsSymbol(function () { + return "IBoxSetY"; +})))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Data_Show.showInt))(new Data_Symbol.IsSymbol(function () { + return "IBoxSetX"; +})))(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Data_Show.showString))(new Data_Symbol.IsSymbol(function () { + return "IBoxSetContents"; +})))))))); + +var btnUI = function btnUI(mods) { + return function (cb) { + return function __do() { + $foreign.buttonEvent("scrollLeft")(cb(new Genetics_Browser_UI_View.ScrollView(-mods.scrollMod)))(); + $foreign.buttonEvent("scrollRight")(cb(new Genetics_Browser_UI_View.ScrollView(mods.scrollMod)))(); + $foreign.buttonEvent("zoomOut")(cb(Genetics_Browser_UI_View.ZoomView.create(1.0 + mods.zoomMod)))(); + return $foreign.buttonEvent("zoomIn")(cb(Genetics_Browser_UI_View.ZoomView.create(1.0 - mods.zoomMod)))(); + }; + }; +}; + +var btnUIFixed = btnUI({ + scrollMod: 0.5, + zoomMod: 1.0 +}); + +var annotationHTMLShort = function annotationHTMLShort(v) { + var name$prime = Data_Maybe.fromMaybe(v.feature.name)(v.feature.gene); + + var anchor = function () { + if (v.feature.url instanceof Data_Maybe.Nothing) { + return name$prime; + } + + ; + + if (v.feature.url instanceof Data_Maybe.Just) { + return "<a target='_blank' href='" + (v.feature.url.value0 + ("'>" + (name$prime + "</a>"))); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 294, column 18 - line 296, column 84): " + [v.feature.url.constructor.name]); + }(); + + return wrapWith("p")(anchor); +}; // | Given a function to transform the data in the annotation's "rest" field +// | to text (or Nothing if the field should not be displayed), produce a +// | function that generates HTML from annotations + + +var annotationHTML = function annotationHTML(disp) { + return function (v) { + var name = Data_Maybe.fromMaybe("Annotated SNP: " + v.feature.name)(Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) { + return "Gene: " + v1; + })(v.feature.gene)); + + var header = function () { + if (v.feature.url instanceof Data_Maybe.Nothing) { + return name; + } + + ; + + if (v.feature.url instanceof Data_Maybe.Just) { + return "<a target='_blank' href='" + (v.feature.url.value0 + ("'>" + (name + "</a>"))); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 272, column 18 - line 276, column 40): " + [v.feature.url.constructor.name]); + }(); + + var contents = Data_Foldable.foldMap(Data_Foldable.foldableArray)(Data_Monoid.monoidString)(wrapWith("p"))(Data_Semigroup.append(Data_Semigroup.semigroupArray)([header])(Data_Filterable.filterMap(Data_Filterable.filterableArray)(disp)(Data_Array.fromFoldable(Data_List_Types.foldableList)(v.feature.rest)))); + return wrapWith("div")(contents); + }; +}; // | Shows all data in "rest" using the default showAnnotationField (which uses unsafeCoerce) + + +var annotationHTMLAll = function annotationHTMLAll(urlConf) { + return annotationHTML(function () { + var $189 = Control_Applicative.pure(Data_Maybe.applicativeMaybe); + var $190 = Genetics_Browser_Demo.showAnnotationField(urlConf); + return function ($191) { + return $189($190($191)); + }; + }()); +}; + +var annoPeakHTML = function annoPeakHTML(urlConf) { + return function (peak) { + var v = Data_Array.uncons(peak.elements); + + if (v instanceof Data_Maybe.Nothing) { + return ""; + } + + ; + + if (v instanceof Data_Maybe.Just && v.value0.tail.length === 0) { + return annotationHTMLAll(urlConf)(v.value0.head); + } + + ; + + if (v instanceof Data_Maybe.Just) { + return wrapWith("div")(wrapWith("p")("Annotations:") + Data_Foldable.foldMap(Data_Foldable.foldableArray)(Data_Monoid.monoidString)(annotationHTMLShort)(peak.elements)); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 254, column 3 - line 259, column 75): " + [v.constructor.name]); + }; +}; + +var _render = Data_Symbol.SProxy.value; // | Creates the track using the provided initial data, returning +// | a TrackInterface for reading state & sending commands to it + +var initializeTrack = function initializeTrack(dictRowToList) { + return function (dictTrackRecord) { + return function (cSys) { + return function (renderFuns) { + return function (getView) { + return function (tc) { + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Aff_AVar.empty)(function (v) { + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Aff_AVar.empty)(function (v1) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Track.makeTrack(dictRowToList)(dictTrackRecord)(renderFuns)(tc))(function (v2) { + var queueCommand = Data_Function.flip(Effect_Aff_AVar.put)(v1); + var mainLoop = Control_Bind.bind(Effect_Aff.bindAff)(Effect_Aff_AVar.take(v1))(function (v3) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Data_Variant.match()(Data_Variant_Internal.variantMatchCons(Data_Variant_Internal.variantMatchCons(Data_Variant_Internal.variantMatchNil)()(Type_Equality.refl))()(Type_Equality.refl))()({ + render: function render(v4) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(Data_Unit.unit); + }, + docResize: function docResize(v4) { + return Control_Bind.bind(Effect_Aff.bindAff)(Data_Functor.map(Effect_Aff.functorAff)(function (v5) { + return v5.size; + })(Genetics_Browser_Canvas.getDimensions(Effect_Aff.monadEffectAff)(tc)))(function (v5) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Genetics_Browser_Canvas.setTrackContainerSize(Effect_Aff.monadEffectAff)({ + width: v4.width, + height: v5.height + })(tc))(function () { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(queueCommand(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "render"; + }))(_render)(Data_Unit.unit)))(function () { + return mainLoop; + }); + }); + }); + } + })(v3))(function () { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Control_Bind.bindFlipped(Effect_Aff.bindAff)(Data_Foldable.traverse_(Effect_Aff.applicativeAff)(Data_Foldable.foldableMaybe)(Effect_Aff.killFiber(Effect_Exception.error("Resetting renderer"))))(Effect_Aff_AVar.tryTake(v)))(function () { + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(getView))(function (v4) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Canvas.getDimensions(Effect_Aff.monadEffectAff)(tc))(function (v5) { + var trackDims = function (v6) { + return v6.center; + }(Genetics_Browser_Layer.trackSlots(v5)); + + var currentScale = Genetics_Browser_Coordinates.viewScale(trackDims.size)(v4); + var pxView = Data_Functor.map(Data_Pair.functorPair)(Genetics_Browser_Coordinates.scaleToScreen(currentScale))(Data_Newtype.unwrap(Genetics_Browser_Coordinates.coordsysviewNewtype)(v4)); + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Aff.forkAff(v2.render(pxView)(v4)))(function (v6) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Effect_Aff_AVar.put(v6)(v))(function () { + return mainLoop; + }); + }); + }); + }); + }); + }); + }); + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Aff.forkAff(mainLoop))(function (v3) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(queueCommand(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "render"; + }))(_render)(Data_Unit.unit)))(function () { + return Control_Applicative.pure(Effect_Aff.applicativeAff)({ + lastHotspots: v2.hotspots, + queueCommand: queueCommand + }); + }); + }); + }); + }); + }); + }; + }; + }; + }; + }; +}; + +var _docResize = Data_Symbol.SProxy.value; // this is used to set callbacks/input handlers for track/track +// canvas-dependent inputs + +var setHandlers = function setHandlers(viewManager) { + return function (tc) { + return function (track) { + return Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(function __do() { + $foreign.resizeEvent(function (d) { + return Effect_Aff.launchAff_(track.queueCommand(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "docResize"; + }))(_docResize)(d))); + })(); + return Genetics_Browser_Canvas.dragScrollTrack(tc)(function (v) { + return Control_Applicative.when(Effect.applicativeEffect)($$Math.abs(v.x) >= 1)(function __do() { + var v1 = Data_Functor.map(Effect.functorEffect)(function ($192) { + return function (v1) { + return v1.center; + }(Genetics_Browser_Layer.trackSlots($192)); + })(Genetics_Browser_Canvas.getDimensions(Effect_Class.monadEffectEffect)(tc))(); + var cmd = Genetics_Browser_UI_View.ScrollView.create(v.x / v1.size.width); + return viewManager.updateView(cmd)(); + }); + })(); + }); + }; + }; +}; + +var mkGene = function mkGene(bs) { + return function (config) { + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Effect_Ref.read(bs)))(function (v) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Canvas.getTrack("gene")(v.container))(function (v1) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Track.fetchData()()(Genetics_Browser_Track.trackDataCons(new Data_Symbol.IsSymbol(function () { + return "genes"; + }))()()(Data_Map_Internal.monoidMap(Genetics_Browser_Types.ordChrId))()()()(Genetics_Browser_Track.trackDataNil(Type_Equality.refl)))(v1)({ + genes: Genetics_Browser_Bed.getGenes(v.coordSys) + })(config.urls))(function (v2) { + return Control_Bind.bind(Effect_Aff.bindAff)(Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Demo.addChrLayers({ + coordinateSystem: v.coordSys, + segmentPadding: 12.0 + })(config.chrs)(v1))(function (v3) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Demo.addGeneLayers(v.coordSys)(config.tracks.gene)(v2)(v1))(function (v4) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(Record.merge()()({ + chrs: v3 + })(v4)); + }); + }))(function (v3) { + return Control_Bind.bind(Effect_Aff.bindAff)(initializeTrack()(Genetics_Browser_Track.trackRecordRender(new Data_Symbol.IsSymbol(function () { + return "chrs"; + }))()()(Genetics_Browser_Track.trackRecordRender(new Data_Symbol.IsSymbol(function () { + return "genes"; + }))()()(Genetics_Browser_Track.trackRecordNil(Type_Equality.refl))))(v.coordSys)(v3)(v.viewManager.browserView)(v1))(function (v4) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(setHandlers(v.viewManager)(v1)(v4))(function () { + return Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(v.viewManager.addCallback(function (csv) { + return Effect_Aff.launchAff_(v4.queueCommand(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "render"; + }))(_render)(Data_Unit.unit))); + })); + }); + }); + }); + }); + }); + }); + }; +}; + +var mkGwas = function mkGwas(bs) { + return function (config) { + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Effect_Ref.read(bs)))(function (v) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Canvas.getTrack("gwas")(v.container))(function (v1) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Track.fetchData()()(Genetics_Browser_Track.trackDataCons(new Data_Symbol.IsSymbol(function () { + return "annotations"; + }))()()(Data_Map_Internal.monoidMap(Genetics_Browser_Types.ordChrId))()()()(Genetics_Browser_Track.trackDataCons(new Data_Symbol.IsSymbol(function () { + return "snps"; + }))()()(Data_Map_Internal.monoidMap(Genetics_Browser_Types.ordChrId))()()()(Genetics_Browser_Track.trackDataNil(Type_Equality.refl))))(v1)({ + snps: Genetics_Browser_Demo.getSNPs(v.coordSys), + annotations: Genetics_Browser_Demo.getAnnotations(v.coordSys) + })(config.urls))(function (v2) { + return Control_Bind.bind(Effect_Aff.bindAff)(Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Demo.addChrLayers({ + coordinateSystem: v.coordSys, + segmentPadding: 12.0 + })(config.chrs)(v1))(function (v3) { + return Control_Bind.bind(Effect_Aff.bindAff)(Genetics_Browser_Demo.addGWASLayers(v.coordSys)(config.tracks.gwas)(v2)(v1))(function (v4) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(Record.merge()()({ + chrs: v3 + })(v4)); + }); + }))(function (v3) { + return Control_Bind.bind(Effect_Aff.bindAff)(initializeTrack()(Genetics_Browser_Track.trackRecordRender(new Data_Symbol.IsSymbol(function () { + return "annotations"; + }))()()(Genetics_Browser_Track.trackRecordRender(new Data_Symbol.IsSymbol(function () { + return "chrs"; + }))()()(Genetics_Browser_Track.trackRecordUI(new Data_Symbol.IsSymbol(function () { + return "fixedUI"; + }))()()(Genetics_Browser_Track.trackRecordHotspots(new Data_Symbol.IsSymbol(function () { + return "hotspots"; + }))()()(Type_Equality.refl)(Genetics_Browser_Track.trackRecordRender(new Data_Symbol.IsSymbol(function () { + return "snps"; + }))()()(Genetics_Browser_Track.trackRecordNil(Type_Equality.refl)))))))(v.coordSys)(v3)(v.viewManager.browserView)(v1))(function (v4) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(setHandlers(v.viewManager)(v1)(v4))(function () { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(v.viewManager.addCallback(function (csv) { + return Effect_Aff.launchAff_(v4.queueCommand(Data_Variant.inj()(new Data_Symbol.IsSymbol(function () { + return "render"; + }))(_render)(Data_Unit.unit))); + })))(function () { + return Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(function () { + var sigSnps = Genetics_Browser_Demo.filterSig(config.score)(v2.snps); + + var annotAround = function annotAround(pks) { + return function (snp) { + return Control_Bind.bindFlipped(Data_Maybe.bindMaybe)(Data_Foldable.find(Data_Foldable.foldableArray)(function (a) { + return Genetics_Browser_Coordinates.pairsOverlap(Genetics_Browser_Types.ordBp)(a.covers)(snp.position); + }))(Data_Map_Internal.lookup(Genetics_Browser_Types.ordChrId)(snp.feature.chrId)(pks)); + }; + }; + + var glyphClick = function glyphClick(p) { + return Effect_Aff.launchAff_(Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(v.viewManager.browserView))(function (v5) { + return Control_Bind.bind(Effect_Aff.bindAff)(Data_Functor.map(Effect_Aff.functorAff)(function ($193) { + return function (v7) { + return v7.center; + }(Genetics_Browser_Layer.trackSlots($193)); + })(Genetics_Browser_Canvas.getDimensions(Effect_Aff.monadEffectAff)(v1)))(function (v7) { + var segs = Genetics_Browser.pixelSegments({ + segmentPadding: 12.0 + })(v.coordSys)(v7.size)(v5); + var annoPeaks = Genetics_Browser_Demo.annotationsForScale(v.coordSys)(sigSnps)(v2.annotations)(segs); + return Control_Bind.bind(Effect_Aff.bindAff)(v4.lastHotspots)(function (v8) { + var clicked = v8(1.0)(p); + return Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(function () { + var v9 = Data_Array.head(clicked); + + if (v9 instanceof Data_Maybe.Nothing) { + return v.cmdInfoBox(IBoxHide.value); + } + + ; + + if (v9 instanceof Data_Maybe.Just) { + return function __do() { + v.cmdInfoBox(IBoxShow.value)(); + v.cmdInfoBox(IBoxSetX.create(Data_Int.round(p.x)))(); + v.cmdInfoBox(IBoxSetY.create(Data_Int.round(p.y)))(); + return v.cmdInfoBox(IBoxSetContents.create(snpHTML(v9.value0) + Data_Foldable.foldMap(Data_Foldable.foldableMaybe)(Data_Monoid.monoidString)(annoPeakHTML(config.tracks.gwas.annotations.urls))(annotAround(annoPeaks)(v9.value0))))(); + }; + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 421, column 15 - line 430, column 57): " + [v9.constructor.name]); + }()); + }); + }); + })); + }; + + return Genetics_Browser_Canvas.trackClickHandler(Effect_Class.monadEffectEffect)(v1)(new Genetics_Browser_Layer.Center(glyphClick)); + }()); + }); + }); + }); + }); + }); + }); + }); + }; +}; + +var runBrowser = function runBrowser(config) { + return function (bc) { + return Effect_Aff.launchAff(Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(function () { + var v = Control_Monad_Except.runExcept(Genetics_Browser_Coordinates.parseCoordSys(config.coordinateSystem)); + + if (v instanceof Data_Either.Left) { + return Effect_Exception["throw"](Data_Foldable.foldMap(Data_List_Types.foldableNonEmptyList)(Data_Monoid.monoidString)(function ($194) { + return function (v1) { + return v1 + " "; + }(Foreign.renderForeignError($194)); + })(v.value0)); + } + + ; + + if (v instanceof Data_Either.Right) { + return Control_Applicative.pure(Effect.applicativeEffect)(v.value0); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 473, column 11 - line 475, column 24): " + [v.constructor.name]); + }()))(function (v) { + var initialView = Data_Maybe.fromMaybe(Data_Newtype.wrap(Genetics_Browser_Coordinates.coordsysviewNewtype)(new Data_Pair.Pair(Data_Semiring.zero(Data_BigInt.semiringBigInt), Data_Lens_Getter.viewOn(v)(Genetics_Browser_Coordinates["_TotalSize"](Data_BigInt.ringBigInt)))))(Control_Bind.bind(Data_Maybe.bindMaybe)(config.initialChrs)(function (v1) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Map_Internal.lookup(Genetics_Browser_Types.ordChrId)(Data_Newtype.wrap(Genetics_Browser_Types.newtypeChrId)(v1.left))(Data_Lens_Getter.viewOn(v)(Genetics_Browser_Coordinates["_Segments"](Data_Lens_Internal_Forget.strongForget))))(function (v3) { + return Control_Bind.bind(Data_Maybe.bindMaybe)(Data_Map_Internal.lookup(Genetics_Browser_Types.ordChrId)(Data_Newtype.wrap(Genetics_Browser_Types.newtypeChrId)(v1.right))(Data_Lens_Getter.viewOn(v)(Genetics_Browser_Coordinates["_Segments"](Data_Lens_Internal_Forget.strongForget))))(function (v4) { + return Control_Applicative.pure(Data_Maybe.applicativeMaybe)(Data_Newtype.wrap(Genetics_Browser_Coordinates.coordsysviewNewtype)(new Data_Pair.Pair(v3.value0, v4.value1))); + }); + }); + })); + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)($foreign.initDebugDiv(1.0)))(function () { + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(initInfoBox))(function (v1) { + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Genetics_Browser_UI_View.browserViewManager(v)(Data_Newtype.wrap(Data_Time_Duration.newtypeMilliseconds)(200.0))({ + initialView: initialView + })(bc)))(function (v2) { + return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Effect_Ref["new"]({ + viewManager: v2, + cmdInfoBox: v1, + container: bc, + coordSys: v + })))(function (v3) { + return Control_Bind.discard(Control_Bind.discardUnit)(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(function () { + var btnMods = { + scrollMod: 0.1, + zoomMod: 0.15 + }; + return function __do() { + btnUI(btnMods)(function (u) { + return v2.updateView(u); + })(); + $foreign.buttonEvent("reset")(function () { + var cmd = new Genetics_Browser_UI_View.ModView(Data_Function["const"](Data_Newtype.unwrap(Genetics_Browser_Coordinates.coordsysviewNewtype)(initialView))); + return v2.updateView(cmd); + }())(); + keyUI(Data_Lens_Getter.viewOn(bc)(Genetics_Browser_Canvas["_Container"](Genetics_Browser_Canvas.newtypeBrowserContainer)(Data_Lens_Internal_Forget.strongForget)))({ + scrollMod: 7.5e-2 + })(function (u) { + return v2.updateView(u); + })(); + return Genetics_Browser_Canvas.wheelZoom(Genetics_Browser_Canvas.newtypeBrowserContainer)(bc)(function (dY) { + var cmd = Genetics_Browser_UI_View.ZoomView.create(1.0 + 6.0e-2 * dY); + return v2.updateView(cmd); + })(); + }; + }()))(function () { + if (config.urls.snps instanceof Data_Maybe.Just) { + return Control_Apply.applySecond(Effect_Aff.applyAff)(mkGwas(v3)(config))(Control_Applicative.pure(Effect_Aff.applicativeAff)(Data_Unit.unit)); + } + + ; + + if (config.urls.snps instanceof Data_Maybe.Nothing) { + return Control_Applicative.pure(Effect_Aff.applicativeAff)(Data_Unit.unit); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 517, column 3 - line 519, column 25): " + [config.urls.snps.constructor.name]); + }); + }); + }); + }); + }); + })); + }; +}; +/** + * + * main :: Effect Unit + * main = do + * let f1 :: { a :: Int, b :: String } -> String + * f1 {a, b} = b <> " - " <> show a + * + * f2 :: { b :: String, c :: Boolean } -> Int + * f2 {b, c} = (String.length b) + (Enum.fromEnum c) + * + * f3 :: { b :: Int, c :: Int } -> String + * f3 {b, c} = show (b + c) + * + * combo1 :: ?h + * combo1 = combineFuns { f: f1, g: f3 } + * + * pure unit + * + * + */ + + +var main = function main(rawConfig) { + return function __do() { + var v = function __do() { + var v = Data_Functor.map(Effect.functorEffect)(Web_HTML_HTMLDocument.toDocument)(Control_Bind.bindFlipped(Effect.bindEffect)(Web_HTML_Window.document)(Web_HTML.window))(); + return Web_DOM_ParentNode.querySelector(Data_Newtype.wrap(Web_DOM_ParentNode.newtypeQuerySelector)("#browser"))(Web_DOM_Document.toParentNode(v))(); + }(); + + if (v instanceof Data_Maybe.Nothing) { + return Effect_Class_Console.log(Effect_Class.monadEffectEffect)("Could not find element '#browser'")(); + } + + ; + + if (v instanceof Data_Maybe.Just) { + var v1 = Simple_JSON.read(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "chrs"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "chrBG1"; + }))(Genetics_Browser.readforeignHexColor)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "chrBG2"; + }))(Genetics_Browser.readforeignHexColor)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "chrLabels"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "fontSize"; + }))(Simple_JSON.readInt)(Simple_JSON.readFieldsNil)()()))(Simple_JSON.readFieldsNil)()())()())()()))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "coordinateSystem"; + }))(Simple_JSON.readForeign)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "initialChrs"; + }))(Simple_JSON.readMaybe(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "left"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "right"; + }))(Simple_JSON.readString)(Simple_JSON.readFieldsNil)()())()())))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "score"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "max"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "min"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "sig"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsNil)()())()())()()))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "tracks"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "gwas"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "annotations"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "geneColor"; + }))(Genetics_Browser.readforeignHexColor)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "outline"; + }))(Genetics_Browser.readforeignHexColor)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "radius"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "snpColor"; + }))(Genetics_Browser.readforeignHexColor)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "urls"; + }))(Simple_JSON.readObject(Simple_JSON.readString))(Simple_JSON.readFieldsNil)()())()())()())()())()()))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "legend"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "fontSize"; + }))(Simple_JSON.readInt)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "hPad"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "vPad"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsNil)()())()())()()))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "padding"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "bottom"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "left"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "right"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "top"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsNil)()())()())()())()()))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "score"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "max"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "min"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "sig"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsNil)()())()())()()))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "snps"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "color"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "fill"; + }))(Genetics_Browser.readforeignHexColor)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "outline"; + }))(Genetics_Browser.readforeignHexColor)(Simple_JSON.readFieldsNil)()())()()))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "lineWidth"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "pixelOffset"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "x"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "y"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsNil)()())()()))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "radius"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsNil)()())()())()())()()))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "trackHeight"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "vscale"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "color"; + }))(Genetics_Browser.readforeignHexColor)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "fonts"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "labelSize"; + }))(Simple_JSON.readInt)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "scaleSize"; + }))(Simple_JSON.readInt)(Simple_JSON.readFieldsNil)()())()()))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "hPad"; + }))(Simple_JSON.readNumber)(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "numSteps"; + }))(Simple_JSON.readInt)(Simple_JSON.readFieldsNil)()())()())()())()()))(Simple_JSON.readFieldsNil)()())()())()())()())()())()())()()))(Simple_JSON.readFieldsNil)()()))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "urls"; + }))(Simple_JSON.readRecord()(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "annotations"; + }))(Simple_JSON.readMaybe(Simple_JSON.readString))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "genes"; + }))(Simple_JSON.readMaybe(Simple_JSON.readString))(Simple_JSON.readFieldsCons(new Data_Symbol.IsSymbol(function () { + return "snps"; + }))(Simple_JSON.readMaybe(Simple_JSON.readString))(Simple_JSON.readFieldsNil)()())()())()()))(Simple_JSON.readFieldsNil)()())()())()())()())()())()()))(rawConfig); + + if (v1 instanceof Data_Either.Left) { + return $foreign.setElementContents(v.value0)("<p>Error when parsing provided config object:<p>" + Data_Foldable.foldMap(Data_List_Types.foldableNonEmptyList)(Data_Monoid.monoidString)(function () { + var $195 = wrapWith("p"); + return function ($196) { + return $195(Foreign.renderForeignError($196)); + }; + }())(v1.value0))(); + } + + ; + + if (v1 instanceof Data_Either.Right) { + var v2 = $foreign.windowInnerSize(); + var v3 = Genetics_Browser_Track.makeContainers()(Genetics_Browser_Track.trackConfigCons(new Data_Symbol.IsSymbol(function () { + return "gwas"; + }))(Genetics_Browser_Track.trackConfigNil(Type_Equality.refl))()()()()(Type_Equality.refl))(v2.width)(v1.value0.tracks)(); + var v4 = Genetics_Browser_Canvas.browserContainer(Effect_Class.monadEffectEffect)(v.value0)(); + + (function () { + if (v1.value0.urls.snps instanceof Data_Maybe.Just) { + return Control_Apply.applySecond(Effect.applyEffect)(Genetics_Browser_Canvas.addTrack(Effect_Class.monadEffectEffect)(v4)("gwas")(v3.gwas))(Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit))(); + } + + ; + + if (v1.value0.urls.snps instanceof Data_Maybe.Nothing) { + return Data_Unit.unit; + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 594, column 11 - line 596, column 33): " + [v1.value0.urls.snps.constructor.name]); + })(); + + Effect_Class_Console.log(Effect_Class.monadEffectEffect)(v1.value0)(); + return Data_Functor["void"](Effect.functorEffect)(runBrowser(v1.value0)(v4))(); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 580, column 7 - line 604, column 33): " + [v1.constructor.name]); + } + + ; + throw new Error("Failed pattern match at Genetics.Browser.UI (line 576, column 3 - line 604, column 33): " + [v.constructor.name]); + }; +}; + +module.exports = { + "_render": _render, + "_docResize": _docResize, + initializeTrack: initializeTrack, + btnUI: btnUI, + btnUIFixed: btnUIFixed, + keyUI: keyUI, + printSNPInfo: printSNPInfo, + wrapWith: wrapWith, + snpHTML: snpHTML, + peakHTML: peakHTML, + annoPeakHTML: annoPeakHTML, + annotationHTML: annotationHTML, + annotationHTMLAll: annotationHTMLAll, + annotationHTMLShort: annotationHTMLShort, + IBoxShow: IBoxShow, + IBoxHide: IBoxHide, + IBoxSetY: IBoxSetY, + IBoxSetX: IBoxSetX, + IBoxSetContents: IBoxSetContents, + updateInfoBox: updateInfoBox, + infoBoxId: infoBoxId, + initInfoBox: initInfoBox, + setHandlers: setHandlers, + mkGwas: mkGwas, + mkGene: mkGene, + runBrowser: runBrowser, + main: main, + genericInfoBoxF: genericInfoBoxF, + showInfoBoxF: showInfoBoxF, + windowInnerSize: $foreign.windowInnerSize, + buttonEvent: $foreign.buttonEvent, + keydownEvent: $foreign.keydownEvent, + resizeEvent: $foreign.resizeEvent, + initDebugDiv: $foreign.initDebugDiv, + setDebugDivVisibility: $foreign.setDebugDivVisibility, + setDebugDivPoint: $foreign.setDebugDivPoint, + setElementContents: $foreign.setElementContents, + setWindow: $foreign.setWindow +}; +},{"./foreign.js":"DuPX","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad.Except/index.js":"Fye2","../Data.Array/index.js":"4t4C","../Data.BigInt/index.js":"Zx+T","../Data.Either/index.js":"B2JL","../Data.Filterable/index.js":"6hfS","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Generic.Rep/index.js":"AuzG","../Data.Generic.Rep.Show/index.js":"lpst","../Data.Int/index.js":"xNJb","../Data.Lens.Getter/index.js":"OPOX","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.Lens.Iso.Newtype/index.js":"CiFJ","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Pair/index.js":"PpsX","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.Symbol/index.js":"4oJQ","../Data.Time.Duration/index.js":"AnkF","../Data.Unit/index.js":"NhVk","../Data.Variant/index.js":"hgdh","../Data.Variant.Internal/index.js":"kYoO","../Effect/index.js":"oTWB","../Effect.Aff/index.js":"I7lu","../Effect.Aff.AVar/index.js":"hACG","../Effect.Class/index.js":"dWtH","../Effect.Class.Console/index.js":"3Dts","../Effect.Exception/index.js":"0OCW","../Effect.Ref/index.js":"/Jaj","../Foreign/index.js":"pu1p","../Genetics.Browser/index.js":"X0te","../Genetics.Browser.Bed/index.js":"UuEA","../Genetics.Browser.Canvas/index.js":"VVkU","../Genetics.Browser.Coordinates/index.js":"7bYH","../Genetics.Browser.Demo/index.js":"mKwt","../Genetics.Browser.Layer/index.js":"YWUW","../Genetics.Browser.Track/index.js":"HH6s","../Genetics.Browser.Types/index.js":"HhmG","../Genetics.Browser.UI.View/index.js":"Tmz+","../Math/index.js":"Rpaz","../Record/index.js":"0gG4","../Simple.JSON/index.js":"DqNI","../Type.Equality/index.js":"Uq/R","../Web.DOM.Document/index.js":"0hiR","../Web.DOM.Element/index.js":"S4h2","../Web.DOM.Node/index.js":"P+X4","../Web.DOM.ParentNode/index.js":"lU5U","../Web.HTML/index.js":"UQRJ","../Web.HTML.HTMLDocument/index.js":"EU5r","../Web.HTML.Window/index.js":"o+50","../Web.UIEvent.KeyboardEvent/index.js":"o/+T"}],"Focm":[function(require,module,exports) { +var GenomeBrowser = require('./output/Genetics.Browser.UI'); + +window.GenomeBrowser = GenomeBrowser; +},{"./output/Genetics.Browser.UI":"JuOH"}]},{},["Focm"], null)
\ No newline at end of file diff --git a/wqflask/wqflask/static/packages/purescript_genome_browser/js/purescript-genetics-browser_v01.js b/wqflask/wqflask/static/packages/purescript_genome_browser/js/purescript-genetics-browser_v01.js deleted file mode 100644 index acd590a5..00000000 --- a/wqflask/wqflask/static/packages/purescript_genome_browser/js/purescript-genetics-browser_v01.js +++ /dev/null @@ -1,659 +0,0 @@ -parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"DuPX":[function(require,module,exports) { -"use strict";exports.buttonEvent=function(t){return function(n){return function(){document.getElementById(t).addEventListener("click",function(t){n()})}}},exports.keydownEvent=function(t){return function(t){return function(){window.addEventListener("keydown",function(n){t(n)()})}}},exports.resizeEvent=function(t){return function(){var n=null;window.addEventListener("resize",function(){n&&clearTimeout(n),n=setTimeout(function(){n=null,t(exports.windowInnerSize())()},250)},!1)}},exports.windowInnerSize=function(){return{width:window.innerWidth,height:window.innerHeight}},exports.setWindow=function(t){return function(n){return function(){window[t]=n}}},exports.setElementContents=function(t){return function(n){return function(){t.innerHTML=n}}};var t="debugDiv";exports.initDebugDiv=function(n){return function(){var e=document.getElementById("browser"),i=document.getElementById(t);return i||(i=document.createElement("div"),e.appendChild(i)),i.id=t,i.style.position="relative",i.style.left="0.0",i.style.top="0.0",i.style["border-radius"]="50%",i.style.width=2*n+"px",i.style.height=2*n+"px",i.style["z-index"]="100",i.style.backgroundColor="red",i.style["pointer-events"]="none",i.style.display="inline-block",i.style.visibility="hidden",i.dataset.radius=n,i}};var n=function(){var n=document.getElementById(t);return n||initDebugDiv(10)()};exports.setDebugDivVisibility=function(t){return function(){n().style.visibility=t}},exports.setDebugDivPoint=function(t){return function(){var e=n(),i=1|e.dataset.radius,r=t.x-i,o=t.y-2*i;e.style.left=r+"px",e.style.top=o+"px"}}; -},{}],"7nyB":[function(require,module,exports) { -"use strict";exports.arrayApply=function(r){return function(n){for(var t=r.length,e=n.length,a=new Array(t*e),o=0,u=0;u<t;u++)for(var f=r[u],c=0;c<e;c++)a[o++]=f(n[c]);return a}}; -},{}],"/riR":[function(require,module,exports) { -"use strict";var n=function(n){this.compose=n},o=new n(function(n){return function(o){return function(r){return n(o(r))}}}),r=function(n){return n.compose},t=function(n){return function(o){return function(t){return r(n)(t)(o)}}};module.exports={compose:r,Semigroupoid:n,composeFlipped:t,semigroupoidFn:o}; -},{}],"IAi2":[function(require,module,exports) { -"use strict";var i=require("../Control.Semigroupoid/index.js"),t=function(i,t){this.Semigroupoid0=i,this.identity=t},n=function(i){return i.identity},e=new t(function(){return i.semigroupoidFn},function(i){return i});module.exports={Category:t,identity:n,categoryFn:e}; -},{"../Control.Semigroupoid/index.js":"/riR"}],"ObQr":[function(require,module,exports) { -"use strict";var e=!0;module.exports={otherwise:e}; -},{}],"ImXJ":[function(require,module,exports) { -"use strict";var n=require("../Data.Boolean/index.js"),r=function(n){return function(r){return function(t){return function(u){return n(r(t))(r(u))}}}},t=function(n){return function(r){return function(t){return n(t)(r)}}},u=function(n){return function(r){return n}},e=function(r){return function(t){return function(u){var e,o=t,i=!1;function c(t,e){if(t<=0)return i=!0,e;if(n.otherwise)return o=t-1|0,void(u=r(e));throw new Error("Failed pattern match at Data.Function (line 94, column 3 - line 96, column 37): "+[t.constructor.name,e.constructor.name])}for(;!i;)e=c(o,u);return e}}},o=function(n){return function(r){return r(n)}},i=function(n){return function(r){return n(r)}};module.exports={flip:t,const:u,apply:i,applyFlipped:o,applyN:e,on:r}; -},{"../Data.Boolean/index.js":"ObQr"}],"0GYo":[function(require,module,exports) { -"use strict";exports.arrayMap=function(r){return function(n){for(var t=n.length,e=new Array(t),a=0;a<t;a++)e[a]=r(n[a]);return e}}; -},{}],"Nqls":[function(require,module,exports) { -"use strict";exports.unit={}; -},{}],"qgjE":[function(require,module,exports) { -"use strict";exports.showIntImpl=function(r){return r.toString()},exports.showNumberImpl=function(r){var t=r.toString();return isNaN(t+".0")?t:t+".0"},exports.showCharImpl=function(r){var t=r.charCodeAt(0);if(t<32||127===t){switch(r){case"":return"'\\a'";case"\b":return"'\\b'";case"\f":return"'\\f'";case"\n":return"'\\n'";case"\r":return"'\\r'";case"\t":return"'\\t'";case"\v":return"'\\v'"}return"'\\"+t.toString(10)+"'"}return"'"===r||"\\"===r?"'\\"+r+"'":"'"+r+"'"},exports.showStringImpl=function(r){var t=r.length;return'"'+r.replace(/[\0-\x1F\x7F"\\]/g,function(n,e){switch(n){case'"':case"\\":return"\\"+n;case"":return"\\a";case"\b":return"\\b";case"\f":return"\\f";case"\n":return"\\n";case"\r":return"\\r";case"\t":return"\\t";case"\v":return"\\v"}var u=e+1,c=u<t&&r[u]>="0"&&r[u]<="9"?"\\&":"";return"\\"+n.charCodeAt(0).toString(10)+c})+'"'},exports.showArrayImpl=function(r){return function(t){for(var n=[],e=0,u=t.length;e<u;e++)n[e]=r(t[e]);return"["+n.join(",")+"]"}},exports.cons=function(r){return function(t){return[r].concat(t)}},exports.join=function(r){return function(t){return t.join(r)}}; -},{}],"AvJb":[function(require,module,exports) { -"use strict";exports.unsafeCoerce=function(e){return e}; -},{}],"4oJQ":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),n=function(){function e(){}return e.value=new e,e}(),r=function(e){this.reflectSymbol=e},t=function(r){return function(t){return e.unsafeCoerce(function(e){return t(e)})({reflectSymbol:function(e){return r}})(n.value)}},u=function(e){return e.reflectSymbol};module.exports={IsSymbol:r,reflectSymbol:u,reifySymbol:t,SProxy:n}; -},{"./foreign.js":"AvJb"}],"CHMS":[function(require,module,exports) { -"use strict";exports.unsafeHas=function(n){return function(r){return{}.hasOwnProperty.call(r,n)}},exports.unsafeGet=function(n){return function(r){return r[n]}},exports.unsafeSet=function(n){return function(r){return function(t){var e={};for(var u in t)({}).hasOwnProperty.call(t,u)&&(e[u]=t[u]);return e[n]=r,e}}},exports.unsafeDelete=function(n){return function(r){var t={};for(var e in r)e!==n&&{}.hasOwnProperty.call(r,e)&&(t[e]=r[e]);return t}}; -},{}],"KG04":[function(require,module,exports) { -"use strict";var e=require("./foreign.js");module.exports={unsafeHas:e.unsafeHas,unsafeGet:e.unsafeGet,unsafeSet:e.unsafeSet,unsafeDelete:e.unsafeDelete}; -},{"./foreign.js":"CHMS"}],"XaXP":[function(require,module,exports) { -"use strict";var e=function(){function e(){}return e.value=new e,e}();module.exports={RLProxy:e}; -},{}],"mFY7":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),e=require("../Data.Symbol/index.js"),r=require("../Record.Unsafe/index.js"),o=require("../Type.Data.RowList/index.js"),t=function(n){this.showRecordFields=n},u=function(n){this.show=n},i=new u(n.showStringImpl),s=new t(function(n){return function(n){return[]}}),w=function(n){return n.showRecordFields},c=function(e){return function(e){return new u(function(r){var t=w(e)(o.RLProxy.value)(r);return 0===t.length?"{}":n.join(" ")(["{",n.join(", ")(t),"}"])})}},h=new u(n.showNumberImpl),l=new u(n.showIntImpl),a=new u(n.showCharImpl),f=new u(function(n){if(n)return"true";if(!n)return"false";throw new Error("Failed pattern match at Data.Show (line 20, column 1 - line 22, column 23): "+[n.constructor.name])}),d=function(n){return n.show},m=function(e){return new u(n.showArrayImpl(d(e)))},R=function(u){return function(i){return function(s){return new t(function(t){return function(t){var c=w(i)(o.RLProxy.value)(t),h=e.reflectSymbol(u)(e.SProxy.value),l=r.unsafeGet(h)(t);return n.cons(n.join(": ")([h,d(s)(l)]))(c)}})}}};module.exports={Show:u,show:d,ShowRecordFields:t,showRecordFields:w,showBoolean:f,showInt:l,showNumber:h,showChar:a,showString:i,showArray:m,showRecord:c,showRecordFieldsNil:s,showRecordFieldsCons:R}; -},{"./foreign.js":"qgjE","../Data.Symbol/index.js":"4oJQ","../Record.Unsafe/index.js":"KG04","../Type.Data.RowList/index.js":"XaXP"}],"NhVk":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),i=require("../Data.Show/index.js"),n=new i.Show(function(e){return"unit"});module.exports={showUnit:n,unit:e.unit}; -},{"./foreign.js":"Nqls","../Data.Show/index.js":"mFY7"}],"+0AE":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Control.Semigroupoid/index.js"),t=require("../Data.Function/index.js"),u=require("../Data.Unit/index.js"),i=function(n){this.map=n},e=function(n){return n.map},o=function(n){return function(r){return function(t){return e(n)(t)(r)}}},c=function(n){return e(n)(t.const(u.unit))},f=function(n){return function(r){return function(u){return e(n)(t.const(u))(r)}}},a=function(n){return function(r){return e(n)(t.const(r))}},s=new i(r.compose(r.semigroupoidFn)),p=new i(n.arrayMap),d=function(n){return function(r){return function(t){return e(n)(function(n){return n(t)})(r)}}};module.exports={Functor:i,map:e,mapFlipped:o,void:c,voidRight:a,voidLeft:f,flap:d,functorFn:s,functorArray:p}; -},{"./foreign.js":"0GYo","../Control.Semigroupoid/index.js":"/riR","../Data.Function/index.js":"ImXJ","../Data.Unit/index.js":"NhVk"}],"QcLv":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Control.Category/index.js"),t=require("../Data.Function/index.js"),u=require("../Data.Functor/index.js"),o=function(n,r){this.Functor0=n,this.apply=r},e=new o(function(){return u.functorFn},function(n){return function(r){return function(t){return n(t)(r(t))}}}),i=new o(function(){return u.functorArray},n.arrayApply),c=function(n){return n.apply},f=function(n){return function(r){return function(o){return c(n)(u.map(n.Functor0())(t.const)(r))(o)}}},p=function(n){return function(o){return function(e){return c(n)(u.map(n.Functor0())(t.const(r.identity(r.categoryFn)))(o))(e)}}},a=function(n){return function(r){return function(t){return function(o){return c(n)(u.map(n.Functor0())(r)(t))(o)}}}},l=function(n){return function(r){return function(t){return function(o){return function(e){return c(n)(c(n)(u.map(n.Functor0())(r)(t))(o))(e)}}}}},y=function(n){return function(r){return function(t){return function(o){return function(e){return function(i){return c(n)(c(n)(c(n)(u.map(n.Functor0())(r)(t))(o))(e))(i)}}}}}},F=function(n){return function(r){return function(t){return function(o){return function(e){return function(i){return function(f){return c(n)(c(n)(c(n)(c(n)(u.map(n.Functor0())(r)(t))(o))(e))(i))(f)}}}}}}};module.exports={Apply:o,apply:c,applyFirst:f,applySecond:p,lift2:a,lift3:l,lift4:y,lift5:F,applyFn:e,applyArray:i}; -},{"./foreign.js":"7nyB","../Control.Category/index.js":"IAi2","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE"}],"qYya":[function(require,module,exports) { -"use strict";var n=require("../Control.Apply/index.js"),r=require("../Data.Unit/index.js"),t=function(n,r){this.Apply0=n,this.pure=r},e=function(n){return n.pure},u=function(n){return function(t){return function(u){if(!t)return u;if(t)return e(n)(r.unit);throw new Error("Failed pattern match at Control.Applicative (line 62, column 1 - line 62, column 65): "+[t.constructor.name,u.constructor.name])}}},i=function(n){return function(t){return function(u){if(t)return u;if(!t)return e(n)(r.unit);throw new Error("Failed pattern match at Control.Applicative (line 57, column 1 - line 57, column 63): "+[t.constructor.name,u.constructor.name])}}},o=function(r){return function(t){return function(u){return n.apply(r.Apply0())(e(r)(t))(u)}}},c=new t(function(){return n.applyFn},function(n){return function(r){return n}}),p=new t(function(){return n.applyArray},function(n){return[n]});module.exports={Applicative:t,pure:e,liftA1:o,unless:u,when:i,applicativeFn:c,applicativeArray:p}; -},{"../Control.Apply/index.js":"QcLv","../Data.Unit/index.js":"NhVk"}],"S3W+":[function(require,module,exports) { -"use strict";exports.arrayBind=function(r){return function(t){for(var n=[],e=0,o=r.length;e<o;e++)Array.prototype.push.apply(n,t(r[e]));return n}}; -},{}],"7VcT":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Control.Apply/index.js"),t=require("../Control.Category/index.js"),i=require("../Data.Function/index.js"),u=function(n){this.discard=n},e=function(n,r){this.Apply0=n,this.bind=r},o=function(n){return n.discard},c=new e(function(){return r.applyFn},function(n){return function(r){return function(t){return r(n(t))(t)}}}),f=new e(function(){return r.applyArray},n.arrayBind),d=function(n){return n.bind},s=function(n){return i.flip(d(n))},a=function(n){return function(r){return function(t){return function(i){return s(n)(r)(t(i))}}}},p=function(n){return function(r){return function(t){return function(i){return d(n)(r(i))(t)}}}},l=new u(function(n){return d(n)}),y=function(n){return function(r){return function(t){return function(i){return d(n)(r)(function(n){return n?t:i})}}}},b=function(n){return function(r){return d(n)(r)(t.identity(t.categoryFn))}};module.exports={Bind:e,bind:d,bindFlipped:s,Discard:u,discard:o,join:b,composeKleisli:p,composeKleisliFlipped:a,ifM:y,bindFn:c,bindArray:f,discardUnit:l}; -},{"./foreign.js":"S3W+","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Function/index.js":"ImXJ"}],"TZDL":[function(require,module,exports) { -"use strict";exports.range=function(n){return function(r){for(var t=n>r?-1:1,e=new Array(t*(r-n)+1),u=n,o=0;u!==r;)e[o++]=u,u+=t;return e[o]=u,e}};var n=function(n){return function(r){return n<1?[]:new Array(n).fill(r)}},r=function(n){return function(r){for(var t=[],e=0,u=0;u<n;u++)t[e++]=r;return t}};exports.replicate="function"==typeof Array.prototype.fill?n:r,exports.fromFoldableImpl=function(){function n(n,r){this.head=n,this.tail=r}var r={};function t(r){return function(t){return new n(r,t)}}return function(n){return function(e){return function(n){for(var t=[],e=0,u=n;u!==r;)t[e++]=u.head,u=u.tail;return t}(n(t)(r)(e))}}}(),exports.length=function(n){return n.length},exports.cons=function(n){return function(r){return[n].concat(r)}},exports.snoc=function(n){return function(r){var t=n.slice();return t.push(r),t}},exports["uncons'"]=function(n){return function(r){return function(t){return 0===t.length?n({}):r(t[0])(t.slice(1))}}},exports.indexImpl=function(n){return function(r){return function(t){return function(e){return e<0||e>=t.length?r:n(t[e])}}}},exports.findIndexImpl=function(n){return function(r){return function(t){return function(e){for(var u=0,o=e.length;u<o;u++)if(t(e[u]))return n(u);return r}}}},exports.findLastIndexImpl=function(n){return function(r){return function(t){return function(e){for(var u=e.length-1;u>=0;u--)if(t(e[u]))return n(u);return r}}}},exports._insertAt=function(n){return function(r){return function(t){return function(e){return function(u){if(t<0||t>u.length)return r;var o=u.slice();return o.splice(t,0,e),n(o)}}}}},exports._deleteAt=function(n){return function(r){return function(t){return function(e){if(t<0||t>=e.length)return r;var u=e.slice();return u.splice(t,1),n(u)}}}},exports._updateAt=function(n){return function(r){return function(t){return function(e){return function(u){if(t<0||t>=u.length)return r;var o=u.slice();return o[t]=e,n(o)}}}}},exports.reverse=function(n){return n.slice().reverse()},exports.concat=function(n){if(n.length<=1e4)return Array.prototype.concat.apply([],n);for(var r=[],t=0,e=n.length;t<e;t++)for(var u=n[t],o=0,i=u.length;o<i;o++)r.push(u[o]);return r},exports.filter=function(n){return function(r){return r.filter(n)}},exports.partition=function(n){return function(r){for(var t=[],e=[],u=0;u<r.length;u++){var o=r[u];n(o)?t.push(o):e.push(o)}return{yes:t,no:e}}},exports.sortImpl=function(n){return function(r){return r.slice().sort(function(r,t){return n(r)(t)})}},exports.slice=function(n){return function(r){return function(t){return t.slice(n,r)}}},exports.take=function(n){return function(r){return n<1?[]:r.slice(0,n)}},exports.drop=function(n){return function(r){return n<1?r:r.slice(n)}},exports.zipWith=function(n){return function(r){return function(t){for(var e=r.length<t.length?r.length:t.length,u=new Array(e),o=0;o<e;o++)u[o]=n(r[o])(t[o]);return u}}},exports.unsafeIndexImpl=function(n){return function(r){return n[r]}}; -},{}],"phTL":[function(require,module,exports) { -"use strict";exports.concatString=function(n){return function(t){return n+t}},exports.concatArray=function(n){return function(t){return 0===n.length?t:0===t.length?n:n.concat(t)}}; -},{}],"bncE":[function(require,module,exports) { -"use strict";var r=require("../Data.Show/index.js"),n=function(r){return r},o=function(r){return function(r){var n;for(;;)n=void(r=r);return n}(r)},e=new r.Show(o);module.exports={absurd:o,showVoid:e}; -},{"../Data.Show/index.js":"mFY7"}],"EsAJ":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Data.Symbol/index.js"),e=require("../Data.Unit/index.js"),u=require("../Data.Void/index.js"),t=require("../Record.Unsafe/index.js"),i=require("../Type.Data.RowList/index.js"),o=function(n){this.appendRecord=n},c=function(n){this.append=n},f=new c(function(n){return u.absurd}),a=new c(function(n){return function(n){return e.unit}}),s=new c(n.concatString),p=new o(function(n){return function(n){return function(n){return{}}}}),d=new c(n.concatArray),g=function(n){return n.appendRecord},m=function(n){return function(n){return new c(g(n)(i.RLProxy.value))}},R=function(n){return n.append},w=function(n){return new c(function(r){return function(e){return function(u){return R(n)(r(u))(e(u))}}})},x=function(n){return function(e){return function(e){return function(u){return new o(function(o){return function(o){return function(c){var f=g(e)(i.RLProxy.value)(o)(c),a=r.reflectSymbol(n)(r.SProxy.value),s=t.unsafeSet(a),p=t.unsafeGet(a);return s(R(u)(p(o))(p(c)))(f)}}})}}}};module.exports={Semigroup:c,append:R,SemigroupRecord:o,appendRecord:g,semigroupString:s,semigroupUnit:a,semigroupVoid:f,semigroupFn:w,semigroupArray:d,semigroupRecord:m,semigroupRecordNil:p,semigroupRecordCons:x}; -},{"./foreign.js":"phTL","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Data.Void/index.js":"bncE","../Record.Unsafe/index.js":"KG04","../Type.Data.RowList/index.js":"XaXP"}],"lN+m":[function(require,module,exports) { -"use strict";var r=require("../Data.Functor/index.js"),t=require("../Data.Semigroup/index.js"),e=function(r,t){this.Functor0=r,this.alt=t},n=new e(function(){return r.functorArray},t.append(t.semigroupArray)),u=function(r){return r.alt};module.exports={Alt:e,alt:u,altArray:n}; -},{"../Data.Functor/index.js":"+0AE","../Data.Semigroup/index.js":"EsAJ"}],"y9cE":[function(require,module,exports) { -"use strict";var n=require("../Data.Unit/index.js"),t=function(n){this.defer=n},r=new t(function(t){return n.unit}),e=new t(function(t){return function(r){return t(n.unit)(r)}}),u=function(n){return n.defer},i=function(n){return function(t){var r=u(n)(function(n){return t(r)});return r}};module.exports={defer:u,Lazy:t,fix:i,lazyFn:e,lazyUnit:r}; -},{"../Data.Unit/index.js":"NhVk"}],"U/Ix":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),i=require("../Control.Bind/index.js"),r=function(n,i){this.Applicative0=n,this.Bind1=i},t=function(r){return function(t){return function(u){return i.bind(r.Bind1())(t)(function(i){return n.when(r.Applicative0())(i)(u)})}}},u=function(r){return function(t){return function(u){return i.bind(r.Bind1())(t)(function(i){return n.unless(r.Applicative0())(i)(u)})}}},e=new r(function(){return n.applicativeFn},function(){return i.bindFn}),c=new r(function(){return n.applicativeArray},function(){return i.bindArray}),o=function(r){return function(t){return function(u){return i.bind(r.Bind1())(u)(function(i){return n.pure(r.Applicative0())(t(i))})}}},f=function(r){return function(t){return function(u){return i.bind(r.Bind1())(t)(function(t){return i.bind(r.Bind1())(u)(function(i){return n.pure(r.Applicative0())(t(i))})})}}};module.exports={Monad:r,liftM1:o,ap:f,whenM:t,unlessM:u,monadFn:e,monadArray:c}; -},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT"}],"e2Wc":[function(require,module,exports) { -"use strict";var t=require("../Control.Category/index.js"),n=function(t){this.bimap=t},r=function(t){return t.bimap},i=function(n){return function(i){return r(n)(i)(t.identity(t.categoryFn))}},e=function(n){return r(n)(t.identity(t.categoryFn))};module.exports={bimap:r,Bifunctor:n,lmap:i,rmap:e}; -},{"../Control.Category/index.js":"IAi2"}],"YFBA":[function(require,module,exports) { -"use strict";exports.arrayExtend=function(n){return function(r){return r.map(function(r,t,e){return n(e.slice(t))})}}; -},{}],"JIoJ":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Control.Category/index.js"),t=require("../Data.Functor/index.js"),e=require("../Data.Semigroup/index.js"),u=function(n,r){this.Functor0=n,this.extend=r},i=function(n){return new u(function(){return t.functorFn},function(r){return function(t){return function(u){return r(function(r){return t(e.append(n)(u)(r))})}}})},o=new u(function(){return t.functorArray},n.arrayExtend),c=function(n){return n.extend},f=function(n){return function(r){return function(t){return c(n)(t)(r)}}},d=function(n){return c(n)(r.identity(r.categoryFn))},a=function(n){return function(r){return function(t){return function(e){return r(c(n)(t)(e))}}}},s=function(n){return function(r){return function(t){return function(e){return t(c(n)(r)(e))}}}};module.exports={Extend:u,extend:c,extendFlipped:f,composeCoKleisli:s,composeCoKleisliFlipped:a,duplicate:d,extendFn:i,extendArray:o}; -},{"./foreign.js":"YFBA","../Control.Category/index.js":"IAi2","../Data.Functor/index.js":"+0AE","../Data.Semigroup/index.js":"EsAJ"}],"kY6E":[function(require,module,exports) { -"use strict";exports.foldrArray=function(r){return function(n){return function(t){for(var u=n,o=t.length-1;o>=0;o--)u=r(t[o])(u);return u}}},exports.foldlArray=function(r){return function(n){return function(t){for(var u=n,o=t.length,e=0;e<o;e++)u=r(u)(t[e]);return u}}}; -},{}],"oMBg":[function(require,module,exports) { -"use strict";var t=require("../Control.Alt/index.js"),r=function(t,r){this.Alt0=t,this.empty=r},e=new r(function(){return t.altArray},[]),n=function(t){return t.empty};module.exports={Plus:r,empty:n,plusArray:e}; -},{"../Control.Alt/index.js":"lN+m"}],"h7nC":[function(require,module,exports) { -"use strict";var r=function(r){return function(e){return r===e}};exports.eqBooleanImpl=r,exports.eqIntImpl=r,exports.eqNumberImpl=r,exports.eqCharImpl=r,exports.eqStringImpl=r,exports.eqArrayImpl=function(r){return function(e){return function(t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!r(e[n])(t[n]))return!1;return!0}}}; -},{}],"Pq4F":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),e=require("../Data.Symbol/index.js"),r=require("../Record.Unsafe/index.js"),t=require("../Type.Data.RowList/index.js"),u=function(n){this.eqRecord=n},o=function(n){this.eq1=n},i=function(n){this.eq=n},c=new i(function(n){return function(n){return!0}}),q=new i(function(n){return function(n){return!0}}),f=new i(n.eqStringImpl),a=new u(function(n){return function(n){return function(n){return!0}}}),l=function(n){return n.eqRecord},w=function(n){return function(n){return new i(l(n)(t.RLProxy.value))}},s=new i(n.eqNumberImpl),m=new i(n.eqIntImpl),R=new i(n.eqCharImpl),d=new i(n.eqBooleanImpl),y=function(n){return n.eq1},p=function(n){return n.eq},I=function(e){return new i(n.eqArrayImpl(p(e)))},x=new o(function(n){return p(I(n))}),h=function(n){return function(o){return function(o){return function(i){return new u(function(u){return function(u){return function(c){var q=l(n)(t.RLProxy.value)(u)(c),f=e.reflectSymbol(o)(e.SProxy.value),a=r.unsafeGet(f);return p(i)(a(u))(a(c))&&q}}})}}}},v=function(n){return function(e){return function(r){return p(d)(p(n)(e)(r))(!1)}}},E=function(n){return function(e){return function(r){return function(t){return p(d)(y(n)(e)(r)(t))(!1)}}}};module.exports={Eq:i,eq:p,notEq:v,Eq1:o,eq1:y,notEq1:E,EqRecord:u,eqRecord:l,eqBoolean:d,eqInt:m,eqNumber:s,eqChar:R,eqString:f,eqUnit:q,eqVoid:c,eqArray:I,eqRec:w,eq1Array:x,eqRowNil:a,eqRowCons:h}; -},{"./foreign.js":"h7nC","../Data.Symbol/index.js":"4oJQ","../Record.Unsafe/index.js":"KG04","../Type.Data.RowList/index.js":"XaXP"}],"7fWM":[function(require,module,exports) { -"use strict";exports.boolConj=function(n){return function(o){return n&&o}},exports.boolDisj=function(n){return function(o){return n||o}},exports.boolNot=function(n){return!n}; -},{}],"ukdD":[function(require,module,exports) { -"use strict";var e=function(){function e(){}return e.value=new e,e}();module.exports={RProxy:e}; -},{}],"paZe":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Data.Symbol/index.js"),t=require("../Data.Unit/index.js"),e=require("../Record.Unsafe/index.js"),u=require("../Type.Data.Row/index.js"),o=require("../Type.Data.RowList/index.js"),i=function(n,r,t,e,u,o){this.conjRecord=n,this.disjRecord=r,this.ffRecord=t,this.impliesRecord=e,this.notRecord=u,this.ttRecord=o},c=function(n,r,t,e,u,o){this.conj=n,this.disj=r,this.ff=t,this.implies=e,this.not=u,this.tt=o},f=function(n){return n.ttRecord},a=function(n){return n.tt},l=function(n){return n.notRecord},s=function(n){return n.not},R=function(n){return n.impliesRecord},y=function(n){return n.implies},d=new c(function(n){return function(n){return t.unit}},function(n){return function(n){return t.unit}},t.unit,function(n){return function(n){return t.unit}},function(n){return t.unit},t.unit),v=new i(function(n){return function(n){return function(n){return{}}}},function(n){return function(n){return function(n){return{}}}},function(n){return function(n){return{}}},function(n){return function(n){return function(n){return{}}}},function(n){return function(n){return{}}},function(n){return function(n){return{}}}),x=function(n){return n.ffRecord},j=function(n){return n.ff},P=function(n){return n.disjRecord},S=function(n){return n.disj},b=new c(n.boolConj,n.boolDisj,!1,function(n){return function(r){return S(b)(s(b)(n))(r)}},n.boolNot,!0),h=function(n){return n.conjRecord},g=function(n){return function(n){return new c(h(n)(o.RLProxy.value),P(n)(o.RLProxy.value),x(n)(o.RLProxy.value)(u.RProxy.value),R(n)(o.RLProxy.value),l(n)(o.RLProxy.value),f(n)(o.RLProxy.value)(u.RProxy.value))}},m=function(n){return n.conj},L=function(n){return new c(function(r){return function(t){return function(e){return m(n)(r(e))(t(e))}}},function(r){return function(t){return function(e){return S(n)(r(e))(t(e))}}},function(r){return j(n)},function(r){return function(t){return function(e){return y(n)(r(e))(t(e))}}},function(r){return function(t){return s(n)(r(t))}},function(r){return a(n)})},p=function(n){return function(t){return function(t){return function(u){return new i(function(i){return function(i){return function(c){var f=h(t)(o.RLProxy.value)(i)(c),a=r.reflectSymbol(n)(r.SProxy.value),l=e.unsafeSet(a),s=e.unsafeGet(a);return l(m(u)(s(i))(s(c)))(f)}}},function(i){return function(i){return function(c){var f=P(t)(o.RLProxy.value)(i)(c),a=r.reflectSymbol(n)(r.SProxy.value),l=e.unsafeSet(a),s=e.unsafeGet(a);return l(S(u)(s(i))(s(c)))(f)}}},function(i){return function(i){var c=x(t)(o.RLProxy.value)(i),f=r.reflectSymbol(n)(r.SProxy.value);return e.unsafeSet(f)(j(u))(c)}},function(i){return function(i){return function(c){var f=R(t)(o.RLProxy.value)(i)(c),a=r.reflectSymbol(n)(r.SProxy.value),l=e.unsafeSet(a),s=e.unsafeGet(a);return l(y(u)(s(i))(s(c)))(f)}}},function(i){return function(i){var c=l(t)(o.RLProxy.value)(i),f=r.reflectSymbol(n)(r.SProxy.value),a=e.unsafeSet(f),R=e.unsafeGet(f);return a(s(u)(R(i)))(c)}},function(i){return function(i){var c=f(t)(o.RLProxy.value)(i),l=r.reflectSymbol(n)(r.SProxy.value);return e.unsafeSet(l)(a(u))(c)}})}}}};module.exports={HeytingAlgebra:c,tt:a,ff:j,implies:y,conj:m,disj:S,not:s,HeytingAlgebraRecord:i,ffRecord:x,ttRecord:f,impliesRecord:R,conjRecord:h,disjRecord:P,notRecord:l,heytingAlgebraBoolean:b,heytingAlgebraUnit:d,heytingAlgebraFunction:L,heytingAlgebraRecord:g,heytingAlgebraRecordNil:v,heytingAlgebraRecordCons:p}; -},{"./foreign.js":"7fWM","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Record.Unsafe/index.js":"KG04","../Type.Data.Row/index.js":"ukdD","../Type.Data.RowList/index.js":"XaXP"}],"aHia":[function(require,module,exports) { -"use strict";var r=require("../Control.Applicative/index.js"),e=require("../Control.Plus/index.js"),t=function(r,e){this.Applicative0=r,this.Plus1=e},i=new t(function(){return r.applicativeArray},function(){return e.plusArray});module.exports={Alternative:t,alternativeArray:i}; -},{"../Control.Applicative/index.js":"qYya","../Control.Plus/index.js":"oMBg"}],"lD5R":[function(require,module,exports) { -"use strict";var r=require("../Control.Alternative/index.js"),e=require("../Control.Applicative/index.js"),n=require("../Control.Monad/index.js"),t=require("../Control.Plus/index.js"),i=require("../Data.Unit/index.js"),o=function(r,e){this.Alternative1=r,this.Monad0=e},a=new o(function(){return r.alternativeArray},function(){return n.monadArray}),u=function(r){return function(n){if(n)return e.pure(r.Alternative1().Applicative0())(i.unit);if(!n)return t.empty(r.Alternative1().Plus1());throw new Error("Failed pattern match at Control.MonadZero (line 54, column 1 - line 54, column 52): "+[n.constructor.name])}};module.exports={MonadZero:o,guard:u,monadZeroArray:a}; -},{"../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Monad/index.js":"U/Ix","../Control.Plus/index.js":"oMBg","../Data.Unit/index.js":"NhVk"}],"0C+G":[function(require,module,exports) { -"use strict";exports.topInt=2147483647,exports.bottomInt=-2147483648,exports.topChar=String.fromCharCode(65535),exports.bottomChar=String.fromCharCode(0),exports.topNumber=Number.POSITIVE_INFINITY,exports.bottomNumber=Number.NEGATIVE_INFINITY; -},{}],"m7Aq":[function(require,module,exports) { -"use strict";var r=function(r){return function(n){return function(t){return function(o){return function(e){return o<e?r:o===e?n:t}}}}};exports.ordBooleanImpl=r,exports.ordIntImpl=r,exports.ordNumberImpl=r,exports.ordStringImpl=r,exports.ordCharImpl=r,exports.ordArrayImpl=function(r){return function(n){return function(t){for(var o=0,e=n.length,u=t.length;o<e&&o<u;){var p=n[o],i=t[o],f=r(p)(i);if(0!==f)return f;o++}return e===u?0:e>u?-1:1}}}; -},{}],"5Eun":[function(require,module,exports) { -"use strict";var n=require("../Data.Eq/index.js"),e=require("../Data.Semigroup/index.js"),r=require("../Data.Show/index.js"),t=function(){function n(){}return n.value=new n,n}(),i=function(){function n(){}return n.value=new n,n}(),o=function(){function n(){}return n.value=new n,n}(),u=new r.Show(function(n){if(n instanceof t)return"LT";if(n instanceof i)return"GT";if(n instanceof o)return"EQ";throw new Error("Failed pattern match at Data.Ordering (line 26, column 1 - line 29, column 17): "+[n.constructor.name])}),a=new e.Semigroup(function(n){return function(e){if(n instanceof t)return t.value;if(n instanceof i)return i.value;if(n instanceof o)return e;throw new Error("Failed pattern match at Data.Ordering (line 21, column 1 - line 24, column 18): "+[n.constructor.name,e.constructor.name])}}),c=function(n){if(n instanceof i)return t.value;if(n instanceof o)return o.value;if(n instanceof t)return i.value;throw new Error("Failed pattern match at Data.Ordering (line 33, column 1 - line 33, column 31): "+[n.constructor.name])},f=new n.Eq(function(n){return function(e){return n instanceof t&&e instanceof t||(n instanceof i&&e instanceof i||n instanceof o&&e instanceof o)}});module.exports={LT:t,GT:i,EQ:o,invert:c,eqOrdering:f,semigroupOrdering:a,showOrdering:u}; -},{"../Data.Eq/index.js":"Pq4F","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"+BUG":[function(require,module,exports) { -"use strict";exports.intSub=function(n){return function(t){return n-t|0}},exports.numSub=function(n){return function(t){return n-t}}; -},{}],"Vm8y":[function(require,module,exports) { -"use strict";exports.intAdd=function(n){return function(t){return n+t|0}},exports.intMul=function(n){return function(t){return n*t|0}},exports.numAdd=function(n){return function(t){return n+t}},exports.numMul=function(n){return function(t){return n*t}}; -},{}],"11NF":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Data.Symbol/index.js"),e=require("../Data.Unit/index.js"),u=require("../Record.Unsafe/index.js"),t=require("../Type.Data.Row/index.js"),o=require("../Type.Data.RowList/index.js"),i=function(n,r,e,u){this.addRecord=n,this.mulRecord=r,this.oneRecord=e,this.zeroRecord=u},c=function(n,r,e,u){this.add=n,this.mul=r,this.one=e,this.zero=u},f=function(n){return n.zeroRecord},a=function(n){return n.zero},d=new c(function(n){return function(n){return e.unit}},function(n){return function(n){return e.unit}},e.unit,e.unit),l=new i(function(n){return function(n){return function(n){return{}}}},function(n){return function(n){return function(n){return{}}}},function(n){return function(n){return{}}},function(n){return function(n){return{}}}),s=new c(n.numAdd,n.numMul,1,0),R=new c(n.intAdd,n.intMul,1,0),m=function(n){return n.oneRecord},y=function(n){return n.one},x=function(n){return n.mulRecord},v=function(n){return n.mul},P=function(n){return n.addRecord},S=function(n){return function(n){return new c(P(n)(o.RLProxy.value),x(n)(o.RLProxy.value),m(n)(o.RLProxy.value)(t.RProxy.value),f(n)(o.RLProxy.value)(t.RProxy.value))}},g=function(n){return n.add},w=function(n){return new c(function(r){return function(e){return function(u){return g(n)(r(u))(e(u))}}},function(r){return function(e){return function(u){return v(n)(r(u))(e(u))}}},function(r){return y(n)},function(r){return a(n)})},L=function(n){return function(e){return function(e){return function(c){return new i(function(t){return function(t){return function(i){var f=P(e)(o.RLProxy.value)(t)(i),a=r.reflectSymbol(n)(r.SProxy.value),d=u.unsafeSet(a),l=u.unsafeGet(a);return d(g(c)(l(t))(l(i)))(f)}}},function(t){return function(t){return function(i){var f=x(e)(o.RLProxy.value)(t)(i),a=r.reflectSymbol(n)(r.SProxy.value),d=u.unsafeSet(a),l=u.unsafeGet(a);return d(v(c)(l(t))(l(i)))(f)}}},function(i){return function(i){var f=m(e)(o.RLProxy.value)(t.RProxy.value),a=r.reflectSymbol(n)(r.SProxy.value);return u.unsafeSet(a)(y(c))(f)}},function(i){return function(i){var d=f(e)(o.RLProxy.value)(t.RProxy.value),l=r.reflectSymbol(n)(r.SProxy.value);return u.unsafeSet(l)(a(c))(d)}})}}}};module.exports={Semiring:c,add:g,zero:a,mul:v,one:y,SemiringRecord:i,addRecord:P,mulRecord:x,oneRecord:m,zeroRecord:f,semiringInt:R,semiringNumber:s,semiringFn:w,semiringUnit:d,semiringRecord:S,semiringRecordNil:l,semiringRecordCons:L}; -},{"./foreign.js":"Vm8y","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Record.Unsafe/index.js":"KG04","../Type.Data.Row/index.js":"ukdD","../Type.Data.RowList/index.js":"XaXP"}],"E2qH":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Data.Semiring/index.js"),e=require("../Data.Symbol/index.js"),i=require("../Data.Unit/index.js"),u=require("../Record.Unsafe/index.js"),t=require("../Type.Data.RowList/index.js"),o=function(n,r){this.SemiringRecord0=n,this.subRecord=r},c=function(n,r){this.Semiring0=n,this.sub=r},f=function(n){return n.subRecord},s=function(n){return n.sub},g=new c(function(){return r.semiringUnit},function(n){return function(n){return i.unit}}),m=new o(function(){return r.semiringRecordNil},function(n){return function(n){return function(n){return{}}}}),d=function(n){return function(i){return function(c){return function(g){return new o(function(){return r.semiringRecordCons(n)(i)(c.SemiringRecord0())(g.Semiring0())},function(r){return function(r){return function(i){var o=f(c)(t.RLProxy.value)(r)(i),m=e.reflectSymbol(n)(e.SProxy.value),d=u.unsafeSet(m),R=u.unsafeGet(m);return d(s(g)(R(r))(R(i)))(o)}}})}}}},R=function(n){return function(e){return new c(function(){return r.semiringRecord(n)(e.SemiringRecord0())},f(e)(t.RLProxy.value))}},a=new c(function(){return r.semiringNumber},n.numSub),S=new c(function(){return r.semiringInt},n.intSub),b=function(n){return new c(function(){return r.semiringFn(n.Semiring0())},function(r){return function(e){return function(i){return s(n)(r(i))(e(i))}}})},l=function(n){return function(e){return s(n)(r.zero(n.Semiring0()))(e)}};module.exports={Ring:c,sub:s,negate:l,RingRecord:o,subRecord:f,ringInt:S,ringNumber:a,ringUnit:g,ringFn:b,ringRecord:R,ringRecordNil:m,ringRecordCons:d}; -},{"./foreign.js":"+BUG","../Data.Semiring/index.js":"11NF","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Record.Unsafe/index.js":"KG04","../Type.Data.RowList/index.js":"XaXP"}],"r4Vb":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Data.Eq/index.js"),e=require("../Data.Ordering/index.js"),t=require("../Data.Ring/index.js"),u=require("../Data.Semiring/index.js"),o=require("../Data.Symbol/index.js"),i=require("../Record.Unsafe/index.js"),c=require("../Type.Data.RowList/index.js"),a=function(n,r){this.EqRecord0=n,this.compareRecord=r},f=function(n,r){this.Eq10=n,this.compare1=r},l=function(n,r){this.Eq0=n,this.compare=r},s=new l(function(){return r.eqVoid},function(n){return function(n){return e.EQ.value}}),d=new l(function(){return r.eqUnit},function(n){return function(n){return e.EQ.value}}),m=new l(function(){return r.eqString},n.ordStringImpl(e.LT.value)(e.EQ.value)(e.GT.value)),T=new a(function(){return r.eqRowNil},function(n){return function(n){return function(n){return e.EQ.value}}}),v=new l(function(){return e.eqOrdering},function(n){return function(r){if(n instanceof e.LT&&r instanceof e.LT)return e.EQ.value;if(n instanceof e.EQ&&r instanceof e.EQ)return e.EQ.value;if(n instanceof e.GT&&r instanceof e.GT)return e.EQ.value;if(n instanceof e.LT)return e.LT.value;if(n instanceof e.EQ&&r instanceof e.LT)return e.GT.value;if(n instanceof e.EQ&&r instanceof e.GT)return e.LT.value;if(n instanceof e.GT)return e.GT.value;throw new Error("Failed pattern match at Data.Ord (line 112, column 1 - line 119, column 21): "+[n.constructor.name,r.constructor.name])}}),E=new l(function(){return r.eqNumber},n.ordNumberImpl(e.LT.value)(e.EQ.value)(e.GT.value)),q=new l(function(){return r.eqInt},n.ordIntImpl(e.LT.value)(e.EQ.value)(e.GT.value)),w=new l(function(){return r.eqChar},n.ordCharImpl(e.LT.value)(e.EQ.value)(e.GT.value)),p=new l(function(){return r.eqBoolean},n.ordBooleanImpl(e.LT.value)(e.EQ.value)(e.GT.value)),h=function(n){return n.compareRecord},g=function(n){return function(e){return new l(function(){return r.eqRec(n)(e.EqRecord0())},h(e)(c.RLProxy.value))}},L=function(n){return n.compare1},Q=function(n){return n.compare},G=function(n){return function(r){return function(e){return function(t){return Q(n)(r(e))(r(t))}}}},R=function(n){return function(r){return function(t){return Q(n)(r)(t)instanceof e.GT}}},O=function(n){return function(r){return function(t){return!(Q(n)(r)(t)instanceof e.LT)}}},x=function(n){return function(r){return function(e){return O(n)(e)(u.zero(r.Semiring0()))?u.one(r.Semiring0()):t.negate(r)(u.one(r.Semiring0()))}}},y=function(n){return function(r){return function(t){return Q(n)(r)(t)instanceof e.LT}}},S=function(n){return function(r){return function(t){return!(Q(n)(r)(t)instanceof e.GT)}}},D=function(n){return function(r){return function(t){var u=Q(n)(r)(t);if(u instanceof e.LT)return t;if(u instanceof e.EQ)return r;if(u instanceof e.GT)return r;throw new Error("Failed pattern match at Data.Ord (line 167, column 3 - line 170, column 12): "+[u.constructor.name])}}},I=function(n){return function(r){return function(t){var u=Q(n)(r)(t);if(u instanceof e.LT)return r;if(u instanceof e.EQ)return r;if(u instanceof e.GT)return t;throw new Error("Failed pattern match at Data.Ord (line 158, column 3 - line 161, column 12): "+[u.constructor.name])}}},j=function(t){return new l(function(){return r.eqArray(t.Eq0())},(u=function(n){return function(r){var u=Q(t)(n)(r);if(u instanceof e.EQ)return 0;if(u instanceof e.LT)return 1;if(u instanceof e.GT)return-1;throw new Error("Failed pattern match at Data.Ord (line 65, column 7 - line 68, column 17): "+[u.constructor.name])}},function(r){return function(e){return Q(q)(0)(n.ordArrayImpl(u)(r)(e))}}));var u},b=new f(function(){return r.eq1Array},function(n){return Q(j(n))}),A=function(n){return function(t){return function(u){return function(f){return new a(function(){return r.eqRowCons(n.EqRecord0())(t)(u)(f.Eq0())},function(t){return function(t){return function(a){var l=o.reflectSymbol(u)(o.SProxy.value),s=Q(f)(i.unsafeGet(l)(t))(i.unsafeGet(l)(a));return r.notEq(e.eqOrdering)(s)(e.EQ.value)?s:h(n)(c.RLProxy.value)(t)(a)}}})}}}},C=function(n){return function(r){return function(e){return function(t){return I(n)(e)(D(n)(r)(t))}}}},N=function(n){return function(r){return function(e){return function(t){return!y(n)(t)(r)&&!R(n)(t)(e)}}}},F=function(n){return function(r){return function(e){return O(n)(e)(u.zero(r.Semiring0()))?e:t.negate(r)(e)}}};module.exports={Ord:l,compare:Q,Ord1:f,compare1:L,lessThan:y,lessThanOrEq:S,greaterThan:R,greaterThanOrEq:O,comparing:G,min:I,max:D,clamp:C,between:N,abs:F,signum:x,OrdRecord:a,compareRecord:h,ordBoolean:p,ordInt:q,ordNumber:E,ordString:m,ordChar:w,ordUnit:d,ordVoid:s,ordArray:j,ordOrdering:v,ord1Array:b,ordRecordNil:T,ordRecordCons:A,ordRecord:g}; -},{"./foreign.js":"m7Aq","../Data.Eq/index.js":"Pq4F","../Data.Ordering/index.js":"5Eun","../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF","../Data.Symbol/index.js":"4oJQ","../Record.Unsafe/index.js":"KG04","../Type.Data.RowList/index.js":"XaXP"}],"kcUU":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),t=require("../Data.Ord/index.js"),r=require("../Data.Ordering/index.js"),e=require("../Data.Unit/index.js"),o=function(n,t,r){this.Ord0=n,this.bottom=t,this.top=r},u=function(n){return n.top},d=new o(function(){return t.ordUnit},e.unit,e.unit),i=new o(function(){return t.ordOrdering},r.LT.value,r.GT.value),b=new o(function(){return t.ordNumber},n.bottomNumber,n.topNumber),a=new o(function(){return t.ordInt},n.bottomInt,n.topInt),m=new o(function(){return t.ordChar},n.bottomChar,n.topChar),c=new o(function(){return t.ordBoolean},!1,!0),f=function(n){return n.bottom};module.exports={Bounded:o,bottom:f,top:u,boundedBoolean:c,boundedInt:a,boundedChar:m,boundedOrdering:i,boundedUnit:d,boundedNumber:b}; -},{"./foreign.js":"0C+G","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Unit/index.js":"NhVk"}],"AXkC":[function(require,module,exports) { -"use strict";var n=require("../Data.Functor/index.js"),r=function(n){this.imap=n},t=new r(function(n){return function(r){return function(r){return n(r)}}}),i=new r(function(n){return function(r){return function(t){return function(i){return n(t(r(i)))}}}}),u=new r(function(n){return function(r){return function(r){return n(r)}}}),e=new r(function(n){return function(r){return function(r){return n(r)}}}),o=new r(function(n){return function(r){return function(r){return n(r)}}}),a=new r(function(n){return function(r){return function(r){return n(r)}}}),c=function(r){return function(t){return function(i){return n.map(r)(t)}}},f=new r(c(n.functorArray)),v=new r(c(n.functorFn)),w=function(n){return n.imap};module.exports={imap:w,Invariant:r,imapF:c,invariantFn:v,invariantArray:f,invariantAdditive:a,invariantConj:o,invariantDisj:e,invariantDual:u,invariantEndo:i,invariantMultiplicative:t}; -},{"../Data.Functor/index.js":"+0AE"}],"8EBw":[function(require,module,exports) { -"use strict";exports.intDegree=function(t){return Math.min(Math.abs(t),2147483647)},exports.intDiv=function(t){return function(n){return 0===n?0:n>0?Math.floor(t/n):-Math.floor(t/-n)}},exports.intMod=function(t){return function(n){if(0===n)return 0;var r=Math.abs(n);return(t%r+r)%r}},exports.numDiv=function(t){return function(n){return t/n}}; -},{}],"60TQ":[function(require,module,exports) { -"use strict";var n=require("../Data.Ring/index.js"),t=function(n){this.RingRecord0=n},i=function(n){this.Ring0=n},r=new i(function(){return n.ringUnit}),e=new t(function(){return n.ringRecordNil}),u=function(i){return function(r){return function(e){return function(u){return new t(function(){return n.ringRecordCons(i)(r)(e.RingRecord0())(u.Ring0())})}}}},o=function(t){return function(r){return new i(function(){return n.ringRecord(t)(r.RingRecord0())})}},c=new i(function(){return n.ringNumber}),R=new i(function(){return n.ringInt}),g=function(t){return new i(function(){return n.ringFn(t.Ring0())})};module.exports={CommutativeRing:i,CommutativeRingRecord:t,commutativeRingInt:R,commutativeRingNumber:c,commutativeRingUnit:r,commutativeRingFn:g,commutativeRingRecord:o,commutativeRingRecordNil:e,commutativeRingRecordCons:u}; -},{"../Data.Ring/index.js":"E2qH"}],"2IRB":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),i=require("../Data.CommutativeRing/index.js"),e=require("../Data.Eq/index.js"),t=require("../Data.Semiring/index.js"),r=function(n,i,e,t){this.CommutativeRing0=n,this.degree=i,this.div=e,this.mod=t},u=function(n){return n.mod},o=function(n){return function(i){return function(r){return function(o){var m,g=n,c=i,f=r,a=!1;function d(n,i,r,m){if(e.eq(n)(m)(t.zero(i.CommutativeRing0().Ring0().Semiring0())))return a=!0,r;g=n,c=i,f=m,o=u(i)(r)(m)}for(;!a;)m=d(g,c,f,o);return m}}}},m=new r(function(){return i.commutativeRingNumber},function(n){return 1},n.numDiv,function(n){return function(n){return 0}}),g=new r(function(){return i.commutativeRingInt},n.intDegree,n.intDiv,n.intMod),c=function(n){return n.div},f=function(n){return function(i){return function(r){return function(u){return e.eq(n)(r)(t.zero(i.CommutativeRing0().Ring0().Semiring0()))||e.eq(n)(u)(t.zero(i.CommutativeRing0().Ring0().Semiring0()))?t.zero(i.CommutativeRing0().Ring0().Semiring0()):c(i)(t.mul(i.CommutativeRing0().Ring0().Semiring0())(r)(u))(o(n)(i)(r)(u))}}}},a=function(n){return n.degree};module.exports={EuclideanRing:r,degree:a,div:c,mod:u,gcd:o,lcm:f,euclideanRingInt:g,euclideanRingNumber:m}; -},{"./foreign.js":"8EBw","../Data.CommutativeRing/index.js":"60TQ","../Data.Eq/index.js":"Pq4F","../Data.Semiring/index.js":"11NF"}],"TiEB":[function(require,module,exports) { -"use strict";var n=require("../Data.Boolean/index.js"),r=require("../Data.EuclideanRing/index.js"),e=require("../Data.Ordering/index.js"),i=require("../Data.Semigroup/index.js"),o=require("../Data.Symbol/index.js"),t=require("../Data.Unit/index.js"),u=require("../Record.Unsafe/index.js"),c=require("../Type.Data.RowList/index.js"),d=function(n,r){this.SemigroupRecord0=n,this.memptyRecord=r},m=function(n,r){this.Semigroup0=n,this.mempty=r},a=new m(function(){return i.semigroupUnit},t.unit),f=new m(function(){return i.semigroupString},""),p=new d(function(){return i.semigroupRecordNil},function(n){return{}}),s=new m(function(){return e.semigroupOrdering},e.EQ.value),g=new m(function(){return i.semigroupArray},[]),l=function(n){return n.memptyRecord},R=function(n){return function(r){return new m(function(){return i.semigroupRecord(n)(r.SemigroupRecord0())},l(r)(c.RLProxy.value))}},S=function(n){return n.mempty},w=function(n){return new m(function(){return i.semigroupFn(n.Semigroup0())},function(r){return S(n)})},y=function(n){return function(r){return function(e){return function(t){return new d(function(){return i.semigroupRecordCons(n)(e)(t.SemigroupRecord0())(r.Semigroup0())},function(e){var i=l(t)(c.RLProxy.value),d=o.reflectSymbol(n)(o.SProxy.value);return u.unsafeSet(d)(S(r))(i)})}}}},x=function(e){return function(o){return function t(u){if(u<=0)return S(e);if(1===u)return o;if(0===r.mod(r.euclideanRingInt)(u)(2)){var c=t(r.div(r.euclideanRingInt)(u)(2));return i.append(e.Semigroup0())(c)(c)}if(n.otherwise)return c=t(r.div(r.euclideanRingInt)(u)(2)),i.append(e.Semigroup0())(c)(i.append(e.Semigroup0())(c)(o));throw new Error("Failed pattern match at Data.Monoid (line 65, column 3 - line 65, column 17): "+[u.constructor.name])}}},h=function(n){return function(r){return function(e){if(r)return e;if(!r)return S(n);throw new Error("Failed pattern match at Data.Monoid (line 73, column 1 - line 73, column 49): "+[r.constructor.name,e.constructor.name])}}};module.exports={Monoid:m,mempty:S,power:x,guard:h,MonoidRecord:d,memptyRecord:l,monoidUnit:a,monoidOrdering:s,monoidFn:w,monoidString:f,monoidArray:g,monoidRecord:R,monoidRecordNil:p,monoidRecordCons:y}; -},{"../Data.Boolean/index.js":"ObQr","../Data.EuclideanRing/index.js":"2IRB","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Record.Unsafe/index.js":"KG04","../Type.Data.RowList/index.js":"XaXP"}],"5mN7":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),e=require("../Control.Alternative/index.js"),t=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),u=require("../Control.Bind/index.js"),o=require("../Control.Category/index.js"),i=require("../Control.Extend/index.js"),a=require("../Control.Monad/index.js"),c=require("../Control.MonadZero/index.js"),f=require("../Control.Plus/index.js"),l=require("../Data.Bounded/index.js"),s=require("../Data.Eq/index.js"),d=require("../Data.Function/index.js"),m=require("../Data.Functor/index.js"),w=require("../Data.Functor.Invariant/index.js"),y=require("../Data.Monoid/index.js"),p=require("../Data.Ord/index.js"),v=require("../Data.Ordering/index.js"),M=require("../Data.Semigroup/index.js"),b=require("../Data.Show/index.js"),q=require("../Data.Unit/index.js"),x=function(){function n(){}return n.value=new n,n}(),h=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),j=function(n){return new b.Show(function(e){if(e instanceof h)return"(Just "+b.show(n)(e.value0)+")";if(e instanceof x)return"Nothing";throw new Error("Failed pattern match at Data.Maybe (line 205, column 1 - line 207, column 28): "+[e.constructor.name])})},D=function(n){return new M.Semigroup(function(e){return function(t){if(e instanceof x)return t;if(t instanceof x)return e;if(e instanceof h&&t instanceof h)return new h(M.append(n)(e.value0)(t.value0));throw new Error("Failed pattern match at Data.Maybe (line 174, column 1 - line 177, column 43): "+[e.constructor.name,t.constructor.name])}})},F=function(e){return function(r){return n.alt(e.Plus1().Alt0())(m.map(e.Plus1().Alt0().Functor0())(h.create)(r))(t.pure(e.Applicative0())(x.value))}},E=function(n){return new y.Monoid(function(){return D(n)},x.value)},A=function(n){return function(e){return function(t){if(t instanceof x)return n(q.unit);if(t instanceof h)return e(t.value0);throw new Error("Failed pattern match at Data.Maybe (line 230, column 1 - line 230, column 62): "+[n.constructor.name,e.constructor.name,t.constructor.name])}}},C=function(n){return function(e){return function(t){if(t instanceof x)return n;if(t instanceof h)return e(t.value0);throw new Error("Failed pattern match at Data.Maybe (line 217, column 1 - line 217, column 51): "+[n.constructor.name,e.constructor.name,t.constructor.name])}}},g=C(!0)(d.const(!1)),O=C(!1)(d.const(!0)),B=new m.Functor(function(n){return function(e){return e instanceof h?new h(n(e.value0)):x.value}}),J=new w.Invariant(w.imapF(B)),P=function(n){return A(n)(o.identity(o.categoryFn))},S=function(n){return C(n)(o.identity(o.categoryFn))},N=function(n){return function(n){if(n instanceof h)return n.value0;throw new Error("Failed pattern match at Data.Maybe (line 268, column 1 - line 268, column 46): "+[n.constructor.name])}},Z=new i.Extend(function(){return B},function(n){return function(e){return e instanceof x?x.value:new h(n(e))}}),I=function(n){return new s.Eq(function(e){return function(t){return e instanceof x&&t instanceof x||e instanceof h&&t instanceof h&&s.eq(n)(e.value0)(t.value0)}})},T=function(n){return new p.Ord(function(){return I(n.Eq0())},function(e){return function(t){if(e instanceof x&&t instanceof x)return v.EQ.value;if(e instanceof x)return v.LT.value;if(t instanceof x)return v.GT.value;if(e instanceof h&&t instanceof h)return p.compare(n)(e.value0)(t.value0);throw new Error("Failed pattern match at Data.Maybe (line 194, column 1 - line 194, column 51): "+[e.constructor.name,t.constructor.name])}})},G=new s.Eq1(function(n){return s.eq(I(n))}),L=new p.Ord1(function(){return G},function(n){return p.compare(T(n))}),Q=function(n){return new l.Bounded(function(){return T(n.Ord0())},x.value,new h(l.top(n)))},U=new r.Apply(function(){return B},function(n){return function(e){if(n instanceof h)return m.map(B)(n.value0)(e);if(n instanceof x)return x.value;throw new Error("Failed pattern match at Data.Maybe (line 67, column 1 - line 69, column 30): "+[n.constructor.name,e.constructor.name])}}),k=new u.Bind(function(){return U},function(n){return function(e){if(n instanceof h)return e(n.value0);if(n instanceof x)return x.value;throw new Error("Failed pattern match at Data.Maybe (line 125, column 1 - line 127, column 28): "+[n.constructor.name,e.constructor.name])}}),z=new t.Applicative(function(){return U},h.create),H=new a.Monad(function(){return z},function(){return k}),K=new n.Alt(function(){return B},function(n){return function(e){return n instanceof x?e:n}}),R=new f.Plus(function(){return K},x.value),V=new e.Alternative(function(){return z},function(){return R}),W=new c.MonadZero(function(){return V},function(){return H});module.exports={Nothing:x,Just:h,maybe:C,"maybe'":A,fromMaybe:S,"fromMaybe'":P,isJust:O,isNothing:g,fromJust:N,optional:F,functorMaybe:B,applyMaybe:U,applicativeMaybe:z,altMaybe:K,plusMaybe:R,alternativeMaybe:V,bindMaybe:k,monadMaybe:H,monadZeroMaybe:W,extendMaybe:Z,invariantMaybe:J,semigroupMaybe:D,monoidMaybe:E,eqMaybe:I,eq1Maybe:G,ordMaybe:T,ord1Maybe:L,boundedMaybe:Q,showMaybe:j}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Extend/index.js":"JIoJ","../Control.Monad/index.js":"U/Ix","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Bounded/index.js":"kcUU","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Functor.Invariant/index.js":"AXkC","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Unit/index.js":"NhVk"}],"U/G5":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),e=require("../Control.Bind/index.js"),t=require("../Control.Monad/index.js"),o=require("../Data.Eq/index.js"),u=require("../Data.Functor/index.js"),i=require("../Data.HeytingAlgebra/index.js"),c=require("../Data.Monoid/index.js"),f=require("../Data.Ord/index.js"),j=require("../Data.Semigroup/index.js"),d=require("../Data.Semiring/index.js"),a=require("../Data.Show/index.js"),s=function(n){return n},C=function(n){return new a.Show(function(r){return"(Conj "+a.show(n)(r)+")"})},p=function(n){return new d.Semiring(function(r){return function(e){return i.conj(n)(r)(e)}},function(r){return function(e){return i.disj(n)(r)(e)}},i.ff(n),i.tt(n))},q=function(n){return new j.Semigroup(function(r){return function(e){return i.conj(n)(r)(e)}})},w=function(n){return n},x=function(n){return new c.Monoid(function(){return q(n)},i.tt(n))},l=new u.Functor(function(n){return function(r){return n(r)}}),m=function(n){return n},g=new o.Eq1(function(n){return o.eq(m(n))}),D=new f.Ord1(function(){return g},function(n){return f.compare(w(n))}),S=function(n){return n},A=new r.Apply(function(){return l},function(n){return function(r){return n(r)}}),h=new e.Bind(function(){return A},function(n){return function(r){return r(n)}}),v=new n.Applicative(function(){return A},s),y=new t.Monad(function(){return v},function(){return h});module.exports={Conj:s,eqConj:m,eq1Conj:g,ordConj:w,ord1Conj:D,boundedConj:S,showConj:C,functorConj:l,applyConj:A,applicativeConj:v,bindConj:h,monadConj:y,semigroupConj:q,monoidConj:x,semiringConj:p}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7"}],"9bR7":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),e=require("../Control.Bind/index.js"),i=require("../Control.Monad/index.js"),t=require("../Data.Eq/index.js"),u=require("../Data.Functor/index.js"),o=require("../Data.HeytingAlgebra/index.js"),c=require("../Data.Monoid/index.js"),s=require("../Data.Ord/index.js"),f=require("../Data.Semigroup/index.js"),j=require("../Data.Semiring/index.js"),d=require("../Data.Show/index.js"),a=function(n){return n},D=function(n){return new d.Show(function(r){return"(Disj "+d.show(n)(r)+")"})},p=function(n){return new j.Semiring(function(r){return function(e){return o.disj(n)(r)(e)}},function(r){return function(e){return o.conj(n)(r)(e)}},o.tt(n),o.ff(n))},q=function(n){return new f.Semigroup(function(r){return function(e){return o.disj(n)(r)(e)}})},w=function(n){return n},x=function(n){return new c.Monoid(function(){return q(n)},o.ff(n))},l=new u.Functor(function(n){return function(r){return n(r)}}),m=function(n){return n},g=new t.Eq1(function(n){return t.eq(m(n))}),S=new s.Ord1(function(){return g},function(n){return s.compare(w(n))}),A=function(n){return n},h=new r.Apply(function(){return l},function(n){return function(r){return n(r)}}),v=new e.Bind(function(){return h},function(n){return function(r){return r(n)}}),y=new n.Applicative(function(){return h},a),C=new i.Monad(function(){return y},function(){return v});module.exports={Disj:a,eqDisj:m,eq1Disj:g,ordDisj:w,ord1Disj:S,boundedDisj:A,showDisj:D,functorDisj:l,applyDisj:h,applicativeDisj:y,bindDisj:v,monadDisj:C,semigroupDisj:q,monoidDisj:x,semiringDisj:p}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7"}],"ULyl":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),u=require("../Control.Bind/index.js"),e=require("../Control.Monad/index.js"),t=require("../Data.Eq/index.js"),i=require("../Data.Functor/index.js"),o=require("../Data.Monoid/index.js"),a=require("../Data.Ord/index.js"),c=require("../Data.Semigroup/index.js"),d=require("../Data.Show/index.js"),f=function(n){return n},l=function(n){return new d.Show(function(r){return"(Dual "+d.show(n)(r)+")"})},p=function(n){return new c.Semigroup(function(r){return function(u){return c.append(n)(u)(r)}})},D=function(n){return n},s=function(n){return new o.Monoid(function(){return p(n.Semigroup0())},o.mempty(n))},q=new i.Functor(function(n){return function(r){return n(r)}}),w=function(n){return n},x=new t.Eq1(function(n){return t.eq(w(n))}),j=new a.Ord1(function(){return x},function(n){return a.compare(D(n))}),m=function(n){return n},S=new r.Apply(function(){return q},function(n){return function(r){return n(r)}}),g=new u.Bind(function(){return S},function(n){return function(r){return r(n)}}),h=new n.Applicative(function(){return S},f),v=new e.Monad(function(){return h},function(){return g});module.exports={Dual:f,eqDual:w,eq1Dual:x,ordDual:D,ord1Dual:j,boundedDual:m,showDual:l,functorDual:q,applyDual:S,applicativeDual:h,bindDual:g,monadDual:v,semigroupDual:p,monoidDual:s}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"2o47":[function(require,module,exports) { -"use strict";var n=require("../Control.Category/index.js"),o=require("../Control.Semigroupoid/index.js"),r=require("../Data.Monoid/index.js"),e=require("../Data.Semigroup/index.js"),u=require("../Data.Show/index.js"),i=function(n){return n},t=function(n){return new u.Show(function(o){return"(Endo "+u.show(n)(o)+")"})},d=function(n){return new e.Semigroup(function(r){return function(e){return o.compose(n)(r)(e)}})},c=function(n){return n},s=function(o){return new r.Monoid(function(){return d(o.Semigroupoid0())},n.identity(o))},f=function(n){return n},a=function(n){return n};module.exports={Endo:i,eqEndo:f,ordEndo:c,boundedEndo:a,showEndo:t,semigroupEndo:d,monoidEndo:s}; -},{"../Control.Category/index.js":"IAi2","../Control.Semigroupoid/index.js":"/riR","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"fHyj":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),i=require("../Control.Bind/index.js"),r=require("../Control.Monad/index.js"),t=require("../Data.Eq/index.js"),u=require("../Data.Functor/index.js"),d=require("../Data.Monoid/index.js"),o=require("../Data.Ord/index.js"),c=require("../Data.Semigroup/index.js"),f=require("../Data.Semiring/index.js"),a=require("../Data.Show/index.js"),v=function(n){return n},A=function(n){return new a.Show(function(e){return"(Additive "+a.show(n)(e)+")"})},p=function(n){return new c.Semigroup(function(e){return function(i){return f.add(n)(e)(i)}})},s=function(n){return n},q=function(n){return new d.Monoid(function(){return p(n)},f.zero(n))},w=new u.Functor(function(n){return function(e){return n(e)}}),x=function(n){return n},j=new t.Eq1(function(n){return t.eq(x(n))}),l=new o.Ord1(function(){return j},function(n){return o.compare(s(n))}),m=function(n){return n},D=new e.Apply(function(){return w},function(n){return function(e){return n(e)}}),S=new i.Bind(function(){return D},function(n){return function(e){return e(n)}}),g=new n.Applicative(function(){return D},v),h=new r.Monad(function(){return g},function(){return S});module.exports={Additive:v,eqAdditive:x,eq1Additive:j,ordAdditive:s,ord1Additive:l,boundedAdditive:m,showAdditive:A,functorAdditive:w,applyAdditive:D,applicativeAdditive:g,bindAdditive:S,monadAdditive:h,semigroupAdditive:p,monoidAdditive:q}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7"}],"y5cd":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),i=require("../Control.Apply/index.js"),t=require("../Control.Bind/index.js"),e=require("../Control.Monad/index.js"),r=require("../Data.Eq/index.js"),u=require("../Data.Functor/index.js"),o=require("../Data.Monoid/index.js"),c=require("../Data.Ord/index.js"),l=require("../Data.Semigroup/index.js"),a=require("../Data.Semiring/index.js"),p=require("../Data.Show/index.js"),d=function(n){return n},f=function(n){return new p.Show(function(i){return"(Multiplicative "+p.show(n)(i)+")"})},v=function(n){return new l.Semigroup(function(i){return function(t){return a.mul(n)(i)(t)}})},M=function(n){return n},s=function(n){return new o.Monoid(function(){return v(n)},a.one(n))},q=new u.Functor(function(n){return function(i){return n(i)}}),w=function(n){return n},x=new r.Eq1(function(n){return r.eq(w(n))}),j=new c.Ord1(function(){return x},function(n){return c.compare(M(n))}),m=function(n){return n},D=new i.Apply(function(){return q},function(n){return function(i){return n(i)}}),S=new t.Bind(function(){return D},function(n){return function(i){return i(n)}}),g=new n.Applicative(function(){return D},d),h=new e.Monad(function(){return g},function(){return S});module.exports={Multiplicative:d,eqMultiplicative:w,eq1Multiplicative:x,ordMultiplicative:M,ord1Multiplicative:j,boundedMultiplicative:m,showMultiplicative:f,functorMultiplicative:q,applyMultiplicative:D,applicativeMultiplicative:g,bindMultiplicative:S,monadMultiplicative:h,semigroupMultiplicative:v,monoidMultiplicative:s}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7"}],"aRYH":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),t=require("../Control.Bind/index.js"),e=require("../Control.Monad/index.js"),i=require("../Data.Eq/index.js"),u=require("../Data.Functor/index.js"),o=require("../Data.Ord/index.js"),c=require("../Data.Semigroup/index.js"),s=require("../Data.Show/index.js"),f=function(n){return n},d=function(n){return new s.Show(function(r){return"(First "+s.show(n)(r)+")"})},a=new c.Semigroup(function(n){return function(r){return n}}),p=function(n){return n},F=new u.Functor(function(n){return function(r){return n(r)}}),q=function(n){return n},w=new i.Eq1(function(n){return i.eq(q(n))}),l=new o.Ord1(function(){return w},function(n){return o.compare(p(n))}),x=function(n){return n},j=new r.Apply(function(){return F},function(n){return function(r){return n(r)}}),m=new t.Bind(function(){return j},function(n){return function(r){return r(n)}}),D=new n.Applicative(function(){return j},f),h=new e.Monad(function(){return D},function(){return m});module.exports={First:f,eqFirst:q,eq1First:w,ordFirst:p,ord1First:l,boundedFirst:x,showFirst:d,functorFirst:F,applyFirst:j,applicativeFirst:D,bindFirst:m,monadFirst:h,semigroupFirst:a}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"mI/Z":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),t=require("../Control.Bind/index.js"),e=require("../Control.Monad/index.js"),u=require("../Data.Eq/index.js"),i=require("../Data.Functor/index.js"),o=require("../Data.Ord/index.js"),a=require("../Data.Semigroup/index.js"),c=require("../Data.Show/index.js"),s=function(n){return n},f=function(n){return new c.Show(function(r){return"(Last "+c.show(n)(r)+")"})},d=new a.Semigroup(function(n){return function(n){return n}}),p=function(n){return n},q=new i.Functor(function(n){return function(r){return n(r)}}),L=function(n){return n},w=new u.Eq1(function(n){return u.eq(L(n))}),l=new o.Ord1(function(){return w},function(n){return o.compare(p(n))}),x=function(n){return n},j=new r.Apply(function(){return q},function(n){return function(r){return n(r)}}),m=new t.Bind(function(){return j},function(n){return function(r){return r(n)}}),D=new n.Applicative(function(){return j},s),h=new e.Monad(function(){return D},function(){return m});module.exports={Last:s,eqLast:L,eq1Last:w,ordLast:p,ord1Last:l,boundedLast:x,showLast:f,functorLast:q,applyLast:j,applicativeLast:D,bindLast:m,monadLast:h,semigroupLast:d}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"lz8k":[function(require,module,exports) { -"use strict";var n=require("../Control.Semigroupoid/index.js"),r=require("../Data.Function/index.js"),t=require("../Data.Functor/index.js"),u=require("../Data.Monoid.Additive/index.js"),e=require("../Data.Monoid.Conj/index.js"),i=require("../Data.Monoid.Disj/index.js"),o=require("../Data.Monoid.Dual/index.js"),c=require("../Data.Monoid.Endo/index.js"),f=require("../Data.Monoid.Multiplicative/index.js"),a=require("../Data.Semigroup.First/index.js"),p=require("../Data.Semigroup.Last/index.js"),d=function(n,r){this.unwrap=n,this.wrap=r},s=function(n){return n.wrap},m=function(n){return n.unwrap},v=function(u){return function(e){return function(i){return function(o){return function(c){return function(c){var f=n.compose(n.semigroupoidFn)(t.map(e)(m(o))),a=r.on(c)(t.map(u)(s(i)));return function(n){return f(a(n))}}}}}}},w=function(n){return function(r){return function(u){return function(e){return function(i){return function(i){var o=t.map(r)(m(e)),c=t.map(n)(s(u));return function(n){return o(i(c(n)))}}}}}}},j=function(t){return function(u){return function(e){return function(e){var i=n.compose(n.semigroupoidFn)(m(u)),o=r.on(e)(s(t));return function(n){return i(o(n))}}}}},D=function(n){return function(r){return function(t){return function(t){var u=m(r),e=s(n);return function(n){return u(t(e(n)))}}}}},l=function(n){return function(r){return m(n)}},F=function(n){return function(r){return function(u){return function(u){var e=t.map(n)(s(r)),i=m(r);return function(n){return e(u(i(n)))}}}}},x=function(u){return function(e){return function(i){return function(o){return function(c){return function(c){var f=n.compose(n.semigroupoidFn)(t.map(e)(s(o))),a=r.on(c)(t.map(u)(m(i)));return function(n){return f(a(n))}}}}}}},q=function(n){return function(r){return function(u){return function(e){return function(i){return function(i){var o=t.map(r)(s(e)),c=t.map(n)(m(u));return function(n){return o(i(c(n)))}}}}}}},y=function(t){return function(u){return function(e){return function(e){var i=n.compose(n.semigroupoidFn)(s(u)),o=r.on(e)(m(t));return function(n){return i(o(n))}}}}},M=function(n){return function(r){return function(t){return function(t){var u=s(r),e=m(n);return function(n){return u(t(e(n)))}}}}},g=function(n){return l(n)},C=new d(function(n){return n},f.Multiplicative),A=new d(function(n){return n},p.Last),E=new d(function(n){return n},a.First),L=new d(function(n){return n},c.Endo),S=new d(function(n){return n},o.Dual),h=new d(function(n){return n},i.Disj),N=new d(function(n){return n},e.Conj),b=new d(function(n){return n},u.Additive),k=function(n){return function(r){return function(u){return function(u){var e=s(r),i=t.map(n)(m(r));return function(n){return e(u(i(n)))}}}}},z=function(n){return function(r){return function(u){return function(e){return function(i){return function(i){var o=t.map(r)(m(e)),c=t.map(n)(s(u));return function(n){return o(i(c(n)))}}}}}}},B=function(n){return function(r){return function(u){return function(e){return function(e){return t.map(n)(m(r))(e(s(u)))}}}}};module.exports={unwrap:m,wrap:s,Newtype:d,un:l,op:g,ala:B,alaF:z,over:M,overF:q,under:D,underF:w,over2:y,overF2:x,under2:j,underF2:v,traverse:F,collect:k,newtypeAdditive:b,newtypeMultiplicative:C,newtypeConj:N,newtypeDisj:h,newtypeDual:S,newtypeEndo:L,newtypeFirst:E,newtypeLast:A}; -},{"../Control.Semigroupoid/index.js":"/riR","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Monoid.Additive/index.js":"fHyj","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Endo/index.js":"2o47","../Data.Monoid.Multiplicative/index.js":"y5cd","../Data.Semigroup.First/index.js":"aRYH","../Data.Semigroup.Last/index.js":"mI/Z"}],"eVDl":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),t=require("../Control.Alt/index.js"),r=require("../Control.Applicative/index.js"),u=require("../Control.Apply/index.js"),e=require("../Control.Bind/index.js"),o=require("../Control.Category/index.js"),i=require("../Control.Plus/index.js"),c=require("../Data.Eq/index.js"),f=require("../Data.Function/index.js"),a=require("../Data.Functor/index.js"),l=require("../Data.HeytingAlgebra/index.js"),d=require("../Data.Maybe/index.js"),s=require("../Data.Monoid/index.js"),p=require("../Data.Monoid.Conj/index.js"),m=require("../Data.Monoid.Disj/index.js"),y=require("../Data.Monoid.Dual/index.js"),g=require("../Data.Monoid.Endo/index.js"),w=require("../Data.Newtype/index.js"),D=require("../Data.Ord/index.js"),j=require("../Data.Ordering/index.js"),q=require("../Data.Semigroup/index.js"),h=require("../Data.Semiring/index.js"),v=require("../Data.Unit/index.js"),F=function(n,t,r){this.foldMap=n,this.foldl=t,this.foldr=r},x=function(n){return n.foldr},b=function(n){return function(t){var r=x(n)(function(n){return function(r){return r.elem instanceof d.Just?r:r.pos===t?{elem:new d.Just(n),pos:r.pos}:{pos:r.pos+1|0,elem:r.elem}}})({elem:d.Nothing.value,pos:0});return function(n){return r(n).elem}}},M=function(n){return x(n)(function(n){return function(n){return!1}})(!0)},E=function(n){return function(r){return x(n)(t.alt(r.Alt0()))(i.empty(r))}},A=function(n){return function(r){return function(u){return x(n)((e=t.alt(r.Alt0()),function(n){return e(u(n))}))(i.empty(r));var e}}},J=function(n){return function(t){return function(e){return x(t)((o=u.applySecond(n.Apply0()),function(n){return o(e(n))}))(r.pure(n)(v.unit));var o}}},N=function(n){return function(t){return f.flip(J(n)(t))}},C=function(n){return function(t){return J(n)(t)(o.identity(o.categoryFn))}},S=function(n){return n.foldl},B=function(n){return function(t){var r=S(n)(function(n){return function(r){return n.elem instanceof d.Just?n:n.pos===t?{elem:new d.Just(r),pos:n.pos}:{pos:n.pos+1|0,elem:n.elem}}})({elem:d.Nothing.value,pos:0});return function(n){return r(n).elem}}},O=function(n){return function(t){return function(r){return function(u){return S(n)(function(n){return function(u){return n.init?{init:!1,acc:u}:{init:!1,acc:q.append(t.Semigroup0())(n.acc)(q.append(t.Semigroup0())(r)(u))}}})({init:!0,acc:s.mempty(t)})(u).acc}}}},L=function(n){return function(t){return S(n)(function(n){return function(r){return h.add(t)(h.one(t))(n)}})(h.zero(t))}},_=function(n){return function(t){return S(n)(function(n){return function(r){if(n instanceof d.Nothing)return new d.Just(r);if(n instanceof d.Just)return new d.Just(c.eq(j.eqOrdering)(t(n.value0)(r))(j.GT.value)?n.value0:r);throw new Error("Failed pattern match at Data.Foldable (line 389, column 3 - line 389, column 27): "+[n.constructor.name,r.constructor.name])}})(d.Nothing.value)}},z=function(n){return function(t){return _(t)(D.compare(n))}},T=function(n){return function(t){return S(n)(function(n){return function(r){if(n instanceof d.Nothing)return new d.Just(r);if(n instanceof d.Just)return new d.Just(c.eq(j.eqOrdering)(t(n.value0)(r))(j.LT.value)?n.value0:r);throw new Error("Failed pattern match at Data.Foldable (line 402, column 3 - line 402, column 27): "+[n.constructor.name,r.constructor.name])}})(d.Nothing.value)}},G=function(n){return function(t){return T(t)(D.compare(n))}},H=function(n){return function(t){return S(n)(h.mul(t))(h.one(t))}},P=function(n){return function(t){return S(n)(h.add(t))(h.zero(t))}},R=new F(function(n){return function(n){return function(t){return n(t)}}},function(n){return function(t){return function(r){return n(t)(r)}}},function(n){return function(t){return function(r){return n(r)(t)}}}),U=new F(function(n){return function(t){return function(r){if(r instanceof d.Nothing)return s.mempty(n);if(r instanceof d.Just)return t(r.value0);throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): "+[t.constructor.name,r.constructor.name])}}},function(n){return function(t){return function(r){if(r instanceof d.Nothing)return t;if(r instanceof d.Just)return n(t)(r.value0);throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): "+[n.constructor.name,t.constructor.name,r.constructor.name])}}},function(n){return function(t){return function(r){if(r instanceof d.Nothing)return t;if(r instanceof d.Just)return n(r.value0)(t);throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): "+[n.constructor.name,t.constructor.name,r.constructor.name])}}}),k=new F(function(n){return function(n){return function(t){return n(t)}}},function(n){return function(t){return function(r){return n(t)(r)}}},function(n){return function(t){return function(r){return n(r)(t)}}}),I=new F(function(n){return function(n){return function(t){return n(t)}}},function(n){return function(t){return function(r){return n(t)(r)}}},function(n){return function(t){return function(r){return n(r)(t)}}}),K=new F(function(n){return function(n){return function(t){return n(t)}}},function(n){return function(t){return function(r){return n(t)(r)}}},function(n){return function(t){return function(r){return n(r)(t)}}}),Q=new F(function(n){return function(n){return function(t){return n(t)}}},function(n){return function(t){return function(r){return n(t)(r)}}},function(n){return function(t){return function(r){return n(r)(t)}}}),V=function(n){return function(t){return function(r){return x(n)(function(n){return function(u){return q.append(t.Semigroup0())(r(n))(u)}})(s.mempty(t))}}},W=new F(function(n){return V(W)(n)},n.foldlArray,n.foldrArray),X=function(n){return function(t){return function(r){return S(n)(function(n){return function(u){return q.append(t.Semigroup0())(n)(r(u))}})(s.mempty(t))}}},Y=function(n){return n.foldMap},Z=new F(function(n){return function(t){return function(r){return Y(U)(n)(t)(r)}}},function(n){return function(t){return function(r){return S(U)(n)(t)(r)}}},function(n){return function(t){return function(r){return x(U)(n)(t)(r)}}}),$=new F(function(n){return function(t){return function(r){return Y(U)(n)(t)(r)}}},function(n){return function(t){return function(r){return S(U)(n)(t)(r)}}},function(n){return function(t){return function(r){return x(U)(n)(t)(r)}}}),nn=function(n){return function(t){return function(r){return function(u){return w.unwrap(w.newtypeEndo)(w.unwrap(w.newtypeDual)(Y(n)(y.monoidDual(g.monoidEndo(o.categoryFn)))((e=f.flip(t),function(n){return y.Dual(g.Endo(e(n)))}))(u)))(r);var e}}}},tn=function(n){return function(t){return function(r){return function(u){return w.unwrap(w.newtypeEndo)(Y(n)(g.monoidEndo(o.categoryFn))(function(n){return g.Endo(t(n))})(u))(r)}}}},rn=function(n){return function(t){return function(r){return function(u){return function(e){return w.unwrap(w.newtypeEndo)(Y(n)(g.monoidEndo(o.categoryFn))(function(n){return function(e){return q.append(t)(r)(q.append(t)(u(n))(e))}})(e))(r)}}}}},un=function(n){return function(t){return function(r){return rn(n)(t)(r)(o.identity(o.categoryFn))}}},en=function(n){return function(t){return function(u){return function(o){return S(n)(function(n){return function(r){return e.bind(t.Bind1())(n)(f.flip(u)(r))}})(r.pure(t.Applicative0())(o))}}}},on=function(n){return function(t){return Y(n)(t)(o.identity(o.categoryFn))}},cn=function(n){return function(t){return S(n)(function(n){return function(r){return n instanceof d.Nothing?t(r):n}})(d.Nothing.value)}},fn=function(n){return function(t){return S(n)(function(n){return function(r){return n instanceof d.Nothing&&t(r)?new d.Just(r):n}})(d.Nothing.value)}},an=function(n){return function(t){return w.alaF(a.functorFn)(a.functorFn)(w.newtypeDisj)(w.newtypeDisj)(m.Disj)(Y(n)(m.monoidDisj(t)))}},ln=function(n){return function(t){var r=an(n)(l.heytingAlgebraBoolean),u=c.eq(t);return function(n){return r(u(n))}}},dn=function(n){return function(t){return function(r){var u=l.not(l.heytingAlgebraBoolean),e=ln(n)(t)(r);return function(n){return u(e(n))}}}},sn=function(n){return function(t){return an(n)(t)(o.identity(o.categoryFn))}},pn=function(n){return function(t){return w.alaF(a.functorFn)(a.functorFn)(w.newtypeConj)(w.newtypeConj)(p.Conj)(Y(n)(p.monoidConj(t)))}},mn=function(n){return function(t){return pn(n)(t)(o.identity(o.categoryFn))}};module.exports={Foldable:F,foldr:x,foldl:S,foldMap:Y,foldrDefault:tn,foldlDefault:nn,foldMapDefaultL:X,foldMapDefaultR:V,fold:on,foldM:en,traverse_:J,for_:N,sequence_:C,oneOf:E,oneOfMap:A,intercalate:O,surroundMap:rn,surround:un,and:mn,or:sn,all:pn,any:an,sum:P,product:H,elem:ln,notElem:dn,indexl:B,indexr:b,find:fn,findMap:cn,maximum:z,maximumBy:_,minimum:G,minimumBy:T,null:M,length:L,foldableArray:W,foldableMaybe:U,foldableFirst:Z,foldableLast:$,foldableAdditive:Q,foldableDual:k,foldableDisj:I,foldableConj:K,foldableMultiplicative:R}; -},{"./foreign.js":"kY6E","../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Plus/index.js":"oMBg","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Endo/index.js":"2o47","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Unit/index.js":"NhVk"}],"wjQo":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),t=require("../Control.Category/index.js"),u=require("../Data.Foldable/index.js"),e=require("../Data.Function/index.js"),i=require("../Data.Monoid/index.js"),o=require("../Data.Monoid.Conj/index.js"),f=require("../Data.Monoid.Disj/index.js"),c=require("../Data.Monoid.Dual/index.js"),a=require("../Data.Monoid.Endo/index.js"),d=require("../Data.Newtype/index.js"),l=require("../Data.Semigroup/index.js"),p=require("../Data.Unit/index.js"),b=function(n,r,t){this.bifoldMap=n,this.bifoldl=r,this.bifoldr=t},y=function(n){return n.bifoldr},s=function(t){return function(u){return function(e){return function(i){return y(t)((f=r.applySecond(u.Apply0()),function(n){return f(e(n))}))((o=r.applySecond(u.Apply0()),function(n){return o(i(n))}))(n.pure(u)(p.unit));var o,f}}}},D=function(n){return function(r){return function(t){return function(u){return function(e){return s(n)(r)(u)(e)(t)}}}}},j=function(n){return function(r){return s(n)(r)(t.identity(t.categoryFn))(t.identity(t.categoryFn))}},g=function(n){return n.bifoldl},w=function(n){return new b(function(r){return function(t){return function(t){return function(e){return u.foldMap(n)(r)(t)(e)}}}},function(r){return function(r){return function(t){return function(e){return u.foldl(n)(r)(t)(e)}}}},function(r){return function(r){return function(t){return function(e){return u.foldr(n)(r)(t)(e)}}}})},m=function(n){return new b(function(r){return function(t){return function(e){return function(e){return u.foldMap(n)(r)(t)(e)}}}},function(r){return function(t){return function(t){return function(e){return u.foldl(n)(r)(t)(e)}}}},function(r){return function(t){return function(t){return function(e){return u.foldr(n)(r)(t)(e)}}}})},q=function(n){return function(r){return function(t){return function(u){return y(n)((o=l.append(r.Semigroup0()),function(n){return o(t(n))}))((e=l.append(r.Semigroup0()),function(n){return e(u(n))}))(i.mempty(r));var e,o}}}},x=function(n){return function(r){return function(t){return function(u){return g(n)(function(n){return function(u){return l.append(r.Semigroup0())(n)(t(u))}})(function(n){return function(t){return l.append(r.Semigroup0())(n)(u(t))}})(i.mempty(r))}}}},M=function(n){return n.bifoldMap},v=function(n){return new b(function(r){return function(t){return function(u){return function(e){return M(n)(r)(u)(t)(e)}}}},function(r){return function(t){return function(u){return function(e){return g(n)(t)(r)(u)(e)}}}},function(r){return function(t){return function(u){return function(e){return y(n)(t)(r)(u)(e)}}}})},C=function(n){return new b(function(r){return function(t){return function(u){return function(e){return M(n)(r)(t)(u)(e)}}}},function(r){return function(t){return function(u){return function(e){return g(n)(r)(t)(u)(e)}}}},function(r){return function(t){return function(u){return function(e){return y(n)(r)(t)(u)(e)}}}})},E=function(n){return function(r){return function(u){return function(i){return function(o){return d.unwrap(d.newtypeEndo)(d.unwrap(d.newtypeDual)(M(n)(c.monoidDual(a.monoidEndo(t.categoryFn)))((l=e.flip(r),function(n){return c.Dual(a.Endo(l(n)))}))((f=e.flip(u),function(n){return c.Dual(a.Endo(f(n)))}))(o)))(i);var f,l}}}}},F=function(n){return function(r){return function(u){return function(e){return function(i){return d.unwrap(d.newtypeEndo)(M(n)(a.monoidEndo(t.categoryFn))(function(n){return a.Endo(r(n))})(function(n){return a.Endo(u(n))})(i))(e)}}}}},S=function n(r){return function(t){return new b(function(n){return function(u){return function(e){return function(i){return l.append(n.Semigroup0())(M(r)(n)(u)(e)(i.value0))(M(t)(n)(u)(e)(i.value1))}}}},function(u){return function(e){return function(i){return function(o){return E(n(r)(t))(u)(e)(i)(o)}}}},function(u){return function(e){return function(i){return function(o){return F(n(r)(t))(u)(e)(i)(o)}}}})}},A=function(n){return function(r){return M(n)(r)(t.identity(t.categoryFn))(t.identity(t.categoryFn))}},h=function(n){return function(r){return function(t){return function(u){var e=d.unwrap(d.newtypeDisj),i=M(n)(f.monoidDisj(r.HeytingAlgebra0()))(function(n){return f.Disj(t(n))})(function(n){return f.Disj(u(n))});return function(n){return e(i(n))}}}}},_=function(n){return function(r){return function(t){return function(u){var e=d.unwrap(d.newtypeConj),i=M(n)(o.monoidConj(r.HeytingAlgebra0()))(function(n){return o.Conj(t(n))})(function(n){return o.Conj(u(n))});return function(n){return e(i(n))}}}}};module.exports={bifoldMap:M,bifoldl:g,bifoldr:y,Bifoldable:b,bifoldrDefault:F,bifoldlDefault:E,bifoldMapDefaultR:q,bifoldMapDefaultL:x,bifold:A,bitraverse_:s,bifor_:D,bisequence_:j,biany:h,biall:_,bifoldableClown:m,bifoldableJoker:w,bifoldableFlip:v,bifoldableProduct:S,bifoldableWrap:C}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Monoid/index.js":"TiEB","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Endo/index.js":"2o47","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Unit/index.js":"NhVk"}],"Sd0N":[function(require,module,exports) { -"use strict";var i=function(i,t){this.Biapply0=i,this.bipure=t},t=function(i){return i.bipure};module.exports={bipure:t,Biapplicative:i}; -},{}],"X0ga":[function(require,module,exports) { -"use strict";var n=require("../Control.Category/index.js"),t=require("../Data.Bifunctor/index.js"),i=require("../Data.Function/index.js"),r=function(n,t){this.Bifunctor0=n,this.biapply=t},u=function(n){return n.biapply},e=function(r){return function(e){return function(o){return u(r)(n.identity(n.categoryFn)(t.bimap(r.Bifunctor0())(i.const(n.identity(n.categoryFn)))(i.const(n.identity(n.categoryFn))))(e))(o)}}},o=function(r){return function(e){return function(o){return u(r)(n.identity(n.categoryFn)(t.bimap(r.Bifunctor0())(i.const)(i.const))(e))(o)}}},c=function(i){return function(r){return function(e){return function(o){return function(c){return u(i)(n.identity(n.categoryFn)(t.bimap(i.Bifunctor0())(r)(e))(o))(c)}}}}},f=function(i){return function(r){return function(e){return function(o){return function(c){return function(f){return u(i)(u(i)(n.identity(n.categoryFn)(t.bimap(i.Bifunctor0())(r)(e))(o))(c))(f)}}}}}};module.exports={biapply:u,Biapply:r,biapplyFirst:e,biapplySecond:o,bilift2:c,bilift3:f}; -},{"../Control.Category/index.js":"IAi2","../Data.Bifunctor/index.js":"e2Wc","../Data.Function/index.js":"ImXJ"}],"Wuz6":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),e=require("../Control.Biapplicative/index.js"),t=require("../Control.Biapply/index.js"),u=require("../Data.Bifunctor/index.js"),i=require("../Data.Functor/index.js"),o=require("../Data.Newtype/index.js"),c=require("../Data.Show/index.js"),p=function(n){return n},l=function(n){return new c.Show(function(r){return"(Clown "+c.show(n)(r)+")"})},f=function(n){return n},w=new o.Newtype(function(n){return n},p),a=new i.Functor(function(n){return function(n){return n}}),C=function(n){return n},s=function(n){return new u.Bifunctor(function(r){return function(e){return function(e){return i.map(n)(r)(e)}}})},d=function(n){return new t.Biapply(function(){return s(n.Functor0())},function(e){return function(t){return r.apply(n)(e)(t)}})},q=function(r){return new e.Biapplicative(function(){return d(r.Apply0())},function(e){return function(t){return n.pure(r)(e)}})};module.exports={Clown:p,newtypeClown:w,eqClown:C,ordClown:f,showClown:l,functorClown:a,bifunctorClown:s,biapplyClown:d,biapplicativeClown:q}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Biapplicative/index.js":"Sd0N","../Control.Biapply/index.js":"X0ga","../Data.Bifunctor/index.js":"e2Wc","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Show/index.js":"mFY7"}],"EM73":[function(require,module,exports) { -"use strict";var n=require("../Control.Biapplicative/index.js"),r=require("../Control.Biapply/index.js"),i=require("../Data.Bifunctor/index.js"),t=require("../Data.Functor/index.js"),e=require("../Data.Newtype/index.js"),u=require("../Data.Show/index.js"),o=function(n){return n},p=function(n){return new u.Show(function(r){return"(Flip "+u.show(n)(r)+")"})},c=function(n){return n},f=new e.Newtype(function(n){return n},o),a=function(n){return new t.Functor(function(r){return function(t){return i.lmap(n)(r)(t)}})},l=function(n){return n},w=function(n){return new i.Bifunctor(function(r){return function(t){return function(e){return i.bimap(n)(t)(r)(e)}}})},F=function(n){return new r.Biapply(function(){return w(n.Bifunctor0())},function(i){return function(t){return r.biapply(n)(i)(t)}})},s=function(r){return new n.Biapplicative(function(){return F(r.Biapply0())},function(i){return function(t){return n.bipure(r)(t)(i)}})};module.exports={Flip:o,newtypeFlip:f,eqFlip:l,ordFlip:c,showFlip:p,functorFlip:a,bifunctorFlip:w,biapplyFlip:F,biapplicativeFlip:s}; -},{"../Control.Biapplicative/index.js":"Sd0N","../Control.Biapply/index.js":"X0ga","../Data.Bifunctor/index.js":"e2Wc","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Show/index.js":"mFY7"}],"O/Oh":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),e=require("../Control.Biapplicative/index.js"),t=require("../Control.Biapply/index.js"),u=require("../Data.Bifunctor/index.js"),i=require("../Data.Functor/index.js"),o=require("../Data.Newtype/index.js"),c=require("../Data.Show/index.js"),p=function(n){return n},f=function(n){return new c.Show(function(r){return"(Joker "+c.show(n)(r)+")"})},a=function(n){return n},l=new o.Newtype(function(n){return n},p),s=function(n){return new i.Functor(function(r){return function(e){return i.map(n)(r)(e)}})},w=function(n){return n},d=function(n){return new u.Bifunctor(function(r){return function(r){return function(e){return i.map(n)(r)(e)}}})},k=function(n){return new t.Biapply(function(){return d(n.Functor0())},function(e){return function(t){return r.apply(n)(e)(t)}})},J=function(r){return new e.Biapplicative(function(){return k(r.Apply0())},function(e){return function(e){return n.pure(r)(e)}})};module.exports={Joker:p,newtypeJoker:l,eqJoker:w,ordJoker:a,showJoker:f,functorJoker:s,bifunctorJoker:d,biapplyJoker:k,biapplicativeJoker:J}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Biapplicative/index.js":"Sd0N","../Control.Biapply/index.js":"X0ga","../Data.Bifunctor/index.js":"e2Wc","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Show/index.js":"mFY7"}],"U+97":[function(require,module,exports) { -"use strict";var n=require("../Control.Biapplicative/index.js"),u=require("../Control.Biapply/index.js"),r=require("../Data.Bifunctor/index.js"),e=require("../Data.Eq/index.js"),t=require("../Data.Ord/index.js"),i=require("../Data.Ordering/index.js"),o=require("../Data.Show/index.js"),c=function(){function n(n,u){this.value0=n,this.value1=u}return n.create=function(u){return function(r){return new n(u,r)}},n}(),a=function(n){return function(u){return new o.Show(function(r){return"(Product "+o.show(n)(r.value0)+" "+o.show(u)(r.value1)+")"})}},f=function(n){return function(u){return new e.Eq(function(r){return function(t){return e.eq(n)(r.value0)(t.value0)&&e.eq(u)(r.value1)(t.value1)}})}},l=function(n){return function(u){return new t.Ord(function(){return f(n.Eq0())(u.Eq0())},function(r){return function(e){var o=t.compare(n)(r.value0)(e.value0);return o instanceof i.LT?i.LT.value:o instanceof i.GT?i.GT.value:t.compare(u)(r.value1)(e.value1)}})}},p=function(n){return function(u){return new r.Bifunctor(function(e){return function(t){return function(i){return new c(r.bimap(n)(e)(t)(i.value0),r.bimap(u)(e)(t)(i.value1))}}})}},v=function(n){return function(r){return new u.Biapply(function(){return p(n.Bifunctor0())(r.Bifunctor0())},function(e){return function(t){return new c(u.biapply(n)(e.value0)(t.value0),u.biapply(r)(e.value1)(t.value1))}})}},d=function(u){return function(r){return new n.Biapplicative(function(){return v(u.Biapply0())(r.Biapply0())},function(e){return function(t){return new c(n.bipure(u)(e)(t),n.bipure(r)(e)(t))}})}};module.exports={Product:c,eqProduct:f,ordProduct:l,showProduct:a,bifunctorProduct:p,biapplyProduct:v,biapplicativeProduct:d}; -},{"../Control.Biapplicative/index.js":"Sd0N","../Control.Biapply/index.js":"X0ga","../Data.Bifunctor/index.js":"e2Wc","../Data.Eq/index.js":"Pq4F","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7"}],"U78Q":[function(require,module,exports) { -"use strict";var n=require("../Control.Biapplicative/index.js"),r=require("../Control.Biapply/index.js"),t=require("../Data.Bifunctor/index.js"),e=require("../Data.Functor/index.js"),u=require("../Data.Newtype/index.js"),i=require("../Data.Show/index.js"),o=function(n){return n},p=function(n){return new i.Show(function(r){return"(Wrap "+i.show(n)(r)+")"})},a=function(n){return n},c=new u.Newtype(function(n){return n},o),f=function(n){return new e.Functor(function(r){return function(e){return t.rmap(n)(r)(e)}})},w=function(n){return n},l=function(n){return new t.Bifunctor(function(r){return function(e){return function(u){return t.bimap(n)(r)(e)(u)}}})},s=function(n){return new r.Biapply(function(){return l(n.Bifunctor0())},function(t){return function(e){return r.biapply(n)(t)(e)}})},W=function(r){return new n.Biapplicative(function(){return s(r.Biapply0())},function(t){return function(e){return n.bipure(r)(t)(e)}})};module.exports={Wrap:o,newtypeWrap:c,eqWrap:w,ordWrap:a,showWrap:p,functorWrap:f,bifunctorWrap:l,biapplyWrap:s,biapplicativeWrap:W}; -},{"../Control.Biapplicative/index.js":"Sd0N","../Control.Biapply/index.js":"X0ga","../Data.Bifunctor/index.js":"e2Wc","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Show/index.js":"mFY7"}],"oRQn":[function(require,module,exports) { -"use strict";exports.traverseArrayImpl=function(){function n(n){return[n]}function r(n){return function(r){return[n,r]}}function t(n){return function(r){return function(t){return[n,r,t]}}}function u(n){return function(r){return n.concat(r)}}return function(e){return function(c){return function(o){return function(f){return function(i){return function a(s,l){switch(l-s){case 0:return o([]);case 1:return c(n)(f(i[s]));case 2:return e(c(r)(f(i[s])))(f(i[s+1]));case 3:return e(e(c(t)(f(i[s])))(f(i[s+1])))(f(i[s+2]));default:var h=s+2*Math.floor((l-s)/4);return e(c(u)(a(s,h)))(a(h,l))}}(0,i.length)}}}}}}(); -},{}],"W/l6":[function(require,module,exports) { -"use strict";var e=require("../Control.Alt/index.js"),n=require("../Control.Alternative/index.js"),r=require("../Control.MonadZero/index.js"),t=require("../Control.Plus/index.js"),i=require("../Data.Maybe/index.js"),o=require("../Data.Monoid/index.js"),u=require("../Data.Newtype/index.js"),a=require("../Data.Semigroup/index.js"),s=require("../Data.Show/index.js"),d=function(e){return e},c=function(e){return new s.Show(function(n){return"First ("+s.show(i.showMaybe(e))(n)+")"})},F=new a.Semigroup(function(e){return function(n){return e instanceof i.Just?e:n}}),y=function(e){return i.ordMaybe(e)},f=i.ord1Maybe,l=new u.Newtype(function(e){return e},d),p=new o.Monoid(function(){return F},i.Nothing.value),b=i.monadMaybe,M=i.invariantMaybe,w=i.functorMaybe,q=i.extendMaybe,x=function(e){return i.eqMaybe(e)},m=i.eq1Maybe,j=function(e){return i.boundedMaybe(e)},v=i.bindMaybe,h=i.applyMaybe,D=i.applicativeMaybe,g=new e.Alt(function(){return w},a.append(F)),A=new t.Plus(function(){return g},o.mempty(p)),C=new n.Alternative(function(){return D},function(){return A}),S=new r.MonadZero(function(){return C},function(){return b});module.exports={First:d,newtypeFirst:l,eqFirst:x,eq1First:m,ordFirst:y,ord1First:f,boundedFirst:j,functorFirst:w,invariantFirst:M,applyFirst:h,applicativeFirst:D,bindFirst:v,monadFirst:b,extendFirst:q,showFirst:c,semigroupFirst:F,monoidFirst:p,altFirst:g,plusFirst:A,alternativeFirst:C,monadZeroFirst:S}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"aQky":[function(require,module,exports) { -"use strict";var e=require("../Control.Alt/index.js"),n=require("../Control.Alternative/index.js"),t=require("../Control.MonadZero/index.js"),r=require("../Control.Plus/index.js"),a=require("../Data.Maybe/index.js"),o=require("../Data.Monoid/index.js"),i=require("../Data.Newtype/index.js"),u=require("../Data.Semigroup/index.js"),s=require("../Data.Show/index.js"),d=function(e){return e},c=function(e){return new s.Show(function(n){return"(Last "+s.show(a.showMaybe(e))(n)+")"})},l=new u.Semigroup(function(e){return function(n){if(n instanceof a.Just)return n;if(n instanceof a.Nothing)return e;throw new Error("Failed pattern match at Data.Maybe.Last (line 52, column 1 - line 54, column 36): "+[e.constructor.name,n.constructor.name])}}),L=function(e){return a.ordMaybe(e)},f=a.ord1Maybe,y=new i.Newtype(function(e){return e},d),p=new o.Monoid(function(){return l},a.Nothing.value),b=a.monadMaybe,M=a.invariantMaybe,w=a.functorMaybe,m=a.extendMaybe,q=function(e){return a.eqMaybe(e)},x=a.eq1Maybe,h=function(e){return a.boundedMaybe(e)},j=a.bindMaybe,v=a.applyMaybe,D=a.applicativeMaybe,g=new e.Alt(function(){return w},u.append(l)),A=new r.Plus(function(){return g},o.mempty(p)),C=new n.Alternative(function(){return D},function(){return A}),N=new t.MonadZero(function(){return C},function(){return b});module.exports={Last:d,newtypeLast:y,eqLast:q,eq1Last:x,ordLast:L,ord1Last:f,boundedLast:h,functorLast:w,invariantLast:M,applyLast:v,applicativeLast:D,bindLast:j,monadLast:b,extendLast:m,showLast:c,semigroupLast:l,monoidLast:p,altLast:g,plusLast:A,alternativeLast:C,monadZeroLast:N}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"LbSr":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),t=require("../Control.Apply/index.js"),u=require("../Data.Functor/index.js"),e=function(n){return n},r=function(n){return n},c=function(n){return n},a=function(n){return n},i=new u.Functor(function(n){return function(t){return function(u){var e=c(t)(u);return{accum:e.accum,value:n(e.value)}}}}),o=new u.Functor(function(n){return function(t){return function(u){var e=a(t)(u);return{accum:e.accum,value:n(e.value)}}}}),f=new t.Apply(function(){return i},function(n){return function(t){return function(u){var e=c(t)(u),r=c(n)(e.accum);return{accum:r.accum,value:r.value(e.value)}}}}),l=new t.Apply(function(){return o},function(n){return function(t){return function(u){var e=a(n)(u),r=a(t)(e.accum);return{accum:r.accum,value:e.value(r.value)}}}}),v=new n.Applicative(function(){return f},function(n){return function(t){return{accum:t,value:n}}}),p=new n.Applicative(function(){return l},function(n){return function(t){return{accum:t,value:n}}});module.exports={StateL:r,stateL:a,StateR:e,stateR:c,functorStateL:o,applyStateL:l,applicativeStateL:p,functorStateR:i,applyStateR:f,applicativeStateR:v}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Data.Functor/index.js":"+0AE"}],"n7EE":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Control.Applicative/index.js"),t=require("../Control.Apply/index.js"),u=require("../Control.Category/index.js"),e=require("../Data.Foldable/index.js"),i=require("../Data.Functor/index.js"),o=require("../Data.Maybe/index.js"),c=require("../Data.Maybe.First/index.js"),a=require("../Data.Maybe.Last/index.js"),f=require("../Data.Monoid.Additive/index.js"),l=require("../Data.Monoid.Conj/index.js"),p=require("../Data.Monoid.Disj/index.js"),s=require("../Data.Monoid.Dual/index.js"),d=require("../Data.Monoid.Multiplicative/index.js"),v=require("../Data.Traversable.Accum.Internal/index.js"),m=function(n,r,t,u){this.Foldable1=n,this.Functor0=r,this.sequence=t,this.traverse=u},y=function(n){return n.traverse},A=new m(function(){return e.foldableMultiplicative},function(){return d.functorMultiplicative},function(n){return function(r){return i.map(n.Apply0().Functor0())(d.Multiplicative)(r)}},function(n){return function(r){return function(t){return i.map(n.Apply0().Functor0())(d.Multiplicative)(r(t))}}}),F=new m(function(){return e.foldableMaybe},function(){return o.functorMaybe},function(n){return function(t){if(t instanceof o.Nothing)return r.pure(n)(o.Nothing.value);if(t instanceof o.Just)return i.map(n.Apply0().Functor0())(o.Just.create)(t.value0);throw new Error("Failed pattern match at Data.Traversable (line 86, column 1 - line 90, column 33): "+[t.constructor.name])}},function(n){return function(t){return function(u){if(u instanceof o.Nothing)return r.pure(n)(o.Nothing.value);if(u instanceof o.Just)return i.map(n.Apply0().Functor0())(o.Just.create)(t(u.value0));throw new Error("Failed pattern match at Data.Traversable (line 86, column 1 - line 90, column 33): "+[t.constructor.name,u.constructor.name])}}}),b=new m(function(){return e.foldableDual},function(){return s.functorDual},function(n){return function(r){return i.map(n.Apply0().Functor0())(s.Dual)(r)}},function(n){return function(r){return function(t){return i.map(n.Apply0().Functor0())(s.Dual)(r(t))}}}),j=new m(function(){return e.foldableDisj},function(){return p.functorDisj},function(n){return function(r){return i.map(n.Apply0().Functor0())(p.Disj)(r)}},function(n){return function(r){return function(t){return i.map(n.Apply0().Functor0())(p.Disj)(r(t))}}}),D=new m(function(){return e.foldableConj},function(){return l.functorConj},function(n){return function(r){return i.map(n.Apply0().Functor0())(l.Conj)(r)}},function(n){return function(r){return function(t){return i.map(n.Apply0().Functor0())(l.Conj)(r(t))}}}),q=new m(function(){return e.foldableAdditive},function(){return f.functorAdditive},function(n){return function(r){return i.map(n.Apply0().Functor0())(f.Additive)(r)}},function(n){return function(r){return function(t){return i.map(n.Apply0().Functor0())(f.Additive)(r(t))}}}),M=function(n){return function(r){return y(n)(r)(u.identity(u.categoryFn))}},x=new m(function(){return e.foldableArray},function(){return i.functorArray},function(n){return M(x)(n)},function(u){return n.traverseArrayImpl(t.apply(u.Apply0()))(i.map(u.Apply0().Functor0()))(r.pure(u))}),w=function(n){return n.sequence},h=new m(function(){return e.foldableFirst},function(){return c.functorFirst},function(n){return function(r){return i.map(n.Apply0().Functor0())(c.First)(w(F)(n)(r))}},function(n){return function(r){return function(t){return i.map(n.Apply0().Functor0())(c.First)(y(F)(n)(r)(t))}}}),C=new m(function(){return e.foldableLast},function(){return a.functorLast},function(n){return function(r){return i.map(n.Apply0().Functor0())(a.Last)(w(F)(n)(r))}},function(n){return function(r){return function(t){return i.map(n.Apply0().Functor0())(a.Last)(y(F)(n)(r)(t))}}}),L=function(n){return function(r){return function(t){return function(u){return w(n)(r)(i.map(n.Functor0())(t)(u))}}}},g=function(n){return function(r){return function(t){return function(u){return v.stateR(y(n)(v.applicativeStateR)(function(n){return function(t){return r(t)(n)}})(u))(t)}}}},J=function(n){return function(r){return function(t){return function(u){return g(n)(function(n){return function(t){var u=r(t)(n);return{accum:u,value:u}}})(t)(u).value}}}},N=function(n){return function(r){return function(t){return function(u){return v.stateL(y(n)(v.applicativeStateL)(function(n){return function(t){return r(t)(n)}})(u))(t)}}}},T=function(n){return function(r){return function(t){return function(u){return N(n)(function(n){return function(t){var u=r(n)(t);return{accum:u,value:u}}})(t)(u).value}}}},R=function(n){return function(r){return function(t){return function(u){return y(r)(n)(u)(t)}}}};module.exports={Traversable:m,traverse:y,sequence:w,traverseDefault:L,sequenceDefault:M,for:R,scanl:T,scanr:J,mapAccumL:N,mapAccumR:g,traversableArray:x,traversableMaybe:F,traversableFirst:h,traversableLast:C,traversableAdditive:q,traversableDual:b,traversableConj:D,traversableDisj:j,traversableMultiplicative:A}; -},{"./foreign.js":"oRQn","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Foldable/index.js":"eVDl","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Maybe.First/index.js":"W/l6","../Data.Maybe.Last/index.js":"aQky","../Data.Monoid.Additive/index.js":"fHyj","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Multiplicative/index.js":"y5cd","../Data.Traversable.Accum.Internal/index.js":"LbSr"}],"8nb9":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),t=require("../Control.Category/index.js"),u=require("../Data.Bifoldable/index.js"),e=require("../Data.Bifunctor/index.js"),i=require("../Data.Bifunctor.Clown/index.js"),o=require("../Data.Bifunctor.Flip/index.js"),c=require("../Data.Bifunctor.Joker/index.js"),f=require("../Data.Bifunctor.Product/index.js"),a=require("../Data.Bifunctor.Wrap/index.js"),l=require("../Data.Functor/index.js"),p=require("../Data.Traversable/index.js"),b=function(n,r,t,u){this.Bifoldable1=n,this.Bifunctor0=r,this.bisequence=t,this.bitraverse=u},s=function(n){return n.bitraverse},d=function(r){return function(t){return function(u){return function(e){return s(r)(t)(e)(n.pure(t))(u)}}}},F=function(r){return function(t){return function(u){return s(r)(t)(u)(n.pure(t))}}},v=function(r){return function(t){return function(u){return function(e){return s(r)(t)(n.pure(t))(e)(u)}}}},y=function(r){return function(t){return s(r)(t)(n.pure(t))}},B=function(n){return new b(function(){return u.bifoldableJoker(n.Foldable1())},function(){return c.bifunctorJoker(n.Functor0())},function(r){return function(t){return l.map(r.Apply0().Functor0())(c.Joker)(p.sequence(n)(r)(t))}},function(r){return function(t){return function(t){return function(u){return l.map(r.Apply0().Functor0())(c.Joker)(p.traverse(n)(r)(t)(u))}}}})},q=function(n){return new b(function(){return u.bifoldableClown(n.Foldable1())},function(){return i.bifunctorClown(n.Functor0())},function(r){return function(t){return l.map(r.Apply0().Functor0())(i.Clown)(p.sequence(n)(r)(t))}},function(r){return function(t){return function(u){return function(u){return l.map(r.Apply0().Functor0())(i.Clown)(p.traverse(n)(r)(t)(u))}}}})},A=function(n){return function(r){return s(n)(r)(t.identity(t.categoryFn))(t.identity(t.categoryFn))}},x=function(n){return n.bisequence},j=function(n){return new b(function(){return u.bifoldableFlip(n.Bifoldable1())},function(){return o.bifunctorFlip(n.Bifunctor0())},function(r){return function(t){return l.map(r.Apply0().Functor0())(o.Flip)(x(n)(r)(t))}},function(r){return function(t){return function(u){return function(e){return l.map(r.Apply0().Functor0())(o.Flip)(s(n)(r)(u)(t)(e))}}}})},m=function(n){return function(t){return new b(function(){return u.bifoldableProduct(n.Bifoldable1())(t.Bifoldable1())},function(){return f.bifunctorProduct(n.Bifunctor0())(t.Bifunctor0())},function(u){return function(e){return r.apply(u.Apply0())(l.map(u.Apply0().Functor0())(f.Product.create)(x(n)(u)(e.value0)))(x(t)(u)(e.value1))}},function(u){return function(e){return function(i){return function(o){return r.apply(u.Apply0())(l.map(u.Apply0().Functor0())(f.Product.create)(s(n)(u)(e)(i)(o.value0)))(s(t)(u)(e)(i)(o.value1))}}}})}},w=function(n){return new b(function(){return u.bifoldableWrap(n.Bifoldable1())},function(){return a.bifunctorWrap(n.Bifunctor0())},function(r){return function(t){return l.map(r.Apply0().Functor0())(a.Wrap)(x(n)(r)(t))}},function(r){return function(t){return function(u){return function(e){return l.map(r.Apply0().Functor0())(a.Wrap)(s(n)(r)(t)(u)(e))}}}})},D=function(n){return function(r){return function(t){return function(u){return function(i){return x(n)(r)(e.bimap(n.Bifunctor0())(t)(u)(i))}}}}},C=function(n){return function(r){return function(t){return function(u){return function(e){return s(n)(r)(u)(e)(t)}}}}};module.exports={Bitraversable:b,bitraverse:s,bisequence:x,bitraverseDefault:D,bisequenceDefault:A,ltraverse:F,rtraverse:y,bifor:C,lfor:d,rfor:v,bitraversableClown:q,bitraversableJoker:B,bitraversableFlip:j,bitraversableProduct:m,bitraversableWrap:w}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Bifoldable/index.js":"wjQo","../Data.Bifunctor/index.js":"e2Wc","../Data.Bifunctor.Clown/index.js":"Wuz6","../Data.Bifunctor.Flip/index.js":"EM73","../Data.Bifunctor.Joker/index.js":"O/Oh","../Data.Bifunctor.Product/index.js":"U+97","../Data.Bifunctor.Wrap/index.js":"U78Q","../Data.Functor/index.js":"+0AE","../Data.Traversable/index.js":"n7EE"}],"ZgoH":[function(require,module,exports) { -"use strict";exports.mapWithIndexArray=function(r){return function(t){for(var n=t.length,e=Array(n),u=0;u<n;u++)e[u]=r(u)(t[u]);return e}}; -},{}],"OHRN":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),t=require("../Data.Function/index.js"),r=require("../Data.Functor/index.js"),i=require("../Data.Maybe/index.js"),u=require("../Data.Maybe.First/index.js"),e=require("../Data.Maybe.Last/index.js"),o=require("../Data.Monoid.Additive/index.js"),a=require("../Data.Monoid.Conj/index.js"),c=require("../Data.Monoid.Disj/index.js"),f=require("../Data.Monoid.Dual/index.js"),d=require("../Data.Monoid.Multiplicative/index.js"),s=require("../Data.Unit/index.js"),x=function(n,t){this.Functor0=n,this.mapWithIndex=t},j=function(n){return n.mapWithIndex},D=function(n){return function(r){return j(n)(t.const(r))}},p=new x(function(){return d.functorMultiplicative},function(n){return r.map(d.functorMultiplicative)(n(s.unit))}),h=new x(function(){return i.functorMaybe},function(n){return r.map(i.functorMaybe)(n(s.unit))}),M=new x(function(){return e.functorLast},function(n){return r.map(e.functorLast)(n(s.unit))}),l=new x(function(){return u.functorFirst},function(n){return r.map(u.functorFirst)(n(s.unit))}),m=new x(function(){return f.functorDual},function(n){return r.map(f.functorDual)(n(s.unit))}),I=new x(function(){return c.functorDisj},function(n){return r.map(c.functorDisj)(n(s.unit))}),W=new x(function(){return a.functorConj},function(n){return r.map(a.functorConj)(n(s.unit))}),q=new x(function(){return r.functorArray},n.mapWithIndexArray),v=new x(function(){return o.functorAdditive},function(n){return r.map(o.functorAdditive)(n(s.unit))});module.exports={FunctorWithIndex:x,mapWithIndex:j,mapDefault:D,functorWithIndexArray:q,functorWithIndexMaybe:h,functorWithIndexFirst:l,functorWithIndexLast:M,functorWithIndexAdditive:v,functorWithIndexDual:m,functorWithIndexConj:W,functorWithIndexDisj:I,functorWithIndexMultiplicative:p}; -},{"./foreign.js":"ZgoH","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Maybe.First/index.js":"W/l6","../Data.Maybe.Last/index.js":"aQky","../Data.Monoid.Additive/index.js":"fHyj","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Multiplicative/index.js":"y5cd","../Data.Unit/index.js":"NhVk"}],"9Efi":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),t=require("../Control.Apply/index.js"),r=require("../Control.Bind/index.js"),u=require("../Control.Category/index.js"),e=require("../Data.Foldable/index.js"),i=require("../Data.Function/index.js"),o=require("../Data.FunctorWithIndex/index.js"),f=require("../Data.Maybe/index.js"),l=require("../Data.Monoid/index.js"),d=require("../Data.Monoid.Conj/index.js"),a=require("../Data.Monoid.Disj/index.js"),c=require("../Data.Monoid.Dual/index.js"),p=require("../Data.Monoid.Endo/index.js"),b=require("../Data.Newtype/index.js"),x=require("../Data.Semigroup/index.js"),s=require("../Data.Unit/index.js"),h=function(){function n(n,t){this.value0=n,this.value1=t}return n.create=function(t){return function(r){return new n(t,r)}},n}(),D=function(n,t,r,u){this.Foldable0=n,this.foldMapWithIndex=t,this.foldlWithIndex=r,this.foldrWithIndex=u},I=function(n){return n.foldrWithIndex},W=function(r){return function(u){return function(e){return I(u)(function(n){var u=t.applySecond(r.Apply0()),i=e(n);return function(n){return u(i(n))}})(n.pure(r)(s.unit))}}},j=function(n){return function(t){return i.flip(W(n)(t))}},M=function(n){return function(t){return I(n)(i.const(t))}},v=function(n){return n.foldlWithIndex},y=function(n){return function(t){return v(n)(i.const(t))}},w=new D(function(){return e.foldableMultiplicative},function(n){return function(t){return e.foldMap(e.foldableMultiplicative)(n)(t(s.unit))}},function(n){return e.foldl(e.foldableMultiplicative)(n(s.unit))},function(n){return e.foldr(e.foldableMultiplicative)(n(s.unit))}),m=new D(function(){return e.foldableMaybe},function(n){return function(t){return e.foldMap(e.foldableMaybe)(n)(t(s.unit))}},function(n){return e.foldl(e.foldableMaybe)(n(s.unit))},function(n){return e.foldr(e.foldableMaybe)(n(s.unit))}),q=new D(function(){return e.foldableLast},function(n){return function(t){return e.foldMap(e.foldableLast)(n)(t(s.unit))}},function(n){return e.foldl(e.foldableLast)(n(s.unit))},function(n){return e.foldr(e.foldableLast)(n(s.unit))}),A=new D(function(){return e.foldableFirst},function(n){return function(t){return e.foldMap(e.foldableFirst)(n)(t(s.unit))}},function(n){return e.foldl(e.foldableFirst)(n(s.unit))},function(n){return e.foldr(e.foldableFirst)(n(s.unit))}),C=new D(function(){return e.foldableDual},function(n){return function(t){return e.foldMap(e.foldableDual)(n)(t(s.unit))}},function(n){return e.foldl(e.foldableDual)(n(s.unit))},function(n){return e.foldr(e.foldableDual)(n(s.unit))}),F=new D(function(){return e.foldableDisj},function(n){return function(t){return e.foldMap(e.foldableDisj)(n)(t(s.unit))}},function(n){return e.foldl(e.foldableDisj)(n(s.unit))},function(n){return e.foldr(e.foldableDisj)(n(s.unit))}),g=new D(function(){return e.foldableConj},function(n){return function(t){return e.foldMap(e.foldableConj)(n)(t(s.unit))}},function(n){return e.foldl(e.foldableConj)(n(s.unit))},function(n){return e.foldr(e.foldableConj)(n(s.unit))}),E=new D(function(){return e.foldableAdditive},function(n){return function(t){return e.foldMap(e.foldableAdditive)(n)(t(s.unit))}},function(n){return e.foldl(e.foldableAdditive)(n(s.unit))},function(n){return e.foldr(e.foldableAdditive)(n(s.unit))}),L=function(t){return function(u){return function(e){return function(o){return v(t)(function(n){return function(t){return function(o){return r.bind(u.Bind1())(t)(i.flip(e(n))(o))}}})(n.pure(u.Applicative0())(o))}}}},S=function(n){return function(t){return function(r){return I(n)(function(n){return function(u){return function(e){return x.append(t.Semigroup0())(r(n)(u))(e)}}})(l.mempty(t))}}},N=new D(function(){return e.foldableArray},function(n){return S(N)(n)},function(n){return function(t){var r=e.foldl(e.foldableArray)(function(t){return function(r){return n(r.value0)(t)(r.value1)}})(t),u=o.mapWithIndex(o.functorWithIndexArray)(h.create);return function(n){return r(u(n))}}},function(n){return function(t){var r=e.foldr(e.foldableArray)(function(t){return function(r){return n(t.value0)(t.value1)(r)}})(t),u=o.mapWithIndex(o.functorWithIndexArray)(h.create);return function(n){return r(u(n))}}}),B=function(n){return function(t){return function(r){return v(n)(function(n){return function(u){return function(e){return x.append(t.Semigroup0())(u)(r(n)(e))}}})(l.mempty(t))}}},_=function(n){return n.foldMapWithIndex},J=function(n){return function(t){return function(r){return function(e){return b.unwrap(b.newtypeEndo)(b.unwrap(b.newtypeDual)(_(n)(c.monoidDual(p.monoidEndo(u.categoryFn)))(function(n){var r=i.flip(t(n));return function(n){return c.Dual(p.Endo(r(n)))}})(e)))(r)}}}},R=function(n){return function(t){return function(r){return function(e){return b.unwrap(b.newtypeEndo)(_(n)(p.monoidEndo(u.categoryFn))(function(n){var r=t(n);return function(n){return p.Endo(r(n))}})(e))(r)}}}},U=function(n){return function(t){return function(r){return function(e){return function(i){return b.unwrap(b.newtypeEndo)(_(n)(p.monoidEndo(u.categoryFn))(function(n){return function(u){return function(i){return x.append(t)(r)(x.append(t)(e(n)(u))(i))}}})(i))(r)}}}}},k=function(n){return function(t){return function(r){return _(n)(t)(i.const(r))}}},z=function(n){return function(t){return v(n)(function(n){return function(r){return function(u){return r instanceof f.Nothing&&t(n)(u)?new f.Just({index:n,value:u}):r}}})(f.Nothing.value)}},G=function(n){return function(t){return function(r){var u=b.unwrap(b.newtypeDisj),e=_(n)(a.monoidDisj(t))(function(n){var t=r(n);return function(n){return a.Disj(t(n))}});return function(n){return u(e(n))}}}},H=function(n){return function(t){return function(r){var u=b.unwrap(b.newtypeConj),e=_(n)(d.monoidConj(t))(function(n){var t=r(n);return function(n){return d.Conj(t(n))}});return function(n){return u(e(n))}}}};module.exports={FoldableWithIndex:D,foldrWithIndex:I,foldlWithIndex:v,foldMapWithIndex:_,foldrWithIndexDefault:R,foldlWithIndexDefault:J,foldMapWithIndexDefaultR:S,foldMapWithIndexDefaultL:B,foldWithIndexM:L,traverseWithIndex_:W,forWithIndex_:j,surroundMapWithIndex:U,allWithIndex:H,anyWithIndex:G,findWithIndex:z,foldrDefault:M,foldlDefault:y,foldMapDefault:k,foldableWithIndexArray:N,foldableWithIndexMaybe:m,foldableWithIndexFirst:A,foldableWithIndexLast:q,foldableWithIndexAdditive:E,foldableWithIndexDual:C,foldableWithIndexDisj:F,foldableWithIndexConj:g,foldableWithIndexMultiplicative:w}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Endo/index.js":"2o47","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Unit/index.js":"NhVk"}],"V4EF":[function(require,module,exports) { -"use strict";var n=require("../Data.FoldableWithIndex/index.js"),t=require("../Data.Function/index.js"),r=require("../Data.FunctorWithIndex/index.js"),e=require("../Data.Traversable/index.js"),u=require("../Data.Traversable.Accum.Internal/index.js"),i=require("../Data.Unit/index.js"),a=function(n,t,r,e){this.FoldableWithIndex1=n,this.FunctorWithIndex0=t,this.Traversable2=r,this.traverseWithIndex=e},c=function(n){return function(t){return function(u){var i=e.sequence(n.Traversable2())(t),a=r.mapWithIndex(n.FunctorWithIndex0())(u);return function(n){return i(a(n))}}}},o=function(n){return n.traverseWithIndex},f=function(n){return function(r){return function(e){return o(n)(r)(t.const(e))}}},l=new a(function(){return n.foldableWithIndexMultiplicative},function(){return r.functorWithIndexMultiplicative},function(){return e.traversableMultiplicative},function(n){return function(t){return e.traverse(e.traversableMultiplicative)(n)(t(i.unit))}}),s=new a(function(){return n.foldableWithIndexMaybe},function(){return r.functorWithIndexMaybe},function(){return e.traversableMaybe},function(n){return function(t){return e.traverse(e.traversableMaybe)(n)(t(i.unit))}}),d=new a(function(){return n.foldableWithIndexLast},function(){return r.functorWithIndexLast},function(){return e.traversableLast},function(n){return function(t){return e.traverse(e.traversableLast)(n)(t(i.unit))}}),v=new a(function(){return n.foldableWithIndexFirst},function(){return r.functorWithIndexFirst},function(){return e.traversableFirst},function(n){return function(t){return e.traverse(e.traversableFirst)(n)(t(i.unit))}}),x=new a(function(){return n.foldableWithIndexDual},function(){return r.functorWithIndexDual},function(){return e.traversableDual},function(n){return function(t){return e.traverse(e.traversableDual)(n)(t(i.unit))}}),b=new a(function(){return n.foldableWithIndexDisj},function(){return r.functorWithIndexDisj},function(){return e.traversableDisj},function(n){return function(t){return e.traverse(e.traversableDisj)(n)(t(i.unit))}}),h=new a(function(){return n.foldableWithIndexConj},function(){return r.functorWithIndexConj},function(){return e.traversableConj},function(n){return function(t){return e.traverse(e.traversableConj)(n)(t(i.unit))}}),I=new a(function(){return n.foldableWithIndexArray},function(){return r.functorWithIndexArray},function(){return e.traversableArray},function(n){return c(I)(n)}),W=new a(function(){return n.foldableWithIndexAdditive},function(){return r.functorWithIndexAdditive},function(){return e.traversableAdditive},function(n){return function(t){return e.traverse(e.traversableAdditive)(n)(t(i.unit))}}),D=function(n){return function(t){return function(r){return function(e){return u.stateR(o(n)(u.applicativeStateR)(function(n){return function(r){return function(e){return t(n)(e)(r)}}})(e))(r)}}}},j=function(n){return function(t){return function(r){return function(e){return D(n)(function(n){return function(r){return function(e){var u=t(n)(e)(r);return{accum:u,value:u}}}})(r)(e).value}}}},p=function(n){return function(t){return function(r){return function(e){return u.stateL(o(n)(u.applicativeStateL)(function(n){return function(r){return function(e){return t(n)(e)(r)}}})(e))(r)}}}},A=function(n){return function(t){return function(r){return function(e){return p(n)(function(n){return function(r){return function(e){var u=t(n)(r)(e);return{accum:u,value:u}}}})(r)(e).value}}}},F=function(n){return function(r){return t.flip(o(r)(n))}};module.exports={TraversableWithIndex:a,traverseWithIndex:o,traverseWithIndexDefault:c,forWithIndex:F,scanlWithIndex:A,mapAccumLWithIndex:p,scanrWithIndex:j,mapAccumRWithIndex:D,traverseDefault:f,traversableWithIndexArray:I,traversableWithIndexMaybe:s,traversableWithIndexFirst:v,traversableWithIndexLast:d,traversableWithIndexAdditive:W,traversableWithIndexDual:x,traversableWithIndexConj:h,traversableWithIndexDisj:b,traversableWithIndexMultiplicative:l}; -},{"../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Traversable/index.js":"n7EE","../Data.Traversable.Accum.Internal/index.js":"LbSr","../Data.Unit/index.js":"NhVk"}],"B2JL":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),t=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),r=require("../Control.Bind/index.js"),u=require("../Control.Extend/index.js"),o=require("../Control.Monad/index.js"),i=require("../Data.Bifoldable/index.js"),a=require("../Data.Bifunctor/index.js"),c=require("../Data.Bitraversable/index.js"),f=require("../Data.Bounded/index.js"),l=require("../Data.Eq/index.js"),s=require("../Data.Foldable/index.js"),m=require("../Data.FoldableWithIndex/index.js"),h=require("../Data.Function/index.js"),d=require("../Data.Functor/index.js"),w=require("../Data.Functor.Invariant/index.js"),p=require("../Data.FunctorWithIndex/index.js"),E=require("../Data.Maybe/index.js"),v=require("../Data.Monoid/index.js"),D=require("../Data.Ord/index.js"),F=require("../Data.Ordering/index.js"),x=require("../Data.Semigroup/index.js"),q=require("../Data.Show/index.js"),b=require("../Data.Traversable/index.js"),j=require("../Data.TraversableWithIndex/index.js"),y=require("../Data.Unit/index.js"),A=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),I=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),B=function(n){return function(t){return new q.Show(function(e){if(e instanceof A)return"(Left "+q.show(n)(e.value0)+")";if(e instanceof I)return"(Right "+q.show(t)(e.value0)+")";throw new Error("Failed pattern match at Data.Either (line 163, column 1 - line 165, column 46): "+[e.constructor.name])})}},g=function(n){return E["maybe'"](function(t){return A.create(n(t))})(I.create)},W=function(n){return E.maybe(new A(n))(I.create)},C=new d.Functor(function(n){return function(t){if(t instanceof A)return new A(t.value0);if(t instanceof I)return new I(n(t.value0));throw new Error("Failed pattern match at Data.Either (line 38, column 1 - line 38, column 52): "+[t.constructor.name])}}),O=new p.FunctorWithIndex(function(){return C},function(n){return d.map(C)(n(y.unit))}),T=new w.Invariant(w.imapF(C)),L=function(n){return function(n){if(n instanceof I)return n.value0;throw new Error("Failed pattern match at Data.Either (line 261, column 1 - line 261, column 52): "+[n.constructor.name])}},M=function(n){return function(n){if(n instanceof A)return n.value0;throw new Error("Failed pattern match at Data.Either (line 256, column 1 - line 256, column 51): "+[n.constructor.name])}},R=new s.Foldable(function(n){return function(t){return function(e){if(e instanceof A)return v.mempty(n);if(e instanceof I)return t(e.value0);throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): "+[t.constructor.name,e.constructor.name])}}},function(n){return function(t){return function(e){if(e instanceof A)return t;if(e instanceof I)return n(t)(e.value0);throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): "+[n.constructor.name,t.constructor.name,e.constructor.name])}}},function(n){return function(t){return function(e){if(e instanceof A)return t;if(e instanceof I)return n(e.value0)(t);throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): "+[n.constructor.name,t.constructor.name,e.constructor.name])}}}),S=new m.FoldableWithIndex(function(){return R},function(n){return function(t){return function(e){if(e instanceof A)return v.mempty(n);if(e instanceof I)return t(y.unit)(e.value0);throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): "+[t.constructor.name,e.constructor.name])}}},function(n){return function(t){return function(e){if(e instanceof A)return t;if(e instanceof I)return n(y.unit)(t)(e.value0);throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): "+[n.constructor.name,t.constructor.name,e.constructor.name])}}},function(n){return function(t){return function(e){if(e instanceof A)return t;if(e instanceof I)return n(y.unit)(e.value0)(t);throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): "+[n.constructor.name,t.constructor.name,e.constructor.name])}}}),G=new b.Traversable(function(){return R},function(){return C},function(n){return function(e){if(e instanceof A)return t.pure(n)(new A(e.value0));if(e instanceof I)return d.map(n.Apply0().Functor0())(I.create)(e.value0);throw new Error("Failed pattern match at Data.Either (line 211, column 1 - line 215, column 36): "+[e.constructor.name])}},function(n){return function(e){return function(r){if(r instanceof A)return t.pure(n)(new A(r.value0));if(r instanceof I)return d.map(n.Apply0().Functor0())(I.create)(e(r.value0));throw new Error("Failed pattern match at Data.Either (line 211, column 1 - line 215, column 36): "+[e.constructor.name,r.constructor.name])}}}),J=new j.TraversableWithIndex(function(){return S},function(){return O},function(){return G},function(n){return function(e){return function(r){if(r instanceof A)return t.pure(n)(new A(r.value0));if(r instanceof I)return d.map(n.Apply0().Functor0())(I.create)(e(y.unit)(r.value0));throw new Error("Failed pattern match at Data.Either (line 217, column 1 - line 219, column 53): "+[e.constructor.name,r.constructor.name])}}}),N=new u.Extend(function(){return C},function(n){return function(t){return t instanceof A?new A(t.value0):new I(n(t))}}),U=function(n){return function(t){return new l.Eq(function(e){return function(r){return e instanceof A&&r instanceof A?l.eq(n)(e.value0)(r.value0):e instanceof I&&r instanceof I&&l.eq(t)(e.value0)(r.value0)}})}},k=function(n){return function(t){return new D.Ord(function(){return U(n.Eq0())(t.Eq0())},function(e){return function(r){if(e instanceof A&&r instanceof A)return D.compare(n)(e.value0)(r.value0);if(e instanceof A)return F.LT.value;if(r instanceof A)return F.GT.value;if(e instanceof I&&r instanceof I)return D.compare(t)(e.value0)(r.value0);throw new Error("Failed pattern match at Data.Either (line 179, column 1 - line 179, column 64): "+[e.constructor.name,r.constructor.name])}})}},z=function(n){return new l.Eq1(function(t){return l.eq(U(n)(t))})},H=function(n){return new D.Ord1(function(){return z(n.Eq0())},function(t){return D.compare(k(n)(t))})},K=function(n){return function(t){return function(e){if(e instanceof A)return n(e.value0);if(e instanceof I)return t(e.value0);throw new Error("Failed pattern match at Data.Either (line 238, column 1 - line 238, column 64): "+[n.constructor.name,t.constructor.name,e.constructor.name])}}},P=K(h.const(E.Nothing.value))(E.Just.create),Q=K(h.const(!0))(h.const(!1)),V=K(h.const(!1))(h.const(!0)),X=function(t){return function(e){return function(r){return n.alt(t)(d.map(t.Functor0())(A.create)(e))(d.map(t.Functor0())(I.create)(r))}}},Y=function(n){return function(t){return new f.Bounded(function(){return k(n.Ord0())(t.Ord0())},new A(f.bottom(n)),new I(f.top(t)))}},Z=new a.Bifunctor(function(n){return function(t){return function(e){if(e instanceof A)return new A(n(e.value0));if(e instanceof I)return new I(t(e.value0));throw new Error("Failed pattern match at Data.Either (line 46, column 1 - line 48, column 36): "+[n.constructor.name,t.constructor.name,e.constructor.name])}}}),$=new i.Bifoldable(function(n){return function(n){return function(t){return function(e){if(e instanceof A)return n(e.value0);if(e instanceof I)return t(e.value0);throw new Error("Failed pattern match at Data.Either (line 203, column 1 - line 209, column 32): "+[n.constructor.name,t.constructor.name,e.constructor.name])}}}},function(n){return function(t){return function(e){return function(r){if(r instanceof A)return n(e)(r.value0);if(r instanceof I)return t(e)(r.value0);throw new Error("Failed pattern match at Data.Either (line 203, column 1 - line 209, column 32): "+[n.constructor.name,t.constructor.name,e.constructor.name,r.constructor.name])}}}},function(n){return function(t){return function(e){return function(r){if(r instanceof A)return n(r.value0)(e);if(r instanceof I)return t(r.value0)(e);throw new Error("Failed pattern match at Data.Either (line 203, column 1 - line 209, column 32): "+[n.constructor.name,t.constructor.name,e.constructor.name,r.constructor.name])}}}}),_=new c.Bitraversable(function(){return $},function(){return Z},function(n){return function(t){if(t instanceof A)return d.map(n.Apply0().Functor0())(A.create)(t.value0);if(t instanceof I)return d.map(n.Apply0().Functor0())(I.create)(t.value0);throw new Error("Failed pattern match at Data.Either (line 221, column 1 - line 225, column 37): "+[t.constructor.name])}},function(n){return function(t){return function(e){return function(r){if(r instanceof A)return d.map(n.Apply0().Functor0())(A.create)(t(r.value0));if(r instanceof I)return d.map(n.Apply0().Functor0())(I.create)(e(r.value0));throw new Error("Failed pattern match at Data.Either (line 221, column 1 - line 225, column 37): "+[t.constructor.name,e.constructor.name,r.constructor.name])}}}}),nn=new e.Apply(function(){return C},function(n){return function(t){if(n instanceof A)return new A(n.value0);if(n instanceof I)return d.map(C)(n.value0)(t);throw new Error("Failed pattern match at Data.Either (line 82, column 1 - line 84, column 30): "+[n.constructor.name,t.constructor.name])}}),tn=new r.Bind(function(){return nn},K(function(n){return function(t){return new A(n)}})(function(n){return function(t){return t(n)}})),en=function(n){return new x.Semigroup(function(t){return function(r){return e.apply(nn)(d.map(C)(x.append(n))(t))(r)}})},rn=new t.Applicative(function(){return nn},I.create),un=new o.Monad(function(){return rn},function(){return tn}),on=new n.Alt(function(){return C},function(n){return function(t){return n instanceof A?t:n}});module.exports={Left:A,Right:I,either:K,choose:X,isLeft:Q,isRight:V,fromLeft:M,fromRight:L,note:W,"note'":g,hush:P,functorEither:C,functorWithIndexEither:O,invariantEither:T,bifunctorEither:Z,applyEither:nn,applicativeEither:rn,altEither:on,bindEither:tn,monadEither:un,extendEither:N,showEither:B,eqEither:U,eq1Either:z,ordEither:k,ord1Either:H,boundedEither:Y,foldableEither:R,foldableWithIndexEither:S,bifoldableEither:$,traversableEither:G,traversableWithIndexEither:J,bitraversableEither:_,semigroupEither:en}; -},{"../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Extend/index.js":"JIoJ","../Control.Monad/index.js":"U/Ix","../Data.Bifoldable/index.js":"wjQo","../Data.Bifunctor/index.js":"e2Wc","../Data.Bitraversable/index.js":"8nb9","../Data.Bounded/index.js":"kcUU","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Functor.Invariant/index.js":"AXkC","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Unit/index.js":"NhVk"}],"U0zO":[function(require,module,exports) { -"use strict";var t=function(t,e){this.Extend0=t,this.extract=e},e=function(t){return t.extract};module.exports={Comonad:t,extract:e}; -},{}],"fhx3":[function(require,module,exports) { -"use strict";var n=require("../Data.Bounded/index.js"),e=require("../Data.Monoid/index.js"),r=require("../Data.Newtype/index.js"),t=require("../Data.Ord/index.js"),u=require("../Data.Semigroup/index.js"),o=require("../Data.Show/index.js"),i=function(n){return n},a=function(n){return new o.Show(function(e){return"(Max "+o.show(n)(e)+")"})},c=function(n){return new u.Semigroup(function(e){return function(r){return t.max(n)(e)(r)}})},d=new r.Newtype(function(n){return n},i),x=function(r){return new e.Monoid(function(){return c(r.Ord0())},n.bottom(r))},f=function(n){return n},s=function(n){return new t.Ord(function(){return f(n.Eq0())},function(e){return function(r){return t.compare(n)(e)(r)}})};module.exports={Max:i,newtypeMax:d,eqMax:f,ordMax:s,semigroupMax:c,monoidMax:x,showMax:a}; -},{"../Data.Bounded/index.js":"kcUU","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"X+tn":[function(require,module,exports) { -"use strict";var n=require("../Data.Bounded/index.js"),e=require("../Data.Monoid/index.js"),r=require("../Data.Newtype/index.js"),i=require("../Data.Ord/index.js"),t=require("../Data.Semigroup/index.js"),u=require("../Data.Show/index.js"),o=function(n){return n},c=function(n){return new u.Show(function(e){return"(Min "+u.show(n)(e)+")"})},d=function(n){return new t.Semigroup(function(e){return function(r){return i.min(n)(e)(r)}})},a=new r.Newtype(function(n){return n},o),f=function(r){return new e.Monoid(function(){return d(r.Ord0())},n.top(r))},s=function(n){return n},w=function(n){return new i.Ord(function(){return s(n.Eq0())},function(e){return function(r){return i.compare(n)(e)(r)}})};module.exports={Min:o,newtypeMin:a,eqMin:s,ordMin:w,semigroupMin:d,monoidMin:f,showMin:c}; -},{"../Data.Bounded/index.js":"kcUU","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"ht+A":[function(require,module,exports) { -"use strict";var n=require("../Control.Apply/index.js"),t=require("../Control.Category/index.js"),r=require("../Data.Foldable/index.js"),u=require("../Data.Function/index.js"),e=require("../Data.Functor/index.js"),i=require("../Data.Newtype/index.js"),o=require("../Data.Ord.Max/index.js"),f=require("../Data.Ord.Min/index.js"),c=require("../Data.Semigroup/index.js"),a=require("../Data.Unit/index.js"),l=function(n){return n},d=function(n){return n},p=function(n,t,r){this.Foldable0=n,this.fold1=t,this.foldMap1=r},s=function(n){return new c.Semigroup(function(t){return function(r){return l(function(u){return c.append(n)(t(u))(c.append(n)(u)(r(u)))})}})},x=function(t){return new c.Semigroup(function(r){return function(u){return n.applySecond(t)(r)(u)}})},M=function(n){return n},y=function(n){return n},m=function(n){return n.foldMap1},D=function(n){return function(t){return function(r){return function(e){return function(i){return M(m(n)(s(t))(function(n){return l(u.const(e(n)))})(i))(r)}}}}},q=function(n){return function(r){return u.flip(D(n)(r))(t.identity(t.categoryFn))}},F=function(n){return function(t){return i.ala(e.functorFn)(o.newtypeMax)(o.newtypeMax)(o.Max)(m(t)(o.semigroupMax(n)))}},g=function(n){return function(t){return i.ala(e.functorFn)(f.newtypeMin)(f.newtypeMin)(f.Min)(m(t)(f.semigroupMin(n)))}},j=function(n){return function(t){return function(r){return function(u){return e.voidRight(t.Functor0())(a.unit)(y(m(n)(x(t))(function(n){return d(r(n))})(u)))}}}},w=function(n){return function(t){return u.flip(j(n)(t))}},b=function(n){return function(r){return j(n)(r)(t.identity(t.categoryFn))}},v=function(n){return function(r){return m(n)(r)(t.identity(t.categoryFn))}},h=new p(function(){return r.foldableDual},function(n){return v(h)(n)},function(n){return function(n){return function(t){return n(t)}}}),S=new p(function(){return r.foldableMultiplicative},function(n){return v(S)(n)},function(n){return function(n){return function(t){return n(t)}}}),C=function(n){return n.fold1},_=function(n){return function(t){return function(r){return function(u){var i=C(n)(r),o=e.map(t)(u);return function(n){return i(o(n))}}}}};module.exports={Foldable1:p,foldMap1:m,fold1:C,traverse1_:j,for1_:w,sequence1_:b,foldMap1Default:_,fold1Default:v,intercalate:q,intercalateMap:D,maximum:F,minimum:g,foldableDual:h,foldableMultiplicative:S}; -},{"../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Ord.Max/index.js":"fhx3","../Data.Ord.Min/index.js":"X+tn","../Data.Semigroup/index.js":"EsAJ","../Data.Unit/index.js":"NhVk"}],"qkfi":[function(require,module,exports) { -"use strict";var e=require("../Control.Category/index.js"),r=require("../Data.Functor/index.js"),n=require("../Data.Monoid.Dual/index.js"),t=require("../Data.Monoid.Multiplicative/index.js"),u=require("../Data.Semigroup.Foldable/index.js"),i=require("../Data.Traversable/index.js"),a=function(e,r,n,t){this.Foldable10=e,this.Traversable1=r,this.sequence1=n,this.traverse1=t},o=function(e){return e.traverse1},c=function(r){return function(n){return o(r)(n)(e.identity(e.categoryFn))}},l=new a(function(){return u.foldableDual},function(){return i.traversableDual},function(e){return c(l)(e)},function(e){return function(t){return function(u){return r.map(e.Functor0())(n.Dual)(t(u))}}}),s=new a(function(){return u.foldableMultiplicative},function(){return i.traversableMultiplicative},function(e){return c(s)(e)},function(e){return function(n){return function(u){return r.map(e.Functor0())(t.Multiplicative)(n(u))}}}),f=function(e){return e.sequence1},v=function(e){return function(n){return function(t){return function(u){return f(e)(n)(r.map(e.Traversable1().Functor0())(t)(u))}}}};module.exports={sequence1:f,traverse1:o,Traversable1:a,traverse1Default:v,sequence1Default:c,traversableDual:l,traversableMultiplicative:s}; -},{"../Control.Category/index.js":"IAi2","../Data.Functor/index.js":"+0AE","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Multiplicative/index.js":"y5cd","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Traversable/index.js":"n7EE"}],"2OKT":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),t=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),r=require("../Control.Bind/index.js"),u=require("../Control.Comonad/index.js"),i=require("../Control.Extend/index.js"),o=require("../Control.Monad/index.js"),c=require("../Data.Eq/index.js"),d=require("../Data.Foldable/index.js"),f=require("../Data.FoldableWithIndex/index.js"),a=require("../Data.Functor/index.js"),l=require("../Data.Functor.Invariant/index.js"),y=require("../Data.FunctorWithIndex/index.js"),I=require("../Data.Newtype/index.js"),s=require("../Data.Ord/index.js"),x=require("../Data.Semigroup.Foldable/index.js"),p=require("../Data.Semigroup.Traversable/index.js"),w=require("../Data.Show/index.js"),q=require("../Data.Traversable/index.js"),b=require("../Data.TraversableWithIndex/index.js"),j=require("../Data.Unit/index.js"),m=function(n){return n},v=function(n){return new w.Show(function(t){return"(Identity "+w.show(n)(t)+")"})},F=function(n){return n},h=function(n){return n},D=function(n){return n},A=function(n){return n},g=new I.Newtype(function(n){return n},m),C=function(n){return n},W=function(n){return n},T=function(n){return n},E=new a.Functor(function(n){return function(t){return n(t)}}),S=new y.FunctorWithIndex(function(){return E},function(n){return function(t){return n(j.unit)(t)}}),B=new l.Invariant(l.imapF(E)),M=new d.Foldable(function(n){return function(n){return function(t){return n(t)}}},function(n){return function(t){return function(e){return n(t)(e)}}},function(n){return function(t){return function(e){return n(e)(t)}}}),N=new f.FoldableWithIndex(function(){return M},function(n){return function(n){return function(t){return n(j.unit)(t)}}},function(n){return function(t){return function(e){return n(j.unit)(t)(e)}}},function(n){return function(t){return function(e){return n(j.unit)(e)(t)}}}),O=new q.Traversable(function(){return M},function(){return E},function(n){return function(t){return a.map(n.Apply0().Functor0())(m)(t)}},function(n){return function(t){return function(e){return a.map(n.Apply0().Functor0())(m)(t(e))}}}),R=new b.TraversableWithIndex(function(){return N},function(){return S},function(){return O},function(n){return function(t){return function(e){return a.map(n.Apply0().Functor0())(m)(t(j.unit)(e))}}}),z=new x.Foldable1(function(){return M},function(n){return function(n){return n}},function(n){return function(n){return function(t){return n(t)}}}),U=new p.Traversable1(function(){return z},function(){return O},function(n){return function(t){return a.map(n.Functor0())(m)(t)}},function(n){return function(t){return function(e){return a.map(n.Functor0())(m)(t(e))}}}),k=new i.Extend(function(){return E},function(n){return function(t){return n(t)}}),G=function(n){return n},H=function(n){return n},J=new c.Eq1(function(n){return c.eq(H(n))}),K=new s.Ord1(function(){return J},function(n){return s.compare(A(n))}),L=new u.Comonad(function(){return k},function(n){return n}),P=function(n){return n},Q=function(n){return n},V=function(n){return n},X=new e.Apply(function(){return E},function(n){return function(t){return n(t)}}),Y=new r.Bind(function(){return X},function(n){return function(t){return t(n)}}),Z=new t.Applicative(function(){return X},m),$=new o.Monad(function(){return Z},function(){return Y}),_=new n.Alt(function(){return E},function(n){return function(t){return n}});module.exports={Identity:m,newtypeIdentity:g,eqIdentity:H,ordIdentity:A,boundedIdentity:Q,heytingAlgebraIdentity:T,booleanAlgebraIdentity:V,semigroupIdenity:h,monoidIdentity:C,semiringIdentity:F,euclideanRingIdentity:G,ringIdentity:D,commutativeRingIdentity:P,lazyIdentity:W,showIdentity:v,eq1Identity:J,ord1Identity:K,functorIdentity:E,functorWithIndexIdentity:S,invariantIdentity:B,altIdentity:_,applyIdentity:X,applicativeIdentity:Z,bindIdentity:Y,monadIdentity:$,extendIdentity:k,comonadIdentity:L,foldableIdentity:M,foldable1Identity:z,foldableWithIndexIdentity:N,traversableIdentity:O,traversable1Identity:U,traversableWithIndexIdentity:R}; -},{"../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Comonad/index.js":"U0zO","../Control.Extend/index.js":"JIoJ","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Functor/index.js":"+0AE","../Data.Functor.Invariant/index.js":"AXkC","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Unit/index.js":"NhVk"}],"bXvE":[function(require,module,exports) { -"use strict";exports.pureE=function(n){return function(){return n}},exports.bindE=function(n){return function(r){return function(){return r(n())()}}},exports.untilE=function(n){return function(){for(;!n(););return{}}},exports.whileE=function(n){return function(r){return function(){for(;n();)r();return{}}}},exports.forE=function(n){return function(r){return function(t){return function(){for(var u=n;u<r;u++)t(u)()}}}},exports.foreachE=function(n){return function(r){return function(){for(var t=0,u=n.length;t<u;t++)r(n[t])()}}}; -},{}],"oTWB":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),i=require("../Control.Bind/index.js"),t=require("../Control.Monad/index.js"),o=require("../Data.Functor/index.js"),u=require("../Data.Monoid/index.js"),f=require("../Data.Semigroup/index.js"),c=new t.Monad(function(){return d},function(){return p}),p=new i.Bind(function(){return a},e.bindE),a=new r.Apply(function(){return E},t.ap(c)),d=new n.Applicative(function(){return a},e.pureE),E=new o.Functor(n.liftA1(d)),l=function(e){return new f.Semigroup(r.lift2(a)(f.append(e)))},s=function(n){return new u.Monoid(function(){return l(n.Semigroup0())},e.pureE(u.mempty(n)))};module.exports={functorEffect:E,applyEffect:a,applicativeEffect:d,bindEffect:p,monadEffect:c,semigroupEffect:l,monoidEffect:s,untilE:e.untilE,whileE:e.whileE,forE:e.forE,foreachE:e.foreachE}; -},{"./foreign.js":"bXvE","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ"}],"bagd":[function(require,module,exports) { -"use strict";exports.new=function(n){return function(){return{value:n}}},exports.read=function(n){return function(){return n.value}},exports["modify'"]=function(n){return function(t){return function(){var r=n(t.value);return t.value=r.state,r.value}}},exports.write=function(n){return function(t){return function(){return t.value=n,{}}}}; -},{}],"/Jaj":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),r=require("../Data.Functor/index.js"),t=require("../Effect/index.js"),i=function(r){return e["modify'"](function(e){var t=r(e);return{state:t,value:t}})},n=function(e){return function(n){return r.void(t.functorEffect)(i(e)(n))}};module.exports={modify:i,modify_:n,new:e.new,read:e.read,"modify'":e["modify'"],write:e.write}; -},{"./foreign.js":"bagd","../Data.Functor/index.js":"+0AE","../Effect/index.js":"oTWB"}],"UVIy":[function(require,module,exports) { -"use strict";var n=require("../Control.Bind/index.js"),t=require("../Control.Monad/index.js"),e=require("../Data.Bifunctor/index.js"),r=require("../Data.Either/index.js"),u=require("../Data.Functor/index.js"),o=require("../Data.Identity/index.js"),i=require("../Data.Maybe/index.js"),c=require("../Data.Unit/index.js"),a=require("../Effect/index.js"),f=require("../Effect.Ref/index.js"),l=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),s=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),d=function(n,t){this.Monad0=n,this.tailRecM=t},m=function(n){return n.tailRecM},w=function(n){return function(t){return function(e){return function(r){return m(n)(function(n){return t(n.a)(n.b)})({a:e,b:r})}}}},v=function(n){return function(t){return function(e){return function(r){return function(u){return m(n)(function(n){return t(n.a)(n.b)(n.c)})({a:e,b:r,c:u})}}}}},h=function(n){return function(t){return function(t){var e,r=!1;function u(e){if(!(e instanceof l)){if(e instanceof s)return r=!0,e.value0;throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 91, column 3 - line 91, column 25): "+[e.constructor.name])}t=n(e.value0)}for(;!r;)e=u(t);return e}(n(t))}},R=new d(function(){return i.monadMaybe},function(n){return function(t){return h(function(t){if(t instanceof i.Nothing)return new s(i.Nothing.value);if(t instanceof i.Just&&t.value0 instanceof l)return new l(n(t.value0.value0));if(t instanceof i.Just&&t.value0 instanceof s)return new s(new i.Just(t.value0.value0));throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 127, column 7 - line 127, column 31): "+[t.constructor.name])})(n(t))}}),M=new d(function(){return o.monadIdentity},function(n){var t=h(function(t){return n(t)});return function(n){return o.Identity(t(n))}}),p=new d(function(){return t.monadFn},function(n){return function(t){return function(e){return h(function(t){return n(t)(e)})(t)}}}),C=new d(function(){return r.monadEither},function(n){return function(t){return h(function(t){if(t instanceof r.Left)return new s(new r.Left(t.value0));if(t instanceof r.Right&&t.value0 instanceof l)return new l(n(t.value0.value0));if(t instanceof r.Right&&t.value0 instanceof s)return new s(new r.Right(t.value0.value0));throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 119, column 7 - line 119, column 33): "+[t.constructor.name])})(n(t))}}),E=new d(function(){return a.monadEffect},function(t){return function(e){var r=function(n){if(n instanceof s)return n.value0;throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 111, column 30 - line 111, column 44): "+[n.constructor.name])};return function(){var o=n.bindFlipped(a.bindEffect)(f.new)(t(e))();return function(){for(;!function(){var n=f.read(o)();if(n instanceof l){var e=t(n.value0)();f.write(e)(o)();return!1}if(n instanceof s)return!0;throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 102, column 22 - line 107, column 28): "+[n.constructor.name])}(););}(),u.map(a.functorEffect)(r)(f.read(o))()}}}),F=new u.Functor(function(n){return function(t){if(t instanceof l)return new l(t.value0);if(t instanceof s)return new s(n(t.value0));throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 25, column 1 - line 25, column 48): "+[t.constructor.name])}}),x=function(n){return function(t){return m(n)(function(e){return u.voidRight(n.Monad0().Bind1().Apply0().Functor0())(new l(e))(t)})(c.unit)}},b=new e.Bifunctor(function(n){return function(t){return function(e){if(e instanceof l)return new l(n(e.value0));if(e instanceof s)return new s(t(e.value0));throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 27, column 1 - line 29, column 34): "+[n.constructor.name,t.constructor.name,e.constructor.name])}}});module.exports={Loop:l,Done:s,MonadRec:d,tailRec:h,tailRecM:m,tailRecM2:w,tailRecM3:v,forever:x,functorStep:F,bifunctorStep:b,monadRecIdentity:M,monadRecEffect:E,monadRecFunction:p,monadRecEither:C,monadRecMaybe:R}; -},{"../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Bifunctor/index.js":"e2Wc","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Maybe/index.js":"5mN7","../Data.Unit/index.js":"NhVk","../Effect/index.js":"oTWB","../Effect.Ref/index.js":"/Jaj"}],"4sh7":[function(require,module,exports) { -"use strict";exports.map_=function(n){return function(r){return function(){return n(r())}}},exports.pure_=function(n){return function(){return n}},exports.bind_=function(n){return function(r){return function(){return r(n())()}}},exports.run=function(n){return n()},exports.while=function(n){return function(r){return function(){for(;n();)r()}}},exports.for=function(n){return function(r){return function(t){return function(){for(var u=n;u<r;u++)t(u)()}}}},exports.foreach=function(n){return function(r){return function(){for(var t=0,u=n.length;t<u;t++)r(n[t])()}}},exports.new=function(n){return function(){return{value:n}}},exports.read=function(n){return function(){return n.value}},exports["modify'"]=function(n){return function(r){return function(){var t=n(r.value);return r.value=t.state,t.value}}},exports.write=function(n){return function(r){return function(){return r.value=n}}}; -},{}],"Sedc":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),i=require("../Control.Bind/index.js"),t=require("../Control.Monad/index.js"),o=require("../Control.Monad.Rec.Class/index.js"),u=require("../Data.Functor/index.js"),a=require("../Data.Unit/index.js"),c=function(r){return n["modify'"](function(n){var e=r(n);return{state:e,value:e}})},d=new u.Functor(n.map_),l=new t.Monad(function(){return s},function(){return f}),f=new i.Bind(function(){return p},n.bind_),p=new e.Apply(function(){return d},t.ap(l)),s=new r.Applicative(function(){return p},n.pure_),m=new o.MonadRec(function(){return l},function(e){return function(t){var c=function(n){return n instanceof o.Loop},l=function(n){if(n instanceof o.Done)return n.value0;throw new Error("Failed pattern match at Control.Monad.ST.Internal (line 54, column 32 - line 54, column 46): "+[n.constructor.name])};return i.bind(f)(i.bindFlipped(f)(n.new)(e(t)))(function(t){return i.discard(i.discardUnit)(f)(n.while(u.map(d)(c)(n.read(t)))(i.bind(f)(n.read(t))(function(c){if(c instanceof o.Loop)return i.bind(f)(e(c.value0))(function(r){return u.void(d)(n.write(r)(t))});if(c instanceof o.Done)return r.pure(s)(a.unit);throw new Error("Failed pattern match at Control.Monad.ST.Internal (line 46, column 18 - line 50, column 28): "+[c.constructor.name])})))(function(){return u.map(d)(l)(n.read(t))})})}});module.exports={modify:c,functorST:d,applyST:p,applicativeST:s,bindST:f,monadST:l,monadRecST:m,map_:n.map_,pure_:n.pure_,bind_:n.bind_,run:n.run,while:n.while,for:n.for,foreach:n.foreach,new:n.new,read:n.read,"modify'":n["modify'"],write:n.write}; -},{"./foreign.js":"4sh7","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Control.Monad.Rec.Class/index.js":"UVIy","../Data.Functor/index.js":"+0AE","../Data.Unit/index.js":"NhVk"}],"pEQc":[function(require,module,exports) { -"use strict";exports.empty=function(){return[]},exports.peekImpl=function(n){return function(t){return function(r){return function(u){return function(){return r>=0&&r<u.length?n(u[r]):t}}}}},exports.poke=function(n){return function(t){return function(r){return function(){var u=n>=0&&n<r.length;return u&&(r[n]=t),u}}}},exports.popImpl=function(n){return function(t){return function(r){return function(){return r.length>0?n(r.pop()):t}}}},exports.pushAll=function(n){return function(t){return function(){return t.push.apply(t,n)}}},exports.shiftImpl=function(n){return function(t){return function(r){return function(){return r.length>0?n(r.shift()):t}}}},exports.unshiftAll=function(n){return function(t){return function(){return t.unshift.apply(t,n)}}},exports.splice=function(n){return function(t){return function(r){return function(u){return function(){return u.splice.apply(u,[n,t].concat(r))}}}}},exports.copyImpl=function(n){return function(){return n.slice()}},exports.sortByImpl=function(n){return function(t){return function(){return t.sort(function(t,r){return n(t)(r)})}}},exports.toAssocArray=function(n){return function(){for(var t=n.length,r=new Array(t),u=0;u<t;u++)r[u]={value:n[u],index:u};return r}}; -},{}],"s8si":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Control.Applicative/index.js"),t=require("../Control.Bind/index.js"),e=require("../Control.Monad.ST.Internal/index.js"),u=require("../Data.Maybe/index.js"),i=require("../Data.Ord/index.js"),o=require("../Data.Ordering/index.js"),a=function(r){return n.unshiftAll([r])},c=function(){var n=r.pure(e.applicativeST);return function(r){return n(r)}}(),s=function(){var n=r.pure(e.applicativeST);return function(r){return n(r)}}(),l=n.copyImpl,f=function(n){return function(r){return function(){var t=l(r)();n(t)();return s(t)()}}},p=function(r){return n.sortByImpl(function(n){return function(t){var e=r(n)(t);if(e instanceof o.GT)return 1;if(e instanceof o.EQ)return 0;if(e instanceof o.LT)return-1;throw new Error("Failed pattern match at Data.Array.ST (line 109, column 15 - line 112, column 13): "+[e.constructor.name])}})},h=function(n){return function(r){return p(i.comparing(n)(r))}},m=function(n){return p(i.compare(n))},d=n.shiftImpl(u.Just.create)(u.Nothing.value),A=function(n){return t.bind(e.bindST)(n)(s)()},v=function(r){return n.pushAll([r])},y=n.popImpl(u.Just.create)(u.Nothing.value),T=n.peekImpl(u.Just.create)(u.Nothing.value),g=function(r){return function(t){return function(e){return function(){var i=T(r)(e)();if(i instanceof u.Just)return n.poke(r)(t(i.value0))(e)();if(i instanceof u.Nothing)return!1;throw new Error("Failed pattern match at Data.Array.ST (line 195, column 3 - line 197, column 26): "+[i.constructor.name])}}}},j=n.copyImpl;module.exports={run:A,withArray:f,peek:T,modify:g,pop:y,push:v,shift:d,unshift:a,sort:m,sortBy:p,sortWith:h,freeze:j,thaw:l,unsafeFreeze:s,unsafeThaw:c,empty:n.empty,poke:n.poke,pushAll:n.pushAll,unshiftAll:n.unshiftAll,splice:n.splice,toAssocArray:n.toAssocArray}; -},{"./foreign.js":"pEQc","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.ST.Internal/index.js":"Sedc","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun"}],"Wi7L":[function(require,module,exports) { -"use strict";var n=require("../Control.Monad.ST.Internal/index.js"),r=require("../Data.Array.ST/index.js"),t=require("../Data.Function/index.js"),e=require("../Data.Functor/index.js"),u=require("../Data.HeytingAlgebra/index.js"),a=require("../Data.Maybe/index.js"),i=function(){function n(n,r){this.value0=n,this.value1=r}return n.create=function(r){return function(t){return new n(r,t)}},n}(),o=function(r){return function(){var t=n.read(r.value1)();return r.value0(t)}},c=function(r){return function(){var t=n.read(r.value1)();n.modify(function(n){return n+1|0})(r.value1)();return r.value0(t)}},f=function(t){return function(i){return function(f){return function(){for(var l=n.new(!1)();e.map(n.functorST)(u.not(u.heytingAlgebraBoolean))(n.read(l))();)!function(){var u=o(i)();if(u instanceof a.Just&&t(u.value0)){r.push(u.value0)(f)();return e.void(n.functorST)(c(i))()}e.void(n.functorST)(n.write(!0)(l))()}();return{}}}}},l=f(t.const(!0)),s=function(r){return e.map(n.functorST)(i.create(r))(n.new(0))},v=function(r){return function(t){return function(){for(var i=n.new(!1)();e.map(n.functorST)(u.not(u.heytingAlgebraBoolean))(n.read(i))();)!function(){var u=c(r)();if(u instanceof a.Just)return t(u.value0)();if(u instanceof a.Nothing)return e.void(n.functorST)(n.write(!0)(i))();throw new Error("Failed pattern match at Data.Array.ST.Iterator (line 42, column 5 - line 44, column 47): "+[u.constructor.name])}();return{}}}},d=function(){var r=e.map(n.functorST)(a.isNothing);return function(n){return r(o(n))}}();module.exports={iterator:s,iterate:v,next:c,peek:o,exhausted:d,pushWhile:f,pushAll:l}; -},{"../Control.Monad.ST.Internal/index.js":"Sedc","../Data.Array.ST/index.js":"s8si","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Maybe/index.js":"5mN7"}],"e7y+":[function(require,module,exports) { -"use strict";var n=require("../Data.HeytingAlgebra/index.js"),e=function(n){this.HeytingAlgebraRecord0=n},r=function(n){this.HeytingAlgebra0=n},o=new r(function(){return n.heytingAlgebraUnit}),t=new e(function(){return n.heytingAlgebraRecordNil}),i=function(r){return function(o){return function(t){return function(i){return new e(function(){return n.heytingAlgebraRecordCons(r)(o)(t.HeytingAlgebraRecord0())(i.HeytingAlgebra0())})}}}},a=function(e){return function(o){return new r(function(){return n.heytingAlgebraRecord(e)(o.HeytingAlgebraRecord0())})}},g=function(e){return new r(function(){return n.heytingAlgebraFunction(e.HeytingAlgebra0())})},l=new r(function(){return n.heytingAlgebraBoolean});module.exports={BooleanAlgebra:r,BooleanAlgebraRecord:e,booleanAlgebraBoolean:l,booleanAlgebraUnit:o,booleanAlgebraFn:g,booleanAlgebraRecord:a,booleanAlgebraRecordNil:t,booleanAlgebraRecordCons:i}; -},{"../Data.HeytingAlgebra/index.js":"paZe"}],"8PTu":[function(require,module,exports) { -"use strict";var t=require("../Control.Category/index.js"),n=require("../Data.Functor/index.js"),r=require("../Data.Identity/index.js"),u=require("../Data.Newtype/index.js"),e=function(t,n,r){this.Functor0=t,this.collect=n,this.distribute=r},i=new e(function(){return r.functorIdentity},function(t){return function(e){var i,c=n.map(t)((i=u.unwrap(r.newtypeIdentity),function(t){return i(e(t))}));return function(t){return r.Identity(c(t))}}},function(t){var e=n.map(t)(u.unwrap(r.newtypeIdentity));return function(t){return r.Identity(e(t))}}),c=function(t){return t.distribute},o=new e(function(){return n.functorFn},function(t){return function(r){var u=c(o)(t),e=n.map(t)(r);return function(t){return u(e(t))}}},function(t){return function(r){return function(u){return n.map(t)(function(t){return t(u)})(r)}}}),f=function(t){return function(r){return function(u){var e=n.map(t.Functor0())(u),i=c(t)(r);return function(t){return e(i(t))}}}},a=function(t){return function(r){return function(u){var e=c(t)(r),i=n.map(r)(u);return function(t){return e(i(t))}}}},d=function(t){return t.collect},s=function(n){return function(r){return d(n)(r)(t.identity(t.categoryFn))}};module.exports={collect:d,distribute:c,Distributive:e,distributeDefault:s,collectDefault:a,cotraverse:f,distributiveIdentity:i,distributiveFunction:o}; -},{"../Control.Category/index.js":"IAi2","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Newtype/index.js":"lz8k"}],"Uq/R":[function(require,module,exports) { -"use strict";var t=function(t,n){this.from=t,this.to=n},n=function(t){return t.to},r=new t(function(t){return t},function(t){return t}),o=function(t){return t.from};module.exports={TypeEquals:t,to:n,from:o,refl:r}; -},{}],"II/O":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),u=require("../Control.Biapplicative/index.js"),r=require("../Control.Biapply/index.js"),t=require("../Control.Bind/index.js"),i=require("../Control.Comonad/index.js"),o=require("../Control.Extend/index.js"),a=require("../Control.Lazy/index.js"),l=require("../Control.Monad/index.js"),c=require("../Control.Semigroupoid/index.js"),f=require("../Data.Bifoldable/index.js"),v=require("../Data.Bifunctor/index.js"),p=require("../Data.Bitraversable/index.js"),d=require("../Data.BooleanAlgebra/index.js"),s=require("../Data.Bounded/index.js"),w=require("../Data.CommutativeRing/index.js"),m=require("../Data.Distributive/index.js"),q=require("../Data.Eq/index.js"),x=require("../Data.Foldable/index.js"),b=require("../Data.FoldableWithIndex/index.js"),T=require("../Data.Functor/index.js"),j=require("../Data.Functor.Invariant/index.js"),g=require("../Data.FunctorWithIndex/index.js"),y=require("../Data.HeytingAlgebra/index.js"),D=require("../Data.Maybe/index.js"),F=require("../Data.Maybe.First/index.js"),A=require("../Data.Monoid/index.js"),h=require("../Data.Newtype/index.js"),S=require("../Data.Ord/index.js"),B=require("../Data.Ordering/index.js"),C=require("../Data.Ring/index.js"),I=require("../Data.Semigroup/index.js"),E=require("../Data.Semigroup.Foldable/index.js"),W=require("../Data.Semigroup.Traversable/index.js"),M=require("../Data.Semiring/index.js"),R=require("../Data.Show/index.js"),O=require("../Data.Traversable/index.js"),z=require("../Data.TraversableWithIndex/index.js"),H=require("../Data.Unit/index.js"),L=require("../Type.Equality/index.js"),G=function(){function n(n,e){this.value0=n,this.value1=e}return n.create=function(e){return function(u){return new n(e,u)}},n}(),N=function(n){return function(e){return n(e.value0)(e.value1)}},k=function(n){return new G(n.value1,n.value0)},J=function(n){return n.value1},U=function(n){return function(e){return new R.Show(function(u){return"(Tuple "+R.show(n)(u.value0)+" "+R.show(e)(u.value1)+")"})}},K=function(n){return function(e){return new M.Semiring(function(u){return function(r){return new G(M.add(n)(u.value0)(r.value0),M.add(e)(u.value1)(r.value1))}},function(u){return function(r){return new G(M.mul(n)(u.value0)(r.value0),M.mul(e)(u.value1)(r.value1))}},new G(M.one(n),M.one(e)),new G(M.zero(n),M.zero(e)))}},P=new c.Semigroupoid(function(n){return function(e){return new G(e.value0,n.value1)}}),Q=function(n){return function(e){return new I.Semigroup(function(u){return function(r){return new G(I.append(n)(u.value0)(r.value0),I.append(e)(u.value1)(r.value1))}})}},V=function(n){return function(e){return new C.Ring(function(){return K(n.Semiring0())(e.Semiring0())},function(u){return function(r){return new G(C.sub(n)(u.value0)(r.value0),C.sub(e)(u.value1)(r.value1))}})}},X=function(n){return function(e){return new A.Monoid(function(){return Q(n.Semigroup0())(e.Semigroup0())},new G(A.mempty(n),A.mempty(e)))}},Y=function(n){return function(e){return function(u){var r=h.unwrap(F.newtypeFirst),t=x.foldMap(n)(F.monoidFirst)(function(n){return q.eq(e)(u)(n.value0)?new D.Just(n.value1):D.Nothing.value});return function(n){return r(t(n))}}}},Z=function(n){return function(e){return new y.HeytingAlgebra(function(u){return function(r){return new G(y.conj(n)(u.value0)(r.value0),y.conj(e)(u.value1)(r.value1))}},function(u){return function(r){return new G(y.disj(n)(u.value0)(r.value0),y.disj(e)(u.value1)(r.value1))}},new G(y.ff(n),y.ff(e)),function(u){return function(r){return new G(y.implies(n)(u.value0)(r.value0),y.implies(e)(u.value1)(r.value1))}},function(u){return new G(y.not(n)(u.value0),y.not(e)(u.value1))},new G(y.tt(n),y.tt(e)))}},$=new T.Functor(function(n){return function(e){return new G(e.value0,n(e.value1))}}),_=new g.FunctorWithIndex(function(){return $},function(n){return T.map($)(n(H.unit))}),nn=new j.Invariant(j.imapF($)),en=function(n){return n.value0},un=function(n){return function(e){return new a.Lazy(function(u){return new G(a.defer(n)(function(n){return en(u(H.unit))}),a.defer(e)(function(n){return J(u(H.unit))}))})}},rn=new x.Foldable(function(n){return function(n){return function(e){return n(e.value1)}}},function(n){return function(e){return function(u){return n(e)(u.value1)}}},function(n){return function(e){return function(u){return n(u.value1)(e)}}}),tn=new b.FoldableWithIndex(function(){return rn},function(n){return function(n){return function(e){return n(H.unit)(e.value1)}}},function(n){return function(e){return function(u){return n(H.unit)(e)(u.value1)}}},function(n){return function(e){return function(u){return n(H.unit)(u.value1)(e)}}}),on=new O.Traversable(function(){return rn},function(){return $},function(n){return function(e){return T.map(n.Apply0().Functor0())(G.create(e.value0))(e.value1)}},function(n){return function(e){return function(u){return T.map(n.Apply0().Functor0())(G.create(u.value0))(e(u.value1))}}}),an=new z.TraversableWithIndex(function(){return tn},function(){return _},function(){return on},function(n){return function(e){return function(u){return T.map(n.Apply0().Functor0())(G.create(u.value0))(e(H.unit)(u.value1))}}}),ln=new E.Foldable1(function(){return rn},function(n){return function(n){return n.value1}},function(n){return function(n){return function(e){return n(e.value1)}}}),cn=new W.Traversable1(function(){return ln},function(){return on},function(n){return function(e){return T.map(n.Functor0())(G.create(e.value0))(e.value1)}},function(n){return function(e){return function(u){return T.map(n.Functor0())(G.create(u.value0))(e(u.value1))}}}),fn=new o.Extend(function(){return $},function(n){return function(e){return new G(e.value0,n(e))}}),vn=function(n){return function(e){return new q.Eq(function(u){return function(r){return q.eq(n)(u.value0)(r.value0)&&q.eq(e)(u.value1)(r.value1)}})}},pn=function(n){return function(e){return new S.Ord(function(){return vn(n.Eq0())(e.Eq0())},function(u){return function(r){var t=S.compare(n)(u.value0)(r.value0);return t instanceof B.LT?B.LT.value:t instanceof B.GT?B.GT.value:S.compare(e)(u.value1)(r.value1)}})}},dn=function(n){return new q.Eq1(function(e){return q.eq(vn(n)(e))})},sn=function(n){return new S.Ord1(function(){return dn(n.Eq0())},function(e){return S.compare(pn(n)(e))})},wn=function n(e){return new m.Distributive(function(){return $},function(u){return m.collectDefault(n(e))(u)},function(n){var u=G.create(L.from(e)(H.unit)),r=T.map(n)(J);return function(n){return u(r(n))}})},mn=function(n){return function(e){return function(u){return n(new G(e,u))}}},qn=new i.Comonad(function(){return fn},J),xn=function(n){return function(e){return new w.CommutativeRing(function(){return V(n.Ring0())(e.Ring0())})}},bn=function(n){return function(e){return new s.Bounded(function(){return pn(n.Ord0())(e.Ord0())},new G(s.bottom(n),s.bottom(e)),new G(s.top(n),s.top(e)))}},Tn=function(n){return function(e){return new d.BooleanAlgebra(function(){return Z(n.HeytingAlgebra0())(e.HeytingAlgebra0())})}},jn=new v.Bifunctor(function(n){return function(e){return function(u){return new G(n(u.value0),e(u.value1))}}}),gn=new f.Bifoldable(function(n){return function(e){return function(u){return function(r){return I.append(n.Semigroup0())(e(r.value0))(u(r.value1))}}}},function(n){return function(e){return function(u){return function(r){return e(n(u)(r.value0))(r.value1)}}}},function(n){return function(e){return function(u){return function(r){return n(r.value0)(e(r.value1)(u))}}}}),yn=new p.Bitraversable(function(){return gn},function(){return jn},function(n){return function(u){return e.apply(n.Apply0())(T.map(n.Apply0().Functor0())(G.create)(u.value0))(u.value1)}},function(n){return function(u){return function(r){return function(t){return e.apply(n.Apply0())(T.map(n.Apply0().Functor0())(G.create)(u(t.value0)))(r(t.value1))}}}}),Dn=new r.Biapply(function(){return jn},function(n){return function(e){return new G(n.value0(e.value0),n.value1(e.value1))}}),Fn=new u.Biapplicative(function(){return Dn},G.create),An=function(n){return new e.Apply(function(){return $},function(e){return function(u){return new G(I.append(n)(e.value0)(u.value0),e.value1(u.value1))}})},hn=function(n){return new t.Bind(function(){return An(n)},function(e){return function(u){var r=u(e.value1);return new G(I.append(n)(e.value0)(r.value0),r.value1)}})},Sn=function(e){return new n.Applicative(function(){return An(e.Semigroup0())},G.create(A.mempty(e)))},Bn=function(n){return new l.Monad(function(){return Sn(n)},function(){return hn(n.Semigroup0())})};module.exports={Tuple:G,fst:en,snd:J,curry:mn,uncurry:N,swap:k,lookup:Y,showTuple:U,eqTuple:vn,eq1Tuple:dn,ordTuple:pn,ord1Tuple:sn,boundedTuple:bn,semigroupoidTuple:P,semigroupTuple:Q,monoidTuple:X,semiringTuple:K,ringTuple:V,commutativeRingTuple:xn,heytingAlgebraTuple:Z,booleanAlgebraTuple:Tn,functorTuple:$,functorWithIndexTuple:_,invariantTuple:nn,bifunctorTuple:jn,applyTuple:An,biapplyTuple:Dn,applicativeTuple:Sn,biapplicativeTuple:Fn,bindTuple:hn,monadTuple:Bn,extendTuple:fn,comonadTuple:qn,lazyTuple:un,foldableTuple:rn,foldable1Tuple:ln,foldableWithIndexTuple:tn,bifoldableTuple:gn,traversableTuple:on,traversable1Tuple:cn,traversableWithIndexTuple:an,bitraversableTuple:yn,distributiveTuple:wn}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Biapplicative/index.js":"Sd0N","../Control.Biapply/index.js":"X0ga","../Control.Bind/index.js":"7VcT","../Control.Comonad/index.js":"U0zO","../Control.Extend/index.js":"JIoJ","../Control.Lazy/index.js":"y9cE","../Control.Monad/index.js":"U/Ix","../Control.Semigroupoid/index.js":"/riR","../Data.Bifoldable/index.js":"wjQo","../Data.Bifunctor/index.js":"e2Wc","../Data.Bitraversable/index.js":"8nb9","../Data.BooleanAlgebra/index.js":"e7y+","../Data.Bounded/index.js":"kcUU","../Data.CommutativeRing/index.js":"60TQ","../Data.Distributive/index.js":"8PTu","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Functor/index.js":"+0AE","../Data.Functor.Invariant/index.js":"AXkC","../Data.FunctorWithIndex/index.js":"OHRN","../Data.HeytingAlgebra/index.js":"paZe","../Data.Maybe/index.js":"5mN7","../Data.Maybe.First/index.js":"W/l6","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Ring/index.js":"E2qH","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Unit/index.js":"NhVk","../Type.Equality/index.js":"Uq/R"}],"v/61":[function(require,module,exports) { -"use strict";exports.unfoldrArrayImpl=function(r){return function(n){return function(t){return function(u){return function(f){return function(o){for(var e=[],i=o;;){var c=f(i);if(r(c))return e;var a=n(c);e.push(t(a)),i=u(a)}}}}}}}; -},{}],"rpkt":[function(require,module,exports) { -"use strict";exports.unfoldr1ArrayImpl=function(r){return function(n){return function(t){return function(u){return function(f){return function(o){for(var e=[],i=o;;){var c=f(i);e.push(t(c));var a=u(c);if(r(a))return e;i=n(a)}}}}}}}; -},{}],"S0Nl":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Data.Boolean/index.js"),e=require("../Data.Maybe/index.js"),t=require("../Data.Semigroup.Traversable/index.js"),u=require("../Data.Tuple/index.js"),i=function(n){this.unfoldr1=n},o=function(n){return n.unfoldr1},a=new i(n.unfoldr1ArrayImpl(e.isNothing)(e.fromJust())(u.fst)(u.snd)),f=function(n){return function(t){return function(i){return o(n)(function(n){if(n<=0)return new u.Tuple(i,e.Nothing.value);if(r.otherwise)return new u.Tuple(i,new e.Just(n-1|0));throw new Error("Failed pattern match at Data.Unfoldable1 (line 64, column 5 - line 64, column 39): "+[n.constructor.name])})(t-1|0)}}},l=function(n){return function(r){return function(e){return function(u){return function(i){return t.sequence1(e)(n)(f(r)(u)(i))}}}}},c=function(n){return f(n)(1)},s=function(n){return function(r){return function(t){var i=t>=r?1:-1;return o(n)(function(n){return function(r){var i=r+n|0;return new u.Tuple(r,r===t?e.Nothing.value:new e.Just(i))}}(i))(r)}}};module.exports={Unfoldable1:i,unfoldr1:o,replicate1:f,replicate1A:l,singleton:c,range:s,unfoldable1Array:a}; -},{"./foreign.js":"rpkt","../Data.Boolean/index.js":"ObQr","../Data.Maybe/index.js":"5mN7","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Tuple/index.js":"II/O"}],"77+Z":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),e=require("../Data.Function/index.js"),r=require("../Data.Functor/index.js"),u=require("../Data.Maybe/index.js"),t=require("../Data.Traversable/index.js"),i=require("../Data.Tuple/index.js"),o=require("../Data.Unfoldable1/index.js"),a=require("../Data.Unit/index.js"),f=function(n,e){this.Unfoldable10=n,this.unfoldr=e},l=function(n){return n.unfoldr},c=new f(function(){return o.unfoldable1Array},n.unfoldrArrayImpl(u.isNothing)(u.fromJust())(i.fst)(i.snd)),s=function(n){return function(e){return function(r){return l(n)(function(n){return n<=0?u.Nothing.value:new u.Just(new i.Tuple(r,n-1|0))})(e)}}},d=function(n){return function(e){return function(r){return function(u){return function(i){return t.sequence(r)(n)(s(e)(u)(i))}}}}},b=function(n){return l(n)(e.const(u.Nothing.value))(a.unit)},p=function(n){return l(n)(function(n){return r.map(u.functorMaybe)(e.flip(i.Tuple.create)(u.Nothing.value))(n)})};module.exports={Unfoldable:f,unfoldr:l,replicate:s,replicateA:d,none:b,fromMaybe:p,unfoldableArray:c}; -},{"./foreign.js":"v/61","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Unfoldable1/index.js":"S0Nl","../Data.Unit/index.js":"NhVk"}],"4t4C":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Control.Alt/index.js"),t=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),u=require("../Control.Bind/index.js"),i=require("../Control.Category/index.js"),o=require("../Control.Lazy/index.js"),a=require("../Control.Monad.Rec.Class/index.js"),c=require("../Control.Monad.ST.Internal/index.js"),f=require("../Data.Array.ST/index.js"),l=require("../Data.Array.ST.Iterator/index.js"),s=require("../Data.Boolean/index.js"),p=require("../Data.Eq/index.js"),d=require("../Data.Foldable/index.js"),h=require("../Data.Function/index.js"),m=require("../Data.Functor/index.js"),v=require("../Data.HeytingAlgebra/index.js"),y=require("../Data.Maybe/index.js"),g=require("../Data.Ord/index.js"),A=require("../Data.Ordering/index.js"),q=require("../Data.Semigroup/index.js"),x=require("../Data.Traversable/index.js"),w=require("../Data.Tuple/index.js"),b=require("../Data.Unfoldable/index.js"),F=function(r){return function(t){return function(e){return function(u){return x.sequence(x.traversableArray)(r)(n.zipWith(t)(e)(u))}}}},T=n.zipWith(w.Tuple.create),j=function(n){return function(r){return function(t){return f.withArray(function(t){return d.traverse_(c.applicativeST)(n)(function(n){return f.poke(n.value0)(n.value1)(t)})(r)})(t)()}}},D=n._updateAt(y.Just.create)(y.Nothing.value),J=function(r){return n.unsafeIndexImpl},I=n["uncons'"](h.const(y.Nothing.value))(function(n){return function(r){return new y.Just({head:n,tail:r})}}),N=function(r){return function(t){var e=n.length(t);return b.unfoldr(r)(function(n){if(n<e)return new y.Just(new w.Tuple(J()(t)(n),n+1|0));if(s.otherwise)return y.Nothing.value;throw new Error("Failed pattern match at Data.Array (line 143, column 3 - line 145, column 26): "+[n.constructor.name])})(0)}},z=function(r){return function(t){return n.drop(n.length(t)-r|0)(t)}},E=n["uncons'"](h.const(y.Nothing.value))(function(n){return function(n){return new y.Just(n)}}),S=function(r){return function(t){return n.sortImpl(function(n){return function(t){var e=r(n)(t);if(e instanceof A.GT)return 1;if(e instanceof A.EQ)return 0;if(e instanceof A.LT)return-1;throw new Error("Failed pattern match at Data.Array (line 702, column 15 - line 705, column 13): "+[e.constructor.name])}})(t)}},B=function(n){return function(r){return S(g.comparing(n)(r))}},M=function(n){return function(r){return S(g.compare(n))(r)}},W=function(n){return[n]},C=function(r){return 0===n.length(r)},k=function(n){return function(r){return e=f.empty(),c.foreach(r)(function(r){return function(){var u,i,o=m.map(c.functorST)((u=v.not(v.heytingAlgebraBoolean),i=d.any(d.foldableArray)(v.heytingAlgebraBoolean)(function(t){return n(t)(r)}),function(n){return u(i(n))}))(f.unsafeFreeze(e))();return t.when(c.applicativeST)(o)(m.void(c.functorST)(f.push(r)(e)))()}})(),f.unsafeFreeze(e)();var e}},L=function(n){return k(p.eq(n))},_=function(n){return function(r){return function(t){return function(e){return f.withArray(function(e){return d.traverse_(c.applicativeST)(n)(function(n){return f.modify(n)(t)(e)})(r)})(e)()}}}},O=function(r){return function(t){return n.zipWith(r)(n.range(0)(n.length(t)-1|0))(t)}},R=function(r){return function(t){return function(u){return e.apply(r.Applicative0().Apply0())(m.map(r.Plus1().Alt0().Functor0())(n.cons)(u))(o.defer(t)(function(n){return G(r)(t)(u)}))}}},G=function(n){return function(e){return function(u){return r.alt(n.Plus1().Alt0())(R(n)(e)(u))(t.pure(n.Applicative0())([]))}}},P=n._insertAt(y.Just.create)(y.Nothing.value),Q=function(r){if(C(r))return y.Nothing.value;if(s.otherwise)return new y.Just(n.slice(0)(n.length(r)-1|0)(r));throw new Error("Failed pattern match at Data.Array (line 323, column 1 - line 323, column 45): "+[r.constructor.name])},U=n.indexImpl(y.Just.create)(y.Nothing.value),H=function(r){return U(r)(n.length(r)-1|0)},K=function(n){return e.apply(y.applyMaybe)(m.map(y.functorMaybe)(function(n){return function(r){return{init:n,last:r}}})(Q(n)))(H(n))},V=function(n){return function(r){return function(t){return y.maybe(y.Nothing.value)(function(e){return D(n)(r(e))(t)})(U(t)(n))}}},X=function(r){return function(t){var e=function(n){var e,u=!1;function i(e){var i=U(t)(e);if(i instanceof y.Just)return r(i.value0)?void(n=e+1|0):(u=!0,new y.Just(e));if(i instanceof y.Nothing)return u=!0,y.Nothing.value;throw new Error("Failed pattern match at Data.Array (line 834, column 5 - line 836, column 25): "+[i.constructor.name])}for(;!u;)e=i(n);return e}(0);if(e instanceof y.Just&&0===e.value0)return{init:[],rest:t};if(e instanceof y.Just)return{init:n.slice(0)(e.value0)(t),rest:n.slice(e.value0)(n.length(t))(t)};if(e instanceof y.Nothing)return{init:t,rest:[]};throw new Error("Failed pattern match at Data.Array (line 821, column 3 - line 827, column 30): "+[e.constructor.name])}},Y=function(n){return function(r){return X(n)(r).init}},Z=function(n){return function(){var r=f.empty(),t=f.empty(),e=l.iterator(function(r){return U(n)(r)})();l.iterate(e)(function(n){return function(){return m.void(c.functorST)(f.push(n.value0)(r))(),m.void(c.functorST)(f.push(n.value1)(t))()}})();var u=f.unsafeFreeze(r)(),i=f.unsafeFreeze(t)();return new w.Tuple(u,i)}()},$=function(n){return U(n)(0)},nn=function(n){return function(r){var e,u=S(function(r){return function(t){return n(w.snd(r))(w.snd(t))}})(O(w.Tuple.create)(r)),i=$(u);if(i instanceof y.Nothing)return[];if(i instanceof y.Just)return m.map(m.functorArray)(w.snd)(B(g.ordInt)(w.fst)((e=f.unsafeThaw(W(i.value0))(),c.foreach(u)(function(r){return function(){var u,i,o=m.map(c.functorST)((u=y.fromJust(void 0),i=function(n){return u(H(n))},function(n){return w.snd(i(n))}))(f.unsafeFreeze(e))();return t.when(c.applicativeST)(p.notEq(A.eqOrdering)(n(o)(r.value1))(A.EQ.value))(m.void(c.functorST)(f.push(r)(e)))()}})(),f.unsafeFreeze(e)())));throw new Error("Failed pattern match at Data.Array (line 903, column 17 - line 911, column 29): "+[i.constructor.name])}},rn=function(n){return nn(g.compare(n))},tn=function(n){return function(r){return t=f.empty(),e=l.iterator(function(n){return U(r)(n)})(),l.iterate(e)(function(r){return m.void(c.functorST)(function(){var u=f.empty();f.push(r)(u)(),l.pushWhile(n(r))(e)(u)();var i=f.unsafeFreeze(u)();return f.push(i)(t)()})})(),f.unsafeFreeze(t)();var t,e}},en=function(n){return function(r){return tn(p.eq(n))(r)}},un=function(n){var r=en(n.Eq0()),t=M(n);return function(n){return r(t(n))}},on=function(r){return n.fromFoldableImpl(d.foldr(r))},an=function(r){return function(e){return function(i){return function(o){return a.tailRecM2(r)(function(i){return function(c){if(c>=n.length(o))return t.pure(r.Monad0().Applicative0())(new a.Done(i));if(s.otherwise)return u.bind(r.Monad0().Bind1())(e(i)(J()(o)(c)))(function(n){return t.pure(r.Monad0().Applicative0())(new a.Loop({a:n,b:c+1|0}))});throw new Error("Failed pattern match at Data.Array (line 1101, column 3 - line 1105, column 42): "+[i.constructor.name,c.constructor.name])}})(i)(0)}}}},cn=function r(e){return function(i){return function(o){return n["uncons'"](function(n){return t.pure(e.Applicative0())(o)})(function(n){return function(t){return u.bind(e.Bind1())(i(o)(n))(function(n){return r(e)(i)(n)(t)})}})}}},fn=n.findLastIndexImpl(y.Just.create)(y.Nothing.value),ln=function(n){return function(r){return function(t){var e=y.maybe(0)(function(n){return n+1|0})(fn(function(t){return p.eq(A.eqOrdering)(n(r)(t))(A.GT.value)})(t));return y.fromJust()(P(e)(r)(t))}}},sn=function(n){return ln(g.compare(n))},pn=n.findIndexImpl(y.Just.create)(y.Nothing.value),dn=function(r){return function(t){return function(e){return n.filter(function(n){return y.isJust(pn(r(n))(e))})(t)}}},hn=function(n){return dn(p.eq(n))},mn=function(n){return function(r){return fn(function(t){return p.eq(n)(t)(r)})}},vn=function(n){return function(r){return pn(function(t){return p.eq(n)(t)(r)})}},yn=function(n){return function(r){return X(n)(r).rest}},gn=function(r){return function(t){return n.take(n.length(t)-r|0)(t)}},An=n._deleteAt(y.Just.create)(y.Nothing.value),qn=function(n){return function(r){return function(t){return 0===t.length?[]:y.maybe(t)(function(n){return y.fromJust()(An(n)(t))})(pn(n(r))(t))}}},xn=function(n){return function(r){return function(t){return q.append(q.semigroupArray)(r)(d.foldl(d.foldableArray)(h.flip(qn(n)))(k(n)(t))(r))}}},wn=function(n){return xn(p.eq(n))},bn=function(n){return qn(p.eq(n))},Fn=function(n){return d.foldr(d.foldableArray)(bn(n))},Tn=h.flip(u.bind(u.bindArray)),jn=function(n){return Tn((r=y.maybe([])(W),function(t){return r(n(t))}));var r},Dn=function(n){return function(r){var t=m.map(n.Apply0().Functor0())(jn(function(n){return n.value1?new y.Just(n.value0):y.Nothing.value})),e=x.traverse(x.traversableArray)(n)(function(t){return m.map(n.Apply0().Functor0())(w.Tuple.create(t))(r(t))});return function(n){return t(e(n))}}},Jn=jn(i.identity(i.categoryFn)),In=function(n){return function(r){return function(t){return y.maybe(y.Nothing.value)(function(e){var u=r(e);if(u instanceof y.Nothing)return An(n)(t);if(u instanceof y.Just)return D(n)(u.value0)(t);throw new Error("Failed pattern match at Data.Array (line 544, column 10 - line 546, column 32): "+[u.constructor.name])})(U(t)(n))}}};module.exports={fromFoldable:on,toUnfoldable:N,singleton:W,some:R,many:G,null:C,insert:sn,insertBy:ln,head:$,last:H,tail:E,init:Q,uncons:I,unsnoc:K,index:U,elemIndex:vn,elemLastIndex:mn,findIndex:pn,findLastIndex:fn,insertAt:P,deleteAt:An,updateAt:D,updateAtIndices:j,modifyAt:V,modifyAtIndices:_,alterAt:In,concatMap:Tn,filterA:Dn,mapMaybe:jn,catMaybes:Jn,mapWithIndex:O,sort:M,sortBy:S,sortWith:B,takeEnd:z,takeWhile:Y,dropEnd:gn,dropWhile:yn,span:X,group:en,"group'":un,groupBy:tn,nub:rn,nubEq:L,nubBy:nn,nubByEq:k,union:wn,unionBy:xn,delete:bn,deleteBy:qn,difference:Fn,intersect:hn,intersectBy:dn,zipWithA:F,zip:T,unzip:Z,foldM:cn,foldRecM:an,unsafeIndex:J,range:n.range,replicate:n.replicate,length:n.length,cons:n.cons,snoc:n.snoc,reverse:n.reverse,concat:n.concat,filter:n.filter,partition:n.partition,slice:n.slice,take:n.take,drop:n.drop,zipWith:n.zipWith}; -},{"./foreign.js":"TZDL","../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Lazy/index.js":"y9cE","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.ST.Internal/index.js":"Sedc","../Data.Array.ST/index.js":"s8si","../Data.Array.ST.Iterator/index.js":"Wi7L","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z"}],"9xaU":[function(require,module,exports) { -var define; -var t,r=function(t){"use strict";var e=1e7,n=7,o=9007199254740992,i=f(o),a=Math.log(o);function u(t,r){return void 0===t?u[0]:void 0!==r?10==+r?H(t):R(t,r):H(t)}function s(t,r){this.value=t,this.sign=r,this.isSmall=!1}function p(t){this.value=t,this.sign=t<0,this.isSmall=!0}function l(t){return-o<t&&t<o}function f(t){return t<1e7?[t]:t<1e14?[t%1e7,Math.floor(t/1e7)]:[t%1e7,Math.floor(t/1e7)%1e7,Math.floor(t/1e14)]}function h(t){v(t);var r=t.length;if(r<4&&P(t,i)<0)switch(r){case 0:return 0;case 1:return t[0];case 2:return t[0]+t[1]*e;default:return t[0]+(t[1]+t[2]*e)*e}return t}function v(t){for(var r=t.length;0===t[--r];);t.length=r+1}function y(t){for(var r=new Array(t),e=-1;++e<t;)r[e]=0;return r}function c(t){return t>0?Math.floor(t):Math.ceil(t)}function g(t,r){var n,o,i=t.length,a=r.length,u=new Array(i),s=0,p=e;for(o=0;o<a;o++)s=(n=t[o]+r[o]+s)>=p?1:0,u[o]=n-s*p;for(;o<i;)s=(n=t[o]+s)===p?1:0,u[o++]=n-s*p;return s>0&&u.push(s),u}function m(t,r){return t.length>=r.length?g(t,r):g(r,t)}function d(t,r){var n,o,i=t.length,a=new Array(i),u=e;for(o=0;o<i;o++)n=t[o]-u+r,r=Math.floor(n/u),a[o]=n-r*u,r+=1;for(;r>0;)a[o++]=r%u,r=Math.floor(r/u);return a}function w(t,r){var n,o,i=t.length,a=r.length,u=new Array(i),s=0,p=e;for(n=0;n<a;n++)(o=t[n]-s-r[n])<0?(o+=p,s=1):s=0,u[n]=o;for(n=a;n<i;n++){if(!((o=t[n]-s)<0)){u[n++]=o;break}o+=p,u[n]=o}for(;n<i;n++)u[n]=t[n];return v(u),u}function b(t,r,n){var o,i,a=t.length,u=new Array(a),l=-r,f=e;for(o=0;o<a;o++)i=t[o]+l,l=Math.floor(i/f),i%=f,u[o]=i<0?i+f:i;return"number"==typeof(u=h(u))?(n&&(u=-u),new p(u)):new s(u,n)}function M(t,r){var n,o,i,a,u=t.length,s=r.length,p=y(u+s),l=e;for(i=0;i<u;++i){a=t[i];for(var f=0;f<s;++f)n=a*r[f]+p[i+f],o=Math.floor(n/l),p[i+f]=n-o*l,p[i+f+1]+=o}return v(p),p}function S(t,r){var n,o,i=t.length,a=new Array(i),u=e,s=0;for(o=0;o<i;o++)n=t[o]*r+s,s=Math.floor(n/u),a[o]=n-s*u;for(;s>0;)a[o++]=s%u,s=Math.floor(s/u);return a}function q(t,r){for(var e=[];r-- >0;)e.push(0);return e.concat(t)}function E(t,r,n){return new s(t<e?S(r,t):M(r,f(t)),n)}function N(t){var r,n,o,i,a=t.length,u=y(a+a),s=e;for(o=0;o<a;o++){i=t[o];for(var p=0;p<a;p++)r=i*t[p]+u[o+p],n=Math.floor(r/s),u[o+p]=r-n*s,u[o+p+1]+=n}return v(u),u}function A(t,r){var n,o,i,a,u=t.length,s=y(u),p=e;for(i=0,n=u-1;n>=0;--n)i=(a=i*p+t[n])-(o=c(a/r))*r,s[n]=0|o;return[s,0|i]}function O(t,r){var n,o,i=H(r),a=t.value,l=i.value;if(0===l)throw new Error("Cannot divide by zero");if(t.isSmall)return i.isSmall?[new p(c(a/l)),new p(a%l)]:[u[0],t];if(i.isSmall){if(1===l)return[t,u[0]];if(-1==l)return[t.negate(),u[0]];var g=Math.abs(l);if(g<e){o=h((n=A(a,g))[0]);var m=n[1];return t.sign&&(m=-m),"number"==typeof o?(t.sign!==i.sign&&(o=-o),[new p(o),new p(m)]):[new s(o,t.sign!==i.sign),new p(m)]}l=f(g)}var d=P(a,l);if(-1===d)return[u[0],t];if(0===d)return[u[t.sign===i.sign?1:-1],u[0]];o=(n=a.length+l.length<=200?function(t,r){var n,o,i,a,u,s,p,l=t.length,f=r.length,v=e,c=y(r.length),g=r[f-1],m=Math.ceil(v/(2*g)),d=S(t,m),w=S(r,m);for(d.length<=l&&d.push(0),w.push(0),g=w[f-1],o=l-f;o>=0;o--){for(n=v-1,d[o+f]!==g&&(n=Math.floor((d[o+f]*v+d[o+f-1])/g)),i=0,a=0,s=w.length,u=0;u<s;u++)i+=n*w[u],p=Math.floor(i/v),a+=d[o+u]-(i-p*v),i=p,a<0?(d[o+u]=a+v,a=-1):(d[o+u]=a,a=0);for(;0!==a;){for(n-=1,i=0,u=0;u<s;u++)(i+=d[o+u]-v+w[u])<0?(d[o+u]=i+v,i=0):(d[o+u]=i,i=1);a+=i}c[o]=n}return d=A(d,m)[0],[h(c),h(d)]}(a,l):function(t,r){for(var n,o,i,a,u,s=t.length,p=r.length,l=[],f=[],y=e;s;)if(f.unshift(t[--s]),v(f),P(f,r)<0)l.push(0);else{i=f[(o=f.length)-1]*y+f[o-2],a=r[p-1]*y+r[p-2],o>p&&(i=(i+1)*y),n=Math.ceil(i/a);do{if(P(u=S(r,n),f)<=0)break;n--}while(n);l.push(n),f=w(f,u)}return l.reverse(),[h(l),h(f)]}(a,l))[0];var b=t.sign!==i.sign,M=n[1],q=t.sign;return"number"==typeof o?(b&&(o=-o),o=new p(o)):o=new s(o,b),"number"==typeof M?(q&&(M=-M),M=new p(M)):M=new s(M,q),[o,M]}function P(t,r){if(t.length!==r.length)return t.length>r.length?1:-1;for(var e=t.length-1;e>=0;e--)if(t[e]!==r[e])return t[e]>r[e]?1:-1;return 0}function x(t){var r=t.abs();return!r.isUnit()&&(!!(r.equals(2)||r.equals(3)||r.equals(5))||!(r.isEven()||r.isDivisibleBy(3)||r.isDivisibleBy(5))&&(!!r.lesser(25)||void 0))}s.prototype=Object.create(u.prototype),p.prototype=Object.create(u.prototype),s.prototype.add=function(t){var r=H(t);if(this.sign!==r.sign)return this.subtract(r.negate());var e=this.value,n=r.value;return r.isSmall?new s(d(e,Math.abs(n)),this.sign):new s(m(e,n),this.sign)},s.prototype.plus=s.prototype.add,p.prototype.add=function(t){var r=H(t),e=this.value;if(e<0!==r.sign)return this.subtract(r.negate());var n=r.value;if(r.isSmall){if(l(e+n))return new p(e+n);n=f(Math.abs(n))}return new s(d(n,Math.abs(e)),e<0)},p.prototype.plus=p.prototype.add,s.prototype.subtract=function(t){var r=H(t);if(this.sign!==r.sign)return this.add(r.negate());var e=this.value,n=r.value;return r.isSmall?b(e,Math.abs(n),this.sign):function(t,r,e){var n;return P(t,r)>=0?n=w(t,r):(n=w(r,t),e=!e),"number"==typeof(n=h(n))?(e&&(n=-n),new p(n)):new s(n,e)}(e,n,this.sign)},s.prototype.minus=s.prototype.subtract,p.prototype.subtract=function(t){var r=H(t),e=this.value;if(e<0!==r.sign)return this.add(r.negate());var n=r.value;return r.isSmall?new p(e-n):b(n,Math.abs(e),e>=0)},p.prototype.minus=p.prototype.subtract,s.prototype.negate=function(){return new s(this.value,!this.sign)},p.prototype.negate=function(){var t=this.sign,r=new p(-this.value);return r.sign=!t,r},s.prototype.abs=function(){return new s(this.value,!1)},p.prototype.abs=function(){return new p(Math.abs(this.value))},s.prototype.multiply=function(t){var r,n,o,i=H(t),a=this.value,p=i.value,l=this.sign!==i.sign;if(i.isSmall){if(0===p)return u[0];if(1===p)return this;if(-1===p)return this.negate();if((r=Math.abs(p))<e)return new s(S(a,r),l);p=f(r)}return n=a.length,o=p.length,new s(-.012*n-.012*o+15e-6*n*o>0?function t(r,e){var n=Math.max(r.length,e.length);if(n<=30)return M(r,e);n=Math.ceil(n/2);var o=r.slice(n),i=r.slice(0,n),a=e.slice(n),u=e.slice(0,n),s=t(i,u),p=t(o,a),l=t(m(i,o),m(u,a)),f=m(m(s,q(w(w(l,s),p),n)),q(p,2*n));return v(f),f}(a,p):M(a,p),l)},s.prototype.times=s.prototype.multiply,p.prototype._multiplyBySmall=function(t){return l(t.value*this.value)?new p(t.value*this.value):E(Math.abs(t.value),f(Math.abs(this.value)),this.sign!==t.sign)},s.prototype._multiplyBySmall=function(t){return 0===t.value?u[0]:1===t.value?this:-1===t.value?this.negate():E(Math.abs(t.value),this.value,this.sign!==t.sign)},p.prototype.multiply=function(t){return H(t)._multiplyBySmall(this)},p.prototype.times=p.prototype.multiply,s.prototype.square=function(){return new s(N(this.value),!1)},p.prototype.square=function(){var t=this.value*this.value;return l(t)?new p(t):new s(N(f(Math.abs(this.value))),!1)},s.prototype.divmod=function(t){var r=O(this,t);return{quotient:r[0],remainder:r[1]}},p.prototype.divmod=s.prototype.divmod,s.prototype.divide=function(t){return O(this,t)[0]},p.prototype.over=p.prototype.divide=s.prototype.over=s.prototype.divide,s.prototype.mod=function(t){return O(this,t)[1]},p.prototype.remainder=p.prototype.mod=s.prototype.remainder=s.prototype.mod,s.prototype.pow=function(t){var r,e,n,o=H(t),i=this.value,a=o.value;if(0===a)return u[1];if(0===i)return u[0];if(1===i)return u[1];if(-1===i)return o.isEven()?u[1]:u[-1];if(o.sign)return u[0];if(!o.isSmall)throw new Error("The exponent "+o.toString()+" is too large.");if(this.isSmall&&l(r=Math.pow(i,a)))return new p(c(r));for(e=this,n=u[1];!0&a&&(n=n.times(e),--a),0!==a;)a/=2,e=e.square();return n},p.prototype.pow=s.prototype.pow,s.prototype.modPow=function(t,r){if(t=H(t),(r=H(r)).isZero())throw new Error("Cannot take modPow with modulus 0");for(var e=u[1],n=this.mod(r);t.isPositive();){if(n.isZero())return u[0];t.isOdd()&&(e=e.multiply(n).mod(r)),t=t.divide(2),n=n.square().mod(r)}return e},p.prototype.modPow=s.prototype.modPow,s.prototype.compareAbs=function(t){var r=H(t),e=this.value,n=r.value;return r.isSmall?1:P(e,n)},p.prototype.compareAbs=function(t){var r=H(t),e=Math.abs(this.value),n=r.value;return r.isSmall?e===(n=Math.abs(n))?0:e>n?1:-1:-1},s.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var r=H(t),e=this.value,n=r.value;return this.sign!==r.sign?r.sign?1:-1:r.isSmall?this.sign?-1:1:P(e,n)*(this.sign?-1:1)},s.prototype.compareTo=s.prototype.compare,p.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var r=H(t),e=this.value,n=r.value;return r.isSmall?e==n?0:e>n?1:-1:e<0!==r.sign?e<0?-1:1:e<0?1:-1},p.prototype.compareTo=p.prototype.compare,s.prototype.equals=function(t){return 0===this.compare(t)},p.prototype.eq=p.prototype.equals=s.prototype.eq=s.prototype.equals,s.prototype.notEquals=function(t){return 0!==this.compare(t)},p.prototype.neq=p.prototype.notEquals=s.prototype.neq=s.prototype.notEquals,s.prototype.greater=function(t){return this.compare(t)>0},p.prototype.gt=p.prototype.greater=s.prototype.gt=s.prototype.greater,s.prototype.lesser=function(t){return this.compare(t)<0},p.prototype.lt=p.prototype.lesser=s.prototype.lt=s.prototype.lesser,s.prototype.greaterOrEquals=function(t){return this.compare(t)>=0},p.prototype.geq=p.prototype.greaterOrEquals=s.prototype.geq=s.prototype.greaterOrEquals,s.prototype.lesserOrEquals=function(t){return this.compare(t)<=0},p.prototype.leq=p.prototype.lesserOrEquals=s.prototype.leq=s.prototype.lesserOrEquals,s.prototype.isEven=function(){return 0==(1&this.value[0])},p.prototype.isEven=function(){return 0==(1&this.value)},s.prototype.isOdd=function(){return 1==(1&this.value[0])},p.prototype.isOdd=function(){return 1==(1&this.value)},s.prototype.isPositive=function(){return!this.sign},p.prototype.isPositive=function(){return this.value>0},s.prototype.isNegative=function(){return this.sign},p.prototype.isNegative=function(){return this.value<0},s.prototype.isUnit=function(){return!1},p.prototype.isUnit=function(){return 1===Math.abs(this.value)},s.prototype.isZero=function(){return!1},p.prototype.isZero=function(){return 0===this.value},s.prototype.isDivisibleBy=function(t){var r=H(t),e=r.value;return 0!==e&&(1===e||(2===e?this.isEven():this.mod(r).equals(u[0])))},p.prototype.isDivisibleBy=s.prototype.isDivisibleBy,s.prototype.isPrime=function(){var t=x(this);if(void 0!==t)return t;for(var e,n,o,i,a=this.abs(),s=a.prev(),p=[2,3,5,7,11,13,17,19],l=s;l.isEven();)l=l.divide(2);for(o=0;o<p.length;o++)if(!(i=r(p[o]).modPow(l,a)).equals(u[1])&&!i.equals(s)){for(n=!0,e=l;n&&e.lesser(s);e=e.multiply(2))(i=i.square().mod(a)).equals(s)&&(n=!1);if(n)return!1}return!0},p.prototype.isPrime=s.prototype.isPrime,s.prototype.isProbablePrime=function(t){var e=x(this);if(void 0!==e)return e;for(var n=this.abs(),o=void 0===t?5:t,i=0;i<o;i++){if(!r.randBetween(2,n.minus(2)).modPow(n.prev(),n).isUnit())return!1}return!0},p.prototype.isProbablePrime=s.prototype.isProbablePrime,s.prototype.modInv=function(t){for(var e,n,o,i=r.zero,a=r.one,u=H(t),s=this.abs();!s.equals(r.zero);)e=u.divide(s),n=i,o=u,i=a,u=s,a=n.subtract(e.multiply(a)),s=o.subtract(e.multiply(s));if(!u.equals(1))throw new Error(this.toString()+" and "+t.toString()+" are not co-prime");return-1===i.compare(0)&&(i=i.add(t)),this.isNegative()?i.negate():i},p.prototype.modInv=s.prototype.modInv,s.prototype.next=function(){var t=this.value;return this.sign?b(t,1,this.sign):new s(d(t,1),this.sign)},p.prototype.next=function(){var t=this.value;return t+1<o?new p(t+1):new s(i,!1)},s.prototype.prev=function(){var t=this.value;return this.sign?new s(d(t,1),!0):b(t,1,this.sign)},p.prototype.prev=function(){var t=this.value;return t-1>-o?new p(t-1):new s(i,!0)};for(var Z=[1];2*Z[Z.length-1]<=e;)Z.push(2*Z[Z.length-1]);var I=Z.length,B=Z[I-1];function C(t){return("number"==typeof t||"string"==typeof t)&&+Math.abs(t)<=e||t instanceof s&&t.value.length<=1}function J(t,e,n){e=H(e);for(var o=t.isNegative(),i=e.isNegative(),a=o?t.not():t,u=i?e.not():e,s=0,p=0,l=null,f=null,h=[];!a.isZero()||!u.isZero();)s=(l=O(a,B))[1].toJSNumber(),o&&(s=B-1-s),p=(f=O(u,B))[1].toJSNumber(),i&&(p=B-1-p),a=l[0],u=f[0],h.push(n(s,p));for(var v=0!==n(o?1:0,i?1:0)?r(-1):r(0),y=h.length-1;y>=0;y-=1)v=v.multiply(B).add(r(h[y]));return v}s.prototype.shiftLeft=function(t){if(!C(t))throw new Error(String(t)+" is too large for shifting.");if((t=+t)<0)return this.shiftRight(-t);for(var r=this;t>=I;)r=r.multiply(B),t-=I-1;return r.multiply(Z[t])},p.prototype.shiftLeft=s.prototype.shiftLeft,s.prototype.shiftRight=function(t){var r;if(!C(t))throw new Error(String(t)+" is too large for shifting.");if((t=+t)<0)return this.shiftLeft(-t);for(var e=this;t>=I;){if(e.isZero())return e;e=(r=O(e,B))[1].isNegative()?r[0].prev():r[0],t-=I-1}return(r=O(e,Z[t]))[1].isNegative()?r[0].prev():r[0]},p.prototype.shiftRight=s.prototype.shiftRight,s.prototype.not=function(){return this.negate().prev()},p.prototype.not=s.prototype.not,s.prototype.and=function(t){return J(this,t,function(t,r){return t&r})},p.prototype.and=s.prototype.and,s.prototype.or=function(t){return J(this,t,function(t,r){return t|r})},p.prototype.or=s.prototype.or,s.prototype.xor=function(t){return J(this,t,function(t,r){return t^r})},p.prototype.xor=s.prototype.xor;var z=1<<30,j=(e&-e)*(e&-e)|z;function L(t){var r=t.value,n="number"==typeof r?r|z:r[0]+r[1]*e|j;return n&-n}function D(t,r){return t=H(t),r=H(r),t.greater(r)?t:r}function U(t,r){return t=H(t),r=H(r),t.lesser(r)?t:r}function k(t,r){if(t=H(t).abs(),r=H(r).abs(),t.equals(r))return t;if(t.isZero())return r;if(r.isZero())return t;for(var e,n,o=u[1];t.isEven()&&r.isEven();)e=Math.min(L(t),L(r)),t=t.divide(e),r=r.divide(e),o=o.multiply(e);for(;t.isEven();)t=t.divide(L(t));do{for(;r.isEven();)r=r.divide(L(r));t.greater(r)&&(n=r,r=t,t=n),r=r.subtract(t)}while(!r.isZero());return o.isUnit()?t:t.multiply(o)}var R=function(t,r){for(var e=t.length,n=Math.abs(r),o=0;o<e;o++){if("-"!==(l=t[o].toLowerCase())&&/[a-z0-9]/.test(l)){if(/[0-9]/.test(l)&&+l>=n){if("1"===l&&1===n)continue;throw new Error(l+" is not a valid digit in base "+r+".")}if(l.charCodeAt(0)-87>=n)throw new Error(l+" is not a valid digit in base "+r+".")}}if(2<=r&&r<=36&&e<=a/Math.log(r)){var i=parseInt(t,r);if(isNaN(i))throw new Error(l+" is not a valid digit in base "+r+".");return new p(parseInt(t,r))}r=H(r);var u=[],s="-"===t[0];for(o=s?1:0;o<t.length;o++){var l,f=(l=t[o].toLowerCase()).charCodeAt(0);if(48<=f&&f<=57)u.push(H(l));else if(97<=f&&f<=122)u.push(H(l.charCodeAt(0)-87));else{if("<"!==l)throw new Error(l+" is not a valid character");var h=o;do{o++}while(">"!==t[o]);u.push(H(t.slice(h+1,o)))}}return T(u,r,s)};function T(t,r,e){var n,o=u[0],i=u[1];for(n=t.length-1;n>=0;n--)o=o.add(t[n].times(i)),i=i.times(r);return e?o.negate():o}function _(t){return t<=35?"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t):"<"+t+">"}function $(t,e){if((e=r(e)).isZero()){if(t.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(e.equals(-1)){if(t.isZero())return{value:[0],isNegative:!1};if(t.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-t)).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var n=Array.apply(null,Array(+t-1)).map(Array.prototype.valueOf,[0,1]);return n.unshift([1]),{value:[].concat.apply([],n),isNegative:!1}}var o=!1;if(t.isNegative()&&e.isPositive()&&(o=!0,t=t.abs()),e.equals(1))return t.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(+t)).map(Number.prototype.valueOf,1),isNegative:o};for(var i,a=[],u=t;u.isNegative()||u.compareAbs(e)>=0;){i=u.divmod(e),u=i.quotient;var s=i.remainder;s.isNegative()&&(s=e.minus(s).abs(),u=u.next()),a.push(s.toJSNumber())}return a.push(u.toJSNumber()),{value:a.reverse(),isNegative:o}}function F(t,r){var e=$(t,r);return(e.isNegative?"-":"")+e.value.map(_).join("")}function G(t){if(l(+t)){var r=+t;if(r===c(r))return new p(r);throw"Invalid integer: "+t}var e="-"===t[0];e&&(t=t.slice(1));var o=t.split(/e/i);if(o.length>2)throw new Error("Invalid integer: "+o.join("e"));if(2===o.length){var i=o[1];if("+"===i[0]&&(i=i.slice(1)),(i=+i)!==c(i)||!l(i))throw new Error("Invalid integer: "+i+" is not a valid exponent.");var a=o[0],u=a.indexOf(".");if(u>=0&&(i-=a.length-u-1,a=a.slice(0,u)+a.slice(u+1)),i<0)throw new Error("Cannot include negative exponent part for integers");t=a+=new Array(i+1).join("0")}if(!/^([0-9][0-9]*)$/.test(t))throw new Error("Invalid integer: "+t);for(var f=[],h=t.length,y=n,g=h-y;h>0;)f.push(+t.slice(g,h)),(g-=y)<0&&(g=0),h-=y;return v(f),new s(f,e)}function H(t){return"number"==typeof t?function(t){if(l(t)){if(t!==c(t))throw new Error(t+" is not an integer.");return new p(t)}return G(t.toString())}(t):"string"==typeof t?G(t):t}s.prototype.toArray=function(t){return $(this,t)},p.prototype.toArray=function(t){return $(this,t)},s.prototype.toString=function(t){if(void 0===t&&(t=10),10!==t)return F(this,t);for(var r,e=this.value,n=e.length,o=String(e[--n]);--n>=0;)r=String(e[n]),o+="0000000".slice(r.length)+r;return(this.sign?"-":"")+o},p.prototype.toString=function(t){return void 0===t&&(t=10),10!=t?F(this,t):String(this.value)},s.prototype.toJSON=p.prototype.toJSON=function(){return this.toString()},s.prototype.valueOf=function(){return parseInt(this.toString(),10)},s.prototype.toJSNumber=s.prototype.valueOf,p.prototype.valueOf=function(){return this.value},p.prototype.toJSNumber=p.prototype.valueOf;for(var K=0;K<1e3;K++)u[K]=new p(K),K>0&&(u[-K]=new p(-K));return u.one=u[1],u.zero=u[0],u.minusOne=u[-1],u.max=D,u.min=U,u.gcd=k,u.lcm=function(t,r){return t=H(t).abs(),r=H(r).abs(),t.divide(k(t,r)).multiply(r)},u.isInstance=function(t){return t instanceof s||t instanceof p},u.randBetween=function(t,r){var n=U(t=H(t),r=H(r)),o=D(t,r).subtract(n).add(1);if(o.isSmall)return n.add(Math.floor(Math.random()*o));for(var i=[],a=!0,u=o.value.length-1;u>=0;u--){var l=a?o.value[u]:e,f=c(Math.random()*l);i.unshift(f),f<l&&(a=!1)}return i=h(i),n.add("number"==typeof i?new p(i):new s(i,!1))},u.fromArray=function(t,r,e){return T(t.map(H),H(r||10),e)},u}();"undefined"!=typeof module&&module.hasOwnProperty("exports")&&(module.exports=r),"function"==typeof t&&t.amd&&t("big-integer",[],function(){return r}); -},{}],"S0gh":[function(require,module,exports) { -var n=require("big-integer");function r(n){return n>0?Math.floor(n):Math.ceil(n)}exports["fromBase'"]=function(r){return function(t){return function(u){return function(e){try{var o=n(e,u);return r(o)}catch(i){return t}}}}},exports["fromNumber'"]=function(t){return function(u){return function(e){try{var o=n(r(e));return t(o)}catch(i){return u}}}},exports.fromInt=function(r){return n(r)},exports.toBase=function(n){return function(r){return r.toString(n)}},exports.toNumber=function(n){return n.toJSNumber()},exports.biAdd=function(n){return function(r){return n.add(r)}},exports.biMul=function(n){return function(r){return n.multiply(r)}},exports.biSub=function(n){return function(r){return n.minus(r)}},exports.biMod=function(n){return function(r){return n.mod(r)}},exports.biDiv=function(n){return function(r){return n.divide(r)}},exports.biEquals=function(n){return function(r){return n.equals(r)}},exports.biCompare=function(n){return function(r){return n.compare(r)}},exports.abs=function(n){return n.abs()},exports.even=function(n){return n.isEven()},exports.odd=function(n){return n.isOdd()},exports.prime=function(n){return n.isPrime()},exports.pow=function(n){return function(r){return n.pow(r)}},exports.not=function(n){return n.not()},exports.or=function(n){return function(r){return n.or(r)}},exports.xor=function(n){return function(r){return n.xor(r)}},exports.and=function(n){return function(r){return n.and(r)}},exports.shl=function(n){return function(r){return n.shiftLeft(r)}},exports.shr=function(n){return function(r){return n.shiftRight(r)}},exports.digitsInBase=function(n){return function(r){return r.toArray(n)}}; -},{"big-integer":"9xaU"}],"2lBd":[function(require,module,exports) { -"use strict";exports.fromNumberImpl=function(r){return function(n){return function(t){return(0|t)===t?r(t):n}}},exports.toNumber=function(r){return r},exports.fromStringAsImpl=function(r){return function(n){return function(t){var u;u=t<11?"[0-"+(t-1).toString()+"]":11===t?"[0-9a]":"[0-9a-"+String.fromCharCode(86+t)+"]";var o=new RegExp("^[\\+\\-]?"+u+"+$","i");return function(u){if(o.test(u)){var e=parseInt(u,t);return(0|e)===e?r(e):n}return n}}}},exports.toStringAs=function(r){return function(n){return n.toString(r)}},exports.quot=function(r){return function(n){return r/n|0}},exports.rem=function(r){return function(n){return r%n}},exports.pow=function(r){return function(n){return 0|Math.pow(r,n)}}; -},{}],"xYq2":[function(require,module,exports) { -"use strict";var n=require("../Data.Ring/index.js"),i=require("../Data.Semiring/index.js"),r=function(n,i){this.Ring0=n,this.recip=i},e=function(n){return n.recip},t=function(n){return function(r){return function(t){return i.mul(n.Ring0().Semiring0())(r)(e(n)(t))}}},u=function(n){return function(r){return function(t){return i.mul(n.Ring0().Semiring0())(e(n)(t))(r)}}},c=new r(function(){return n.ringNumber},function(n){return 1/n});module.exports={DivisionRing:r,recip:e,leftDiv:u,rightDiv:t,divisionringNumber:c}; -},{"../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF"}],"pJ2E":[function(require,module,exports) { -"use strict";exports.nan=NaN,exports.isNaN=isNaN,exports.infinity=1/0,exports.isFinite=isFinite,exports.readInt=function(t){return function(e){return parseInt(e,t)}},exports.readFloat=parseFloat; -},{}],"aQlK":[function(require,module,exports) { -"use strict";var i=require("./foreign.js");module.exports={nan:i.nan,isNaN:i.isNaN,infinity:i.infinity,isFinite:i.isFinite,readInt:i.readInt,readFloat:i.readFloat}; -},{"./foreign.js":"pJ2E"}],"9/+z":[function(require,module,exports) { -"use strict";exports.abs=Math.abs,exports.acos=Math.acos,exports.asin=Math.asin,exports.atan=Math.atan,exports.atan2=function(t){return function(r){return Math.atan2(t,r)}},exports.ceil=Math.ceil,exports.cos=Math.cos,exports.exp=Math.exp,exports.floor=Math.floor,exports.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)},exports.log=Math.log,exports.max=function(t){return function(r){return Math.max(t,r)}},exports.min=function(t){return function(r){return Math.min(t,r)}},exports.pow=function(t){return function(r){return Math.pow(t,r)}},exports.remainder=function(t){return function(r){return t%r}},exports.round=Math.round,exports.sin=Math.sin,exports.sqrt=Math.sqrt,exports.tan=Math.tan,exports.e=Math.E,exports.ln2=Math.LN2,exports.ln10=Math.LN10,exports.log2e=Math.LOG2E,exports.log10e=Math.LOG10E,exports.pi=Math.PI,exports.tau=2*Math.PI,exports.sqrt1_2=Math.SQRT1_2,exports.sqrt2=Math.SQRT2; -},{}],"Rpaz":[function(require,module,exports) { -"use strict";var a=require("./foreign.js");module.exports={abs:a.abs,acos:a.acos,asin:a.asin,atan:a.atan,atan2:a.atan2,ceil:a.ceil,cos:a.cos,exp:a.exp,floor:a.floor,log:a.log,max:a.max,min:a.min,pow:a.pow,round:a.round,sin:a.sin,sqrt:a.sqrt,tan:a.tan,trunc:a.trunc,remainder:a.remainder,e:a.e,ln2:a.ln2,ln10:a.ln10,log2e:a.log2e,log10e:a.log10e,pi:a.pi,tau:a.tau,sqrt1_2:a.sqrt1_2,sqrt2:a.sqrt2}; -},{"./foreign.js":"9/+z"}],"xNJb":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),e=require("../Control.Category/index.js"),t=require("../Data.Boolean/index.js"),r=require("../Data.Bounded/index.js"),i=require("../Data.CommutativeRing/index.js"),u=require("../Data.DivisionRing/index.js"),o=require("../Data.Eq/index.js"),a=require("../Data.EuclideanRing/index.js"),c=require("../Data.Maybe/index.js"),f=require("../Data.Ord/index.js"),l=require("../Data.Ordering/index.js"),d=require("../Data.Ring/index.js"),s=require("../Data.Semiring/index.js"),m=require("../Data.Show/index.js"),v=require("../Global/index.js"),w=require("../Math/index.js"),g=function(n){return n},q=function(){function n(){}return n.value=new n,n}(),h=function(){function n(){}return n.value=new n,n}(),D=new m.Show(function(n){if(n instanceof q)return"Even";if(n instanceof h)return"Odd";throw new Error("Failed pattern match at Data.Int (line 112, column 1 - line 114, column 19): "+[n.constructor.name])}),b=function(n){if(n>=2&&n<=36)return new c.Just(n);if(t.otherwise)return c.Nothing.value;throw new Error("Failed pattern match at Data.Int (line 193, column 1 - line 193, column 28): "+[n.constructor.name])},x=function(n){return 0!=(1&n)},y=8,j=16,p=n.fromStringAsImpl(c.Just.create)(c.Nothing.value),E=p(10),I=n.fromNumberImpl(c.Just.create)(c.Nothing.value),R=function(e){if(e===v.infinity)return 0;if(e===-v.infinity)return 0;if(e>=n.toNumber(r.top(r.boundedInt)))return r.top(r.boundedInt);if(e<=n.toNumber(r.bottom(r.boundedInt)))return r.bottom(r.boundedInt);if(t.otherwise)return c.fromMaybe(0)(I(e));throw new Error("Failed pattern match at Data.Int (line 66, column 1 - line 66, column 29): "+[e.constructor.name])},N=function(n){return R(w.round(n))},P=function(n){return R(w.floor(n))},S=function(n){return 0==(1&n)},F=function(n){return S(n)?q.value:h.value},O=new o.Eq(function(n){return function(e){return n instanceof q&&e instanceof q||n instanceof h&&e instanceof h}}),A=new f.Ord(function(){return O},function(n){return function(e){if(n instanceof q&&e instanceof q)return l.EQ.value;if(n instanceof q)return l.LT.value;if(e instanceof q)return l.GT.value;if(n instanceof h&&e instanceof h)return l.EQ.value;throw new Error("Failed pattern match at Data.Int (line 110, column 1 - line 110, column 40): "+[n.constructor.name,e.constructor.name])}}),C=new s.Semiring(function(n){return function(e){return o.eq(O)(n)(e)?q.value:h.value}},function(n){return function(e){return n instanceof h&&e instanceof h?h.value:q.value}},h.value,q.value),B=new d.Ring(function(){return C},s.add(C)),J=new u.DivisionRing(function(){return B},e.identity(e.categoryFn)),M=10,G=new i.CommutativeRing(function(){return B}),Q=new a.EuclideanRing(function(){return G},function(n){if(n instanceof q)return 0;if(n instanceof h)return 1;throw new Error("Failed pattern match at Data.Int (line 132, column 1 - line 136, column 17): "+[n.constructor.name])},function(n){return function(e){return n}},function(n){return function(n){return q.value}}),T=function(n){return R(w.ceil(n))},L=new r.Bounded(function(){return A},q.value,h.value),k=2,z=36;module.exports={fromNumber:I,ceil:T,floor:P,round:N,fromString:E,radix:b,binary:k,octal:y,decimal:M,hexadecimal:j,base36:z,fromStringAs:p,Even:q,Odd:h,parity:F,even:S,odd:x,eqParity:O,ordParity:A,showParity:D,boundedParity:L,semiringParity:C,ringParity:B,commutativeRingParity:G,euclideanRingParity:Q,divisionRingParity:J,toNumber:n.toNumber,toStringAs:n.toStringAs,quot:n.quot,rem:n.rem,pow:n.pow}; -},{"./foreign.js":"2lBd","../Control.Category/index.js":"IAi2","../Data.Boolean/index.js":"ObQr","../Data.Bounded/index.js":"kcUU","../Data.CommutativeRing/index.js":"60TQ","../Data.DivisionRing/index.js":"xYq2","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Global/index.js":"aQlK","../Math/index.js":"Rpaz"}],"g11n":[function(require,module,exports) { -"use strict";exports.fromCharArray=function(n){return n.join("")},exports.toCharArray=function(n){return n.split("")},exports.singleton=function(n){return n},exports._charAt=function(n){return function(t){return function(r){return function(u){return r>=0&&r<u.length?n(u.charAt(r)):t}}}},exports._toChar=function(n){return function(t){return function(r){return 1===r.length?n(r):t}}},exports.length=function(n){return n.length},exports.countPrefix=function(n){return function(t){for(var r=0;r<t.length&&n(t.charAt(r));)r++;return r}},exports._indexOf=function(n){return function(t){return function(r){return function(u){var e=u.indexOf(r);return-1===e?t:n(e)}}}},exports["_indexOf'"]=function(n){return function(t){return function(r){return function(u){return function(e){if(u<0||u>e.length)return t;var o=e.indexOf(r,u);return-1===o?t:n(o)}}}}},exports._lastIndexOf=function(n){return function(t){return function(r){return function(u){var e=u.lastIndexOf(r);return-1===e?t:n(e)}}}},exports["_lastIndexOf'"]=function(n){return function(t){return function(r){return function(u){return function(e){if(u<0||u>e.length)return t;var o=e.lastIndexOf(r,u);return-1===o?t:n(o)}}}}},exports.take=function(n){return function(t){return t.substr(0,n)}},exports.drop=function(n){return function(t){return t.substring(n)}},exports._slice=function(n){return function(t){return function(r){return r.slice(n,t)}}},exports.splitAt=function(n){return function(t){return{before:t.substring(0,n),after:t.substring(n)}}}; -},{}],"iZpG":[function(require,module,exports) { -"use strict";exports.charAt=function(r){return function(t){if(r>=0&&r<t.length)return t.charAt(r);throw new Error("Data.String.Unsafe.charAt: Invalid index.")}},exports.char=function(r){if(1===r.length)return r.charAt(0);throw new Error("Data.String.Unsafe.char: Expected string of length 1.")}; -},{}],"5UWM":[function(require,module,exports) { -"use strict";var r=require("./foreign.js");module.exports={char:r.char,charAt:r.charAt}; -},{"./foreign.js":"iZpG"}],"6c6X":[function(require,module,exports) { -"use strict";var t=require("./foreign.js"),n=require("../Data.Boolean/index.js"),e=require("../Data.Maybe/index.js"),r=require("../Data.String.Unsafe/index.js"),u=function(n){return""===n?e.Nothing.value:new e.Just({head:r.charAt(0)(n),tail:t.drop(1)(n)})},i=t._toChar(e.Just.create)(e.Nothing.value),a=function(n){return function(e){return t.take(t.countPrefix(n)(e))(e)}},o=function(n){return function(e){return t.drop(t.length(e)-n|0)(e)}},c=function(r){return function(u){return function(i){var a=t.length(i),o=function(t){if(t<0)return a+t|0;if(n.otherwise)return t;throw new Error("Failed pattern match at Data.String.CodeUnits (line 314, column 5 - line 315, column 27): "+[t.constructor.name])},c=o(u),f=o(r);return f<0||f>=a||c<0||c>a||f>c?e.Nothing.value:new e.Just(t._slice(r)(u)(i))}}},f=t["_lastIndexOf'"](e.Just.create)(e.Nothing.value),l=t._lastIndexOf(e.Just.create)(e.Nothing.value),s=function(n){return function(r){var u=l(n)(r);return u instanceof e.Just&&u.value0===(t.length(r)-t.length(n)|0)?e.Just.create(t.take(u.value0)(r)):e.Nothing.value}},h=t["_indexOf'"](e.Just.create)(e.Nothing.value),g=t._indexOf(e.Just.create)(e.Nothing.value),d=function(n){return function(r){var u=g(n)(r);return u instanceof e.Just&&0===u.value0?e.Just.create(t.drop(t.length(n))(r)):e.Nothing.value}},v=function(n){return function(e){return t.drop(t.countPrefix(n)(e))(e)}},x=function(n){return function(e){return t.take(t.length(e)-n|0)(e)}},p=function(t){var n=g(t);return function(t){return e.isJust(n(t))}},J=t._charAt(e.Just.create)(e.Nothing.value);module.exports={stripPrefix:d,stripSuffix:s,contains:p,charAt:J,toChar:i,uncons:u,indexOf:g,"indexOf'":h,lastIndexOf:l,"lastIndexOf'":f,takeRight:o,takeWhile:a,dropRight:x,dropWhile:v,slice:c,singleton:t.singleton,fromCharArray:t.fromCharArray,toCharArray:t.toCharArray,length:t.length,countPrefix:t.countPrefix,take:t.take,drop:t.drop,splitAt:t.splitAt}; -},{"./foreign.js":"g11n","../Data.Boolean/index.js":"ObQr","../Data.Maybe/index.js":"5mN7","../Data.String.Unsafe/index.js":"5UWM"}],"B+B2":[function(require,module,exports) { -"use strict";exports._localeCompare=function(r){return function(n){return function(t){return function(e){return function(o){var u=e.localeCompare(o);return u<0?r:u>0?t:n}}}}},exports.replace=function(r){return function(n){return function(t){return t.replace(r,n)}}},exports.replaceAll=function(r){return function(n){return function(t){return t.replace(new RegExp(r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}}},exports.split=function(r){return function(n){return n.split(r)}},exports.toLower=function(r){return r.toLowerCase()},exports.toUpper=function(r){return r.toUpperCase()},exports.trim=function(r){return r.trim()},exports.joinWith=function(r){return function(n){return n.join(r)}}; -},{}],"OSrc":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),r=require("../Data.Ordering/index.js"),l=function(e){return""===e},o=e._localeCompare(r.LT.value)(r.EQ.value)(r.GT.value);module.exports={null:l,localeCompare:o,replace:e.replace,replaceAll:e.replaceAll,split:e.split,toLower:e.toLower,toUpper:e.toUpper,trim:e.trim,joinWith:e.joinWith}; -},{"./foreign.js":"B+B2","../Data.Ordering/index.js":"5Eun"}],"Ph6A":[function(require,module,exports) { -"use strict";var n=require("../Control.Bind/index.js"),r=require("../Data.Eq/index.js"),t=require("../Data.Foldable/index.js"),e=require("../Data.Maybe/index.js"),i=require("../Data.Monoid/index.js"),o=require("../Data.Ord/index.js"),u=require("../Data.Semigroup/index.js"),c=require("../Data.Show/index.js"),a=require("../Data.String.CodeUnits/index.js"),f=require("../Data.String.Common/index.js"),p=require("../Data.Symbol/index.js"),m=function(n){return n},s=function(n){return n},l=function(n){this.nes=n},d=function(n){return f.toUpper(n)},S=function(n){return n},g=function(n){return f.toLower(n)},y=new c.Show(function(n){return"(NonEmptyString.unsafeFromString "+c.show(c.showString)(n)+")"}),E=new c.Show(function(n){return"(NonEmptyReplacement "+c.show(y)(n)+")"}),x=u.semigroupString,N=x,q=function(n){return function(r){return function(t){return f.replaceAll(n)(r)(t)}}},w=function(n){return function(r){return function(t){return f.replace(n)(r)(t)}}},j=function(n){return function(r){return n+r}},h=o.ordString,b=h,D=function(n){return new l(function(r){return p.reflectSymbol(n)(r)})},F=function(n){return n.nes},v=function(n){return new l(function(n){return""})},R=function(n){return function(r){return f.localeCompare(n)(r)}},C=function(n){return function(r){return n(r)}},M=function(n){return function(r){var e=t.intercalate(n.Foldable0())(i.monoidString)(r);return function(n){return m(e(n))}}},U=function(n){return function(r){var e=t.intercalate(n)(i.monoidString)(r);return function(n){return e(n)}}},W=function(n){return function(r){var t=U(n.Foldable0())(r);return function(n){return m(t(n))}}},k=function(n){return""===n?e.Nothing.value:new e.Just(n)},A=function(r){return n.composeKleisliFlipped(e.bindMaybe)(k)(C(a.stripPrefix(r)))},B=function(r){return n.composeKleisliFlipped(e.bindMaybe)(k)(C(a.stripSuffix(r)))},J=function(n){return k(f.trim(n))},K=function(n){var r=e.fromJust(n);return function(n){return r(k(n))}},L=r.eqString,P=L,O=function(n){return C(a.contains(n))},z=function(n){return function(r){return n+r}};module.exports={nes:F,NonEmptyString:m,MakeNonEmpty:l,NonEmptyReplacement:s,fromString:k,unsafeFromString:K,toString:S,appendString:z,prependString:j,stripPrefix:A,stripSuffix:B,contains:O,localeCompare:R,replace:w,replaceAll:q,toLower:g,toUpper:d,trim:J,joinWith:U,join1With:W,joinWith1:M,liftS:C,eqNonEmptyString:L,ordNonEmptyString:h,semigroupNonEmptyString:x,showNonEmptyString:y,makeNonEmptyBad:v,nonEmptyNonEmpty:D,eqNonEmptyReplacement:P,ordNonEmptyReplacement:b,semigroupNonEmptyReplacement:N,showNonEmptyReplacement:E}; -},{"../Control.Bind/index.js":"7VcT","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.String.CodeUnits/index.js":"6c6X","../Data.String.Common/index.js":"OSrc","../Data.Symbol/index.js":"4oJQ"}],"Zx+T":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),e=require("../Data.CommutativeRing/index.js"),r=require("../Data.Eq/index.js"),i=require("../Data.EuclideanRing/index.js"),t=require("../Data.Int/index.js"),o=require("../Data.Maybe/index.js"),u=require("../Data.Ord/index.js"),a=require("../Data.Ordering/index.js"),s=require("../Data.Ring/index.js"),d=require("../Data.Semiring/index.js"),m=require("../Data.Show/index.js"),g=require("../Data.String.NonEmpty.Internal/index.js"),f=n.toBase(10),b=function(e){return function(r){return o.fromJust()(g.fromString(n.toBase(e)(r)))}},c=b(10),q=new m.Show(function(n){return'fromString "'+f(n)+'"'}),B=new d.Semiring(n.biAdd,n.biMul,n.fromInt(1),n.fromInt(0)),l=new s.Ring(function(){return B},n.biSub),v=n.biMod,I=n.biDiv,x=n["fromNumber'"](o.Just.create)(o.Nothing.value),D=n["fromBase'"](o.Just.create)(o.Nothing.value),j=D(10),w=new r.Eq(n.biEquals),S=new u.Ord(function(){return w},function(e){return function(r){var i=n.biCompare(e)(r);return 1===i?a.GT.value:0===i?a.EQ.value:a.LT.value}}),h=new e.CommutativeRing(function(){return l}),N=new i.EuclideanRing(function(){return h},function(e){return t.floor(n.toNumber(n.abs(e)))},function(e){return function(r){return n.biDiv(s.sub(l)(e)(i.mod(N)(e)(r)))(r)}},function(e){return function(r){var i=n.abs(r);return n.biMod(d.add(B)(n.biMod(e)(i))(i))(i)}});module.exports={fromString:j,fromBase:D,fromNumber:x,toString:f,toNonEmptyString:c,"toBase'":b,quot:I,rem:v,eqBigInt:w,ordBigInt:S,showBigInt:q,semiringBigInt:B,ringBigInt:l,commutativeRingBigInt:h,euclideanRingBigInt:N,fromInt:n.fromInt,toBase:n.toBase,digitsInBase:n.digitsInBase,abs:n.abs,even:n.even,odd:n.odd,prime:n.prime,pow:n.pow,not:n.not,or:n.or,xor:n.xor,and:n.and,shl:n.shl,shr:n.shr,toNumber:n.toNumber}; -},{"./foreign.js":"S0gh","../Data.CommutativeRing/index.js":"60TQ","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Int/index.js":"xNJb","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.String.NonEmpty.Internal/index.js":"Ph6A"}],"HkJx":[function(require,module,exports) { -"use strict";var r=require("../Control.MonadZero/index.js"),o=function(r){this.MonadZero0=r},n=new o(function(){return r.monadZeroArray});module.exports={MonadPlus:o,monadPlusArray:n}; -},{"../Control.MonadZero/index.js":"lD5R"}],"qF8i":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),e=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),t=require("../Control.Category/index.js"),u=require("../Control.Plus/index.js"),o=require("../Data.Eq/index.js"),i=require("../Data.Foldable/index.js"),a=require("../Data.FoldableWithIndex/index.js"),l=require("../Data.Functor/index.js"),c=require("../Data.FunctorWithIndex/index.js"),f=require("../Data.Maybe/index.js"),d=require("../Data.Ord/index.js"),p=require("../Data.Ordering/index.js"),v=require("../Data.Semigroup/index.js"),s=require("../Data.Semigroup.Foldable/index.js"),x=require("../Data.Show/index.js"),q=require("../Data.Traversable/index.js"),m=require("../Data.TraversableWithIndex/index.js"),y=require("../Data.Tuple/index.js"),h=require("../Data.Unfoldable/index.js"),b=require("../Data.Unfoldable1/index.js"),w=function(){function n(n,e){this.value0=n,this.value1=e}return n.create=function(e){return function(r){return new n(e,r)}},n}(),j=function(n){return new b.Unfoldable1(function(e){return function(r){return y.uncurry(w.create)(l.map(y.functorTuple)(h.unfoldr(n)(l.map(f.functorMaybe)(e)))(e(r)))}})},E=function(n){return n.value1},F=function(n){return function(e){return new w(e,u.empty(n))}},N=function(n){return function(e){return new x.Show(function(r){return"(NonEmpty "+x.show(n)(r.value0)+" "+x.show(e)(r.value1)+")"})}},D=function(r){return function(t){return n.alt(r.Plus1().Alt0())(e.pure(r.Applicative0())(t.value0))(t.value1)}},I=function(n){return n.value0},W=function(n){return new l.Functor(function(e){return function(r){return new w(e(r.value0),l.map(n)(e)(r.value1))}})},g=function(n){return new c.FunctorWithIndex(function(){return W(n.Functor0())},function(e){return function(r){return new w(e(f.Nothing.value)(r.value0),c.mapWithIndex(n)(function(n){return e(f.Just.create(n))})(r.value1))}})},A=function(n){return function(e){return n(e.value0)(e.value1)}},T=function(n){return function(e){return function(r){return i.foldl(n)(e)(r.value0)(r.value1)}}},C=function(n){return new i.Foldable(function(e){return function(r){return function(t){return v.append(e.Semigroup0())(r(t.value0))(i.foldMap(n)(e)(r)(t.value1))}}},function(e){return function(r){return function(t){return i.foldl(n)(e)(e(r)(t.value0))(t.value1)}}},function(e){return function(r){return function(t){return e(t.value0)(i.foldr(n)(e)(r)(t.value1))}}})},S=function(n){return new a.FoldableWithIndex(function(){return C(n.Foldable0())},function(e){return function(r){return function(t){return v.append(e.Semigroup0())(r(f.Nothing.value)(t.value0))(a.foldMapWithIndex(n)(e)(function(n){return r(f.Just.create(n))})(t.value1))}}},function(e){return function(r){return function(t){return a.foldlWithIndex(n)(function(n){return e(f.Just.create(n))})(e(f.Nothing.value)(r)(t.value0))(t.value1)}}},function(e){return function(r){return function(t){return e(f.Nothing.value)(t.value0)(a.foldrWithIndex(n)(function(n){return e(f.Just.create(n))})(r)(t.value1))}}})},J=function(n){return new q.Traversable(function(){return C(n.Foldable1())},function(){return W(n.Functor0())},function(e){return function(t){return r.apply(e.Apply0())(l.map(e.Apply0().Functor0())(w.create)(t.value0))(q.sequence(n)(e)(t.value1))}},function(e){return function(t){return function(u){return r.apply(e.Apply0())(l.map(e.Apply0().Functor0())(w.create)(t(u.value0)))(q.traverse(n)(e)(t)(u.value1))}}})},M=function(n){return new m.TraversableWithIndex(function(){return S(n.FoldableWithIndex1())},function(){return g(n.FunctorWithIndex0())},function(){return J(n.Traversable2())},function(e){return function(t){return function(u){return r.apply(e.Apply0())(l.map(e.Apply0().Functor0())(w.create)(t(f.Nothing.value)(u.value0)))(m.traverseWithIndex(n)(e)(function(n){return t(f.Just.create(n))})(u.value1))}}})},O=function n(e){return new s.Foldable1(function(){return C(e)},function(r){return s.foldMap1(n(e))(r)(t.identity(t.categoryFn))},function(n){return function(r){return function(t){return i.foldl(e)(function(e){return function(t){return v.append(n)(e)(r(t))}})(r(t.value0))(t.value1)}}})},U=function(n){return function(e){return new o.Eq(function(r){return function(t){return o.eq(e)(r.value0)(t.value0)&&o.eq1(n)(e)(r.value1)(t.value1)}})}},G=function(n){return function(e){return new d.Ord(function(){return U(n.Eq10())(e.Eq0())},function(r){return function(t){var u=d.compare(e)(r.value0)(t.value0);return u instanceof p.LT?p.LT.value:u instanceof p.GT?p.GT.value:d.compare1(n)(e)(r.value1)(t.value1)}})}},L=function(n){return new o.Eq1(function(e){return o.eq(U(n)(e))})},P=function(n){return new d.Ord1(function(){return L(n.Eq10())},function(e){return d.compare(G(n)(e))})};module.exports={NonEmpty:w,singleton:F,foldl1:T,fromNonEmpty:A,oneOf:D,head:I,tail:E,showNonEmpty:N,eqNonEmpty:U,eq1NonEmpty:L,ordNonEmpty:G,ord1NonEmpty:P,functorNonEmpty:W,functorWithIndex:g,foldableNonEmpty:C,foldableWithIndexNonEmpty:S,traversableNonEmpty:J,traversableWithIndexNonEmpty:M,foldable1NonEmpty:O,unfoldable1NonEmpty:j}; -},{"../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Control.Plus/index.js":"oMBg","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unfoldable1/index.js":"S0Nl"}],"Xxuc":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),e=require("../Control.Alternative/index.js"),t=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),u=require("../Control.Bind/index.js"),i=require("../Control.Category/index.js"),o=require("../Control.Comonad/index.js"),a=require("../Control.Extend/index.js"),l=require("../Control.Monad/index.js"),c=require("../Control.MonadPlus/index.js"),f=require("../Control.MonadZero/index.js"),v=require("../Control.Plus/index.js"),s=require("../Data.Eq/index.js"),d=require("../Data.Foldable/index.js"),p=require("../Data.FoldableWithIndex/index.js"),m=require("../Data.Function/index.js"),w=require("../Data.Functor/index.js"),y=require("../Data.FunctorWithIndex/index.js"),x=require("../Data.Maybe/index.js"),E=require("../Data.Monoid/index.js"),L=require("../Data.Newtype/index.js"),h=require("../Data.NonEmpty/index.js"),N=require("../Data.Ord/index.js"),b=require("../Data.Ordering/index.js"),q=require("../Data.Semigroup/index.js"),j=require("../Data.Semigroup.Traversable/index.js"),I=require("../Data.Semiring/index.js"),D=require("../Data.Show/index.js"),W=require("../Data.Traversable/index.js"),F=require("../Data.TraversableWithIndex/index.js"),T=require("../Data.Tuple/index.js"),g=require("../Data.Unfoldable/index.js"),C=require("../Data.Unfoldable1/index.js"),A=function(){function n(){}return n.value=new n,n}(),M=function(){function n(n,e){this.value0=n,this.value1=e}return n.create=function(e){return function(t){return new n(e,t)}},n}(),S=function(n){return n},P=function(n){return new M(n.value0,n.value1)},O=new L.Newtype(function(n){return n},S),U=function(n){return function(e){return new h.NonEmpty(n,new M(e.value0,e.value1))}},B=function(n){var e;return e=A.value,function(t){var r,u=e,i=!1;function o(e,r){return r instanceof M&&r.value1 instanceof M&&r.value1.value1 instanceof M?(u=new M(r,e),void(t=r.value1.value1.value1)):(i=!0,(a=e,function(e){for(var t,r,u,i=a,o=!1;!o;)u=e,t=(r=i)instanceof M&&r.value0 instanceof M&&r.value0.value1 instanceof M&&r.value0.value1.value1 instanceof M?(i=r.value1,void(e=new M(n(r.value0.value0),new M(n(r.value0.value1.value0),new M(n(r.value0.value1.value1.value0),u))))):(o=!0,u);return t})((o=r)instanceof M&&o.value1 instanceof M&&o.value1.value1 instanceof A?new M(n(o.value0),new M(n(o.value1.value0),A.value)):o instanceof M&&o.value1 instanceof A?new M(n(o.value0),A.value):A.value));var o,a}for(;!i;)r=o(u,t);return r}},Z=new w.Functor(B),J=h.functorNonEmpty(Z),Q=new d.Foldable(function(n){return function(e){return d.foldl(Q)(function(t){var r=q.append(n.Semigroup0())(t);return function(n){return r(e(n))}})(E.mempty(n))}},function(n){return function(e){return function(t){var r,u=e,i=!1;function o(e,r){if(r instanceof A)return i=!0,e;if(r instanceof M)return u=n(e)(r.value0),void(t=r.value1);throw new Error("Failed pattern match at Data.List.Types (line 109, column 12 - line 111, column 30): "+[r.constructor.name])}for(;!i;)r=o(u,t);return r}}},function(n){return function(e){var t=d.foldl(Q)(m.flip(M.create))(A.value),r=d.foldl(Q)(m.flip(n))(e);return function(n){return r(t(n))}}}),G=h.foldableNonEmpty(Q),k=new p.FoldableWithIndex(function(){return Q},function(n){return function(e){return p.foldlWithIndex(k)(function(t){return function(r){var u=q.append(n.Semigroup0())(r),i=e(t);return function(n){return u(i(n))}}})(E.mempty(n))}},function(n){return function(e){var t=d.foldl(Q)(function(e){return function(t){return new T.Tuple(e.value0+1|0,n(e.value0)(e.value1)(t))}})(new T.Tuple(0,e));return function(n){return T.snd(t(n))}}},function(n){return function(e){return function(t){var r=d.foldl(Q)(function(n){return function(e){return new T.Tuple(n.value0+1|0,new M(e,n.value1))}})(new T.Tuple(0,A.value))(t);return T.snd(d.foldl(Q)(function(e){return function(t){return new T.Tuple(e.value0-1|0,n(e.value0-1|0)(t)(e.value1))}})(new T.Tuple(r.value0,e))(r.value1))}}}),z=new p.FoldableWithIndex(function(){return G},function(n){return function(e){return function(t){return p.foldMapWithIndex(h.foldableWithIndexNonEmpty(k))(n)((r=x.maybe(0)(I.add(I.semiringInt)(1)),function(n){return e(r(n))}))(t);var r}}},function(n){return function(e){return function(t){return p.foldlWithIndex(h.foldableWithIndexNonEmpty(k))((r=x.maybe(0)(I.add(I.semiringInt)(1)),function(e){return n(r(e))}))(e)(t);var r}}},function(n){return function(e){return function(t){return p.foldrWithIndex(h.foldableWithIndexNonEmpty(k))((r=x.maybe(0)(I.add(I.semiringInt)(1)),function(e){return n(r(e))}))(e)(t);var r}}}),H=new y.FunctorWithIndex(function(){return Z},function(n){return p.foldrWithIndex(k)(function(e){return function(t){return function(r){return new M(n(e)(t),r)}}})(A.value)}),K=new y.FunctorWithIndex(function(){return J},function(n){return function(e){return S(y.mapWithIndex(h.functorWithIndex(H))((t=x.maybe(0)(I.add(I.semiringInt)(1)),function(e){return n(t(e))}))(e));var t}}),R=new q.Semigroup(function(n){return function(e){return d.foldr(Q)(M.create)(e)(n)}}),V=new E.Monoid(function(){return R},A.value),X=new q.Semigroup(function(n){return function(e){return new h.NonEmpty(n.value0,q.append(R)(n.value1)(P(e)))}}),Y=function(n){return new D.Show(function(e){return e instanceof A?"Nil":"("+d.intercalate(Q)(E.monoidString)(" : ")(w.map(Z)(D.show(n))(e))+" : Nil)"})},$=function(n){return new D.Show(function(e){return"(NonEmptyList "+D.show(h.showNonEmpty(n)(Y(n)))(e)+")"})},_=new W.Traversable(function(){return Q},function(){return Z},function(n){return W.traverse(_)(n)(i.identity(i.categoryFn))},function(n){return function(e){var u=w.map(n.Apply0().Functor0())(d.foldl(Q)(m.flip(M.create))(A.value)),i=d.foldl(Q)(function(t){var u=r.lift2(n.Apply0())(m.flip(M.create))(t);return function(n){return u(e(n))}})(t.pure(n)(A.value));return function(n){return u(i(n))}}}),nn=h.traversableNonEmpty(_),en=new F.TraversableWithIndex(function(){return k},function(){return H},function(){return _},function(n){return function(e){var u=d.foldl(Q)(m.flip(M.create))(A.value),i=w.map(n.Apply0().Functor0())(u),o=p.foldlWithIndex(k)(function(t){return function(u){var i=r.lift2(n.Apply0())(m.flip(M.create))(u),o=e(t);return function(n){return i(o(n))}}})(t.pure(n)(A.value));return function(n){return i(o(n))}}}),tn=new F.TraversableWithIndex(function(){return z},function(){return K},function(){return nn},function(n){return function(e){return function(t){return w.map(n.Apply0().Functor0())(S)(F.traverseWithIndex(h.traversableWithIndexNonEmpty(en))(n)((r=x.maybe(0)(I.add(I.semiringInt)(1)),function(n){return e(r(n))}))(t));var r}}}),rn=new C.Unfoldable1(function(n){return function(e){var t;return(t=e,function(e){var r,u=t,i=!1;function o(t,r){var o=n(t);if(o.value1 instanceof x.Just)return u=o.value1.value0,void(e=new M(o.value0,r));if(o.value1 instanceof x.Nothing)return i=!0,d.foldl(Q)(m.flip(M.create))(A.value)(new M(o.value0,r));throw new Error("Failed pattern match at Data.List.Types (line 133, column 22 - line 135, column 61): "+[o.constructor.name])}for(;!i;)r=o(u,e);return r})(A.value)}}),un=new g.Unfoldable(function(){return rn},function(n){return function(e){var t;return(t=e,function(e){var r,u=t,i=!1;function o(t,r){var o=n(t);if(o instanceof x.Nothing)return i=!0,d.foldl(Q)(m.flip(M.create))(A.value)(r);if(o instanceof x.Just)return u=o.value0.value1,void(e=new M(o.value0.value0,r));throw new Error("Failed pattern match at Data.List.Types (line 140, column 22 - line 142, column 52): "+[o.constructor.name])}for(;!i;)r=o(u,e);return r})(A.value)}}),on=h.unfoldable1NonEmpty(un),an=h.foldable1NonEmpty(Q),ln=new a.Extend(function(){return J},function(n){return function(e){return new h.NonEmpty(n(e),d.foldr(Q)(function(e){return function(t){return{val:new M(n(new h.NonEmpty(e,t.acc)),t.val),acc:new M(e,t.acc)}}})({val:A.value,acc:A.value})(e.value1).val)}}),cn=new a.Extend(function(){return Z},function(n){return function(e){if(e instanceof A)return A.value;if(e instanceof M){return new M(n(e),d.foldr(Q)(function(e){return function(t){var r=new M(e,t.acc);return{val:new M(n(r),t.val),acc:r}}})({val:A.value,acc:A.value})(e.value1).val)}throw new Error("Failed pattern match at Data.List.Types (line 180, column 1 - line 187, column 42): "+[n.constructor.name,e.constructor.name])}}),fn=new s.Eq1(function(n){return function(e){return function(t){var r;return(r=e,function(e){return function(t){for(var u,i,o,a,l=r,c=e,f=!1;!f;)i=l,o=c,u=(a=t)?i instanceof A&&o instanceof A?(f=!0,a):i instanceof M&&o instanceof M?(l=i.value1,c=o.value1,void(t=a&&s.eq(n)(o.value0)(i.value0))):(f=!0,!1):(f=!0,!1);return u}})(t)(!0)}}}),vn=function(n){return new s.Eq(s.eq1(fn)(n))},sn=function(n){return h.eqNonEmpty(fn)(n)},dn=new N.Ord1(function(){return fn},function(n){return function(e){return function(t){var r;return(r=e,function(e){var t,u=r,i=!1;function o(t,r){if(t instanceof A&&r instanceof A)return i=!0,b.EQ.value;if(t instanceof A)return i=!0,b.LT.value;if(r instanceof A)return i=!0,b.GT.value;if(t instanceof M&&r instanceof M){var o=N.compare(n)(t.value0)(r.value0);return o instanceof b.EQ?(u=t.value1,void(e=r.value1)):(i=!0,o)}throw new Error("Failed pattern match at Data.List.Types (line 61, column 5 - line 61, column 20): "+[t.constructor.name,r.constructor.name])}for(;!i;)t=o(u,e);return t})(t)}}}),pn=function(n){return new N.Ord(function(){return vn(n.Eq0())},N.compare1(dn)(n))},mn=function(n){return h.ordNonEmpty(dn)(n)},wn=new o.Comonad(function(){return ln},function(n){return n.value0}),yn=new r.Apply(function(){return Z},function(n){return function(e){if(n instanceof A)return A.value;if(n instanceof M)return q.append(R)(w.map(Z)(n.value0)(e))(r.apply(yn)(n.value1)(e));throw new Error("Failed pattern match at Data.List.Types (line 155, column 1 - line 157, column 48): "+[n.constructor.name,e.constructor.name])}}),xn=new r.Apply(function(){return J},function(n){return function(e){return new h.NonEmpty(n.value0(e.value0),q.append(R)(r.apply(yn)(n.value1)(new M(e.value0,A.value)))(r.apply(yn)(new M(n.value0,n.value1))(e.value1)))}}),En=new u.Bind(function(){return yn},function(n){return function(e){if(n instanceof A)return A.value;if(n instanceof M)return q.append(R)(e(n.value0))(u.bind(En)(n.value1)(e));throw new Error("Failed pattern match at Data.List.Types (line 162, column 1 - line 164, column 37): "+[n.constructor.name,e.constructor.name])}}),Ln=new u.Bind(function(){return xn},function(n){return function(e){var t=e(n.value0);return new h.NonEmpty(t.value0,q.append(R)(t.value1)(u.bind(En)(n.value1)(function(n){return P(e(n))})))}}),hn=new t.Applicative(function(){return yn},function(n){return new M(n,A.value)}),Nn=new l.Monad(function(){return hn},function(){return En}),bn=new n.Alt(function(){return J},q.append(X)),qn=new n.Alt(function(){return Z},q.append(R)),jn=new v.Plus(function(){return qn},A.value),In=new e.Alternative(function(){return hn},function(){return jn}),Dn=new f.MonadZero(function(){return In},function(){return Nn}),Wn=new c.MonadPlus(function(){return Dn}),Fn=new t.Applicative(function(){return xn},function(){var n=h.singleton(jn);return function(e){return S(n(e))}}()),Tn=new l.Monad(function(){return Fn},function(){return Ln}),gn=new j.Traversable1(function(){return an},function(){return nn},function(n){return j.traverse1(gn)(n)(i.identity(i.categoryFn))},function(n){return function(e){return function(u){return w.mapFlipped(n.Functor0())(d.foldl(Q)(function(t){var u=r.lift2(n)(m.flip(U))(t);return function(n){return u(e(n))}})(w.map(n.Functor0())(t.pure(Fn))(e(u.value0)))(u.value1))(function(n){return d.foldl(Q)(m.flip(U))(t.pure(Fn)(n.value0))(n.value1)})}}});module.exports={Nil:A,Cons:M,NonEmptyList:S,toList:P,nelCons:U,showList:Y,eqList:vn,eq1List:fn,ordList:pn,ord1List:dn,semigroupList:R,monoidList:V,functorList:Z,functorWithIndexList:H,foldableList:Q,foldableWithIndexList:k,unfoldable1List:rn,unfoldableList:un,traversableList:_,traversableWithIndexList:en,applyList:yn,applicativeList:hn,bindList:En,monadList:Nn,altList:qn,plusList:jn,alternativeList:In,monadZeroList:Dn,monadPlusList:Wn,extendList:cn,newtypeNonEmptyList:O,eqNonEmptyList:sn,ordNonEmptyList:mn,showNonEmptyList:$,functorNonEmptyList:J,applyNonEmptyList:xn,applicativeNonEmptyList:Fn,bindNonEmptyList:Ln,monadNonEmptyList:Tn,altNonEmptyList:bn,extendNonEmptyList:ln,comonadNonEmptyList:wn,semigroupNonEmptyList:X,foldableNonEmptyList:G,traversableNonEmptyList:nn,foldable1NonEmptyList:an,unfoldable1NonEmptyList:on,functorWithIndexNonEmptyList:K,foldableWithIndexNonEmptyList:z,traversableWithIndexNonEmptyList:tn,traversable1NonEmptyList:gn}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Comonad/index.js":"U0zO","../Control.Extend/index.js":"JIoJ","../Control.Monad/index.js":"U/Ix","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unfoldable1/index.js":"S0Nl"}],"ezw6":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),e=require("../Control.Applicative/index.js"),t=require("../Control.Apply/index.js"),r=require("../Control.Bind/index.js"),u=require("../Control.Category/index.js"),o=require("../Control.Lazy/index.js"),i=require("../Control.Monad.Rec.Class/index.js"),a=require("../Data.Bifunctor/index.js"),c=require("../Data.Boolean/index.js"),l=require("../Data.Eq/index.js"),f=require("../Data.Foldable/index.js"),s=require("../Data.Function/index.js"),v=require("../Data.Functor/index.js"),m=require("../Data.FunctorWithIndex/index.js"),d=require("../Data.HeytingAlgebra/index.js"),w=require("../Data.List.Types/index.js"),p=require("../Data.Maybe/index.js"),C=require("../Data.Newtype/index.js"),h=require("../Data.NonEmpty/index.js"),N=require("../Data.Ord/index.js"),q=require("../Data.Ordering/index.js"),y=require("../Data.Semigroup/index.js"),D=require("../Data.Show/index.js"),L=require("../Data.Traversable/index.js"),b=require("../Data.Tuple/index.js"),x=require("../Data.Unfoldable/index.js"),F=require("../Data.Unit/index.js"),g=function(n){return n},E=function n(e){return function(t){return function(r){return 0===e&&r instanceof w.Cons?new p.Just(new w.Cons(t,r.value1)):r instanceof w.Cons?v.map(p.functorMaybe)(function(n){return new w.Cons(r.value0,n)})(n(e-1|0)(t)(r.value1)):p.Nothing.value}}},j=f.foldr(w.foldableList)(function(n){return function(e){return new b.Tuple(new w.Cons(n.value0,e.value0),new w.Cons(n.value1,e.value1))}})(new b.Tuple(w.Nil.value,w.Nil.value)),A=function(n){if(n instanceof w.Nil)return p.Nothing.value;if(n instanceof w.Cons)return new p.Just({head:n.value0,tail:n.value1});throw new Error("Failed pattern match at Data.List (line 259, column 1 - line 259, column 66): "+[n.constructor.name])},M=function(n){return x.unfoldr(n)(function(n){return v.map(p.functorMaybe)(function(n){return new b.Tuple(n.head,n.tail)})(A(n))})},J=function(n){if(n instanceof w.Nil)return p.Nothing.value;if(n instanceof w.Cons)return new p.Just(n.value1);throw new Error("Failed pattern match at Data.List (line 245, column 1 - line 245, column 43): "+[n.constructor.name])},B=function(n){return function(e){return function(t){return i.tailRecM2(i.monadRecMaybe)(function(e){return function(t){return e instanceof w.Cons&&t instanceof w.Cons&&l.eq(n)(e.value0)(t.value0)?p.Just.create(new i.Loop({a:e.value1,b:t.value1})):e instanceof w.Nil?p.Just.create(new i.Done(t)):p.Nothing.value}})(e)(t)}}},P=function n(e){return function(t){if(t instanceof w.Cons&&e(t.value0)){var r=n(e)(t.value1);return{init:new w.Cons(t.value0,r.init),rest:r.rest}}return{init:w.Nil.value,rest:t}}},T=function(n){return function(e){return f.foldr(w.foldableList)(w.Cons.create)(new w.Cons(e,w.Nil.value))(n)}},I=function(n){return new w.Cons(n,w.Nil.value)},W=function(n){var e=function e(t){return t instanceof w.Cons&&t.value1 instanceof w.Cons?new w.Cons(function e(t){return function(r){if(t instanceof w.Cons&&r instanceof w.Cons){if(l.eq(q.eqOrdering)(n(t.value0)(r.value0))(q.GT.value))return new w.Cons(r.value0,e(t)(r.value1));if(c.otherwise)return new w.Cons(t.value0,e(t.value1)(r))}if(t instanceof w.Nil)return r;if(r instanceof w.Nil)return t;throw new Error("Failed pattern match at Data.List (line 473, column 3 - line 473, column 38): "+[t.constructor.name,r.constructor.name])}}(t.value0)(t.value1.value0),e(t.value1.value1)):t},t=function(e){if(e instanceof w.Cons&&e.value1 instanceof w.Cons){if(l.eq(q.eqOrdering)(n(e.value0)(e.value1.value0))(q.GT.value))return r(e.value1.value0)(I(e.value0))(e.value1.value1);if(c.otherwise)return u(e.value1.value0)(function(n){return new w.Cons(e.value0,n)})(e.value1.value1)}return I(e)},r=function(e){return function(r){return function(u){var o,i,a,c,f=e,s=r,v=!1;for(;!v;)i=f,a=s,o=(c=u)instanceof w.Cons&&l.eq(q.eqOrdering)(n(i)(c.value0))(q.GT.value)?(f=c.value0,s=new w.Cons(i,a),void(u=c.value1)):(v=!0,new w.Cons(new w.Cons(i,a),t(c)));return o}}},u=function(e){return function(r){return function(u){var o,i=e,a=r,c=!1;function f(e,r,o){return o instanceof w.Cons&&l.notEq(q.eqOrdering)(n(e)(o.value0))(q.GT.value)?(i=o.value0,a=function(n){return r(new w.Cons(e,n))},void(u=o.value1)):(c=!0,new w.Cons(r(I(e)),t(o)))}for(;!c;)o=f(i,a,u);return o}}};return function(n){return function(n){var t,r=!1;function u(t){if(t instanceof w.Cons&&t.value1 instanceof w.Nil)return r=!0,t.value0;n=e(t)}for(;!r;)t=u(n);return t}(t(n))}},O=function(n){return function(e){return W(N.compare(n))(e)}},R=function n(e){if(e instanceof w.Nil)return I(w.Nil.value);if(e instanceof w.Cons)return new w.Cons(e,n(e.value1));throw new Error("Failed pattern match at Data.List (line 626, column 1 - line 626, column 43): "+[e.constructor.name])},z=function(n){return new D.Show(function(e){return"(Pattern "+D.show(w.showList(n))(e)+")"})},G=function(){var n;return n=w.Nil.value,function(e){var t,r=n,u=!1;function o(n,t){if(t instanceof w.Nil)return u=!0,n;if(t instanceof w.Cons)return r=new w.Cons(t.value0,n),void(e=t.value1);throw new Error("Failed pattern match at Data.List (line 368, column 3 - line 368, column 19): "+[n.constructor.name,t.constructor.name])}for(;!u;)t=o(r,e);return t}}(),S=function(){var n;return n=w.Nil.value,function(e){return function(t){var r,u=n,o=e,i=!1;function a(n,e,r){if(e<1)return i=!0,G(n);if(r instanceof w.Nil)return i=!0,G(n);if(r instanceof w.Cons)return u=new w.Cons(r.value0,n),o=e-1|0,void(t=r.value1);throw new Error("Failed pattern match at Data.List (line 520, column 3 - line 520, column 35): "+[n.constructor.name,e.constructor.name,r.constructor.name])}for(;!i;)r=a(u,o,t);return r}}}(),k=function(n){var e;return e=w.Nil.value,function(t){for(var r,u,o,i=e,a=!1;!a;)u=i,r=(o=t)instanceof w.Cons&&n(o.value0)?(i=new w.Cons(o.value0,u),void(t=o.value1)):(a=!0,G(u));return r}},U=function(n){var e;return v.map(p.functorMaybe)(function(n){return{init:G(n.revInit),last:n.last}})((e=n,function(n){var t,r=e,u=!1;function o(e,t){if(e instanceof w.Nil)return u=!0,p.Nothing.value;if(e instanceof w.Cons&&e.value1 instanceof w.Nil)return u=!0,new p.Just({revInit:t,last:e.value0});if(e instanceof w.Cons)return r=e.value1,void(n=new w.Cons(e.value0,t));throw new Error("Failed pattern match at Data.List (line 270, column 3 - line 270, column 23): "+[e.constructor.name,t.constructor.name])}for(;!u;)t=o(r,n);return t})(w.Nil.value))},H=function(n){return function(e){return function(t){var r;return G((r=e,function(e){return function(t){var u,o=r,i=e,a=!1;function c(e,r,u){if(e instanceof w.Nil)return a=!0,u;if(r instanceof w.Nil)return a=!0,u;if(e instanceof w.Cons&&r instanceof w.Cons)return o=e.value1,i=r.value1,void(t=new w.Cons(n(e.value0)(r.value0),u));throw new Error("Failed pattern match at Data.List (line 718, column 3 - line 718, column 21): "+[e.constructor.name,r.constructor.name,u.constructor.name])}for(;!a;)u=c(o,i,t);return u}})(t)(w.Nil.value))}}},K=H(b.Tuple.create),Q=function(n){return function(e){return function(t){return function(r){return L.sequence(w.traversableList)(n)(H(e)(t)(r))}}}},V=function(n){return function(e){if(n===e)return I(n);if(c.otherwise){return(t=e,function(n){return function(e){return function(r){var u,o=t,i=n,a=e,l=!1;function f(n,e,t,u){if(n===e)return l=!0,new w.Cons(n,u);if(c.otherwise)return o=n+t|0,i=e,a=t,void(r=new w.Cons(n,u));throw new Error("Failed pattern match at Data.List (line 148, column 3 - line 149, column 65): "+[n.constructor.name,e.constructor.name,t.constructor.name,u.constructor.name])}for(;!l;)u=f(o,i,a,r);return u}}})(n)(n>e?1:-1)(w.Nil.value)}var t;throw new Error("Failed pattern match at Data.List (line 144, column 1 - line 144, column 32): "+[n.constructor.name,e.constructor.name])}},X=function(n){return function(e){return f.foldr(w.foldableList)(function(e){return function(t){return n(e)?{no:t.no,yes:new w.Cons(e,t.yes)}:{no:new w.Cons(e,t.no),yes:t.yes}}})({no:w.Nil.value,yes:w.Nil.value})(e)}},Y=function(n){return n instanceof w.Nil},Z=new C.Newtype(function(n){return n},g),$=m.mapWithIndex(w.functorWithIndexList),_=function(n){var e;return e=w.Nil.value,function(t){var r,u=e,o=!1;function i(e,r){if(r instanceof w.Nil)return o=!0,G(e);if(r instanceof w.Cons){var i=n(r.value0);if(i instanceof p.Nothing)return u=e,void(t=r.value1);if(i instanceof p.Just)return u=new w.Cons(i.value0,e),void(t=r.value1);throw new Error("Failed pattern match at Data.List (line 419, column 5 - line 421, column 32): "+[i.constructor.name])}throw new Error("Failed pattern match at Data.List (line 417, column 3 - line 417, column 27): "+[e.constructor.name,r.constructor.name])}for(;!o;)r=i(u,t);return r}},nn=function(t){return function(u){return function(o){return i.tailRecM(t)(function(c){return r.bind(t.Monad0().Bind1())(n.alt(u.Plus1().Alt0())(v.map(u.Plus1().Alt0().Functor0())(i.Loop.create)(o))(e.pure(u.Applicative0())(new i.Done(F.unit))))(function(n){return e.pure(u.Applicative0())(a.bimap(i.bifunctorStep)(function(n){return new w.Cons(n,c)})(function(n){return G(c)})(n))})})(w.Nil.value)}}},en=function(n){return function(e){return function(r){return t.apply(e.Applicative0().Apply0())(v.map(e.Plus1().Alt0().Functor0())(w.Cons.create)(r))(nn(n)(e)(r))}}},tn=function(n){return function(e){return function(r){return t.apply(n.Applicative0().Apply0())(v.map(n.Plus1().Alt0().Functor0())(w.Cons.create)(r))(o.defer(e)(function(t){return rn(n)(e)(r)}))}}},rn=function(t){return function(r){return function(u){return n.alt(t.Plus1().Alt0())(tn(t)(r)(u))(e.pure(t.Applicative0())(w.Nil.value))}}},un=f.foldl(w.foldableList)(function(n){return function(e){return n+1|0}})(0),on=function(n){var e,t,r=!1;for(;!r;)e=(t=n)instanceof w.Cons&&t.value1 instanceof w.Nil?(r=!0,new p.Just(t.value0)):t instanceof w.Cons?void(n=t.value1):(r=!0,p.Nothing.value);return e},an=function n(e){return function(t){return function(r){if(r instanceof w.Nil)return I(t);if(r instanceof w.Cons)return e(t)(r.value0)instanceof q.GT?new w.Cons(r.value0,n(e)(t)(r.value1)):new w.Cons(t,r);throw new Error("Failed pattern match at Data.List (line 216, column 1 - line 216, column 68): "+[e.constructor.name,t.constructor.name,r.constructor.name])}}},cn=function n(e){return function(t){return function(r){return 0===e?new p.Just(new w.Cons(t,r)):r instanceof w.Cons?v.map(p.functorMaybe)(function(n){return new w.Cons(r.value0,n)})(n(e-1|0)(t)(r.value1)):p.Nothing.value}}},ln=function(n){return an(N.compare(n))},fn=function(n){return v.map(p.functorMaybe)(function(n){return n.init})(U(n))},sn=function(n){return function(e){var t,r=n,u=!1;function o(n,t){if(n instanceof w.Nil)return u=!0,p.Nothing.value;if(n instanceof w.Cons&&0===t)return u=!0,new p.Just(n.value0);if(n instanceof w.Cons)return r=n.value1,void(e=t-1|0);throw new Error("Failed pattern match at Data.List (line 281, column 1 - line 281, column 44): "+[n.constructor.name,t.constructor.name])}for(;!u;)t=o(r,e);return t}},vn=function(n){if(n instanceof w.Nil)return p.Nothing.value;if(n instanceof w.Cons)return new p.Just(n.value0);throw new Error("Failed pattern match at Data.List (line 230, column 1 - line 230, column 22): "+[n.constructor.name])},mn=function n(e){if(e instanceof w.Nil)return w.Nil.value;if(e instanceof w.Cons&&e.value0 instanceof w.Nil)return n(e.value1);if(e instanceof w.Cons&&e.value0 instanceof w.Cons)return new w.Cons(new w.Cons(e.value0.value0,_(vn)(e.value1)),n(new w.Cons(e.value0.value1,_(J)(e.value1))));throw new Error("Failed pattern match at Data.List (line 752, column 1 - line 752, column 54): "+[e.constructor.name])},dn=function n(e){return function(t){if(t instanceof w.Nil)return w.Nil.value;if(t instanceof w.Cons){var r=P(e(t.value0))(t.value1);return new w.Cons(new h.NonEmpty(t.value0,r.init),n(e)(r.rest))}throw new Error("Failed pattern match at Data.List (line 605, column 1 - line 605, column 80): "+[e.constructor.name,t.constructor.name])}},wn=function(n){return dn(l.eq(n))},pn=function(n){var e=wn(n.Eq0()),t=O(n);return function(n){return e(t(n))}},Cn=function(n){return f.foldr(n)(w.Cons.create)(w.Nil.value)},hn=function n(t){return function(u){return function(o){return function(i){if(i instanceof w.Nil)return e.pure(t.Applicative0())(o);if(i instanceof w.Cons)return r.bind(t.Bind1())(u(o)(i.value0))(function(e){return n(t)(u)(e)(i.value1)});throw new Error("Failed pattern match at Data.List (line 763, column 1 - line 763, column 72): "+[u.constructor.name,o.constructor.name,i.constructor.name])}}}},Nn=function(n){var e;return e=0,function(t){var r,u=e,o=!1;function i(e,r){if(r instanceof w.Cons){if(n(r.value0))return o=!0,new p.Just(e);if(c.otherwise)return u=e+1|0,void(t=r.value1)}if(r instanceof w.Nil)return o=!0,p.Nothing.value;throw new Error("Failed pattern match at Data.List (line 301, column 3 - line 301, column 35): "+[e.constructor.name,r.constructor.name])}for(;!o;)r=i(u,t);return r}},qn=function(n){return function(e){return v.map(p.functorMaybe)(function(n){return(un(e)-1|0)-n|0})(Nn(n)(G(e)))}},yn=function n(t){return function(u){return function(o){if(o instanceof w.Nil)return e.pure(t.Applicative0())(w.Nil.value);if(o instanceof w.Cons)return r.bind(t.Bind1())(u(o.value0))(function(i){return r.bind(t.Bind1())(n(t)(u)(o.value1))(function(n){return e.pure(t.Applicative0())(i?new w.Cons(o.value0,n):n)})});throw new Error("Failed pattern match at Data.List (line 403, column 1 - line 403, column 75): "+[u.constructor.name,o.constructor.name])}}},Dn=function(n){var e;return e=w.Nil.value,function(t){var r,u=e,o=!1;function i(e,r){if(r instanceof w.Nil)return o=!0,G(e);if(r instanceof w.Cons){if(n(r.value0))return u=new w.Cons(r.value0,e),void(t=r.value1);if(c.otherwise)return u=e,void(t=r.value1)}throw new Error("Failed pattern match at Data.List (line 390, column 3 - line 390, column 27): "+[e.constructor.name,r.constructor.name])}for(;!o;)r=i(u,t);return r}},Ln=function(n){return function(e){return function(t){return e instanceof w.Nil?w.Nil.value:t instanceof w.Nil?w.Nil.value:Dn(function(e){return f.any(w.foldableList)(d.heytingAlgebraBoolean)(n(e))(t)})(e)}}},bn=function(n){return Ln(l.eq(n))},xn=function n(e){return function(t){if(t instanceof w.Nil)return w.Nil.value;if(t instanceof w.Cons)return new w.Cons(t.value0,n(e)(Dn(function(n){return!e(t.value0)(n)})(t.value1)));throw new Error("Failed pattern match at Data.List (line 644, column 1 - line 644, column 59): "+[e.constructor.name,t.constructor.name])}},Fn=function(n){return xn(l.eq(n))},gn=function(n){return new l.Eq(function(e){return function(t){return l.eq(w.eqList(n))(e)(t)}})},En=function(n){return new N.Ord(function(){return gn(n.Eq0())},function(e){return function(t){return N.compare(w.ordList(n))(e)(t)}})},jn=function(n){return function(e){return qn(function(t){return l.eq(n)(t)(e)})}},An=function(n){return function(e){return Nn(function(t){return l.eq(n)(t)(e)})}},Mn=function(n){return function(e){var t,r=!1;function u(t){if(!(t instanceof w.Cons&&n(t.value0)))return r=!0,t;e=t.value1}for(;!r;)t=u(e);return t}},Jn=function(n){return function(e){return S(un(e)-n|0)(e)}},Bn=function(n){return function(e){var t,r=n,u=!1;function o(n,t){if(n<1)return u=!0,t;if(t instanceof w.Nil)return u=!0,w.Nil.value;if(t instanceof w.Cons)return r=n-1|0,void(e=t.value1);throw new Error("Failed pattern match at Data.List (line 543, column 1 - line 543, column 42): "+[n.constructor.name,t.constructor.name])}for(;!u;)t=o(r,e);return t}},Pn=function(n){return function(e){return function(t){return S(e-n|0)(Bn(n)(t))}}},Tn=function(n){return function(e){return Bn(un(e)-n|0)(e)}},In=function n(e){return function(t){return function(r){if(r instanceof w.Nil)return w.Nil.value;if(r instanceof w.Cons&&e(t)(r.value0))return r.value1;if(r instanceof w.Cons)return new w.Cons(r.value0,n(e)(t)(r.value1));throw new Error("Failed pattern match at Data.List (line 671, column 1 - line 671, column 67): "+[e.constructor.name,t.constructor.name,r.constructor.name])}}},Wn=function(n){return function(e){return function(t){return y.append(w.semigroupList)(e)(f.foldl(w.foldableList)(s.flip(In(n)))(xn(n)(t))(e))}}},On=function(n){return Wn(l.eq(n))},Rn=function n(e){return function(t){return 0===e&&t instanceof w.Cons?new p.Just(t.value1):t instanceof w.Cons?v.map(p.functorMaybe)(function(n){return new w.Cons(t.value0,n)})(n(e-1|0)(t.value1)):p.Nothing.value}},zn=function(n){return In(l.eq(n))},Gn=function(n){return f.foldl(w.foldableList)(s.flip(zn(n)))},Sn=s.flip(r.bind(w.bindList)),kn=function(n){return r.bind(w.bindList)(n)(u.identity(u.categoryFn))},Un=_(u.identity(u.categoryFn)),Hn=function n(e){return function(t){return function(r){return 0===e&&r instanceof w.Cons?p.Just.create(function(){var n=t(r.value0);if(n instanceof p.Nothing)return r.value1;if(n instanceof p.Just)return new w.Cons(n.value0,r.value1);throw new Error("Failed pattern match at Data.List (line 352, column 3 - line 354, column 23): "+[n.constructor.name])}()):r instanceof w.Cons?v.map(p.functorMaybe)(function(n){return new w.Cons(r.value0,n)})(n(e-1|0)(t)(r.value1)):p.Nothing.value}}},Kn=function(n){return function(e){return Hn(n)(function(n){return p.Just.create(e(n))})}};module.exports={toUnfoldable:M,fromFoldable:Cn,singleton:I,range:V,some:tn,someRec:en,many:rn,manyRec:nn,null:Y,length:un,snoc:T,insert:ln,insertBy:an,head:vn,last:on,tail:J,init:fn,uncons:A,unsnoc:U,index:sn,elemIndex:An,elemLastIndex:jn,findIndex:Nn,findLastIndex:qn,insertAt:cn,deleteAt:Rn,updateAt:E,modifyAt:Kn,alterAt:Hn,reverse:G,concat:kn,concatMap:Sn,filter:Dn,filterM:yn,mapMaybe:_,catMaybes:Un,mapWithIndex:$,sort:O,sortBy:W,Pattern:g,stripPrefix:B,slice:Pn,take:S,takeEnd:Tn,takeWhile:k,drop:Bn,dropEnd:Jn,dropWhile:Mn,span:P,group:wn,"group'":pn,groupBy:dn,partition:X,nub:Fn,nubBy:xn,union:On,unionBy:Wn,delete:zn,deleteBy:In,difference:Gn,intersect:bn,intersectBy:Ln,zipWith:H,zipWithA:Q,zip:K,unzip:j,transpose:mn,foldM:hn,eqPattern:gn,ordPattern:En,newtypePattern:Z,showPattern:z}; -},{"../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Lazy/index.js":"y9cE","../Control.Monad.Rec.Class/index.js":"UVIy","../Data.Bifunctor/index.js":"e2Wc","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.HeytingAlgebra/index.js":"paZe","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unit/index.js":"NhVk"}],"9xeJ":[function(require,module,exports) { -"use strict";exports.defer=function(r){var n=null;return function(){return void 0===r?n:(n=r(),r=void 0,n)}},exports.force=function(r){return r()}; -},{}],"aRUE":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),t=require("../Control.Bind/index.js"),u=require("../Control.Comonad/index.js"),i=require("../Control.Extend/index.js"),o=require("../Control.Lazy/index.js"),f=require("../Control.Monad/index.js"),c=require("../Data.BooleanAlgebra/index.js"),a=require("../Data.Bounded/index.js"),d=require("../Data.CommutativeRing/index.js"),l=require("../Data.Eq/index.js"),s=require("../Data.EuclideanRing/index.js"),p=require("../Data.Foldable/index.js"),y=require("../Data.FoldableWithIndex/index.js"),x=require("../Data.Function/index.js"),m=require("../Data.Functor/index.js"),q=require("../Data.Functor.Invariant/index.js"),g=require("../Data.FunctorWithIndex/index.js"),w=require("../Data.HeytingAlgebra/index.js"),z=require("../Data.Monoid/index.js"),j=require("../Data.Ord/index.js"),L=require("../Data.Ring/index.js"),b=require("../Data.Semigroup/index.js"),D=require("../Data.Semigroup.Foldable/index.js"),v=require("../Data.Semigroup.Traversable/index.js"),F=require("../Data.Semiring/index.js"),h=require("../Data.Show/index.js"),A=require("../Data.Traversable/index.js"),C=require("../Data.TraversableWithIndex/index.js"),I=require("../Data.Unit/index.js"),R=function(r){return new h.Show(function(e){return"(defer \\_ -> "+h.show(r)(n.force(e))+")"})},S=function(r){return new F.Semiring(function(e){return function(t){return n.defer(function(u){return F.add(r)(n.force(e))(n.force(t))})}},function(e){return function(t){return n.defer(function(u){return F.mul(r)(n.force(e))(n.force(t))})}},n.defer(function(n){return F.one(r)}),n.defer(function(n){return F.zero(r)}))},W=function(r){return new b.Semigroup(function(e){return function(t){return n.defer(function(u){return b.append(r)(n.force(e))(n.force(t))})}})},E=function(r){return new L.Ring(function(){return S(r.Semiring0())},function(e){return function(t){return n.defer(function(u){return L.sub(r)(n.force(e))(n.force(t))})}})},B=function(r){return new z.Monoid(function(){return W(r.Semigroup0())},n.defer(function(n){return z.mempty(r)}))},T=new o.Lazy(function(r){return n.defer(function(e){return n.force(r(I.unit))})}),M=new m.Functor(function(r){return function(e){return n.defer(function(t){return r(n.force(e))})}}),O=new g.FunctorWithIndex(function(){return M},function(n){return m.map(M)(n(I.unit))}),H=new q.Invariant(q.imapF(M)),U=new p.Foldable(function(r){return function(r){return function(e){return r(n.force(e))}}},function(r){return function(e){return function(t){return r(e)(n.force(t))}}},function(r){return function(e){return function(t){return r(n.force(t))(e)}}}),_=new y.FoldableWithIndex(function(){return U},function(n){return function(r){return p.foldMap(U)(n)(r(I.unit))}},function(n){return p.foldl(U)(n(I.unit))},function(n){return p.foldr(U)(n(I.unit))}),k=new A.Traversable(function(){return U},function(){return M},function(r){return function(e){return m.map(r.Apply0().Functor0())(function(r){return n.defer(x.const(r))})(n.force(e))}},function(r){return function(e){return function(t){return m.map(r.Apply0().Functor0())(function(r){return n.defer(x.const(r))})(e(n.force(t)))}}}),G=new C.TraversableWithIndex(function(){return _},function(){return O},function(){return k},function(n){return function(r){return A.traverse(k)(n)(r(I.unit))}}),J=new D.Foldable1(function(){return U},function(n){return D.fold1Default(J)(n)},function(r){return function(r){return function(e){return r(n.force(e))}}}),K=new v.Traversable1(function(){return J},function(){return k},function(r){return function(e){return m.map(r.Functor0())(function(r){return n.defer(x.const(r))})(n.force(e))}},function(r){return function(e){return function(t){return m.map(r.Functor0())(function(r){return n.defer(x.const(r))})(e(n.force(t)))}}}),N=new i.Extend(function(){return M},function(r){return function(e){return n.defer(function(n){return r(e)})}}),P=function(r){return new l.Eq(function(e){return function(t){return l.eq(r)(n.force(e))(n.force(t))}})},Q=function(r){return new j.Ord(function(){return P(r.Eq0())},function(e){return function(t){return j.compare(r)(n.force(e))(n.force(t))}})},V=new l.Eq1(function(n){return l.eq(P(n))}),X=new j.Ord1(function(){return V},function(n){return j.compare(Q(n))}),Y=new u.Comonad(function(){return N},n.force),Z=function(n){return new d.CommutativeRing(function(){return E(n.Ring0())})},$=function(r){return new s.EuclideanRing(function(){return Z(r.CommutativeRing0())},(e=s.degree(r),function(r){return e(n.force(r))}),function(e){return function(t){return n.defer(function(u){return s.div(r)(n.force(e))(n.force(t))})}},function(e){return function(t){return n.defer(function(u){return s.mod(r)(n.force(e))(n.force(t))})}});var e},nn=function(r){return new a.Bounded(function(){return Q(r.Ord0())},n.defer(function(n){return a.bottom(r)}),n.defer(function(n){return a.top(r)}))},rn=new e.Apply(function(){return M},function(r){return function(e){return n.defer(function(t){return n.force(r)(n.force(e))})}}),en=new t.Bind(function(){return rn},function(r){return function(e){return n.defer(function(t){return n.force(e(n.force(r)))})}}),tn=function(r){return new w.HeytingAlgebra(function(n){return function(t){return e.apply(rn)(m.map(M)(w.conj(r))(n))(t)}},function(n){return function(t){return e.apply(rn)(m.map(M)(w.disj(r))(n))(t)}},n.defer(function(n){return w.ff(r)}),function(n){return function(t){return e.apply(rn)(m.map(M)(w.implies(r))(n))(t)}},function(n){return m.map(M)(w.not(r))(n)},n.defer(function(n){return w.tt(r)}))},un=function(n){return new c.BooleanAlgebra(function(){return tn(n.HeytingAlgebra0())})},on=new r.Applicative(function(){return rn},function(r){return n.defer(function(n){return r})}),fn=new f.Monad(function(){return on},function(){return en});module.exports={semiringLazy:S,ringLazy:E,commutativeRingLazy:Z,euclideanRingLazy:$,eqLazy:P,eq1Lazy:V,ordLazy:Q,ord1Lazy:X,boundedLazy:nn,semigroupLazy:W,monoidLazy:B,heytingAlgebraLazy:tn,booleanAlgebraLazy:un,functorLazy:M,functorWithIndexLazy:O,foldableLazy:U,foldableWithIndexLazy:_,foldable1Lazy:J,traversableLazy:k,traversableWithIndexLazy:G,traversable1Lazy:K,invariantLazy:H,applyLazy:rn,applicativeLazy:on,bindLazy:en,monadLazy:fn,extendLazy:N,comonadLazy:Y,showLazy:R,lazyLazy:T,defer:n.defer,force:n.force}; -},{"./foreign.js":"9xeJ","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Comonad/index.js":"U0zO","../Control.Extend/index.js":"JIoJ","../Control.Lazy/index.js":"y9cE","../Control.Monad/index.js":"U/Ix","../Data.BooleanAlgebra/index.js":"e7y+","../Data.Bounded/index.js":"kcUU","../Data.CommutativeRing/index.js":"60TQ","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Functor.Invariant/index.js":"AXkC","../Data.FunctorWithIndex/index.js":"OHRN","../Data.HeytingAlgebra/index.js":"paZe","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ring/index.js":"E2qH","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Unit/index.js":"NhVk"}],"EJF+":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),t=require("../Control.Alternative/index.js"),e=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),u=require("../Control.Bind/index.js"),o=require("../Control.Category/index.js"),i=require("../Control.Comonad/index.js"),a=require("../Control.Extend/index.js"),c=require("../Control.Lazy/index.js"),f=require("../Control.Monad/index.js"),l=require("../Control.MonadPlus/index.js"),d=require("../Control.MonadZero/index.js"),s=require("../Control.Plus/index.js"),p=require("../Data.Eq/index.js"),v=require("../Data.Foldable/index.js"),m=require("../Data.FoldableWithIndex/index.js"),y=require("../Data.Function/index.js"),w=require("../Data.Functor/index.js"),L=require("../Data.FunctorWithIndex/index.js"),x=require("../Data.Lazy/index.js"),h=require("../Data.Maybe/index.js"),E=require("../Data.Monoid/index.js"),b=require("../Data.Newtype/index.js"),N=require("../Data.NonEmpty/index.js"),q=require("../Data.Ord/index.js"),j=require("../Data.Ordering/index.js"),I=require("../Data.Semigroup/index.js"),D=require("../Data.Semiring/index.js"),F=require("../Data.Show/index.js"),W=require("../Data.Traversable/index.js"),T=require("../Data.TraversableWithIndex/index.js"),z=require("../Data.Tuple/index.js"),g=require("../Data.Unfoldable/index.js"),A=require("../Data.Unfoldable1/index.js"),C=function(n){return n},M=function(){function n(){}return n.value=new n,n}(),S=function(){function n(n,t){this.value0=n,this.value1=t}return n.create=function(t){return function(e){return new n(t,e)}},n}(),P=function(n){return n},U=C(x.defer(function(n){return M.value})),O=new b.Newtype(function(n){return n},P),B=new b.Newtype(function(n){return n},C),Z=function(){var n=b.unwrap(B);return function(t){return x.force(n(t))}}(),J=new I.Semigroup(function(n){return function(t){return w.map(x.functorLazy)(function(n){if(n instanceof M)return Z(t);if(n instanceof S)return new S(n.value0,I.append(J)(n.value1)(t));throw new Error("Failed pattern match at Data.List.Lazy.Types (line 98, column 5 - line 98, column 21): "+[n.constructor.name])})(b.unwrap(B)(n))}}),Q=function(n){return new F.Show(function(t){return"fromStrict ("+function t(e){if(e instanceof M)return"Nil";if(e instanceof S)return"(Cons "+F.show(n)(e.value0)+" "+t(Z(e.value1))+")";throw new Error("Failed pattern match at Data.List.Lazy.Types (line 64, column 5 - line 64, column 19): "+[e.constructor.name])}(Z(t))+")"})},G=function(n){return new F.Show(function(t){return"(NonEmptyList "+F.show(x.showLazy(N.showNonEmpty(n)(Q(n))))(t)+")"})},k=new E.Monoid(function(){return J},U),H=new c.Lazy(function(n){return C(x.defer(function(t){return Z(n(t))}))}),K=new w.Functor(function(n){return function(t){return w.map(x.functorLazy)(function(t){if(t instanceof M)return M.value;if(t instanceof S)return new S(n(t.value0),w.map(K)(n)(t.value1));throw new Error("Failed pattern match at Data.List.Lazy.Types (line 107, column 5 - line 107, column 17): "+[t.constructor.name])})(b.unwrap(B)(t))}}),R=new w.Functor(function(n){return function(t){return w.map(x.functorLazy)(w.map(N.functorNonEmpty(K))(n))(t)}}),V=new p.Eq1(function(n){return function(t){return function(e){var r;return(r=Z(t),function(t){for(var e,u,o,i=r,a=!1;!a;)o=t,e=(u=i)instanceof M&&o instanceof M?(a=!0,!0):u instanceof S&&o instanceof S&&p.eq(n)(u.value0)(o.value0)?(i=Z(u.value1),void(t=Z(o.value1))):(a=!0,!1);return e})(Z(e))}}}),X=function(n){return new p.Eq(p.eq1(V)(n))},Y=function(n){return x.eqLazy(N.eqNonEmpty(V)(n))},$=new q.Ord1(function(){return V},function(n){return function(t){return function(e){var r;return(r=Z(t),function(t){var e,u=r,o=!1;function i(e,r){if(e instanceof M&&r instanceof M)return o=!0,j.EQ.value;if(e instanceof M)return o=!0,j.LT.value;if(r instanceof M)return o=!0,j.GT.value;if(e instanceof S&&r instanceof S){var i=q.compare(n)(e.value0)(r.value0);return i instanceof j.EQ?(u=Z(e.value1),void(t=Z(r.value1))):(o=!0,i)}throw new Error("Failed pattern match at Data.List.Lazy.Types (line 84, column 5 - line 84, column 20): "+[e.constructor.name,r.constructor.name])}for(;!o;)e=i(u,t);return e})(Z(e))}}}),_=function(n){return new q.Ord(function(){return X(n.Eq0())},q.compare1($)(n))},nn=function(n){return x.ordLazy(N.ordNonEmpty($)(n))},tn=function(n){return function(t){return C(x.defer(function(e){return new S(n,t)}))}},en=new v.Foldable(function(n){return function(t){return v.foldl(en)(function(e){return function(r){return I.append(n.Semigroup0())(e)(t(r))}})(E.mempty(n))}},function(n){return function(t){return function(e){var r,u=t,o=!1;function i(t,r){var i=Z(r);if(i instanceof M)return o=!0,t;if(i instanceof S)return u=n(t)(i.value0),void(e=i.value1);throw new Error("Failed pattern match at Data.List.Lazy.Types (line 122, column 7 - line 124, column 40): "+[i.constructor.name])}for(;!o;)r=i(u,e);return r}}},function(n){return function(t){return function(e){var r=v.foldl(en)(y.flip(tn))(U);return v.foldl(en)(y.flip(n))(t)(r(e))}}}),rn=new a.Extend(function(){return K},function(n){return function(t){var e=Z(t);if(e instanceof M)return U;if(e instanceof S)return tn(n(t))(v.foldr(en)(function(t){return function(e){var r=tn(t)(e.acc);return{val:tn(n(r))(e.val),acc:r}}})({val:U,acc:U})(e.value1).val);throw new Error("Failed pattern match at Data.List.Lazy.Types (line 194, column 5 - line 197, column 55): "+[e.constructor.name])}}),un=new a.Extend(function(){return R},function(n){return function(t){var e=function(t){return function(e){return{val:tn(n(x.defer(function(n){return new N.NonEmpty(t,e.acc)})))(e.val),acc:tn(t)(e.acc)}}},r=x.force(t);return P(x.defer(function(u){return new N.NonEmpty(n(t),v.foldr(en)(e)({val:U,acc:U})(r.value1).val)}))}}),on=new v.Foldable(function(n){return function(t){return function(e){return v.foldMap(N.foldableNonEmpty(en))(n)(t)(x.force(e))}}},function(n){return function(t){return function(e){return v.foldl(N.foldableNonEmpty(en))(n)(t)(x.force(e))}}},function(n){return function(t){return function(e){return v.foldr(N.foldableNonEmpty(en))(n)(t)(x.force(e))}}}),an=new m.FoldableWithIndex(function(){return en},function(n){return function(t){return m.foldlWithIndex(an)(function(e){return function(r){var u=I.append(n.Semigroup0())(r),o=t(e);return function(n){return u(o(n))}}})(E.mempty(n))}},function(n){return function(t){var e=v.foldl(en)(function(t){return function(e){return new z.Tuple(t.value0+1|0,n(t.value0)(t.value1)(e))}})(new z.Tuple(0,t));return function(n){return z.snd(e(n))}}},function(n){return function(t){return function(e){var r=v.foldl(en)(function(n){return function(t){return new z.Tuple(n.value0+1|0,tn(t)(n.value1))}})(new z.Tuple(0,U))(e);return z.snd(v.foldl(en)(function(t){return function(e){return new z.Tuple(t.value0-1|0,n(t.value0-1|0)(e)(t.value1))}})(new z.Tuple(r.value0,t))(r.value1))}}}),cn=new m.FoldableWithIndex(function(){return on},function(n){return function(t){return function(e){return m.foldMapWithIndex(N.foldableWithIndexNonEmpty(an))(n)((r=h.maybe(0)(D.add(D.semiringInt)(1)),function(n){return t(r(n))}))(x.force(e));var r}}},function(n){return function(t){return function(e){return m.foldlWithIndex(N.foldableWithIndexNonEmpty(an))((r=h.maybe(0)(D.add(D.semiringInt)(1)),function(t){return n(r(t))}))(t)(x.force(e));var r}}},function(n){return function(t){return function(e){return m.foldrWithIndex(N.foldableWithIndexNonEmpty(an))((r=h.maybe(0)(D.add(D.semiringInt)(1)),function(t){return n(r(t))}))(t)(x.force(e));var r}}}),fn=new L.FunctorWithIndex(function(){return K},function(n){return m.foldrWithIndex(an)(function(t){return function(e){return function(r){return tn(n(t)(e))(r)}}})(U)}),ln=new L.FunctorWithIndex(function(){return R},function(n){return function(t){return P(x.defer(function(e){return L.mapWithIndex(N.functorWithIndex(fn))((r=h.maybe(0)(D.add(D.semiringInt)(1)),function(t){return n(r(t))}))(x.force(t));var r}))}}),dn=function(n){return c.defer(H)(function(t){var e=x.force(n);return tn(e.value0)(e.value1)})},sn=new I.Semigroup(function(n){return function(t){var e=x.force(n);return x.defer(function(n){return new N.NonEmpty(e.value0,I.append(J)(e.value1)(dn(t)))})}}),pn=new W.Traversable(function(){return en},function(){return K},function(n){return W.traverse(pn)(n)(o.identity(o.categoryFn))},function(n){return function(t){return v.foldr(en)(function(e){return function(u){return r.apply(n.Apply0())(w.map(n.Apply0().Functor0())(tn)(t(e)))(u)}})(e.pure(n)(U))}}),vn=new W.Traversable(function(){return on},function(){return R},function(n){return function(t){return w.map(n.Apply0().Functor0())(function(n){return P(x.defer(function(t){return n}))})(W.sequence(N.traversableNonEmpty(pn))(n)(x.force(t)))}},function(n){return function(t){return function(e){return w.map(n.Apply0().Functor0())(function(n){return P(x.defer(function(t){return n}))})(W.traverse(N.traversableNonEmpty(pn))(n)(t)(x.force(e)))}}}),mn=new T.TraversableWithIndex(function(){return an},function(){return fn},function(){return pn},function(n){return function(t){return m.foldrWithIndex(an)(function(e){return function(u){return function(o){return r.apply(n.Apply0())(w.map(n.Apply0().Functor0())(tn)(t(e)(u)))(o)}}})(e.pure(n)(U))}}),yn=new T.TraversableWithIndex(function(){return cn},function(){return ln},function(){return vn},function(n){return function(t){return function(e){return w.map(n.Apply0().Functor0())(function(n){return P(x.defer(function(t){return n}))})(T.traverseWithIndex(N.traversableWithIndexNonEmpty(mn))(n)((r=h.maybe(0)(D.add(D.semiringInt)(1)),function(n){return t(r(n))}))(x.force(e)));var r}}}),wn=new A.Unfoldable1(function n(t){return function(e){return c.defer(H)(function(r){var u=t(e);if(u.value1 instanceof h.Just)return tn(u.value0)(n(t)(u.value1.value0));if(u.value1 instanceof h.Nothing)return tn(u.value0)(U);throw new Error("Failed pattern match at Data.List.Lazy.Types (line 146, column 28 - line 148, column 33): "+[u.constructor.name])})}}),Ln=new g.Unfoldable(function(){return wn},function n(t){return function(e){return c.defer(H)(function(r){var u=t(e);if(u instanceof h.Nothing)return U;if(u instanceof h.Just)return tn(u.value0.value0)(n(t)(u.value0.value1));throw new Error("Failed pattern match at Data.List.Lazy.Types (line 152, column 28 - line 154, column 39): "+[u.constructor.name])})}}),xn=new A.Unfoldable1(function(n){return function(t){return P(x.defer(function(e){return A.unfoldr1(N.unfoldable1NonEmpty(Ln))(n)(t)}))}}),hn=new i.Comonad(function(){return un},function(n){return N.head(x.force(n))}),En=new f.Monad(function(){return qn},function(){return bn}),bn=new u.Bind(function(){return Nn},function(n){return function(t){return w.map(x.functorLazy)(function(n){if(n instanceof M)return M.value;if(n instanceof S)return Z(I.append(J)(t(n.value0))(u.bind(bn)(n.value1)(t)));throw new Error("Failed pattern match at Data.List.Lazy.Types (line 175, column 5 - line 175, column 17): "+[n.constructor.name])})(b.unwrap(B)(n))}}),Nn=new r.Apply(function(){return K},f.ap(En)),qn=new e.Applicative(function(){return Nn},function(n){return tn(n)(U)}),jn=new r.Apply(function(){return R},function(n){return function(t){var e=x.force(t),u=x.force(n);return x.defer(function(n){return new N.NonEmpty(u.value0(e.value0),I.append(J)(r.apply(Nn)(u.value1)(tn(e.value0)(U)))(r.apply(Nn)(tn(u.value0)(u.value1))(e.value1)))})}}),In=new u.Bind(function(){return jn},function(n){return function(t){var e=x.force(n),r=x.force(b.unwrap(O)(t(e.value0)));return x.defer(function(n){return new N.NonEmpty(r.value0,I.append(J)(r.value1)(u.bind(bn)(e.value1)(function(n){return dn(t(n))})))})}}),Dn=new n.Alt(function(){return R},I.append(sn)),Fn=new n.Alt(function(){return K},I.append(J)),Wn=new s.Plus(function(){return Fn},U),Tn=new t.Alternative(function(){return qn},function(){return Wn}),zn=new d.MonadZero(function(){return Tn},function(){return En}),gn=new l.MonadPlus(function(){return zn}),An=new e.Applicative(function(){return jn},function(n){return x.defer(function(t){return N.singleton(Wn)(n)})}),Cn=new f.Monad(function(){return An},function(){return In});module.exports={List:C,Nil:M,Cons:S,step:Z,nil:U,cons:tn,NonEmptyList:P,toList:dn,newtypeList:B,showList:Q,eqList:X,eq1List:V,ordList:_,ord1List:$,lazyList:H,semigroupList:J,monoidList:k,functorList:K,functorWithIndexList:fn,foldableList:en,foldableWithIndexList:an,unfoldable1List:wn,unfoldableList:Ln,traversableList:pn,traversableWithIndexList:mn,applyList:Nn,applicativeList:qn,bindList:bn,monadList:En,altList:Fn,plusList:Wn,alternativeList:Tn,monadZeroList:zn,monadPlusList:gn,extendList:rn,newtypeNonEmptyList:O,eqNonEmptyList:Y,ordNonEmptyList:nn,showNonEmptyList:G,functorNonEmptyList:R,applyNonEmptyList:jn,applicativeNonEmptyList:An,bindNonEmptyList:In,monadNonEmptyList:Cn,altNonEmptyList:Dn,extendNonEmptyList:un,comonadNonEmptyList:hn,semigroupNonEmptyList:sn,foldableNonEmptyList:on,traversableNonEmptyList:vn,unfoldable1NonEmptyList:xn,functorWithIndexNonEmptyList:ln,foldableWithIndexNonEmptyList:cn,traversableWithIndexNonEmptyList:yn}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Comonad/index.js":"U0zO","../Control.Extend/index.js":"JIoJ","../Control.Lazy/index.js":"y9cE","../Control.Monad/index.js":"U/Ix","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Lazy/index.js":"aRUE","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unfoldable1/index.js":"S0Nl"}],"sNBV":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),t=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),r=require("../Control.Bind/index.js"),u=require("../Control.Category/index.js"),i=require("../Control.Lazy/index.js"),o=require("../Control.Monad.Rec.Class/index.js"),a=require("../Data.Boolean/index.js"),c=require("../Data.Eq/index.js"),l=require("../Data.Foldable/index.js"),f=require("../Data.Function/index.js"),s=require("../Data.Functor/index.js"),p=require("../Data.HeytingAlgebra/index.js"),m=require("../Data.Lazy/index.js"),v=require("../Data.List.Lazy.Types/index.js"),d=require("../Data.Maybe/index.js"),w=require("../Data.Newtype/index.js"),L=require("../Data.NonEmpty/index.js"),y=require("../Data.Ord/index.js"),h=require("../Data.Ordering/index.js"),z=require("../Data.Semigroup/index.js"),C=require("../Data.Show/index.js"),N=require("../Data.Traversable/index.js"),D=require("../Data.Tuple/index.js"),b=require("../Data.Unfoldable/index.js"),q=function(n){return n},x=function n(t){return function(r){return function(u){return e.apply(m.applyLazy)(s.map(m.functorLazy)(function(e){return function(r){if(e instanceof v.Nil)return v.Nil.value;if(r instanceof v.Nil)return v.Nil.value;if(e instanceof v.Cons&&r instanceof v.Cons)return new v.Cons(t(e.value0)(r.value0),n(t)(e.value1)(r.value1));throw new Error("Failed pattern match at Data.List.Lazy (line 693, column 3 - line 693, column 35): "+[e.constructor.name,r.constructor.name])}})(w.unwrap(v.newtypeList)(r)))(w.unwrap(v.newtypeList)(u))}}},F=function(n){return function(t){return function(e){return function(r){return N.sequence(v.traversableList)(n)(x(t)(e)(r))}}}},E=x(D.Tuple.create),g=function n(t){return function(e){return function(r){var u;return s.map(m.functorLazy)((u=t,function(t){if(t instanceof v.Nil)return v.Nil.value;if(0===u&&t instanceof v.Cons)return new v.Cons(e,t.value1);if(t instanceof v.Cons)return new v.Cons(t.value0,n(u-1|0)(e)(t.value1));throw new Error("Failed pattern match at Data.List.Lazy (line 367, column 3 - line 367, column 17): "+[u.constructor.name,t.constructor.name])}))(w.unwrap(v.newtypeList)(r))}}},j=l.foldr(v.foldableList)(function(n){return function(t){return new D.Tuple(v.cons(n.value0)(t.value0),v.cons(n.value1)(t.value1))}})(new D.Tuple(v.nil,v.nil)),A=function(n){var t=v.step(n);if(t instanceof v.Nil)return d.Nothing.value;if(t instanceof v.Cons)return new d.Just({head:t.value0,tail:t.value1});throw new Error("Failed pattern match at Data.List.Lazy (line 285, column 13 - line 287, column 44): "+[t.constructor.name])},M=function(n){return b.unfoldr(n)(function(n){return s.map(d.functorMaybe)(function(n){return new D.Tuple(n.head,n.tail)})(A(n))})},J=function n(t){var e=s.map(m.functorLazy)(function(e){return e instanceof v.Cons&&t(e.value0)?new v.Cons(e.value0,n(t)(e.value1)):v.Nil.value}),r=w.unwrap(v.newtypeList);return function(n){return v.List(e(r(n)))}},B=function n(t){if(t<=0)return f.const(v.nil);var e,r=s.map(m.functorLazy)((e=t,function(t){if(t instanceof v.Nil)return v.Nil.value;if(t instanceof v.Cons)return new v.Cons(t.value0,n(e-1|0)(t.value1));throw new Error("Failed pattern match at Data.List.Lazy (line 517, column 3 - line 517, column 32): "+[e.constructor.name,t.constructor.name])})),u=w.unwrap(v.newtypeList);return function(n){return v.List(r(u(n)))}},T=function(n){return s.map(d.functorMaybe)(function(n){return n.tail})(A(n))},P=function(n){return function(t){return function(e){return o.tailRecM2(o.monadRecMaybe)(function(t){return function(e){var r=v.step(t);if(r instanceof v.Nil)return d.Just.create(new o.Done(e));if(r instanceof v.Cons){var u=v.step(e);return u instanceof v.Cons&&c.eq(n)(r.value0)(u.value0)?d.Just.create(new o.Loop({a:r.value1,b:u.value1})):d.Nothing.value}throw new Error("Failed pattern match at Data.List.Lazy (line 499, column 21 - line 503, column 19): "+[r.constructor.name])}})(t)(e)}}},I=function n(t){return function(e){var r=A(e);if(r instanceof d.Just&&t(r.value0.head)){var u=n(t)(r.value0.tail);return{init:v.cons(r.value0.head)(u.init),rest:u.rest}}return{init:v.nil,rest:e}}},W=function(n){return function(t){return l.foldr(v.foldableList)(v.cons)(v.cons(t)(v.nil))(n)}},O=function(n){return v.cons(n)(v.nil)},R=function(n){return new C.Show(function(t){return"(Pattern "+C.show(v.showList(n))(t)+")"})},S=function n(t){return function(e){return function(r){return s.map(m.functorLazy)(function(r){if(r instanceof v.Nil)return v.Nil.value;if(r instanceof v.Cons){var u=t(r.value0)(e);return v.Cons.create(u)(n(t)(u)(r.value1))}throw new Error("Failed pattern match at Data.List.Lazy (line 764, column 5 - line 764, column 27): "+[r.constructor.name])})(w.unwrap(v.newtypeList)(r))}}},k=function(n){return i.defer(v.lazyList)(function(t){return l.foldl(v.foldableList)(f.flip(v.cons))(v.nil)(n)})},U=function n(e){return function(u){return function(i){if(u<1)return t.pure(e.Applicative0())(v.nil);if(a.otherwise)return r.bind(e.Bind1())(i)(function(o){return r.bind(e.Bind1())(n(e)(u-1|0)(i))(function(n){return t.pure(e.Applicative0())(v.cons(o)(n))})});throw new Error("Failed pattern match at Data.List.Lazy (line 161, column 1 - line 161, column 62): "+[u.constructor.name,i.constructor.name])}}},G=function(n){return i.fix(v.lazyList)(function(t){return v.cons(n)(t)})},H=function(n){return function(t){return B(n)(G(t))}},K=function(n){return function(t){if(n>t){return b.unfoldr(v.unfoldableList)(function(n){if(n>=t)return new d.Just(new D.Tuple(n,n-1|0));if(a.otherwise)return d.Nothing.value;throw new Error("Failed pattern match at Data.List.Lazy (line 148, column 13 - line 149, column 38): "+[n.constructor.name])})(n)}if(a.otherwise){return b.unfoldr(v.unfoldableList)(function(n){if(n<=t)return new d.Just(new D.Tuple(n,n+1|0));if(a.otherwise)return d.Nothing.value;throw new Error("Failed pattern match at Data.List.Lazy (line 153, column 5 - line 154, column 30): "+[n.constructor.name])})(n)}throw new Error("Failed pattern match at Data.List.Lazy (line 145, column 1 - line 145, column 32): "+[n.constructor.name,t.constructor.name])}},Q=function(n){return l.foldr(v.foldableList)(function(t){return function(e){return n(t)?{yes:v.cons(t)(e.yes),no:e.no}:{yes:e.yes,no:v.cons(t)(e.no)}}})({yes:v.nil,no:v.nil})},V=function(n){return d.isNothing(A(n))},X=new w.Newtype(function(n){return n},q),Y=function n(t){var e=s.map(m.functorLazy)(function(e){var r,u=!1;function i(r){if(r instanceof v.Nil)return u=!0,v.Nil.value;if(r instanceof v.Cons){var i=t(r.value0);if(i instanceof d.Nothing)return void(e=v.step(r.value1));if(i instanceof d.Just)return u=!0,new v.Cons(i.value0,n(t)(r.value1));throw new Error("Failed pattern match at Data.List.Lazy (line 460, column 5 - line 462, column 39): "+[i.constructor.name])}throw new Error("Failed pattern match at Data.List.Lazy (line 458, column 3 - line 458, column 15): "+[r.constructor.name])}for(;!u;)r=i(e);return r}),r=w.unwrap(v.newtypeList);return function(n){return v.List(e(r(n)))}},Z=function(n){return function(t){return function(r){return e.apply(n.Applicative0().Apply0())(s.map(n.Plus1().Alt0().Functor0())(v.cons)(r))(i.defer(t)(function(e){return $(n)(t)(r)}))}}},$=function(e){return function(r){return function(u){return n.alt(e.Plus1().Alt0())(Z(e)(r)(u))(t.pure(e.Applicative0())(v.nil))}}},_=l.foldl(v.foldableList)(function(n){return function(t){return n+1|0}})(0),nn=function(n){return function(n){var t,e=!1;function r(t){if(t instanceof v.Cons){if(V(t.value1))return e=!0,new d.Just(t.value0);if(a.otherwise)return void(n=v.step(t.value1))}return e=!0,d.Nothing.value}for(;!e;)t=r(n);return t}(v.step(n))},tn=function(n){return function(t){return i.fix(v.lazyList)(function(e){return v.cons(t)(s.map(v.functorList)(n)(e))})}},en=function n(t){return function(e){return function(r){if(0===t)return v.cons(e)(r);return s.map(m.functorLazy)(function(r){if(r instanceof v.Nil)return new v.Cons(e,v.nil);if(r instanceof v.Cons)return new v.Cons(r.value0,n(t-1|0)(e)(r.value1));throw new Error("Failed pattern match at Data.List.Lazy (line 340, column 3 - line 340, column 22): "+[r.constructor.name])})(w.unwrap(v.newtypeList)(r))}}},rn=function(n){return function n(t){if(t instanceof v.Cons){if(V(t.value1))return new d.Just(v.nil);if(a.otherwise)return s.map(d.functorMaybe)(v.cons(t.value0))(n(v.step(t.value1)))}return d.Nothing.value}(v.step(n))},un=function(n){var t;return t=v.step(n),function(n){var e,r=t,u=!1;function i(t,e){if(t instanceof v.Nil)return u=!0,d.Nothing.value;if(t instanceof v.Cons&&0===e)return u=!0,new d.Just(t.value0);if(t instanceof v.Cons)return r=v.step(t.value1),void(n=e-1|0);throw new Error("Failed pattern match at Data.List.Lazy (line 299, column 3 - line 299, column 21): "+[t.constructor.name,e.constructor.name])}for(;!u;)e=i(r,n);return e}},on=function(n){return s.map(d.functorMaybe)(function(n){return n.head})(A(n))},an=function n(t){var e=A(t);if(e instanceof d.Nothing)return t;if(e instanceof d.Just){var r=A(e.value0.head);if(r instanceof d.Nothing)return n(e.value0.tail);if(r instanceof d.Just)return v.cons(v.cons(r.value0.head)(Y(on)(e.value0.tail)))(n(v.cons(r.value0.tail)(Y(T)(e.value0.tail))));throw new Error("Failed pattern match at Data.List.Lazy (line 734, column 7 - line 738, column 72): "+[r.constructor.name])}throw new Error("Failed pattern match at Data.List.Lazy (line 730, column 3 - line 738, column 72): "+[e.constructor.name])},cn=function n(t){var e=s.map(m.functorLazy)(function(e){if(e instanceof v.Nil)return v.Nil.value;if(e instanceof v.Cons){var r=I(t(e.value0))(e.value1);return new v.Cons(m.defer(function(n){return new L.NonEmpty(e.value0,r.init)}),n(t)(r.rest))}throw new Error("Failed pattern match at Data.List.Lazy (line 588, column 3 - line 588, column 15): "+[e.constructor.name])}),r=w.unwrap(v.newtypeList);return function(n){return v.List(e(r(n)))}},ln=function(n){return cn(c.eq(n))},fn=function(){var n=t.pure(m.applicativeLazy);return function(t){return v.List(n(t))}}(),sn=function n(t){return function(e){return function(r){return s.map(m.functorLazy)(function(r){if(r instanceof v.Nil)return new v.Cons(e,v.nil);if(r instanceof v.Cons)return t(e)(r.value0)instanceof h.GT?new v.Cons(r.value0,n(t)(e)(r.value1)):new v.Cons(e,fn(r));throw new Error("Failed pattern match at Data.List.Lazy (line 235, column 3 - line 235, column 22): "+[r.constructor.name])})(w.unwrap(v.newtypeList)(r))}}},pn=function(n){return sn(y.compare(n))},mn=function(n){return l.foldr(n)(v.cons)(v.nil)},vn=function(n){return function(t){return function(e){return function r(u){var o=v.step(u);if(o instanceof v.Cons)return i.defer(n)(function(n){return t(o.value0)(r(o.value1))});if(o instanceof v.Nil)return e;throw new Error("Failed pattern match at Data.List.Lazy (line 756, column 13 - line 758, column 15): "+[o.constructor.name])}}}},dn=function n(e){return function(u){return function(i){return function(o){var a=A(o);if(a instanceof d.Nothing)return t.pure(e.Applicative0())(i);if(a instanceof d.Just)return r.bind(e.Bind1())(u(i)(a.value0.head))(function(t){return n(e)(u)(t)(a.value0.tail)});throw new Error("Failed pattern match at Data.List.Lazy (line 747, column 5 - line 750, column 54): "+[a.constructor.name])}}}},wn=function(n){return function e(u){return function(i){return r.bind(d.bindMaybe)(A(i))(function(r){return n(r.head)?t.pure(d.applicativeMaybe)(u):e(u+1|0)(r.tail)})}}(0)},Ln=function(n){return function(t){return s.map(d.functorMaybe)(function(n){return(_(t)-1|0)-n|0})(wn(n)(k(t)))}},yn=function n(e){return function(u){return function(i){var o=A(i);if(o instanceof d.Nothing)return t.pure(e.Applicative0())(v.nil);if(o instanceof d.Just)return r.bind(e.Bind1())(u(o.value0.head))(function(i){return r.bind(e.Bind1())(n(e)(u)(o.value0.tail))(function(n){return t.pure(e.Applicative0())(i?v.cons(o.value0.head)(n):n)})});throw new Error("Failed pattern match at Data.List.Lazy (line 443, column 5 - line 448, column 48): "+[o.constructor.name])}}},hn=function n(t){var e=s.map(m.functorLazy)(function(e){var r,u=!1;function i(r){if(r instanceof v.Nil)return u=!0,v.Nil.value;if(r instanceof v.Cons){if(t(r.value0))return u=!0,new v.Cons(r.value0,n(t)(r.value1));if(a.otherwise)return void(e=v.step(r.value1))}throw new Error("Failed pattern match at Data.List.Lazy (line 428, column 3 - line 428, column 15): "+[r.constructor.name])}for(;!u;)r=i(e);return r}),r=w.unwrap(v.newtypeList);return function(n){return v.List(e(r(n)))}},zn=function(n){return function(t){return function(e){return hn(function(t){return l.any(v.foldableList)(p.heytingAlgebraBoolean)(n(t))(e)})(t)}}},Cn=function(n){return zn(c.eq(n))},Nn=function n(t){var e=s.map(m.functorLazy)(function(e){if(e instanceof v.Nil)return v.Nil.value;if(e instanceof v.Cons)return new v.Cons(e.value0,n(t)(hn(function(n){return!t(e.value0)(n)})(e.value1)));throw new Error("Failed pattern match at Data.List.Lazy (line 621, column 3 - line 621, column 15): "+[e.constructor.name])}),r=w.unwrap(v.newtypeList);return function(n){return v.List(e(r(n)))}},Dn=function(n){return Nn(c.eq(n))},bn=function(n){return new c.Eq(function(t){return function(e){return c.eq(v.eqList(n))(t)(e)}})},qn=function(n){return new y.Ord(function(){return bn(n.Eq0())},function(t){return function(e){return y.compare(v.ordList(n))(t)(e)}})},xn=function(n){return function(t){return Ln(function(e){return c.eq(n)(e)(t)})}},Fn=function(n){return function(t){return wn(function(e){return c.eq(n)(e)(t)})}},En=function(n){return function(t){return function(t){var e,r=!1;function u(e){if(!(e instanceof v.Cons&&n(e.value0)))return r=!0,fn(e);t=v.step(e.value1)}for(;!r;)e=u(t);return e}(v.step(t))}},gn=function(n){var t,e=s.map(m.functorLazy)((t=n,function(n){var e,r=t,u=!1;function i(t,e){if(0===t)return u=!0,e;if(e instanceof v.Nil)return u=!0,v.Nil.value;if(e instanceof v.Cons)return r=t-1|0,void(n=v.step(e.value1));throw new Error("Failed pattern match at Data.List.Lazy (line 536, column 3 - line 536, column 15): "+[t.constructor.name,e.constructor.name])}for(;!u;)e=i(r,n);return e})),r=w.unwrap(v.newtypeList);return function(n){return v.List(e(r(n)))}},jn=function(n){return function(t){return function(e){return B(t-n|0)(gn(n)(e))}}},An=function n(t){return function(e){return function(r){return s.map(m.functorLazy)(function(r){if(r instanceof v.Nil)return v.Nil.value;if(r instanceof v.Cons){if(t(e)(r.value0))return v.step(r.value1);if(a.otherwise)return new v.Cons(r.value0,n(t)(e)(r.value1))}throw new Error("Failed pattern match at Data.List.Lazy (line 650, column 3 - line 650, column 15): "+[r.constructor.name])})(w.unwrap(v.newtypeList)(r))}}},Mn=function(n){return function(t){return function(e){return z.append(v.semigroupList)(t)(l.foldl(v.foldableList)(f.flip(An(n)))(Nn(n)(e))(t))}}},Jn=function(n){return Mn(c.eq(n))},Bn=function n(t){return function(e){var r;return s.map(m.functorLazy)((r=t,function(t){if(t instanceof v.Nil)return v.Nil.value;if(0===r&&t instanceof v.Cons)return v.step(t.value1);if(t instanceof v.Cons)return new v.Cons(t.value0,n(r-1|0)(t.value1));throw new Error("Failed pattern match at Data.List.Lazy (line 353, column 3 - line 353, column 17): "+[r.constructor.name,t.constructor.name])}))(w.unwrap(v.newtypeList)(e))}},Tn=function(n){return An(c.eq(n))},Pn=function(n){return l.foldl(v.foldableList)(f.flip(Tn(n)))},In=function(n){return i.fix(v.lazyList)(function(t){return z.append(v.semigroupList)(n)(t)})},Wn=f.flip(r.bind(v.bindList)),On=function(n){return r.bind(v.bindList)(n)(u.identity(u.categoryFn))},Rn=Y(u.identity(u.categoryFn)),Sn=function n(t){return function(e){return function(r){var u;return s.map(m.functorLazy)((u=t,function(t){if(t instanceof v.Nil)return v.Nil.value;if(0===u&&t instanceof v.Cons){var r=e(t.value0);if(r instanceof d.Nothing)return v.step(t.value1);if(r instanceof d.Just)return new v.Cons(r.value0,t.value1);throw new Error("Failed pattern match at Data.List.Lazy (line 394, column 22 - line 396, column 26): "+[r.constructor.name])}if(t instanceof v.Cons)return new v.Cons(t.value0,n(u-1|0)(e)(t.value1));throw new Error("Failed pattern match at Data.List.Lazy (line 393, column 3 - line 393, column 17): "+[u.constructor.name,t.constructor.name])}))(w.unwrap(v.newtypeList)(r))}}},kn=function(n){return function(t){return Sn(n)(function(n){return d.Just.create(t(n))})}};module.exports={toUnfoldable:M,fromFoldable:mn,singleton:O,range:K,replicate:H,replicateM:U,some:Z,many:$,repeat:G,iterate:tn,cycle:In,null:V,length:_,snoc:W,insert:pn,insertBy:sn,head:on,last:nn,tail:T,init:rn,uncons:A,index:un,elemIndex:Fn,elemLastIndex:xn,findIndex:wn,findLastIndex:Ln,insertAt:en,deleteAt:Bn,updateAt:g,modifyAt:kn,alterAt:Sn,reverse:k,concat:On,concatMap:Wn,filter:hn,filterM:yn,mapMaybe:Y,catMaybes:Rn,Pattern:q,stripPrefix:P,slice:jn,take:B,takeWhile:J,drop:gn,dropWhile:En,span:I,group:ln,groupBy:cn,partition:Q,nub:Dn,nubBy:Nn,union:Jn,unionBy:Mn,delete:Tn,deleteBy:An,difference:Pn,intersect:Cn,intersectBy:zn,zipWith:x,zipWithA:F,zip:E,unzip:j,transpose:an,foldM:dn,foldrLazy:vn,scanrLazy:S,eqPattern:bn,ordPattern:qn,newtypePattern:X,showPattern:R}; -},{"../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Lazy/index.js":"y9cE","../Control.Monad.Rec.Class/index.js":"UVIy","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Lazy/index.js":"aRUE","../Data.List.Lazy.Types/index.js":"EJF+","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z"}],"RRDs":[function(require,module,exports) { -"use strict";var e=require("../Control.Applicative/index.js"),n=require("../Control.Apply/index.js"),u=require("../Control.Category/index.js"),a=require("../Data.Eq/index.js"),t=require("../Data.Foldable/index.js"),l=require("../Data.FoldableWithIndex/index.js"),r=require("../Data.Function/index.js"),v=require("../Data.Functor/index.js"),i=require("../Data.FunctorWithIndex/index.js"),o=require("../Data.HeytingAlgebra/index.js"),c=require("../Data.List/index.js"),f=require("../Data.List.Lazy/index.js"),s=require("../Data.List.Lazy.Types/index.js"),p=require("../Data.List.Types/index.js"),m=require("../Data.Maybe/index.js"),w=require("../Data.Monoid/index.js"),d=require("../Data.Ord/index.js"),h=require("../Data.Ordering/index.js"),y=require("../Data.Semigroup/index.js"),E=require("../Data.Show/index.js"),M=require("../Data.Traversable/index.js"),I=require("../Data.TraversableWithIndex/index.js"),L=require("../Data.Tuple/index.js"),D=require("../Data.Unfoldable/index.js"),F=function(){function e(){}return e.value=new e,e}(),T=function(){function e(e,n,u,a){this.value0=e,this.value1=n,this.value2=u,this.value3=a}return e.create=function(n){return function(u){return function(a){return function(t){return new e(n,u,a,t)}}}},e}(),b=function(){function e(e,n,u,a,t,l,r){this.value0=e,this.value1=n,this.value2=u,this.value3=a,this.value4=t,this.value5=l,this.value6=r}return e.create=function(n){return function(u){return function(a){return function(t){return function(l){return function(r){return function(v){return new e(n,u,a,t,l,r,v)}}}}}}},e}(),g=function(){function e(e,n,u){this.value0=e,this.value1=n,this.value2=u}return e.create=function(n){return function(u){return function(a){return new e(n,u,a)}}},e}(),x=function(){function e(e,n,u){this.value0=e,this.value1=n,this.value2=u}return e.create=function(n){return function(u){return function(a){return new e(n,u,a)}}},e}(),C=function(){function e(e,n,u,a,t,l){this.value0=e,this.value1=n,this.value2=u,this.value3=a,this.value4=t,this.value5=l}return e.create=function(n){return function(u){return function(a){return function(t){return function(l){return function(r){return new e(n,u,a,t,l,r)}}}}}},e}(),q=function(){function e(e,n,u,a,t,l){this.value0=e,this.value1=n,this.value2=u,this.value3=a,this.value4=t,this.value5=l}return e.create=function(n){return function(u){return function(a){return function(t){return function(l){return function(r){return new e(n,u,a,t,l,r)}}}}}},e}(),J=function(){function e(e,n,u,a,t,l){this.value0=e,this.value1=n,this.value2=u,this.value3=a,this.value4=t,this.value5=l}return e.create=function(n){return function(u){return function(a){return function(t){return function(l){return function(r){return new e(n,u,a,t,l,r)}}}}}},e}(),N=function(){function e(e,n,u,a){this.value0=e,this.value1=n,this.value2=u,this.value3=a}return e.create=function(n){return function(u){return function(a){return function(t){return new e(n,u,a,t)}}}},e}(),A=function n(u){if(u instanceof F)return p.Nil.value;if(u instanceof T)return y.append(p.semigroupList)(n(u.value0))(y.append(p.semigroupList)(e.pure(p.applicativeList)(u.value2))(n(u.value3)));if(u instanceof b)return y.append(p.semigroupList)(n(u.value0))(y.append(p.semigroupList)(e.pure(p.applicativeList)(u.value2))(y.append(p.semigroupList)(n(u.value3))(y.append(p.semigroupList)(e.pure(p.applicativeList)(u.value5))(n(u.value6)))));throw new Error("Failed pattern match at Data.Map.Internal (line 612, column 1 - line 612, column 40): "+[u.constructor.name])},k=function e(n){if(n instanceof F)return 0;if(n instanceof T)return(1+e(n.value0)|0)+e(n.value3)|0;if(n instanceof b)return((2+e(n.value0)|0)+e(n.value3)|0)+e(n.value6)|0;throw new Error("Failed pattern match at Data.Map.Internal (line 662, column 1 - line 662, column 35): "+[n.constructor.name])},W=function(e){return function(n){return new T(F.value,e,n,F.value)}},j=function(e){return function(n){return D.unfoldr(e)(function(e){var n,u=!1;function a(n){if(n instanceof p.Nil)return u=!0,m.Nothing.value;if(n instanceof p.Cons){if(n.value0 instanceof F)return void(e=n.value1);if(n.value0 instanceof T&&n.value0.value0 instanceof F&&n.value0.value3 instanceof F)return u=!0,m.Just.create(new L.Tuple(new L.Tuple(n.value0.value1,n.value0.value2),n.value1));if(n.value0 instanceof T&&n.value0.value0 instanceof F)return u=!0,m.Just.create(new L.Tuple(new L.Tuple(n.value0.value1,n.value0.value2),new p.Cons(n.value0.value3,n.value1)));if(n.value0 instanceof T)return void(e=new p.Cons(n.value0.value0,new p.Cons(W(n.value0.value1)(n.value0.value2),new p.Cons(n.value0.value3,n.value1))));if(n.value0 instanceof b)return void(e=new p.Cons(n.value0.value0,new p.Cons(W(n.value0.value1)(n.value0.value2),new p.Cons(n.value0.value3,new p.Cons(W(n.value0.value4)(n.value0.value5),new p.Cons(n.value0.value6,n.value1))))));throw new Error("Failed pattern match at Data.Map.Internal (line 577, column 18 - line 586, column 71): "+[n.value0.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 576, column 3 - line 576, column 19): "+[n.constructor.name])}for(;!u;)n=a(e);return n})(new p.Cons(n,p.Nil.value))}},Q=j(D.unfoldableArray),G=function(e){return function(n){return D.unfoldr(e)(function(e){var n,u=!1;function a(n){if(n instanceof p.Nil)return u=!0,m.Nothing.value;if(n instanceof p.Cons){if(n.value0 instanceof F)return void(e=n.value1);if(n.value0 instanceof T)return u=!0,m.Just.create(new L.Tuple(new L.Tuple(n.value0.value1,n.value0.value2),new p.Cons(n.value0.value0,new p.Cons(n.value0.value3,n.value1))));if(n.value0 instanceof b)return u=!0,m.Just.create(new L.Tuple(new L.Tuple(n.value0.value1,n.value0.value2),new p.Cons(W(n.value0.value4)(n.value0.value5),new p.Cons(n.value0.value0,new p.Cons(n.value0.value3,new p.Cons(n.value0.value6,n.value1))))));throw new Error("Failed pattern match at Data.Map.Internal (line 598, column 18 - line 603, column 77): "+[n.value0.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 597, column 3 - line 597, column 19): "+[n.constructor.name])}for(;!u;)n=a(e);return n})(new p.Cons(n,p.Nil.value))}},S=function e(n){return function(u){return function(a){if(a instanceof F)return"Leaf";if(a instanceof T)return"Two ("+e(n)(u)(a.value0)+") ("+E.show(n)(a.value1)+") ("+E.show(u)(a.value2)+") ("+e(n)(u)(a.value3)+")";if(a instanceof b)return"Three ("+e(n)(u)(a.value0)+") ("+E.show(n)(a.value1)+") ("+E.show(u)(a.value2)+") ("+e(n)(u)(a.value3)+") ("+E.show(n)(a.value4)+") ("+E.show(u)(a.value5)+") ("+e(n)(u)(a.value6)+")";throw new Error("Failed pattern match at Data.Map.Internal (line 153, column 1 - line 153, column 62): "+[a.constructor.name])}}},O=function(e){return function(n){return new E.Show(function(u){return"(fromFoldable "+E.show(E.showArray(L.showTuple(e)(n)))(Q(u))+")"})}},U=function(e){return function(n){var u=d.compare(e);return function e(a){if(a instanceof F)return m.Nothing.value;if(a instanceof T){var t=u(n)(a.value1);if(t instanceof h.EQ)return new m.Just({key:a.value1,value:a.value2});if(t instanceof h.GT)return m.Just.create(m.fromMaybe({key:a.value1,value:a.value2})(e(a.value3)));if(t instanceof h.LT)return e(a.value0);throw new Error("Failed pattern match at Data.Map.Internal (line 225, column 33 - line 228, column 20): "+[t.constructor.name])}if(a instanceof b){var l=u(n)(a.value4);if(l instanceof h.EQ)return new m.Just({key:a.value4,value:a.value5});if(l instanceof h.GT)return m.Just.create(m.fromMaybe({key:a.value4,value:a.value5})(e(a.value6)));if(l instanceof h.LT)return e(new T(a.value0,a.value1,a.value2,a.value3));throw new Error("Failed pattern match at Data.Map.Internal (line 229, column 45 - line 232, column 36): "+[l.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 224, column 5 - line 224, column 22): "+[a.constructor.name])}}},z=function(e){return function(n){var u=d.compare(e);return function e(a){if(a instanceof F)return m.Nothing.value;if(a instanceof T){var t=u(n)(a.value1);if(t instanceof h.EQ)return new m.Just({key:a.value1,value:a.value2});if(t instanceof h.LT)return m.Just.create(m.fromMaybe({key:a.value1,value:a.value2})(e(a.value0)));if(t instanceof h.GT)return e(a.value3);throw new Error("Failed pattern match at Data.Map.Internal (line 259, column 33 - line 262, column 21): "+[t.constructor.name])}if(a instanceof b){var l=u(n)(a.value1);if(l instanceof h.EQ)return new m.Just({key:a.value1,value:a.value2});if(l instanceof h.LT)return m.Just.create(m.fromMaybe({key:a.value1,value:a.value2})(e(a.value0)));if(l instanceof h.GT)return e(new T(a.value3,a.value4,a.value5,a.value6));throw new Error("Failed pattern match at Data.Map.Internal (line 263, column 45 - line 266, column 37): "+[l.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 258, column 5 - line 258, column 22): "+[a.constructor.name])}}},K=function(e){return function(n){var u=d.compare(e);return function(e){var a,t=!1;function l(a){if(a instanceof F)return t=!0,m.Nothing.value;if(a instanceof T){var l=u(n)(a.value1);return l instanceof h.EQ?(t=!0,new m.Just(a.value2)):l instanceof h.LT?void(e=a.value0):void(e=a.value3)}if(a instanceof b){var r=u(n)(a.value1);if(r instanceof h.EQ)return t=!0,new m.Just(a.value2);var v=u(n)(a.value4);return v instanceof h.EQ?(t=!0,new m.Just(a.value5)):r instanceof h.LT?void(e=a.value0):v instanceof h.GT?void(e=a.value6):void(e=a.value3)}throw new Error("Failed pattern match at Data.Map.Internal (line 200, column 5 - line 200, column 22): "+[a.constructor.name])}for(;!t;)a=l(e);return a}}},B=function(e){return function(n){return function(u){return m.isJust(K(e)(n)(u))}}},H=function n(u){if(u instanceof F)return p.Nil.value;if(u instanceof T)return y.append(p.semigroupList)(n(u.value0))(y.append(p.semigroupList)(e.pure(p.applicativeList)(u.value1))(n(u.value3)));if(u instanceof b)return y.append(p.semigroupList)(n(u.value0))(y.append(p.semigroupList)(e.pure(p.applicativeList)(u.value1))(y.append(p.semigroupList)(n(u.value3))(y.append(p.semigroupList)(e.pure(p.applicativeList)(u.value4))(n(u.value6)))));throw new Error("Failed pattern match at Data.Map.Internal (line 606, column 1 - line 606, column 38): "+[u.constructor.name])},V=function(e){return function(n){return function(u){return function(l){return t.all(s.foldableList)(o.heytingAlgebraBoolean)(function(u){return a.eq(m.eqMaybe(n))(K(e)(u.value0)(l))(new m.Just(u.value1))})(j(s.unfoldableList)(u))}}}},P=function(e){return e instanceof F},R=new v.Functor(function(e){return function(n){if(n instanceof F)return F.value;if(n instanceof T)return new T(v.map(R)(e)(n.value0),n.value1,e(n.value2),v.map(R)(e)(n.value3));if(n instanceof b)return new b(v.map(R)(e)(n.value0),n.value1,e(n.value2),v.map(R)(e)(n.value3),n.value4,e(n.value5),v.map(R)(e)(n.value6));throw new Error("Failed pattern match at Data.Map.Internal (line 96, column 1 - line 99, column 110): "+[e.constructor.name,n.constructor.name])}}),X=new i.FunctorWithIndex(function(){return R},function(e){return function(n){if(n instanceof F)return F.value;if(n instanceof T)return new T(i.mapWithIndex(X)(e)(n.value0),n.value1,e(n.value1)(n.value2),i.mapWithIndex(X)(e)(n.value3));if(n instanceof b)return new b(i.mapWithIndex(X)(e)(n.value0),n.value1,e(n.value1)(n.value2),i.mapWithIndex(X)(e)(n.value3),n.value4,e(n.value4)(n.value5),i.mapWithIndex(X)(e)(n.value6));throw new Error("Failed pattern match at Data.Map.Internal (line 101, column 1 - line 104, column 152): "+[e.constructor.name,n.constructor.name])}}),Y=function(e){return function(n){return function(u){var a,t=e,l=n,r=!1;function v(e,n,a){if(n instanceof p.Nil)return r=!0,a;if(n instanceof p.Cons){if(n.value0 instanceof g)return t=e,l=n.value1,void(u=new T(a,n.value0.value0,n.value0.value1,n.value0.value2));if(n.value0 instanceof x)return t=e,l=n.value1,void(u=new T(n.value0.value0,n.value0.value1,n.value0.value2,a));if(n.value0 instanceof C)return t=e,l=n.value1,void(u=new b(a,n.value0.value0,n.value0.value1,n.value0.value2,n.value0.value3,n.value0.value4,n.value0.value5));if(n.value0 instanceof q)return t=e,l=n.value1,void(u=new b(n.value0.value0,n.value0.value1,n.value0.value2,a,n.value0.value3,n.value0.value4,n.value0.value5));if(n.value0 instanceof J)return t=e,l=n.value1,void(u=new b(n.value0.value0,n.value0.value1,n.value0.value2,n.value0.value3,n.value0.value4,n.value0.value5,a));throw new Error("Failed pattern match at Data.Map.Internal (line 418, column 3 - line 423, column 88): "+[n.value0.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 415, column 1 - line 415, column 80): "+[n.constructor.name,a.constructor.name])}for(;!r;)a=v(t,l,u);return a}}},Z=function(e){return function(n){return function(u){var a,t=function(n){return function(u){var a,t=n,l=!1;function r(n,a){if(n instanceof p.Nil)return l=!0,new T(a.value0,a.value1,a.value2,a.value3);if(n instanceof p.Cons){if(n.value0 instanceof g)return l=!0,Y(e)(n.value1)(new b(a.value0,a.value1,a.value2,a.value3,n.value0.value0,n.value0.value1,n.value0.value2));if(n.value0 instanceof x)return l=!0,Y(e)(n.value1)(new b(n.value0.value0,n.value0.value1,n.value0.value2,a.value0,a.value1,a.value2,a.value3));if(n.value0 instanceof C)return t=n.value1,void(u=new N(new T(a.value0,a.value1,a.value2,a.value3),n.value0.value0,n.value0.value1,new T(n.value0.value2,n.value0.value3,n.value0.value4,n.value0.value5)));if(n.value0 instanceof q)return t=n.value1,void(u=new N(new T(n.value0.value0,n.value0.value1,n.value0.value2,a.value0),a.value1,a.value2,new T(a.value3,n.value0.value3,n.value0.value4,n.value0.value5)));if(n.value0 instanceof J)return t=n.value1,void(u=new N(new T(n.value0.value0,n.value0.value1,n.value0.value2,n.value0.value3),n.value0.value4,n.value0.value5,new T(a.value0,a.value1,a.value2,a.value3)));throw new Error("Failed pattern match at Data.Map.Internal (line 454, column 5 - line 459, column 108): "+[n.value0.constructor.name,a.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 451, column 3 - line 451, column 56): "+[n.constructor.name,a.constructor.name])}for(;!l;)a=r(t,u);return a}},l=d.compare(e);return a=p.Nil.value,function(r){var v,i=a,o=!1;function c(a,v){if(v instanceof F)return o=!0,t(a)(new N(F.value,n,u,F.value));if(v instanceof T){var c=l(n)(v.value1);return c instanceof h.EQ?(o=!0,Y(e)(a)(new T(v.value0,n,u,v.value3))):c instanceof h.LT?(i=new p.Cons(new g(v.value1,v.value2,v.value3),a),void(r=v.value0)):(i=new p.Cons(new x(v.value0,v.value1,v.value2),a),void(r=v.value3))}if(v instanceof b){var f=l(n)(v.value1);if(f instanceof h.EQ)return o=!0,Y(e)(a)(new b(v.value0,n,u,v.value3,v.value4,v.value5,v.value6));var s=l(n)(v.value4);return s instanceof h.EQ?(o=!0,Y(e)(a)(new b(v.value0,v.value1,v.value2,v.value3,n,u,v.value6))):f instanceof h.LT?(i=new p.Cons(new C(v.value1,v.value2,v.value3,v.value4,v.value5,v.value6),a),void(r=v.value0)):f instanceof h.GT&&s instanceof h.LT?(i=new p.Cons(new q(v.value0,v.value1,v.value2,v.value4,v.value5,v.value6),a),void(r=v.value3)):(i=new p.Cons(new J(v.value0,v.value1,v.value2,v.value3,v.value4,v.value5),a),void(r=v.value6))}throw new Error("Failed pattern match at Data.Map.Internal (line 434, column 3 - line 434, column 55): "+[a.constructor.name,v.constructor.name])}for(;!o;)v=c(i,r);return v}}}},$=function(e){return function(n){var u,a=function(n){return function(u){var a,t=n,l=!1;function r(n,a){if(n instanceof p.Nil)return l=!0,a;if(n instanceof p.Cons){if(n.value0 instanceof g&&n.value0.value2 instanceof F&&a instanceof F)return l=!0,Y(e)(n.value1)(new T(F.value,n.value0.value0,n.value0.value1,F.value));if(n.value0 instanceof x&&n.value0.value0 instanceof F&&a instanceof F)return l=!0,Y(e)(n.value1)(new T(F.value,n.value0.value1,n.value0.value2,F.value));if(n.value0 instanceof g&&n.value0.value2 instanceof T)return t=n.value1,void(u=new b(a,n.value0.value0,n.value0.value1,n.value0.value2.value0,n.value0.value2.value1,n.value0.value2.value2,n.value0.value2.value3));if(n.value0 instanceof x&&n.value0.value0 instanceof T)return t=n.value1,void(u=new b(n.value0.value0.value0,n.value0.value0.value1,n.value0.value0.value2,n.value0.value0.value3,n.value0.value1,n.value0.value2,a));if(n.value0 instanceof g&&n.value0.value2 instanceof b)return l=!0,Y(e)(n.value1)(new T(new T(a,n.value0.value0,n.value0.value1,n.value0.value2.value0),n.value0.value2.value1,n.value0.value2.value2,new T(n.value0.value2.value3,n.value0.value2.value4,n.value0.value2.value5,n.value0.value2.value6)));if(n.value0 instanceof x&&n.value0.value0 instanceof b)return l=!0,Y(e)(n.value1)(new T(new T(n.value0.value0.value0,n.value0.value0.value1,n.value0.value0.value2,n.value0.value0.value3),n.value0.value0.value4,n.value0.value0.value5,new T(n.value0.value0.value6,n.value0.value1,n.value0.value2,a)));if(n.value0 instanceof C&&n.value0.value2 instanceof F&&n.value0.value5 instanceof F&&a instanceof F)return l=!0,Y(e)(n.value1)(new b(F.value,n.value0.value0,n.value0.value1,F.value,n.value0.value3,n.value0.value4,F.value));if(n.value0 instanceof q&&n.value0.value0 instanceof F&&n.value0.value5 instanceof F&&a instanceof F)return l=!0,Y(e)(n.value1)(new b(F.value,n.value0.value1,n.value0.value2,F.value,n.value0.value3,n.value0.value4,F.value));if(n.value0 instanceof J&&n.value0.value0 instanceof F&&n.value0.value3 instanceof F&&a instanceof F)return l=!0,Y(e)(n.value1)(new b(F.value,n.value0.value1,n.value0.value2,F.value,n.value0.value4,n.value0.value5,F.value));if(n.value0 instanceof C&&n.value0.value2 instanceof T)return l=!0,Y(e)(n.value1)(new T(new b(a,n.value0.value0,n.value0.value1,n.value0.value2.value0,n.value0.value2.value1,n.value0.value2.value2,n.value0.value2.value3),n.value0.value3,n.value0.value4,n.value0.value5));if(n.value0 instanceof q&&n.value0.value0 instanceof T)return l=!0,Y(e)(n.value1)(new T(new b(n.value0.value0.value0,n.value0.value0.value1,n.value0.value0.value2,n.value0.value0.value3,n.value0.value1,n.value0.value2,a),n.value0.value3,n.value0.value4,n.value0.value5));if(n.value0 instanceof q&&n.value0.value5 instanceof T)return l=!0,Y(e)(n.value1)(new T(n.value0.value0,n.value0.value1,n.value0.value2,new b(a,n.value0.value3,n.value0.value4,n.value0.value5.value0,n.value0.value5.value1,n.value0.value5.value2,n.value0.value5.value3)));if(n.value0 instanceof J&&n.value0.value3 instanceof T)return l=!0,Y(e)(n.value1)(new T(n.value0.value0,n.value0.value1,n.value0.value2,new b(n.value0.value3.value0,n.value0.value3.value1,n.value0.value3.value2,n.value0.value3.value3,n.value0.value4,n.value0.value5,a)));if(n.value0 instanceof C&&n.value0.value2 instanceof b)return l=!0,Y(e)(n.value1)(new b(new T(a,n.value0.value0,n.value0.value1,n.value0.value2.value0),n.value0.value2.value1,n.value0.value2.value2,new T(n.value0.value2.value3,n.value0.value2.value4,n.value0.value2.value5,n.value0.value2.value6),n.value0.value3,n.value0.value4,n.value0.value5));if(n.value0 instanceof q&&n.value0.value0 instanceof b)return l=!0,Y(e)(n.value1)(new b(new T(n.value0.value0.value0,n.value0.value0.value1,n.value0.value0.value2,n.value0.value0.value3),n.value0.value0.value4,n.value0.value0.value5,new T(n.value0.value0.value6,n.value0.value1,n.value0.value2,a),n.value0.value3,n.value0.value4,n.value0.value5));if(n.value0 instanceof q&&n.value0.value5 instanceof b)return l=!0,Y(e)(n.value1)(new b(n.value0.value0,n.value0.value1,n.value0.value2,new T(a,n.value0.value3,n.value0.value4,n.value0.value5.value0),n.value0.value5.value1,n.value0.value5.value2,new T(n.value0.value5.value3,n.value0.value5.value4,n.value0.value5.value5,n.value0.value5.value6)));if(n.value0 instanceof J&&n.value0.value3 instanceof b)return l=!0,Y(e)(n.value1)(new b(n.value0.value0,n.value0.value1,n.value0.value2,new T(n.value0.value3.value0,n.value0.value3.value1,n.value0.value3.value2,n.value0.value3.value3),n.value0.value3.value4,n.value0.value3.value5,new T(n.value0.value3.value6,n.value0.value4,n.value0.value5,a)));throw new Error("Failed pattern match at Data.Map.Internal (line 511, column 9 - line 528, column 136): "+[n.value0.constructor.name,a.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 508, column 5 - line 528, column 136): "+[n.constructor.name])}for(;!l;)a=r(t,u);return a}},t=function(e){return function(n){var u,t=e,l=!1;function r(e,u){if(u instanceof T&&u.value0 instanceof F&&u.value3 instanceof F)return l=!0,a(e)(F.value);if(u instanceof T)return t=new p.Cons(new x(u.value0,u.value1,u.value2),e),void(n=u.value3);if(u instanceof b&&u.value0 instanceof F&&u.value3 instanceof F&&u.value6 instanceof F)return l=!0,a(new p.Cons(new x(F.value,u.value1,u.value2),e))(F.value);if(u instanceof b)return t=new p.Cons(new J(u.value0,u.value1,u.value2,u.value3,u.value4,u.value5),e),void(n=u.value6);throw new Error("Failed pattern match at Data.Map.Internal (line 540, column 5 - line 544, column 107): "+[u.constructor.name])}for(;!l;)u=r(t,n);return u}},l=function(e){var n,u=!1;function a(n){if(n instanceof T&&n.value3 instanceof F)return u=!0,{key:n.value1,value:n.value2};if(n instanceof T)e=n.value3;else{if(n instanceof b&&n.value6 instanceof F)return u=!0,{key:n.value4,value:n.value5};if(!(n instanceof b))throw new Error("Failed pattern match at Data.Map.Internal (line 531, column 33 - line 535, column 45): "+[n.constructor.name]);e=n.value6}}for(;!u;)n=a(e);return n},r=d.compare(e);return u=p.Nil.value,function(v){var i,o=u,c=!1;function f(u,i){if(i instanceof F)return c=!0,m.Nothing.value;if(i instanceof T){var f=r(n)(i.value1);if(i.value3 instanceof F&&f instanceof h.EQ)return c=!0,new m.Just(new L.Tuple(i.value2,a(u)(F.value)));if(f instanceof h.EQ){var s=l(i.value0);return c=!0,new m.Just(new L.Tuple(i.value2,t(new p.Cons(new g(s.key,s.value,i.value3),u))(i.value0)))}return f instanceof h.LT?(o=new p.Cons(new g(i.value1,i.value2,i.value3),u),void(v=i.value0)):(o=new p.Cons(new x(i.value0,i.value1,i.value2),u),void(v=i.value3))}if(i instanceof b){var w=i.value0 instanceof F&&i.value3 instanceof F&&i.value6 instanceof F,d=(f=r(n)(i.value4),r(n)(i.value1));return w&&d instanceof h.EQ?(c=!0,new m.Just(new L.Tuple(i.value2,Y(e)(u)(new T(F.value,i.value4,i.value5,F.value))))):w&&f instanceof h.EQ?(c=!0,new m.Just(new L.Tuple(i.value5,Y(e)(u)(new T(F.value,i.value1,i.value2,F.value))))):d instanceof h.EQ?(s=l(i.value0),c=!0,new m.Just(new L.Tuple(i.value2,t(new p.Cons(new C(s.key,s.value,i.value3,i.value4,i.value5,i.value6),u))(i.value0)))):f instanceof h.EQ?(s=l(i.value3),c=!0,new m.Just(new L.Tuple(i.value5,t(new p.Cons(new q(i.value0,i.value1,i.value2,s.key,s.value,i.value6),u))(i.value3)))):d instanceof h.LT?(o=new p.Cons(new C(i.value1,i.value2,i.value3,i.value4,i.value5,i.value6),u),void(v=i.value0)):d instanceof h.GT&&f instanceof h.LT?(o=new p.Cons(new q(i.value0,i.value1,i.value2,i.value4,i.value5,i.value6),u),void(v=i.value3)):(o=new p.Cons(new J(i.value0,i.value1,i.value2,i.value3,i.value4,i.value5),u),void(v=i.value6))}throw new Error("Failed pattern match at Data.Map.Internal (line 481, column 34 - line 504, column 80): "+[i.constructor.name])}for(;!c;)i=f(o,v);return i}}},_=new t.Foldable(function(e){return function(n){return function(u){return t.foldMap(p.foldableList)(e)(n)(A(u))}}},function(e){return function(n){return function(u){return t.foldl(p.foldableList)(e)(n)(A(u))}}},function(e){return function(n){return function(u){return t.foldr(p.foldableList)(e)(n)(A(u))}}}),ee=new M.Traversable(function(){return _},function(){return R},function(e){return M.traverse(ee)(e)(u.identity(u.categoryFn))},function(u){return function(a){return function(t){if(t instanceof F)return e.pure(u)(F.value);if(t instanceof T)return n.apply(u.Apply0())(n.apply(u.Apply0())(n.apply(u.Apply0())(v.map(u.Apply0().Functor0())(T.create)(M.traverse(ee)(u)(a)(t.value0)))(e.pure(u)(t.value1)))(a(t.value2)))(M.traverse(ee)(u)(a)(t.value3));if(t instanceof b)return n.apply(u.Apply0())(n.apply(u.Apply0())(n.apply(u.Apply0())(n.apply(u.Apply0())(n.apply(u.Apply0())(n.apply(u.Apply0())(v.map(u.Apply0().Functor0())(b.create)(M.traverse(ee)(u)(a)(t.value0)))(e.pure(u)(t.value1)))(a(t.value2)))(M.traverse(ee)(u)(a)(t.value3)))(e.pure(u)(t.value4)))(a(t.value5)))(M.traverse(ee)(u)(a)(t.value6));throw new Error("Failed pattern match at Data.Map.Internal (line 119, column 1 - line 134, column 31): "+[a.constructor.name,t.constructor.name])}}}),ne=function(e){return function(n){return function(u){return function(a){return function(t){var l=function(){if(u instanceof m.Just)return function(n){return d.lessThan(e)(n)(u.value0)};if(u instanceof m.Nothing)return r.const(!1);throw new Error("Failed pattern match at Data.Map.Internal (line 319, column 7 - line 323, column 22): "+[u.constructor.name])}(),v=function(){if(a instanceof m.Just)return function(n){return d.greaterThan(e)(n)(a.value0)};if(a instanceof m.Nothing)return r.const(!1);throw new Error("Failed pattern match at Data.Map.Internal (line 326, column 7 - line 330, column 22): "+[a.constructor.name])}(),i=function(){if(u instanceof m.Just&&a instanceof m.Just)return function(n){return d.lessThanOrEq(e)(u.value0)(n)&&d.lessThanOrEq(e)(n)(a.value0)};if(u instanceof m.Just&&a instanceof m.Nothing)return function(n){return d.lessThanOrEq(e)(u.value0)(n)};if(u instanceof m.Nothing&&a instanceof m.Just)return function(n){return d.lessThanOrEq(e)(n)(a.value0)};if(u instanceof m.Nothing&&a instanceof m.Nothing)return r.const(!0);throw new Error("Failed pattern match at Data.Map.Internal (line 333, column 7 - line 341, column 21): "+[u.constructor.name,a.constructor.name])}();return function e(u){if(u instanceof F)return w.mempty(n);if(u instanceof T)return y.append(n.Semigroup0())(l(u.value1)?w.mempty(n):e(u.value0))(y.append(n.Semigroup0())(i(u.value1)?t(u.value1)(u.value2):w.mempty(n))(v(u.value1)?w.mempty(n):e(u.value3)));if(u instanceof b)return y.append(n.Semigroup0())(l(u.value1)?w.mempty(n):e(u.value0))(y.append(n.Semigroup0())(i(u.value1)?t(u.value1)(u.value2):w.mempty(n))(y.append(n.Semigroup0())(l(u.value4)||v(u.value1)?w.mempty(n):e(u.value3))(y.append(n.Semigroup0())(i(u.value4)?t(u.value4)(u.value5):w.mempty(n))(v(u.value4)?w.mempty(n):e(u.value6)))));throw new Error("Failed pattern match at Data.Map.Internal (line 359, column 10 - line 371, column 54): "+[u.constructor.name])}}}}}},ue=function(){var e;return e=m.Nothing.value,function(n){var u,a=e,t=!1;function l(e,u){if(u instanceof F)return t=!0,e;if(u instanceof T)return a=new m.Just({key:u.value1,value:u.value2}),void(n=u.value0);if(u instanceof b)return a=new m.Just({key:u.value1,value:u.value2}),void(n=u.value0);throw new Error("Failed pattern match at Data.Map.Internal (line 297, column 5 - line 297, column 22): "+[e.constructor.name,u.constructor.name])}for(;!t;)u=l(a,n);return u}}(),ae=function(e){return function(n){var u=d.compare(e);return function e(a){if(a instanceof F)return m.Nothing.value;if(a instanceof T){var t=u(n)(a.value1);if(t instanceof h.EQ)return ue(a.value3);if(t instanceof h.LT)return m.Just.create(m.fromMaybe({key:a.value1,value:a.value2})(e(a.value0)));if(t instanceof h.GT)return e(a.value3);throw new Error("Failed pattern match at Data.Map.Internal (line 276, column 33 - line 279, column 21): "+[t.constructor.name])}if(a instanceof b){var l=u(n)(a.value1);if(l instanceof h.EQ)return ue(new T(a.value3,a.value4,a.value5,a.value6));if(l instanceof h.LT)return m.Just.create(m.fromMaybe({key:a.value1,value:a.value2})(e(a.value0)));if(l instanceof h.GT)return e(new T(a.value3,a.value4,a.value5,a.value6));throw new Error("Failed pattern match at Data.Map.Internal (line 280, column 45 - line 283, column 37): "+[l.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 275, column 5 - line 275, column 22): "+[a.constructor.name])}}},te=function(){var e;return e=m.Nothing.value,function(n){var u,a=e,t=!1;function l(e,u){if(u instanceof F)return t=!0,e;if(u instanceof T)return a=new m.Just({key:u.value1,value:u.value2}),void(n=u.value3);if(u instanceof b)return a=new m.Just({key:u.value4,value:u.value5}),void(n=u.value6);throw new Error("Failed pattern match at Data.Map.Internal (line 289, column 5 - line 289, column 22): "+[e.constructor.name,u.constructor.name])}for(;!t;)u=l(a,n);return u}}(),le=function(e){return function(n){var u=d.compare(e);return function e(a){if(a instanceof F)return m.Nothing.value;if(a instanceof T){var t=u(n)(a.value1);if(t instanceof h.EQ)return te(a.value0);if(t instanceof h.GT)return m.Just.create(m.fromMaybe({key:a.value1,value:a.value2})(e(a.value3)));if(t instanceof h.LT)return e(a.value0);throw new Error("Failed pattern match at Data.Map.Internal (line 242, column 33 - line 245, column 20): "+[t.constructor.name])}if(a instanceof b){var l=u(n)(a.value4);if(l instanceof h.EQ)return te(new T(a.value0,a.value1,a.value2,a.value3));if(l instanceof h.GT)return m.Just.create(m.fromMaybe({key:a.value4,value:a.value5})(e(a.value6)));if(l instanceof h.LT)return e(new T(a.value0,a.value1,a.value2,a.value3));throw new Error("Failed pattern match at Data.Map.Internal (line 246, column 45 - line 249, column 36): "+[l.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 241, column 5 - line 241, column 22): "+[a.constructor.name])}}},re=function(e){return function(n){return new a.Eq(function(u){return function(t){return a.eq(a.eqArray(L.eqTuple(e)(n)))(Q(u))(Q(t))}})}},ve=function(e){return function(n){return new d.Ord(function(){return re(e.Eq0())(n.Eq0())},function(u){return function(a){return d.compare(d.ordArray(L.ordTuple(e)(n)))(Q(u))(Q(a))}})}},ie=function(e){return new a.Eq1(function(n){return a.eq(re(e)(n))})},oe=function(e){return new d.Ord1(function(){return ie(e.Eq0())},function(n){return d.compare(ve(e)(n))})},ce=F.value,fe=function(e){return function(n){return t.foldl(n)(function(n){return function(u){return Z(e)(u.value0)(u.value1)(n)}})(ce)}},se=function(e){return function(n){var u=fe(e)(s.foldableList),a=f.filter(L.uncurry(n)),t=j(s.unfoldableList);return function(e){return u(a(t(e)))}}},pe=function(e){return function(n){return se(e)(r.const(n))}},me=function(e){return function(n){return se(e)(function(e){return r.const(n(e))})}},we=function(e){return function(n){return l.foldlWithIndex(n)(function(n){return function(u){return function(a){return Z(e)(n)(a)(u)}}})(ce)}},de=function(e){return function(n){return function(u){return function(a){var t;return(t=j(p.unfoldableList)(u),function(u){return function(a){var l,r=t,v=u,i=!1;function o(u,t,l){if(u instanceof p.Nil)return i=!0,l;if(t instanceof p.Nil)return i=!0,l;if(u instanceof p.Cons&&t instanceof p.Cons){var o=d.compare(e)(u.value0.value0)(t.value0.value0);if(o instanceof h.LT)return r=u.value1,v=t,void(a=l);if(o instanceof h.EQ)return r=u.value1,v=t.value1,void(a=Z(e)(u.value0.value0)(n(u.value0.value1)(t.value0.value1))(l));if(o instanceof h.GT)return r=u,v=t.value1,void(a=l);throw new Error("Failed pattern match at Data.Map.Internal (line 641, column 5 - line 644, column 27): "+[o.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 638, column 3 - line 638, column 17): "+[u.constructor.name,t.constructor.name,l.constructor.name])}for(;!i;)l=o(r,v,a);return l}})(j(p.unfoldableList)(a))(ce)}}}},he=function(e){return de(e)(r.const)},ye=function(e){return function(n){return function(u){return m.maybe(u)(L.snd)($(e)(n)(u))}}},Ee=function(e){return function(n){return function(u){return t.foldl(p.foldableList)(r.flip(ye(e)))(n)(H(u))}}},Me=function(n){return 1===c.length(c.nub(a.eqInt)(function n(u){if(u instanceof F)return e.pure(p.applicativeList)(0);if(u instanceof T)return v.map(p.functorList)(function(e){return e+1|0})(y.append(p.semigroupList)(n(u.value0))(n(u.value3)));if(u instanceof b)return v.map(p.functorList)(function(e){return e+1|0})(y.append(p.semigroupList)(n(u.value0))(y.append(p.semigroupList)(n(u.value3))(n(u.value6))));throw new Error("Failed pattern match at Data.Map.Internal (line 188, column 3 - line 188, column 36): "+[u.constructor.name])}(n)))},Ie=u.identity(u.categoryFn),Le=new l.FoldableWithIndex(function(){return _},function(e){return function(n){return function(u){return t.foldMap(p.foldableList)(e)(L.uncurry(n))(Ie(j(p.unfoldableList)(u)))}}},function(e){return function(n){return function(u){return t.foldl(p.foldableList)((a=r.flip(e),function(e){return L.uncurry(a(e))}))(n)(Ie(j(p.unfoldableList)(u)));var a}}},function(e){return function(n){return function(u){return t.foldr(p.foldableList)(L.uncurry(e))(n)(Ie(j(p.unfoldableList)(u)))}}}),De=function(e){return function(n){return l.foldrWithIndex(Le)(function(u){return function(a){return function(t){return m.maybe(t)(function(n){return Z(e)(u)(n)(t)})(n(u)(a))}}})(ce)}},Fe=function(e){var n=De(e);return function(e){return n(r.const(e))}},Te=new I.TraversableWithIndex(function(){return Le},function(){return X},function(){return ee},function(u){return function(a){return function(t){if(t instanceof F)return e.pure(u)(F.value);if(t instanceof T)return n.apply(u.Apply0())(n.apply(u.Apply0())(n.apply(u.Apply0())(v.map(u.Apply0().Functor0())(T.create)(I.traverseWithIndex(Te)(u)(a)(t.value0)))(e.pure(u)(t.value1)))(a(t.value1)(t.value2)))(I.traverseWithIndex(Te)(u)(a)(t.value3));if(t instanceof b)return n.apply(u.Apply0())(n.apply(u.Apply0())(n.apply(u.Apply0())(n.apply(u.Apply0())(n.apply(u.Apply0())(n.apply(u.Apply0())(v.map(u.Apply0().Functor0())(b.create)(I.traverseWithIndex(Te)(u)(a)(t.value0)))(e.pure(u)(t.value1)))(a(t.value1)(t.value2)))(I.traverseWithIndex(Te)(u)(a)(t.value3)))(e.pure(u)(t.value4)))(a(t.value4)(t.value5)))(I.traverseWithIndex(Te)(u)(a)(t.value6));throw new Error("Failed pattern match at Data.Map.Internal (line 136, column 1 - line 150, column 40): "+[a.constructor.name,t.constructor.name])}}}),be=function(e){return function(n){return function(u){return function(a){var t=n(K(e)(u)(a));if(t instanceof m.Nothing)return ye(e)(u)(a);if(t instanceof m.Just)return Z(e)(u)(t.value0)(a);throw new Error("Failed pattern match at Data.Map.Internal (line 549, column 15 - line 551, column 25): "+[t.constructor.name])}}}},ge=function(e){return function(n){return function(u){return t.foldl(n)(function(n){return function(a){return be(e)(function(e){return function(n){if(n instanceof m.Just)return m.Just.create(u(e)(n.value0));if(n instanceof m.Nothing)return new m.Just(e);throw new Error("Failed pattern match at Data.Map.Internal (line 566, column 3 - line 566, column 38): "+[e.constructor.name,n.constructor.name])}}(a.value1))(a.value0)(n)}})(ce)}}},xe=function(e){return function(n){return function(u){return function(a){return be(e)((t=m.maybe(a)(r.flip(n)(a)),function(e){return m.Just.create(t(e))}))(u);var t}}}},Ce=function(e){return function(n){return function(u){return function(a){return t.foldl(p.foldableList)(function(u){return function(a){return be(e)((t=m.maybe(a.value1)(n(a.value1)),function(e){return m.Just.create(t(e))}))(a.value0)(u);var t}})(a)(j(p.unfoldableList)(u))}}}},qe=function(e){return Ce(e)(r.const)},Je=function(e){return new y.Semigroup(qe(e))},Ne=function(e){return new w.Monoid(function(){return Je(e)},ce)},Ae=function(e){return function(n){return function(u){return ne(e)(Ne(e))(n)(u)(W)}}},ke=function(e){return function(n){return t.foldl(n)(qe(e))(ce)}},We=function(e){return function(n){return function(u){return function(a){return be(e)(m.maybe(m.Nothing.value)(n))(u)(a)}}}};module.exports={showTree:S,empty:ce,isEmpty:P,singleton:W,checkValid:Me,insert:Z,insertWith:xe,lookup:K,lookupLE:U,lookupLT:le,lookupGE:z,lookupGT:ae,findMin:ue,findMax:te,foldSubmap:ne,submap:Ae,fromFoldable:fe,fromFoldableWith:ge,fromFoldableWithIndex:we,toUnfoldable:j,toUnfoldableUnordered:G,delete:ye,pop:$,member:B,alter:be,update:We,keys:H,values:A,union:qe,unionWith:Ce,unions:ke,intersection:he,intersectionWith:de,difference:Ee,isSubmap:V,size:k,filterWithKey:se,filterKeys:me,filter:pe,mapMaybeWithKey:De,mapMaybe:Fe,eq1Map:ie,eqMap:re,ord1Map:oe,ordMap:ve,showMap:O,semigroupMap:Je,monoidMap:Ne,functorMap:R,functorWithIndexMap:X,foldableMap:_,foldableWithIndexMap:Le,traversableMap:ee,traversableWithIndexMap:Te}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.HeytingAlgebra/index.js":"paZe","../Data.List/index.js":"ezw6","../Data.List.Lazy/index.js":"sNBV","../Data.List.Lazy.Types/index.js":"EJF+","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z"}],"jHR9":[function(require,module,exports) { -"use strict";var t=require("../Control.Alt/index.js"),e=require("../Control.Alternative/index.js"),n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),a=require("../Control.Bind/index.js"),i=require("../Control.Plus/index.js"),u=require("../Data.Array/index.js"),o=require("../Data.Either/index.js"),l=require("../Data.Foldable/index.js"),c=require("../Data.Function/index.js"),f=require("../Data.Functor/index.js"),s=require("../Data.List/index.js"),m=require("../Data.List.Types/index.js"),p=require("../Data.Map.Internal/index.js"),h=require("../Data.Maybe/index.js"),v=require("../Data.Monoid/index.js"),d=require("../Data.Unit/index.js"),w=function(t,e){this.compact=t,this.separate=e},g=function(e){return function(r){return function(a){return l.foldl(r)(function(r){return function(a){if(a instanceof o.Left)return{left:t.alt(e.Plus1().Alt0())(r.left)(n.pure(e.Applicative0())(a.value0)),right:r.right};if(a instanceof o.Right)return{right:t.alt(e.Plus1().Alt0())(r.right)(n.pure(e.Applicative0())(a.value0)),left:r.left};throw new Error("Failed pattern match at Data.Compactable (line 113, column 14 - line 115, column 54): "+[a.constructor.name])}})({left:i.empty(e.Plus1()),right:i.empty(e.Plus1())})}}},b=function(t){return t.separate},y=function(t){return p.toUnfoldable(m.unfoldableList)},D=new w(a.join(h.bindMaybe),function(t){if(t instanceof h.Nothing)return{left:h.Nothing.value,right:h.Nothing.value};if(t instanceof h.Just){if(t.value0 instanceof o.Left)return{left:new h.Just(t.value0.value0),right:h.Nothing.value};if(t.value0 instanceof o.Right)return{left:h.Nothing.value,right:new h.Just(t.value0.value0)};throw new Error("Failed pattern match at Data.Compactable (line 87, column 23 - line 89, column 48): "+[t.value0.constructor.name])}throw new Error("Failed pattern match at Data.Compactable (line 83, column 1 - line 89, column 48): "+[t.constructor.name])}),L=function(t){return new w((r=l.foldr(m.foldableList)(function(e){return function(n){return p.alter(t)(c.const(e.value1))(e.value0)(n)}})(p.empty),a=y(t),function(t){return r(a(t))}),(e=l.foldr(m.foldableList)(function(e){return function(n){if(e.value1 instanceof o.Left)return{left:p.insert(t)(e.value0)(e.value1.value0)(n.left),right:n.right};if(e.value1 instanceof o.Right)return{left:n.left,right:p.insert(t)(e.value0)(e.value1.value0)(n.right)};throw new Error("Failed pattern match at Data.Compactable (line 124, column 44 - line 126, column 63): "+[e.value1.constructor.name])}})({left:p.empty,right:p.empty}),n=y(t),function(t){return e(n(t))}));var e,n,r,a},j=new w(s.catMaybes,function(t){return g(m.alternativeList)(m.foldableList)(j)(t)}),x=function(t){return new w(function(e){if(e instanceof o.Left)return new o.Left(e.value0);if(e instanceof o.Right){if(e.value0 instanceof h.Just)return new o.Right(e.value0.value0);if(e.value0 instanceof h.Nothing)return new o.Left(v.mempty(t));throw new Error("Failed pattern match at Data.Compactable (line 93, column 23 - line 95, column 27): "+[e.value0.constructor.name])}throw new Error("Failed pattern match at Data.Compactable (line 91, column 1 - line 100, column 53): "+[e.constructor.name])},function(e){if(e instanceof o.Left)return{left:new o.Left(e.value0),right:new o.Left(e.value0)};if(e instanceof o.Right){if(e.value0 instanceof o.Left)return{left:new o.Right(e.value0.value0),right:new o.Left(v.mempty(t))};if(e.value0 instanceof o.Right)return{left:new o.Left(v.mempty(t)),right:new o.Right(e.value0.value0)};throw new Error("Failed pattern match at Data.Compactable (line 98, column 24 - line 100, column 53): "+[e.value0.constructor.name])}throw new Error("Failed pattern match at Data.Compactable (line 91, column 1 - line 100, column 53): "+[e.constructor.name])})},q=new w(u.catMaybes,function(t){return g(e.alternativeArray)(l.foldableArray)(q)(t)}),C=function(t){return function(e){var n=b(e),r=f.map(t)(o.note(d.unit));return function(t){return n(r(t)).right}}},E=function(t){return t.compact},A=function(t){return function(e){return function(n){return{left:E(e)(f.map(t)(function(t){return o.hush(function(t){if(t instanceof o.Left)return new o.Right(t.value0);if(t instanceof o.Right)return new o.Left(t.value0);throw new Error("Failed pattern match at Data.Compactable (line 79, column 20 - line 81, column 24): "+[t.constructor.name])}(t))})(n)),right:E(e)(f.map(t)(o.hush)(n))}}}},F=function(t){return function(e){return function(n){var r=E(e),i=a.bind(t)(n);return function(t){return r(i(t))}}}},R=function(t){return function(e){return function(n){var r=b(e),i=a.bind(t)(n);return function(t){return r(i(t))}}}},M=function(t){return function(e){return function(n){var a=E(e),i=r.apply(t)(n);return function(t){return a(i(t))}}}},N=function(t){return function(e){return function(n){var a=b(e),i=r.apply(t)(n);return function(t){return a(i(t))}}}};module.exports={Compactable:w,compact:E,separate:b,compactDefault:C,separateDefault:A,applyMaybe:M,applyEither:N,bindMaybe:F,bindEither:R,compactableMaybe:D,compactableEither:x,compactableArray:q,compactableList:j,compactableMap:L}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Plus/index.js":"oMBg","../Data.Array/index.js":"4t4C","../Data.Either/index.js":"B2JL","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Unit/index.js":"NhVk"}],"6hfS":[function(require,module,exports) { -"use strict";var t=require("../Control.Bind/index.js"),n=require("../Data.Array/index.js"),e=require("../Data.Compactable/index.js"),r=require("../Data.Either/index.js"),i=require("../Data.Foldable/index.js"),u=require("../Data.Function/index.js"),a=require("../Data.Functor/index.js"),o=require("../Data.HeytingAlgebra/index.js"),l=require("../Data.List/index.js"),f=require("../Data.List.Types/index.js"),c=require("../Data.Map.Internal/index.js"),s=require("../Data.Maybe/index.js"),h=require("../Data.Monoid/index.js"),m=require("../Data.Semigroup/index.js"),p=function(t,n,e,r,i,u){this.Compactable0=t,this.Functor1=n,this.filter=e,this.filterMap=r,this.partition=i,this.partitionMap=u},g=function(t){return function(n){var r=e.separate(t.Compactable0()),i=a.map(t.Functor1())(n);return function(t){return r(i(t))}}},b=function(t){return t.partitionMap},d=function(t){return t.partition},v=function(t){return function(n){return t(n)?new s.Just(n):s.Nothing.value}},w=new p(function(){return e.compactableList},function(){return f.functorList},l.filter,function(t){return l.mapMaybe(t)},function(t){return function(n){return i.foldr(f.foldableList)(function(n){return function(e){return t(n)?{no:e.no,yes:new f.Cons(n,e.yes)}:{no:new f.Cons(n,e.no),yes:e.yes}}})({no:f.Nil.value,yes:f.Nil.value})(n)}},function(t){return function(n){return i.foldr(f.foldableList)(function(n){return function(e){var i=t(n);if(i instanceof r.Left)return{left:new f.Cons(i.value0,e.left),right:e.right};if(i instanceof r.Right)return{left:e.left,right:new f.Cons(i.value0,e.right)};throw new Error("Failed pattern match at Data.Filterable (line 190, column 36 - line 192, column 83): "+[i.constructor.name])}})({left:f.Nil.value,right:f.Nil.value})(n)}}),y=new p(function(){return e.compactableArray},function(){return a.functorArray},n.filter,n.mapMaybe,n.partition,function(t){return i.foldl(i.foldableArray)(function(n){return function(e){var i=t(e);if(i instanceof r.Left)return{left:m.append(m.semigroupArray)(n.left)([i.value0]),right:n.right};if(i instanceof r.Right)return{right:m.append(m.semigroupArray)(n.right)([i.value0]),left:n.left};throw new Error("Failed pattern match at Data.Filterable (line 149, column 16 - line 151, column 50): "+[i.constructor.name])}})({left:[],right:[]})}),D=function(t){return function(n){var r=e.compact(t.Compactable0()),i=a.map(t.Functor1())(n);return function(t){return r(i(t))}}},F=function(t){return t.filterMap},L=function(t){return function(n){return function(e){return{yes:F(t)(v(n))(e),no:F(t)(v(o.not(o.heytingAlgebraFunction(o.heytingAlgebraBoolean))(n)))(e)}}}},M=function(t){return function(n){return function(e){return d(t)(n)(e).yes}}},x=function(t){var n=F(t);return function(t){return n(v(t))}},j=function(t){return t.filter},q=function(t){return function(n){return function(e){return{yes:j(t)(n)(e),no:j(t)(o.not(o.heytingAlgebraFunction(o.heytingAlgebraBoolean))(n))(e)}}}},E=function(t){return function(n){return t(n)?new r.Right(n):new r.Left(n)}},A=function(t){return function(n){return function(e){return b(t)(E(n))(e).right}}},N=function(t){return function(n){return function(e){var r=b(t)(E(n))(e);return{no:r.left,yes:r.right}}}},R=function t(n){return new p(function(){return e.compactableEither(n)},function(){return r.functorEither},function(e){return x(t(n))(e)},function(t){return function(e){if(e instanceof r.Left)return new r.Left(e.value0);if(e instanceof r.Right){var i=t(e.value0);if(i instanceof s.Nothing)return new r.Left(h.mempty(n));if(i instanceof s.Just)return new r.Right(i.value0);throw new Error("Failed pattern match at Data.Filterable (line 180, column 27 - line 182, column 22): "+[i.constructor.name])}throw new Error("Failed pattern match at Data.Filterable (line 171, column 1 - line 184, column 29): "+[t.constructor.name,e.constructor.name])}},function(e){return N(t(n))(e)},function(t){return function(e){if(e instanceof r.Left)return{left:new r.Left(e.value0),right:new r.Left(e.value0)};if(e instanceof r.Right){var i=t(e.value0);if(i instanceof r.Left)return{left:new r.Right(i.value0),right:new r.Left(h.mempty(n))};if(i instanceof r.Right)return{left:new r.Left(h.mempty(n)),right:new r.Right(i.value0)};throw new Error("Failed pattern match at Data.Filterable (line 173, column 30 - line 175, column 53): "+[i.constructor.name])}throw new Error("Failed pattern match at Data.Filterable (line 171, column 1 - line 184, column 29): "+[t.constructor.name,e.constructor.name])}})},C=function t(n){return new p(function(){return e.compactableMap(n)},function(){return c.functorMap},function(e){return x(t(n))(e)},function(t){return function(e){var r=c.toUnfoldable(f.unfoldableList);return i.foldr(f.foldableList)(function(e){return function(r){return c.alter(n)(u.const(t(e.value1)))(e.value0)(r)}})(c.empty)(r(e))}},function(e){return N(t(n))(e)},function(t){return function(e){var u=c.toUnfoldable(f.unfoldableList);return i.foldr(f.foldableList)(function(e){return function(i){var u=t(e.value1);if(u instanceof r.Left)return{left:c.insert(n)(e.value0)(u.value0)(i.left),right:i.right};if(u instanceof r.Right)return{left:i.left,right:c.insert(n)(e.value0)(u.value0)(i.right)};throw new Error("Failed pattern match at Data.Filterable (line 215, column 44 - line 217, column 57): "+[u.constructor.name])}})({left:c.empty,right:c.empty})(u(e))}})},B=new p(function(){return e.compactableMaybe},function(){return s.functorMaybe},function(t){return x(B)(t)},t.bindFlipped(s.bindMaybe),function(t){return N(B)(t)},function(t){return function(n){if(n instanceof s.Nothing)return{left:s.Nothing.value,right:s.Nothing.value};if(n instanceof s.Just){var e=t(n.value0);if(e instanceof r.Left)return{left:new s.Just(e.value0),right:s.Nothing.value};if(e instanceof r.Right)return{left:s.Nothing.value,right:new s.Just(e.value0)};throw new Error("Failed pattern match at Data.Filterable (line 161, column 29 - line 163, column 48): "+[e.constructor.name])}throw new Error("Failed pattern match at Data.Filterable (line 159, column 1 - line 169, column 29): "+[t.constructor.name,n.constructor.name])}}),J=function(t){return F(t)(u.const(s.Nothing.value))};module.exports={Filterable:p,partitionMap:b,partition:d,filterMap:F,filter:j,eitherBool:E,partitionDefault:N,partitionDefaultFilter:q,partitionDefaultFilterMap:L,partitionMapDefault:g,maybeBool:v,filterDefault:x,filterDefaultPartition:M,filterDefaultPartitionMap:A,filterMapDefault:D,cleared:J,filterableArray:y,filterableMaybe:B,filterableEither:R,filterableList:w,filterableMap:C}; -},{"../Control.Bind/index.js":"7VcT","../Data.Array/index.js":"4t4C","../Data.Compactable/index.js":"jHR9","../Data.Either/index.js":"B2JL","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ"}],"AuzG":[function(require,module,exports) { -"use strict";var n=require("../Data.Maybe/index.js"),t=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),e=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),r=function(){function n(n,t){this.value0=n,this.value1=t}return n.create=function(t){return function(e){return new n(t,e)}},n}(),u=function(){function n(){}return n.value=new n,n}(),o=function(n){return n},i=function(n){return n},c=function(n,t){this.from=n,this.to=t},a=function(n){return n.to},f=new c(function(r){if(r instanceof n.Nothing)return new t(u.value);if(r instanceof n.Just)return new e(r.value0);throw new Error("Failed pattern match at Data.Generic.Rep (line 40, column 1 - line 47, column 49): "+[r.constructor.name])},function(r){if(r instanceof t)return n.Nothing.value;if(r instanceof e)return new n.Just(r.value0);throw new Error("Failed pattern match at Data.Generic.Rep (line 40, column 1 - line 47, column 49): "+[r.constructor.name])}),l=function(n){return n.from};module.exports={Generic:c,to:a,from:l,NoArguments:u,Inl:t,Inr:e,Product:r,Constructor:o,Argument:i,genericMaybe:f}; -},{"../Data.Maybe/index.js":"5mN7"}],"lpst":[function(require,module,exports) { -"use strict";var n=require("../Data.Foldable/index.js"),e=require("../Data.Generic.Rep/index.js"),r=require("../Data.Monoid/index.js"),t=require("../Data.Semigroup/index.js"),o=require("../Data.Show/index.js"),i=require("../Data.Symbol/index.js"),u=function(n){this.genericShowArgs=n},c=function(n){this["genericShow'"]=n},a=new u(function(n){return[]}),s=function(n){return new u(function(e){return[o.show(n)(e)]})},f=function(n){return n.genericShowArgs},g=function(n){return function(e){return new u(function(r){return t.append(t.semigroupArray)(f(n)(r.value0))(f(e)(r.value1))})}},w=function(e){return function(o){return new c(function(u){var c=i.reflectSymbol(o)(i.SProxy.value),a=f(e)(u);return 0===a.length?c:"("+n.intercalate(n.foldableArray)(r.monoidString)(" ")(t.append(t.semigroupArray)([c])(a))+")"})}},h=function(n){return n["genericShow'"]},S=new c(function(n){return h(S)(n)}),l=function(n){return function(r){return new c(function(t){if(t instanceof e.Inl)return h(n)(t.value0);if(t instanceof e.Inr)return h(r)(t.value0);throw new Error("Failed pattern match at Data.Generic.Rep.Show (line 26, column 1 - line 28, column 40): "+[t.constructor.name])})}},d=function(n){return function(r){return function(t){return h(r)(e.from(n)(t))}}};module.exports={GenericShow:c,"genericShow'":h,genericShow:d,GenericShowArgs:u,genericShowArgs:f,genericShowNoConstructors:S,genericShowArgsNoArguments:a,genericShowSum:l,genericShowArgsProduct:g,genericShowConstructor:w,genericShowArgsArgument:s}; -},{"../Data.Foldable/index.js":"eVDl","../Data.Generic.Rep/index.js":"AuzG","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Symbol/index.js":"4oJQ"}],"u1pL":[function(require,module,exports) { -"use strict";var n=require("../Data.Tuple/index.js"),t=require("../Data.Unit/index.js"),u=function(n,t){this.Monad0=n,this.state=t},e=function(n){return n.state},r=function(u){return function(r){return e(u)(function(u){return new n.Tuple(t.unit,r)})}},i=function(u){return function(r){return e(u)(function(u){return new n.Tuple(t.unit,r(u))})}},o=function(t){return function(u){return e(t)(function(t){var e=u(t);return new n.Tuple(e,e)})}},f=function(t){return function(u){return e(t)(function(t){return new n.Tuple(u(t),t)})}},c=function(t){return e(t)(function(t){return new n.Tuple(t,t)})};module.exports={state:e,MonadState:u,get:c,gets:f,put:r,modify:o,modify_:i}; -},{"../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk"}],"89+t":[function(require,module,exports) { -"use strict";var n=require("../Data.Functor/index.js"),r=require("../Data.Void/index.js"),t=function(n){this.cmap=n},u=function(n){return n.cmap},e=function(n){return function(r){return function(t){return u(n)(t)(r)}}},i=function(t){return function(e){return function(i){return n.map(e)(r.absurd)(u(t)(r.absurd)(i))}}},c=function(n){return function(r){return function(r){return u(n)(r)}}};module.exports={cmap:u,Contravariant:t,cmapFlipped:e,coerce:i,imapC:c}; -},{"../Data.Functor/index.js":"+0AE","../Data.Void/index.js":"bncE"}],"OmNG":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),t=require("../Control.Semigroupoid/index.js"),e=require("../Data.Bifoldable/index.js"),u=require("../Data.Bifunctor/index.js"),i=require("../Data.Bitraversable/index.js"),o=require("../Data.Eq/index.js"),c=require("../Data.Foldable/index.js"),f=require("../Data.FoldableWithIndex/index.js"),a=require("../Data.Functor/index.js"),s=require("../Data.Functor.Contravariant/index.js"),d=require("../Data.Functor.Invariant/index.js"),l=require("../Data.FunctorWithIndex/index.js"),p=require("../Data.Monoid/index.js"),C=require("../Data.Newtype/index.js"),x=require("../Data.Ord/index.js"),q=require("../Data.Semigroup/index.js"),b=require("../Data.Show/index.js"),w=require("../Data.Traversable/index.js"),m=require("../Data.TraversableWithIndex/index.js"),j=function(n){return n},v=function(n){return new b.Show(function(r){return"(Const "+b.show(n)(r)+")"})},D=function(n){return n},h=new t.Semigroupoid(function(n){return function(n){return n}}),g=function(n){return n},F=function(n){return n},y=function(n){return n},I=new C.Newtype(function(n){return n},j),W=function(n){return n},A=function(n){return n},B=new a.Functor(function(n){return function(n){return n}}),S=new l.FunctorWithIndex(function(){return B},function(n){return function(n){return n}}),T=new d.Invariant(d.imapF(B)),E=new c.Foldable(function(n){return function(r){return function(r){return p.mempty(n)}}},function(n){return function(n){return function(r){return n}}},function(n){return function(n){return function(r){return n}}}),N=new f.FoldableWithIndex(function(){return E},function(n){return function(r){return function(r){return p.mempty(n)}}},function(n){return function(n){return function(r){return n}}},function(n){return function(n){return function(r){return n}}}),O=new w.Traversable(function(){return E},function(){return B},function(r){return function(t){return n.pure(r)(t)}},function(r){return function(t){return function(t){return n.pure(r)(t)}}}),R=new m.TraversableWithIndex(function(){return N},function(){return S},function(){return O},function(r){return function(t){return function(t){return n.pure(r)(t)}}}),M=function(n){return n},k=function(n){return n},z=function(n){return new o.Eq1(function(r){return o.eq(k(n))})},G=function(n){return new x.Ord1(function(){return z(n.Eq0())},function(r){return x.compare(y(n))})},H=new s.Contravariant(function(n){return function(n){return n}}),J=function(n){return n},K=function(n){return n},L=function(n){return n},P=new u.Bifunctor(function(n){return function(r){return function(r){return n(r)}}}),Q=new e.Bifoldable(function(n){return function(n){return function(r){return function(r){return n(r)}}}},function(n){return function(r){return function(r){return function(t){return n(r)(t)}}}},function(n){return function(r){return function(r){return function(t){return n(t)(r)}}}}),U=new i.Bitraversable(function(){return Q},function(){return P},function(n){return function(r){return a.map(n.Apply0().Functor0())(j)(r)}},function(n){return function(r){return function(t){return function(t){return a.map(n.Apply0().Functor0())(j)(r(t))}}}}),V=function(n){return new r.Apply(function(){return B},function(r){return function(t){return q.append(n)(r)(t)}})},X=function(r){return new n.Applicative(function(){return V(r.Semigroup0())},function(n){return p.mempty(r)})};module.exports={Const:j,newtypeConst:I,eqConst:k,eq1Const:z,ordConst:y,ord1Const:G,boundedConst:K,showConst:v,semigroupoidConst:h,semigroupConst:g,monoidConst:W,semiringConst:D,ringConst:F,euclideanRingConst:M,commutativeRingConst:J,heytingAlgebraConst:A,booleanAlgebraConst:L,functorConst:B,bifunctorConst:P,functorWithIndexConst:S,invariantConst:T,contravariantConst:H,applyConst:V,applicativeConst:X,foldableConst:E,foldableWithIndexConst:N,bifoldableConst:Q,traversableConst:O,traversableWithIndexConst:R,bitraversableConst:U}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Semigroupoid/index.js":"/riR","../Data.Bifoldable/index.js":"wjQo","../Data.Bifunctor/index.js":"e2Wc","../Data.Bitraversable/index.js":"8nb9","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Functor/index.js":"+0AE","../Data.Functor.Contravariant/index.js":"89+t","../Data.Functor.Invariant/index.js":"AXkC","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF"}],"0DaD":[function(require,module,exports) { -"use strict";var n=require("../Control.Category/index.js"),r=require("../Data.Newtype/index.js"),t=function(n){this.dimap=n},u=new t(function(n){return function(r){return function(t){return function(u){return r(t(n(u)))}}}}),e=function(n){return n.dimap},i=function(r){return function(t){return e(r)(t)(n.identity(n.categoryFn))}},o=function(r){return function(t){return e(r)(n.identity(n.categoryFn))(t)}},c=function(n){return function(t){return e(n)(r.wrap(t))(r.unwrap(t))}},f=function(n){return function(t){return function(u){return e(n)(r.unwrap(t))(r.wrap(t))}}},a=function(r){return function(t){return function(u){return o(t)(u)(n.identity(r))}}};module.exports={dimap:e,Profunctor:t,lcmap:i,rmap:o,arr:a,unwrapIso:c,wrapIso:f,profunctorFn:u}; -},{"../Control.Category/index.js":"IAi2","../Data.Newtype/index.js":"lz8k"}],"nkqb":[function(require,module,exports) { -"use strict";var t=require("../Control.Category/index.js"),n=require("../Control.Semigroupoid/index.js"),r=require("../Data.Either/index.js"),e=require("../Data.Functor/index.js"),i=require("../Data.Profunctor/index.js"),o=function(t,n,r){this.Profunctor0=t,this.left=n,this.right=r},u=function(t){return t.right},c=function(t){return t.left},f=function(t){return function(r){return function(e){return function(i){return n.composeFlipped(t.Semigroupoid0())(c(r)(e))(u(r)(i))}}}},a=function(e){return function(o){return function(u){return function(c){var a=i.dimap(o.Profunctor0())(r.either(t.identity(t.categoryFn))(t.identity(t.categoryFn)))(t.identity(t.categoryFn))(t.identity(e));return n.composeFlipped(e.Semigroupoid0())(f(e)(o)(u)(c))(a)}}}},s=new o(function(){return i.profunctorFn},function(t){return function(n){if(n instanceof r.Left)return r.Left.create(t(n.value0));if(n instanceof r.Right)return new r.Right(n.value0);throw new Error("Failed pattern match at Data.Profunctor.Choice (line 32, column 1 - line 35, column 16): "+[t.constructor.name,n.constructor.name])}},e.map(r.functorEither));module.exports={left:c,right:u,Choice:o,splitChoice:f,fanin:a,choiceFn:s}; -},{"../Control.Category/index.js":"IAi2","../Control.Semigroupoid/index.js":"/riR","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Profunctor/index.js":"0DaD"}],"af4y":[function(require,module,exports) { -"use strict";var o=require("../Control.Semigroupoid/index.js"),e=require("../Data.Profunctor/index.js"),r=function(o,e){this.Profunctor0=o,this.closed=e},n=new r(function(){return e.profunctorFn},o.compose(o.semigroupoidFn)),t=function(o){return o.closed};module.exports={closed:t,Closed:r,closedFunction:n}; -},{"../Control.Semigroupoid/index.js":"/riR","../Data.Profunctor/index.js":"0DaD"}],"w9p6":[function(require,module,exports) { -"use strict";var n=require("../Control.Category/index.js"),r=require("../Control.Semigroupoid/index.js"),t=require("../Data.Functor/index.js"),e=require("../Data.Profunctor/index.js"),u=require("../Data.Tuple/index.js"),o=function(n,r,t){this.Profunctor0=n,this.first=r,this.second=t},i=new o(function(){return e.profunctorFn},function(n){return function(r){return new u.Tuple(n(r.value0),r.value1)}},t.map(u.functorTuple)),c=function(n){return n.second},f=function(n){return n.first},s=function(n){return function(t){return function(e){return function(u){return r.composeFlipped(n.Semigroupoid0())(f(t)(e))(c(t)(u))}}}},p=function(t){return function(o){return function(i){return function(c){var f=e.dimap(o.Profunctor0())(n.identity(n.categoryFn))(function(n){return new u.Tuple(n,n)})(n.identity(t));return r.composeFlipped(t.Semigroupoid0())(f)(s(t)(o)(i)(c))}}}};module.exports={first:f,second:c,Strong:o,splitStrong:s,fanout:p,strongFn:i}; -},{"../Control.Category/index.js":"IAi2","../Control.Semigroupoid/index.js":"/riR","../Data.Functor/index.js":"+0AE","../Data.Profunctor/index.js":"0DaD","../Data.Tuple/index.js":"II/O"}],"tj5E":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),r=require("../Control.Alternative/index.js"),t=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),u=require("../Control.Bind/index.js"),i=require("../Control.Category/index.js"),o=require("../Control.Monad/index.js"),c=require("../Control.MonadPlus/index.js"),a=require("../Control.MonadZero/index.js"),f=require("../Control.Plus/index.js"),l=require("../Control.Semigroupoid/index.js"),p=require("../Data.Distributive/index.js"),d=require("../Data.Either/index.js"),s=require("../Data.Functor/index.js"),v=require("../Data.Functor.Invariant/index.js"),S=require("../Data.Newtype/index.js"),w=require("../Data.Profunctor/index.js"),x=require("../Data.Profunctor.Choice/index.js"),j=require("../Data.Profunctor.Closed/index.js"),q=require("../Data.Profunctor.Strong/index.js"),A=require("../Data.Tuple/index.js"),C=function(n){return n},m=function(n){return new l.Semigroupoid(function(r){return function(t){return function(e){return u.bind(n)(t(e))(r)}}})},y=function(n){return new w.Profunctor(function(r){return function(t){return function(e){var u=s.map(n)(t);return function(n){return u(e(r(n)))}}}})},D=function(n){return new q.Strong(function(){return y(n)},function(r){return function(t){return s.map(n)(function(n){return new A.Tuple(n,t.value1)})(r(t.value0))}},function(r){return function(t){return s.map(n)(A.Tuple.create(t.value0))(r(t.value1))}})},g=new S.Newtype(function(n){return n},C),F=function(n){return new v.Invariant(function(r){return function(t){return function(e){var u=v.imap(n)(r)(t);return function(n){return u(e(n))}}}})},P=function(n){return function(r){return function(t){return n(r(t))}}},h=function(n){return new s.Functor(function(r){return function(t){var e=s.map(n)(r);return function(n){return e(t(n))}}})},b=function n(r){return new p.Distributive(function(){return h(r.Functor0())},function(t){return function(e){var u=p.distribute(n(r))(t),i=s.map(t)(e);return function(n){return u(i(n))}}},function(n){return function(t){return function(e){return p.collect(r)(n)(function(n){return n(e)})(t)}}})},M=function(n){return new j.Closed(function(){return y(n.Functor0())},function(r){return function(t){return p.distribute(n)(s.functorFn)(function(n){return r(t(n))})}})},B=function(n){return new x.Choice(function(){return y(n.Apply0().Functor0())},function(r){return C(d.either((u=s.map(n.Apply0().Functor0())(d.Left.create),function(n){return u(r(n))}))((e=t.pure(n),function(n){return e(d.Right.create(n))})));var e,u},function(r){return C(d.either((u=t.pure(n),function(n){return u(d.Left.create(n))}))((e=s.map(n.Apply0().Functor0())(d.Right.create),function(n){return e(r(n))})));var e,u})},Z=function(n){return new i.Category(function(){return m(n.Bind1())},t.pure(n.Applicative0()))},T=function(n){return new e.Apply(function(){return h(n.Functor0())},function(r){return function(t){return function(u){return e.apply(n)(r(u))(t(u))}}})},I=function(n){return new u.Bind(function(){return T(n.Apply0())},function(r){return function(t){return function(e){return u.bind(n)(r(e))(function(n){return t(n)(e)})}}})},L=function(n){return new t.Applicative(function(){return T(n.Apply0())},function(r){return function(e){return t.pure(n)(r)}})},N=function(n){return new o.Monad(function(){return L(n.Applicative0())},function(){return I(n.Bind1())})},R=function(r){return new n.Alt(function(){return h(r.Functor0())},function(t){return function(e){return function(u){return n.alt(r)(t(u))(e(u))}}})},E=function(n){return new f.Plus(function(){return R(n.Alt0())},function(r){return f.empty(n)})},k=function(n){return new r.Alternative(function(){return L(n.Applicative0())},function(){return E(n.Plus1())})},z=function(n){return new a.MonadZero(function(){return k(n.Alternative1())},function(){return N(n.Monad0())})},G=function(n){return new c.MonadPlus(function(){return z(n.MonadZero0())})};module.exports={Star:C,hoistStar:P,newtypeStar:g,semigroupoidStar:m,categoryStar:Z,functorStar:h,invariantStar:F,applyStar:T,applicativeStar:L,bindStar:I,monadStar:N,altStar:R,plusStar:E,alternativeStar:k,monadZeroStar:z,monadPlusStar:G,distributiveStar:b,profunctorStar:y,strongStar:D,choiceStar:B,closedStar:M}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad/index.js":"U/Ix","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Control.Semigroupoid/index.js":"/riR","../Data.Distributive/index.js":"8PTu","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Functor.Invariant/index.js":"AXkC","../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Profunctor.Closed/index.js":"af4y","../Data.Profunctor.Strong/index.js":"w9p6","../Data.Tuple/index.js":"II/O"}],"i7fd":[function(require,module,exports) { -"use strict";var n=require("../Data.Functor/index.js"),t=require("../Data.Identity/index.js"),r=require("../Data.Newtype/index.js"),e=require("../Data.Profunctor.Choice/index.js"),i=require("../Data.Profunctor.Star/index.js"),u=require("../Data.Profunctor.Strong/index.js"),o=function(n,t,r){this.Choice1=n,this.Strong0=t,this.wander=r},a=function(n){return new o(function(){return i.choiceStar(n)},function(){return i.strongStar(n.Apply0().Functor0())},function(t){return function(r){return t(n)(r)}})},c=new o(function(){return e.choiceFn},function(){return u.strongFn},function(e){return r.alaF(n.functorFn)(n.functorFn)(t.newtypeIdentity)(t.newtypeIdentity)(t.Identity)(e(t.applicativeIdentity))}),d=function(n){return n.wander};module.exports={wander:d,Wander:o,wanderFunction:c,wanderStar:a}; -},{"../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Newtype/index.js":"lz8k","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Profunctor.Star/index.js":"tj5E","../Data.Profunctor.Strong/index.js":"w9p6"}],"FnLc":[function(require,module,exports) { -"use strict";var t=function(t,n,u){this.Profunctor0=t,this.unleft=n,this.unright=u},n=function(t){return t.unright},u=function(t){return t.unleft};module.exports={unleft:u,unright:n,Cochoice:t}; -},{}],"mj9z":[function(require,module,exports) { -"use strict";var n=require("../Data.Const/index.js"),r=require("../Data.Either/index.js"),e=require("../Data.Functor/index.js"),t=require("../Data.Lens.Internal.Wander/index.js"),o=require("../Data.Monoid/index.js"),u=require("../Data.Newtype/index.js"),i=require("../Data.Profunctor/index.js"),c=require("../Data.Profunctor.Choice/index.js"),f=require("../Data.Profunctor.Cochoice/index.js"),a=require("../Data.Profunctor.Strong/index.js"),s=require("../Data.Semigroup/index.js"),d=require("../Data.Tuple/index.js"),F=function(n){return n},g=function(n){return s.semigroupFn(n)},p=new i.Profunctor(function(n){return function(r){return function(r){return function(e){return r(n(e))}}}}),x=new a.Strong(function(){return p},function(n){return function(r){return n(d.fst(r))}},function(n){return function(r){return n(d.snd(r))}}),j=new u.Newtype(function(n){return n},F),m=function(n){return o.monoidFn(n)},q=new f.Cochoice(function(){return p},function(n){return function(e){return n(r.Left.create(e))}},function(n){return function(e){return n(r.Right.create(e))}}),w=function(n){return new c.Choice(function(){return p},function(e){return r.either(e)(o.mempty(o.monoidFn(n)))},function(e){return r.either(o.mempty(o.monoidFn(n)))(e)})},D=function(r){return new t.Wander(function(){return w(r)},function(){return x},function(t){return function(o){return u.alaF(e.functorFn)(e.functorFn)(n.newtypeConst)(n.newtypeConst)(n.Const)(t(n.applicativeConst(r)))(o)}})};module.exports={Forget:F,newtypeForget:j,semigroupForget:g,monoidForget:m,profunctorForget:p,choiceForget:w,strongForget:x,cochoiceForget:q,wanderForget:D}; -},{"../Data.Const/index.js":"OmNG","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Lens.Internal.Wander/index.js":"i7fd","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Profunctor.Cochoice/index.js":"FnLc","../Data.Profunctor.Strong/index.js":"w9p6","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O"}],"V4/H":[function(require,module,exports) { -"use strict";var e=require("../Data.Either/index.js"),n=require("../Data.Lens.Internal.Wander/index.js"),r=require("../Data.Newtype/index.js"),t=require("../Data.Profunctor/index.js"),u=require("../Data.Profunctor.Choice/index.js"),o=require("../Data.Profunctor.Strong/index.js"),c=require("../Data.Tuple/index.js"),i=function(e){return e},a=function(e){return new t.Profunctor(function(n){return function(r){return function(u){return t.dimap(e)(o.second(o.strongFn)(n))(r)(u)}}})},f=function(e){return new o.Strong(function(){return a(e.Profunctor0())},function(n){return i(t.lcmap(e.Profunctor0())(function(e){return new c.Tuple(new c.Tuple(e.value0,e.value1.value0),e.value1.value1)})(o.first(e)(n)))},function(n){return i(t.lcmap(e.Profunctor0())(function(e){return new c.Tuple(e.value1.value0,new c.Tuple(e.value0,e.value1.value1))})(o.second(e)(n)))})},l=new r.Newtype(function(e){return e},i),d=function(n){return new u.Choice(function(){return a(n.Profunctor0())},function(r){return i(t.lcmap(n.Profunctor0())(function(n){return e.either((r=c.Tuple.create(n.value0),function(n){return e.Left.create(r(n))}))(e.Right.create)(n.value1);var r})(u.left(n)(r)))},function(r){return i(t.lcmap(n.Profunctor0())(function(n){return e.either(e.Left.create)((r=c.Tuple.create(n.value0),function(n){return e.Right.create(r(n))}))(n.value1);var r})(u.right(n)(r)))})},v=function(e){return new n.Wander(function(){return d(e.Choice1())},function(){return f(e.Strong0())},function(r){return function(t){return i(n.wander(e)(function(e){return function(n){return function(t){return r(e)((u=c.Tuple.create(t.value0),function(e){return n(u(e))}))(t.value1);var u}}})(t))}})};module.exports={Indexed:i,newtypeIndexed:l,profunctorIndexed:a,strongIndexed:f,choiceIndexed:d,wanderIndexed:v}; -},{"../Data.Either/index.js":"B2JL","../Data.Lens.Internal.Wander/index.js":"i7fd","../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Profunctor.Strong/index.js":"w9p6","../Data.Tuple/index.js":"II/O"}],"OPOX":[function(require,module,exports) { -"use strict";var n=require("../Control.Category/index.js"),e=require("../Control.Monad.State.Class/index.js"),t=require("../Data.Lens.Internal.Forget/index.js"),r=require("../Data.Lens.Internal.Indexed/index.js"),u=require("../Data.Newtype/index.js"),o=require("../Data.Profunctor.Strong/index.js"),i=function(e){return u.unwrap(t.newtypeForget)(e(n.identity(n.categoryFn)))},a=function(n){return function(e){return i(e)(n)}},c=function(n){return function(t){return e.gets(n)(function(n){return a(n)(t)})}},s=function(n){return function(e){var r=u.unwrap(t.newtypeForget)(e);return function(e){return r(n(e))}}},f=function(e){return function(t){return s(o.fanout(n.categoryFn)(o.strongFn)(i(e))(i(t)))}},d=function(e){return u.unwrap(t.newtypeForget)(e(r.Indexed(n.identity(n.categoryFn))))},g=function(n){return function(t){return e.gets(n)(d(t))}},w=function(n){return s(i(n))};module.exports={viewOn:a,view:i,to:s,takeBoth:f,use:c,iview:d,iuse:g,cloneGetter:w}; -},{"../Control.Category/index.js":"IAi2","../Control.Monad.State.Class/index.js":"u1pL","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.Lens.Internal.Indexed/index.js":"V4/H","../Data.Newtype/index.js":"lz8k","../Data.Profunctor.Strong/index.js":"w9p6"}],"eUa0":[function(require,module,exports) { -"use strict";var n=require("../Data.Functor/index.js"),r=require("../Data.Profunctor/index.js"),u=function(){function n(n,r){this.value0=n,this.value1=r}return n.create=function(r){return function(u){return new n(r,u)}},n}(),t=new r.Profunctor(function(n){return function(r){return function(t){return new u(function(r){return t.value0(n(r))},function(n){return r(t.value1(n))})}}}),e=new n.Functor(function(n){return function(r){return new u(r.value0,function(u){return n(r.value1(u))})}});module.exports={Exchange:u,functorExchange:e,profunctorExchange:t}; -},{"../Data.Functor/index.js":"+0AE","../Data.Profunctor/index.js":"0DaD"}],"NfU6":[function(require,module,exports) { -"use strict";var n=function(n,t,u){this.Profunctor0=n,this.unfirst=t,this.unsecond=u},t=function(n){return n.unsecond},u=function(n){return n.unfirst};module.exports={unfirst:u,unsecond:t,Costrong:n}; -},{}],"IZDD":[function(require,module,exports) { -"use strict";var n=require("../Data.Newtype/index.js"),r=require("../Data.Profunctor/index.js"),t=require("../Data.Profunctor.Choice/index.js"),u=require("../Data.Profunctor.Cochoice/index.js"),e=require("../Data.Profunctor.Costrong/index.js"),o=require("../Data.Profunctor.Strong/index.js"),c=function(n){return n},i=function(n){return new r.Profunctor(function(t){return function(u){return function(e){var o=r.dimap(n)(u)(t);return function(n){return e(o(n))}}}})},f=function(n){return new e.Costrong(function(){return i(n.Profunctor0())},function(r){var t=o.first(n);return function(n){return r(t(n))}},function(r){var t=o.second(n);return function(n){return r(t(n))}})},a=new n.Newtype(function(n){return n},c),s=function(n){return new o.Strong(function(){return i(n.Profunctor0())},function(r){var t=e.unfirst(n);return function(n){return r(t(n))}},function(r){var t=e.unsecond(n);return function(n){return r(t(n))}})},d=function(n){return new t.Choice(function(){return i(n.Profunctor0())},function(r){var t=u.unleft(n);return function(n){return r(t(n))}},function(r){var t=u.unright(n);return function(n){return r(t(n))}})},v=function(n){return new u.Cochoice(function(){return i(n.Profunctor0())},function(r){var u=t.left(n);return function(n){return r(u(n))}},function(r){var u=t.right(n);return function(n){return r(u(n))}})};module.exports={Re:c,newtypeRe:a,profunctorRe:i,choiceRe:v,cochoiceRe:d,strongRe:f,costrongRe:s}; -},{"../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Profunctor.Cochoice/index.js":"FnLc","../Data.Profunctor.Costrong/index.js":"NfU6","../Data.Profunctor.Strong/index.js":"w9p6"}],"fFCp":[function(require,module,exports) { -"use strict";var n=require("../Control.Category/index.js"),r=require("../Data.Boolean/index.js"),t=require("../Data.Eq/index.js"),u=require("../Data.Function/index.js"),e=require("../Data.Functor/index.js"),i=require("../Data.Lens.Internal.Exchange/index.js"),o=require("../Data.Lens.Internal.Re/index.js"),c=require("../Data.Maybe/index.js"),f=require("../Data.Newtype/index.js"),a=require("../Data.Profunctor/index.js"),d=require("../Data.Tuple/index.js"),s=function(r){return function(t){var u=r(new i.Exchange(n.identity(n.categoryFn),n.identity(n.categoryFn)));return t(u.value0)(u.value1)}},p=function(n){return s(n)(function(n){return function(r){return function(t){return function(u){return n(t(r(u)))}}}})},l=function(r){return f.unwrap(o.newtypeRe)(r(n.identity(n.categoryFn)))},y=function(n){return function(r){return function(t){return function(u){return a.dimap(t)(n)(r)(u)}}}},m=function(n){return function(r){return function(t){return function(u){return s(t)(function(t){return function(i){return y(e.map(n)(t))(e.map(r)(i))(u)}})}}}},x=function(n){return function(u){return function(e){return y(c.fromMaybe(u))(function(e){if(t.eq(n)(e)(u))return c.Nothing.value;if(r.otherwise)return new c.Just(e);throw new Error("Failed pattern match at Data.Lens.Iso (line 45, column 9 - line 46, column 33): "+[e.constructor.name])})(e)}}},q=function(n){return y(d.uncurry)(d.curry)(n)},j=function(n){return y(u.flip)(u.flip)(n)},D=function(n){return function(r){return function(t){return function(u){return function(e){return s(t)(function(t){return function(i){return s(u)(function(u){return function(o){return y(a.dimap(n)(t)(u))(a.dimap(r)(i)(o))(e)}})}})}}}}},g=function(n){return y(d.curry)(d.uncurry)(n)},w=function(n){return function(r){return s(n)(function(n){return function(t){return function(u){return y(n)(t)(r)(u)}}})}},h=function(n){return function(r){return s(r)(function(r){return function(t){return function(u){return function(e){return function(i){return t(u(a.rmap(n)(r)(e))(i))}}}}})}},F=function(n){return s(n)(function(n){return function(r){return function(t){return function(u){return n(t(r)(u))}}}})};module.exports={iso:y,withIso:s,cloneIso:w,re:l,au:F,auf:h,under:p,non:x,curried:g,uncurried:q,flipped:j,mapping:m,dimapping:D}; -},{"../Control.Category/index.js":"IAi2","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Lens.Internal.Exchange/index.js":"eUa0","../Data.Lens.Internal.Re/index.js":"IZDD","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Tuple/index.js":"II/O"}],"CiFJ":[function(require,module,exports) { -"use strict";var e=require("../Data.Lens.Iso/index.js"),r=require("../Data.Newtype/index.js"),n=function(n){return function(t){return function(u){return e.iso(r.unwrap(n))(r.wrap(t))(u)}}};module.exports={_Newtype:n}; -},{"../Data.Lens.Iso/index.js":"fFCp","../Data.Newtype/index.js":"lz8k"}],"ONWB":[function(require,module,exports) { -"use strict";var o=function(o,e,t,s,n,i){this.Monad0=o,this.chooseBool=e,this.chooseFloat=t,this.chooseInt=s,this.resize=n,this.sized=i},e=function(o){return o.sized},t=function(o){return o.resize},s=function(o){return o.chooseInt},n=function(o){return o.chooseFloat},i=function(o){return o.chooseBool};module.exports={chooseBool:i,chooseFloat:n,chooseInt:s,resize:t,sized:e,MonadGen:o}; -},{}],"s7H0":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),e=require("../Control.Bind/index.js"),t=require("../Control.Monad.Gen.Class/index.js"),r=require("../Control.Monad.Rec.Class/index.js"),u=require("../Data.Boolean/index.js"),i=require("../Data.Foldable/index.js"),o=require("../Data.Function/index.js"),a=require("../Data.Functor/index.js"),c=require("../Data.Maybe/index.js"),l=require("../Data.Monoid.Additive/index.js"),d=require("../Data.Newtype/index.js"),f=require("../Data.Semigroup/index.js"),s=require("../Data.Semigroup.Foldable/index.js"),p=require("../Data.Semiring/index.js"),v=require("../Data.Tuple/index.js"),m=require("../Data.Unfoldable/index.js"),w=require("../Data.Unit/index.js"),M=function(){function n(n,e){this.value0=n,this.value1=e}return n.create=function(e){return function(t){return new n(e,t)}},n}(),h=function(){function n(){}return n.value=new n,n}(),F=function(n){return n},q=function(n){return n},x=function(i){return function(o){return function(l){return function(d){var f,s,p=function(t){if(t.value1<=0)return n.pure(o.Monad0().Applicative0())(new r.Done(t.value0));if(u.otherwise)return e.bind(o.Monad0().Bind1())(d)(function(e){return n.pure(o.Monad0().Applicative0())(new r.Loop(new v.Tuple(new M(e,t.value0),t.value1-1|0)))});throw new Error("Failed pattern match at Control.Monad.Gen (line 93, column 3 - line 93, column 68): "+[t.constructor.name])};return a.map(o.Monad0().Bind1().Apply0().Functor0())(m.unfoldr(l)(function(n){if(n instanceof h)return c.Nothing.value;if(n instanceof M)return new c.Just(new v.Tuple(n.value0,n.value1));throw new Error("Failed pattern match at Control.Monad.Gen (line 101, column 12 - line 103, column 35): "+[n.constructor.name])}))(t.sized(o)((f=r.tailRecM(i)(p),s=v.Tuple.create(h.value),function(n){return f(s(n))})))}}}},j=new f.Semigroup(function(n){return function(e){return function(t){var r=n(t);return r.value0 instanceof c.Just?e(r.value0.value0):r}}}),D=new f.Semigroup(function(n){return function(e){return function(t){return t<=0?n(t):e(t-1|0)}}}),b=function(n){return function(e){return v.snd(n(e))}},g=function(n){return n},A=function(n){return function(e){return e>=n.value0?new v.Tuple(new c.Just(e-n.value0),n.value1):new v.Tuple(c.Nothing.value,n.value1)}},B=function(n){return function(r){return function(u){var o=d.alaF(a.functorFn)(a.functorFn)(d.newtypeAdditive)(d.newtypeAdditive)(l.Additive)(i.foldMap(r.Foldable0())(l.monoidAdditive(p.semiringNumber)))(v.fst)(u);return e.bind(n.Monad0().Bind1())(t.chooseFloat(n)(0)(o))(b(s.foldMap1(r)(j)(A)(u)))}}},C=function(n){return function(e){return function(t){return r.tailRecM(n)(function(n){return a.mapFlipped(e.Monad0().Bind1().Apply0().Functor0())(t)(function(n){if(n instanceof c.Nothing)return new r.Loop(w.unit);if(n instanceof c.Just)return new r.Done(n.value0);throw new Error("Failed pattern match at Control.Monad.Gen (line 117, column 24 - line 119, column 23): "+[n.constructor.name])})})(w.unit)}}},y=function(n){return function(e){return function(t){return function(r){return C(n)(e)(a.mapFlipped(e.Monad0().Bind1().Apply0().Functor0())(t)(function(n){return r(n)?new c.Just(n):c.Nothing.value}))}}}},T=function(n){return function(r){return function(u){return e.bind(n.Monad0().Bind1())(t.chooseBool(n))(function(n){return n?r:u})}}},N=function(n){return q(o.const(n))},J=function(n){return function(e){return function(t){return g(s.foldMap1(n)(D)(N)(t))(e)}}},S=function(r){return function(u){return function(o){return e.bind(r.Monad0().Bind1())(t.chooseInt(r)(0)(i.length(u.Foldable0())(p.semiringInt)(o)-1|0))(function(e){return n.pure(r.Monad0().Applicative0())(J(u)(e)(o))})}}},G=function(n){return function(r){return function(u){return e.bind(n.Monad0().Bind1())(t.chooseInt(n)(0)(i.length(r.Foldable0())(p.semiringInt)(u)-1|0))(function(n){return J(r)(n)(u)})}}};module.exports={choose:T,oneOf:G,frequency:B,elements:S,unfoldable:x,suchThat:y,filtered:C}; -},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Gen.Class/index.js":"ONWB","../Control.Monad.Rec.Class/index.js":"UVIy","../Data.Boolean/index.js":"ObQr","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Monoid.Additive/index.js":"fHyj","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Semiring/index.js":"11NF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unit/index.js":"NhVk"}],"K4TW":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),r=require("../Control.Bind/index.js"),t=require("../Control.Monad.Gen/index.js"),i=require("../Control.Monad.Gen.Class/index.js"),u=require("../Data.Either/index.js"),o=require("../Data.Functor/index.js"),a=require("../Data.Identity/index.js"),d=require("../Data.Maybe/index.js"),c=require("../Data.NonEmpty/index.js"),p=require("../Data.Ord/index.js"),l=require("../Data.Tuple/index.js"),f=function(n){return e.lift2(n)(l.Tuple.create)},s=function(n){return function(r){return function(u){return function(a){return e.apply(r.Monad0().Bind1().Apply0())(o.map(r.Monad0().Bind1().Apply0().Functor0())(c.NonEmpty.create)(a))(i.resize(r)((d=p.max(p.ordInt)(0),function(n){return d(n-1|0)}))(t.unfoldable(n)(r)(u)(a)));var d}}}},y=function(e){return function(t){return function(u){return r.bind(e.Monad0().Bind1())(i.chooseFloat(e)(0)(1))(function(r){return r<t?o.map(e.Monad0().Bind1().Apply0().Functor0())(d.Just.create)(u):n.pure(e.Monad0().Applicative0())(d.Nothing.value)})}}},x=function(n){return y(n)(.75)},M=function(n){return o.map(n)(a.Identity)},j=function(n){return function(e){return function(t){return function(a){return r.bind(n.Monad0().Bind1())(i.chooseFloat(n)(0)(1))(function(r){return r<e?o.map(n.Monad0().Bind1().Apply0().Functor0())(u.Left.create)(t):o.map(n.Monad0().Bind1().Apply0().Functor0())(u.Right.create)(a)})}}}},q=function(n){return j(n)(.5)};module.exports={genEither:q,"genEither'":j,genIdentity:M,genMaybe:x,"genMaybe'":y,genTuple:f,genNonEmpty:s}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad.Gen/index.js":"s7H0","../Control.Monad.Gen.Class/index.js":"ONWB","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Maybe/index.js":"5mN7","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Tuple/index.js":"II/O"}],"iQxY":[function(require,module,exports) { -"use strict";exports.fold1Impl=function(n){return function(r){for(var t=r[0],u=r.length,e=1;e<u;e++)t=n(t)(r[e]);return t}},exports.traverse1Impl=function(){function n(n){this.fn=n}var r={},t=function(n,r){this.head=n,this.tail=r};function u(n){return new t(n,r)}function e(n){return function(r){return new t(n,r)}}function f(n){for(var t=[],u=n;u!==r;)t.push(u.head),u=u.tail;return t}return function(r){return function(t){return function(i){var o=function u(f,o,c){if(0===o)return f;var a=c[o-1];return new n(function(){var n,s;return u((n=a,s=f,r(t(e)(i(n)))(s)),o-1,c)})};return function(r){for(var e=t(u)(i(r[r.length-1])),c=o(e,r.length-1,r);c instanceof n;)c=c.fn();return t(f)(c)}}}}}(); -},{}],"PmFL":[function(require,module,exports) { -"use strict";var r=require("./foreign.js"),e=require("../Control.Alt/index.js"),a=require("../Control.Applicative/index.js"),n=require("../Control.Apply/index.js"),t=require("../Control.Bind/index.js"),o=require("../Control.Monad/index.js"),i=require("../Data.Eq/index.js"),y=require("../Data.Foldable/index.js"),u=require("../Data.FoldableWithIndex/index.js"),l=require("../Data.Functor/index.js"),d=require("../Data.FunctorWithIndex/index.js"),p=require("../Data.Ord/index.js"),A=require("../Data.Semigroup/index.js"),s=require("../Data.Semigroup.Foldable/index.js"),m=require("../Data.Semigroup.Traversable/index.js"),f=require("../Data.Show/index.js"),x=require("../Data.Traversable/index.js"),q=require("../Data.TraversableWithIndex/index.js"),c=require("../Data.Unfoldable1/index.js"),b=function(r){return r},E=c.unfoldable1Array,N=q.traversableWithIndexArray,j=x.traversableArray,D=function(r){return new f.Show(function(e){return"(NonEmptyArray "+f.show(f.showArray(r))(e)+")"})},h=A.semigroupArray,v=function(r){return p.ordArray(r)},I=p.ord1Array,W=o.monadArray,w=d.functorWithIndexArray,F=l.functorArray,g=u.foldableWithIndexArray,C=y.foldableArray,S=new s.Foldable1(function(){return C},function(e){return r.fold1Impl(A.append(e))},function(r){return s.foldMap1Default(S)(F)(r)}),T=new m.Traversable1(function(){return S},function(){return j},function(r){return m.sequence1Default(T)(r)},function(e){return r.traverse1Impl(n.apply(e))(l.map(e.Functor0()))}),M=function(r){return i.eqArray(r)},B=i.eq1Array,O=t.bindArray,U=n.applyArray,k=a.applicativeArray,z=e.altArray;module.exports={showNonEmptyArray:D,eqNonEmptyArray:M,eq1NonEmptyArray:B,ordNonEmptyArray:v,ord1NonEmptyArray:I,semigroupNonEmptyArray:h,functorNonEmptyArray:F,functorWithIndexNonEmptyArray:w,foldableNonEmptyArray:C,foldableWithIndexNonEmptyArray:g,foldable1NonEmptyArray:S,unfoldable1NonEmptyArray:E,traversableNonEmptyArray:j,traversableWithIndexNonEmptyArray:N,traversable1NonEmptyArray:T,applyNonEmptyArray:U,applicativeNonEmptyArray:k,bindNonEmptyArray:O,monadNonEmptyArray:W,altNonEmptyArray:z}; -},{"./foreign.js":"iQxY","../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Unfoldable1/index.js":"S0Nl"}],"ETUV":[function(require,module,exports) { -"use strict";var e=require("./foreign.js");module.exports={unsafeCoerce:e.unsafeCoerce}; -},{"./foreign.js":"AvJb"}],"eTKN":[function(require,module,exports) { -"use strict";var n=require("../Control.Bind/index.js"),t=require("../Data.Array/index.js"),r=require("../Data.Array.NonEmpty.Internal/index.js"),e=require("../Data.Bifunctor/index.js"),u=require("../Data.Boolean/index.js"),i=require("../Data.Eq/index.js"),o=require("../Data.Function/index.js"),c=require("../Data.Functor/index.js"),f=require("../Data.Maybe/index.js"),a=require("../Data.NonEmpty/index.js"),d=require("../Data.Ord/index.js"),s=require("../Data.Semigroup/index.js"),l=require("../Data.Tuple/index.js"),p=require("../Data.Unfoldable1/index.js"),y=require("../Unsafe.Coerce/index.js"),m=y.unsafeCoerce,x=y.unsafeCoerce,A=y.unsafeCoerce,b=function(n){return function(r){var e=t.unionBy(n)(A(r));return function(n){return x(e(n))}}},q=function(n){return b(i.eq(n))},v=function(n){return function(t){var r=b(n)(t);return function(n){return r(A(n))}}},h=function(n){return v(i.eq(n))},B=function(){var n=e.bimap(l.bifunctorTuple)(x)(x);return function(r){return n(t.unzip(A(r)))}}(),E=function(n){return function(r){var e=t.updateAt(n)(r);return function(n){return m(e(A(n)))}}},I=function(n){return function(r){return x(t.zip(A(n))(A(r)))}},j=function(n){return function(r){return function(e){return x(t.zipWith(n)(A(r))(A(e)))}}},D=function(n){return function(r){return function(e){return function(u){return m(t.zipWithA(n)(r)(A(e))(A(u)))}}}},g=function(n){return function(r){var e=t.some(n)(r);return function(n){return m(e(n))}}},M=function(n){return function(r){return x(t.snoc(n)(r))}},N=function(n){return function(r){return x(t.snoc(A(n))(r))}},W=function(n){return x(t.singleton(n))},z=function(n){return function(r){return x(t.replicate(d.max(d.ordInt)(1)(n))(r))}},F=function(n){return function(r){return x(t.range(n)(r))}},k=function(n){return function(r){var e=t.modifyAt(n)(r);return function(n){return m(e(A(n)))}}},w=function(n){return function(r){return t.intersectBy(n)(A(r))}},C=function(n){return function(t){var r=w(n)(t);return function(n){return r(A(n))}}},U=function(n){return w(i.eq(n))},L=function(n){return C(i.eq(n))},J=function(n){return function(r){var e=t.insertAt(n)(r);return function(n){return m(e(A(n)))}}},T=function(n){var r=t.fromFoldable(n.Foldable0());return function(n){return x(r(n))}},R=function(n){if(t.length(n)>0)return new f.Just(x(n));if(u.otherwise)return f.Nothing.value;throw new Error("Failed pattern match at Data.Array.NonEmpty (line 134, column 1 - line 134, column 58): "+[n.constructor.name])},O=function(n){var r=t.fromFoldable(n);return function(n){return R(r(n))}},S=function(n){return function(r){return t.difference(n)(A(r))}},G=function(n){return function(r){return x(t.cons(n)(r))}},H=function(n){return G(n.value0)(n.value1)},K=o.flip(n.bind(r.bindNonEmptyArray)),P=function(){var n=c.map(r.functorNonEmptyArray)(A);return function(r){return x(t.concat(A(n(r))))}}(),Q=function(n){return function(t){return x(s.append(s.semigroupArray)(A(n))(t))}},V=function(n){return function(r){var e=t.alterAt(n)(r);return function(n){return e(A(n))}}},X=function(n){var t=f.fromJust();return function(r){return t(n(A(r)))}},Y=X(t.head),Z=X(t.init),$=X(t.last),_=X(t.tail),nn=X(t.uncons),tn=function(n){return t=nn(n),new a.NonEmpty(t.head,t.tail);var t},rn=X(t.unsnoc),en=function(n){return function(t){return n(A(t))}},un=en(t.catMaybes),on=function(n){return function(r){return en(t.delete(n)(r))}},cn=function(n){return en(t.deleteAt(n))},fn=function(n){return function(r){return en(t.deleteBy(n)(r))}},an=function(n){return function(t){return en(S(n)(t))}},dn=function(n){return en(t.drop(n))},sn=function(n){return en(t.dropEnd(n))},ln=function(n){return en(t.dropWhile(n))},pn=function(n){return function(r){return en(t.elemIndex(n)(r))}},yn=function(n){return function(r){return en(t.elemLastIndex(n)(r))}},mn=function(n){return en(t.filter(n))},xn=function(n){return function(r){return en(t.filterA(n)(r))}},An=function(n){return en(t.findIndex(n))},bn=function(n){return en(t.findLastIndex(n))},qn=function(n){return function(r){return function(e){return en(t.foldM(n)(r)(e))}}},vn=function(n){return function(r){return function(e){return en(t.foldRecM(n)(r)(e))}}},hn=en(t.index),Bn=en(t.length),En=function(n){return en(t.mapMaybe(n))},In=function(n){return en(t.partition(n))},jn=function(n){return function(r){return en(t.slice(n)(r))}},Dn=function(n){return en(t.span(n))},gn=function(n){return en(t.take(n))},Mn=function(n){return en(t.takeEnd(n))},Nn=function(n){return en(t.takeWhile(n))},Wn=function(n){return en(t.toUnfoldable(n))},zn=function(n){var t=en(n);return function(n){return x(t(n))}},Fn=function(n){return zn(t.cons(n))},kn=function(n){return function(r){return zn(t.insert(n)(r))}},wn=function(n){return function(r){return zn(t.insertBy(n)(r))}},Cn=function(n){return function(r){return function(e){return zn(t.modifyAtIndices(n)(r)(e))}}},Un=function(n){return zn(t.nub(n))},Ln=function(n){return zn(t.nubBy(n))},Jn=function(n){return zn(t.nubByEq(n))},Tn=function(n){return zn(t.nubEq(n))},Rn=zn(t.reverse),On=function(n){return zn(t.sort(n))},Sn=function(n){return zn(t.sortBy(n))},Gn=function(n){return function(r){return zn(t.sortWith(n)(r))}},Hn=function(n){return function(r){return zn(t.updateAtIndices(n)(r))}},Kn=function(n){return en(t.unsafeIndex(n))},Pn=function(n){return function(t){var r=Bn(t);return p.unfoldr1(n)(function(n){return l.Tuple.create(Kn()(t)(n))(n<(r-1|0)?new f.Just(n+1|0):f.Nothing.value)})(0)}};module.exports={fromArray:R,fromNonEmpty:H,toArray:A,toNonEmpty:tn,fromFoldable:O,fromFoldable1:T,toUnfoldable:Wn,toUnfoldable1:Pn,singleton:W,range:F,replicate:z,some:g,length:Bn,cons:Fn,"cons'":G,snoc:N,"snoc'":M,appendArray:Q,insert:kn,insertBy:wn,head:Y,last:$,tail:_,init:Z,uncons:nn,unsnoc:rn,index:hn,elemIndex:pn,elemLastIndex:yn,findIndex:An,findLastIndex:bn,insertAt:J,deleteAt:cn,updateAt:E,updateAtIndices:Hn,modifyAt:k,modifyAtIndices:Cn,alterAt:V,reverse:Rn,concat:P,concatMap:K,filter:mn,partition:In,filterA:xn,mapMaybe:En,catMaybes:un,sort:On,sortBy:Sn,sortWith:Gn,slice:jn,take:gn,takeEnd:Mn,takeWhile:Nn,drop:dn,dropEnd:sn,dropWhile:ln,span:Dn,nub:Un,nubBy:Ln,nubEq:Tn,nubByEq:Jn,union:h,"union'":q,unionBy:v,"unionBy'":b,delete:on,deleteBy:fn,difference:an,"difference'":S,intersect:L,"intersect'":U,intersectBy:C,"intersectBy'":w,zipWith:j,zipWithA:D,zip:I,unzip:B,foldM:qn,foldRecM:vn,unsafeIndex:Kn}; -},{"../Control.Bind/index.js":"7VcT","../Data.Array/index.js":"4t4C","../Data.Array.NonEmpty.Internal/index.js":"PmFL","../Data.Bifunctor/index.js":"e2Wc","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O","../Data.Unfoldable1/index.js":"S0Nl","../Unsafe.Coerce/index.js":"ETUV"}],"Yzse":[function(require,module,exports) { -"use strict";exports.toCharCode=function(r){return r.charCodeAt(0)},exports.fromCharCode=function(r){return String.fromCharCode(r)}; -},{}],"oOsU":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),t=require("../Control.Apply/index.js"),e=require("../Control.Bind/index.js"),r=require("../Control.MonadZero/index.js"),u=require("../Data.Boolean/index.js"),o=require("../Data.Bounded/index.js"),i=require("../Data.Either/index.js"),a=require("../Data.Eq/index.js"),c=require("../Data.Function/index.js"),f=require("../Data.Functor/index.js"),l=require("../Data.Maybe/index.js"),d=require("../Data.Newtype/index.js"),m=require("../Data.Ord/index.js"),s=require("../Data.Ordering/index.js"),h=require("../Data.Show/index.js"),w=require("../Data.Tuple/index.js"),E=require("../Data.Unfoldable/index.js"),v=require("../Data.Unfoldable1/index.js"),p=require("../Data.Unit/index.js"),b=function(n){return n},g=function(n,t,e){this.Ord0=n,this.pred=t,this.succ=e},J=function(n,t,e,r,u){this.Bounded0=n,this.Enum1=t,this.cardinality=e,this.fromEnum=r,this.toEnum=u},y=function(n){return n.toEnum},D=function(n){return n.succ},T=function(n){return function(e){return v.unfoldr1(e)(t.apply(t.applyFn)(w.Tuple.create)(D(n)))}},C=new h.Show(function(n){return"(Cardinality "+h.show(h.showInt)(n)+")"}),q=function(n){return n.pred},N=m.ordInt,F=new d.Newtype(function(n){return n},b),j=function(n){return n.fromEnum},x=function(n){return function(t){return function(e){return function(r){var u=y(n)(r);if(u instanceof l.Just)return u.value0;if(u instanceof l.Nothing)return r<j(n)(o.bottom(n.Bounded0()))?t:e;throw new Error("Failed pattern match at Data.Enum (line 158, column 33 - line 160, column 62): "+[u.constructor.name])}}}},O=a.eqInt,B=new g(function(){return m.ordUnit},c.const(l.Nothing.value),c.const(l.Nothing.value)),M=function(n){return function(t){return new g(function(){return w.ordTuple(n.Ord0())(t.Enum1().Ord0())},function(e){return l.maybe(f.map(l.functorMaybe)(c.flip(w.Tuple.create)(o.top(t.Bounded0())))(q(n)(e.value0)))((r=w.Tuple.create(e.value0),function(n){return l.Just.create(r(n))}))(q(t.Enum1())(e.value1));var r},function(e){return l.maybe(f.map(l.functorMaybe)(c.flip(w.Tuple.create)(o.bottom(t.Bounded0())))(D(n)(e.value0)))((r=w.Tuple.create(e.value0),function(n){return l.Just.create(r(n))}))(D(t.Enum1())(e.value1));var r})}},I=new g(function(){return m.ordOrdering},function(n){if(n instanceof s.LT)return l.Nothing.value;if(n instanceof s.EQ)return new l.Just(s.LT.value);if(n instanceof s.GT)return new l.Just(s.EQ.value);throw new Error("Failed pattern match at Data.Enum (line 72, column 1 - line 78, column 20): "+[n.constructor.name])},function(n){if(n instanceof s.LT)return new l.Just(s.EQ.value);if(n instanceof s.EQ)return new l.Just(s.GT.value);if(n instanceof s.GT)return l.Nothing.value;throw new Error("Failed pattern match at Data.Enum (line 72, column 1 - line 78, column 20): "+[n.constructor.name])}),L=function(n){return new g(function(){return l.ordMaybe(n.Enum1().Ord0())},function(t){if(t instanceof l.Nothing)return l.Nothing.value;if(t instanceof l.Just)return new l.Just(q(n.Enum1())(t.value0));throw new Error("Failed pattern match at Data.Enum (line 80, column 1 - line 84, column 32): "+[t.constructor.name])},function(t){if(t instanceof l.Nothing)return new l.Just(new l.Just(o.bottom(n.Bounded0())));if(t instanceof l.Just)return f.map(l.functorMaybe)(l.Just.create)(D(n.Enum1())(t.value0));throw new Error("Failed pattern match at Data.Enum (line 80, column 1 - line 84, column 32): "+[t.constructor.name])})},U=new g(function(){return m.ordInt},function(n){return n>o.bottom(o.boundedInt)?new l.Just(n-1|0):l.Nothing.value},function(n){return n<o.top(o.boundedInt)?new l.Just(n+1|0):l.Nothing.value}),Q=function(n){return function(t){var o=function(n){return function(t){return function(u){return function(o){return new w.Tuple(o,e.bind(l.bindMaybe)(n(o))(function(n){return f.voidLeft(l.functorMaybe)(r.guard(l.monadZeroMaybe)(t(n)(u)))(n)}))}}}};return function(e){return function(r){if(a.eq(n.Ord0().Eq0())(e)(r))return v.singleton(t)(e);if(m.lessThan(n.Ord0())(e)(r))return v.unfoldr1(t)(o(D(n))(m.lessThanOrEq(n.Ord0()))(r))(e);if(u.otherwise)return v.unfoldr1(t)(o(q(n))(m.greaterThanOrEq(n.Ord0()))(r))(e);throw new Error("Failed pattern match at Data.Enum (line 183, column 14 - line 187, column 51): "+[e.constructor.name,r.constructor.name])}}}},G=function(n){return function(t){return function(e){return function(r){return function(o){return function(i){var a,c,d,m=j(e)(i),s=j(e)(o),h=j(e)(r);return f.map(t)((c=l.fromJust(),d=y(e),function(n){return c(d(n))}))(E.unfoldr(n)((a=s-h|0,function(n){return function(t){if(t<=n)return new l.Just(new w.Tuple(t,t+a|0));if(u.otherwise)return l.Nothing.value;throw new Error("Failed pattern match at Data.Enum (line 214, column 5 - line 216, column 28): "+[a.constructor.name,n.constructor.name,t.constructor.name])}})(m))(h))}}}}}},R=function(n){return function(t){return new g(function(){return i.ordEither(n.Enum1().Ord0())(t.Enum1().Ord0())},function(e){if(e instanceof i.Left)return l.maybe(l.Nothing.value)(function(n){return l.Just.create(i.Left.create(n))})(q(n.Enum1())(e.value0));if(e instanceof i.Right)return l.maybe(new l.Just(new i.Left(o.top(n.Bounded0()))))(function(n){return l.Just.create(i.Right.create(n))})(q(t.Enum1())(e.value0));throw new Error("Failed pattern match at Data.Enum (line 86, column 1 - line 90, column 69): "+[e.constructor.name])},function(e){if(e instanceof i.Left)return l.maybe(new l.Just(new i.Right(o.bottom(t.Bounded0()))))(function(n){return l.Just.create(i.Left.create(n))})(D(n.Enum1())(e.value0));if(e instanceof i.Right)return l.maybe(l.Nothing.value)(function(n){return l.Just.create(i.Right.create(n))})(D(t.Enum1())(e.value0));throw new Error("Failed pattern match at Data.Enum (line 86, column 1 - line 90, column 69): "+[e.constructor.name])})}},S=new g(function(){return m.ordBoolean},function(n){return n?new l.Just(!1):l.Nothing.value},function(n){return n?l.Nothing.value:new l.Just(!0)}),Z=function(n){return function(e){return v.unfoldr1(e)(t.apply(t.applyFn)(w.Tuple.create)(q(n)))}},A=function(n){return new w.Tuple(n,n)},P=function(n){return function(t){return E.unfoldr(t)((e=f.map(l.functorMaybe)(A),r=q(n),function(n){return e(r(n))}));var e,r}},W=function(n){return function(t){return E.unfoldr(t)((e=f.map(l.functorMaybe)(A),r=D(n),function(n){return e(r(n))}));var e,r}},k=function(n){return function(t){return function(e){var r;return e<0?l.Nothing.value:(r=e,function(n){var e,u=r,o=!1;function i(e,r){if(0===e)return o=!0,new l.Just(r);var i=D(t)(r);if(i instanceof l.Just)return u=e-1|0,void(n=i.value0);if(i instanceof l.Nothing)return o=!0,l.Nothing.value;throw new Error("Failed pattern match at Data.Enum (line 293, column 12 - line 295, column 33): "+[i.constructor.name])}for(;!o;)e=i(u,n);return e})(o.bottom(n))}}},z=function(n){return function(t){return function(e){return n(t(e)+1|0)}}},H=function(n){return function(t){return function(e){return n(t(e)-1|0)}}},K=function(n){var t;return t=0,function(e){var r,u=t,o=!1;function i(t,r){var i=q(n)(r);if(i instanceof l.Just)return u=t+1|0,void(e=i.value0);if(i instanceof l.Nothing)return o=!0,t;throw new Error("Failed pattern match at Data.Enum (line 306, column 5 - line 308, column 19): "+[i.constructor.name])}for(;!o;)r=i(u,e);return r}},V=function(n){return function(t){var e;return b((e=1,function(n){var r,u=e,o=!1;function i(e,r){var i=D(t)(r);if(i instanceof l.Just)return u=e+1|0,void(n=i.value0);if(i instanceof l.Nothing)return o=!0,e;throw new Error("Failed pattern match at Data.Enum (line 273, column 5 - line 275, column 19): "+[i.constructor.name])}for(;!o;)r=i(u,n);return r})(o.bottom(n)))}},X=function(t){return t>=o.bottom(o.boundedInt)&&t<=o.top(o.boundedInt)?new l.Just(n.fromCharCode(t)):l.Nothing.value},Y=new g(function(){return m.ordChar},H(X)(n.toCharCode),z(X)(n.toCharCode)),$=function(n){return n.cardinality},_=new J(function(){return o.boundedUnit},function(){return B},1,c.const(0),function(n){return 0===n?new l.Just(p.unit):l.Nothing.value}),nn=new J(function(){return o.boundedOrdering},function(){return I},3,function(n){if(n instanceof s.LT)return 0;if(n instanceof s.EQ)return 1;if(n instanceof s.GT)return 2;throw new Error("Failed pattern match at Data.Enum (line 137, column 1 - line 145, column 18): "+[n.constructor.name])},function(n){return 0===n?new l.Just(s.LT.value):1===n?new l.Just(s.EQ.value):2===n?new l.Just(s.GT.value):l.Nothing.value}),tn=new J(function(){return o.boundedChar},function(){return Y},n.toCharCode(o.top(o.boundedChar))-n.toCharCode(o.bottom(o.boundedChar))|0,n.toCharCode,X),en=new J(function(){return o.boundedBoolean},function(){return S},2,function(n){if(!n)return 0;if(n)return 1;throw new Error("Failed pattern match at Data.Enum (line 118, column 1 - line 124, column 20): "+[n.constructor.name])},function(n){return 0===n?new l.Just(!1):1===n?new l.Just(!0):l.Nothing.value});module.exports={Enum:g,succ:D,pred:q,BoundedEnum:J,cardinality:$,toEnum:y,fromEnum:j,toEnumWithDefaults:x,Cardinality:b,enumFromTo:Q,enumFromThenTo:G,upFrom:W,upFromIncluding:T,downFrom:P,downFromIncluding:Z,defaultSucc:z,defaultPred:H,defaultCardinality:V,defaultToEnum:k,defaultFromEnum:K,enumBoolean:S,enumInt:U,enumChar:Y,enumUnit:B,enumOrdering:I,enumMaybe:L,enumEither:R,enumTuple:M,boundedEnumBoolean:en,boundedEnumChar:tn,boundedEnumUnit:_,boundedEnumOrdering:nn,newtypeCardinality:F,eqCardinality:O,ordCardinality:N,showCardinality:C}; -},{"./foreign.js":"Yzse","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.MonadZero/index.js":"lD5R","../Data.Boolean/index.js":"ObQr","../Data.Bounded/index.js":"kcUU","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unfoldable1/index.js":"S0Nl","../Data.Unit/index.js":"NhVk"}],"EM+K":[function(require,module,exports) { -"use strict";var n=require("../Data.Array.NonEmpty/index.js"),r=require("../Data.Maybe/index.js"),t=require("../Data.Semigroup.Foldable/index.js"),e=require("../Data.String.CodeUnits/index.js"),u=require("../Data.String.NonEmpty.Internal/index.js"),o=require("../Data.String.Unsafe/index.js"),i=require("../Unsafe.Coerce/index.js"),a=i.unsafeCoerce,f=function(n){return function(r){return a(r+e.singleton(n))}},c=function(n){return a(e.singleton(n))},s=i.unsafeCoerce,l=function(n){var r=s(e.takeWhile(n));return function(n){return u.fromString(r(n))}},h=function(n){var r=e["lastIndexOf'"](n);return function(n){return s(r(n))}},g=function(n){return s(e.lastIndexOf(n))},d=function(n){var r=e["indexOf'"](n);return function(n){return s(r(n))}},m=function(n){return s(e.indexOf(n))},v=i.unsafeCoerce,x=function(n){return e.length(v(n))},p=function(n){return function(r){var t=e.splitAt(n)(v(r));return{before:u.fromString(t.before),after:u.fromString(t.after)}}},y=function(n){return function(t){var u=v(t);return n<1?r.Nothing.value:new r.Just(a(e.take(n)(u)))}},A=function(n){return function(t){var u=v(t);return n<1?r.Nothing.value:new r.Just(a(e.takeRight(n)(u)))}},C=function(n){return e.toChar(v(n))},N=function(n){return e.toCharArray(v(n))},S=function(){var t=r.fromJust();return function(r){return t(n.fromArray(N(r)))}}(),O=function(n){var r=v(n);return{head:o.charAt(0)(r),tail:u.fromString(e.drop(1)(r))}},j=function(n){var r=t.fold1(n)(u.semigroupNonEmptyString);return function(n){return r(n)}},q=function(n){return 0===n.length?r.Nothing.value:new r.Just(a(e.fromCharArray(n)))},J=function(){var t=r.fromJust();return function(r){return t(q(n.toArray(r)))}}(),k=function(n){var r=s(e.dropWhile(n));return function(n){return u.fromString(r(n))}},D=function(n){return function(t){var u=v(t);return n>=e.length(u)?r.Nothing.value:new r.Just(a(e.dropRight(n)(u)))}},b=function(n){return function(t){var u=v(t);return n>=e.length(u)?r.Nothing.value:new r.Just(a(e.drop(n)(u)))}},w=function(n){return s(e.countPrefix(n))},E=function(n){return function(r){return a(e.singleton(n)+r)}},I=function(n){return s(e.charAt(n))};module.exports={fromCharArray:q,fromNonEmptyCharArray:J,singleton:c,cons:E,snoc:f,fromFoldable1:j,toCharArray:N,toNonEmptyCharArray:S,charAt:I,toChar:C,indexOf:m,"indexOf'":d,lastIndexOf:g,"lastIndexOf'":h,uncons:O,length:x,take:y,takeRight:A,takeWhile:l,drop:b,dropRight:D,dropWhile:k,countPrefix:w,splitAt:p}; -},{"../Data.Array.NonEmpty/index.js":"eTKN","../Data.Maybe/index.js":"5mN7","../Data.Semigroup.Foldable/index.js":"ht+A","../Data.String.CodeUnits/index.js":"6c6X","../Data.String.NonEmpty.Internal/index.js":"Ph6A","../Data.String.Unsafe/index.js":"5UWM","../Unsafe.Coerce/index.js":"ETUV"}],"nKWe":[function(require,module,exports) { -"use strict";var n=require("../Data.Eq/index.js"),e=require("../Data.Newtype/index.js"),t=require("../Data.Ord/index.js"),r=require("../Data.Show/index.js"),u=function(n){return n},o=function(n){return n},i=new r.Show(function(n){return"(Replacement "+r.show(r.showString)(n)+")"}),c=new r.Show(function(n){return"(Pattern "+r.show(r.showString)(n)+")"}),a=new e.Newtype(function(n){return n},u),w=new e.Newtype(function(n){return n},o),f=new n.Eq(function(n){return function(e){return n===e}}),p=new t.Ord(function(){return f},function(n){return function(e){return t.compare(t.ordString)(n)(e)}}),s=new n.Eq(function(n){return function(e){return n===e}}),d=new t.Ord(function(){return s},function(n){return function(e){return t.compare(t.ordString)(n)(e)}});module.exports={Pattern:o,Replacement:u,eqPattern:s,ordPattern:d,newtypePattern:w,showPattern:c,eqReplacement:f,ordReplacement:p,newtypeReplacement:a,showReplacement:i}; -},{"../Data.Eq/index.js":"Pq4F","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7"}],"3koD":[function(require,module,exports) { -"use strict";exports.unsafeUnionFn=function(r,n){var a={};for(var o in n)({}).hasOwnProperty.call(n,o)&&(a[o]=n[o]);for(var t in r)({}).hasOwnProperty.call(r,t)&&(a[t]=r[t]);return a}; -},{}],"cB+g":[function(require,module,exports) { -"use strict";exports.mkFn0=function(n){return function(){return n({})}},exports.mkFn2=function(n){return function(r,t){return n(r)(t)}},exports.mkFn3=function(n){return function(r,t,u){return n(r)(t)(u)}},exports.mkFn4=function(n){return function(r,t,u,e){return n(r)(t)(u)(e)}},exports.mkFn5=function(n){return function(r,t,u,e,o){return n(r)(t)(u)(e)(o)}},exports.mkFn6=function(n){return function(r,t,u,e,o,c){return n(r)(t)(u)(e)(o)(c)}},exports.mkFn7=function(n){return function(r,t,u,e,o,c,i){return n(r)(t)(u)(e)(o)(c)(i)}},exports.mkFn8=function(n){return function(r,t,u,e,o,c,i,f){return n(r)(t)(u)(e)(o)(c)(i)(f)}},exports.mkFn9=function(n){return function(r,t,u,e,o,c,i,f,s){return n(r)(t)(u)(e)(o)(c)(i)(f)(s)}},exports.mkFn10=function(n){return function(r,t,u,e,o,c,i,f,s,p){return n(r)(t)(u)(e)(o)(c)(i)(f)(s)(p)}},exports.runFn0=function(n){return n()},exports.runFn2=function(n){return function(r){return function(t){return n(r,t)}}},exports.runFn3=function(n){return function(r){return function(t){return function(u){return n(r,t,u)}}}},exports.runFn4=function(n){return function(r){return function(t){return function(u){return function(e){return n(r,t,u,e)}}}}},exports.runFn5=function(n){return function(r){return function(t){return function(u){return function(e){return function(o){return n(r,t,u,e,o)}}}}}},exports.runFn6=function(n){return function(r){return function(t){return function(u){return function(e){return function(o){return function(c){return n(r,t,u,e,o,c)}}}}}}},exports.runFn7=function(n){return function(r){return function(t){return function(u){return function(e){return function(o){return function(c){return function(i){return n(r,t,u,e,o,c,i)}}}}}}}},exports.runFn8=function(n){return function(r){return function(t){return function(u){return function(e){return function(o){return function(c){return function(i){return function(f){return n(r,t,u,e,o,c,i,f)}}}}}}}}},exports.runFn9=function(n){return function(r){return function(t){return function(u){return function(e){return function(o){return function(c){return function(i){return function(f){return function(s){return n(r,t,u,e,o,c,i,f,s)}}}}}}}}}},exports.runFn10=function(n){return function(r){return function(t){return function(u){return function(e){return function(o){return function(c){return function(i){return function(f){return function(s){return function(p){return n(r,t,u,e,o,c,i,f,s,p)}}}}}}}}}}}; -},{}],"TowT":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),F=function(n){return n},r=function(n){return n};module.exports={mkFn1:r,runFn1:F,mkFn0:n.mkFn0,mkFn2:n.mkFn2,mkFn3:n.mkFn3,mkFn4:n.mkFn4,mkFn5:n.mkFn5,mkFn6:n.mkFn6,mkFn7:n.mkFn7,mkFn8:n.mkFn8,mkFn9:n.mkFn9,mkFn10:n.mkFn10,runFn0:n.runFn0,runFn2:n.runFn2,runFn3:n.runFn3,runFn4:n.runFn4,runFn5:n.runFn5,runFn6:n.runFn6,runFn7:n.runFn7,runFn8:n.runFn8,runFn9:n.runFn9,runFn10:n.runFn10}; -},{"./foreign.js":"cB+g"}],"WmUk":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),e=require("../Data.Function.Uncurried/index.js"),i=e.runFn2(n.unsafeUnionFn);module.exports={unsafeUnion:i,unsafeUnionFn:n.unsafeUnionFn}; -},{"./foreign.js":"3koD","../Data.Function.Uncurried/index.js":"TowT"}],"0gG4":[function(require,module,exports) { -"use strict";var n=require("../Data.Eq/index.js"),r=require("../Data.Symbol/index.js"),u=require("../Record.Unsafe/index.js"),t=require("../Record.Unsafe.Union/index.js"),e=require("../Type.Data.RowList/index.js"),i=require("../Unsafe.Coerce/index.js"),o=function(n){this.equalFields=n},f=function(n){return function(n){return function(r){return t.unsafeUnionFn(n,r)}}},c=function(n){return function(t){return function(t){return function(t){return function(e){return function(i){return u.unsafeSet(r.reflectSymbol(n)(t))(e)(i)}}}}}},s=function(n){return i.unsafeCoerce},a=function(n){return function(n){return function(n){return function(r){return t.unsafeUnionFn(n,r)}}}},l=function(n){return function(t){return function(t){return function(t){return function(e){return function(i){return u.unsafeSet(r.reflectSymbol(n)(t))(e)(i)}}}}}},d=function(n){return function(t){return function(t){return function(e){return u.unsafeGet(r.reflectSymbol(n)(t))(e)}}}},q=function(n){return function(r){return function(u){return function(t){return function(e){return function(i){return c(n)(r)(u)(t)(e(d(n)(r)(t)(i)))(i)}}}}}},x=new o(function(n){return function(n){return function(n){return!0}}}),y=function(n){return n.equalFields},m=function(u){return function(t){return function(i){return function(f){return new o(function(o){return function(o){return function(c){var s=d(u)(i)(r.SProxy.value),a=y(f)(e.RLProxy.value);return n.eq(t)(s(o))(s(c))&&a(o)(c)}}})}}}},F=function(n){return function(n){return function(r){return function(u){return y(n)(e.RLProxy.value)(r)(u)}}}},S=function(n){return function(n){return function(n){return function(r){return t.unsafeUnionFn(n,r)}}}},U=function(n){return function(t){return function(t){return function(t){return function(e){return u.unsafeDelete(r.reflectSymbol(n)(t))(e)}}}}},j=function(n){return function(r){return function(u){return function(t){return function(e){return function(i){return function(o){return function(f){return function(c){return l(r)(i)(e)(f)(d(n)(u)(o)(c))(U(n)(t)(u)(o)(c))}}}}}}}}};module.exports={get:d,set:c,modify:q,insert:l,delete:U,rename:j,equal:F,merge:a,union:f,disjointUnion:S,nub:s,EqualFields:o,equalFields:y,equalFieldsCons:m,equalFieldsNil:x}; -},{"../Data.Eq/index.js":"Pq4F","../Data.Symbol/index.js":"4oJQ","../Record.Unsafe/index.js":"KG04","../Record.Unsafe.Union/index.js":"WmUk","../Type.Data.RowList/index.js":"XaXP","../Unsafe.Coerce/index.js":"ETUV"}],"/s47":[function(require,module,exports) { -"use strict";exports.float32ToInt32=function(r){var t=new ArrayBuffer(4),n=new Float32Array(t),e=new Int32Array(t);return n[0]=r,e[0]}; -},{}],"IpNh":[function(require,module,exports) { -"use strict";var t=function(t,n){this.Monad0=t,this.callCC=n},n=function(t){return t.callCC};module.exports={MonadCont:t,callCC:n}; -},{}],"OvLS":[function(require,module,exports) { -"use strict";exports.showErrorImpl=function(r){return r.stack||r.toString()},exports.error=function(r){return new Error(r)},exports.message=function(r){return r.message},exports.name=function(r){return r.name||"Error"},exports.stackImpl=function(r){return function(t){return function(n){return n.stack?r(n.stack):t}}},exports.throwException=function(r){return function(){throw r}},exports.catchException=function(r){return function(t){return function(){try{return t()}catch(n){return n instanceof Error||"[object Error]"===Object.prototype.toString.call(n)?r(n)():r(new Error(n.toString()))()}}}}; -},{}],"0OCW":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),r=require("../Control.Applicative/index.js"),t=require("../Data.Either/index.js"),i=require("../Data.Functor/index.js"),o=require("../Data.Maybe/index.js"),n=require("../Data.Show/index.js"),a=require("../Effect/index.js"),c=function(o){return e.catchException((n=r.pure(a.applicativeEffect),function(e){return n(t.Left.create(e))}))(i.map(a.functorEffect)(t.Right.create)(o));var n},u=function(r){return e.throwException(e.error(r))},s=e.stackImpl(o.Just.create)(o.Nothing.value),p=new n.Show(e.showErrorImpl);module.exports={stack:s,throw:u,try:c,showError:p,error:e.error,message:e.message,name:e.name,throwException:e.throwException,catchException:e.catchException}; -},{"./foreign.js":"OvLS","../Control.Applicative/index.js":"qYya","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Show/index.js":"mFY7","../Effect/index.js":"oTWB"}],"L8Lk":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Bind/index.js"),t=require("../Data.Either/index.js"),o=require("../Data.Function/index.js"),e=require("../Data.Functor/index.js"),i=require("../Data.Maybe/index.js"),u=require("../Data.Unit/index.js"),a=require("../Effect/index.js"),c=require("../Effect.Exception/index.js"),f=function(n,r){this.Monad0=n,this.throwError=r},d=function(n,r){this.MonadThrow0=n,this.catchError=r},h=function(n){return n.throwError},s=new f(function(){return i.monadMaybe},o.const(i.Nothing.value)),l=new f(function(){return t.monadEither},t.Left.create),w=new f(function(){return a.monadEffect},c.throwException),E=new d(function(){return s},function(n){return function(r){if(n instanceof i.Nothing)return r(u.unit);if(n instanceof i.Just)return new i.Just(n.value0);throw new Error("Failed pattern match at Control.Monad.Error.Class (line 79, column 1 - line 81, column 33): "+[n.constructor.name,r.constructor.name])}}),m=new d(function(){return l},function(n){return function(r){if(n instanceof t.Left)return r(n.value0);if(n instanceof t.Right)return new t.Right(n.value0);throw new Error("Failed pattern match at Control.Monad.Error.Class (line 72, column 1 - line 74, column 35): "+[n.constructor.name,r.constructor.name])}}),M=new d(function(){return w},o.flip(c.catchException)),p=function(n){return n.catchError},x=function(n){return function(r){return function(t){return function(o){return p(n)(t)(function(t){var e=r(t);if(e instanceof i.Nothing)return h(n.MonadThrow0())(t);if(e instanceof i.Just)return o(e.value0);throw new Error("Failed pattern match at Control.Monad.Error.Class (line 57, column 5 - line 59, column 26): "+[e.constructor.name])})}}}},T=function(r){return function(o){return p(r)(e.map(r.MonadThrow0().Monad0().Bind1().Apply0().Functor0())(t.Right.create)(o))((i=n.pure(r.MonadThrow0().Monad0().Applicative0()),function(n){return i(t.Left.create(n))}));var i}},v=function(o){return function(e){return function(i){return function(u){return r.bind(o.MonadThrow0().Monad0().Bind1())(e)(function(e){return r.bind(o.MonadThrow0().Monad0().Bind1())(T(o)(u(e)))(function(u){return r.discard(r.discardUnit)(o.MonadThrow0().Monad0().Bind1())(i(e))(function(){return t.either(h(o.MonadThrow0()))(n.pure(o.MonadThrow0().Monad0().Applicative0()))(u)})})})}}}};module.exports={catchError:p,throwError:h,MonadThrow:f,MonadError:d,catchJust:x,try:T,withResource:v,monadThrowEither:l,monadErrorEither:m,monadThrowMaybe:s,monadErrorMaybe:E,monadThrowEffect:w,monadErrorEffect:M}; -},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Data.Either/index.js":"B2JL","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Unit/index.js":"NhVk","../Effect/index.js":"oTWB","../Effect.Exception/index.js":"0OCW"}],"c2ZJ":[function(require,module,exports) { -"use strict";var n=require("../Control.Category/index.js"),o=require("../Control.Monad/index.js"),e=require("../Control.Semigroupoid/index.js"),r=require("../Data.Functor/index.js"),t=function(n,o){this.Monad0=n,this.ask=o},i=function(n,o){this.MonadAsk0=n,this.local=o},u=new t(function(){return o.monadFn},n.identity(n.categoryFn)),a=new i(function(){return u},e.composeFlipped(e.semigroupoidFn)),d=function(n){return n.local},s=function(n){return n.ask},c=function(n){return function(o){return r.map(n.Monad0().Bind1().Apply0().Functor0())(o)(s(n))}};module.exports={ask:s,local:d,MonadAsk:t,asks:c,MonadReader:i,monadAskFun:u,monadReaderFun:a}; -},{"../Control.Category/index.js":"IAi2","../Control.Monad/index.js":"U/Ix","../Control.Semigroupoid/index.js":"/riR","../Data.Functor/index.js":"+0AE"}],"5tIR":[function(require,module,exports) { -"use strict";var t=function(t){this.lift=t},i=function(t){return t.lift};module.exports={lift:i,MonadTrans:t}; -},{}],"gxgA":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),e=require("../Control.Bind/index.js"),t=require("../Data.Tuple/index.js"),i=function(n,e){this.Monad0=n,this.tell=e},r=function(n,e,t){this.MonadTell0=n,this.listen=e,this.pass=t},u=function(n){return n.tell},l=function(n){return n.pass},o=function(n){return n.listen},a=function(i){return function(r){return function(u){return e.bind(i.MonadTell0().Monad0().Bind1())(o(i)(u))(function(e){return n.pure(i.MonadTell0().Monad0().Applicative0())(new t.Tuple(e.value0,r(e.value1)))})}}},s=function(i){return function(r){return function(u){return l(i)(e.bind(i.MonadTell0().Monad0().Bind1())(u)(function(e){return n.pure(i.MonadTell0().Monad0().Applicative0())(new t.Tuple(e,r))}))}}};module.exports={listen:o,pass:l,tell:u,MonadTell:i,MonadWriter:r,listens:a,censor:s}; -},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Data.Tuple/index.js":"II/O"}],"dWtH":[function(require,module,exports) { -"use strict";var t=require("../Control.Category/index.js"),e=require("../Effect/index.js"),f=function(t,e){this.Monad0=t,this.liftEffect=e},n=new f(function(){return e.monadEffect},t.identity(t.categoryFn)),i=function(t){return t.liftEffect};module.exports={liftEffect:i,MonadEffect:f,monadEffectEffect:n}; -},{"../Control.Category/index.js":"IAi2","../Effect/index.js":"oTWB"}],"34Kp":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),t=require("../Control.Alternative/index.js"),e=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),u=require("../Control.Bind/index.js"),o=require("../Control.Lazy/index.js"),i=require("../Control.Monad/index.js"),a=require("../Control.Monad.Cont.Class/index.js"),c=require("../Control.Monad.Error.Class/index.js"),l=require("../Control.Monad.Reader.Class/index.js"),f=require("../Control.Monad.Rec.Class/index.js"),d=require("../Control.Monad.State.Class/index.js"),s=require("../Control.Monad.Trans.Class/index.js"),p=require("../Control.Monad.Writer.Class/index.js"),T=require("../Control.MonadPlus/index.js"),M=require("../Control.MonadZero/index.js"),v=require("../Control.Plus/index.js"),w=require("../Data.Functor/index.js"),S=require("../Data.Newtype/index.js"),C=require("../Data.Tuple/index.js"),m=require("../Data.Unit/index.js"),x=require("../Effect.Class/index.js"),j=function(n){return n},q=function(n){return function(t){return function(e){return t(n(e))}}},A=function(n){return n},y=new S.Newtype(function(n){return n},j),E=new s.MonadTrans(function(n){return function(t){return function(r){return u.bind(n.Bind1())(t)(function(t){return e.pure(n.Applicative0())(new C.Tuple(t,r))})}}}),h=function(n){return function(t){return function(e){return n(t(e))}}},B=new o.Lazy(function(n){return function(t){return n(m.unit)(t)}}),R=function(n){return new w.Functor(function(t){return function(e){return function(r){return w.map(n)(function(n){return new C.Tuple(t(n.value0),n.value1)})(e(r))}}})},b=function(n){return function(t){return function(e){return w.map(n)(C.snd)(t(e))}}},D=function(n){return function(t){return function(e){return w.map(n)(C.fst)(t(e))}}},P=function(n){return new i.Monad(function(){return L(n)},function(){return F(n)})},F=function(n){return new u.Bind(function(){return k(n)},function(t){return function(e){return function(r){return u.bind(n.Bind1())(t(r))(function(n){return e(n.value0)(n.value1)})}}})},k=function(n){return new r.Apply(function(){return R(n.Bind1().Apply0().Functor0())},i.ap(P(n)))},L=function(n){return new e.Applicative(function(){return k(n)},function(t){return function(r){return e.pure(n.Applicative0())(new C.Tuple(t,r))}})},Z=function(n){return new l.MonadAsk(function(){return P(n.Monad0())},s.lift(E)(n.Monad0())(l.ask(n)))},z=function(n){return new l.MonadReader(function(){return Z(n.MonadAsk0())},(t=l.local(n),function(n){return h(t(n))}));var t},W=function(n){return new a.MonadCont(function(){return P(n.Monad0())},function(t){return function(e){return a.callCC(n)(function(n){return t(function(t){return function(e){return n(new C.Tuple(t,e))}})(e)})}})},N=function(n){return new x.MonadEffect(function(){return P(n.Monad0())},(t=s.lift(E)(n.Monad0()),e=x.liftEffect(n),function(n){return t(e(n))}));var t,e},U=function(n){return new f.MonadRec(function(){return P(n.Monad0())},function(t){return function(r){var o=function(r){var o=t(r.value0);return u.bind(n.Monad0().Bind1())(o(r.value1))(function(t){return e.pure(n.Monad0().Applicative0())(function(){if(t.value0 instanceof f.Loop)return new f.Loop(new C.Tuple(t.value0.value0,t.value1));if(t.value0 instanceof f.Done)return new f.Done(new C.Tuple(t.value0.value0,t.value1));throw new Error("Failed pattern match at Control.Monad.State.Trans (line 87, column 16 - line 89, column 40): "+[t.value0.constructor.name])}())})};return function(t){return f.tailRecM(n)(o)(new C.Tuple(r,t))}}})},g=function(n){return new d.MonadState(function(){return P(n)},function(t){return j((r=e.pure(n.Applicative0()),function(n){return r(t(n))}));var r})},G=function(n){return new p.MonadTell(function(){return P(n.Monad0())},(t=s.lift(E)(n.Monad0()),e=p.tell(n),function(n){return t(e(n))}));var t,e},H=function(n){return new p.MonadWriter(function(){return G(n.MonadTell0())},function(t){return function(r){return u.bind(n.MonadTell0().Monad0().Bind1())(p.listen(n)(t(r)))(function(t){return e.pure(n.MonadTell0().Monad0().Applicative0())(new C.Tuple(new C.Tuple(t.value0.value0,t.value1),t.value0.value1))})}},function(t){return function(r){return p.pass(n)(u.bind(n.MonadTell0().Monad0().Bind1())(t(r))(function(t){return e.pure(n.MonadTell0().Monad0().Applicative0())(new C.Tuple(new C.Tuple(t.value0.value0,t.value1),t.value0.value1))}))}})},I=function(n){return new c.MonadThrow(function(){return P(n.Monad0())},function(t){return s.lift(E)(n.Monad0())(c.throwError(n)(t))})},J=function(n){return new c.MonadError(function(){return I(n.MonadThrow0())},function(t){return function(e){return function(r){return c.catchError(n)(t(r))(function(n){return e(n)(r)})}}})},K=function(t){return function(t){return new n.Alt(function(){return R(t.Functor0())},function(e){return function(r){return function(u){return n.alt(t)(e(u))(r(u))}}})}},O=function(n){return function(t){return new v.Plus(function(){return K(n)(t.Alt0())},function(n){return v.empty(t)})}},Q=function(n){return function(e){return new t.Alternative(function(){return L(n)},function(){return O(n)(e.Plus1())})}},V=function(n){return new M.MonadZero(function(){return Q(n.Monad0())(n.Alternative1())},function(){return P(n.Monad0())})},X=function(n){return new T.MonadPlus(function(){return V(n.MonadZero0())})};module.exports={StateT:j,runStateT:A,evalStateT:D,execStateT:b,mapStateT:h,withStateT:q,newtypeStateT:y,functorStateT:R,applyStateT:k,applicativeStateT:L,altStateT:K,plusStateT:O,alternativeStateT:Q,bindStateT:F,monadStateT:P,monadRecStateT:U,monadZeroStateT:V,monadPlusStateT:X,monadTransStateT:E,lazyStateT:B,monadEffectState:N,monadContStateT:W,monadThrowStateT:I,monadErrorStateT:J,monadAskStateT:Z,monadReaderStateT:z,monadStateStateT:g,monadTellStateT:G,monadWriterStateT:H}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Lazy/index.js":"y9cE","../Control.Monad/index.js":"U/Ix","../Control.Monad.Cont.Class/index.js":"IpNh","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Class/index.js":"gxgA","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk","../Effect.Class/index.js":"dWtH"}],"mGZW":[function(require,module,exports) { -"use strict";var t=require("../Control.Monad.State.Trans/index.js"),e=require("../Data.Identity/index.js"),n=require("../Data.Newtype/index.js"),r=t.withStateT,u=function(t){var r=n.unwrap(e.newtypeIdentity);return function(e){return r(t(e))}},a=function(r){return t.mapStateT((u=n.unwrap(e.newtypeIdentity),function(t){return e.Identity(r(u(t)))}));var u},i=function(t){return function(e){return t(e).value1}},o=function(t){return function(e){return t(e).value0}};module.exports={runState:u,evalState:o,execState:i,mapState:a,withState:r}; -},{"../Control.Monad.State.Trans/index.js":"34Kp","../Data.Identity/index.js":"2OKT","../Data.Newtype/index.js":"lz8k"}],"7S1u":[function(require,module,exports) { -"use strict";exports.random=Math.random; -},{}],"V+tx":[function(require,module,exports) { -"use strict";var r=require("./foreign.js"),n=require("../Data.Functor/index.js"),e=require("../Data.Int/index.js"),t=require("../Effect/index.js"),o=function(n){return function(e){return function(){return r.random()*(e-n)+n}}},u=function(n){return function(t){return function(){var o=r.random(),u=(e.toNumber(t)-e.toNumber(n)+1)*o+e.toNumber(n);return e.floor(u)}}},a=n.map(t.functorEffect)(function(r){return r<.5})(r.random);module.exports={randomInt:u,randomRange:o,randomBool:a,random:r.random}; -},{"./foreign.js":"7S1u","../Data.Functor/index.js":"+0AE","../Data.Int/index.js":"xNJb","../Effect/index.js":"oTWB"}],"1RqQ":[function(require,module,exports) { -"use strict";var e=require("../Data.Eq/index.js"),r=require("../Data.EuclideanRing/index.js"),n=require("../Data.Functor/index.js"),t=require("../Data.Int/index.js"),u=require("../Data.Maybe/index.js"),i=require("../Data.Ord/index.js"),o=require("../Data.Show/index.js"),d=require("../Effect/index.js"),a=require("../Effect.Random/index.js"),c=require("../Math/index.js"),f=function(e){return e},s=function(e){return e},m=new o.Show(function(e){return"Seed "+o.show(o.showInt)(e)}),q=1,x=2147483647,j=x-1|0,S=function(e){var n;return(n=q,function(e){return function(t){var u=e-n|0,i=r.mod(r.euclideanRingInt)(t)(u);return i<n?i+e|0:i}})(j)(e)},l=n.map(d.functorEffect)(S)(a.randomInt(q)(j)),w=0,b=48271,g=function(e){return function(r){return f(u.fromJust()(t.fromNumber(c.remainder(t.toNumber(b)*t.toNumber(r)+e)(t.toNumber(x)))))}},D=g(t.toNumber(w)),h=new e.Eq(function(e){return function(r){return e===r}}),E=new i.Ord(function(){return h},function(e){return function(r){return i.compare(i.ordInt)(e)(r)}});module.exports={mkSeed:S,unSeed:s,randomSeed:l,lcgA:b,lcgC:w,lcgM:x,lcgNext:D,lcgPerturb:g,eqSeed:h,ordSeed:E,showSeed:m}; -},{"../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Functor/index.js":"+0AE","../Data.Int/index.js":"xNJb","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7","../Effect/index.js":"oTWB","../Effect.Random/index.js":"V+tx","../Math/index.js":"Rpaz"}],"9U+U":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),e=require("../Control.Applicative/index.js"),t=require("../Control.Apply/index.js"),r=require("../Control.Bind/index.js"),u=require("../Control.Monad.Gen.Class/index.js"),i=require("../Control.Monad.Rec.Class/index.js"),a=require("../Control.Monad.State/index.js"),o=require("../Control.Monad.State.Class/index.js"),d=require("../Control.Monad.State.Trans/index.js"),c=require("../Data.Array/index.js"),f=require("../Data.Bounded/index.js"),l=require("../Data.Enum/index.js"),s=require("../Data.Foldable/index.js"),m=require("../Data.Functor/index.js"),p=require("../Data.Identity/index.js"),v=require("../Data.Int/index.js"),S=require("../Data.List/index.js"),y=require("../Data.List.Types/index.js"),b=require("../Data.Maybe/index.js"),x=require("../Data.Monoid.Additive/index.js"),w=require("../Data.Newtype/index.js"),q=require("../Data.NonEmpty/index.js"),j=require("../Data.Ord/index.js"),T=require("../Data.Semiring/index.js"),I=require("../Data.Tuple/index.js"),N=require("../Data.Unfoldable/index.js"),D=require("../Data.Unit/index.js"),G=require("../Math/index.js"),M=require("../Random.LCG/index.js"),C=function(n){return n},g=function(n){return n},h=function(n){return a.runState(g(n))},z=function(n){return C(o.state(d.monadStateStateT(p.monadIdentity))(function(e){return h(n(e))(e)}))},A=function(n){return z(function(e){return n(e.size)})},O=function(n){return function(e){return C(o.state(d.monadStateStateT(p.monadIdentity))(function(t){return h(e)({newSeed:n,size:t.size})}))}},E=function(n){return function(e){return C(o.state(d.monadStateStateT(p.monadIdentity))(function(t){return m.map(I.functorTuple)(function(n){return{size:t.size,newSeed:n.newSeed}})(h(e)({newSeed:t.newSeed,size:n}))}))}},L=function(n){return function(t){return function(r){if(t<=0)return e.pure(n.Monad0().Applicative0())(y.Nil.value);return i.tailRecM(n)(function(t){return 0===t.value1?e.pure(n.Monad0().Applicative0())(new i.Done(t.value0)):m.mapFlipped(n.Monad0().Bind1().Apply0().Functor0())(r)(function(n){return new i.Loop(new I.Tuple(new y.Cons(n,t.value0),t.value1-1|0))})})(new I.Tuple(y.Nil.value,t))}}},R=function(n){return C(o.state(d.monadStateStateT(p.monadIdentity))(function(e){return new I.Tuple(function(t){return I.fst(h(n(t))(e))},{newSeed:M.lcgNext(e.newSeed),size:e.size})}))},B=function(e){return function(t){return r.discard(r.discardUnit)(d.bindStateT(p.monadIdentity))(m.void(d.functorStateT(p.functorIdentity))(o.modify(d.monadStateStateT(p.monadIdentity))(function(t){var r={};for(var u in t)({}).hasOwnProperty.call(t,u)&&(r[u]=t[u]);return r.newSeed=M.lcgPerturb(v.toNumber(n.float32ToInt32(e)))(t.newSeed),r})))(function(){return g(t)})}},F=d.monadRecStateT(i.monadRecIdentity),U=d.monadStateT(p.monadIdentity),P=L(F),k=C(o.state(d.monadStateStateT(p.monadIdentity))(function(n){return new I.Tuple(M.unSeed(n.newSeed),function(){var e={};for(var t in n)({}).hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.newSeed=M.lcgNext(n.newSeed),e}())})),J=d.lazyStateT,Q=d.functorStateT(p.functorIdentity),H=m.map(Q)(function(n){return v.toNumber(n)/v.toNumber(M.lcgM)})(k),K=function(n){return function(e){return m.map(Q)(S.toUnfoldable(N.unfoldableArray))(P(n)(e))}},V=function(n){return a.evalState(g(n))},W=function(n){return function(e){return function(t){return V(K(e)(t))({newSeed:n,size:e})}}},X=function(n){return function(e){return function(){var t=M.randomSeed();return W(t)(n)(e)}}},Y=X(10),Z=function(n){return function(e){var t,r,u=j.min(j.ordNumber)(n)(e),i=j.max(j.ordNumber)(n)(e);return m.map(Q)((t=T.add(T.semiringNumber)(u),r=T.mul(T.semiringNumber)(i-u),function(n){return t(r(n))}))(H)}},$=d.bindStateT(p.monadIdentity),_=function(n){var e=new y.Cons(n.value0,n.value1),t=w.unwrap(w.newtypeAdditive)(s.fold(y.foldableList)(x.monoidAdditive(T.semiringNumber))(m.map(y.functorList)(function(n){return x.Additive(I.fst(n))})(e)));return r.bind($)(Z(0)(t))(function(t){return(r=t,function(n){return function(e){var t,u=r,i=n,a=!1;function o(n,t,r){if(r instanceof y.Nil)return a=!0,t;if(r instanceof y.Cons)return n<=r.value0.value0?(a=!0,r.value0.value1):(u=n-r.value0.value0,i=t,void(e=r.value1));throw new Error("Failed pattern match at Test.QuickCheck.Gen (line 162, column 5 - line 162, column 21): "+[n.constructor.name,t.constructor.name,r.constructor.name])}for(;!a;)t=o(u,i,e);return t}})(I.snd(n.value0))(e);var r})},nn=d.applyStateT(p.monadIdentity),en=function(n){return function(e){var r=v.toNumber(e),u=v.toNumber(n),i=m.map(Q)(v.toNumber)(k),a=t.apply(nn)(m.map(Q)(T.add(T.semiringNumber))(i))(m.map(Q)(T.mul(T.semiringNumber)(2))(i));return m.map(Q)(function(n){return v.floor((e=n,u+G.remainder(e)(r-u+1)));var e})(a)}},tn=function(n){return function(e){return n<=e?en(n)(e):en(e)(n)}},rn=function(n){return A(function(e){return r.bind($)(tn(0)(e))(function(e){return K(e)(n)})})},un=new u.MonadGen(function(){return U},m.map(Q)(function(n){return n<.5})(H),Z,tn,function(n){return function(e){return A(function(t){return E(n(t))(e)})}},A),an=function(n){return r.bind($)(tn(0)(c.length(n.value1)))(function(e){return e<1?n.value0:b.fromMaybe(n.value0)(c.index(n.value1)(e-1|0))})},on=d.applicativeStateT(p.monadIdentity),dn=function(n){return A(function(t){return r.bind($)(tn(0)(t))(function(t){return r.bind($)(n)(function(u){return r.bind($)(K(t-1|0)(n))(function(n){return e.pure(on)(new q.NonEmpty(u,n))})})})})},cn=function(n){return r.bind($)(tn(0)(c.length(n.value1)))(function(t){return e.pure(on)(0===t?n.value0:b.fromMaybe(n.value0)(c.index(n.value1)(t-1|0)))})},fn=function(n){return r.bind($)(tn(l.fromEnum(n)(f.bottom(n.Bounded0())))(l.fromEnum(n)(f.top(n.Bounded0()))))(function(t){return e.pure(on)(b.fromJust()(l.toEnum(n)(t)))})},ln=function(n){return r.bind($)(K(c.length(n))(tn(0)(f.top(f.boundedInt))))(function(t){return e.pure(on)(m.map(m.functorArray)(I.snd)(c.sortBy(j.comparing(j.ordInt)(I.fst))(c.zip(t)(n))))})},sn=function(n){return function(t){return i.tailRecM(F)(function(u){return r.bind($)(n)(function(n){return e.pure(on)(t(n)?new i.Done(n):new i.Loop(D.unit))})})(D.unit)}},mn=d.altStateT(p.monadIdentity)(p.altIdentity);module.exports={unGen:g,repeatable:R,stateful:z,variant:O,suchThat:sn,sized:A,resize:E,choose:Z,chooseInt:tn,oneOf:an,frequency:_,arrayOf:rn,arrayOf1:dn,listOf:P,vectorOf:K,elements:cn,shuffle:ln,runGen:h,evalGen:V,perturbGen:B,uniform:H,sample:W,randomSample:Y,"randomSample'":X,functorGen:Q,applyGen:nn,applicativeGen:on,bindGen:$,monadGen:U,altGen:mn,monadRecGen:F,lazyGen:J,monadGenGen:un}; -},{"./foreign.js":"/s47","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad.Gen.Class/index.js":"ONWB","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State/index.js":"mGZW","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.State.Trans/index.js":"34Kp","../Data.Array/index.js":"4t4C","../Data.Bounded/index.js":"kcUU","../Data.Enum/index.js":"oOsU","../Data.Foldable/index.js":"eVDl","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Int/index.js":"xNJb","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Monoid.Additive/index.js":"fHyj","../Data.Newtype/index.js":"lz8k","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Semiring/index.js":"11NF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unit/index.js":"NhVk","../Math/index.js":"Rpaz","../Random.LCG/index.js":"1RqQ"}],"rKI8":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),e=require("../Control.Bind/index.js"),t=require("../Control.Category/index.js"),u=require("../Control.Monad.Gen.Class/index.js"),i=require("../Control.Monad.Gen.Common/index.js"),a=require("../Data.Array.NonEmpty/index.js"),o=require("../Data.Array.ST/index.js"),c=require("../Data.Bounded/index.js"),f=require("../Data.Either/index.js"),b=require("../Data.Enum/index.js"),p=require("../Data.Foldable/index.js"),y=require("../Data.Function/index.js"),s=require("../Data.Functor/index.js"),m=require("../Data.Generic.Rep/index.js"),d=require("../Data.Identity/index.js"),l=require("../Data.Int/index.js"),w=require("../Data.Lazy/index.js"),G=require("../Data.List.Types/index.js"),h=require("../Data.Maybe/index.js"),x=require("../Data.Newtype/index.js"),j=require("../Data.NonEmpty/index.js"),q=require("../Data.Ordering/index.js"),v=require("../Data.Semigroup/index.js"),A=require("../Data.String.CodeUnits/index.js"),C=require("../Data.String.Common/index.js"),E=require("../Data.String.NonEmpty.CodeUnits/index.js"),g=require("../Data.String.NonEmpty.Internal/index.js"),D=require("../Data.String.Pattern/index.js"),N=require("../Data.Symbol/index.js"),S=require("../Data.Tuple/index.js"),L=require("../Data.Unit/index.js"),I=require("../Record/index.js"),T=require("../Test.QuickCheck.Gen/index.js"),F=require("../Type.Data.RowList/index.js"),R=function(n){this.coarbitrary=n},k=function(n){this.arbitraryRecord=n},P=function(n){this.arbitraryGenericSum=n},Q=function(n){this.arbitrary=n},M=new R(function(n){return t.identity(t.categoryFn)}),O=function(n){return n.coarbitrary},z=function(n){return new R(function(r){return O(n)(r)})},B=function(n){return new R(function(r){return O(n)(r)})},U=function(n){return function(r){return new R(function(e){var t=O(r)(e.value1),u=O(n)(e.value0);return function(n){return t(u(n))}})}},J=function(n){return function(r){return new R(function(e){if(e instanceof m.Inl)return O(n)(e.value0);if(e instanceof m.Inr)return O(r)(e.value0);throw new Error("Failed pattern match at Test.QuickCheck.Arbitrary (line 216, column 1 - line 218, column 38): "+[e.constructor.name])})}},W=function(n){return function(r){return function(e){return function(t){return s.map(T.functorGen)(m.to(n))(O(r)(m.from(n)(e))(s.map(T.functorGen)(m.from(n))(t)))}}}},H=new R(function(n){return T.perturbGen(1)}),K=function(n){return function(r){return new R(function(e){var t=O(r)(e.value1),u=O(n)(e.value0);return function(n){return t(u(n))}})}},V=new R(function(n){if(n instanceof q.LT)return T.perturbGen(1);if(n instanceof q.EQ)return T.perturbGen(2);if(n instanceof q.GT)return T.perturbGen(3);throw new Error("Failed pattern match at Test.QuickCheck.Arbitrary (line 114, column 1 - line 117, column 34): "+[n.constructor.name])}),X=new R(T.perturbGen),Y=function(n){return function(r){return new R(function(e){var t=O(n)(e.value1),u=O(r)(e.value0);return function(n){return t(u(n))}})}},Z=function(n){return new R(function(r){if(r instanceof h.Nothing)return T.perturbGen(1);if(r instanceof h.Just)return O(n)(r.value0);throw new Error("Failed pattern match at Test.QuickCheck.Arbitrary (line 154, column 1 - line 156, column 39): "+[r.constructor.name])})},$=function(n){return new R(p.foldl(G.foldableList)(function(r){return function(e){var t=O(n)(e);return function(n){return r(t(n))}}})(t.identity(t.categoryFn)))},_=function(n){return new R(function(r){return O(Y($(n))(n))(r)})},nn=function(n){return new R(function(r){return O(n)(w.force(r))})},rn=new R(function(n){return T.perturbGen(l.toNumber(n))}),en=function(n){return new R(function(r){return O(n)(r)})},tn=function(n){return function(r){return new R(function(e){if(e instanceof f.Left)return O(n)(e.value0);if(e instanceof f.Right)return O(r)(e.value0);throw new Error("Failed pattern match at Test.QuickCheck.Arbitrary (line 161, column 1 - line 163, column 40): "+[e.constructor.name])})}},un=new R(function(n){return O(rn)(b.fromEnum(b.boundedEnumChar)(n))}),an=new R(function(n){if(n)return T.perturbGen(1);if(!n)return T.perturbGen(2);throw new Error("Failed pattern match at Test.QuickCheck.Arbitrary (line 71, column 1 - line 73, column 37): "+[n.constructor.name])}),on=function(n){return new R(p.foldl(p.foldableArray)(function(r){return function(e){var t=O(n)(e);return function(n){return r(t(n))}}})(t.identity(t.categoryFn)))},cn=function(n){return new R((r=O(on(n)),function(n){return r(a.toArray(n))}));var r},fn=new R(function(n){return O(on(Z(un)))(s.map(s.functorArray)(A.charAt(0))(C.split(x.wrap(D.newtypePattern)(""))(n)))}),bn=new R(function(){var n=O(fn);return function(r){return n(g.toString(r))}}()),pn=new k(function(r){return n.pure(T.applicativeGen)({})}),yn=function(n){return n.arbitraryRecord},sn=function(n){return function(n){return new Q(yn(n)(F.RLProxy.value))}},mn=new Q(n.pure(T.applicativeGen)(m.NoArguments.value)),dn=function(n){return n.arbitraryGenericSum},ln=function(n){return n.arbitrary},wn=function(n){return new Q(s.map(T.functorGen)(m.Argument)(ln(n)))},Gn=function(n){return new Q(s.map(T.functorGen)(m.Constructor)(ln(n)))},hn=function(n){return new Q(s.map(T.functorGen)(d.Identity)(ln(n)))},xn=function(r){return new Q(e.bind(T.bindGen)(ln(r))((t=n.pure(T.applicativeGen),function(n){return t(w.defer(y.const(n)))})));var t},jn=function(n){return new Q(T.sized(function(r){return e.bind(T.bindGen)(T.chooseInt(0)(r))(y.flip(T.listOf)(ln(n)))}))},qn=function(n){return function(e){return new Q(r.apply(T.applyGen)(s.map(T.functorGen)(m.Product.create)(ln(n)))(ln(e)))}},vn=function(r){return function(t){return function(u){return function(i){return function(a){return function(a){return new k(function(o){return e.bind(T.bindGen)(ln(r))(function(r){return e.bind(T.bindGen)(yn(t)(F.RLProxy.value))(function(e){return n.pure(T.applicativeGen)(I.insert(a)(u)(i)(N.SProxy.value)(r)(e))})})})}}}}}},An=function(n){return function(r){return new Q(T.oneOf(new j.NonEmpty(s.map(T.functorGen)(m.Inl.create)(ln(n)),s.map(s.functorArray)(s.map(T.functorGen)(m.Inr.create))(dn(r)))))}},Cn=function(n){return function(r){return s.map(T.functorGen)(m.to(n))(ln(r))}},En=new Q(n.pure(T.applicativeGen)(L.unit)),gn=function(n){return function(e){return new Q(r.apply(T.applyGen)(s.map(T.functorGen)(S.Tuple.create)(ln(n)))(ln(e)))}},Dn=new Q(T.elements(new j.NonEmpty(q.LT.value,[q.EQ.value,q.GT.value]))),Nn=new Q(T.uniform),Sn=function(n){return function(e){return new Q(r.apply(T.applyGen)(s.map(T.functorGen)(j.NonEmpty.create)(ln(e)))(ln(n)))}},Ln=function(n){return new Q(s.map(T.functorGen)(G.NonEmptyList)(ln(Sn(jn(n))(n))))},In=function(n){return new Q(i.genMaybe(T.monadGenGen)(ln(n)))},Tn=new Q(T.chooseInt(-1e6)(1e6)),Fn=function(n){return function(r){return new P(v.append(v.semigroupArray)([s.map(T.functorGen)(m.Inl.create)(ln(n))])(s.map(s.functorArray)(s.map(T.functorGen)(m.Inr.create))(dn(r))))}},Rn=function(n){return new P([ln(Gn(n))])},kn=function(n){return function(r){return new Q(T.repeatable(function(e){return O(n)(e)(ln(r))}))}},Pn=function(n){return function(r){return new Q(i.genEither(T.monadGenGen)(ln(n))(ln(r)))}},Qn=new Q(s.map(T.functorGen)(b.toEnumWithDefaults(b.boundedEnumChar)(c.bottom(c.boundedChar))(c.top(c.boundedChar)))(T.chooseInt(0)(65536))),Mn=new Q(u.chooseBool(T.monadGenGen)),On=function(n){return new Q(T.arrayOf(ln(n)))},zn=function(r){return new Q(e.bind(T.bindGen)(ln(r))(function(t){return e.bind(T.bindGen)(ln(On(r)))(function(r){return n.pure(T.applicativeGen)(h.fromJust()(a.fromArray(function(){var n=o.unsafeThaw(r)();o.push(t)(n)();return o.unsafeFreeze(n)()}())))})}))},Bn=new Q(s.map(T.functorGen)(A.fromCharArray)(ln(On(Qn)))),Un=new Q(r.apply(T.applyGen)(s.map(T.functorGen)(E.cons)(ln(Qn)))(ln(Bn))),Jn=function(n){return function(r){return new R(function(t){return function(u){return e.bind(T.bindGen)(ln(On(n)))(function(n){return O(on(r))(s.map(s.functorArray)(t)(n))(u)})}})}};module.exports={Arbitrary:Q,arbitrary:ln,Coarbitrary:R,coarbitrary:O,genericArbitrary:Cn,genericCoarbitrary:W,ArbitraryGenericSum:P,arbitraryGenericSum:dn,ArbitraryRowList:k,arbitraryRecord:yn,arbBoolean:Mn,coarbBoolean:an,arbNumber:Nn,coarbNumber:X,arbInt:Tn,coarbInt:rn,arbString:Bn,coarbString:fn,arbNonEmptyString:Un,coarbNonEmptyString:bn,arbChar:Qn,coarbChar:un,arbUnit:En,coarbUnit:H,arbOrdering:Dn,coarbOrdering:V,arbArray:On,coarbArray:on,arbNonEmptyArray:zn,coarbNonEmptyArray:cn,arbFunction:kn,coarbFunction:Jn,arbTuple:gn,coarbTuple:K,arbMaybe:In,coarbMaybe:Z,arbEither:Pn,coarbEither:tn,arbitraryList:jn,coarbList:$,arbitraryIdentity:hn,coarbIdentity:en,arbitraryLazy:xn,coarbLazy:nn,arbNonEmpty:Sn,coarbNonEmpty:Y,arbNonEmptyList:Ln,coarbNonEmptyList:_,arbitraryNoArguments:mn,coarbitraryNoArguments:M,arbGenSumSum:Fn,arbGenSumConstructor:Rn,arbitrarySum:An,coarbitrarySum:J,arbitraryProduct:qn,coarbitraryProduct:U,arbitraryConstructor:Gn,coarbitraryConstructor:B,arbitraryArgument:wn,coarbitraryArgument:z,arbitraryRowListNil:pn,arbitraryRowListCons:vn,arbitraryRecordInstance:sn}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad.Gen.Class/index.js":"ONWB","../Control.Monad.Gen.Common/index.js":"K4TW","../Data.Array.NonEmpty/index.js":"eTKN","../Data.Array.ST/index.js":"s8si","../Data.Bounded/index.js":"kcUU","../Data.Either/index.js":"B2JL","../Data.Enum/index.js":"oOsU","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Generic.Rep/index.js":"AuzG","../Data.Identity/index.js":"2OKT","../Data.Int/index.js":"xNJb","../Data.Lazy/index.js":"aRUE","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.NonEmpty/index.js":"qF8i","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.String.CodeUnits/index.js":"6c6X","../Data.String.Common/index.js":"OSrc","../Data.String.NonEmpty.CodeUnits/index.js":"EM+K","../Data.String.NonEmpty.Internal/index.js":"Ph6A","../Data.String.Pattern/index.js":"nKWe","../Data.Symbol/index.js":"4oJQ","../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk","../Record/index.js":"0gG4","../Test.QuickCheck.Gen/index.js":"9U+U","../Type.Data.RowList/index.js":"XaXP"}],"PpsX":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),e=require("../Control.Bind/index.js"),u=require("../Control.Monad/index.js"),t=require("../Data.Distributive/index.js"),i=require("../Data.Eq/index.js"),a=require("../Data.Foldable/index.js"),o=require("../Data.Functor/index.js"),c=require("../Data.Monoid/index.js"),l=require("../Data.Ord/index.js"),f=require("../Data.Ordering/index.js"),v=require("../Data.Semigroup/index.js"),p=require("../Data.Show/index.js"),d=require("../Data.Traversable/index.js"),s=require("../Test.QuickCheck.Arbitrary/index.js"),w=require("../Test.QuickCheck.Gen/index.js"),q=function(){function n(n,r){this.value0=n,this.value1=r}return n.create=function(r){return function(e){return new n(r,e)}},n}(),m=function(n){return function(r){return n(r.value0)(r.value1)}},y=function(n){return new q(n.value1,n.value0)},x=function(n){return n.value1},j=function(n){return new p.Show(function(r){return"("+p.show(n)(r.value0)+" ~ "+p.show(n)(r.value1)+")"})},b=function(n){return new v.Semigroup(function(r){return function(e){return new q(v.append(n)(r.value0)(e.value0),v.append(n)(r.value1)(e.value1))}})},P=function(n){return new c.Monoid(function(){return b(n.Semigroup0())},new q(c.mempty(n),c.mempty(n)))},D=new o.Functor(function(n){return function(r){return new q(n(r.value0),n(r.value1))}}),A=function(n){return n.value0},h=new a.Foldable(function(n){return function(r){return function(e){return v.append(n.Semigroup0())(r(e.value0))(r(e.value1))}}},function(n){return function(r){return function(e){return n(n(r)(e.value0))(e.value1)}}},function(n){return function(r){return function(e){return n(e.value0)(n(e.value1)(r))}}}),T=new d.Traversable(function(){return h},function(){return D},function(n){return function(e){return r.apply(n.Apply0())(o.map(n.Apply0().Functor0())(q.create)(e.value0))(e.value1)}},function(n){return function(e){return function(u){return r.apply(n.Apply0())(o.map(n.Apply0().Functor0())(q.create)(e(u.value0)))(e(u.value1))}}}),g=function(n){return new i.Eq(function(r){return function(e){return i.eq(n)(r.value0)(e.value0)&&i.eq(n)(r.value1)(e.value1)}})},C=function(n){return new l.Ord(function(){return g(n.Eq0())},function(r){return function(e){var u=l.compare(n)(r.value0)(e.value0);return u instanceof f.LT?f.LT.value:u instanceof f.GT?f.GT.value:l.compare(n)(r.value1)(e.value1)}})},F=new t.Distributive(function(){return D},function(n){return function(r){return function(e){return new q(o.map(n)(function(n){return A(r(n))})(e),o.map(n)(function(n){return x(r(n))})(e))}}},function(n){return function(r){return new q(o.map(n)(A)(r),o.map(n)(x)(r))}}),S=function(n){return function(r){return function(e){return n(new q(r,e))}}},G=function(n){return new s.Arbitrary(r.apply(w.applyGen)(o.map(w.functorGen)(q.create)(s.arbitrary(n)))(s.arbitrary(n)))},k=new r.Apply(function(){return D},function(n){return function(r){return new q(n.value0(r.value0),n.value1(r.value1))}}),M=new e.Bind(function(){return k},function(n){return function(r){return new q(A(r(n.value0)),x(r(n.value1)))}}),E=new n.Applicative(function(){return k},function(n){return new q(n,n)}),O=new u.Monad(function(){return E},function(){return M});module.exports={Pair:q,fst:A,snd:x,curry:S,uncurry:m,swap:y,eqPair:g,ordPair:C,showPair:j,functorPair:D,applyPair:k,applicativePair:E,bindPair:M,monadPair:O,semigroupPair:b,monoidPair:P,foldablePair:h,traversablePair:T,distributivePair:F,arbitraryPair:G}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.Distributive/index.js":"8PTu","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Test.QuickCheck.Arbitrary/index.js":"rKI8","../Test.QuickCheck.Gen/index.js":"9U+U"}],"AnkF":[function(require,module,exports) { -"use strict";var n=require("../Control.Category/index.js"),e=require("../Data.Eq/index.js"),r=require("../Data.Monoid/index.js"),o=require("../Data.Newtype/index.js"),u=require("../Data.Ord/index.js"),t=require("../Data.Ring/index.js"),i=require("../Data.Semigroup/index.js"),s=require("../Data.Show/index.js"),c=function(n){return n},w=function(n){return n},d=function(n){return n},f=function(n){return n},a=function(n){return n},m=function(n,e){this.fromDuration=n,this.toDuration=e},y=function(n){return n.toDuration},D=new s.Show(function(n){return"(Seconds "+s.show(s.showNumber)(n)+")"}),M=new s.Show(function(n){return"(Minutes "+s.show(s.showNumber)(n)+")"}),h=new s.Show(function(n){return"(Milliseconds "+s.show(s.showNumber)(n)+")"}),p=new s.Show(function(n){return"(Hours "+s.show(s.showNumber)(n)+")"}),N=new s.Show(function(n){return"(Days "+s.show(s.showNumber)(n)+")"}),S=new i.Semigroup(function(n){return function(e){return n+e}}),l=new i.Semigroup(function(n){return function(e){return n+e}}),q=new i.Semigroup(function(n){return function(e){return n+e}}),g=new i.Semigroup(function(n){return function(e){return n+e}}),b=new i.Semigroup(function(n){return function(e){return n+e}}),v=u.ordNumber,x=u.ordNumber,H=u.ordNumber,j=u.ordNumber,C=u.ordNumber,F=new o.Newtype(function(n){return n},c),E=new o.Newtype(function(n){return n},w),O=new o.Newtype(function(n){return n},d),R=new o.Newtype(function(n){return n},f),k=new o.Newtype(function(n){return n},a),z=new r.Monoid(function(){return S},0),A=new r.Monoid(function(){return l},0),B=new r.Monoid(function(){return q},0),G=new r.Monoid(function(){return g},0),I=new r.Monoid(function(){return b},0),J=function(n){return n.fromDuration},K=function(n){var e=y(n),r=o.over(O)(O)(d)(t.negate(t.ringNumber)),u=J(n);return function(n){return e(r(u(n)))}},L=e.eqNumber,P=e.eqNumber,Q=e.eqNumber,T=e.eqNumber,U=e.eqNumber,V=new m(o.over(F)(O)(c)(function(n){return 1e3*n}),o.over(O)(F)(d)(function(n){return n/1e3})),W=new m(o.over(E)(O)(w)(function(n){return 6e4*n}),o.over(O)(E)(d)(function(n){return n/6e4})),X=new m(n.identity(n.categoryFn),n.identity(n.categoryFn)),Y=new m(o.over(R)(O)(f)(function(n){return 36e5*n}),o.over(O)(R)(d)(function(n){return n/36e5})),Z=new m(o.over(k)(O)(a)(function(n){return 864e5*n}),o.over(O)(k)(d)(function(n){return n/864e5})),$=function(n){return function(e){var r=y(e),o=J(n);return function(n){return r(o(n))}}};module.exports={fromDuration:J,toDuration:y,Milliseconds:d,Seconds:c,Minutes:w,Hours:f,Days:a,Duration:m,convertDuration:$,negateDuration:K,newtypeMilliseconds:O,eqMilliseconds:Q,ordMilliseconds:H,semigroupMilliseconds:q,monoidMilliseconds:B,showMilliseconds:h,newtypeSeconds:F,eqSeconds:L,ordSeconds:v,semigroupSeconds:S,monoidSeconds:z,showSeconds:D,newtypeMinutes:E,eqMinutes:P,ordMinutes:x,semigroupMinutes:l,monoidMinutes:A,showMinutes:M,newtypeHours:R,eqHours:T,ordHours:j,semigroupHours:g,monoidHours:G,showHours:p,newtypeDays:k,eqDays:U,ordDays:C,semigroupDays:b,monoidDays:I,showDays:N,durationMilliseconds:X,durationSeconds:V,durationMinutes:W,durationHours:Y,durationDays:Z}; -},{"../Control.Category/index.js":"IAi2","../Data.Eq/index.js":"Pq4F","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Ring/index.js":"E2qH","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"0f5O":[function(require,module,exports) { -"use strict";exports.unsafePartial=function(t){return t()}; -},{}],"vcP9":[function(require,module,exports) { -"use strict";exports.crashWith=function(){return function(r){throw new Error(r)}}; -},{}],"HAG3":[function(require,module,exports) { -"use strict";var r=require("./foreign.js"),t=function(t){return r.crashWith(t)("Partial.crash: partial function")};module.exports={crash:t,crashWith:r.crashWith}; -},{"./foreign.js":"vcP9"}],"aoR+":[function(require,module,exports) { -"use strict";var r=require("./foreign.js"),n=require("../Partial/index.js"),a=function(n){return function(n){return r.unsafePartial(function(r){return n(r)})}},e=function(a){return r.unsafePartial(function(r){return n.crashWith(r)(a)})};module.exports={unsafePartialBecause:a,unsafeCrashWith:e,unsafePartial:r.unsafePartial}; -},{"./foreign.js":"0f5O","../Partial/index.js":"HAG3"}],"kYoO":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),t=require("../Control.Plus/index.js"),e=require("../Data.Boolean/index.js"),r=require("../Data.List.Types/index.js"),u=require("../Data.Maybe/index.js"),a=require("../Data.Ord/index.js"),o=require("../Data.Ordering/index.js"),i=require("../Data.Symbol/index.js"),c=require("../Partial.Unsafe/index.js"),l=require("../Type.Data.RowList/index.js"),f=function(n){return n},s=function(){function n(){}return n.value=new n,n}(),v=function(n){this.variantTags=n},p={},m={},h=function(n){this.contractWith=n},d=new v(function(n){return r.Nil.value}),C=function(n){return n.variantTags},y=function(n){return function(t){return new v(function(e){return new r.Cons(i.reflectSymbol(t)(i.SProxy.value),C(n)(l.RLProxy.value))})}},w=p,g=function(n){return function(n){return function(n){return p}}},x=m,D=function(n){return function(n){return function(n){return m}}},N=function(n){return function(t){return function(a){var o,i=n,c=t,l=!1;function f(n,t,o){if(t instanceof r.Cons&&o instanceof r.Cons){if(o.value0.cardinality>n){var f=o.value0.toEnum(n);return f instanceof u.Just?(l=!0,u.Just.create({type:t.value0,value:f.value0})):(l=!0,u.Nothing.value)}if(e.otherwise)return i=n-o.value0.cardinality|0,c=t.value1,void(a=o.value1)}return l=!0,u.Nothing.value}for(;!l;)o=f(i,c,a);return o}}},E=function(n){return function(t){var u,a=!1;function o(u){if(u instanceof r.Cons){if(u.value0===n)return a=!0,!0;if(e.otherwise)return void(t=u.value1)}if(u instanceof r.Nil)return a=!0,!1;throw new Error("Failed pattern match at Data.Variant.Internal (line 94, column 8 - line 98, column 18): "+[u.constructor.name])}for(;!a;)u=o(t);return u}},F=function(){var n;return n=0,function(t){var e,u=n,a=!1;function o(n,e){if(e instanceof r.Cons)return u=n+e.value0.cardinality|0,void(t=e.value1);if(e instanceof r.Nil)return a=!0,n;throw new Error("Failed pattern match at Data.Variant.Internal (line 216, column 12 - line 218, column 16): "+[e.constructor.name])}for(;!a;)e=o(u,t);return e}}(),q=function(n){return c.unsafeCrashWith("Data.Variant: impossible `"+n+"`")},V=function(n){return function(t){return function(u){return function(a){var o,i=u,c=!1;function l(u,o){if(u instanceof r.Cons&&o instanceof r.Cons){if(u.value0===t)return c=!0,o.value0;if(e.otherwise)return i=u.value1,void(a=o.value1)}return c=!0,q(n)}for(;!c;)o=l(i,a);return o}}}},k=function(n){return function(t){return function(r){return function(u){if(r.type===u.type)return V("eq")(r.type)(n)(t)(r.value)(u.value);if(e.otherwise)return!1;throw new Error("Failed pattern match at Data.Variant.Internal (line 100, column 1 - line 105, column 12): "+[n.constructor.name,t.constructor.name,r.constructor.name,u.constructor.name])}}}},j=function(n){return function(t){return function(e){return function(r){var u=a.compare(a.ordString)(e.type)(r.type);return u instanceof o.EQ?V("compare")(e.type)(n)(t)(e.value)(r.value):u}}}},J=function(n){return function(t){return function(e){return function(u){return e instanceof r.Cons&&u instanceof r.Cons?{type:e.value0,value:t(u.value0)}:q(n)}}}},T=function(n){var t;return t=0,function(u){return function(a){var o,i=t,c=u,l=!1;function f(t,u,o){if(u instanceof r.Cons&&o instanceof r.Cons){if(u.value0===n.type)return l=!0,t+o.value0.fromEnum(n.value)|0;if(e.otherwise)return i=t+o.value0.cardinality|0,c=u.value1,void(a=o.value1)}return l=!0,q("fromEnum")}for(;!l;)o=f(i,c,a);return o}}},I=function(n){return function(t){return function(e){return function(u){for(var a,o,i,c=e,l=!1;!l;)i=u,a=(o=c)instanceof r.Cons&&o.value1 instanceof r.Nil&&i instanceof r.Cons&&i.value1 instanceof r.Nil?(l=!0,{type:o.value0,value:t(i.value0)}):o instanceof r.Cons&&i instanceof r.Cons?(c=o.value1,void(u=i.value1)):(l=!0,q(n));return a}}}},P=function(n){return function(t){return function(a){return function(o){if(t instanceof r.Cons&&a instanceof r.Cons&&o instanceof r.Cons){if(t.value0===n.type){var i=o.value0.pred(n.value);if(i instanceof u.Nothing)return u.Nothing.value;if(i instanceof u.Just)return u.Just.create({type:n.type,value:i.value0});throw new Error("Failed pattern match at Data.Variant.Internal (line 175, column 11 - line 177, column 69): "+[i.constructor.name])}if(e.otherwise)return(c=t.value0,function(t){return function(a){return function(a){return function(o){return function(i){var l,f=c,s=t,v=a,p=o,m=!1;function h(t,a,o,c,l,h){if(c instanceof r.Cons&&l instanceof r.Cons&&h instanceof r.Cons){if(c.value0===n.type){var d=h.value0.pred(n.value);if(d instanceof u.Nothing)return m=!0,u.Just.create({type:t,value:a.top});if(d instanceof u.Just)return m=!0,u.Just.create({type:n.type,value:d.value0});throw new Error("Failed pattern match at Data.Variant.Internal (line 184, column 11 - line 186, column 69): "+[d.constructor.name])}if(e.otherwise)return f=c.value0,s=l.value0,h.value0,v=c.value1,p=l.value1,void(i=h.value1)}return m=!0,q("pred")}for(;!m;)l=h(f,s,0,v,p,i);return l}}}}})(a.value0)(o.value0)(t.value1)(a.value1)(o.value1)}var c;return q("pred")}}}},b=function(n){return function(t){return function(a){return function(o){var i,c=t,l=a,f=!1;function s(t,a,i){if(t instanceof r.Cons&&a instanceof r.Cons&&i instanceof r.Cons){if(t.value0===n.type){var s=i.value0.succ(n.value);if(s instanceof u.Just)return f=!0,u.Just.create({type:t.value0,value:s.value0});if(s instanceof u.Nothing)return t.value1 instanceof r.Cons&&a.value1 instanceof r.Cons?(f=!0,u.Just.create({type:t.value1.value0,value:a.value1.value0.bottom})):(f=!0,u.Nothing.value);throw new Error("Failed pattern match at Data.Variant.Internal (line 202, column 11 - line 206, column 29): "+[s.constructor.name])}if(e.otherwise)return c=t.value1,l=a.value1,void(o=i.value1)}return f=!0,q("succ")}for(;!f;)i=s(c,l,o);return i}}}},M=function(r){return function(r){return function(r){return new h(function(u){return function(a){return function(o){return function(i){return function(c){if(E(i)(C(r)(l.RLProxy.value)))return n.pure(u.Applicative0())(c);if(e.otherwise)return t.empty(u.Plus1());throw new Error("Failed pattern match at Data.Variant.Internal (line 254, column 1 - line 263, column 24): "+[a.constructor.name,o.constructor.name,i.constructor.name,c.constructor.name])}}}}})}}},L=function(n){return n.contractWith};module.exports={FProxy:s,VariantRep:f,VariantTags:v,variantTags:C,Contractable:h,contractWith:L,VariantMatchCases:p,VariantFMatchCases:m,lookup:V,lookupTag:E,lookupEq:k,lookupOrd:j,lookupLast:I,lookupFirst:J,lookupPred:P,lookupSucc:b,lookupCardinality:F,lookupFromEnum:T,lookupToEnum:N,impossible:q,variantMatchCons:g,variantMatchNil:w,variantFMatchCons:D,variantFMatchNil:x,variantTagsNil:d,variantTagsCons:y,contractWithInstance:M}; -},{"../Control.Applicative/index.js":"qYya","../Control.Plus/index.js":"oMBg","../Data.Boolean/index.js":"ObQr","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Symbol/index.js":"4oJQ","../Partial.Unsafe/index.js":"aoR+","../Type.Data.RowList/index.js":"XaXP"}],"hgdh":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Plus/index.js"),t=require("../Data.Bounded/index.js"),u=require("../Data.Enum/index.js"),e=require("../Data.Eq/index.js"),o=require("../Data.Function/index.js"),i=require("../Data.List.Types/index.js"),a=require("../Data.Ord/index.js"),c=require("../Data.Show/index.js"),f=require("../Data.Symbol/index.js"),s=require("../Data.Variant.Internal/index.js"),l=require("../Partial.Unsafe/index.js"),v=require("../Record.Unsafe/index.js"),d=require("../Type.Data.Row/index.js"),y=require("../Type.Data.RowList/index.js"),x=require("../Unsafe.Coerce/index.js"),p=function(n){return n},w=function(n){this.variantShows=n},m=function(n){this.variantOrds=n},P=function(n){this.variantEqs=n},R=function(n){this.variantBounded=n},V=function(n,r){this.VariantBounded0=n,this.variantBoundedEnums=r},L=function(n){return n.variantShows},q=function(n){return n.variantOrds},h=function(n){return n.variantEqs},E=function(n){return n.variantBoundedEnums},j=function(n){return n.variantBounded},B=function(n){return function(r){return(t={reflectSymbol:o.const(n.type)},function(n){return r(t)(n)})({})(f.SProxy.value)(n.value);var t}},C=new w(function(n){return i.Nil.value}),S=function(n){return function(r){return new w(function(t){return new i.Cons(c.show(r),L(n)(y.RLProxy.value))})}},T=function(n){return function(n){return function(r){return new c.Show(function(t){var u=s.variantTags(n)(y.RLProxy.value),e=L(r)(y.RLProxy.value),o=s.lookup("show")(t.type)(u)(e)(t.value);return"(inj @"+c.show(c.showString)(t.type)+" "+o+")"})}}},b=new m(function(n){return i.Nil.value}),D=function(n){return function(r){return new m(function(t){return new i.Cons(a.compare(r),q(n)(y.RLProxy.value))})}},g=function(n){return function(n){return function(n){return function(n){return function(r){return function(t){return v.unsafeHas(t.type)(n)?v.unsafeGet(t.type)(n)(t.value):r(t)}}}}}},k=function(n){return function(n){return function(r){return function(t){return function(u){return function(e){return e.type===f.reflectSymbol(n)(r)?t(e.value):u(e)}}}}}},N=function(t){return function(u){return function(e){return function(i){return k(t)(u)(i)(n.pure(e.Applicative0()))(o.const(r.empty(e.Plus1())))}}}},O=function(n){return function(n){return function(r){return function(t){return{type:f.reflectSymbol(n)(r),value:t}}}}},U=function(n){return n(function(n){return function(r){return O(r)(n)}})},F=function(n){return x.unsafeCoerce},A=new P(function(n){return i.Nil.value}),W=function(n){return function(r){return new P(function(t){return new i.Cons(e.eq(r),h(n)(y.RLProxy.value))})}},G=function(n){return function(n){return function(r){return new e.Eq(function(t){return function(u){var e=s.variantTags(n)(y.RLProxy.value),o=h(r)(y.RLProxy.value);return s.lookupEq(e)(o)(t)(u)}})}}},H=function(n){return function(r){return function(t){return function(u){return new a.Ord(function(){return G(n)(r)(t)},function(n){return function(t){var e=s.variantTags(r)(y.RLProxy.value),o=q(u)(y.RLProxy.value);return s.lookupOrd(e)(o)(n)(t)}})}}}},I=function(n){return function(r){return function(t){return function(e){return function(o){return new u.Enum(function(){return H(n)(r)(t)(e)},function(n){var t=s.variantTags(r)(y.RLProxy.value),u=E(o)(y.RLProxy.value),e=j(o.VariantBounded0())(y.RLProxy.value);return s.lookupPred(n)(t)(e)(u)},function(n){var t=s.variantTags(r)(y.RLProxy.value),u=E(o)(y.RLProxy.value),e=j(o.VariantBounded0())(y.RLProxy.value);return s.lookupSucc(n)(t)(e)(u)})}}}}},M=function(n){return function(r){return n}},_=function(n){return function(r){return function(t){return s.contractWith(r)(n)(d.RProxy.value)(d.RProxy.value)(t.type)(t)}}},z=function(n){return l.unsafeCrashWith("Data.Variant: pattern match failure ["+n.type+"]")},J=function(n){return function(r){return function(t){return function(u){return g(n)(r)(t)(u)(z)}}}},K=new R(function(n){return i.Nil.value}),Q=new V(function(){return K},function(n){return i.Nil.value}),X=function(n){return function(r){return new R(function(u){var e={top:t.top(r),bottom:t.bottom(r)};return new i.Cons(e,j(n)(y.RLProxy.value))})}},Y=function(n){return function(r){return new V(function(){return X(n.VariantBounded0())(r.Bounded0())},function(t){var e={pred:u.pred(r.Enum1()),succ:u.succ(r.Enum1()),fromEnum:u.fromEnum(r),toEnum:u.toEnum(r),cardinality:u.cardinality(r)};return new i.Cons(e,E(n)(y.RLProxy.value))})}},Z=function(n){return function(r){return function(u){return function(e){return function(o){return new t.Bounded(function(){return H(n)(r)(u)(e)},(i=s.variantTags(r)(y.RLProxy.value),a=j(o)(y.RLProxy.value),s.VariantRep(s.lookupFirst("bottom")(function(n){return n.bottom})(i)(a))),function(){var n=s.variantTags(r)(y.RLProxy.value),t=j(o)(y.RLProxy.value);return s.VariantRep(s.lookupLast("top")(function(n){return n.top})(n)(t))}());var i,a}}}}},$=function(n){return function(r){return function(t){return function(e){return function(o){return new u.BoundedEnum(function(){return Z(n)(r)(t)(e)(o.VariantBounded0())},function(){return I(n)(r)(t)(e)(o)},u.Cardinality(s.lookupCardinality(E(o)(y.RLProxy.value))),function(n){var t=s.variantTags(r)(y.RLProxy.value),u=E(o)(y.RLProxy.value);return s.lookupFromEnum(n)(t)(u)},function(n){var t=s.variantTags(r)(y.RLProxy.value),u=E(o)(y.RLProxy.value);return s.lookupToEnum(n)(t)(u)})}}}}};module.exports={inj:O,prj:N,on:k,onMatch:g,case_:z,match:J,default:M,expand:F,contract:_,Unvariant:p,unvariant:B,revariant:U,VariantEqs:P,variantEqs:h,VariantOrds:m,variantOrds:q,VariantShows:w,variantShows:L,VariantBounded:R,variantBounded:j,VariantBoundedEnums:V,variantBoundedEnums:E,eqVariantNil:A,eqVariantCons:W,eqVariant:G,boundedVariantNil:K,boundedVariantCons:X,boundedVariant:Z,enumVariantNil:Q,enumVariantCons:Y,enumVariant:I,boundedEnumVariant:$,ordVariantNil:b,ordVariantCons:D,ordVariant:H,showVariantNil:C,showVariantCons:S,showVariant:T}; -},{"../Control.Applicative/index.js":"qYya","../Control.Plus/index.js":"oMBg","../Data.Bounded/index.js":"kcUU","../Data.Enum/index.js":"oOsU","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.List.Types/index.js":"Xxuc","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7","../Data.Symbol/index.js":"4oJQ","../Data.Variant.Internal/index.js":"kYoO","../Partial.Unsafe/index.js":"aoR+","../Record.Unsafe/index.js":"KG04","../Type.Data.Row/index.js":"ukdD","../Type.Data.RowList/index.js":"XaXP","../Unsafe.Coerce/index.js":"ETUV"}],"idq0":[function(require,module,exports) { -"use strict";var n=function(){var n={},r="Pure",e="Throw",t="Catch",u="Sync",i="Async",l="Bind",o="Bracket",f="Fork",c="Sequential",a="Map",s="Apply",_="Alt",h="Cons",w="Resume",p="Release",k="Finalizer",d="Finalized",v="Forked";function m(n,r,e,t){this.tag=n,this._1=r,this._2=e,this._3=t}function b(n){var r=function(r,e,t){return new m(n,r,e,t)};return r.tag=n,r}function g(n){return new m(r,void 0)}function y(n){try{n()}catch(r){setTimeout(function(){throw r},0)}}function A(n,r,e){try{return r(e())}catch(t){return n(t)}}function P(n,r,e){try{return r(e)()}catch(t){return e(n(t))(),g}}var x=function(){var n=1024,r=0,e=0,t=new Array(n),u=!1;function i(){var i;for(u=!0;0!==r;)r--,i=t[e],t[e]=void 0,e=(e+1)%n,i();u=!1}return{isDraining:function(){return u},enqueue:function(l){var o;r===n&&(o=u,i(),u=o),t[(e+r)%n]=l,r++,u||i()}}}();var L=0,S=1,F=2,T=3,R=4,B=5,C=6;function q(n,a,s){var _=0,v=L,b=s,g=null,E=null,M=null,I=null,z=null,D=0,j=0,Y=null,G=!0;function H(s){for(var j,J,K;;)switch(j=null,J=null,K=null,v){case F:v=S,b=M(b),null===I?M=null:(M=I._1,I=I._2);break;case T:n.isLeft(b)?(v=B,g=b,b=null):null===M?v=B:(v=F,b=n.fromRight(b));break;case S:switch(b.tag){case l:M&&(I=new m(h,M,I)),M=b._2,v=S,b=b._1;break;case r:null===M?(v=B,b=n.right(b._1)):(v=F,b=b._1);break;case u:v=T,b=A(n.left,n.right,b._1);break;case i:return v=R,void(b=P(n.left,b._1,function(n){return function(){_===s&&(_++,x.enqueue(function(){_===s+1&&(v=T,b=n,H(_))}))}}));case e:v=B,g=n.left(b._1),b=null;break;case t:z=new m(h,b,null===M?z:new m(h,new m(w,M,I),z,E),E),M=null,I=null,v=S,b=b._1;break;case o:D++,z=new m(h,b,null===M?z:new m(h,new m(w,M,I),z,E),E),M=null,I=null,v=S,b=b._1;break;case f:v=T,j=q(n,a,b._2),a&&a.register(j),b._1&&j.run(),b=n.right(j);break;case c:v=S,b=O(n,a,b._1)}break;case B:if(M=null,I=null,null===z)v=C,b=E||g||b;else switch(j=z._3,K=z._1,z=z._2,K.tag){case t:E&&E!==j&&0===D?v=B:g&&(v=S,b=K._2(n.fromLeft(g)),g=null);break;case w:E&&E!==j&&0===D||g?v=B:(M=K._1,I=K._2,v=F,b=n.fromRight(b));break;case o:D--,null===g&&(J=n.fromRight(b),z=new m(h,new m(p,K._2,J),z,j),(E===j||D>0)&&(v=S,b=K._3(J)));break;case p:z=new m(h,new m(d,b,g),z,E),v=S,b=E&&E!==j&&0===D?K._1.killed(n.fromLeft(E))(K._2):g?K._1.failed(n.fromLeft(g))(K._2):K._1.completed(n.fromRight(b))(K._2),g=null,D++;break;case k:D++,z=new m(h,new m(d,b,g),z,E),v=S,b=K._1;break;case d:D--,v=B,b=K._1,g=K._2}break;case C:for(var N in Y)Y.hasOwnProperty(N)&&(G=G&&Y[N].rethrow,y(Y[N].handler(b)));return Y=null,void(E&&g?setTimeout(function(){throw n.fromLeft(g)},0):n.isLeft(b)&&G&&setTimeout(function(){if(G)throw n.fromLeft(b)},0));case L:v=S;break;case R:return}}function J(n){return function(){if(v===C)return G=G&&n.rethrow,n.handler(b)(),function(){};var r=j++;return(Y=Y||{})[r]=n,function(){null!==Y&&delete Y[r]}}}return{kill:function(r,e){return function(){if(v===C)return e(n.right(void 0))(),function(){};var t=J({rethrow:!1,handler:function(){return e(n.right(void 0))}})();switch(v){case L:E=n.left(r),v=C,b=E,H(_);break;case R:null===E&&(E=n.left(r)),0===D&&(v===R&&(z=new m(h,new m(k,b(r)),z,E)),v=B,b=null,g=null,H(++_));break;default:null===E&&(E=n.left(r)),0===D&&(v=B,b=null,g=null)}return t}},join:function(n){return function(){var r=J({rethrow:!1,handler:n})();return v===L&&H(_),r}},onComplete:J,isSuspended:function(){return v===L},run:function(){v===L&&(x.isDraining()?H(_):x.enqueue(function(){H(_)}))}}}function E(r,e,t,u){var l=0,o={},f=0,c={},w=new Error("[ParAff] Early exit"),p=null,k=n;function d(e,t,u){var i,l,f=t,c=null,w=null,p=0,k={};n:for(;;)switch(i=null,f.tag){case v:if(f._3===n&&(i=o[f._1],k[p++]=i.kill(e,function(n){return function(){0===--p&&u(n)()}})),null===c)break n;f=c._2,null===w?c=null:(c=w._1,w=w._2);break;case a:f=f._2;break;case s:case _:c&&(w=new m(h,c,w)),c=f,f=f._1}if(0===p)u(r.right(void 0))();else for(l=0,i=p;l<i;l++)k[l]=k[l]();return k}function b(e){return function(t){return function(){delete o[e._1],e._3=t,function e(t,i,l){var o,h,k,v,m,b;for(r.isLeft(t)?(o=t,h=null):(h=t,o=null);;){if(k=null,v=null,m=null,b=null,null!==p)return;if(null===i)return void u(o||h)();if(i._3!==n)return;switch(i.tag){case a:null===o?(i._3=r.right(i._1(r.fromRight(h))),h=i._3):i._3=o;break;case s:if(k=i._1._3,v=i._2._3,o){if(i._3=o,m=!0,b=f++,c[b]=d(w,o===k?i._2:i._1,function(){return function(){delete c[b],m?m=!1:null===l?e(o,null,null):e(o,l._1,l._2)}}),m)return void(m=!1)}else{if(k===n||v===n)return;h=r.right(r.fromRight(k)(r.fromRight(v))),i._3=h}break;case _:if(k=i._1._3,v=i._2._3,k===n&&r.isLeft(v)||v===n&&r.isLeft(k))return;if(k!==n&&r.isLeft(k)&&v!==n&&r.isLeft(v))o=h===k?v:k,h=null,i._3=o;else if(i._3=h,m=!0,b=f++,c[b]=d(w,h===k?i._2:i._1,function(){return function(){delete c[b],m?m=!1:null===l?e(h,null,null):e(h,l._1,l._2)}}),m)return void(m=!1)}null===l?i=null:(i=l._1,l=l._2)}}(t,e._2._1,e._2._2)}}}return function(){var u,i,f=S,c=t,w=null,p=null;n:for(;;)switch(u=null,i=null,f){case S:switch(c.tag){case a:w&&(p=new m(h,w,p)),w=new m(a,c._1,n,n),c=c._2;break;case s:w&&(p=new m(h,w,p)),w=new m(s,n,c._2,n),c=c._1;break;case _:w&&(p=new m(h,w,p)),w=new m(_,n,c._2,n),c=c._1;break;default:i=l++,f=B,u=c,c=new m(v,i,new m(h,w,p),n),(u=q(r,e,u)).onComplete({rethrow:!1,handler:b(c)})(),o[i]=u,e&&e.register(u)}break;case B:if(null===w)break n;w._1===n?(w._1=c,f=S,c=w._2,w._2=n):(w._2=c,c=w,null===p?w=null:(w=p._1,p=p._2))}for(k=c,i=0;i<l;i++)o[i].run()}(),function(n){return new m(i,function(e){return function(){return function(n,e){var t;for(var u in p=r.left(n),c)if(c.hasOwnProperty(u))for(u in t=c[u])t.hasOwnProperty(u)&&t[u]();c=null;var l=d(n,k,e);return function(n){return new m(i,function(n){return function(){for(var n in l)l.hasOwnProperty(n)&&l[n]();return g}})}}(n,e)}})}}function O(n,r,e){return new m(i,function(t){return function(){return E(n,r,e,t)}})}return m.EMPTY=n,m.Pure=b(r),m.Throw=b(e),m.Catch=b(t),m.Sync=b(u),m.Async=b(i),m.Bind=b(l),m.Bracket=b(o),m.Fork=b(f),m.Seq=b(c),m.ParMap=b(a),m.ParApply=b(s),m.ParAlt=b(_),m.Fiber=q,m.Supervisor=function(n){var r={},e=0,t=0;return{register:function(n){var u=e++;n.onComplete({rethrow:!0,handler:function(n){return function(){t--,delete r[u]}}}),r[u]=n,t++},isEmpty:function(){return 0===t},killAll:function(i,l){return function(){if(0===t)return l();var o=0,f={};function c(e){f[e]=r[e].kill(i,function(r){return function(){delete f[e],o--,n.isLeft(r)&&n.fromLeft(r)&&setTimeout(function(){throw n.fromLeft(r)},0),0===o&&l()}})()}for(var a in r)r.hasOwnProperty(a)&&(o++,c(a));return r={},e=0,t=0,function(n){return new m(u,function(){for(var n in f)f.hasOwnProperty(n)&&f[n]()})}}}}},m.Scheduler=x,m.nonCanceler=g,m}();exports._pure=n.Pure,exports._throwError=n.Throw,exports._catchError=function(r){return function(e){return n.Catch(r,e)}},exports._map=function(r){return function(e){return e.tag===n.Pure.tag?n.Pure(r(e._1)):n.Bind(e,function(e){return n.Pure(r(e))})}},exports._bind=function(r){return function(e){return n.Bind(r,e)}},exports._fork=function(r){return function(e){return n.Fork(r,e)}},exports._liftEffect=n.Sync,exports._parAffMap=function(r){return function(e){return n.ParMap(r,e)}},exports._parAffApply=function(r){return function(e){return n.ParApply(r,e)}},exports._parAffAlt=function(r){return function(e){return n.ParAlt(r,e)}},exports.makeAff=n.Async,exports.generalBracket=function(r){return function(e){return function(t){return n.Bracket(r,e,t)}}},exports._makeFiber=function(r,e){return function(){return n.Fiber(r,null,e)}},exports._makeSupervisedFiber=function(r,e){return function(){var t=n.Supervisor(r);return{fiber:n.Fiber(r,t,e),supervisor:t}}},exports._killAll=function(n,r,e){return r.killAll(n,e)},exports._delay=function(){return function(r,e){return n.Async(function(t){return function(){var u,i,l=(u=e,i=t(r()),0===u&&"undefined"!=typeof setImmediate?setImmediate(i):setTimeout(i,u));return function(){return n.Sync(function(){return r((n=l,0===e&&"undefined"!=typeof clearImmediate?clearImmediate(n):clearTimeout(n)));var n})}}})}}(),exports._sequential=n.Seq; -},{}],"XW2d":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),t=require("../Control.Apply/index.js"),r=require("../Control.Bind/index.js"),u=require("../Control.Monad/index.js"),e=require("../Control.Monad.Cont.Class/index.js"),o=require("../Control.Monad.Reader.Class/index.js"),i=require("../Control.Monad.State.Class/index.js"),c=require("../Control.Monad.Trans.Class/index.js"),f=require("../Data.Function/index.js"),a=require("../Data.Functor/index.js"),d=require("../Data.Newtype/index.js"),s=require("../Effect.Class/index.js"),C=function(n){return n},l=function(n){return function(t){return function(r){return t(n(r))}}},p=function(n){return function(t){return n(t)}},M=new d.Newtype(function(n){return n},C),T=new c.MonadTrans(function(n){return function(t){return function(u){return r.bind(n.Bind1())(t)(u)}}}),w=function(n){return function(t){return function(r){return n(t(r))}}},x=function(n){return new a.Functor(function(n){return function(t){return function(r){return t(function(t){return r(n(t))})}}})},j=function(n){return new t.Apply(function(){return x(n.Functor0())},function(n){return function(t){return function(r){return n(function(n){return t(function(t){return r(n(t))})})}}})},q=function(n){return new r.Bind(function(){return j(n.Apply0())},function(n){return function(t){return function(r){return n(function(n){return t(n)(r)})}}})},A=function(t){return new n.Applicative(function(){return j(t.Apply0())},function(n){return function(t){return t(n)}})},m=function(n){return new u.Monad(function(){return A(n.Applicative0())},function(){return q(n.Bind1())})},v=function(n){return new o.MonadAsk(function(){return m(n.Monad0())},c.lift(T)(n.Monad0())(o.ask(n)))},y=function(n){return new o.MonadReader(function(){return v(n.MonadAsk0())},function(t){return function(u){return function(e){return r.bind(n.MonadAsk0().Monad0().Bind1())(o.ask(n.MonadAsk0()))(function(r){return o.local(n)(t)(u((i=o.local(n)(f.const(r)),function(n){return i(e(n))})));var i})}}})},k=function(n){return new e.MonadCont(function(){return m(n)},function(n){return function(t){return n(function(n){return function(r){return t(n)}})(t)}})},B=function(n){return new s.MonadEffect(function(){return m(n.Monad0())},(t=c.lift(T)(n.Monad0()),r=s.liftEffect(n),function(n){return t(r(n))}));var t,r},E=function(n){return new i.MonadState(function(){return m(n.Monad0())},(t=c.lift(T)(n.Monad0()),r=i.state(n),function(n){return t(r(n))}));var t,r};module.exports={ContT:C,runContT:p,mapContT:w,withContT:l,newtypeContT:M,monadContContT:k,functorContT:x,applyContT:j,applicativeContT:A,bindContT:q,monadContT:m,monadTransContT:T,monadEffectContT:B,monadAskContT:v,monadReaderContT:y,monadStateContT:E}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Control.Monad.Cont.Class/index.js":"IpNh","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Effect.Class/index.js":"dWtH"}],"gr8B":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),e=require("../Control.Alternative/index.js"),t=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),u=require("../Control.Bind/index.js"),o=require("../Control.Category/index.js"),i=require("../Control.Monad/index.js"),a=require("../Control.Monad.Cont.Class/index.js"),c=require("../Control.Monad.Error.Class/index.js"),f=require("../Control.Monad.Reader.Class/index.js"),l=require("../Control.Monad.Rec.Class/index.js"),d=require("../Control.Monad.State.Class/index.js"),p=require("../Control.Monad.Trans.Class/index.js"),s=require("../Control.Monad.Writer.Class/index.js"),x=require("../Control.MonadPlus/index.js"),w=require("../Control.MonadZero/index.js"),M=require("../Control.Plus/index.js"),v=require("../Data.Either/index.js"),E=require("../Data.Functor/index.js"),T=require("../Data.Monoid/index.js"),m=require("../Data.Newtype/index.js"),C=require("../Data.Semigroup/index.js"),h=require("../Data.Tuple/index.js"),j=require("../Effect.Class/index.js"),q=function(n){return n},A=function(n){return function(e){return function(t){var r;return q(E.map(n)((r=e,function(n){if(n instanceof v.Right)return new v.Right(n.value0);if(n instanceof v.Left)return new v.Left(r(n.value0));throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 42, column 3 - line 42, column 32): "+[r.constructor.name,n.constructor.name])}))(t))}}},R=function(n){return n},g=new m.Newtype(function(n){return n},q),L=new p.MonadTrans(function(n){return function(e){return u.bind(n.Bind1())(e)(function(e){return t.pure(n.Applicative0())(new v.Right(e))})}}),y=function(n){return function(e){return n(e)}},B=function(n){return new E.Functor(function(e){return y(E.map(n)(E.map(v.functorEither)(e)))})},F=function(n){var e=t.pure(n);return function(n){return q(e(n))}},b=function(n){return new i.Monad(function(){return S(n)},function(){return D(n)})},D=function(n){return new u.Bind(function(){return P(n)},function(e){return function(r){return u.bind(n.Bind1())(e)(v.either((o=t.pure(n.Applicative0()),function(n){return o(v.Left.create(n))}))(function(n){return r(n)}));var o}})},P=function(n){return new r.Apply(function(){return B(n.Bind1().Apply0().Functor0())},i.ap(b(n)))},S=function(n){return new t.Applicative(function(){return P(n)},(e=t.pure(n.Applicative0()),function(n){return q(e(v.Right.create(n)))}));var e},k=function(n){return new f.MonadAsk(function(){return b(n.Monad0())},p.lift(L)(n.Monad0())(f.ask(n)))},W=function(n){return new f.MonadReader(function(){return k(n.MonadAsk0())},function(e){return y(f.local(n)(e))})},Z=function(n){return new a.MonadCont(function(){return b(n.Monad0())},function(e){return q(a.callCC(n)(function(n){return e(function(e){return q(n(new v.Right(e)))})}))})},N=function(n){return new j.MonadEffect(function(){return b(n.Monad0())},(e=p.lift(L)(n.Monad0()),t=j.liftEffect(n),function(n){return e(t(n))}));var e,t},z=function(n){return new l.MonadRec(function(){return b(n.Monad0())},function(e){var r=l.tailRecM(n)(function(r){var o=e(r);return u.bind(n.Monad0().Bind1())(o)(function(e){return t.pure(n.Monad0().Applicative0())(function(){if(e instanceof v.Left)return new l.Done(new v.Left(e.value0));if(e instanceof v.Right&&e.value0 instanceof l.Loop)return new l.Loop(e.value0.value0);if(e instanceof v.Right&&e.value0 instanceof l.Done)return new l.Done(new v.Right(e.value0.value0));throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 74, column 14 - line 77, column 43): "+[e.constructor.name])}())})});return function(n){return q(r(n))}})},G=function(n){return new d.MonadState(function(){return b(n.Monad0())},function(e){return p.lift(L)(n.Monad0())(d.state(n)(e))})},H=function(n){return new s.MonadTell(function(){return b(n.Monad0())},(e=p.lift(L)(n.Monad0()),t=s.tell(n),function(n){return e(t(n))}));var e,t},I=function(n){return new s.MonadWriter(function(){return H(n.MonadTell0())},y(function(e){return u.bind(n.MonadTell0().Monad0().Bind1())(s.listen(n)(e))(function(e){return t.pure(n.MonadTell0().Monad0().Applicative0())(E.map(v.functorEither)(function(n){return new h.Tuple(n,e.value1)})(e.value0))})}),y(function(e){return s.pass(n)(u.bind(n.MonadTell0().Monad0().Bind1())(e)(function(e){return t.pure(n.MonadTell0().Monad0().Applicative0())(function(){if(e instanceof v.Left)return new h.Tuple(new v.Left(e.value0),o.identity(o.categoryFn));if(e instanceof v.Right)return new h.Tuple(new v.Right(e.value0.value0),e.value0.value1);throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 136, column 10 - line 138, column 45): "+[e.constructor.name])}())}))}))},J=function(n){return new c.MonadThrow(function(){return b(n)},(e=t.pure(n.Applicative0()),function(n){return q(e(v.Left.create(n)))}));var e},K=function(n){return new c.MonadError(function(){return J(n)},function(e){return function(r){return u.bind(n.Bind1())(e)(v.either(function(n){return r(n)})((o=t.pure(n.Applicative0()),function(n){return o(v.Right.create(n))})));var o}})},O=function(e){return function(r){return new n.Alt(function(){return B(r.Bind1().Apply0().Functor0())},function(n){return function(o){return u.bind(r.Bind1())(n)(function(n){if(n instanceof v.Right)return t.pure(r.Applicative0())(new v.Right(n.value0));if(n instanceof v.Left)return u.bind(r.Bind1())(o)(function(u){if(u instanceof v.Right)return t.pure(r.Applicative0())(new v.Right(u.value0));if(u instanceof v.Left)return t.pure(r.Applicative0())(new v.Left(C.append(e)(n.value0)(u.value0)));throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 86, column 9 - line 88, column 49): "+[u.constructor.name])});throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 82, column 5 - line 88, column 49): "+[n.constructor.name])})}})}},Q=function(n){return function(e){return new M.Plus(function(){return O(n.Semigroup0())(e)},c.throwError(J(e))(T.mempty(n)))}},U=function(n){return function(t){return new e.Alternative(function(){return S(t)},function(){return Q(n)(t)})}},V=function(n){return function(e){return new w.MonadZero(function(){return U(n)(e)},function(){return b(e)})}},X=function(n){return function(e){return new x.MonadPlus(function(){return V(n)(e)})}};module.exports={ExceptT:q,runExceptT:R,withExceptT:A,mapExceptT:y,except:F,newtypeExceptT:g,functorExceptT:B,applyExceptT:P,applicativeExceptT:S,bindExceptT:D,monadExceptT:b,monadRecExceptT:z,altExceptT:O,plusExceptT:Q,alternativeExceptT:U,monadPlusExceptT:X,monadZeroExceptT:V,monadTransExceptT:L,monadEffectExceptT:N,monadContExceptT:Z,monadThrowExceptT:J,monadErrorExceptT:K,monadAskExceptT:k,monadReaderExceptT:W,monadStateExceptT:G,monadTellExceptT:H,monadWriterExceptT:I}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad/index.js":"U/Ix","../Control.Monad.Cont.Class/index.js":"IpNh","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Class/index.js":"gxgA","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O","../Effect.Class/index.js":"dWtH"}],"UUIS":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),e=require("../Control.Alternative/index.js"),r=require("../Control.Applicative/index.js"),t=require("../Control.Apply/index.js"),o=require("../Control.Bind/index.js"),u=require("../Control.Category/index.js"),i=require("../Control.Monad/index.js"),a=require("../Control.Monad.Cont.Class/index.js"),c=require("../Control.Monad.Error.Class/index.js"),l=require("../Control.Monad.Reader.Class/index.js"),f=require("../Control.Monad.Rec.Class/index.js"),d=require("../Control.Monad.State.Class/index.js"),M=require("../Control.Monad.Trans.Class/index.js"),s=require("../Control.Monad.Writer.Class/index.js"),p=require("../Control.MonadPlus/index.js"),w=require("../Control.MonadZero/index.js"),T=require("../Control.Plus/index.js"),y=require("../Data.Functor/index.js"),b=require("../Data.Maybe/index.js"),v=require("../Data.Newtype/index.js"),C=require("../Data.Tuple/index.js"),m=require("../Effect.Class/index.js"),x=function(n){return n},j=function(n){return n},q=new v.Newtype(function(n){return n},x),A=new M.MonadTrans(function(n){var e=i.liftM1(n)(b.Just.create);return function(n){return x(e(n))}}),h=function(n){return function(e){return n(e)}},E=function(n){return new y.Functor(function(e){return function(r){return y.map(n)(y.map(b.functorMaybe)(e))(r)}})},g=function(n){return new i.Monad(function(){return J(n)},function(){return N(n)})},N=function(n){return new o.Bind(function(){return B(n)},function(e){return function(t){return o.bind(n.Bind1())(e)(function(e){if(e instanceof b.Nothing)return r.pure(n.Applicative0())(b.Nothing.value);if(e instanceof b.Just)return t(e.value0);throw new Error("Failed pattern match at Control.Monad.Maybe.Trans (line 54, column 11 - line 56, column 42): "+[e.constructor.name])})}})},B=function(n){return new t.Apply(function(){return E(n.Bind1().Apply0().Functor0())},i.ap(g(n)))},J=function(n){return new r.Applicative(function(){return B(n)},(e=r.pure(n.Applicative0()),function(n){return x(e(b.Just.create(n)))}));var e},F=function(n){return new l.MonadAsk(function(){return g(n.Monad0())},M.lift(A)(n.Monad0())(l.ask(n)))},D=function(n){return new l.MonadReader(function(){return F(n.MonadAsk0())},function(e){return h(l.local(n)(e))})},R=function(n){return new a.MonadCont(function(){return g(n.Monad0())},function(e){return x(a.callCC(n)(function(n){return e(function(e){return x(n(new b.Just(e)))})}))})},P=function(n){return new m.MonadEffect(function(){return g(n.Monad0())},(e=M.lift(A)(n.Monad0()),r=m.liftEffect(n),function(n){return e(r(n))}));var e,r},k=function(n){return new f.MonadRec(function(){return g(n.Monad0())},function(e){var t=f.tailRecM(n)(function(t){var u=e(t);return o.bind(n.Monad0().Bind1())(u)(function(e){return r.pure(n.Monad0().Applicative0())(function(){if(e instanceof b.Nothing)return new f.Done(b.Nothing.value);if(e instanceof b.Just&&e.value0 instanceof f.Loop)return new f.Loop(e.value0.value0);if(e instanceof b.Just&&e.value0 instanceof f.Done)return new f.Done(new b.Just(e.value0.value0));throw new Error("Failed pattern match at Control.Monad.Maybe.Trans (line 84, column 16 - line 87, column 43): "+[e.constructor.name])}())})});return function(n){return x(t(n))}})},S=function(n){return new d.MonadState(function(){return g(n.Monad0())},function(e){return M.lift(A)(n.Monad0())(d.state(n)(e))})},W=function(n){return new s.MonadTell(function(){return g(n.Monad0())},(e=M.lift(A)(n.Monad0()),r=s.tell(n),function(n){return e(r(n))}));var e,r},Z=function(n){return new s.MonadWriter(function(){return W(n.MonadTell0())},h(function(e){return o.bind(n.MonadTell0().Monad0().Bind1())(s.listen(n)(e))(function(e){return r.pure(n.MonadTell0().Monad0().Applicative0())(y.map(b.functorMaybe)(function(n){return new C.Tuple(n,e.value1)})(e.value0))})}),h(function(e){return s.pass(n)(o.bind(n.MonadTell0().Monad0().Bind1())(e)(function(e){return r.pure(n.MonadTell0().Monad0().Applicative0())(function(){if(e instanceof b.Nothing)return new C.Tuple(b.Nothing.value,u.identity(u.categoryFn));if(e instanceof b.Just)return new C.Tuple(new b.Just(e.value0.value0),e.value0.value1);throw new Error("Failed pattern match at Control.Monad.Maybe.Trans (line 121, column 10 - line 123, column 43): "+[e.constructor.name])}())}))}))},L=function(n){return new c.MonadThrow(function(){return g(n.Monad0())},function(e){return M.lift(A)(n.Monad0())(c.throwError(n)(e))})},z=function(n){return new c.MonadError(function(){return L(n.MonadThrow0())},function(e){return function(r){return x(c.catchError(n)(e)(function(n){return r(n)}))}})},G=function(e){return new n.Alt(function(){return E(e.Bind1().Apply0().Functor0())},function(n){return function(t){return o.bind(e.Bind1())(n)(function(n){return n instanceof b.Nothing?t:r.pure(e.Applicative0())(n)})}})},H=function(n){return new T.Plus(function(){return G(n)},r.pure(n.Applicative0())(b.Nothing.value))},I=function(n){return new e.Alternative(function(){return J(n)},function(){return H(n)})},K=function(n){return new w.MonadZero(function(){return I(n)},function(){return g(n)})},O=function(n){return new p.MonadPlus(function(){return K(n)})};module.exports={MaybeT:x,runMaybeT:j,mapMaybeT:h,newtypeMaybeT:q,functorMaybeT:E,applyMaybeT:B,applicativeMaybeT:J,bindMaybeT:N,monadMaybeT:g,monadTransMaybeT:A,altMaybeT:G,plusMaybeT:H,alternativeMaybeT:I,monadPlusMaybeT:O,monadZeroMaybeT:K,monadRecMaybeT:k,monadEffectMaybe:P,monadContMaybeT:R,monadThrowMaybeT:L,monadErrorMaybeT:z,monadAskMaybeT:F,monadReaderMaybeT:D,monadStateMaybeT:S,monadTellMaybeT:W,monadWriterMaybeT:Z}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad/index.js":"U/Ix","../Control.Monad.Cont.Class/index.js":"IpNh","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Class/index.js":"gxgA","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.Tuple/index.js":"II/O","../Effect.Class/index.js":"dWtH"}],"uvht":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),r=require("../Control.Alternative/index.js"),e=require("../Control.Applicative/index.js"),t=require("../Control.Apply/index.js"),u=require("../Control.Bind/index.js"),o=require("../Control.Monad/index.js"),i=require("../Control.Monad.Cont.Class/index.js"),a=require("../Control.Monad.Error.Class/index.js"),c=require("../Control.Monad.Reader.Class/index.js"),d=require("../Control.Monad.Rec.Class/index.js"),f=require("../Control.Monad.State.Class/index.js"),l=require("../Control.Monad.Trans.Class/index.js"),s=require("../Control.Monad.Writer.Class/index.js"),p=require("../Control.MonadPlus/index.js"),M=require("../Control.MonadZero/index.js"),T=require("../Control.Plus/index.js"),R=require("../Data.Distributive/index.js"),w=require("../Data.Function/index.js"),C=require("../Data.Functor/index.js"),m=require("../Data.Monoid/index.js"),x=require("../Data.Newtype/index.js"),j=require("../Data.Semigroup/index.js"),q=require("../Effect.Class/index.js"),v=function(n){return n},A=function(n){return function(r){return function(e){return r(n(e))}}},y=function(n){return n},E=new x.Newtype(function(n){return n},v),D=new l.MonadTrans(function(n){return function(n){return v(w.const(n))}}),b=function(n){return function(r){return function(e){return n(r(e))}}},F=function(n){return new C.Functor((r=C.map(n),function(n){return b(r(n))}));var r},h=function n(r){return new R.Distributive(function(){return F(r.Functor0())},function(e){return function(t){var u=R.distribute(n(r))(e),o=C.map(e)(t);return function(n){return u(o(n))}}},function(n){return function(e){return function(t){return R.collect(r)(n)(function(n){return n(t)})(e)}}})},P=function(n){return new t.Apply(function(){return F(n.Functor0())},function(r){return function(e){return function(u){return t.apply(n)(r(u))(e(u))}}})},S=function(n){return new u.Bind(function(){return P(n.Apply0())},function(r){return function(e){return function(t){return u.bind(n)(r(t))(function(n){return e(n)(t)})}}})},g=function(n){return function(r){return new j.Semigroup(t.lift2(P(n))(j.append(r)))}},B=function(n){return new e.Applicative(function(){return P(n.Apply0())},(r=e.pure(n),function(n){return v(w.const(r(n)))}));var r},Z=function(n){return new o.Monad(function(){return B(n.Applicative0())},function(){return S(n.Bind1())})},W=function(n){return new c.MonadAsk(function(){return Z(n)},e.pure(n.Applicative0()))},k=function(n){return new c.MonadReader(function(){return W(n)},A)},N=function(n){return new i.MonadCont(function(){return Z(n.Monad0())},function(r){return function(e){return i.callCC(n)(function(n){return r(function(r){return v(w.const(n(r)))})(e)})}})},z=function(n){return new q.MonadEffect(function(){return Z(n.Monad0())},(r=l.lift(D)(n.Monad0()),e=q.liftEffect(n),function(n){return r(e(n))}));var r,e},G=function(n){return new d.MonadRec(function(){return Z(n.Monad0())},function(r){return function(t){return function(o){return d.tailRecM(n)(function(t){return function(o){var i=r(o);return u.bindFlipped(n.Monad0().Bind1())(e.pure(n.Monad0().Applicative0()))(i(t))}}(o))(t)}}})},H=function(n){return new f.MonadState(function(){return Z(n.Monad0())},(r=l.lift(D)(n.Monad0()),e=f.state(n),function(n){return r(e(n))}));var r,e},I=function(n){return new s.MonadTell(function(){return Z(n.Monad0())},(r=l.lift(D)(n.Monad0()),e=s.tell(n),function(n){return r(e(n))}));var r,e},J=function(n){return new s.MonadWriter(function(){return I(n.MonadTell0())},b(s.listen(n)),b(s.pass(n)))},K=function(n){return new a.MonadThrow(function(){return Z(n.Monad0())},(r=l.lift(D)(n.Monad0()),e=a.throwError(n),function(n){return r(e(n))}));var r,e},L=function(n){return new a.MonadError(function(){return K(n.MonadThrow0())},function(r){return function(e){return function(t){return a.catchError(n)(r(t))(function(n){return e(n)(t)})}}})},O=function(n){return function(r){return new m.Monoid(function(){return g(n.Apply0())(r.Semigroup0())},e.pure(B(n))(m.mempty(r)))}},Q=function(r){return new n.Alt(function(){return F(r.Functor0())},function(e){return function(t){return function(u){return n.alt(r)(e(u))(t(u))}}})},U=function(n){return new T.Plus(function(){return Q(n.Alt0())},w.const(T.empty(n)))},V=function(n){return new r.Alternative(function(){return B(n.Applicative0())},function(){return U(n.Plus1())})},X=function(n){return new M.MonadZero(function(){return V(n.Alternative1())},function(){return Z(n.Monad0())})},Y=function(n){return new p.MonadPlus(function(){return X(n.MonadZero0())})};module.exports={ReaderT:v,runReaderT:y,withReaderT:A,mapReaderT:b,newtypeReaderT:E,functorReaderT:F,applyReaderT:P,applicativeReaderT:B,altReaderT:Q,plusReaderT:U,alternativeReaderT:V,bindReaderT:S,monadReaderT:Z,monadZeroReaderT:X,semigroupReaderT:g,monoidReaderT:O,monadPlusReaderT:Y,monadTransReaderT:D,monadEffectReader:z,monadContReaderT:N,monadThrowReaderT:K,monadErrorReaderT:L,monadAskReaderT:W,monadReaderReaderT:k,monadStateReaderT:H,monadTellReaderT:I,monadWriterReaderT:J,distributiveReaderT:h,monadRecReaderT:G}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Control.Monad.Cont.Class/index.js":"IpNh","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Class/index.js":"gxgA","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Distributive/index.js":"8PTu","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Effect.Class/index.js":"dWtH"}],"VAds":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),r=require("../Control.Alternative/index.js"),e=require("../Control.Applicative/index.js"),t=require("../Control.Apply/index.js"),u=require("../Control.Bind/index.js"),o=require("../Control.Monad/index.js"),i=require("../Control.Monad.Cont.Class/index.js"),a=require("../Control.Monad.Error.Class/index.js"),c=require("../Control.Monad.Reader.Class/index.js"),l=require("../Control.Monad.Rec.Class/index.js"),f=require("../Control.Monad.State.Class/index.js"),d=require("../Control.Monad.Trans.Class/index.js"),p=require("../Control.Monad.Writer.Class/index.js"),s=require("../Control.MonadPlus/index.js"),v=require("../Control.MonadZero/index.js"),T=require("../Control.Plus/index.js"),w=require("../Data.Functor/index.js"),M=require("../Data.Monoid/index.js"),m=require("../Data.Newtype/index.js"),C=require("../Data.Semigroup/index.js"),W=require("../Data.Tuple/index.js"),x=require("../Data.Unit/index.js"),j=require("../Effect.Class/index.js"),q=function(n){return n},A=function(n){return n},y=new m.Newtype(function(n){return n},q),E=function(n){return new d.MonadTrans(function(r){return function(t){return u.bind(r.Bind1())(t)(function(t){return e.pure(r.Applicative0())(new W.Tuple(t,M.mempty(n)))})}})},D=function(n){return function(r){return n(r)}},S=function(n){return new w.Functor(function(r){return D(w.map(n)(function(n){return new W.Tuple(r(n.value0),n.value1)}))})},h=function(n){return function(r){return w.map(n)(W.snd)(r)}},B=function(n){return function(r){return new t.Apply(function(){return S(r.Functor0())},function(e){return function(u){return t.apply(r)(w.map(r.Functor0())(function(r){return function(e){return new W.Tuple(r.value0(e.value0),C.append(n)(r.value1)(e.value1))}})(e))(u)}})}},F=function(n){return function(r){return new u.Bind(function(){return B(n)(r.Apply0())},function(e){return function(t){return q(u.bind(r)(e)(function(e){var u=t(e.value0);return w.map(r.Apply0().Functor0())(function(r){return new W.Tuple(r.value0,C.append(n)(e.value1)(r.value1))})(u)}))}})}},R=function(n){return function(r){return new e.Applicative(function(){return B(n.Semigroup0())(r.Apply0())},function(t){return q(e.pure(r)(new W.Tuple(t,M.mempty(n))))})}},b=function(n){return function(r){return new o.Monad(function(){return R(n)(r.Applicative0())},function(){return F(n.Semigroup0())(r.Bind1())})}},P=function(n){return function(r){return new c.MonadAsk(function(){return b(n)(r.Monad0())},d.lift(E(n))(r.Monad0())(c.ask(r)))}},g=function(n){return function(r){return new c.MonadReader(function(){return P(n)(r.MonadAsk0())},function(n){return D(c.local(r)(n))})}},k=function(n){return function(r){return new i.MonadCont(function(){return b(n)(r.Monad0())},function(e){return q(i.callCC(r)(function(r){return e(function(e){return q(r(new W.Tuple(e,M.mempty(n))))})}))})}},Z=function(n){return function(r){return new j.MonadEffect(function(){return b(n)(r.Monad0())},(e=d.lift(E(n))(r.Monad0()),t=j.liftEffect(r),function(n){return e(t(n))}));var e,t}},L=function(n){return function(r){return new l.MonadRec(function(){return b(n)(r.Monad0())},function(t){return function(o){return q(l.tailRecM(r)(function(o){var i=t(o.value0);return u.bind(r.Monad0().Bind1())(i)(function(t){return e.pure(r.Monad0().Applicative0())(function(){if(t.value0 instanceof l.Loop)return new l.Loop(new W.Tuple(t.value0.value0,C.append(n.Semigroup0())(o.value1)(t.value1)));if(t.value0 instanceof l.Done)return new l.Done(new W.Tuple(t.value0.value0,C.append(n.Semigroup0())(o.value1)(t.value1)));throw new Error("Failed pattern match at Control.Monad.Writer.Trans (line 83, column 16 - line 85, column 47): "+[t.value0.constructor.name])}())})})(new W.Tuple(o,M.mempty(n))))}})}},N=function(n){return function(r){return new f.MonadState(function(){return b(n)(r.Monad0())},function(e){return d.lift(E(n))(r.Monad0())(f.state(r)(e))})}},U=function(n){return function(r){return new p.MonadTell(function(){return b(n)(r)},(t=e.pure(r.Applicative0()),u=W.Tuple.create(x.unit),function(n){return q(t(u(n)))}));var t,u}},z=function(n){return function(r){return new p.MonadWriter(function(){return U(n)(r)},function(n){return u.bind(r.Bind1())(n)(function(n){return e.pure(r.Applicative0())(new W.Tuple(new W.Tuple(n.value0,n.value1),n.value1))})},function(n){return u.bind(r.Bind1())(n)(function(n){return e.pure(r.Applicative0())(new W.Tuple(n.value0.value0,n.value0.value1(n.value1)))})})}},G=function(n){return function(r){return new a.MonadThrow(function(){return b(n)(r.Monad0())},function(e){return d.lift(E(n))(r.Monad0())(a.throwError(r)(e))})}},H=function(n){return function(r){return new a.MonadError(function(){return G(n)(r.MonadThrow0())},function(n){return function(e){return q(a.catchError(r)(n)(function(n){return e(n)}))}})}},I=function(r){return new n.Alt(function(){return S(r.Functor0())},function(e){return function(t){return n.alt(r)(e)(t)}})},J=function(n){return new T.Plus(function(){return I(n.Alt0())},T.empty(n))},K=function(n){return function(e){return new r.Alternative(function(){return R(n)(e.Applicative0())},function(){return J(e.Plus1())})}},O=function(n){return function(r){return new v.MonadZero(function(){return K(n)(r.Alternative1())},function(){return b(n)(r.Monad0())})}},Q=function(n){return function(r){return new s.MonadPlus(function(){return O(n)(r.MonadZero0())})}};module.exports={WriterT:q,runWriterT:A,execWriterT:h,mapWriterT:D,newtypeWriterT:y,functorWriterT:S,applyWriterT:B,applicativeWriterT:R,altWriterT:I,plusWriterT:J,alternativeWriterT:K,bindWriterT:F,monadWriterT:b,monadRecWriterT:L,monadZeroWriterT:O,monadPlusWriterT:Q,monadTransWriterT:E,monadEffectWriter:Z,monadContWriterT:k,monadThrowWriterT:G,monadErrorWriterT:H,monadAskWriterT:P,monadReaderWriterT:g,monadStateWriterT:N,monadTellWriterT:U,monadWriterWriterT:z}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Control.Monad.Cont.Class/index.js":"IpNh","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Class/index.js":"gxgA","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk","../Effect.Class/index.js":"dWtH"}],"FExJ":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),e=require("../Data.Eq/index.js"),t=require("../Data.Monoid/index.js"),u=require("../Data.Newtype/index.js"),p=require("../Data.Ord/index.js"),o=require("../Data.Semigroup/index.js"),i=require("../Data.Show/index.js"),c=require("../Unsafe.Coerce/index.js"),f=function(n){return n},a=function(n){return n},A=function(n){return n},d=function(n){return new i.Show(function(r){return"(App "+i.show(n)(r)+")"})},s=function(n){return function(e){return new o.Semigroup(function(t){return function(u){return r.lift2(n)(o.append(e))(t)(u)}})}},l=function(n){return n},q=new u.Newtype(function(n){return n},f),w=function(r){return function(e){return new t.Monoid(function(){return s(r.Apply0())(e.Semigroup0())},n.pure(r)(t.mempty(e)))}},m=function(n){return n},x=function(n){return n},h=function(n){return n},j=function(n){return n},y=c.unsafeCoerce,v=c.unsafeCoerce,D=function(n){return function(r){return n(r)}},E=function(n){return n},b=function(n){return n},C=function(n){return n},S=function(n){return n},g=function(n){return n},I=function(n){return function(r){return new e.Eq(function(t){return function(u){return e.eq1(n)(r)(t)(u)}})}},O=function(n){return function(r){return new p.Ord(function(){return I(n.Eq10())(r.Eq0())},function(e){return function(t){return p.compare1(n)(r)(e)(t)}})}},W=function(n){return new e.Eq1(function(r){return e.eq(I(n)(r))})},L=function(n){return new p.Ord1(function(){return W(n.Eq10())},function(r){return p.compare(O(n)(r))})},M=function(n){return n},N=function(n){return n},z=function(n){return n},P=function(n){return n},U=function(n){return n},Z=function(n){return n};module.exports={App:f,hoistApp:D,hoistLiftApp:v,hoistLowerApp:y,newtypeApp:q,eqApp:I,eq1App:W,ordApp:O,ord1App:L,showApp:d,semigroupApp:s,monoidApp:w,functorApp:b,functorWithIndexApp:E,applyApp:z,applicativeApp:P,bindApp:N,monadApp:h,altApp:Z,plusApp:l,alternativeApp:U,monadZeroApp:m,monadPlusApp:x,lazyApp:j,foldableApp:S,traversableApp:A,foldableWithIndexApp:C,traversableWithIndexApp:a,extendApp:g,comonadApp:M}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Data.Eq/index.js":"Pq4F","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Unsafe.Coerce/index.js":"ETUV"}],"z8br":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),r=require("../Control.Alternative/index.js"),t=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),u=require("../Control.Category/index.js"),o=require("../Control.Plus/index.js"),i=require("../Data.Eq/index.js"),c=require("../Data.Foldable/index.js"),f=require("../Data.FoldableWithIndex/index.js"),a=require("../Data.Function/index.js"),p=require("../Data.Functor/index.js"),l=require("../Data.Functor.App/index.js"),d=require("../Data.FunctorWithIndex/index.js"),s=require("../Data.Newtype/index.js"),x=require("../Data.Ord/index.js"),h=require("../Data.Show/index.js"),m=require("../Data.Traversable/index.js"),q=require("../Data.TraversableWithIndex/index.js"),F=require("../Data.Tuple/index.js"),C=function(n){return n},v=function(n){return new h.Show(function(r){return"(Compose "+h.show(n)(r)+")"})},w=new s.Newtype(function(n){return n},C),I=function(n){return function(r){return new p.Functor(function(t){return function(e){return C(p.map(n)(p.map(r)(t))(e))}})}},W=function(n){return function(r){return new d.FunctorWithIndex(function(){return I(n.Functor0())(r.Functor0())},function(t){return function(e){return C(d.mapWithIndex(n)((u=d.mapWithIndex(r),o=F.curry(t),function(n){return u(o(n))}))(e));var u,o}})}},y=function(n){return function(r){return new c.Foldable(function(t){return function(e){return function(u){return c.foldMap(n)(t)(c.foldMap(r)(t)(e))(u)}}},function(t){return function(e){return function(u){return c.foldl(n)(c.foldl(r)(t))(e)(u)}}},function(t){return function(e){return function(u){return c.foldr(n)(a.flip(c.foldr(r)(t)))(e)(u)}}})}},A=function(n){return function(r){return new f.FoldableWithIndex(function(){return y(n.Foldable0())(r.Foldable0())},function(t){return function(e){return function(u){return f.foldMapWithIndex(n)(t)((o=f.foldMapWithIndex(r)(t),i=F.curry(e),function(n){return o(i(n))}))(u);var o,i}}},function(t){return function(e){return function(u){return f.foldlWithIndex(n)((o=f.foldlWithIndex(r),i=F.curry(t),function(n){return o(i(n))}))(e)(u);var o,i}}},function(t){return function(e){return function(u){return f.foldrWithIndex(n)(function(n){return a.flip(f.foldrWithIndex(r)(F.curry(t)(n)))})(e)(u)}}})}},b=function n(r){return function(t){return new m.Traversable(function(){return y(r.Foldable1())(t.Foldable1())},function(){return I(r.Functor0())(t.Functor0())},function(e){return m.traverse(n(r)(t))(e)(u.identity(u.categoryFn))},function(n){return function(e){return function(u){return p.map(n.Apply0().Functor0())(C)(m.traverse(r)(n)(m.traverse(t)(n)(e))(u))}}})}},j=function(n){return function(r){return new q.TraversableWithIndex(function(){return A(n.FoldableWithIndex1())(r.FoldableWithIndex1())},function(){return W(n.FunctorWithIndex0())(r.FunctorWithIndex0())},function(){return b(n.Traversable2())(r.Traversable2())},function(t){return function(e){return function(u){return p.map(t.Apply0().Functor0())(C)(q.traverseWithIndex(n)(t)((o=q.traverseWithIndex(r)(t),i=F.curry(e),function(n){return o(i(n))}))(u));var o,i}}})}},D=function(n){return function(r){return function(t){return new i.Eq(function(e){return function(u){return i.eq1(n)(l.eqApp(r)(t))(l.hoistLiftApp(e))(l.hoistLiftApp(u))}})}}},E=function(n){return function(r){return function(t){return new x.Ord(function(){return D(n.Eq10())(r.Eq10())(t.Eq0())},function(e){return function(u){return x.compare1(n)(l.ordApp(r)(t))(l.hoistLiftApp(e))(l.hoistLiftApp(u))}})}}},T=function(n){return function(r){return new i.Eq1(function(t){return i.eq(D(n)(r)(t))})}},L=function(n){return function(r){return new x.Ord1(function(){return T(n.Eq10())(r.Eq10())},function(t){return x.compare(E(n)(r)(t))})}},M=function(n){return function(r){return function(t){return function(e){return r(p.map(n)(t)(e))}}}},O=function(n){return function(r){return new e.Apply(function(){return I(n.Functor0())(r.Functor0())},function(t){return function(u){return C(e.apply(n)(p.map(n.Functor0())(e.apply(r))(t))(u))}})}},P=function(n){return function(r){return new t.Applicative(function(){return O(n.Apply0())(r.Apply0())},(e=t.pure(n),u=t.pure(r),function(n){return C(e(u(n)))}));var e,u}},g=function(r){return function(t){return new n.Alt(function(){return I(r.Functor0())(t)},function(t){return function(e){return C(n.alt(r)(t)(e))}})}},N=function(n){return function(r){return new o.Plus(function(){return g(n.Alt0())(r)},o.empty(n))}},S=function(n){return function(t){return new r.Alternative(function(){return P(n.Applicative0())(t)},function(){return N(n.Plus1())(t.Apply0().Functor0())})}};module.exports={Compose:C,bihoistCompose:M,newtypeCompose:w,eqCompose:D,eq1Compose:T,ordCompose:E,ord1Compose:L,showCompose:v,functorCompose:I,functorWithIndexCompose:W,applyCompose:O,applicativeCompose:P,foldableCompose:y,foldableWithIndexCompose:A,traversableCompose:b,traversableWithIndexCompose:j,altCompose:g,plusCompose:N,alternativeCompose:S}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Control.Plus/index.js":"oMBg","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Functor.App/index.js":"FExJ","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O"}],"NR5l":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),t=require("../Control.Alternative/index.js"),r=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),i=require("../Control.Bind/index.js"),u=require("../Control.Monad.Cont.Trans/index.js"),o=require("../Control.Monad.Except.Trans/index.js"),a=require("../Control.Monad.Maybe.Trans/index.js"),c=require("../Control.Monad.Reader.Trans/index.js"),f=require("../Control.Monad.Writer.Trans/index.js"),d=require("../Control.Plus/index.js"),l=require("../Data.Either/index.js"),p=require("../Data.Functor/index.js"),s=require("../Data.Functor.Compose/index.js"),C=require("../Data.Maybe/index.js"),M=require("../Data.Newtype/index.js"),v=require("../Data.Unit/index.js"),w=require("../Effect.Class/index.js"),m=require("../Effect.Ref/index.js"),T=function(n){return n},x=function(n,t,r,e){this.Applicative1=n,this.Monad0=t,this.parallel=r,this.sequential=e},q=function(n){return n.sequential},E=function(n){return n.parallel},j=new M.Newtype(function(n){return n},T),P=function(n){return function(t){return new x(function(){return f.applicativeWriterT(n)(t.Applicative1())},function(){return f.monadWriterT(n)(t.Monad0())},f.mapWriterT(E(t)),f.mapWriterT(q(t)))}},A=function(n){return new x(function(){return c.applicativeReaderT(n.Applicative1())},function(){return c.monadReaderT(n.Monad0())},c.mapReaderT(E(n)),c.mapReaderT(q(n)))},h=function(n){return new x(function(){return s.applicativeCompose(n.Applicative1())(C.applicativeMaybe)},function(){return a.monadMaybeT(n.Monad0())},function(t){return E(n)(t)},function(t){return q(n)(t)})},B=function(n){return new x(function(){return s.applicativeCompose(n.Applicative1())(l.applicativeEither)},function(){return o.monadExceptT(n.Monad0())},function(t){return E(n)(t)},function(t){return q(n)(t)})},b=function(n){return new x(function(){return D(n)},function(){return u.monadContT(n.Monad0())},T,function(n){return n})},y=function(n){return new p.Functor(function(t){var r=E(b(n)),e=p.map(u.functorContT(n.Monad0().Bind1().Apply0().Functor0()))(t),i=q(b(n));return function(n){return r(e(i(n)))}})},R=function(n){return new e.Apply(function(){return y(n)},function(t){return function(r){return T(function(e){return i.bind(n.Monad0().Bind1())(w.liftEffect(n)(m.new(C.Nothing.value)))(function(o){return i.bind(n.Monad0().Bind1())(w.liftEffect(n)(m.new(C.Nothing.value)))(function(a){return i.discard(i.discardUnit)(n.Monad0().Bind1())(u.runContT(t)(function(t){return i.bind(n.Monad0().Bind1())(w.liftEffect(n)(m.read(a)))(function(r){if(r instanceof C.Nothing)return w.liftEffect(n)(m.write(new C.Just(t))(o));if(r instanceof C.Just)return e(t(r.value0));throw new Error("Failed pattern match at Control.Parallel.Class (line 71, column 7 - line 73, column 26): "+[r.constructor.name])})}))(function(){return u.runContT(r)(function(t){return i.bind(n.Monad0().Bind1())(w.liftEffect(n)(m.read(o)))(function(r){if(r instanceof C.Nothing)return w.liftEffect(n)(m.write(new C.Just(t))(a));if(r instanceof C.Just)return e(r.value0(t));throw new Error("Failed pattern match at Control.Parallel.Class (line 77, column 7 - line 79, column 26): "+[r.constructor.name])})})})})})})}})},D=function(n){return new r.Applicative(function(){return R(n)},(t=E(b(n)),e=r.pure(u.applicativeContT(n.Monad0().Applicative0())),function(n){return t(e(n))}));var t,e},F=function(t){return new n.Alt(function(){return y(t)},function(n){return function(e){return T(function(o){return i.bind(t.Monad0().Bind1())(w.liftEffect(t)(m.new(!1)))(function(a){return i.discard(i.discardUnit)(t.Monad0().Bind1())(u.runContT(n)(function(n){return i.bind(t.Monad0().Bind1())(w.liftEffect(t)(m.read(a)))(function(e){return e?r.pure(t.Monad0().Applicative0())(v.unit):i.discard(i.discardUnit)(t.Monad0().Bind1())(w.liftEffect(t)(m.write(!0)(a)))(function(){return o(n)})})}))(function(){return u.runContT(e)(function(n){return i.bind(t.Monad0().Bind1())(w.liftEffect(t)(m.read(a)))(function(e){return e?r.pure(t.Monad0().Applicative0())(v.unit):i.discard(i.discardUnit)(t.Monad0().Bind1())(w.liftEffect(t)(m.write(!0)(a)))(function(){return o(n)})})})})})})}})},N=function(n){return new d.Plus(function(){return F(n)},T(function(t){return r.pure(n.Monad0().Applicative0())(v.unit)}))},W=function(n){return new t.Alternative(function(){return D(n)},function(){return N(n)})};module.exports={parallel:E,sequential:q,Parallel:x,ParCont:T,monadParExceptT:B,monadParReaderT:A,monadParWriterT:P,monadParMaybeT:h,newtypeParCont:j,functorParCont:y,applyParCont:R,applicativeParCont:D,altParCont:F,plusParCont:N,alternativeParCont:W,monadParParCont:b}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad.Cont.Trans/index.js":"XW2d","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Monad.Maybe.Trans/index.js":"UUIS","../Control.Monad.Reader.Trans/index.js":"uvht","../Control.Monad.Writer.Trans/index.js":"VAds","../Control.Plus/index.js":"oMBg","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Functor.Compose/index.js":"z8br","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.Unit/index.js":"NhVk","../Effect.Class/index.js":"dWtH","../Effect.Ref/index.js":"/Jaj"}],"LNK1":[function(require,module,exports) { -"use strict";var n=require("../Control.Apply/index.js"),r=require("../Control.Category/index.js"),e=require("../Control.Parallel.Class/index.js"),t=require("../Data.Foldable/index.js"),u=require("../Data.Traversable/index.js"),i=function(n){return function(r){return function(u){var i,a=e.sequential(n),l=t.traverse_(n.Applicative1())(r)((i=e.parallel(n),function(n){return i(u(n))}));return function(n){return a(l(n))}}}},a=function(n){return function(r){return function(t){var i,a=e.sequential(n),l=u.traverse(r)(n.Applicative1())((i=e.parallel(n),function(n){return i(t(n))}));return function(n){return a(l(n))}}}},l=function(n){return function(e){return i(n)(e)(r.identity(r.categoryFn))}},o=function(n){return function(e){return a(n)(e)(r.identity(r.categoryFn))}},c=function(n){return function(r){return function(u){return function(i){return function(i){var a,l=e.sequential(n),o=t.oneOfMap(u)(r.Plus1())((a=e.parallel(n),function(n){return a(i(n))}));return function(n){return l(o(n))}}}}}},f=function(n){return function(r){return function(u){return function(i){var a=e.sequential(n),l=t.oneOfMap(u)(r.Plus1())(e.parallel(n));return function(n){return a(l(n))}}}}},p=function(r){return function(t){return function(u){return e.sequential(r)(n.apply(r.Applicative1().Apply0())(e.parallel(r)(t))(e.parallel(r)(u)))}}};module.exports={parApply:p,parTraverse:a,parTraverse_:i,parSequence:o,parSequence_:l,parOneOf:f,parOneOfMap:c}; -},{"../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Control.Parallel.Class/index.js":"NR5l","../Data.Foldable/index.js":"eVDl","../Data.Traversable/index.js":"n7EE"}],"pd0V":[function(require,module,exports) { -"use strict";exports.unsafePerformEffect=function(e){return e()}; -},{}],"tPW2":[function(require,module,exports) { -"use strict";var e=require("./foreign.js");module.exports={unsafePerformEffect:e.unsafePerformEffect}; -},{"./foreign.js":"pd0V"}],"I7lu":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),e=require("../Control.Alt/index.js"),r=require("../Control.Alternative/index.js"),t=require("../Control.Applicative/index.js"),u=require("../Control.Apply/index.js"),f=require("../Control.Bind/index.js"),i=require("../Control.Lazy/index.js"),o=require("../Control.Monad/index.js"),c=require("../Control.Monad.Error.Class/index.js"),a=require("../Control.Monad.Rec.Class/index.js"),l=require("../Control.Parallel/index.js"),p=require("../Control.Parallel.Class/index.js"),s=require("../Control.Plus/index.js"),d=require("../Data.Either/index.js"),m=require("../Data.Foldable/index.js"),A=require("../Data.Function/index.js"),w=require("../Data.Functor/index.js"),E=require("../Data.Monoid/index.js"),v=require("../Data.Newtype/index.js"),h=require("../Data.Semigroup/index.js"),q=require("../Data.Unit/index.js"),j=require("../Effect/index.js"),x=require("../Effect.Class/index.js"),y=require("../Effect.Exception/index.js"),C=require("../Effect.Unsafe/index.js"),b=require("../Partial.Unsafe/index.js"),g=require("../Unsafe.Coerce/index.js"),k=function(n){return n},F=function(n){return n},_=function(n){return n},P=n._fork(!1),M=new v.Newtype(function(n){return n},_),S=new w.Functor(n._parAffMap),L=new w.Functor(n._map),R=n._fork(!0),D={isLeft:function(n){if(n instanceof d.Left)return!0;if(n instanceof d.Right)return!1;throw new Error("Failed pattern match at Effect.Aff (line 390, column 12 - line 392, column 20): "+[n.constructor.name])},fromLeft:function(n){if(n instanceof d.Left)return n.value0;if(n instanceof d.Right)return b.unsafeCrashWith("unsafeFromLeft: Right");throw new Error("Failed pattern match at Effect.Aff (line 395, column 20 - line 397, column 54): "+[n.constructor.name])},fromRight:function(n){if(n instanceof d.Right)return n.value0;if(n instanceof d.Left)return b.unsafeCrashWith("unsafeFromRight: Left");throw new Error("Failed pattern match at Effect.Aff (line 400, column 21 - line 402, column 54): "+[n.constructor.name])},left:d.Left.create,right:d.Right.create},B=function(e){return n._makeFiber(D,e)},z=function(n){return function(){var e=B(n)();return e.run(),e}},U=function(){var n=w.void(j.functorEffect);return function(e){return n(z(e))}}(),W=B,N=function(e){return n._delay(d.Right.create,e)},T=function(e){return function(r){return n.generalBracket(e)({killed:A.const(r),failed:A.const(r),completed:A.const(r)})}},G=new u.Apply(function(){return S},n._parAffApply),H=function(n){return new h.Semigroup(u.lift2(G)(h.append(n)))},I=new o.Monad(function(){return O},function(){return J}),J=new f.Bind(function(){return K},n._bind),K=new u.Apply(function(){return L},o.ap(I)),O=new t.Applicative(function(){return K},n._pure),Q=function(e){return function(r){return n.generalBracket(t.pure(O)(q.unit))({killed:function(n){return function(e){return r(n)}},failed:A.const(t.pure(O)),completed:A.const(t.pure(O))})(A.const(e))}},V=function(n){return function(e){return T(t.pure(O)(q.unit))(A.const(n))(A.const(e))}},X=function(n){return T(n)(A.const(t.pure(O)(q.unit)))(t.pure(O))},Y=new i.Lazy(function(n){return f.bind(J)(t.pure(O)(q.unit))(n)}),Z=function(n){return new h.Semigroup(u.lift2(K)(h.append(n)))},$=new x.MonadEffect(function(){return I},n._liftEffect),nn=function(){var n=x.liftEffect($);return function(e){return _(A.const(n(e)))}}(),en=function(e){return n.makeAff(function(n){return w.map(j.functorEffect)(nn)(e.join(n))})},rn=new w.Functor(function(n){return function(e){return C.unsafePerformEffect(B(w.map(L)(n)(en(e))))}}),tn=new u.Apply(function(){return rn},function(n){return function(e){return C.unsafePerformEffect(B(u.apply(K)(en(n))(en(e))))}}),un=new t.Applicative(function(){return tn},function(n){return C.unsafePerformEffect(B(t.pure(O)(n)))}),fn=function(e){return function(r){return f.bind(J)(x.liftEffect($)(r.isSuspended))(function(u){return u?x.liftEffect($)(w.void(j.functorEffect)(r.kill(e,A.const(t.pure(j.applicativeEffect)(q.unit))))):n.makeAff(function(n){return w.map(j.functorEffect)(nn)(r.kill(e,n))})})}},on=function(){var n=A.flip(fn);return function(e){return _(n(e))}}(),cn=new c.MonadThrow(function(){return I},n._throwError),an=new c.MonadError(function(){return cn},n._catchError),ln=c.try(an),pn=function(n){return function(e){return z(f.bindFlipped(J)((r=x.liftEffect($),function(e){return r(n(e))}))(c.try(an)(e)));var r}},sn=function(n){return function(e){return w.void(j.functorEffect)(pn(n)(e))}},dn=function(n){return function(e){return W(f.bindFlipped(J)((r=x.liftEffect($),function(e){return r(n(e))}))(c.try(an)(e)));var r}},mn=new p.Parallel(function(){return An},function(){return I},g.unsafeCoerce,n._sequential),An=new t.Applicative(function(){return G},function(){var n=p.parallel(mn),e=t.pure(O);return function(r){return n(e(r))}}()),wn=function(n){return new E.Monoid(function(){return H(n.Semigroup0())},t.pure(An)(E.mempty(n)))},En=new h.Semigroup(function(n){return function(e){return function(r){return l.parSequence_(mn)(m.foldableArray)([n(r),e(r)])}}}),vn=function(e){var r=y.error("[Aff] Child fiber outlived parent"),u=function(e){return function(r){return n.makeAff(function(u){return n._killAll(e,r.supervisor,u(t.pure(d.applicativeEither)(q.unit)))})}};return n.generalBracket(x.liftEffect($)(function(){var r=n._makeSupervisedFiber(D,e)();return r.fiber.run(),r}))({killed:function(n){return function(e){return l.parSequence_(mn)(m.foldableArray)([fn(n)(e.fiber),u(n)(e)])}},failed:A.const(u(r)),completed:A.const(u(r))})(function(n){return en(n.fiber)})},hn=new a.MonadRec(function(){return I},function(n){return function e(r){return f.bind(J)(n(r))(function(n){if(n instanceof a.Done)return t.pure(O)(n.value0);if(n instanceof a.Loop)return e(n.value0);throw new Error("Failed pattern match at Effect.Aff (line 100, column 7 - line 102, column 22): "+[n.constructor.name])})}}),qn=function(n){return new E.Monoid(function(){return Z(n.Semigroup0())},t.pure(O)(E.mempty(n)))},jn=A.const(t.pure(O)(q.unit)),xn=new E.Monoid(function(){return En},jn),yn=n.makeAff(function(n){return t.pure(j.applicativeEffect)(E.mempty(xn))}),Cn=function(){var n=w.map(L)(A.const(q.unit));return function(e){return n(ln(e))}}(),bn=new e.Alt(function(){return S},n._parAffAlt),gn=new e.Alt(function(){return L},function(n){return function(e){return c.catchError(an)(n)(A.const(e))}}),kn=new s.Plus(function(){return gn},c.throwError(cn)(y.error("Always fails"))),Fn=new s.Plus(function(){return bn},p.parallel(mn)(s.empty(kn))),_n=new r.Alternative(function(){return An},function(){return Fn});module.exports={Canceler:_,launchAff:z,launchAff_:U,launchSuspendedAff:W,runAff:pn,runAff_:sn,runSuspendedAff:dn,forkAff:R,suspendAff:P,supervise:vn,attempt:ln,apathize:Cn,delay:N,never:yn,finally:V,invincible:X,killFiber:fn,joinFiber:en,cancelWith:Q,bracket:T,nonCanceler:jn,effectCanceler:nn,fiberCanceler:on,functorAff:L,applyAff:K,applicativeAff:O,bindAff:J,monadAff:I,semigroupAff:Z,monoidAff:qn,altAff:gn,plusAff:kn,monadRecAff:hn,monadThrowAff:cn,monadErrorAff:an,monadEffectAff:$,lazyAff:Y,functorParAff:S,applyParAff:G,applicativeParAff:An,semigroupParAff:H,monoidParAff:wn,altParAff:bn,plusParAff:Fn,alternativeParAff:_n,parallelAff:mn,functorFiber:rn,applyFiber:tn,applicativeFiber:un,newtypeCanceler:M,semigroupCanceler:En,monoidCanceler:xn,makeAff:n.makeAff,generalBracket:n.generalBracket}; -},{"./foreign.js":"idq0","../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Lazy/index.js":"y9cE","../Control.Monad/index.js":"U/Ix","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Parallel/index.js":"LNK1","../Control.Parallel.Class/index.js":"NR5l","../Control.Plus/index.js":"oMBg","../Data.Either/index.js":"B2JL","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Unit/index.js":"NhVk","../Effect/index.js":"oTWB","../Effect.Class/index.js":"dWtH","../Effect.Exception/index.js":"0OCW","../Effect.Unsafe/index.js":"tPW2","../Partial.Unsafe/index.js":"aoR+","../Unsafe.Coerce/index.js":"ETUV"}],"89Lg":[function(require,module,exports) { -"use strict";var e=function(){function e(){this.head=null,this.last=null,this.size=0}function n(e,n){this.queue=e,this.value=n,this.next=null,this.prev=null}function t(n){this.draining=!1,this.error=null,this.value=n,this.takes=new e,this.reads=new e,this.puts=new e}var r={};function u(e){try{e()}catch(n){setTimeout(function(){throw n},0)}}function a(e){var n;switch(e.size){case 0:return null;case 1:n=e.head,e.head=null;break;case 2:n=e.last,e.head.next=null,e.last=null;break;default:n=e.last,e.last=n.prev,e.last.next=null}return n.prev=null,n.queue=null,e.size--,n.value}function l(e){var n;switch(e.size){case 0:return null;case 1:n=e.head,e.head=null;break;case 2:n=e.head,e.last.prev=null,e.head=e.last,e.last=null;break;default:n=e.head,e.head=n.next,e.head.prev=null}return n.next=null,n.queue=null,e.size--,n.value}return t.EMPTY=r,t.putLast=function(e,t){var r=new n(e,t);switch(e.size){case 0:e.head=r;break;case 1:r.prev=e.head,e.head.next=r,e.last=r;break;default:r.prev=e.last,e.last.next=r,e.last=r}return e.size++,r},t.takeLast=a,t.takeHead=l,t.deleteCell=function(e){null!==e.queue&&(e.queue.last!==e?e.queue.head!==e?(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.queue.size--,e.queue=null,e.value=null,e.next=null,e.prev=null):l(e.queue):a(e.queue))},t.drainVar=function(e,n){if(!n.draining){var t,a,i,s,o,c=n.puts,f=n.takes,v=n.reads;for(n.draining=!0;;){if(t=null,a=null,i=null,s=n.value,o=v.size,null!==n.error){for(s=e.left(n.error);t=l(c);)u(t.cb(s));for(;a=l(v);)u(a(s));for(;i=l(f);)u(i(s));break}if(s===r&&(t=l(c))&&(n.value=s=t.value),s!==r){for(i=l(f);o--&&(a=l(v));)u(a(e.right(s)));null!==i&&(n.value=r,u(i(e.right(s))))}if(null!==t&&u(t.cb(e.right(void 0))),n.value===r&&0===c.size||n.value!==r&&0===f.size)break}n.draining=!1}},t}();exports.empty=function(){return new e(e.EMPTY)},exports._newVar=function(n){return function(){return new e(n)}},exports._killVar=function(n,t,r){return function(){null===r.error&&(r.error=t,r.value=e.EMPTY,e.drainVar(n,r))}},exports._putVar=function(n,t,r,u){return function(){var a=e.putLast(r.puts,{cb:u,value:t});return e.drainVar(n,r),function(){e.deleteCell(a)}}},exports._takeVar=function(n,t,r){return function(){var u=e.putLast(t.takes,r);return e.drainVar(n,t),function(){e.deleteCell(u)}}},exports._readVar=function(n,t,r){return function(){var u=e.putLast(t.reads,r);return e.drainVar(n,t),function(){e.deleteCell(u)}}},exports._tryPutVar=function(n,t,r){return function(){return r.value===e.EMPTY&&null===r.error&&(r.value=t,e.drainVar(n,r),!0)}},exports._tryTakeVar=function(n,t){return function(){var r=t.value;return r===e.EMPTY?n.nothing:(t.value=e.EMPTY,e.drainVar(n,t),n.just(r))}},exports._tryReadVar=function(n,t){return function(){return t.value===e.EMPTY?n.nothing:n.just(t.value)}},exports._status=function(n,t){return function(){return t.error?n.killed(t.error):t.value===e.EMPTY?n.empty:n.filled(t.value)}}; -},{}],"XiHq":[function(require,module,exports) { -"use strict";var t=require("./foreign.js"),n=require("../Data.Either/index.js"),e=require("../Data.Maybe/index.js"),r=function(){function t(t){this.value0=t}return t.create=function(n){return new t(n)},t}(),u=function(){function t(t){this.value0=t}return t.create=function(n){return new t(n)},t}(),i=function(){function t(){}return t.value=new t,t}(),a=t._newVar,c=function(t){return t instanceof r},o=function(t){return t instanceof u},f=function(t){return t instanceof i},l={left:n.Left.create,right:n.Right.create,nothing:e.Nothing.value,just:e.Just.create,killed:r.create,filled:u.create,empty:i.value},s=function(n){return function(e){return t._killVar(l,n,e)}},d=function(n){return function(e){return function(r){return t._putVar(l,n,e,r)}}},y=function(n){return function(e){return t._readVar(l,n,e)}},_=function(n){return t._status(l,n)},p=function(n){return function(e){return t._takeVar(l,n,e)}},V=function(n){return function(e){return t._tryPutVar(l,n,e)}},h=function(n){return t._tryReadVar(l,n)},k=function(n){return t._tryTakeVar(l,n)};module.exports={Killed:r,Filled:u,Empty:i,new:a,take:p,tryTake:k,put:d,tryPut:V,read:y,tryRead:h,kill:s,status:_,isEmpty:f,isFilled:o,isKilled:c,empty:t.empty}; -},{"./foreign.js":"89Lg","../Data.Either/index.js":"B2JL","../Data.Maybe/index.js":"5mN7"}],"hACG":[function(require,module,exports) { -"use strict";var t=require("../Effect.AVar/index.js"),f=require("../Effect.Aff/index.js"),n=require("../Effect.Class/index.js"),e=function(){var e=n.liftEffect(f.monadEffectAff);return function(f){return e(t.tryTake(f))}}(),r=function(){var e=n.liftEffect(f.monadEffectAff);return function(f){return e(t.tryRead(f))}}(),u=function(e){var r=n.liftEffect(f.monadEffectAff),u=t.tryPut(e);return function(t){return r(u(t))}},c=function(n){return f.makeAff(function(e){return function(){var r=t.take(n)(e)();return f.effectCanceler(r)}})},i=function(){var e=n.liftEffect(f.monadEffectAff);return function(f){return e(t.status(f))}}(),a=function(n){return f.makeAff(function(e){return function(){var r=t.read(n)(e)();return f.effectCanceler(r)}})},o=function(n){return function(e){return f.makeAff(function(r){return function(){var u=t.put(n)(e)(r)();return f.effectCanceler(u)}})}},E=function(){var e=n.liftEffect(f.monadEffectAff);return function(f){return e(t.new(f))}}(),l=function(e){var r=n.liftEffect(f.monadEffectAff),u=t.kill(e);return function(t){return r(u(t))}},d=n.liftEffect(f.monadEffectAff)(t.empty);module.exports={new:E,empty:d,status:i,take:c,tryTake:e,put:o,tryPut:u,read:a,tryRead:r,kill:l}; -},{"../Effect.AVar/index.js":"XiHq","../Effect.Aff/index.js":"I7lu","../Effect.Class/index.js":"dWtH"}],"ty16":[function(require,module,exports) { -"use strict";exports.log=function(n){return function(){return console.log(n),{}}},exports.warn=function(n){return function(){return console.warn(n),{}}},exports.error=function(n){return function(){return console.error(n),{}}},exports.info=function(n){return function(){return console.info(n),{}}},exports.time=function(n){return function(){return console.time(n),{}}},exports.timeEnd=function(n){return function(){return console.timeEnd(n),{}}}; -},{}],"+3bp":[function(require,module,exports) { -"use strict";var r=require("./foreign.js"),n=require("../Data.Show/index.js"),o=function(o){return function(e){return r.warn(n.show(o)(e))}},e=function(o){return function(e){return r.log(n.show(o)(e))}},t=function(o){return function(e){return r.info(n.show(o)(e))}},i=function(o){return function(e){return r.error(n.show(o)(e))}};module.exports={logShow:e,warnShow:o,errorShow:i,infoShow:t,log:r.log,warn:r.warn,error:r.error,info:r.info,time:r.time,timeEnd:r.timeEnd}; -},{"./foreign.js":"ty16","../Data.Show/index.js":"mFY7"}],"3Dts":[function(require,module,exports) { -"use strict";var n=require("../Effect.Class/index.js"),r=require("../Effect.Console/index.js"),t=function(t){return function(f){var e=n.liftEffect(t),u=r.warnShow(f);return function(n){return e(u(n))}}},f=function(t){var f=n.liftEffect(t);return function(n){return f(r.warn(n))}},e=function(t){var f=n.liftEffect(t);return function(n){return f(r.timeEnd(n))}},u=function(t){var f=n.liftEffect(t);return function(n){return f(r.time(n))}},o=function(t){return function(f){var e=n.liftEffect(t),u=r.logShow(f);return function(n){return e(u(n))}}},i=function(t){var f=n.liftEffect(t);return function(n){return f(r.log(n))}},c=function(t){return function(f){var e=n.liftEffect(t),u=r.infoShow(f);return function(n){return e(u(n))}}},l=function(t){var f=n.liftEffect(t);return function(n){return f(r.info(n))}},a=function(t){return function(f){var e=n.liftEffect(t),u=r.errorShow(f);return function(n){return e(u(n))}}},E=function(t){var f=n.liftEffect(t);return function(n){return f(r.error(n))}};module.exports={log:i,logShow:o,warn:f,warnShow:t,error:E,errorShow:a,info:l,infoShow:c,time:u,timeEnd:e}; -},{"../Effect.Class/index.js":"dWtH","../Effect.Console/index.js":"+3bp"}],"kKQF":[function(require,module,exports) { -"use strict";function t(o){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(o)}exports.unsafeToForeign=function(t){return t},exports.unsafeFromForeign=function(t){return t},exports.typeOf=function(o){return t(o)},exports.tagOf=function(t){return Object.prototype.toString.call(t).slice(8,-1)},exports.isNull=function(t){return null===t},exports.isUndefined=function(t){return void 0===t},exports.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}; -},{}],"Fye2":[function(require,module,exports) { -"use strict";var t=require("../Control.Monad.Except.Trans/index.js"),e=require("../Data.Identity/index.js"),n=require("../Data.Newtype/index.js"),r=t.withExceptT(e.functorIdentity),i=function(){var r=n.unwrap(e.newtypeIdentity);return function(e){return r(t.runExceptT(e))}}(),u=function(r){return t.mapExceptT((i=n.unwrap(e.newtypeIdentity),function(t){return e.Identity(r(i(t)))}));var i};module.exports={runExcept:i,mapExcept:u,withExcept:r}; -},{"../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Identity/index.js":"2OKT","../Data.Newtype/index.js":"lz8k"}],"XAY7":[function(require,module,exports) { -"use strict";var n=require("../Control.Bind/index.js"),t=require("../Control.Category/index.js"),e=require("../Data.Boolean/index.js"),r=require("../Data.Eq/index.js"),u=require("../Data.Function/index.js"),o=require("../Data.Functor/index.js"),i=require("../Data.FunctorWithIndex/index.js"),a=require("../Data.List/index.js"),c=require("../Data.List.Types/index.js"),l=require("../Data.Maybe/index.js"),f=require("../Data.NonEmpty/index.js"),s=require("../Data.Ord/index.js"),m=require("../Data.Semigroup/index.js"),p=require("../Data.Semigroup.Traversable/index.js"),v=require("../Data.Tuple/index.js"),d=require("../Data.Unfoldable/index.js"),y=require("../Partial.Unsafe/index.js"),w=function(n){return function(t){return function(e){return new f.NonEmpty(n(t.value0)(e.value0),a.zipWith(n)(t.value1)(e.value1))}}},h=function(n){return function(t){return function(e){return function(r){return p.sequence1(c.traversable1NonEmptyList)(n.Apply0())(w(t)(e)(r))}}}},E=w(v.Tuple.create),N=function(n){return function(t){return function(e){return function(r){var u=t(new c.Cons(e.value0,e.value1))(new c.Cons(r.value0,r.value1));if(u instanceof c.Cons)return new f.NonEmpty(u.value0,u.value1);if(u instanceof c.Nil)return y.unsafeCrashWith("Impossible: empty list in NonEmptyList "+n);throw new Error("Failed pattern match at Data.List.NonEmpty (line 104, column 3 - line 106, column 81): "+[u.constructor.name])}}}},b=function(n){return function(t){return function(e){var r=t(new c.Cons(e.value0,e.value1));if(r instanceof c.Cons)return new f.NonEmpty(r.value0,r.value1);if(r instanceof c.Nil)return y.unsafeCrashWith("Impossible: empty list in NonEmptyList "+n);throw new Error("Failed pattern match at Data.List.NonEmpty (line 91, column 3 - line 93, column 81): "+[r.constructor.name])}}},L=function(n){return function(t){return function(r){if(0===n)return new l.Just(new f.NonEmpty(t,r.value1));if(e.otherwise)return o.map(l.functorMaybe)(function(n){return c.NonEmptyList((t=n,new f.NonEmpty(r.value0,t)));var t})(a.updateAt(n-1|0)(t)(r.value1));throw new Error("Failed pattern match at Data.List.NonEmpty (line 197, column 1 - line 197, column 75): "+[n.constructor.name,t.constructor.name,r.constructor.name])}}},x=function(n){return new v.Tuple(o.map(c.functorNonEmptyList)(v.fst)(n),o.map(c.functorNonEmptyList)(v.snd)(n))},D=function(n){var t=a.unsnoc(n.value1);if(t instanceof l.Nothing)return{init:c.Nil.value,last:n.value0};if(t instanceof l.Just)return{init:new c.Cons(n.value0,t.value0.init),last:t.value0.last};throw new Error("Failed pattern match at Data.List.NonEmpty (line 159, column 35 - line 161, column 50): "+[t.constructor.name])},g=function(){var n=N("unionBy");return function(t){return n(a.unionBy(t))}}(),q=function(n){return N("union")(a.union(n))},F=function(n){return{head:n.value0,tail:n.value1}},B=function(n){return new c.Cons(n.value0,n.value1)},C=function(n){var t=d.unfoldr(n)(function(n){return o.map(l.functorMaybe)(function(n){return new v.Tuple(n.head,n.tail)})(a.uncons(n))});return function(n){return t(B(n))}},j=function(n){return n.value1},M=function(){var n=b("sortBy");return function(t){return n(a.sortBy(t))}}(),W=function(n){return function(t){return M(s.compare(n))(t)}},I=function(n){return function(t){return new f.NonEmpty(n.value0,a.snoc(n.value1)(t))}},J=function(){var n=f.singleton(c.plusList);return function(t){return c.NonEmptyList(n(t))}}(),A=function(n){return function(t){if(n instanceof c.Cons)return new f.NonEmpty(n.value0,a.snoc(n.value1)(t));if(n instanceof c.Nil)return J(t);throw new Error("Failed pattern match at Data.List.NonEmpty (line 139, column 1 - line 139, column 51): "+[n.constructor.name,t.constructor.name])}},T=b("reverse")(a.reverse),z=function(){var n=b("nubBy");return function(t){return n(a.nubBy(t))}}(),k=function(n){return b("nub")(a.nub(n))},U=function(n){return function(t){return function(r){if(0===n)return new l.Just(new f.NonEmpty(t(r.value0),r.value1));if(e.otherwise)return o.map(l.functorMaybe)(function(n){return c.NonEmptyList((t=n,new f.NonEmpty(r.value0,t)));var t})(a.modifyAt(n-1|0)(t)(r.value1));throw new Error("Failed pattern match at Data.List.NonEmpty (line 202, column 1 - line 202, column 82): "+[n.constructor.name,t.constructor.name,r.constructor.name])}}},S=i.mapWithIndex(c.functorWithIndexNonEmptyList),O=function(n){return function(t){return n(new c.Cons(t.value0,t.value1))}},P=function(n){return O(a.mapMaybe(n))},G=function(n){return O(a.partition(n))},H=function(n){return O(a.span(n))},K=function(n){return O(a.take(n))},Q=function(n){return O(a.takeWhile(n))},R=function(n){return 1+a.length(n.value1)|0},V=function(n){return l.fromMaybe(n.value0)(a.last(n.value1))},X=function(){var n=N("intersectBy");return function(t){return n(a.intersectBy(t))}}(),Y=function(n){return N("intersect")(a.intersect(n))},Z=function(n){return function(t){return function(r){if(0===n)return new l.Just(new f.NonEmpty(t,new c.Cons(r.value0,r.value1)));if(e.otherwise)return o.map(l.functorMaybe)(function(n){return c.NonEmptyList((t=n,new f.NonEmpty(r.value0,t)));var t})(a.insertAt(n-1|0)(t)(r.value1));throw new Error("Failed pattern match at Data.List.NonEmpty (line 192, column 1 - line 192, column 75): "+[n.constructor.name,t.constructor.name,r.constructor.name])}}},$=function(n){return l.maybe(c.Nil.value)(function(t){return new c.Cons(n.value0,t)})(a.init(n.value1))},_=function(n){return function(t){if(0===t)return new l.Just(n.value0);if(e.otherwise)return a.index(n.value1)(t-1|0);throw new Error("Failed pattern match at Data.List.NonEmpty (line 166, column 1 - line 166, column 52): "+[n.constructor.name,t.constructor.name])}},nn=function(n){return n.value0},tn=function(){var n=b("groupBy");return function(t){return n(a.groupBy(t))}}(),en=function(n){return b("group'")(a["group'"](n))},rn=function(n){return b("group")(a.group(n))},un=function(n){if(n instanceof c.Nil)return l.Nothing.value;if(n instanceof c.Cons)return new l.Just(new f.NonEmpty(n.value0,n.value1));throw new Error("Failed pattern match at Data.List.NonEmpty (line 120, column 1 - line 120, column 57): "+[n.constructor.name])},on=function(n){var t=a.fromFoldable(n);return function(n){return un(t(n))}},an=function(t){return function(e){return function(r){return function(u){return n.bind(t.Bind1())(e(r)(u.value0))(function(n){return a.foldM(t)(e)(n)(u.value1)})}}}},cn=function(n){return function(t){var r=a.findLastIndex(n)(t.value1);if(r instanceof l.Just)return new l.Just(r.value0+1|0);if(r instanceof l.Nothing){if(n(t.value0))return new l.Just(0);if(e.otherwise)return l.Nothing.value}throw new Error("Failed pattern match at Data.List.NonEmpty (line 186, column 3 - line 190, column 29): "+[r.constructor.name])}},ln=function(n){return function(t){if(n(t.value0))return new l.Just(0);if(e.otherwise)return o.map(l.functorMaybe)(function(n){return n+1|0})(a.findIndex(n)(t.value1));throw new Error("Failed pattern match at Data.List.NonEmpty (line 179, column 1 - line 179, column 69): "+[n.constructor.name,t.constructor.name])}},fn=function(n){var t=a.filterM(n);return function(n){return O(t(n))}},sn=function(n){return O(a.filter(n))},mn=function(n){return function(t){return cn(function(e){return r.eq(n)(e)(t)})}},pn=function(n){return function(t){return ln(function(e){return r.eq(n)(e)(t)})}},vn=function(n){return O(a.dropWhile(n))},dn=function(n){return O(a.drop(n))},yn=function(n){return function(t){return new f.NonEmpty(n,t)}},wn=function(n){return function(t){return new f.NonEmpty(n,new c.Cons(t.value0,t.value1))}},hn=u.flip(n.bind(c.bindNonEmptyList)),En=function(e){return n.bind(c.bindNonEmptyList)(e)(t.identity(t.categoryFn))},Nn=O(a.catMaybes),bn=function(n){return function(t){return function(e){return new f.NonEmpty(t.value0,m.append(c.semigroupList)(t.value1)(a.fromFoldable(n)(e)))}}};module.exports={toUnfoldable:C,fromFoldable:on,fromList:un,toList:B,singleton:J,length:R,cons:wn,"cons'":yn,snoc:I,"snoc'":A,head:nn,last:V,tail:j,init:$,uncons:F,unsnoc:D,index:_,elemIndex:pn,elemLastIndex:mn,findIndex:ln,findLastIndex:cn,insertAt:Z,updateAt:L,modifyAt:U,reverse:T,concat:En,concatMap:hn,filter:sn,filterM:fn,mapMaybe:P,catMaybes:Nn,appendFoldable:bn,mapWithIndex:S,sort:W,sortBy:M,take:K,takeWhile:Q,drop:dn,dropWhile:vn,span:H,group:rn,"group'":en,groupBy:tn,partition:G,nub:k,nubBy:z,union:q,unionBy:g,intersect:Y,intersectBy:X,zipWith:w,zipWithA:h,zip:E,unzip:x,foldM:an}; -},{"../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.NonEmpty/index.js":"qF8i","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Semigroup.Traversable/index.js":"qkfi","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Partial.Unsafe/index.js":"aoR+"}],"pu1p":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),n=require("../Control.Applicative/index.js"),r=require("../Control.Monad.Error.Class/index.js"),t=require("../Control.Monad.Except/index.js"),a=require("../Control.Monad.Except.Trans/index.js"),i=require("../Data.Boolean/index.js"),o=require("../Data.Either/index.js"),u=require("../Data.Eq/index.js"),c=require("../Data.Function/index.js"),l=require("../Data.Identity/index.js"),s=require("../Data.Int/index.js"),f=require("../Data.List.NonEmpty/index.js"),d=require("../Data.Maybe/index.js"),v=require("../Data.Ord/index.js"),p=require("../Data.Ordering/index.js"),m=require("../Data.Show/index.js"),h=require("../Data.String.CodeUnits/index.js"),w=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),g=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(r){return new e(n,r)}},e}(),E=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(r){return new e(n,r)}},e}(),T=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(r){return new e(n,r)}},e}(),x=new m.Show(function(e){if(e instanceof w)return"(ForeignError "+m.show(m.showString)(e.value0)+")";if(e instanceof E)return"(ErrorAtIndex "+m.show(m.showInt)(e.value0)+" "+m.show(x)(e.value1)+")";if(e instanceof T)return"(ErrorAtProperty "+m.show(m.showString)(e.value0)+" "+m.show(x)(e.value1)+")";if(e instanceof g)return"(TypeMismatch "+m.show(m.showString)(e.value0)+" "+m.show(m.showString)(e.value1)+")";throw new Error("Failed pattern match at Foreign (line 63, column 1 - line 67, column 89): "+[e.constructor.name])}),F=function e(n){if(n instanceof w)return n.value0;if(n instanceof E)return"Error at array index "+m.show(m.showInt)(n.value0)+": "+e(n.value1);if(n instanceof T)return"Error at property "+m.show(m.showString)(n.value0)+": "+e(n.value1);if(n instanceof g)return"Type mismatch: expected "+n.value0+", found "+n.value1;throw new Error("Failed pattern match at Foreign (line 72, column 1 - line 72, column 45): "+[n.constructor.name])},y=function(r){if(e.isUndefined(r))return n.pure(a.applicativeExceptT(l.monadIdentity))(d.Nothing.value);if(i.otherwise)return n.pure(a.applicativeExceptT(l.monadIdentity))(new d.Just(r));throw new Error("Failed pattern match at Foreign (line 157, column 1 - line 157, column 46): "+[r.constructor.name])},q=function(r){if(e.isNull(r)||e.isUndefined(r))return n.pure(a.applicativeExceptT(l.monadIdentity))(d.Nothing.value);if(i.otherwise)return n.pure(a.applicativeExceptT(l.monadIdentity))(new d.Just(r));throw new Error("Failed pattern match at Foreign (line 162, column 1 - line 162, column 52): "+[r.constructor.name])},I=function(r){if(e.isNull(r))return n.pure(a.applicativeExceptT(l.monadIdentity))(d.Nothing.value);if(i.otherwise)return n.pure(a.applicativeExceptT(l.monadIdentity))(new d.Just(r));throw new Error("Failed pattern match at Foreign (line 152, column 1 - line 152, column 41): "+[r.constructor.name])},j=function(){var e=r.throwError(a.monadThrowExceptT(l.monadIdentity));return function(n){return e(f.singleton(n))}}(),S=function(r){if(e.isArray(r))return n.pure(a.applicativeExceptT(l.monadIdentity))(e.unsafeFromForeign(r));if(i.otherwise)return j(new g("array",e.tagOf(r)));throw new Error("Failed pattern match at Foreign (line 147, column 1 - line 147, column 42): "+[r.constructor.name])},N=function(r){return function(t){if(e.tagOf(t)===r)return n.pure(a.applicativeExceptT(l.monadIdentity))(e.unsafeFromForeign(t));if(i.otherwise)return j(new g(r,e.tagOf(t)));throw new Error("Failed pattern match at Foreign (line 106, column 1 - line 106, column 55): "+[r.constructor.name,t.constructor.name])}},O=N("Boolean"),D=N("Number"),L=function(r){var a,i=o.Left.create(f.singleton(new g("Int",e.tagOf(r)))),u=(a=d.maybe(i)(n.pure(o.applicativeEither)),function(e){return a(s.fromNumber(e))});return t.mapExcept(o.either(c.const(i))(u))(D(r))},A=N("String"),C=function(r){var a,i=o.Left.create(f.singleton(new g("Char",e.tagOf(r)))),u=(a=d.maybe(i)(n.pure(o.applicativeEither)),function(e){return a(h.toChar(e))});return t.mapExcept(o.either(c.const(i))(u))(A(r))},G=new u.Eq(function(e){return function(n){return e instanceof w&&n instanceof w?e.value0===n.value0:e instanceof g&&n instanceof g?e.value0===n.value0&&e.value1===n.value1:e instanceof E&&n instanceof E?e.value0===n.value0&&u.eq(G)(e.value1)(n.value1):e instanceof T&&n instanceof T&&(e.value0===n.value0&&u.eq(G)(e.value1)(n.value1))}}),U=new v.Ord(function(){return G},function(e){return function(n){if(e instanceof w&&n instanceof w)return v.compare(v.ordString)(e.value0)(n.value0);if(e instanceof w)return p.LT.value;if(n instanceof w)return p.GT.value;var r;if(e instanceof g&&n instanceof g)return(r=v.compare(v.ordString)(e.value0)(n.value0))instanceof p.LT?p.LT.value:r instanceof p.GT?p.GT.value:v.compare(v.ordString)(e.value1)(n.value1);if(e instanceof g)return p.LT.value;if(n instanceof g)return p.GT.value;if(e instanceof E&&n instanceof E)return(r=v.compare(v.ordInt)(e.value0)(n.value0))instanceof p.LT?p.LT.value:r instanceof p.GT?p.GT.value:v.compare(U)(e.value1)(n.value1);if(e instanceof E)return p.LT.value;if(n instanceof E)return p.GT.value;if(e instanceof T&&n instanceof T)return(r=v.compare(v.ordString)(e.value0)(n.value0))instanceof p.LT?p.LT.value:r instanceof p.GT?p.GT.value:v.compare(U)(e.value1)(n.value1);throw new Error("Failed pattern match at Foreign (line 61, column 1 - line 61, column 52): "+[e.constructor.name,n.constructor.name])}});module.exports={ForeignError:w,TypeMismatch:g,ErrorAtIndex:E,ErrorAtProperty:T,renderForeignError:F,unsafeReadTagged:N,readString:A,readChar:C,readBoolean:O,readNumber:D,readInt:L,readArray:S,readNull:I,readUndefined:y,readNullOrUndefined:q,fail:j,eqForeignError:G,ordForeignError:U,showForeignError:x,unsafeToForeign:e.unsafeToForeign,unsafeFromForeign:e.unsafeFromForeign,typeOf:e.typeOf,tagOf:e.tagOf,isNull:e.isNull,isUndefined:e.isUndefined,isArray:e.isArray}; -},{"./foreign.js":"kKQF","../Control.Applicative/index.js":"qYya","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Except/index.js":"Fye2","../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Boolean/index.js":"ObQr","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Identity/index.js":"2OKT","../Data.Int/index.js":"xNJb","../Data.List.NonEmpty/index.js":"XAY7","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7","../Data.String.CodeUnits/index.js":"6c6X"}],"t65A":[function(require,module,exports) { -"use strict";var n="function"==typeof Array.from,t="undefined"!=typeof Symbol&&null!=Symbol&&void 0!==Symbol.iterator&&"function"==typeof String.prototype[Symbol.iterator],r="function"==typeof String.prototype.fromCodePoint,o="function"==typeof String.prototype.codePointAt;exports._unsafeCodePointAt0=function(n){return o?function(n){return n.codePointAt(0)}:n},exports._codePointAt=function(n){return function(r){return function(o){return function(e){return function(u){return function(i){var f=i.length;if(u<0||u>=f)return o;if(t)for(var c=i[Symbol.iterator](),a=u;;--a){var p=c.next();if(p.done)return o;if(0===a)return r(e(p.value))}return n(u)(i)}}}}}},exports._countPrefix=function(n){return function(r){return t?function(n){return function(t){for(var o=t[Symbol.iterator](),e=0;;++e){var u=o.next();if(u.done)return e;var i=r(u.value);if(!n(i))return e}}}:n}},exports._fromCodePointArray=function(n){return r?function(t){return t.length<1e4?String.fromCodePoint.apply(String,t):t.map(n).join("")}:function(t){return t.map(n).join("")}},exports._singleton=function(n){return r?String.fromCodePoint:n},exports._take=function(n){return function(r){return t?function(n){for(var t="",o=n[Symbol.iterator](),e=0;e<r;++e){var u=o.next();if(u.done)return t;t+=u.value}return t}:n(r)}},exports._toCodePointArray=function(t){return function(r){return n?function(n){return Array.from(n,r)}:t}}; -},{}],"mAJY":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Data.Array/index.js"),t=require("../Data.Boolean/index.js"),e=require("../Data.Bounded/index.js"),u=require("../Data.Enum/index.js"),o=require("../Data.Eq/index.js"),i=require("../Data.EuclideanRing/index.js"),a=require("../Data.Functor/index.js"),f=require("../Data.Int/index.js"),d=require("../Data.Maybe/index.js"),c=require("../Data.Ord/index.js"),l=require("../Data.Show/index.js"),s=require("../Data.String.CodeUnits/index.js"),m=require("../Data.String.Common/index.js"),h=require("../Data.String.Unsafe/index.js"),v=require("../Data.Tuple/index.js"),x=require("../Data.Unfoldable/index.js"),E=function(n){return n},g=function(n){return function(r){return 65536+((1024*(n-55296|0)|0)+(r-56320|0)|0)|0}},C=new l.Show(function(n){return"(CodePoint 0x"+m.toUpper(f.toStringAs(f.hexadecimal)(n))+")"}),b=function(n){return 56320<=n&&n<=57343},p=function(n){return 55296<=n&&n<=56319},q=function(n){var r=s.length(n);if(0===r)return d.Nothing.value;if(1===r)return new d.Just({head:u.fromEnum(u.boundedEnumChar)(h.charAt(0)(n)),tail:""});var t=u.fromEnum(u.boundedEnumChar)(h.charAt(1)(n)),e=u.fromEnum(u.boundedEnumChar)(h.charAt(0)(n));return p(e)&&b(t)?new d.Just({head:g(e)(t),tail:s.drop(2)(n)}):new d.Just({head:e,tail:s.drop(1)(n)})},w=function(n){return a.map(d.functorMaybe)(function(n){return new v.Tuple(n.head,n.tail)})(q(n))},P=function(n){return x.unfoldr(x.unfoldableArray)(w)(n)},D=function(n){var r=u.fromEnum(u.boundedEnumChar)(h.charAt(0)(n));if(p(r)&&s.length(n)>1){var t=u.fromEnum(u.boundedEnumChar)(h.charAt(1)(n));return b(t)?g(r)(t):r}return r},j=n._unsafeCodePointAt0(D),A=n._toCodePointArray(P)(j),y=function(n){return r.length(A(n))},J=function(n){return function(r){return a.map(d.functorMaybe)(function(n){return y(s.take(n)(r))})(s.lastIndexOf(n)(r))}},O=function(n){return function(r){return a.map(d.functorMaybe)(function(n){return y(s.take(n)(r))})(s.indexOf(n)(r))}},I=function(){var n=u.toEnumWithDefaults(u.boundedEnumChar)(e.bottom(e.boundedChar))(e.top(e.boundedChar));return function(r){return s.singleton(n(r))}}(),S=function(n){if(n<=65535)return I(n);var r=i.div(i.euclideanRingInt)(n-65536|0)(1024)+55296|0,t=i.mod(i.euclideanRingInt)(n-65536|0)(1024)+56320|0;return I(r)+I(t)},k=n._fromCodePointArray(S),_=n._singleton(S),M=function n(r){return function(t){if(r<1)return"";var e=q(t);return e instanceof d.Just?_(e.value0.head)+n(r-1|0)(e.value0.tail):t}},N=n._take(M),B=function(n){return function(r){return function(t){var e=s.length(N(r)(t));return a.map(d.functorMaybe)(function(n){return y(s.take(n)(t))})(s["lastIndexOf'"](n)(e)(t))}}},U=function(n){return function(r){var t=N(n)(r);return{before:t,after:s.drop(s.length(t))(r)}}},F=new o.Eq(function(n){return function(r){return n===r}}),R=new c.Ord(function(){return F},function(n){return function(r){return c.compare(c.ordInt)(n)(r)}}),W=function(n){return function(r){return s.drop(s.length(N(n)(r)))(r)}},T=function(n){return function(r){return function(t){var e=W(r)(t);return a.map(d.functorMaybe)(function(n){return r+y(s.take(n)(e))|0})(s.indexOf(n)(e))}}},z=function(n){return function(r){return function(t){var e,u,o,i,a=n,f=r,c=!1;for(;!c;)u=a,o=t,i=void 0,e=(i=q(f))instanceof d.Just&&u(i.value0.head)?(a=u,f=i.value0.tail,void(t=o+1|0)):(c=!0,o);return e}}},G=function(n){return function(r){return z(n)(r)(0)}},H=n._countPrefix(G)(j),K=function(n){return function(r){return W(H(n)(r))(r)}},L=function(n){return function(r){return N(H(n)(r))(r)}},Q=function(){var n=u.fromEnum(u.boundedEnumChar);return function(r){return E(n(r))}}(),V=function(n){return function(r){var t,e,u,o=n,i=!1;for(;!i;)e=o,u=void 0,t=(u=q(r))instanceof d.Just?0===e?(i=!0,new d.Just(u.value0.head)):(o=e-1|0,void(r=u.value0.tail)):(i=!0,d.Nothing.value);return t}},X=function(r){return function(t){return r<0?d.Nothing.value:0===r&&""===t?d.Nothing.value:0===r?new d.Just(j(t)):n._codePointAt(V)(d.Just.create)(d.Nothing.value)(j)(r)(t)}},Y=new e.Bounded(function(){return R},0,1114111),Z=new u.BoundedEnum(function(){return Y},function(){return $},1114112,function(n){return n},function(n){if(n>=0&&n<=1114111)return new d.Just(n);if(t.otherwise)return d.Nothing.value;throw new Error("Failed pattern match at Data.String.CodePoints (line 63, column 1 - line 68, column 26): "+[n.constructor.name])}),$=new u.Enum(function(){return R},u.defaultPred(u.toEnum(Z))(u.fromEnum(Z)),u.defaultSucc(u.toEnum(Z))(u.fromEnum(Z)));module.exports={codePointFromChar:Q,singleton:_,fromCodePointArray:k,toCodePointArray:A,codePointAt:X,uncons:q,length:y,countPrefix:H,indexOf:O,"indexOf'":T,lastIndexOf:J,"lastIndexOf'":B,take:N,takeWhile:L,drop:W,dropWhile:K,splitAt:U,eqCodePoint:F,ordCodePoint:R,showCodePoint:C,boundedCodePoint:Y,enumCodePoint:$,boundedEnumCodePoint:Z}; -},{"./foreign.js":"t65A","../Data.Array/index.js":"4t4C","../Data.Boolean/index.js":"ObQr","../Data.Bounded/index.js":"kcUU","../Data.Enum/index.js":"oOsU","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Functor/index.js":"+0AE","../Data.Int/index.js":"xNJb","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7","../Data.String.CodeUnits/index.js":"6c6X","../Data.String.Common/index.js":"OSrc","../Data.String.Unsafe/index.js":"5UWM","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z"}],"rsyP":[function(require,module,exports) { -"use strict";exports["showRegex'"]=function(n){return""+n},exports["regex'"]=function(n){return function(r){return function(t){return function(e){try{return r(new RegExp(t,e))}catch(u){return n(u.message)}}}}},exports.source=function(n){return n.source},exports["flags'"]=function(n){return{multiline:n.multiline,ignoreCase:n.ignoreCase,global:n.global,sticky:!!n.sticky,unicode:!!n.unicode}},exports.test=function(n){return function(r){var t=n.lastIndex,e=n.test(r);return n.lastIndex=t,e}},exports._match=function(n){return function(r){return function(t){return function(e){var u=e.match(t);if(null==u||0===u.length)return r;for(var o=0;o<u.length;o++)u[o]=null==u[o]?r:n(u[o]);return n(u)}}}},exports.replace=function(n){return function(r){return function(t){return t.replace(n,r)}}},exports["replace'"]=function(n){return function(r){return function(t){return t.replace(n,function(n){return r(n)(Array.prototype.splice.call(arguments,1,arguments.length-3))})}}},exports._search=function(n){return function(r){return function(t){return function(e){var u=e.search(t);return-1===u?r:n(u)}}}},exports.split=function(n){return function(r){return r.split(n)}}; -},{}],"W1/V":[function(require,module,exports) { - -"use strict";var e=require("../Control.MonadZero/index.js"),i=require("../Data.Eq/index.js"),n=require("../Data.Functor/index.js"),r=require("../Data.Monoid/index.js"),a=require("../Data.Semigroup/index.js"),o=require("../Data.Show/index.js"),u=require("../Data.String.Common/index.js"),l=function(){function e(e){this.value0=e}return e.create=function(i){return new e(i)},e}(),t=new l({global:!1,ignoreCase:!1,multiline:!1,sticky:!1,unicode:!0}),g=new l({global:!1,ignoreCase:!1,multiline:!1,sticky:!0,unicode:!1}),s=new o.Show(function(r){var o=a.append(a.semigroupArray)([])(a.append(a.semigroupArray)(n.voidLeft(n.functorArray)(e.guard(e.monadZeroArray)(r.value0.global))("global"))(a.append(a.semigroupArray)(n.voidLeft(n.functorArray)(e.guard(e.monadZeroArray)(r.value0.ignoreCase))("ignoreCase"))(a.append(a.semigroupArray)(n.voidLeft(n.functorArray)(e.guard(e.monadZeroArray)(r.value0.multiline))("multiline"))(a.append(a.semigroupArray)(n.voidLeft(n.functorArray)(e.guard(e.monadZeroArray)(r.value0.sticky))("sticky"))(n.voidLeft(n.functorArray)(e.guard(e.monadZeroArray)(r.value0.unicode))("unicode"))))));return i.eq(i.eqArray(i.eqString))(o)([])?"noFlags":"("+u.joinWith(" <> ")(o)+")"}),d=new a.Semigroup(function(e){return function(i){return new l({global:e.value0.global||i.value0.global,ignoreCase:e.value0.ignoreCase||i.value0.ignoreCase,multiline:e.value0.multiline||i.value0.multiline,sticky:e.value0.sticky||i.value0.sticky,unicode:e.value0.unicode||i.value0.unicode})}}),c=new l({global:!1,ignoreCase:!1,multiline:!1,sticky:!1,unicode:!1}),v=new l({global:!1,ignoreCase:!1,multiline:!0,sticky:!1,unicode:!1}),m=new r.Monoid(function(){return d},c),y=new l({global:!1,ignoreCase:!0,multiline:!1,sticky:!1,unicode:!1}),f=new l({global:!0,ignoreCase:!1,multiline:!1,sticky:!1,unicode:!1}),p=new i.Eq(function(e){return function(i){return e.value0.global===i.value0.global&&e.value0.ignoreCase===i.value0.ignoreCase&&e.value0.multiline===i.value0.multiline&&e.value0.sticky===i.value0.sticky&&e.value0.unicode===i.value0.unicode}});module.exports={RegexFlags:l,noFlags:c,global:f,ignoreCase:y,multiline:v,sticky:g,unicode:t,semigroupRegexFlags:d,monoidRegexFlags:m,eqRegexFlags:p,showRegexFlags:s}; -},{"../Control.MonadZero/index.js":"lD5R","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.String.Common/index.js":"OSrc"}],"lBFq":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),t=require("../Data.Either/index.js"),a=require("../Data.Maybe/index.js"),r=require("../Data.Show/index.js"),n=require("../Data.String.CodeUnits/index.js"),i=require("../Data.String.Regex.Flags/index.js"),s=new r.Show(e["showRegex'"]),u=e._search(a.Just.create)(a.Nothing.value),c=function(e){return(e.value0.global?"g":"")+(e.value0.ignoreCase?"i":"")+(e.value0.multiline?"m":"")+(e.value0.sticky?"y":"")+(e.value0.unicode?"u":"")},l=function(a){return function(r){return e["regex'"](t.Left.create)(t.Right.create)(a)(c(r))}},o=function(e){return new i.RegexFlags({global:n.contains("g")(e),ignoreCase:n.contains("i")(e),multiline:n.contains("m")(e),sticky:n.contains("y")(e),unicode:n.contains("u")(e)})},g=e._match(a.Just.create)(a.Nothing.value),x=function(t){return i.RegexFlags.create(e["flags'"](t))};module.exports={regex:l,flags:x,renderFlags:c,parseFlags:o,match:g,search:u,showRegex:s,source:e.source,test:e.test,replace:e.replace,"replace'":e["replace'"],split:e.split}; -},{"./foreign.js":"rsyP","../Data.Either/index.js":"B2JL","../Data.Maybe/index.js":"5mN7","../Data.Show/index.js":"mFY7","../Data.String.CodeUnits/index.js":"6c6X","../Data.String.Regex.Flags/index.js":"W1/V"}],"f3ma":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Bind/index.js"),t=require("../Data.Array.NonEmpty/index.js"),e=require("../Data.Boolean/index.js"),u=require("../Data.Either/index.js"),o=require("../Data.Eq/index.js"),i=require("../Data.Foldable/index.js"),a=require("../Data.Function/index.js"),c=require("../Data.Functor/index.js"),f=require("../Data.Int/index.js"),l=require("../Data.Maybe/index.js"),s=require("../Data.Ord/index.js"),v=require("../Data.Show/index.js"),m=require("../Data.String.CodePoints/index.js"),b=require("../Data.String.Regex/index.js"),h=require("../Math/index.js"),d=function(n){return n},w=function(){function n(){}return n.value=new n,n}(),g=function(){function n(){}return n.value=new n,n}(),p=function(){function n(){}return n.value=new n,n}(),x=function(){function n(){}return n.value=new n,n}(),y=function(){function n(n,r,t,e){this.value0=n,this.value1=r,this.value2=t,this.value3=e}return n.create=function(r){return function(t){return function(e){return function(u){return new n(r,t,e,u)}}}},n}(),q=function(n){return function(r){return h.remainder(h.remainder(n)(r)+r)(r)}},j=function(n){return function(r){return function(t){return function(u){var o=s.clamp(s.ordInt)(0)(255)(n),i=f.toNumber(o)/255,a=s.clamp(s.ordInt)(0)(255)(r),c=f.toNumber(a)/255,l=s.clamp(s.ordInt)(0)(255)(t),v=s.max(s.ordInt)(s.max(s.ordInt)(o)(a))(l),m=s.min(s.ordInt)(s.min(s.ordInt)(o)(a))(l),b=v-m|0,d=f.toNumber(b)/255,w=f.toNumber(v+m|0)/510,g=function(){if(0===b)return 0;if(e.otherwise)return d/(1-h.abs(2*w-1));throw new Error("Failed pattern match at Color (line 157, column 5 - line 158, column 75): "+[])}(),p=f.toNumber(l)/255,x=60*function(n){if(0===n)return 0;if(v===o)return q((c-p)/d)(6);if(v===a)return(p-i)/d+2;if(e.otherwise)return(i-c)/d+4;throw new Error("Failed pattern match at Color (line 148, column 5 - line 148, column 17): "+[n.constructor.name])}(b);return new y(x,g,w,u)}}}},C=function(n){return function(r){return function(t){return j(n)(r)(t)(1)}}},I=function(n){return function(r){return function(t){return function(e){return j(f.round(255*n))(f.round(255*r))(f.round(255*t))(e)}}}},M=function(n){return function(r){return function(t){return I(n)(r)(t)(1)}}},N=function(n){return function(r){return function(t){var u=function(n){if(n<=.0031308)return 12.92*n;if(e.otherwise)return 1.055*h.pow(n)(1/2.4)-.055;throw new Error("Failed pattern match at Color (line 224, column 5 - line 225, column 65): "+[n.constructor.name])},o=u(-.9689*n+1.8758*r+.0415*t),i=u(3.2406*n-1.5372*r-.4986*t),a=u(.0557*n-.204*r+1.057*t);return M(i)(o)(a)}}},E=function(n){return function(r){return function(t){return r+n*(t-r)}}},F=function(n){return function(r){return function(t){var e=[{from:r,to:t},{from:r,to:t+360},{from:r+360,to:t}],u=l.fromJust()(i.minimumBy(i.foldableArray)(s.comparing(s.ordNumber)(function(n){return h.abs(n.to-n.from)}))(e));return E(n)(u.from)(u.to)}}},S=function(n){return function(r){return function(t){var e=h.pi/180,u=t.value1-r.value1,o=t.value2-r.value2,i=(r.value0+120)*e,a=(t.value0+120)*e-i;return function(e){var c=h.pow(r.value2+o*e)(n),f=i+a*e,l=(r.value1+u*e)*c*(1-c),s=c+l*(1.97294*h.cos(f)),v=c+l*(-.29227*h.cos(f)-.90649*h.sin(f)),m=c+l*(-.14861*h.cos(f)+1.78277*h.sin(f)),b=E(e)(r.value3)(t.value3);return I(m)(v)(s)(b)}}}},D=function(n){return function(r){return function(t){return function(e){var u=s.clamp(s.ordNumber)(0)(1)(r),o=s.clamp(s.ordNumber)(0)(1)(t),i=s.clamp(s.ordNumber)(0)(1)(e);return new y(n,u,o,i)}}}},A=function(n){return function(r){return function(t){return function(e){var u=r;if(0===t)return D(n)(u/(2-u))(0)(e);if(0===r&&1===t)return D(n)(0)(1)(e);var o=(2-r)*t,i=(u=r*t/(o<1?o:2-o),o/2);return D(n)(u)(i)(e)}}}},L=function(n){return function(r){return function(t){return A(n)(r)(t)(1)}}},B=function(n){return function(r){return D(r.value0)(r.value1)(r.value2+n)(r.value3)}},H=function(n){return function(r){return D(r.value0+n)(r.value1)(r.value2)(r.value3)}},z=function(n){return function(r){return D(r.value0)(r.value1+n)(r.value2)(r.value3)}},R=function(n){return function(r){return function(t){return D(n)(r)(t)(1)}}},G=R(0)(0)(1),k=function(n){return R(0)(0)(n)},J=function(n){var r=s.clamp(s.ordInt)(0)(16777215)(n),t=r>>8&255,e=255&r;return C(r>>16&255)(t)(e)},O=function(e){var o,i,s=(o=l.fromMaybe(0),i=f.fromStringAs(f.hexadecimal),function(n){return o(i(n))}),v=4===m.length(e),h=u.either(a.const(l.Nothing.value))(l.Just.create),d="([0-9a-f][0-9a-f])",w=v?"([0-9a-f])([0-9a-f])([0-9a-f])":d+(d+d),g=b.regex("^#(?:"+w+")$")(b.parseFlags("i"));return r.bind(l.bindMaybe)(h(g))(function(u){return r.bind(l.bindMaybe)(b.match(u)(e))(function(e){return r.bind(l.bindMaybe)(c.map(l.functorMaybe)(s)(r.join(l.bindMaybe)(t.index(e)(1))))(function(u){return r.bind(l.bindMaybe)(c.map(l.functorMaybe)(s)(r.join(l.bindMaybe)(t.index(e)(2))))(function(o){return r.bind(l.bindMaybe)(c.map(l.functorMaybe)(s)(r.join(l.bindMaybe)(t.index(e)(3))))(function(r){return v?n.pure(l.applicativeMaybe)(C((16*u|0)+u|0)((16*o|0)+o|0)((16*r|0)+r|0)):n.pure(l.applicativeMaybe)(C(u)(o)(r))})})})})})},P=function(n){return z(-n)},V=function(n){return B(-n)},X={xn:.95047,yn:1,zn:1.08883},Y=function(n){return function(r){return function(t){var u=(n+16)/116,o=function(n){if(n>6/29)return h.pow(n)(3);if(e.otherwise)return 6/29*3*(6/29)*(n-4/29);throw new Error("Failed pattern match at Color (line 249, column 5 - line 250, column 64): "+[n.constructor.name])},i=X.xn*o(u+r/500),a=X.yn*o(u),c=X.zn*o(u-t/200);return N(i)(a)(c)}}},Z=function(n){return function(r){return function(t){var e=h.pi/180,u=r*h.sin(t*e),o=r*h.cos(t*e);return Y(n)(o)(u)}}},$=function(n){var r=function(n){return v.show(v.showNumber)(f.toNumber(f.round(100*n))/100)},t=r(100*n.value1)+"%",e=r(100*n.value2)+"%",u=r(n.value0),o=v.show(v.showNumber)(n.value3);return 1===n.value3?"hsl("+u+", "+t+", "+e+")":"hsla("+u+", "+t+", "+e+", "+o+")"},K=H(180),Q=function(n){return 360===n?n:q(n)(360)},T=function(n){return{h:Q(n.value0),s:n.value1,l:n.value2,a:n.value3}},U=function(n){var r=n.value1;if(0===n.value2)return{h:Q(n.value0),s:2*r/(1+r),v:0,a:n.value3};if(0===n.value1&&1===n.value2)return{h:Q(n.value0),s:0,v:1,a:n.value3};var t=n.value1*(n.value2<.5?n.value2:1-n.value2),e=n.value2+t;r=2*t/(n.value2+t);return{h:Q(n.value0),s:r,v:e,a:n.value3}},W=function(n){var r=Q(n.value0)/60,t=(1-h.abs(2*n.value2-1))*n.value1,u=n.value2-t/2,o=t*(1-h.abs(h.remainder(r)(2)-1)),i=function(){if(r<1)return{r:t,g:o,b:0};if(1<=r&&r<2)return{r:o,g:t,b:0};if(2<=r&&r<3)return{r:0,g:t,b:o};if(3<=r&&r<4)return{r:0,g:o,b:t};if(4<=r&&r<5)return{r:o,g:0,b:t};if(e.otherwise)return{r:t,g:0,b:o};throw new Error("Failed pattern match at Color (line 342, column 5 - line 347, column 61): "+[])}();return{r:i.r+u,g:i.g+u,b:i.b+u,a:n.value3}},_=function(n){var r=W(n),t=function(n){if(n<=.03928)return n/12.92;if(e.otherwise)return h.pow((n+.055)/1.055)(2.4);throw new Error("Failed pattern match at Color (line 604, column 9 - line 605, column 61): "+[n.constructor.name])},u=t(r.g);return.2126*t(r.r)+.7152*u+.0722*t(r.b)},nn=function(n){return function(r){var t=_(r),e=_(n);return e>t?(e+.05)/(t+.05):(t+.05)/(e+.05)}},rn=function(n){return function(r){return nn(n)(r)>4.5}},tn=function(n){var r=W(n),t=f.round(255*r.g);return{r:f.round(255*r.r),g:t,b:f.round(255*r.b),a:r.a}},en=function(n){var r=tn(n),t=v.show(v.showInt)(r.g),e=v.show(v.showInt)(r.r),u=v.show(v.showInt)(r.b),o=v.show(v.showNumber)(r.a);return 1===r.a?"rgb("+e+", "+t+", "+u+")":"rgba("+e+", "+t+", "+u+", "+o+")"},un=new o.Eq(function(n){return function(r){var t=tn(r),e=tn(n);return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}),on=new v.Show(function(n){var r=tn(n);return"rgba "+v.show(v.showInt)(r.r)+" "+v.show(v.showInt)(r.g)+" "+v.show(v.showInt)(r.b)+" "+v.show(v.showNumber)(r.a)}),an=function(n){var r=function(n){var r=f.toStringAs(f.hexadecimal)(n);return 1===m.length(r)?"0"+r:r},t=tn(n);return"#"+(r(t.r)+(r(t.g)+r(t.b)))},cn=function(n){var r=W(n),t=function(n){if(n<=.04045)return n/12.92;if(e.otherwise)return h.pow((n+.055)/1.055)(2.4);throw new Error("Failed pattern match at Color (line 366, column 5 - line 367, column 63): "+[n.constructor.name])},u=t(r.g),o=t(r.r),i=t(r.b);return{x:.4124*o+.3576*u+.1805*i,y:.2126*o+.7152*u+.0722*i,z:.0193*o+.1192*u+.9505*i}},fn=function(n){var r=cn(n),t=h.pow(6/29)(3),u=function(n){if(n>t)return h.pow(n)(1/3);if(e.otherwise)return 1/3*h.pow(29/6)(2)*n+4/29;throw new Error("Failed pattern match at Color (line 384, column 5 - line 385, column 76): "+[n.constructor.name])},o=u(r.y/X.yn),i=116*o-16,a=200*(o-u(r.z/X.zn));return{l:i,a:500*(u(r.x/X.xn)-o),b:a}},ln=function(n){return function(r){var t=function(n){return h.pow(n)(2)},e=fn(r),u=fn(n);return h.sqrt(t(u.l-e.l)+t(u.a-e.a)+t(u.b-e.b))}},sn=function(n){var r=fn(n),t=180/h.pi,e=h.sqrt(r.a*r.a+r.b*r.b),u=q(h.atan2(r.b)(r.a)*t)(360);return{l:r.l,c:e,h:u}},vn=function(n){return function(r){return function(t){return function(e){if(n instanceof g){var u=T(t),o=T(r);return D(F(e)(o.h)(u.h))(E(e)(o.s)(u.s))(E(e)(o.l)(u.l))(E(e)(o.a)(u.a))}if(n instanceof w){u=W(t),o=W(r);return I(E(e)(o.r)(u.r))(E(e)(o.g)(u.g))(E(e)(o.b)(u.b))(E(e)(o.a)(u.a))}if(n instanceof p){u=sn(t),o=sn(r);return Z(E(e)(o.l)(u.l))(E(e)(o.c)(u.c))(F(e)(o.h)(u.h))}if(n instanceof x){u=fn(t),o=fn(r);return Y(E(e)(o.l)(u.l))(E(e)(o.a)(u.a))(E(e)(o.b)(u.b))}throw new Error("Failed pattern match at Color (line 520, column 1 - line 520, column 34): "+[n.constructor.name,r.constructor.name,t.constructor.name,e.constructor.name])}}}},mn=function(n){var r=sn(n);return P(1)(Z(r.l)(0)(0))},bn=function(n){var r=W(n);return(299*r.r+587*r.g+114*r.b)/1e3},hn=function(n){return bn(n)>.5},dn=R(0)(0)(0),wn=function(n){if(hn(n))return dn;if(e.otherwise)return G;throw new Error("Failed pattern match at Color (line 643, column 1 - line 643, column 28): "+[n.constructor.name])};module.exports={RGB:w,HSL:g,LCh:p,Lab:x,rgba:j,rgb:C,"rgba'":I,"rgb'":M,hsla:D,hsl:R,hsva:A,hsv:L,xyz:N,lab:Y,lch:Z,fromHexString:O,fromInt:J,toHSLA:T,toHSVA:U,toRGBA:tn,"toRGBA'":W,toXYZ:cn,toLab:fn,toLCh:sn,toHexString:an,cssStringHSLA:$,cssStringRGBA:en,black:dn,white:G,graytone:k,rotateHue:H,complementary:K,lighten:B,darken:V,saturate:z,desaturate:P,toGray:mn,mix:vn,mixCubehelix:S,brightness:bn,luminance:_,contrast:nn,isLight:hn,isReadable:rn,textColor:wn,distance:ln,showColor:on,eqColor:un}; -},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Data.Array.NonEmpty/index.js":"eTKN","../Data.Boolean/index.js":"ObQr","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Int/index.js":"xNJb","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7","../Data.String.CodePoints/index.js":"mAJY","../Data.String.Regex/index.js":"lBFq","../Math/index.js":"Rpaz"}],"rp+n":[function(require,module,exports) { -"use strict";var r=require("../Color/index.js"),o=r.fromInt(16768e3),n=r.fromInt(3787980),t=r.fromInt(14540253),m=r.fromInt(16728374),e=r.fromInt(11603401),f=r.fromInt(16745755),I=r.fromInt(4036976),l=r.fromInt(7999),a=r.fromInt(8721483),i=r.fromInt(130928),u=r.fromInt(3066944),s=r.fromInt(11184810),v=r.fromInt(15733438),c=r.fromInt(29913),d=r.fromInt(1118481),g=r.fromInt(8379391);module.exports={navy:l,blue:c,aqua:g,teal:n,olive:I,green:u,lime:i,yellow:o,orange:f,red:m,maroon:a,fuchsia:v,purple:e,"black'":d,gray:s,silver:t}; -},{"../Color/index.js":"f3ma"}],"BG0s":[function(require,module,exports) { -function t(t){return function(o){return function(e){return t.apply(e,[o])}}}exports.toPrecisionNative=t(Number.prototype.toPrecision),exports.toFixedNative=t(Number.prototype.toFixed),exports.toExponentialNative=t(Number.prototype.toExponential),exports.toString=function(t){return t.toString()}; -},{}],"VX77":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),t=require("../Data.Ord/index.js"),e=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),r=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),i=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),u=function(t){if(t instanceof e)return n.toPrecisionNative(t.value0);if(t instanceof r)return n.toFixedNative(t.value0);if(t instanceof i)return n.toExponentialNative(t.value0);throw new Error("Failed pattern match at Data.Number.Format (line 59, column 1 - line 59, column 40): "+[t.constructor.name])},o=function(){var n=t.clamp(t.ordInt)(1)(21);return function(t){return e.create(n(t))}}(),a=function(){var n=t.clamp(t.ordInt)(0)(20);return function(t){return r.create(n(t))}}(),c=function(){var n=t.clamp(t.ordInt)(0)(20);return function(t){return i.create(n(t))}}();module.exports={precision:o,fixed:a,exponential:c,toStringWith:u,toString:n.toString}; -},{"./foreign.js":"BG0s","../Data.Ord/index.js":"r4Vb"}],"KkC9":[function(require,module,exports) { -"use strict";exports.unsafeCreateElementImpl=function(e,t,n){var o=document.createElement(e);return o.id=t,o.className=n,o},exports.initializeCanvasImpl=function(e,t){e.width=t.width,e.height=t.height;var n=e.getContext("2d");!0===n.imageSmoothingEnabled&&(n.imageSmoothingEnabled=!1)},exports.setElementStyleImpl=function(e,t,n){e.style[t]=n},exports.appendElem=function(e){return function(t){return function(){e.appendChild(t)}}},exports.setContainerStyle=function(e){return function(t){return function(){e.style.position="relative",e.style.border="1px solid black",e.style.display="block",e.style.margin="0",e.style.padding="0",e.style.width=t.width-2+"px",e.style.height=t.height+"px"}}},exports.drawCopies=function(e,t,n,o,i){Math.round(t.width),Math.round(t.height);i.forEach(function(i){o(i)&&n.drawImage(e,Math.floor(i.x-t.width/2),Math.floor(i.y-t.height/2))})},exports.setCanvasTranslation=function(e){return function(t){return function(){t.getContext("2d").setTransform(1,0,0,1,e.x,e.y)}}},exports.elementClickImpl=function(e,t){e.addEventListener("mousedown",function(n){var o=e.getBoundingClientRect(),i=n.clientX-o.left+window.scrollX,r=n.clientY-o.top+window.scrollY;t({x:i,y:r})()})},exports.scrollCanvasImpl=function(e,t,n){var o=e.getContext("2d");o.save(),o.globalCompositeOperation="copy",o.drawImage(t,0,0),o.restore();var i=t.getContext("2d");i.save(),i.globalCompositeOperation="copy",i.setTransform(1,0,0,1,0,0),i.drawImage(e,n.x,n.y),i.restore()},exports.zoomCanvasImpl=function(e,t,n){var o=e.getContext("2d");o.save(),o.globalCompositeOperation="copy",o.drawImage(t,0,0),o.restore();var i=t.getContext("2d"),r=t.width,a=t.height,l=n.left*r,s=(n.right-n.left)*r;i.save(),i.globalCompositeOperation="copy",i.setTransform(1,0,0,1,0,0),i.drawImage(e,l,0,s,a,0,0,r,a),i.restore()},exports.canvasDragImpl=function(e){return function(t){return function(){var n=function(e){var n=e.clientX,o=e.clientY,i=e.clientX,r=e.clientY,a=function(e){t({during:{x:i-e.clientX,y:r-e.clientY}})(),i=e.clientX,r=e.clientY};document.addEventListener("mousemove",a),document.addEventListener("mouseup",function(e){document.removeEventListener("mousemove",a),t({total:{x:e.clientX-n,y:e.clientY-o}})()},{once:!0})};return e.addEventListener("mousedown",n),function(){e.removeEventListener("mousedown",n)}}}},exports.canvasWheelCBImpl=function(e){return function(t){return function(){e.addEventListener("wheel",function(n){n.preventDefault();var o=e.getBoundingClientRect(),i=n.clientX-o.left+window.scrollX,r=n.clientY-o.top+window.scrollY;t({x:i,y:r})(Math.sign(n.deltaY))()})}}}; -},{}],"fCig":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),t=require("../Control.Category/index.js"),e=require("../Data.Either/index.js"),u=require("../Data.Eq/index.js"),i=require("../Data.Foldable/index.js"),o=require("../Data.Function/index.js"),f=require("../Data.Functor/index.js"),c=require("../Data.HeytingAlgebra/index.js"),a=require("../Data.Lens.Internal.Forget/index.js"),p=require("../Data.Lens.Internal.Indexed/index.js"),d=require("../Data.List.Types/index.js"),l=require("../Data.Maybe/index.js"),s=require("../Data.Maybe.First/index.js"),y=require("../Data.Maybe.Last/index.js"),w=require("../Data.Monoid/index.js"),v=require("../Data.Monoid.Additive/index.js"),j=require("../Data.Monoid.Conj/index.js"),D=require("../Data.Monoid.Disj/index.js"),q=require("../Data.Monoid.Dual/index.js"),x=require("../Data.Monoid.Endo/index.js"),g=require("../Data.Monoid.Multiplicative/index.js"),O=require("../Data.Newtype/index.js"),m=require("../Data.Ord/index.js"),F=require("../Data.Profunctor/index.js"),h=require("../Data.Profunctor.Choice/index.js"),M=require("../Data.Semigroup/index.js"),A=require("../Data.Tuple/index.js"),E=require("../Data.Unit/index.js"),C=function(n){return function(r){return function(t){var e,u=(e=l.maybe(w.mempty(n))(function(r){return M.append(n.Semigroup0())(O.unwrap(a.newtypeForget)(t)(r.value0))(u(r.value1))}),function(n){return e(r(n))});return u}}},b=function(n){return function(r){return function(t){return function r(t){return function(e){return 0===t?w.mempty(w.monoidFn(n)):M.append(M.semigroupFn(n.Semigroup0()))(e)(r(t-1|0)(e))}}(r)(t)}}},L=function(n){return function(r){return O.unwrap(a.newtypeForget)(n(p.Indexed(A.uncurry(r))))}},J=function(n){return function(r){return function(t){var e=o.flip(O.unwrap(O.newtypeEndo))(t),u=O.unwrap(O.newtypeDual),i=L(n)(function(n){var t=o.flip(r(n));return function(n){return q.Dual(x.Endo(t(n)))}});return function(n){return e(u(i(n)))}}}},N=function(n){return function(r){return function(t){var e=o.flip(O.unwrap(O.newtypeEndo))(t),u=L(n)(function(n){var t=r(n);return function(n){return x.Endo(t(n))}});return function(n){return e(u(n))}}}},S=function(n){return N(n)(function(n){return function(r){return function(t){return new d.Cons(new A.Tuple(n,r),t)}}})(d.Nil.value)},T=function(t){return function(e){return function(u){return N(e)(function(n){return function(e){return function(i){return r.applySecond(t.Apply0())(f.void(t.Apply0().Functor0())(u(n)(e)))(i)}}})(n.pure(t)(E.unit))}}},I=function(n){var r=T(n);return function(n){return o.flip(r(n))}},P=function(n){return function(r){return N(n)(function(n){return function(t){return l.maybe(r(n)(t)?new l.Just(t):l.Nothing.value)(l.Just.create)}})(l.Nothing.value)}},_=function(n){return function(n){return function(r){var t=O.unwrap(O.newtypeDisj),e=L(n)(function(n){var t=r(n);return function(n){return D.Disj(t(n))}});return function(n){return t(e(n))}}}},B=function(n){return function(n){return function(r){var t=O.unwrap(O.newtypeConj),e=L(n)(function(n){var t=r(n);return function(n){return j.Conj(t(n))}});return function(n){return t(e(n))}}}},H=function(n){return function(r){return function(t){return i.foldMap(r)(n)(t)}}},R=O.under(a.newtypeForget)(a.newtypeForget)(a.Forget),U=function(n){return R(n)(t.identity(t.categoryFn))},k=function(n){return function(r){return function(t){var e,u=o.flip(O.unwrap(O.newtypeEndo))(t),i=O.unwrap(O.newtypeDual),f=R(n)((e=o.flip(r),function(n){return q.Dual(x.Endo(e(n)))}));return function(n){return u(i(f(n)))}}}},z=function(n){return function(r){return function(t){var e=o.flip(O.unwrap(O.newtypeEndo))(t),u=R(n)(function(n){return x.Endo(r(n))});return function(n){return e(u(n))}}}},G=function(n){return function(r){return z(r)(function(r){var t=l.maybe(r)(function(r){return function(t){return m.greaterThan(n)(r)(t)?r:t}}(r));return function(n){return l.Just.create(t(n))}})(l.Nothing.value)}},K=function(n){return function(r){return z(r)(function(r){var t=l.maybe(r)(function(r){return function(t){return m.lessThan(n)(r)(t)?r:t}}(r));return function(n){return l.Just.create(t(n))}})(l.Nothing.value)}},Q=function(n){return z(n)(d.Cons.create)(d.Nil.value)},V=function(n){return function(r){return Q(r)(n)}},W=function(t){return function(e){return function(u){return z(e)(function(n){return function(e){return r.applySecond(t.Apply0())(f.void(t.Apply0().Functor0())(u(n)))(e)}})(n.pure(t)(E.unit))}}},X=function(n){return function(r){var t=O.unwrap(O.newtypeDisj),e=R(r)(o.const(c.tt(n)));return function(n){return t(e(n))}}},Y=function(n){return function(r){var t=O.unwrap(O.newtypeConj),e=R(r)(o.const(c.ff(n)));return function(n){return t(e(n))}}},Z=function(n){var r=O.unwrap(y.newtypeLast),t=R(n)(function(n){return y.Last(l.Just.create(n))});return function(n){return r(t(n))}},$=function(n){var r=O.unwrap(O.newtypeAdditive),t=R(n)(o.const(1));return function(n){return r(t(n))}},nn=function(n){var r=O.unwrap(s.newtypeFirst),t=R(n)(function(n){return s.First(l.Just.create(n))});return function(n){return r(t(n))}},rn=function(n){return function(r){return nn(r)(n)}},tn=function(n){return function(n){var r=O.unwrap(O.newtypeMultiplicative),t=R(n)(g.Multiplicative);return function(n){return r(t(n))}}},en=function(t){return function(e){var u=o.flip(O.unwrap(O.newtypeEndo))(n.pure(t)(E.unit)),i=R(e)(function(n){return function(e){return r.applySecond(t.Apply0())(n)(e)}});return function(n){return u(i(n))}}},un=function(n){return function(n){var r=O.unwrap(O.newtypeAdditive),t=R(n)(v.Additive);return function(n){return r(t(n))}}},on=function(n){var r=O.unwrap(s.newtypeFirst),t=R(n)(function(n){return s.First(l.Just.create(n))});return function(n){return r(t(n))}},fn=function(n){return function(r){return z(n)(function(n){return l.maybe(r(n)?new l.Just(n):l.Nothing.value)(l.Just.create)})(l.Nothing.value)}},cn=function(n){return function(r){var u=F.dimap(n.Profunctor0())(function(n){return r(n)?new e.Right(n):new e.Left(n)})(e.either(t.identity(t.categoryFn))(t.identity(t.categoryFn))),i=h.right(n);return function(n){return u(i(n))}}},an=function(n){return function(n){return function(r){var t=O.unwrap(O.newtypeDisj),e=R(n)(function(n){return D.Disj(r(n))});return function(n){return t(e(n))}}}},pn=function(n){return function(r){return function(t){return an(c.heytingAlgebraBoolean)(r)(function(r){return u.eq(n)(r)(t)})}}},dn=function(n){return function(r){return an(n)(r)(t.identity(t.categoryFn))}},ln=function(n){return function(n){return function(r){var t=O.unwrap(O.newtypeConj),e=R(n)(function(n){return j.Conj(r(n))});return function(n){return t(e(n))}}}},sn=function(n){return function(r){return ln(n)(r)(t.identity(t.categoryFn))}},yn=function(n){return function(r){return function(t){return ln(c.heytingAlgebraBoolean)(r)(function(r){return u.notEq(n)(r)(t)})}}};module.exports={previewOn:rn,toListOfOn:V,preview:nn,foldOf:U,foldMapOf:R,foldrOf:z,foldlOf:k,toListOf:Q,firstOf:on,lastOf:Z,maximumOf:G,minimumOf:K,allOf:ln,anyOf:an,andOf:sn,orOf:dn,elemOf:pn,notElemOf:yn,sumOf:un,productOf:tn,lengthOf:$,findOf:fn,sequenceOf_:en,traverseOf_:W,has:X,"hasn't":Y,replicated:b,filtered:cn,folded:H,unfolded:C,ifoldMapOf:L,ifoldrOf:N,ifoldlOf:J,iallOf:B,ianyOf:_,itoListOf:S,itraverseOf_:T}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.Lens.Internal.Indexed/index.js":"V4/H","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Maybe.First/index.js":"W/l6","../Data.Maybe.Last/index.js":"aQky","../Data.Monoid/index.js":"TiEB","../Data.Monoid.Additive/index.js":"fHyj","../Data.Monoid.Conj/index.js":"U/G5","../Data.Monoid.Disj/index.js":"9bR7","../Data.Monoid.Dual/index.js":"ULyl","../Data.Monoid.Endo/index.js":"2o47","../Data.Monoid.Multiplicative/index.js":"y5cd","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk"}],"KFxX":[function(require,module,exports) { -"use strict";var e=require("../Data.Bifunctor/index.js"),r=require("../Data.Either/index.js"),t=require("../Data.Functor/index.js"),n=require("../Data.Profunctor/index.js"),u=require("../Data.Profunctor.Choice/index.js"),i=function(){function e(e,r){this.value0=e,this.value1=r}return e.create=function(r){return function(t){return new e(r,t)}},e}(),c=new n.Profunctor(function(t){return function(n){return function(u){return new i(function(e){return n(u.value0(e))},(c=e.lmap(r.bifunctorEither)(n),function(e){return c(u.value1(t(e)))}));var c}}}),o=new t.Functor(function(t){return function(n){return new i(function(e){return t(n.value0(e))},(u=e.lmap(r.bifunctorEither)(t),function(e){return u(n.value1(e))}));var u}}),a=new u.Choice(function(){return c},function(t){return new i(function(e){return r.Left.create(t.value0(e))},r.either((n=e.lmap(r.bifunctorEither)(r.Left.create),function(e){return n(t.value1(e))}))(function(e){return r.Left.create(r.Right.create(e))}));var n},function(t){return new i(function(e){return r.Right.create(t.value0(e))},r.either(function(e){return r.Left.create(r.Left.create(e))})((n=e.lmap(r.bifunctorEither)(r.Right.create),function(e){return n(t.value1(e))})));var n});module.exports={Market:i,functorMarket:o,profunctorMarket:c,choiceMarket:a}; -},{"../Data.Bifunctor/index.js":"e2Wc","../Data.Either/index.js":"B2JL","../Data.Functor/index.js":"+0AE","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb"}],"h1YV":[function(require,module,exports) { -"use strict";var n=require("../Data.Either/index.js"),r=require("../Data.Eq/index.js"),e=require("../Data.Foldable/index.js"),t=require("../Data.Function/index.js"),u=require("../Data.Functor/index.js"),o=require("../Data.Newtype/index.js"),i=require("../Data.Ord/index.js"),c=require("../Data.Profunctor/index.js"),a=require("../Data.Profunctor.Choice/index.js"),f=require("../Data.Profunctor.Closed/index.js"),d=require("../Data.Profunctor.Costrong/index.js"),g=require("../Data.Traversable/index.js"),s=function(n){return n},q=new c.Profunctor(function(n){return function(n){return function(r){return n(r)}}}),l=new d.Costrong(function(){return q},function(n){return n.value0},function(n){return n.value1}),w=new f.Closed(function(){return q},function(n){return t.const(n)}),x=new a.Choice(function(){return q},function(r){return new n.Left(r)},function(r){return new n.Right(r)}),j=new o.Newtype(function(n){return n},s),p=new u.Functor(function(n){return function(r){return n(r)}}),D=new e.Foldable(function(n){return function(n){return function(r){return n(r)}}},function(n){return function(r){return function(e){return n(r)(e)}}},function(n){return function(r){return function(e){return n(e)(r)}}}),T=new g.Traversable(function(){return D},function(){return p},function(n){return function(r){return u.map(n.Apply0().Functor0())(s)(r)}},function(n){return function(r){return function(e){return u.map(n.Apply0().Functor0())(s)(r(e))}}}),C=function(n){return new r.Eq(function(e){return function(t){return r.eq(n)(e)(t)}})},F=function(n){return new i.Ord(function(){return C(n.Eq0())},function(r){return function(e){return i.compare(n)(r)(e)}})},b=new r.Eq1(function(n){return r.eq(C(n))}),v=new i.Ord1(function(){return b},function(n){return i.compare(F(n))});module.exports={Tagged:s,newtypeTagged:j,eqTagged:C,eq1Tagged:b,ordTagged:F,ord1Tagged:v,functorTagged:p,taggedProfunctor:q,taggedChoice:x,taggedCostrong:l,taggedClosed:w,foldableTagged:D,traversableTagged:T}; -},{"../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb","../Data.Profunctor.Closed/index.js":"af4y","../Data.Profunctor.Costrong/index.js":"NfU6","../Data.Traversable/index.js":"n7EE"}],"4AcV":[function(require,module,exports) { -"use strict";var n=require("../Control.Category/index.js"),r=require("../Control.MonadZero/index.js"),e=require("../Data.Either/index.js"),t=require("../Data.Eq/index.js"),u=require("../Data.Function/index.js"),i=require("../Data.HeytingAlgebra/index.js"),o=require("../Data.Lens.Internal.Market/index.js"),a=require("../Data.Lens.Internal.Tagged/index.js"),c=require("../Data.Maybe/index.js"),f=require("../Data.Newtype/index.js"),s=require("../Data.Profunctor/index.js"),d=require("../Data.Profunctor.Choice/index.js"),g=function(r){return function(t){var u=r(new o.Market(n.identity(n.categoryFn),e.Right.create));return t(u.value0)(u.value1)}},y=f.under(a.newtypeTagged)(a.newtypeTagged)(a.Tagged),q=function(r){return function(t){return function(u){return function(i){return s.dimap(u.Profunctor0())(t)(e.either(n.identity(n.categoryFn))(n.identity(n.categoryFn)))(d.right(u)(s.rmap(u.Profunctor0())(r)(i)))}}}},x=function(n){return function(r){return function(t){return q(n)(function(n){return c.maybe(new e.Left(n))(e.Right.create)(r(n))})(t)}}},j=function(n){return function(e){return function(t){return x(u.const(n))((i=r.guard(c.monadZeroMaybe),function(n){return i(e(n))}))(t);var i}}},l=function(n){return function(r){return function(e){return j(r)(function(e){return t.eq(n)(e)(r)})(e)}}},m=function(n){return g(n)(function(n){return function(n){return n}})},D=function(n){return function(r){var t=e.either(u.const(i.ff(n)))(u.const(i.tt(n))),o=m(r);return function(n){return t(o(n))}}},h=function(n){return function(r){var e=i.not(n),t=D(n)(r);return function(n){return e(t(n))}}},p=function(n){return function(r){return g(n)(function(n){return function(e){return function(t){return q(n)(e)(r)(t)}}})}};module.exports={"prism'":x,prism:q,only:l,nearly:j,review:y,is:D,"isn't":h,matching:m,clonePrism:p,withPrism:g}; -},{"../Control.Category/index.js":"IAi2","../Control.MonadZero/index.js":"lD5R","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.HeytingAlgebra/index.js":"paZe","../Data.Lens.Internal.Market/index.js":"KFxX","../Data.Lens.Internal.Tagged/index.js":"h1YV","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Choice/index.js":"nkqb"}],"kg0W":[function(require,module,exports) { -"use strict";var n=require("../Data.Profunctor/index.js"),u=require("../Data.Profunctor.Strong/index.js"),r=require("../Data.Tuple/index.js"),e=function(){function n(n,u){this.value0=n,this.value1=u}return n.create=function(u){return function(r){return new n(u,r)}},n}(),t=new n.Profunctor(function(n){return function(u){return function(r){return new e(function(u){return r.value0(n(u))},function(e){var t=r.value1(n(e));return function(n){return u(t(n))}})}}}),o=new u.Strong(function(){return t},function(n){return new e(function(u){return n.value0(u.value0)},function(u){return function(e){return new r.Tuple(n.value1(u.value0)(e),u.value1)}})},function(n){return new e(function(u){return n.value0(u.value1)},function(u){return function(e){return new r.Tuple(u.value0,n.value1(u.value1)(e))}})});module.exports={Shop:e,profunctorShop:t,strongShop:o}; -},{"../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Strong/index.js":"w9p6","../Data.Tuple/index.js":"II/O"}],"hi+g":[function(require,module,exports) { -"use strict";var n=require("../Control.Category/index.js"),e=require("../Data.Lens.Internal.Indexed/index.js"),r=require("../Data.Lens.Internal.Shop/index.js"),t=require("../Data.Newtype/index.js"),u=require("../Data.Profunctor/index.js"),i=require("../Data.Profunctor.Strong/index.js"),o=require("../Data.Tuple/index.js"),c=function(e){return function(t){var u=e(new r.Shop(n.identity(n.categoryFn),function(n){return function(n){return n}}));return t(u.value0)(u.value1)}},f=function(e){return function(t){var u=e(new r.Shop(n.identity(n.categoryFn),function(n){return function(n){return n}}));return t(u.value0)(u.value1)}},a=function(n){return function(e){return function(r){return u.dimap(e.Profunctor0())(n)(function(n){return n.value1(n.value0)})(i.first(e)(r))}}},d=function(n){return function(e){return function(r){return a(function(r){return new o.Tuple(n(r),function(n){return e(r)(n)})})(r)}}},s=function(n){return function(r){return function(o){return u.dimap(r.Profunctor0())(n)(function(n){return n.value1(n.value0)})(i.first(r)(t.un(e.newtypeIndexed)(e.Indexed)(o)))}}},l=function(n){return function(e){return function(r){return s(function(r){return new o.Tuple(n(r),function(n){return e(r)(n)})})(r)}}},x=function(n){return function(e){return c(n)(function(n){return function(r){return function(t){return d(n)(r)(e)(t)}}})}},p=function(n){return function(e){return f(n)(function(n){return function(r){return function(t){return l(n)(r)(e)(t)}}})}};module.exports={lens:d,"lens'":a,withLens:c,cloneLens:x,ilens:l,"ilens'":s,withIndexedLens:f,cloneIndexedLens:p}; -},{"../Control.Category/index.js":"IAi2","../Data.Lens.Internal.Indexed/index.js":"V4/H","../Data.Lens.Internal.Shop/index.js":"kg0W","../Data.Newtype/index.js":"lz8k","../Data.Profunctor/index.js":"0DaD","../Data.Profunctor.Strong/index.js":"w9p6","../Data.Tuple/index.js":"II/O"}],"nwoH":[function(require,module,exports) { -"use strict";var e=require("../Data.Function/index.js"),n=require("../Data.Lens.Lens/index.js"),r=require("../Record/index.js"),t=function(t){return function(u){return function(i){return function(o){return function(s){return n.lens(r.get(t)(u)(o))(e.flip(r.set(t)(u)(i)(o)))(s)}}}}};module.exports={prop:t}; -},{"../Data.Function/index.js":"ImXJ","../Data.Lens.Lens/index.js":"hi+g","../Record/index.js":"0gG4"}],"62zx":[function(require,module,exports) { -"use strict";var r=require("../Data.Functor/index.js"),e=require("../Data.Map.Internal/index.js"),n=function(){var n=r.void(e.functorMap);return function(r){return n(r)}}();module.exports={keys:n}; -},{"../Data.Functor/index.js":"+0AE","../Data.Map.Internal/index.js":"RRDs"}],"10U2":[function(require,module,exports) { -"use strict";exports.null=null,exports.nullable=function(l,n,t){return null==l?n:t(l)},exports.notNull=function(l){return l}; -},{}],"YQ8o":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),n=require("../Data.Eq/index.js"),r=require("../Data.Function/index.js"),u=require("../Data.Maybe/index.js"),l=require("../Data.Ord/index.js"),t=require("../Data.Show/index.js"),o=u.maybe(e.null)(e.notNull),a=function(n){return e.nullable(n,u.Nothing.value,u.Just.create)},i=function(e){return new t.Show((n=u.maybe("null")(t.show(e)),function(e){return n(a(e))}));var n},q=function(e){return new n.Eq(r.on(n.eq(u.eqMaybe(e)))(a))},c=function(e){return new l.Ord(function(){return q(e.Eq0())},r.on(l.compare(u.ordMaybe(e)))(a))},b=new n.Eq1(function(e){return n.eq(q(e))}),d=new l.Ord1(function(){return b},function(e){return l.compare(c(e))});module.exports={toMaybe:a,toNullable:o,showNullable:i,eqNullable:q,eq1Nullable:b,ordNullable:c,ord1Nullable:d,null:e.null,notNull:e.notNull}; -},{"./foreign.js":"10U2","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7"}],"+Eae":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Bind/index.js"),e=require("../Control.Monad.Rec.Class/index.js"),t=require("../Control.Monad.ST.Internal/index.js"),u=require("../Data.Array/index.js"),i=require("../Data.Array.ST/index.js"),o=require("../Data.Eq/index.js"),f=require("../Data.Foldable/index.js"),c=require("../Data.Function/index.js"),a=require("../Data.Functor/index.js"),d=require("../Data.List/index.js"),l=require("../Data.List.Types/index.js"),s=require("../Data.Map.Internal/index.js"),p=require("../Data.Maybe/index.js"),q=require("../Data.Monoid/index.js"),b=require("../Data.Ord/index.js"),m=require("../Data.Ordering/index.js"),x=require("../Data.Semigroup/index.js"),S=require("../Data.Show/index.js"),j=require("../Data.Unit/index.js"),w=function(n){return n},y=function(n){return function(r){return function(e){return s.union(n)(r)(e)}}},D=function(n){return s.keys(n)},M=function(n){var r=d.toUnfoldable(n);return function(n){return r(D(n))}},h=function(n){return s.size(n)},L=function(n){return s.singleton(n)(j.unit)},v=function(n){return new S.Show(function(r){return"(fromFoldable "+S.show(l.showList(n))(D(r))+")"})},T=function(n){return new x.Semigroup(y(n))},E=function(n){return function(r){return function(e){return s.member(n)(r)(e)}}},F=function(n){return s.isEmpty(n)},g=function(n){return function(r){return function(e){return s.insert(n)(r)(j.unit)(e)}}},k=new f.Foldable(function(n){return function(r){var e=f.foldMap(l.foldableList)(n)(r);return function(n){return e(D(n))}}},function(n){return function(r){var e=f.foldl(l.foldableList)(n)(r);return function(n){return e(D(n))}}},function(n){return function(r){var e=f.foldr(l.foldableList)(n)(r);return function(n){return e(D(n))}}}),C=function(n){return a.map(p.functorMaybe)(function(n){return n.key})(s.findMin(n))},A=function(n){return a.map(p.functorMaybe)(function(n){return n.key})(s.findMax(n))},O=function(n){return function(r){return function(e){return s.filterWithKey(n)(function(n){return function(e){return r(n)}})(e)}}},U=function(n){return new o.Eq(function(r){return function(e){return o.eq(s.eqMap(n)(o.eqUnit))(r)(e)}})},z=function(n){return new b.Ord(function(){return U(n.Eq0())},function(r){return function(e){return b.compare(l.ordList(n))(D(r))(D(e))}})},R=new o.Eq1(function(n){return o.eq(U(n))}),I=new b.Ord1(function(){return R},function(n){return b.compare(z(n))}),V=s.empty,B=function(n){return function(r){return f.foldl(n)(function(n){return function(e){return g(r)(e)(n)}})(V)}},G=function(o){return function(c){return function(a){var d,s=(d=u.fromFoldable(l.foldableList),function(n){return d(D(n))}),p=s(a),q=u.length(p),x=s(c),S=u.length(x);return B(f.foldableArray)(o)(r.bind(t.bindST)(r.bind(t.bindST)(i.empty)(function(r){return e.tailRecM2(t.monadRecST)(function(u){return function(f){if(u<S&&f<q){var c=b.compare(o)(x[u])(p[f]);if(c instanceof m.EQ)return function(){return i.push(x[u])(r)(),new e.Loop({a:u+1|0,b:f+1|0})};if(c instanceof m.LT)return n.pure(t.applicativeST)(new e.Loop({a:u+1|0,b:f}));if(c instanceof m.GT)return n.pure(t.applicativeST)(new e.Loop({a:u,b:f+1|0}));throw new Error("Failed pattern match at Data.Set (line 176, column 12 - line 181, column 43): "+[c.constructor.name])}return n.pure(t.applicativeST)(new e.Done(r))}})(0)(0)}))(i.unsafeFreeze)())}}},K=function(n){return function(r){return f.foldl(k)(function(e){return function(t){return g(n)(r(t))(e)}})(V)}},Q=function(n){return function(r){return f.foldr(k)(function(e){return function(t){return p.maybe(t)(function(r){return g(n)(r)(t)})(r(e))}})(V)}},W=function(n){return new q.Monoid(function(){return T(n)},V)},H=function(n){return function(r){return f.foldl(n)(y(r))(V)}},J=function(n){return function(r){return function(e){return s.delete(n)(r)(e)}}},N=function(n){return function(r){return function(e){return f.foldl(l.foldableList)(c.flip(J(n)))(r)(D(e))}}},P=function(n){return function(r){return function(e){return F(N(n)(r)(e))}}},X=function(n){return function(r){return function(e){return P(n)(r)(e)&&o.notEq(U(n.Eq0()))(r)(e)}}},Y=function(n){return s.checkValid(n)};module.exports={fromFoldable:B,toUnfoldable:M,empty:V,isEmpty:F,singleton:L,map:K,checkValid:Y,insert:g,member:E,delete:J,size:h,findMin:C,findMax:A,union:y,unions:H,difference:N,subset:P,properSubset:X,intersection:G,filter:O,mapMaybe:Q,eqSet:U,eq1Set:R,showSet:v,ordSet:z,ord1Set:I,monoidSet:W,semigroupSet:T,foldableSet:k}; -},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.ST.Internal/index.js":"Sedc","../Data.Array/index.js":"4t4C","../Data.Array.ST/index.js":"s8si","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Unit/index.js":"NhVk"}],"NCVa":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),t=require("../Control.Alternative/index.js"),e=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),u=require("../Control.Bind/index.js"),i=require("../Control.Category/index.js"),o=require("../Control.Monad/index.js"),a=require("../Control.Monad.Rec.Class/index.js"),c=require("../Control.Monad.Trans.Class/index.js"),f=require("../Control.MonadPlus/index.js"),l=require("../Control.MonadZero/index.js"),p=require("../Control.Plus/index.js"),s=require("../Data.Function/index.js"),d=require("../Data.Functor/index.js"),v=require("../Data.Lazy/index.js"),m=require("../Data.Maybe/index.js"),w=require("../Data.Monoid/index.js"),L=require("../Data.Newtype/index.js"),h=require("../Data.Semigroup/index.js"),y=require("../Data.Tuple/index.js"),M=require("../Data.Unfoldable/index.js"),T=require("../Data.Unfoldable1/index.js"),A=require("../Data.Unit/index.js"),F=require("../Effect.Class/index.js"),C=function(){function n(n,t){this.value0=n,this.value1=t}return n.create=function(t){return function(e){return new n(t,e)}},n}(),b=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),x=function(){function n(){}return n.value=new n,n}(),E=function(n){return n},j=function(n){return function(t){return E(e.pure(n)(new b(t)))}},q=function(n){return function(t){return E(d.map(n)(function(n){return b.create(v.defer(s.const(n)))})(t))}},z=function n(t){return function(e){return function(r){return E(d.map(t.Bind1().Apply0().Functor0())(function(r){if(r instanceof m.Just)return new C(r.value0.value1,v.defer(function(u){return n(t)(e)(r.value0.value0)}));if(r instanceof m.Nothing)return x.value;throw new Error("Failed pattern match at Control.Monad.List.Trans (line 130, column 3 - line 130, column 60): "+[r.constructor.name])})(e(r)))}}},B=function n(t){return function(r){return u.bind(t.Bind1())(r)(function(r){if(r instanceof C)return e.pure(t.Applicative0())(m.Just.create(new y.Tuple(r.value0,v.force(r.value1))));if(r instanceof b)return n(t)(v.force(r.value0));if(r instanceof x)return e.pure(t.Applicative0())(m.Nothing.value);throw new Error("Failed pattern match at Control.Monad.List.Trans (line 195, column 3 - line 195, column 50): "+[r.constructor.name])})}},g=function(n){return function(t){return d.map(n.Bind1().Apply0().Functor0())(d.map(m.functorMaybe)(y.snd))(B(n)(t))}},D=function(n){return function(t){return function(e){return E(d.map(n)(t)(e))}}},J=function n(t){return function(e){return D(t.Apply0().Functor0())(function(r){if(r instanceof C)return e(r.value0)?new C(r.value0,d.map(v.functorLazy)(n(t)(e))(r.value1)):x.value;if(r instanceof b)return b.create(d.map(v.functorLazy)(n(t)(e))(r.value0));if(r instanceof x)return x.value;throw new Error("Failed pattern match at Control.Monad.List.Trans (line 154, column 3 - line 154, column 68): "+[r.constructor.name])})}},N=function(n){return function(t){return function(e){return function(r){return z(n)(function(e){return d.map(n.Bind1().Apply0().Functor0())(function(n){if(n instanceof C){var r=t(e.value0)(n.value0);return m.Just.create(new y.Tuple(new y.Tuple(r,v.force(n.value1)),e.value0))}if(n instanceof b)return m.Just.create(new y.Tuple(new y.Tuple(e.value0,v.force(n.value0)),e.value0));if(n instanceof x)return m.Nothing.value;throw new Error("Failed pattern match at Control.Monad.List.Trans (line 248, column 5 - line 248, column 78): "+[n.constructor.name])})(e.value1)})(new y.Tuple(e,r))}}}},R=function(n){return function(t){return function(r){return E(e.pure(n)(new C(t,r)))}}},P=function(n){return function(t){return function(e){return R(n)(t)(v.defer(s.const(e)))}}},U=function(n){return E(e.pure(n)(x.value))},W=function(n){return function(t){return P(n)(t)(U(n))}},k=function n(t){return function(e){return function(r){if(0===e)return U(t);return D(t.Apply0().Functor0())(function(r){if(r instanceof C)return new C(r.value0,d.map(v.functorLazy)(n(t)(e-1|0))(r.value1));if(r instanceof b)return new b(d.map(v.functorLazy)(n(t)(e))(r.value0));if(r instanceof x)return x.value;throw new Error("Failed pattern match at Control.Monad.List.Trans (line 147, column 3 - line 147, column 47): "+[r.constructor.name])})(r)}}},S=function n(t){return function(r){return function(i){return function(o){return q(t.Bind1().Apply0().Functor0())(u.bind(t.Bind1())(B(t)(i))(function(i){return u.bind(t.Bind1())(B(t)(o))(function(u){return function(u){return function(i){if(i instanceof m.Nothing)return e.pure(t.Applicative0())(U(t.Applicative0()));if(u instanceof m.Nothing)return e.pure(t.Applicative0())(U(t.Applicative0()));if(u instanceof m.Just&&i instanceof m.Just)return d.map(t.Bind1().Apply0().Functor0())(s.flip(R(t.Applicative0()))(v.defer(function(e){return n(t)(r)(u.value0.value1)(i.value0.value1)})))(r(u.value0.value0)(i.value0.value0));throw new Error("Failed pattern match at Control.Monad.List.Trans (line 260, column 3 - line 260, column 25): "+[u.constructor.name,i.constructor.name])}}(i)(u)})}))}}}},Z=function(n){return function(t){return S(n)(function(r){return function(u){return e.pure(n.Applicative0())(t(r)(u))}})}},Y=new L.Newtype(function(n){return n},E),G=function n(t){return function(e){return D(t)(function(r){if(r instanceof C)return m.fromMaybe(b.create)(d.map(m.functorMaybe)(C.create)(e(r.value0)))(d.map(v.functorLazy)(n(t)(e))(r.value1));if(r instanceof b)return b.create(d.map(v.functorLazy)(n(t)(e))(r.value0));if(r instanceof x)return x.value;throw new Error("Failed pattern match at Control.Monad.List.Trans (line 183, column 3 - line 183, column 72): "+[r.constructor.name])})}},H=function(n){return function(t){return function(r){return z(n)(function(r){return e.pure(n.Applicative0())(new m.Just(new y.Tuple(t(r),r)))})(r)}}},I=function(n){return H(n)(i.identity(i.categoryFn))},K=function(n){return function(t){return d.map(n.Bind1().Apply0().Functor0())(d.map(m.functorMaybe)(y.fst))(B(n)(t))}},O=function n(t){return new d.Functor(function(e){return D(t)(function(r){if(r instanceof C)return new C(e(r.value0),d.map(v.functorLazy)(d.map(n(t))(e))(r.value1));if(r instanceof b)return new b(d.map(v.functorLazy)(d.map(n(t))(e))(r.value0));if(r instanceof x)return x.value;throw new Error("Failed pattern match at Control.Monad.List.Trans (line 280, column 5 - line 280, column 48): "+[r.constructor.name])})})},Q=function(n){return function(t){return E(d.map(n.Apply0().Functor0())(s.flip(C.create)(v.defer(function(t){return U(n)})))(t))}},V=new c.MonadTrans(function(n){return Q(n.Applicative0())}),X=function(n){return function(t){return a.tailRecM2(n)(function(r){return function(i){return u.bind(n.Monad0().Bind1())(B(n.Monad0())(i))(function(i){if(i instanceof m.Nothing)return e.pure(n.Monad0().Applicative0())(new a.Done(r));if(i instanceof m.Just)return u.bind(n.Monad0().Bind1())(t(r)(i.value0.value0))(function(t){return e.pure(n.Monad0().Applicative0())(new a.Loop({a:t,b:i.value0.value1}))});throw new Error("Failed pattern match at Control.Monad.List.Trans (line 221, column 5 - line 221, column 45): "+[i.constructor.name])})}})}},$=function(n){return X(n)(function(t){return function(t){return e.pure(n.Monad0().Applicative0())(A.unit)}})(A.unit)},_=function(n){return function(t){return a.tailRecM2(n)(function(r){return function(i){return u.bind(n.Monad0().Bind1())(B(n.Monad0())(i))(function(u){if(u instanceof m.Nothing)return e.pure(n.Monad0().Applicative0())(new a.Done(r));if(u instanceof m.Just)return e.pure(n.Monad0().Applicative0())(new a.Loop({a:t(r)(u.value0.value0),b:u.value0.value1}));throw new Error("Failed pattern match at Control.Monad.List.Trans (line 239, column 7 - line 239, column 47): "+[u.constructor.name])})}})}},nn=function(n){return function(t){return function r(i){return function(o){return u.bind(n.Bind1())(B(n)(o))(function(o){if(o instanceof m.Nothing)return e.pure(n.Applicative0())(i);if(o instanceof m.Just)return u.bind(n.Bind1())(t(i)(o.value0.value0))(s.flip(r)(o.value0.value1));throw new Error("Failed pattern match at Control.Monad.List.Trans (line 212, column 5 - line 212, column 35): "+[o.constructor.name])})}}}},tn=function(n){return nn(n)(function(t){return function(t){return e.pure(n.Applicative0())(A.unit)}})(A.unit)},en=function(n){return function(t){return function r(i){return function(o){return u.bind(n.Bind1())(B(n)(o))(function(u){if(u instanceof m.Nothing)return e.pure(n.Applicative0())(i);if(u instanceof m.Just)return r(t(i)(u.value0.value0))(u.value0.value1);throw new Error("Failed pattern match at Control.Monad.List.Trans (line 229, column 5 - line 229, column 35): "+[u.constructor.name])})}}}},rn=function n(t){return function(e){return D(t)(function(r){if(r instanceof C){var u=d.map(v.functorLazy)(n(t)(e))(r.value1);return e(r.value0)?new C(r.value0,u):new b(u)}if(r instanceof b)return u=d.map(v.functorLazy)(n(t)(e))(r.value0),new b(u);if(r instanceof x)return x.value;throw new Error("Failed pattern match at Control.Monad.List.Trans (line 176, column 3 - line 176, column 80): "+[r.constructor.name])})}},un=function n(t){return function(e){return D(t.Apply0().Functor0())(function(r){if(r instanceof C)return e(r.value0)?new b(d.map(v.functorLazy)(n(t)(e))(r.value1)):new C(r.value0,r.value1);if(r instanceof b)return b.create(d.map(v.functorLazy)(n(t)(e))(r.value0));if(r instanceof x)return x.value;throw new Error("Failed pattern match at Control.Monad.List.Trans (line 169, column 3 - line 169, column 70): "+[r.constructor.name])})}},on=function n(t){return function(e){return function(r){if(0===e)return r;return D(t.Apply0().Functor0())(function(r){if(r instanceof C)return new b(d.map(v.functorLazy)(n(t)(e-1|0))(r.value1));if(r instanceof b)return new b(d.map(v.functorLazy)(n(t)(e))(r.value0));if(r instanceof x)return x.value;throw new Error("Failed pattern match at Control.Monad.List.Trans (line 162, column 3 - line 162, column 44): "+[r.constructor.name])})(r)}}},an=function(n){return function(t){return function(r){return E(e.pure(n)(new C(v.force(t),r)))}}},cn=function(n){return new T.Unfoldable1(function(t){return function(r){return function r(u){if(u.value1 instanceof m.Nothing)return W(n.Applicative0())(u.value0);if(u.value1 instanceof m.Just)return an(n.Applicative0())(e.pure(v.applicativeLazy)(u.value0))(v.defer(function(n){return r(t(u.value1.value0))}));throw new Error("Failed pattern match at Control.Monad.List.Trans (line 294, column 12 - line 296, column 67): "+[u.constructor.name])}(t(r))}})},fn=function(n){return new M.Unfoldable(function(){return cn(n)},function(t){return function(r){return function r(u){if(u instanceof m.Nothing)return U(n.Applicative0());if(u instanceof m.Just)return an(n.Applicative0())(e.pure(v.applicativeLazy)(u.value0.value0))(v.defer(function(n){return r(t(u.value0.value1))}));throw new Error("Failed pattern match at Control.Monad.List.Trans (line 287, column 12 - line 289, column 67): "+[u.constructor.name])}(t(r))}})},ln=function(n){return new h.Semigroup(pn(n))},pn=function(n){return function(t){return function(e){return D(n.Apply0().Functor0())(function(t){if(t instanceof C)return new C(t.value0,d.map(v.functorLazy)(function(t){return h.append(ln(n))(t)(e)})(t.value1));if(t instanceof b)return new b(d.map(v.functorLazy)(function(t){return h.append(ln(n))(t)(e)})(t.value0));if(t instanceof x)return new b(v.defer(s.const(e)));throw new Error("Failed pattern match at Control.Monad.List.Trans (line 106, column 3 - line 106, column 43): "+[t.constructor.name])})(t)}}},sn=function(n){return new w.Monoid(function(){return ln(n)},U(n))},dn=function(n){return G(n)(i.identity(i.categoryFn))},vn=function(n){return new o.Monad(function(){return Ln(n)},function(){return mn(n)})},mn=function n(t){return new u.Bind(function(){return wn(t)},function(e){return function(r){return D(t.Bind1().Apply0().Functor0())(function(e){if(e instanceof C)return new b(d.map(v.functorLazy)(function(i){return h.append(ln(t.Applicative0()))(r(e.value0))(u.bind(n(t))(i)(r))})(e.value1));if(e instanceof b)return new b(d.map(v.functorLazy)(function(e){return u.bind(n(t))(e)(r)})(e.value0));if(e instanceof x)return x.value;throw new Error("Failed pattern match at Control.Monad.List.Trans (line 306, column 5 - line 308, column 31): "+[e.constructor.name])})(e)}})},wn=function(n){return new r.Apply(function(){return O(n.Bind1().Apply0().Functor0())},o.ap(vn(n)))},Ln=function(n){return new e.Applicative(function(){return wn(n)},W(n.Applicative0()))},hn=function(n){return new F.MonadEffect(function(){return vn(n.Monad0())},(t=c.lift(V)(n.Monad0()),e=F.liftEffect(n),function(n){return t(e(n))}));var t,e},yn=function(t){return new n.Alt(function(){return O(t.Apply0().Functor0())},pn(t))},Mn=function(n){return new p.Plus(function(){return yn(n.Applicative0())},U(n.Applicative0()))},Tn=function(n){return new t.Alternative(function(){return Ln(n)},function(){return Mn(n)})},An=function(n){return new l.MonadZero(function(){return Tn(n)},function(){return vn(n)})},Fn=function(n){return new f.MonadPlus(function(){return An(n)})};module.exports={ListT:E,Yield:C,Skip:b,Done:x,catMaybes:dn,cons:an,drop:on,dropWhile:un,filter:rn,foldl:en,foldlRec:_,"foldl'":nn,"foldlRec'":X,fromEffect:Q,head:K,iterate:H,mapMaybe:G,nil:U,prepend:P,"prepend'":R,repeat:I,runListT:tn,runListTRec:$,scanl:N,singleton:W,tail:g,take:k,takeWhile:J,uncons:B,unfold:z,wrapEffect:q,wrapLazy:j,zipWith:Z,"zipWith'":S,newtypeListT:Y,semigroupListT:ln,monoidListT:sn,functorListT:O,unfoldableListT:fn,unfoldable1ListT:cn,applyListT:wn,applicativeListT:Ln,bindListT:mn,monadListT:vn,monadTransListT:V,altListT:yn,plusListT:Mn,alternativeListT:Tn,monadZeroListT:An,monadPlusListT:Fn,monadEffectListT:hn}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad/index.js":"U/Ix","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.MonadPlus/index.js":"HkJx","../Control.MonadZero/index.js":"lD5R","../Control.Plus/index.js":"oMBg","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Lazy/index.js":"aRUE","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unfoldable1/index.js":"S0Nl","../Data.Unit/index.js":"NhVk","../Effect.Class/index.js":"dWtH"}],"8Fyn":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),r=require("../Control.Alternative/index.js"),u=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),t=require("../Control.Bind/index.js"),i=require("../Control.Lazy/index.js"),o=require("../Control.Monad/index.js"),c=require("../Control.Monad.Error.Class/index.js"),a=require("../Control.Monad.Reader.Class/index.js"),f=require("../Control.Monad.Rec.Class/index.js"),l=require("../Control.Monad.State.Class/index.js"),d=require("../Control.Monad.Trans.Class/index.js"),p=require("../Control.Monad.Writer.Class/index.js"),v=require("../Control.Plus/index.js"),s=require("../Data.Functor/index.js"),w=require("../Data.Monoid/index.js"),T=require("../Data.Newtype/index.js"),m=require("../Data.Semigroup/index.js"),R=require("../Data.Tuple/index.js"),S=require("../Data.Unit/index.js"),W=require("../Effect.Class/index.js"),M=function(){function n(n,r,u){this.value0=n,this.value1=r,this.value2=u}return n.create=function(r){return function(u){return function(e){return new n(r,u,e)}}},n}(),A=function(n){return n},x=function(n){return function(r){return function(u){return function(e){return R.uncurry(r)(n(u)(e))}}}},C=function(n){return n},j=new T.Newtype(function(n){return n},A),q=function(n){return new d.MonadTrans(function(r){return function(e){return function(i){return function(i){return t.bind(r.Bind1())(e)(function(e){return u.pure(r.Applicative0())(new M(i,e,w.mempty(n)))})}}}})},y=function(n){return function(r){return function(u){return function(e){return n(r(u)(e))}}}},h=new i.Lazy(function(n){return function(r){return function(u){return n(S.unit)(r)(u)}}}),B=function(n){return new s.Functor(function(r){return function(u){return function(e){return function(t){return s.map(n)(function(n){return new M(n.value0,r(n.value1),n.value2)})(u(e)(t))}}}})},E=function(n){return function(r){return function(e){return function(i){return t.bind(n.Bind1())(r(e)(i))(function(r){return u.pure(n.Applicative0())(new R.Tuple(r.value0,r.value2))})}}}},b=function(n){return function(r){return function(e){return function(i){return t.bind(n.Bind1())(r(e)(i))(function(r){return u.pure(n.Applicative0())(new R.Tuple(r.value1,r.value2))})}}}},F=function(n){return function(r){return new e.Apply(function(){return B(n.Apply0().Functor0())},function(u){return function(e){return function(i){return function(o){return t.bind(n)(u(i)(o))(function(u){return s.mapFlipped(n.Apply0().Functor0())(e(i)(u.value0))(function(n){return new M(n.value0,u.value1(n.value1),m.append(r.Semigroup0())(u.value2)(n.value2))})})}}}})}},D=function(n){return function(r){return new t.Bind(function(){return F(n)(r)},function(u){return function(e){return function(i){return function(o){return t.bind(n)(u(i)(o))(function(u){var t=e(u.value1);return s.mapFlipped(n.Apply0().Functor0())(t(i)(u.value0))(function(n){return new M(n.value0,n.value1,m.append(r.Semigroup0())(u.value2)(n.value2))})})}}}})}},g=function(n){return function(r){return new u.Applicative(function(){return F(n.Bind1())(r)},function(e){return function(t){return function(t){return u.pure(n.Applicative0())(new M(t,e,w.mempty(r)))}}})}},L=function(n){return function(r){return new o.Monad(function(){return g(n)(r)},function(){return D(n.Bind1())(r)})}},z=function(n){return function(r){return new a.MonadAsk(function(){return L(n)(r)},function(e){return function(t){return u.pure(n.Applicative0())(new M(t,e,w.mempty(r)))}})}},P=function(n){return function(r){return new a.MonadReader(function(){return z(n)(r)},function(n){return function(r){return function(u){return function(e){return r(n(u))(e)}}}})}},k=function(n){return function(r){return new W.MonadEffect(function(){return L(r.Monad0())(n)},(u=d.lift(q(n))(r.Monad0()),e=W.liftEffect(r),function(n){return u(e(n))}));var u,e}},N=function(n){return function(r){return new f.MonadRec(function(){return L(n.Monad0())(r)},function(e){return function(i){return function(o){return function(c){return f.tailRecM(n)(function(i){return function(o){var c=e(o.value1);return t.bind(n.Monad0().Bind1())(c(i)(o.value0))(function(e){return u.pure(n.Monad0().Applicative0())(function(){if(e.value1 instanceof f.Loop)return new f.Loop(new M(e.value0,e.value1.value0,m.append(r.Semigroup0())(o.value2)(e.value2)));if(e.value1 instanceof f.Done)return new f.Done(new M(e.value0,e.value1.value0,m.append(r.Semigroup0())(o.value2)(e.value2)));throw new Error("Failed pattern match at Control.Monad.RWS.Trans (line 127, column 16 - line 129, column 68): "+[e.value1.constructor.name])}())})}}(o))(new M(c,i,w.mempty(r)))}}}})}},U=function(n){return function(r){return new l.MonadState(function(){return L(n)(r)},function(e){return function(t){return function(t){var i=e(t);return u.pure(n.Applicative0())(new M(i.value1,i.value0,w.mempty(r)))}}})}},G=function(n){return function(r){return new p.MonadTell(function(){return L(n)(r)},function(r){return function(e){return function(e){return u.pure(n.Applicative0())(new M(e,S.unit,r))}}})}},H=function(n){return function(r){return new p.MonadWriter(function(){return G(n)(r)},function(r){return function(e){return function(i){return t.bind(n.Bind1())(r(e)(i))(function(r){return u.pure(n.Applicative0())(new M(r.value0,new R.Tuple(r.value1,r.value2),r.value2))})}}},function(r){return function(e){return function(i){return t.bind(n.Bind1())(r(e)(i))(function(r){return u.pure(n.Applicative0())(new M(r.value0,r.value1.value0,r.value1.value1(r.value2)))})}}})}},I=function(n){return function(r){return new c.MonadThrow(function(){return L(n.Monad0())(r)},function(u){return d.lift(q(r))(n.Monad0())(c.throwError(n)(u))})}},J=function(n){return function(r){return new c.MonadError(function(){return I(n.MonadThrow0())(r)},function(r){return function(u){return A(function(e){return function(t){return c.catchError(n)(r(e)(t))(function(n){return u(n)(e)(t)})}})}})}},K=function(r){return new n.Alt(function(){return B(r.Functor0())},function(u){return function(e){return A(function(t){return function(i){return n.alt(r)(u(t)(i))(e(t)(i))}})}})},O=function(n){return new v.Plus(function(){return K(n.Alt0())},function(r){return function(r){return v.empty(n)}})},Q=function(n){return function(u){return function(e){return new r.Alternative(function(){return g(e)(n)},function(){return O(u.Plus1())})}}};module.exports={RWSResult:M,RWST:A,runRWST:C,evalRWST:b,execRWST:E,mapRWST:y,withRWST:x,newtypeRWST:j,functorRWST:B,applyRWST:F,altRWST:K,alternativeRWST:Q,bindRWST:D,applicativeRWST:g,monadRWST:L,monadTransRWST:q,lazyRWST:h,monadEffectRWS:k,monadAskRWST:z,monadReaderRWST:P,monadStateRWST:U,monadTellRWST:G,monadWriterRWST:H,monadThrowRWST:I,monadErrorRWST:J,monadRecRWST:N,plusRWST:O}; -},{"../Control.Alt/index.js":"lN+m","../Control.Alternative/index.js":"aHia","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Lazy/index.js":"y9cE","../Control.Monad/index.js":"U/Ix","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Reader.Class/index.js":"c2ZJ","../Control.Monad.Rec.Class/index.js":"UVIy","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Class/index.js":"gxgA","../Control.Plus/index.js":"oMBg","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk","../Effect.Class/index.js":"dWtH"}],"I4H+":[function(require,module,exports) { -"use strict";var n=require("../Control.Category/index.js"),t=require("../Control.Monad.Cont.Trans/index.js"),r=require("../Control.Monad.Except.Trans/index.js"),e=require("../Control.Monad.List.Trans/index.js"),f=require("../Control.Monad.Maybe.Trans/index.js"),o=require("../Control.Monad.RWS.Trans/index.js"),a=require("../Control.Monad.Reader.Trans/index.js"),d=require("../Control.Monad.State.Trans/index.js"),i=require("../Control.Monad.Trans.Class/index.js"),u=require("../Control.Monad.Writer.Trans/index.js"),c=require("../Effect.Aff/index.js"),s=function(n,t){this.MonadEffect0=n,this.liftAff=t},M=new s(function(){return c.monadEffectAff},n.identity(n.categoryFn)),E=function(n){return n.liftAff},T=function(n){return new s(function(){return t.monadEffectContT(n.MonadEffect0())},(r=i.lift(t.monadTransContT)(n.MonadEffect0().Monad0()),e=E(n),function(n){return r(e(n))}));var r,e},m=function(n){return new s(function(){return r.monadEffectExceptT(n.MonadEffect0())},(t=i.lift(r.monadTransExceptT)(n.MonadEffect0().Monad0()),e=E(n),function(n){return t(e(n))}));var t,e},l=function(n){return new s(function(){return e.monadEffectListT(n.MonadEffect0())},(t=i.lift(e.monadTransListT)(n.MonadEffect0().Monad0()),r=E(n),function(n){return t(r(n))}));var t,r},x=function(n){return new s(function(){return f.monadEffectMaybe(n.MonadEffect0())},(t=i.lift(f.monadTransMaybeT)(n.MonadEffect0().Monad0()),r=E(n),function(n){return t(r(n))}));var t,r},A=function(n){return function(t){return new s(function(){return o.monadEffectRWS(t)(n.MonadEffect0())},(r=i.lift(o.monadTransRWST(t))(n.MonadEffect0().Monad0()),e=E(n),function(n){return r(e(n))}));var r,e}},C=function(n){return new s(function(){return a.monadEffectReader(n.MonadEffect0())},(t=i.lift(a.monadTransReaderT)(n.MonadEffect0().Monad0()),r=E(n),function(n){return t(r(n))}));var t,r},j=function(n){return new s(function(){return d.monadEffectState(n.MonadEffect0())},(t=i.lift(d.monadTransStateT)(n.MonadEffect0().Monad0()),r=E(n),function(n){return t(r(n))}));var t,r},q=function(n){return function(t){return new s(function(){return u.monadEffectWriter(t)(n.MonadEffect0())},(r=i.lift(u.monadTransWriterT(t))(n.MonadEffect0().Monad0()),e=E(n),function(n){return r(e(n))}));var r,e}};module.exports={liftAff:E,MonadAff:s,monadAffAff:M,monadAffContT:T,monadAffExceptT:m,monadAffListT:l,monadAffMaybe:x,monadAffReader:C,monadAffRWS:A,monadAffState:j,monadAffWriter:q}; -},{"../Control.Category/index.js":"IAi2","../Control.Monad.Cont.Trans/index.js":"XW2d","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Monad.List.Trans/index.js":"NCVa","../Control.Monad.Maybe.Trans/index.js":"UUIS","../Control.Monad.RWS.Trans/index.js":"8Fyn","../Control.Monad.Reader.Trans/index.js":"uvht","../Control.Monad.State.Trans/index.js":"34Kp","../Control.Monad.Trans.Class/index.js":"5tIR","../Control.Monad.Writer.Trans/index.js":"VAds","../Effect.Aff/index.js":"I7lu"}],"ViyF":[function(require,module,exports) { -"use strict";exports.mkEffectFn1=function(n){return function(t){return n(t)()}},exports.mkEffectFn2=function(n){return function(t,r){return n(t)(r)()}},exports.mkEffectFn3=function(n){return function(t,r,u){return n(t)(r)(u)()}},exports.mkEffectFn4=function(n){return function(t,r,u,e){return n(t)(r)(u)(e)()}},exports.mkEffectFn5=function(n){return function(t,r,u,e,f){return n(t)(r)(u)(e)(f)()}},exports.mkEffectFn6=function(n){return function(t,r,u,e,f,c){return n(t)(r)(u)(e)(f)(c)()}},exports.mkEffectFn7=function(n){return function(t,r,u,e,f,c,o){return n(t)(r)(u)(e)(f)(c)(o)()}},exports.mkEffectFn8=function(n){return function(t,r,u,e,f,c,o,i){return n(t)(r)(u)(e)(f)(c)(o)(i)()}},exports.mkEffectFn9=function(n){return function(t,r,u,e,f,c,o,i,s){return n(t)(r)(u)(e)(f)(c)(o)(i)(s)()}},exports.mkEffectFn10=function(n){return function(t,r,u,e,f,c,o,i,s,p){return n(t)(r)(u)(e)(f)(c)(o)(i)(s)(p)()}},exports.runEffectFn1=function(n){return function(t){return function(){return n(t)}}},exports.runEffectFn2=function(n){return function(t){return function(r){return function(){return n(t,r)}}}},exports.runEffectFn3=function(n){return function(t){return function(r){return function(u){return function(){return n(t,r,u)}}}}},exports.runEffectFn4=function(n){return function(t){return function(r){return function(u){return function(e){return function(){return n(t,r,u,e)}}}}}},exports.runEffectFn5=function(n){return function(t){return function(r){return function(u){return function(e){return function(f){return function(){return n(t,r,u,e,f)}}}}}}},exports.runEffectFn6=function(n){return function(t){return function(r){return function(u){return function(e){return function(f){return function(c){return function(){return n(t,r,u,e,f,c)}}}}}}}},exports.runEffectFn7=function(n){return function(t){return function(r){return function(u){return function(e){return function(f){return function(c){return function(o){return function(){return n(t,r,u,e,f,c,o)}}}}}}}}},exports.runEffectFn8=function(n){return function(t){return function(r){return function(u){return function(e){return function(f){return function(c){return function(o){return function(i){return function(){return n(t,r,u,e,f,c,o,i)}}}}}}}}}},exports.runEffectFn9=function(n){return function(t){return function(r){return function(u){return function(e){return function(f){return function(c){return function(o){return function(i){return function(s){return function(){return n(t,r,u,e,f,c,o,i,s)}}}}}}}}}}},exports.runEffectFn10=function(n){return function(t){return function(r){return function(u){return function(e){return function(f){return function(c){return function(o){return function(i){return function(s){return function(p){return function(){return n(t,r,u,e,f,c,o,i,s,p)}}}}}}}}}}}}; -},{}],"qn3Z":[function(require,module,exports) { -"use strict";var f=require("./foreign.js");module.exports={mkEffectFn1:f.mkEffectFn1,mkEffectFn2:f.mkEffectFn2,mkEffectFn3:f.mkEffectFn3,mkEffectFn4:f.mkEffectFn4,mkEffectFn5:f.mkEffectFn5,mkEffectFn6:f.mkEffectFn6,mkEffectFn7:f.mkEffectFn7,mkEffectFn8:f.mkEffectFn8,mkEffectFn9:f.mkEffectFn9,mkEffectFn10:f.mkEffectFn10,runEffectFn1:f.runEffectFn1,runEffectFn2:f.runEffectFn2,runEffectFn3:f.runEffectFn3,runEffectFn4:f.runEffectFn4,runEffectFn5:f.runEffectFn5,runEffectFn6:f.runEffectFn6,runEffectFn7:f.runEffectFn7,runEffectFn8:f.runEffectFn8,runEffectFn9:f.runEffectFn9,runEffectFn10:f.runEffectFn10}; -},{"./foreign.js":"ViyF"}],"61ee":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Bind/index.js"),e=require("../Data.Symbol/index.js"),t=require("../Data.Unit/index.js"),i=require("../Effect.Aff/index.js"),u=require("../Effect.Aff.AVar/index.js"),f=require("../Record/index.js"),c=require("../Type.Data.RowList/index.js"),o=require("../Type.Equality/index.js"),a=function(n){this.compile=n},d=function(n){return n.compile},s=function(n){return function(n){return function(r){return d(n)(c.RLProxy.value)(r)}}},l=function(r){return new a(function(e){return function(e){return n.pure(i.applicativeAff)({run:function(r){return n.pure(i.applicativeAff)(t.unit)},last:o.from(r)({})})}})},p=function(t){return function(o){return function(o){return function(s){return function(l){return function(p){return new a(function(a){return function(a){return r.bind(i.bindAff)(d(p)(c.RLProxy.value)(a))(function(c){return r.bind(i.bindAff)(u.empty)(function(d){var p=f.insert(t)(s)(l)(e.SProxy.value)(u.read(d))(c.last);return n.pure(i.applicativeAff)({last:p,run:function(n){return r.discard(r.discardUnit)(i.bindAff)(c.run(n))(function(){var c=f.get(t)(o)(e.SProxy.value)(a(n));return r.bind(i.bindAff)(u.tryTake(d))(function(n){return u.put(c)(d)})})}})})})}})}}}}}};module.exports={compile:d,CacherAff:a,new:s,cacherAffCons:p,cacherAffNil:l}; -},{"../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Effect.Aff/index.js":"I7lu","../Effect.Aff.AVar/index.js":"hACG","../Record/index.js":"0gG4","../Type.Data.RowList/index.js":"XaXP","../Type.Equality/index.js":"Uq/R"}],"1Q0x":[function(require,module,exports) { -"use strict";exports.setContextTranslation=function(t){return function(n){return function(){n.setTransform(1,0,0,1,t.x,t.y)}}}; -},{}],"RCTS":[function(require,module,exports) { -"use strict";exports.canvasElementToImageSource=function(n){return n},exports.tryLoadImageImpl=function(n){return function(t){return function(r){return function(){var e=new Image;e.src=n,e.addEventListener("load",function(){r(e)()},!1),e.addEventListener("error",function(n){t()},!1)}}}},exports.getCanvasElementByIdImpl=function(n,t,r){return function(){var e=document.getElementById(n);return e&&e instanceof HTMLCanvasElement?t(e):r}},exports.getContext2D=function(n){return function(){return n.getContext("2d")}},exports.getCanvasWidth=function(n){return function(){return n.width}},exports.getCanvasHeight=function(n){return function(){return n.height}},exports.setCanvasWidth=function(n){return function(t){return function(){n.width=t}}},exports.setCanvasHeight=function(n){return function(t){return function(){n.height=t}}},exports.canvasToDataURL=function(n){return function(){return n.toDataURL()}},exports.setLineWidth=function(n){return function(t){return function(){n.lineWidth=t}}},exports.setLineDash=function(n){return function(t){return function(){n.setLineDash(t)}}},exports.setFillStyle=function(n){return function(t){return function(){n.fillStyle=t}}},exports.setStrokeStyle=function(n){return function(t){return function(){n.strokeStyle=t}}},exports.setShadowColor=function(n){return function(t){return function(){n.shadowColor=t}}},exports.setShadowBlur=function(n){return function(t){return function(){n.shadowBlur=t}}},exports.setShadowOffsetX=function(n){return function(t){return function(){n.shadowOffsetX=t}}},exports.setShadowOffsetY=function(n){return function(t){return function(){n.shadowOffsetY=t}}},exports.setMiterLimit=function(n){return function(t){return function(){n.miterLimit=t}}},exports.setLineCapImpl=function(n){return function(t){return function(){n.lineCap=t}}},exports.setLineJoinImpl=function(n){return function(t){return function(){n.lineJoin=t}}},exports.setGlobalCompositeOperationImpl=function(n){return function(t){return function(){n.globalCompositeOperation=t}}},exports.setGlobalAlpha=function(n){return function(t){return function(){n.globalAlpha=t}}},exports.beginPath=function(n){return function(){n.beginPath()}},exports.stroke=function(n){return function(){n.stroke()}},exports.fill=function(n){return function(){n.fill()}},exports.clip=function(n){return function(){n.clip()}},exports.lineTo=function(n){return function(t){return function(r){return function(){n.lineTo(t,r)}}}},exports.moveTo=function(n){return function(t){return function(r){return function(){n.moveTo(t,r)}}}},exports.closePath=function(n){return function(){n.closePath()}},exports.arc=function(n){return function(t){return function(){n.arc(t.x,t.y,t.radius,t.start,t.end)}}},exports.rect=function(n){return function(t){return function(){n.rect(t.x,t.y,t.width,t.height)}}},exports.fillRect=function(n){return function(t){return function(){n.fillRect(t.x,t.y,t.width,t.height)}}},exports.strokeRect=function(n){return function(t){return function(){n.strokeRect(t.x,t.y,t.width,t.height)}}},exports.clearRect=function(n){return function(t){return function(){n.clearRect(t.x,t.y,t.width,t.height)}}},exports.scale=function(n){return function(t){return function(){n.scale(t.scaleX,t.scaleY)}}},exports.rotate=function(n){return function(t){return function(){n.rotate(t)}}},exports.translate=function(n){return function(t){return function(){n.translate(t.translateX,t.translateY)}}},exports.transform=function(n){return function(t){return function(){n.transform(t.m11,t.m12,t.m21,t.m22,t.m31,t.m32)}}},exports.setTransform=function(n){return function(t){return function(){n.setTransform(t.m11,t.m12,t.m21,t.m22,t.m31,t.m32)}}},exports.textAlignImpl=function(n){return function(){return n.textAlign}},exports.setTextAlignImpl=function(n){return function(t){return function(){n.textAlign=t}}},exports.font=function(n){return function(){return n.font}},exports.setFont=function(n){return function(t){return function(){n.font=t}}},exports.fillText=function(n){return function(t){return function(r){return function(e){return function(){n.fillText(t,r,e)}}}}},exports.strokeText=function(n){return function(t){return function(r){return function(e){return function(){n.strokeText(t,r,e)}}}}},exports.measureText=function(n){return function(t){return function(){return n.measureText(t)}}},exports.save=function(n){return function(){n.save()}},exports.restore=function(n){return function(){n.restore()}},exports.imageDataWidth=function(n){return n.width},exports.imageDataHeight=function(n){return n.height},exports.imageDataBuffer=function(n){return n.data},exports.getImageData=function(n){return function(t){return function(r){return function(e){return function(u){return function(){return n.getImageData(t,r,e,u)}}}}}},exports.putImageDataFull=function(n){return function(t){return function(r){return function(e){return function(u){return function(o){return function(i){return function(c){return function(){n.putImageData(t,r,e,u,o,i,c)}}}}}}}}},exports.putImageData=function(n){return function(t){return function(r){return function(e){return function(){n.putImageData(t,r,e)}}}}},exports.createImageData=function(n){return function(t){return function(r){return function(){return n.createImageData(t,r)}}}},exports.createImageDataCopy=function(n){return function(t){return function(){return n.createImageData(t)}}},exports.drawImage=function(n){return function(t){return function(r){return function(e){return function(){n.drawImage(t,r,e)}}}}},exports.drawImageScale=function(n){return function(t){return function(r){return function(e){return function(u){return function(o){return function(){n.drawImage(t,r,e,u,o)}}}}}}},exports.drawImageFull=function(n){return function(t){return function(r){return function(e){return function(u){return function(o){return function(i){return function(c){return function(f){return function(a){return function(){n.drawImage(t,r,e,u,o,i,c,f,a)}}}}}}}}}}},exports.createPatternImpl=function(n){return function(t){return function(r){return function(){return n.createPattern(t,r)}}}},exports.setPatternFillStyle=function(n){return function(t){return function(){n.fillStyle=t}}},exports.createLinearGradient=function(n){return function(t){return function(){return n.createLinearGradient(t.x0,t.y0,t.x1,t.y1)}}},exports.createRadialGradient=function(n){return function(t){return function(){return n.createRadialGradient(t.x0,t.y0,t.r0,t.x1,t.y1,t.r1)}}},exports.addColorStop=function(n){return function(t){return function(r){return function(){n.addColorStop(t,r)}}}},exports.setGradientFillStyle=function(n){return function(t){return function(){n.fillStyle=t}}},exports.quadraticCurveTo=function(n){return function(t){return function(){n.quadraticCurveTo(t.cpx,t.cpy,t.x,t.y)}}},exports.bezierCurveTo=function(n){return function(t){return function(){n.bezierCurveTo(t.cp1x,t.cp1y,t.cp2x,t.cp2y,t.x,t.y)}}}; -},{}],"IZvR":[function(require,module,exports) { -"use strict";var e=require("../Effect.Exception/index.js"),r=require("../Effect.Unsafe/index.js"),n=function(n){return r.unsafePerformEffect(e.throwException(n))},t=function(r){return n(e.error(r))};module.exports={unsafeThrowException:n,unsafeThrow:t}; -},{"../Effect.Exception/index.js":"0OCW","../Effect.Unsafe/index.js":"tPW2"}],"rm6N":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),e=require("../Control.Apply/index.js"),t=require("../Data.Eq/index.js"),r=require("../Data.Functor/index.js"),i=require("../Data.Maybe/index.js"),a=require("../Data.Show/index.js"),o=require("../Effect/index.js"),u=require("../Effect.Exception.Unsafe/index.js"),c=function(){function n(){}return n.value=new n,n}(),f=function(){function n(){}return n.value=new n,n}(),s=function(){function n(){}return n.value=new n,n}(),l=function(){function n(){}return n.value=new n,n}(),v=function(){function n(){}return n.value=new n,n}(),m=function(){function n(){}return n.value=new n,n}(),h=function(){function n(){}return n.value=new n,n}(),g=function(){function n(){}return n.value=new n,n}(),w=function(){function n(){}return n.value=new n,n}(),p=function(){function n(){}return n.value=new n,n}(),d=function(){function n(){}return n.value=new n,n}(),C=function(){function n(){}return n.value=new n,n}(),S=function(){function n(){}return n.value=new n,n}(),D=function(){function n(){}return n.value=new n,n}(),I=function(){function n(){}return n.value=new n,n}(),L=function(){function n(){}return n.value=new n,n}(),y=function(){function n(){}return n.value=new n,n}(),x=function(){function n(){}return n.value=new n,n}(),T=function(){function n(){}return n.value=new n,n}(),A=function(){function n(){}return n.value=new n,n}(),E=function(){function n(){}return n.value=new n,n}(),R=function(){function n(){}return n.value=new n,n}(),F=function(){function n(){}return n.value=new n,n}(),G=function(){function n(){}return n.value=new n,n}(),O=function(){function n(){}return n.value=new n,n}(),q=function(){function n(){}return n.value=new n,n}(),b=function(){function n(){}return n.value=new n,n}(),k=function(){function n(){}return n.value=new n,n}(),P=function(){function n(){}return n.value=new n,n}(),H=function(){function n(){}return n.value=new n,n}(),B=function(){function n(){}return n.value=new n,n}(),W=function(){function n(){}return n.value=new n,n}(),J=function(){function n(){}return n.value=new n,n}(),j=function(){function n(){}return n.value=new n,n}(),M=function(){function n(){}return n.value=new n,n}(),X=function(){function n(){}return n.value=new n,n}(),N=function(){function n(){}return n.value=new n,n}(),Y=function(){function n(){}return n.value=new n,n}(),U=function(){function n(){}return n.value=new n,n}(),z=function(){function n(){}return n.value=new n,n}(),K=function(){function n(){}return n.value=new n,n}(),Q=function(e){return function(t){return function(){n.save(e)();var r=t();n.restore(e)();return r}}},V=function(e){return function(t){return n.tryLoadImageImpl(e)(t(i.Nothing.value))(function(n){return t(i.Just.create(n))})}},Z=function(e){return r.map(o.functorEffect)(function(n){return"left"===n?c.value:"right"===n?f.value:"center"===n?s.value:"start"===n?l.value:"end"===n?v.value:u.unsafeThrow("invalid TextAlign: "+n)})(n.textAlignImpl(e))},$=function(e){return function(t){return function(){n.beginPath(e)();var r=t();n.stroke(e)();return r}}},_=new a.Show(function(n){if(n instanceof c)return"AlignLeft";if(n instanceof f)return"AlignRight";if(n instanceof s)return"AlignCenter";if(n instanceof l)return"AlignStart";if(n instanceof v)return"AlignEnd";throw new Error("Failed pattern match at Graphics.Canvas (line 489, column 1 - line 494, column 29): "+[n.constructor.name])}),nn=new a.Show(function(n){if(n instanceof m)return"Repeat";if(n instanceof h)return"RepeatX";if(n instanceof g)return"RepeatY";if(n instanceof w)return"NoRepeat";throw new Error("Failed pattern match at Graphics.Canvas (line 599, column 1 - line 603, column 29): "+[n.constructor.name])}),en=new a.Show(function(n){if(n instanceof L)return"SourceOver";if(n instanceof y)return"SourceIn";if(n instanceof x)return"SourceOut";if(n instanceof T)return"SourceAtop";if(n instanceof A)return"DestinationOver";if(n instanceof E)return"DestinationIn";if(n instanceof R)return"DestinationOut";if(n instanceof F)return"DestinationAtop";if(n instanceof G)return"Lighter";if(n instanceof O)return"Copy";if(n instanceof q)return"Xor";if(n instanceof b)return"Multiply";if(n instanceof k)return"Screen";if(n instanceof P)return"Overlay";if(n instanceof H)return"Darken";if(n instanceof B)return"Lighten";if(n instanceof W)return"ColorDodge";if(n instanceof J)return"ColorBurn";if(n instanceof j)return"HardLight";if(n instanceof M)return"SoftLight";if(n instanceof X)return"Difference";if(n instanceof N)return"Exclusion";if(n instanceof Y)return"Hue";if(n instanceof U)return"Saturation";if(n instanceof z)return"Color";if(n instanceof K)return"Luminosity";throw new Error("Failed pattern match at Graphics.Canvas (line 284, column 1 - line 310, column 38): "+[n.constructor.name])}),tn=function(e){return function(t){return n.setTextAlignImpl(e)(function(n){if(n instanceof c)return"left";if(n instanceof f)return"right";if(n instanceof s)return"center";if(n instanceof l)return"start";if(n instanceof v)return"end";throw new Error("Failed pattern match at Graphics.Canvas (line 518, column 5 - line 518, column 32): "+[n.constructor.name])}(t))}},rn=function(e){return function(t){if(t instanceof p)return n.setLineJoinImpl(e)("bevel");if(t instanceof d)return n.setLineJoinImpl(e)("round");if(t instanceof C)return n.setLineJoinImpl(e)("miter");throw new Error("Failed pattern match at Graphics.Canvas (line 247, column 1 - line 247, column 52): "+[e.constructor.name,t.constructor.name])}},an=function(e){return function(t){if(t instanceof S)return n.setLineCapImpl(e)("round");if(t instanceof D)return n.setLineCapImpl(e)("square");if(t instanceof I)return n.setLineCapImpl(e)("butt");throw new Error("Failed pattern match at Graphics.Canvas (line 234, column 1 - line 234, column 50): "+[e.constructor.name,t.constructor.name])}},on=function(e){return function(t){return n.setGlobalCompositeOperationImpl(e)(function(n){if(n instanceof L)return"source-over";if(n instanceof y)return"source-in";if(n instanceof x)return"source-out";if(n instanceof T)return"source-atop";if(n instanceof A)return"destination-over";if(n instanceof E)return"destination-in";if(n instanceof R)return"destination-out";if(n instanceof F)return"destination-atop";if(n instanceof G)return"lighter";if(n instanceof O)return"copy";if(n instanceof q)return"xor";if(n instanceof b)return"multiply";if(n instanceof k)return"screen";if(n instanceof P)return"overlay";if(n instanceof H)return"darken";if(n instanceof B)return"lighten";if(n instanceof W)return"color-dodge";if(n instanceof J)return"color-burn";if(n instanceof j)return"hard-light";if(n instanceof M)return"soft-light";if(n instanceof X)return"difference";if(n instanceof N)return"exclusion";if(n instanceof Y)return"hue";if(n instanceof U)return"saturation";if(n instanceof z)return"color";if(n instanceof K)return"luminosity";throw new Error("Failed pattern match at Graphics.Canvas (line 318, column 5 - line 318, column 45): "+[n.constructor.name])}(t))}},un=function(t){return function(r){return e.applySecond(o.applyEffect)(n.setCanvasHeight(t)(r.height))(n.setCanvasWidth(t)(r.width))}},cn=function(e){return n.getCanvasElementByIdImpl(e,i.Just.create,i.Nothing.value)},fn=function(e){return function(){return{width:n.getCanvasWidth(e)(),height:n.getCanvasHeight(e)()}}},sn=function(e){return function(t){return function(){n.beginPath(e)();var r=t();n.fill(e)();return r}}},ln=new t.Eq(function(n){return function(e){return n instanceof S&&e instanceof S||(n instanceof D&&e instanceof D||n instanceof I&&e instanceof I)}}),vn=function(e){return function(t){return function(r){return n.createPatternImpl(e)(t)(function(n){if(n instanceof m)return"repeat";if(n instanceof h)return"repeat-x";if(n instanceof g)return"repeat-y";if(n instanceof w)return"no-repeat";throw new Error("Failed pattern match at Graphics.Canvas (line 611, column 5 - line 611, column 31): "+[n.constructor.name])}(r))}}};module.exports={SourceOver:L,SourceIn:y,SourceOut:x,SourceAtop:T,DestinationOver:A,DestinationIn:E,DestinationOut:R,DestinationAtop:F,Lighter:G,Copy:O,Xor:q,Multiply:b,Screen:k,Overlay:P,Darken:H,Lighten:B,ColorDodge:W,ColorBurn:J,HardLight:j,SoftLight:M,Difference:X,Exclusion:N,Hue:Y,Saturation:U,Color:z,Luminosity:K,Round:S,Square:D,Butt:I,BevelJoin:p,RoundJoin:d,MiterJoin:C,AlignLeft:c,AlignRight:f,AlignCenter:s,AlignStart:l,AlignEnd:v,Repeat:m,RepeatX:h,RepeatY:g,NoRepeat:w,getCanvasElementById:cn,getCanvasDimensions:fn,setCanvasDimensions:un,setLineCap:an,setLineJoin:rn,setGlobalCompositeOperation:on,strokePath:$,fillPath:sn,textAlign:Z,setTextAlign:tn,withContext:Q,tryLoadImage:V,createPattern:vn,eqLineCap:ln,showComposite:en,showTextAlign:_,showPatternRepeat:nn,getContext2D:n.getContext2D,getCanvasWidth:n.getCanvasWidth,setCanvasWidth:n.setCanvasWidth,getCanvasHeight:n.getCanvasHeight,setCanvasHeight:n.setCanvasHeight,canvasToDataURL:n.canvasToDataURL,setLineWidth:n.setLineWidth,setLineDash:n.setLineDash,setFillStyle:n.setFillStyle,setStrokeStyle:n.setStrokeStyle,setShadowBlur:n.setShadowBlur,setShadowOffsetX:n.setShadowOffsetX,setShadowOffsetY:n.setShadowOffsetY,setShadowColor:n.setShadowColor,setMiterLimit:n.setMiterLimit,setGlobalAlpha:n.setGlobalAlpha,beginPath:n.beginPath,stroke:n.stroke,fill:n.fill,clip:n.clip,lineTo:n.lineTo,moveTo:n.moveTo,closePath:n.closePath,arc:n.arc,rect:n.rect,fillRect:n.fillRect,strokeRect:n.strokeRect,clearRect:n.clearRect,scale:n.scale,rotate:n.rotate,translate:n.translate,transform:n.transform,setTransform:n.setTransform,font:n.font,setFont:n.setFont,fillText:n.fillText,strokeText:n.strokeText,measureText:n.measureText,save:n.save,restore:n.restore,getImageData:n.getImageData,putImageData:n.putImageData,putImageDataFull:n.putImageDataFull,createImageData:n.createImageData,createImageDataCopy:n.createImageDataCopy,imageDataWidth:n.imageDataWidth,imageDataHeight:n.imageDataHeight,imageDataBuffer:n.imageDataBuffer,canvasElementToImageSource:n.canvasElementToImageSource,drawImage:n.drawImage,drawImageScale:n.drawImageScale,drawImageFull:n.drawImageFull,setPatternFillStyle:n.setPatternFillStyle,createLinearGradient:n.createLinearGradient,createRadialGradient:n.createRadialGradient,addColorStop:n.addColorStop,setGradientFillStyle:n.setGradientFillStyle,quadraticCurveTo:n.quadraticCurveTo,bezierCurveTo:n.bezierCurveTo}; -},{"./foreign.js":"RCTS","../Control.Apply/index.js":"QcLv","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Show/index.js":"mFY7","../Effect/index.js":"oTWB","../Effect.Exception.Unsafe/index.js":"IZvR"}],"YWUW":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),e=require("../Data.Eq/index.js"),t=require("../Data.Functor/index.js"),r=require("../Data.Generic.Rep/index.js"),u=require("../Data.Lens.Getter/index.js"),i=require("../Data.Ord/index.js"),a=require("../Data.Ordering/index.js"),o=require("../Data.Symbol/index.js"),f=require("../Data.Unit/index.js"),c=require("../Data.Variant/index.js"),l=require("../Data.Variant.Internal/index.js"),s=require("../Effect/index.js"),v=require("../Effect.Class/index.js"),w=require("../Graphics.Canvas/index.js"),d=require("../Type.Equality/index.js"),h=function(){function n(){}return n.value=new n,n}(),m=function(){function n(){}return n.value=new n,n}(),p=function(){function n(){}return n.value=new n,n}(),I=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),g=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),y=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),x=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),q=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),j=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),b=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),C=function(){function n(n,e,t){this.value0=n,this.value1=e,this.value2=t}return n.create=function(e){return function(t){return function(r){return new n(e,t,r)}}},n}(),S=function(n){var e=n.size.width-n.padding.right-n.padding.left,t={x:0,y:0};return c.onMatch()(l.variantMatchCons(l.variantMatchCons(l.variantMatchCons(l.variantMatchCons(l.variantMatchCons(l.variantMatchCons(l.variantMatchNil)()(d.refl))()(d.refl))()(d.refl))()(d.refl))()(d.refl))()(d.refl))()({full:function(e){return{offset:t,size:n.size}},center:function(t){return{offset:{x:n.padding.left,y:n.padding.top},size:{width:e,height:n.size.height-n.padding.top-n.padding.bottom}}},top:function(r){return{offset:{x:n.padding.left,y:t.y},size:{width:e,height:n.padding.top}}},right:function(e){return{offset:{x:n.size.width-n.padding.right,y:n.padding.top},size:{width:n.padding.right,height:n.size.height-(n.padding.top+n.padding.bottom)}}},bottom:function(t){return{offset:{x:n.padding.left,y:n.size.height-n.padding.bottom},size:{width:e,height:n.padding.bottom}}},left:function(e){return{offset:{y:n.padding.top,x:t.x},size:{width:n.padding.left,height:n.size.height-(n.padding.top+n.padding.bottom)}}}})(c.case_)},T=function(n){var e=S(n);return function(n){return e(n).offset}},L=function(n){var e=S(n);return function(n){return e(n).size}},E=new r.Generic(function(n){if(n instanceof g)return new r.Inl(n.value0);if(n instanceof y)return new r.Inr(new r.Inl(n.value0));if(n instanceof x)return new r.Inr(new r.Inr(new r.Inl(n.value0)));if(n instanceof q)return new r.Inr(new r.Inr(new r.Inr(new r.Inl(n.value0))));if(n instanceof j)return new r.Inr(new r.Inr(new r.Inr(new r.Inr(new r.Inl(n.value0)))));if(n instanceof b)return new r.Inr(new r.Inr(new r.Inr(new r.Inr(new r.Inr(n.value0)))));throw new Error("Failed pattern match at Genetics.Browser.Layer (line 64, column 1 - line 64, column 60): "+[n.constructor.name])},function(n){if(n instanceof r.Inl)return new g(n.value0);if(n instanceof r.Inr&&n.value0 instanceof r.Inl)return new y(n.value0.value0);if(n instanceof r.Inr&&n.value0 instanceof r.Inr&&n.value0.value0 instanceof r.Inl)return new x(n.value0.value0.value0);if(n instanceof r.Inr&&n.value0 instanceof r.Inr&&n.value0.value0 instanceof r.Inr&&n.value0.value0.value0 instanceof r.Inl)return new q(n.value0.value0.value0.value0);if(n instanceof r.Inr&&n.value0 instanceof r.Inr&&n.value0.value0 instanceof r.Inr&&n.value0.value0.value0 instanceof r.Inr&&n.value0.value0.value0.value0 instanceof r.Inl)return new j(n.value0.value0.value0.value0.value0);if(n instanceof r.Inr&&n.value0 instanceof r.Inr&&n.value0.value0 instanceof r.Inr&&n.value0.value0.value0 instanceof r.Inr&&n.value0.value0.value0.value0 instanceof r.Inr)return new b(n.value0.value0.value0.value0.value0);throw new Error("Failed pattern match at Genetics.Browser.Layer (line 64, column 1 - line 64, column 60): "+[n.constructor.name])}),G=new t.Functor(function(n){return function(e){if(e instanceof g)return new g(n(e.value0));if(e instanceof y)return new y(n(e.value0));if(e instanceof x)return new x(n(e.value0));if(e instanceof q)return new q(n(e.value0));if(e instanceof j)return new j(n(e.value0));if(e instanceof b)return new b(n(e.value0));throw new Error("Failed pattern match at Genetics.Browser.Layer (line 63, column 1 - line 63, column 54): "+[e.constructor.name])}}),z=new t.Functor(function(n){return function(e){return new C(e.value0,e.value1,t.map(G)(n)(e.value2))}}),F=new e.Eq(function(n){return function(e){return n instanceof p&&e instanceof p||n instanceof I&&e instanceof I&&n.value0===e.value0}}),D=function(n){return new e.Eq(function(t){return function(r){return t instanceof g&&r instanceof g?e.eq(n)(t.value0)(r.value0):t instanceof y&&r instanceof y?e.eq(n)(t.value0)(r.value0):t instanceof x&&r instanceof x?e.eq(n)(t.value0)(r.value0):t instanceof q&&r instanceof q?e.eq(n)(t.value0)(r.value0):t instanceof j&&r instanceof j?e.eq(n)(t.value0)(r.value0):t instanceof b&&r instanceof b&&e.eq(n)(t.value0)(r.value0)}})},M=function(n){return new i.Ord(function(){return D(n.Eq0())},function(e){return function(t){if(e instanceof g&&t instanceof g)return i.compare(n)(e.value0)(t.value0);if(e instanceof g)return a.LT.value;if(t instanceof g)return a.GT.value;if(e instanceof y&&t instanceof y)return i.compare(n)(e.value0)(t.value0);if(e instanceof y)return a.LT.value;if(t instanceof y)return a.GT.value;if(e instanceof x&&t instanceof x)return i.compare(n)(e.value0)(t.value0);if(e instanceof x)return a.LT.value;if(t instanceof x)return a.GT.value;if(e instanceof q&&t instanceof q)return i.compare(n)(e.value0)(t.value0);if(e instanceof q)return a.LT.value;if(t instanceof q)return a.GT.value;if(e instanceof j&&t instanceof j)return i.compare(n)(e.value0)(t.value0);if(e instanceof j)return a.LT.value;if(t instanceof j)return a.GT.value;if(e instanceof b&&t instanceof b)return i.compare(n)(e.value0)(t.value0);throw new Error("Failed pattern match at Genetics.Browser.Layer (line 62, column 1 - line 62, column 59): "+[e.constructor.name,t.constructor.name])}})},B=o.SProxy.value,P=o.SProxy.value,k=o.SProxy.value,O=o.SProxy.value,N=o.SProxy.value,R=o.SProxy.value,V=function(n){if(n instanceof g)return c.inj()(new o.IsSymbol(function(){return"full"}))(O)(n.value0);if(n instanceof y)return c.inj()(new o.IsSymbol(function(){return"center"}))(N)(n.value0);if(n instanceof x)return c.inj()(new o.IsSymbol(function(){return"top"}))(B)(n.value0);if(n instanceof q)return c.inj()(new o.IsSymbol(function(){return"right"}))(P)(n.value0);if(n instanceof j)return c.inj()(new o.IsSymbol(function(){return"bottom"}))(R)(n.value0);if(n instanceof b)return c.inj()(new o.IsSymbol(function(){return"left"}))(k)(n.value0);throw new Error("Failed pattern match at Genetics.Browser.Layer (line 98, column 10 - line 104, column 30): "+[n.constructor.name])},_=function(n){return{full:S(n)(c.inj()(new o.IsSymbol(function(){return"full"}))(O)(f.unit)),center:S(n)(c.inj()(new o.IsSymbol(function(){return"center"}))(N)(f.unit)),top:S(n)(c.inj()(new o.IsSymbol(function(){return"top"}))(B)(f.unit)),right:S(n)(c.inj()(new o.IsSymbol(function(){return"right"}))(P)(f.unit)),bottom:S(n)(c.inj()(new o.IsSymbol(function(){return"bottom"}))(R)(f.unit)),left:S(n)(c.inj()(new o.IsSymbol(function(){return"left"}))(k)(f.unit))}},U=function(e){return function(r){return function(u){return function(i){return v.liftEffect(e)(function(){var e=w.getContext2D(i)(),a=(_(u),L(u)(V(r.value2))),o=T(u)(V(r.value2));return n.setContextTranslation(o)(e)(),function(){if(r.value1 instanceof p)return f.unit;if(r.value1 instanceof I)return(n={x:-r.value1.value0,y:-r.value1.value0},function(r){return function(){return w.beginPath(e)(),w.moveTo(e)(n.x)(n.y)(),w.lineTo(e)(r.x)(n.y)(),w.lineTo(e)(r.x)(r.y)(),w.lineTo(e)(n.x)(r.y)(),w.clip(e)(),t.void(s.functorEffect)(w.closePath(e))()}})({x:a.width+r.value1.value0,y:a.height+r.value1.value0})();var n;throw new Error("Failed pattern match at Genetics.Browser.Layer (line 203, column 3 - line 207, column 48): "+[r.value1.constructor.name])}(),e})}}}},A=u.to(function(n){if(n instanceof g)return n.value0;if(n instanceof y)return n.value0;if(n instanceof x)return n.value0;if(n instanceof q)return n.value0;if(n instanceof j)return n.value0;if(n instanceof b)return n.value0;throw new Error("Failed pattern match at Genetics.Browser.Layer (line 53, column 17 - line 59, column 18): "+[n.constructor.name])});module.exports={Full:g,Center:y,CTop:x,CRight:q,CBottom:j,CLeft:b,_Component:A,Layer:C,Fixed:h,Scrolling:m,NoMask:p,Masked:I,asSlot:V,slotContext:U,slotOffset:T,slotSize:L,trackSlots:_,eqComponent:D,ordComponent:M,functorComponent:G,genericComponent:E,functorLayer:z,eqLayerMask:F,setContextTranslation:n.setContextTranslation}; -},{"./foreign.js":"1Q0x","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Generic.Rep/index.js":"AuzG","../Data.Lens.Getter/index.js":"OPOX","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Data.Variant/index.js":"hgdh","../Data.Variant.Internal/index.js":"kYoO","../Effect/index.js":"oTWB","../Effect.Class/index.js":"dWtH","../Graphics.Canvas/index.js":"rm6N","../Type.Equality/index.js":"Uq/R"}],"fMOI":[function(require,module,exports) { -"use strict";var e=require("../Control.Alt/index.js"),t=require("../Data.Eq/index.js"),n=require("../Data.Foldable/index.js"),i=require("../Data.Maybe/index.js"),a=require("../Data.Monoid/index.js"),r=require("../Data.Semigroup/index.js"),o=require("../Data.Show/index.js"),u=function(e){return e},l=function(e){return e},s=function(){function e(e,t,n){this.value0=e,this.value1=t,this.value2=n}return e.create=function(t){return function(n){return function(i){return new e(t,n,i)}}},e}(),v={style:i.Nothing.value,variant:new i.Just("small-caps"),weight:i.Nothing.value},g="serif",h=new r.Semigroup(function(t){return function(n){return{style:e.alt(i.altMaybe)(t.style)(n.style),variant:e.alt(i.altMaybe)(t.variant)(n.variant),weight:e.alt(i.altMaybe)(t.weight)(n.weight)}}}),f="sans-serif",c=function(e){return n.intercalate(n.foldableArray)(a.monoidString)(" ")([n.fold(n.foldableMaybe)(a.monoidString)(e.style),n.fold(n.foldableMaybe)(a.monoidString)(e.variant),n.fold(n.foldableMaybe)(a.monoidString)(e.weight)])},w={style:new i.Just("oblique"),variant:i.Nothing.value,weight:i.Nothing.value},d="monospace",q=new a.Monoid(function(){return h},{style:i.Nothing.value,variant:i.Nothing.value,weight:i.Nothing.value}),y={style:i.Nothing.value,variant:i.Nothing.value,weight:new i.Just("lighter")},b={style:new i.Just("italic"),variant:i.Nothing.value,weight:i.Nothing.value},m=function(e){return c(e.value2)+" "+o.show(o.showInt)(e.value1)+"px "+e.value0},N=s.create,p="fantasy",M=new t.Eq(function(e){return function(n){return t.eq(i.eqMaybe(t.eqString))(e.style)(n.style)&&t.eq(i.eqMaybe(t.eqString))(e.variant)(n.variant)&&t.eq(i.eqMaybe(t.eqString))(e.weight)(n.weight)}}),S=new t.Eq(function(e){return function(t){return e===t}}),x=new t.Eq(function(e){return function(n){return t.eq(S)(e.value0)(n.value0)&&e.value1===n.value1&&t.eq(M)(e.value2)(n.value2)}}),F=l,j="cursive",D={style:i.Nothing.value,variant:i.Nothing.value,weight:new i.Just("bolder")},J={style:i.Nothing.value,variant:i.Nothing.value,weight:new i.Just("bold")};module.exports={font:N,fontString:m,serif:g,sansSerif:f,monospace:d,cursive:j,fantasy:p,customFont:F,bold:J,bolder:D,light:y,italic:b,oblique:w,smallCaps:v,eqFont:x,eqFontFamily:S,eqFontOptions:M,semigroupFontOptions:h,monoidFontOptions:q}; -},{"../Control.Alt/index.js":"lN+m","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7"}],"0WVi":[function(require,module,exports) { -"use strict";var e=require("../Color/index.js"),n=require("../Control.Alt/index.js"),t=require("../Control.Applicative/index.js"),u=require("../Data.Eq/index.js"),r=require("../Data.Foldable/index.js"),o=require("../Data.Function/index.js"),i=require("../Data.Functor/index.js"),a=require("../Data.List/index.js"),l=require("../Data.List.Types/index.js"),c=require("../Data.Maybe/index.js"),f=require("../Data.Monoid/index.js"),s=require("../Data.Semigroup/index.js"),v=require("../Data.Symbol/index.js"),h=require("../Data.Unit/index.js"),w=require("../Effect/index.js"),d=require("../Graphics.Canvas/index.js"),q=require("../Graphics.Drawing.Font/index.js"),p=require("../Math/index.js"),b=function(e){return e},m=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(t){return new e(n,t)}},e}(),y=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),g=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),x=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),S=function(e){return e},E=function(e){return e},C=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(t){return new e(n,t)}},e}(),M=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(t){return new e(n,t)}},e}(),N=function(){function e(e,n,t,u,r){this.value0=e,this.value1=n,this.value2=t,this.value3=u,this.value4=r}return e.create=function(n){return function(t){return function(u){return function(r){return function(o){return new e(n,t,u,r,o)}}}}},e}(),j=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),D=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(t){return new e(n,t)}},e}(),L=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(t){return new e(n,t)}},e}(),F=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(t){return new e(n,t)}},e}(),W=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(t){return new e(n,t)}},e}(),_=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(t){return new e(n,t)}},e}(),R=function(e){return function(n){return L.create({translateX:e,translateY:n})}},X=N.create,Y=function(e){return function(n){return{color:c.Nothing.value,blur:c.Nothing.value,offset:new c.Just({x:e,y:n})}}},J=function(e){return{color:new c.Just(e),blur:c.Nothing.value,offset:c.Nothing.value}},O=function(e){return{color:c.Nothing.value,blur:new c.Just(e),offset:c.Nothing.value}},A=_.create,G=new s.Semigroup(function(e){return function(n){return new x(e instanceof x?s.append(l.semigroupList)(e.value0)(a.singleton(n)):n instanceof x?new l.Cons(e,n.value0):new l.Cons(e,new l.Cons(n,l.Nil.value)))}}),I=new s.Semigroup(function(e){return function(t){return{color:n.alt(c.altMaybe)(e.color)(t.color),blur:n.alt(c.altMaybe)(e.blur)(t.blur),offset:n.alt(c.altMaybe)(e.offset)(t.offset)}}}),T=new s.Semigroup(function(e){return function(t){return{color:n.alt(c.altMaybe)(e.color)(t.color),lineWidth:n.alt(c.altMaybe)(e.lineWidth)(t.lineWidth)}}}),H=new s.Semigroup(function(e){return function(t){return{color:n.alt(c.altMaybe)(e.color)(t.color)}}}),P=new s.Semigroup(function(e){return function(n){return new j(e instanceof j?s.append(l.semigroupList)(e.value0)(a.singleton(n)):n instanceof j?new l.Cons(e,n.value0):new l.Cons(e,new l.Cons(n,l.Nil.value)))}}),k=function(e){return function(n){return D.create({scaleX:e,scaleY:n})}},B=F.create,U=function(n){var u=function e(u){if(u instanceof m&&u.value1 instanceof l.Nil)return t.pure(w.applicativeEffect)(h.unit);if(u instanceof m&&u.value1 instanceof l.Cons)return function(){d.moveTo(n)(u.value1.value0.x)(u.value1.value0.y)();return r.for_(w.applicativeEffect)(l.foldableList)(u.value1.value1)(function(e){return d.lineTo(n)(e.x)(e.y)})(),t.when(w.applicativeEffect)(u.value0)(i.void(w.functorEffect)(d.closePath(n)))()};if(u instanceof y)return i.void(w.functorEffect)(d.rect(n)(u.value0));if(u instanceof g)return i.void(w.functorEffect)(d.arc(n)(u.value0));if(u instanceof x)return r.for_(w.applicativeEffect)(l.foldableList)(u.value0)(e);throw new Error("Failed pattern match at Graphics.Drawing (line 268, column 3 - line 268, column 38): "+[u.constructor.name])},o=function(t){return r.for_(w.applicativeEffect)(r.foldableMaybe)(t.color)(function(t){return d.setFillStyle(n)(e.cssStringHSLA(t))})};return function t(a){if(a instanceof C)return i.void(w.functorEffect)(d.withContext(n)(function(){return o(a.value1)(),d.fillPath(n)(u(a.value0))()}));if(a instanceof M)return i.void(w.functorEffect)(d.withContext(n)(function(){return function(t){return function(){return r.for_(w.applicativeEffect)(r.foldableMaybe)(t.color)(function(t){return d.setStrokeStyle(n)(e.cssStringHSLA(t))})(),r.for_(w.applicativeEffect)(r.foldableMaybe)(t.lineWidth)(function(e){return d.setLineWidth(n)(e)})()}}(a.value1)(),d.strokePath(n)(u(a.value0))()}));if(a instanceof j)return r.for_(w.applicativeEffect)(l.foldableList)(a.value0)(t);if(a instanceof D)return i.void(w.functorEffect)(d.withContext(n)(function(){return d.scale(n)(a.value0)(),t(a.value1)()}));if(a instanceof L)return i.void(w.functorEffect)(d.withContext(n)(function(){return d.translate(n)(a.value0)(),t(a.value1)()}));if(a instanceof F)return i.void(w.functorEffect)(d.withContext(n)(function(){return d.rotate(n)(a.value0)(),t(a.value1)()}));if(a instanceof W)return i.void(w.functorEffect)(d.withContext(n)(function(){return u(a.value0)(),d.clip(n)(),t(a.value1)()}));if(a instanceof _)return i.void(w.functorEffect)(d.withContext(n)(function(){return function(t){return function(){return r.for_(w.applicativeEffect)(r.foldableMaybe)(t.color)(function(t){return d.setShadowColor(n)(e.cssStringHSLA(t))})(),r.for_(w.applicativeEffect)(r.foldableMaybe)(t.blur)(function(e){return d.setShadowBlur(n)(e)})(),r.for_(w.applicativeEffect)(r.foldableMaybe)(t.offset)(function(e){return function(){return d.setShadowOffsetX(n)(e.x)(),d.setShadowOffsetY(n)(e.y)()}})()}}(a.value0)(),t(a.value1)()}));if(a instanceof N)return i.void(w.functorEffect)(d.withContext(n)(function(){return d.setFont(n)(q.fontString(a.value0))(),o(a.value3)(),d.fillText(n)(a.value4)(a.value1)(a.value2)()}));throw new Error("Failed pattern match at Graphics.Drawing (line 221, column 3 - line 224, column 21): "+[a.constructor.name])}},z=function(e){return function(n){return function(t){return function(u){return new y({x:e,y:n,width:t,height:u})}}}},K=function(e){var n=m.create(!1),t=a.fromFoldable(e);return function(e){return n(t(e))}},Q=o.flip(M.create),V=function(e){return{color:new c.Just(e),lineWidth:c.Nothing.value}},Z=new f.Monoid(function(){return G},new x(f.mempty(l.monoidList))),$=new f.Monoid(function(){return I},{color:c.Nothing.value,blur:c.Nothing.value,offset:c.Nothing.value}),ee=new f.Monoid(function(){return T},{color:c.Nothing.value,lineWidth:c.Nothing.value}),ne=new f.Monoid(function(){return H},{color:c.Nothing.value}),te=new f.Monoid(function(){return P},new j(f.mempty(l.monoidList))),ue=function(e){return{color:c.Nothing.value,lineWidth:new c.Just(e)}},re=o.flip(C.create),oe=function(e){return{color:new c.Just(e)}},ie=function(e){return function n(t){return e(t instanceof j?new j(i.map(l.functorList)(n)(t.value0)):t instanceof D?new D(t.value0,n(t.value1)):t instanceof L?new L(t.value0,n(t.value1)):t instanceof F?new F(t.value0,n(t.value1)):t instanceof W?new W(t.value0,n(t.value1)):t instanceof _?new _(t.value0,n(t.value1)):t)}},ae=new u.Eq(function(e){return function(n){return e instanceof m&&n instanceof m?e.value0===n.value0&&u.eq(l.eqList(u.eqRec()(u.eqRowCons(u.eqRowCons(u.eqRowNil)()(new v.IsSymbol(function(){return"y"}))(u.eqNumber))()(new v.IsSymbol(function(){return"x"}))(u.eqNumber))))(e.value1)(n.value1):e instanceof y&&n instanceof y?e.value0.height===n.value0.height&&e.value0.width===n.value0.width&&e.value0.x===n.value0.x&&e.value0.y===n.value0.y:e instanceof g&&n instanceof g?e.value0.end===n.value0.end&&e.value0.radius===n.value0.radius&&e.value0.start===n.value0.start&&e.value0.x===n.value0.x&&e.value0.y===n.value0.y:e instanceof x&&n instanceof x&&u.eq(l.eqList(ae))(e.value0)(n.value0)}}),le=new u.Eq(function(n){return function(t){return u.eq(c.eqMaybe(u.eqNumber))(n.blur)(t.blur)&&u.eq(c.eqMaybe(e.eqColor))(n.color)(t.color)&&u.eq(c.eqMaybe(u.eqRec()(u.eqRowCons(u.eqRowCons(u.eqRowNil)()(new v.IsSymbol(function(){return"y"}))(u.eqNumber))()(new v.IsSymbol(function(){return"x"}))(u.eqNumber))))(n.offset)(t.offset)}}),ce=new u.Eq(function(n){return function(t){return u.eq(c.eqMaybe(e.eqColor))(n.color)(t.color)&&u.eq(c.eqMaybe(u.eqNumber))(n.lineWidth)(t.lineWidth)}}),fe=new u.Eq(function(n){return function(t){return u.eq(c.eqMaybe(e.eqColor))(n.color)(t.color)}}),se=new u.Eq(function(e){return function(n){return e instanceof C&&n instanceof C?u.eq(ae)(e.value0)(n.value0)&&u.eq(fe)(e.value1)(n.value1):e instanceof M&&n instanceof M?u.eq(ae)(e.value0)(n.value0)&&u.eq(ce)(e.value1)(n.value1):e instanceof N&&n instanceof N?u.eq(q.eqFont)(e.value0)(n.value0)&&e.value1===n.value1&&e.value2===n.value2&&u.eq(fe)(e.value3)(n.value3)&&e.value4===n.value4:e instanceof j&&n instanceof j?u.eq(l.eqList(se))(e.value0)(n.value0):e instanceof D&&n instanceof D?e.value0.scaleX===n.value0.scaleX&&e.value0.scaleY===n.value0.scaleY&&u.eq(se)(e.value1)(n.value1):e instanceof L&&n instanceof L?e.value0.translateX===n.value0.translateX&&e.value0.translateY===n.value0.translateY&&u.eq(se)(e.value1)(n.value1):e instanceof F&&n instanceof F?e.value0===n.value0&&u.eq(se)(e.value1)(n.value1):e instanceof W&&n instanceof W?u.eq(ae)(e.value0)(n.value0)&&u.eq(se)(e.value1)(n.value1):e instanceof _&&n instanceof _&&(u.eq(le)(e.value0)(n.value0)&&u.eq(se)(e.value1)(n.value1))}}),ve=function(e){var n=m.create(!0),t=a.fromFoldable(e);return function(e){return n(t(e))}},he=W.create,we=function(e){return function(n){return function(t){return function(u){return function(r){return new g({x:e,y:n,start:t,end:u,radius:r})}}}}},de=function(e){return function(n){return we(e)(n)(0)(2*p.pi)}};module.exports={path:K,closed:ve,rectangle:z,circle:de,arc:we,fillColor:oe,outlineColor:V,lineWidth:ue,shadowOffset:Y,shadowBlur:O,shadowColor:J,shadow:A,filled:re,outlined:Q,clipped:he,scale:k,translate:R,rotate:B,text:X,everywhere:ie,render:U,eqShape:ae,semigroupShape:G,monoidShape:Z,semigroupFillStyle:H,monoidFillStyle:ne,eqFillStyle:fe,semigroupOutlineStyle:T,monoidOutlineStyle:ee,eqOutlineStyle:ce,eqShadow:le,semigroupShadow:I,monoidShadow:$,semigroupDrawing:P,monoidDrawing:te,eqDrawing:se}; -},{"../Color/index.js":"f3ma","../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ","../Data.Symbol/index.js":"4oJQ","../Data.Unit/index.js":"NhVk","../Effect/index.js":"oTWB","../Graphics.Canvas/index.js":"rm6N","../Graphics.Drawing.Font/index.js":"fMOI","../Math/index.js":"Rpaz"}],"QJpD":[function(require,module,exports) { -"use strict";var t=function(t){return function(n){return n[t]}};exports._namespaceURI=t("namespaceURI"),exports._prefix=t("prefix"),exports.localName=t("localName"),exports.tagName=t("tagName"),exports.id=function(t){return function(){return t.id}},exports.setId=function(t){return function(n){return function(){return n.id=t,{}}}},exports.className=function(t){return function(){return t.className}},exports.setClassName=function(t){return function(n){return function(){return n.className=t,{}}}},exports.getElementsByTagName=function(t){return function(n){return function(){return n.getElementsByTagName(t)}}},exports._getElementsByTagNameNS=function(t){return function(n){return function(r){return function(){return r.getElementsByTagNameNS(t,n)}}}},exports.getElementsByClassName=function(t){return function(n){return function(){return n.getElementsByClassName(t)}}},exports.setAttribute=function(t){return function(n){return function(r){return function(){return r.setAttribute(t,n),{}}}}},exports._getAttribute=function(t){return function(n){return function(){return n.getAttribute(t)}}},exports.hasAttribute=function(t){return function(n){return n.hasAttribute(t)}},exports.removeAttribute=function(t){return function(n){return function(){return n.removeAttribute(t),{}}}},exports.scrollTop=function(t){return function(){return t.scrollTop}},exports.setScrollTop=function(t){return function(n){return function(){return n.scrollTop=t,{}}}},exports.scrollLeft=function(t){return function(){return t.scrollLeft}},exports.setScrollLeft=function(t){return function(n){return function(){return n.scrollLeft=t,{}}}},exports.scrollWidth=function(t){return function(){return t.scrollWidth}},exports.scrollHeight=function(t){return function(){return t.scrollHeight}},exports.clientTop=function(t){return function(){return t.clientTop}},exports.clientLeft=function(t){return function(){return t.clientLeft}},exports.clientWidth=function(t){return function(){return t.clientWidth}},exports.clientHeight=function(t){return function(){return t.clientHeight}}; -},{}],"4K7Y":[function(require,module,exports) { -"use strict";exports._unsafeReadProtoTagged=function(e,r,t,n){if("undefined"!=typeof window){var o=window[t];return null!=o&&n instanceof o?r(n):e}for(var u=n;null!=u;){var f=Object.getPrototypeOf(u),i=f.constructor.name;if(i===t)return r(n);if("Object"===i)return e;u=f}return e}; -},{}],"fdUh":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),r=require("../Data.Maybe/index.js"),t=function(t){return function(a){return e._unsafeReadProtoTagged(r.Nothing.value,r.Just.create,t,a)}};module.exports={unsafeReadProtoTagged:t}; -},{"./foreign.js":"4K7Y","../Data.Maybe/index.js":"5mN7"}],"S4h2":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),t=require("../Data.Functor/index.js"),o=require("../Data.Nullable/index.js"),r=require("../Effect/index.js"),a=require("../Unsafe.Coerce/index.js"),l=require("../Web.Internal.FFI/index.js"),n=a.unsafeCoerce,s=a.unsafeCoerce,i=a.unsafeCoerce,c=a.unsafeCoerce,u=a.unsafeCoerce,m=function(t){return o.toMaybe(e._prefix(t))},d=function(t){return o.toMaybe(e._namespaceURI(t))},f=function(t){return e._getElementsByTagNameNS(o.toNullable(t))},g=function(a){var l=t.map(r.functorEffect)(o.toMaybe),n=e._getAttribute(a);return function(e){return l(n(e))}},N=l.unsafeReadProtoTagged("Element"),T=l.unsafeReadProtoTagged("Element"),E=l.unsafeReadProtoTagged("Element"),b=l.unsafeReadProtoTagged("Element"),h=l.unsafeReadProtoTagged("Element");module.exports={fromNode:E,fromChildNode:h,fromNonDocumentTypeChildNode:T,fromParentNode:N,fromEventTarget:b,toNode:i,toChildNode:u,toNonDocumentTypeChildNode:s,toParentNode:n,toEventTarget:c,namespaceURI:d,prefix:m,getElementsByTagNameNS:f,getAttribute:g,localName:e.localName,tagName:e.tagName,id:e.id,setId:e.setId,className:e.className,setClassName:e.setClassName,getElementsByTagName:e.getElementsByTagName,getElementsByClassName:e.getElementsByClassName,setAttribute:e.setAttribute,hasAttribute:e.hasAttribute,removeAttribute:e.removeAttribute,scrollTop:e.scrollTop,setScrollTop:e.setScrollTop,scrollLeft:e.scrollLeft,setScrollLeft:e.setScrollLeft,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,clientTop:e.clientTop,clientLeft:e.clientLeft,clientWidth:e.clientWidth,clientHeight:e.clientHeight}; -},{"./foreign.js":"QJpD","../Data.Functor/index.js":"+0AE","../Data.Nullable/index.js":"YQ8o","../Effect/index.js":"oTWB","../Unsafe.Coerce/index.js":"ETUV","../Web.Internal.FFI/index.js":"fdUh"}],"FwXA":[function(require,module,exports) { -"use strict";var n=function(n){return function(e){return function(){return e[n]}}};exports.nodeTypeIndex=function(n){return n.nodeType},exports.nodeName=function(n){return n.nodeName},exports.baseURI=n("baseURI"),exports._ownerDocument=n("ownerDocument"),exports._parentNode=n("parentNode"),exports._parentElement=n("parentElement"),exports.hasChildNodes=function(n){return function(){return n.hasChildNodes()}},exports.childNodes=n("childNodes"),exports._firstChild=n("firstChild"),exports._lastChild=n("lastChild"),exports._previousSibling=n("previousSibling"),exports._nextSibling=n("nextSibling"),exports._nodeValue=n("nodeValue"),exports.setNodeValue=function(n){return function(e){return function(){return e.nodeValue=n,{}}}},exports.textContent=n("textContent"),exports.setTextContent=function(n){return function(e){return function(){return e.textContent=n,{}}}},exports.normalize=function(n){return function(){return n.normalize(),{}}},exports.clone=function(n){return function(){return n.cloneNode(!1)}},exports.deepClone=function(n){return function(){return n.cloneNode(!0)}},exports.isEqualNode=function(n){return function(e){return function(){return n.isEqualNode(e)}}},exports.compareDocumentPositionBits=function(n){return function(e){return function(){return n.compareDocumentPosition(e)}}},exports.contains=function(n){return function(e){return function(){return n.contains(e)}}},exports._lookupPrefix=function(n){return function(e){return function(){return e.lookupPrefix(n)}}},exports._lookupNamespaceURI=function(n){return function(e){return function(){return e.lookupNamespaceURI(n)}}},exports.isDefaultNamespace=function(n){return function(e){return function(){return e.isDefaultNamespace(n)}}},exports.insertBefore=function(n){return function(e){return function(t){return function(){return t.insertBefore(n,e)}}}},exports.appendChild=function(n){return function(e){return function(){return e.appendChild(n)}}},exports.replaceChild=function(n){return function(e){return function(t){return function(){return t.replaceChild(n,e)}}}},exports.removeChild=function(n){return function(e){return function(){return e.removeChild(n)}}}; -},{}],"vDH/":[function(require,module,exports) { -"use strict";var n=require("../Data.Bounded/index.js"),e=require("../Data.Enum/index.js"),t=require("../Data.Eq/index.js"),u=require("../Data.Maybe/index.js"),o=require("../Data.Ord/index.js"),i=function(){function n(){}return n.value=new n,n}(),r=function(){function n(){}return n.value=new n,n}(),c=function(){function n(){}return n.value=new n,n}(),f=function(){function n(){}return n.value=new n,n}(),a=function(){function n(){}return n.value=new n,n}(),s=function(){function n(){}return n.value=new n,n}(),d=function(){function n(){}return n.value=new n,n}(),l=function(){function n(){}return n.value=new n,n}(),w=function(){function n(){}return n.value=new n,n}(),v=function(){function n(){}return n.value=new n,n}(),N=function(){function n(){}return n.value=new n,n}(),m=function(){function n(){}return n.value=new n,n}(),J=function(n){return 1===n?new u.Just(i.value):2===n?new u.Just(r.value):3===n?new u.Just(c.value):4===n?new u.Just(f.value):5===n?new u.Just(a.value):6===n?new u.Just(s.value):7===n?new u.Just(d.value):8===n?new u.Just(l.value):9===n?new u.Just(w.value):10===n?new u.Just(v.value):11===n?new u.Just(N.value):12===n?new u.Just(m.value):u.Nothing.value},p=function(n){if(n instanceof i)return 1;if(n instanceof r)return 2;if(n instanceof c)return 3;if(n instanceof f)return 4;if(n instanceof a)return 5;if(n instanceof s)return 6;if(n instanceof d)return 7;if(n instanceof l)return 8;if(n instanceof w)return 9;if(n instanceof v)return 10;if(n instanceof N)return 11;if(n instanceof m)return 12;throw new Error("Failed pattern match at Web.DOM.NodeType (line 54, column 1 - line 54, column 36): "+[n.constructor.name])},y=new t.Eq(function(n){return function(e){return n instanceof i&&e instanceof i||(n instanceof r&&e instanceof r||(n instanceof c&&e instanceof c||(n instanceof f&&e instanceof f||(n instanceof a&&e instanceof a||(n instanceof s&&e instanceof s||(n instanceof d&&e instanceof d||(n instanceof l&&e instanceof l||(n instanceof w&&e instanceof w||(n instanceof v&&e instanceof v||(n instanceof N&&e instanceof N||n instanceof m&&e instanceof m))))))))))}}),D=new o.Ord(function(){return y},function(n){return function(e){return o.compare(o.ordInt)(p(n))(p(e))}}),E=new e.Enum(function(){return D},e.defaultPred(J)(p),e.defaultSucc(J)(p)),T=new n.Bounded(function(){return D},i.value,m.value),q=new e.BoundedEnum(function(){return T},function(){return E},12,p,J);module.exports={ElementNode:i,AttributeNode:r,TextNode:c,CDATASectionNode:f,EntityReferenceNode:a,EntityNode:s,ProcessingInstructionNode:d,CommentNode:l,DocumentNode:w,DocumentTypeNode:v,DocumentFragmentNode:N,NotationNode:m,eqNodeType:y,ordNodeType:D,boundedNodeType:T,enumNodeType:E,boundedEnumNodeType:q}; -},{"../Data.Bounded/index.js":"kcUU","../Data.Enum/index.js":"oOsU","../Data.Eq/index.js":"Pq4F","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb"}],"P+X4":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),n=require("../Data.Enum/index.js"),t=require("../Data.Functor/index.js"),r=require("../Data.Maybe/index.js"),o=require("../Data.Nullable/index.js"),u=require("../Effect/index.js"),a=require("../Unsafe.Coerce/index.js"),i=require("../Web.DOM.NodeType/index.js"),f=require("../Web.Internal.FFI/index.js"),c=a.unsafeCoerce,d=function(){var n=t.map(u.functorEffect)(o.toMaybe);return function(t){return n(e._previousSibling(t))}}(),s=function(){var n=t.map(u.functorEffect)(o.toMaybe);return function(t){return n(e._parentNode(t))}}(),l=function(){var n=t.map(u.functorEffect)(o.toMaybe);return function(t){return n(e._parentElement(t))}}(),p=function(){var n=t.map(u.functorEffect)(o.toMaybe);return function(t){return n(e._ownerDocument(t))}}(),m=function(){var n=t.map(u.functorEffect)(o.toMaybe);return function(t){return n(e._nodeValue(t))}}(),b=function(t){var o=r.fromJust(t),u=n.toEnum(i.boundedEnumNodeType);return function(n){return o(u(e.nodeTypeIndex(n)))}},x=function(){var n=t.map(u.functorEffect)(o.toMaybe);return function(t){return n(e._nextSibling(t))}}(),C=function(n){var r=t.map(u.functorEffect)(o.toMaybe),a=e._lookupPrefix(n);return function(e){return r(a(e))}},E=function(n){var r=t.map(u.functorEffect)(o.toMaybe),a=e._lookupNamespaceURI(n);return function(e){return r(a(e))}},N=function(){var n=t.map(u.functorEffect)(o.toMaybe);return function(t){return n(e._lastChild(t))}}(),v=f.unsafeReadProtoTagged("Node"),y=function(){var n=t.map(u.functorEffect)(o.toMaybe);return function(t){return n(e._firstChild(t))}}();module.exports={fromEventTarget:v,toEventTarget:c,nodeType:b,ownerDocument:p,parentNode:s,parentElement:l,firstChild:y,lastChild:N,previousSibling:d,nextSibling:x,nodeValue:m,lookupPrefix:C,lookupNamespaceURI:E,nodeTypeIndex:e.nodeTypeIndex,nodeName:e.nodeName,baseURI:e.baseURI,hasChildNodes:e.hasChildNodes,childNodes:e.childNodes,setNodeValue:e.setNodeValue,textContent:e.textContent,setTextContent:e.setTextContent,normalize:e.normalize,clone:e.clone,deepClone:e.deepClone,isEqualNode:e.isEqualNode,compareDocumentPositionBits:e.compareDocumentPositionBits,contains:e.contains,isDefaultNamespace:e.isDefaultNamespace,insertBefore:e.insertBefore,appendChild:e.appendChild,replaceChild:e.replaceChild,removeChild:e.removeChild}; -},{"./foreign.js":"FwXA","../Data.Enum/index.js":"oOsU","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Nullable/index.js":"YQ8o","../Effect/index.js":"oTWB","../Unsafe.Coerce/index.js":"ETUV","../Web.DOM.NodeType/index.js":"vDH/","../Web.Internal.FFI/index.js":"fdUh"}],"VVkU":[function(require,module,exports) { - -"use strict";var n=require("./foreign.js"),e=require("../Control.Applicative/index.js"),t=require("../Control.Bind/index.js"),r=require("../Control.Monad.Error.Class/index.js"),i=require("../Data.Array/index.js"),o=require("../Data.Either/index.js"),u=require("../Data.Eq/index.js"),a=require("../Data.Filterable/index.js"),f=require("../Data.Foldable/index.js"),c=require("../Data.Function/index.js"),l=require("../Data.Functor/index.js"),s=require("../Data.HeytingAlgebra/index.js"),d=require("../Data.Int/index.js"),p=require("../Data.Lens.Fold/index.js"),m=require("../Data.Lens.Getter/index.js"),v=require("../Data.Lens.Internal.Forget/index.js"),w=require("../Data.Lens.Iso.Newtype/index.js"),E=require("../Data.Lens.Prism/index.js"),h=require("../Data.Lens.Record/index.js"),g=require("../Data.List/index.js"),x=require("../Data.List.Types/index.js"),y=require("../Data.Map/index.js"),b=require("../Data.Map.Internal/index.js"),C=require("../Data.Maybe/index.js"),M=require("../Data.Maybe.First/index.js"),q=require("../Data.Monoid/index.js"),j=require("../Data.Newtype/index.js"),D=require("../Data.Nullable/index.js"),S=require("../Data.Ord/index.js"),F=require("../Data.Pair/index.js"),B=require("../Data.Ring/index.js"),N=require("../Data.Semiring/index.js"),k=require("../Data.Set/index.js"),I=require("../Data.Show/index.js"),L=require("../Data.Symbol/index.js"),T=require("../Data.Time.Duration/index.js"),R=require("../Data.Traversable/index.js"),_=require("../Data.TraversableWithIndex/index.js"),A=require("../Data.Tuple/index.js"),O=require("../Data.Unfoldable/index.js"),G=require("../Data.Unit/index.js"),P=require("../Data.Variant/index.js"),z=require("../Data.Variant.Internal/index.js"),U=require("../Effect/index.js"),W=require("../Effect.Aff/index.js"),J=require("../Effect.Aff.Class/index.js"),H=require("../Effect.Class/index.js"),V=require("../Effect.Exception/index.js"),Z=require("../Effect.Ref/index.js"),K=require("../Effect.Uncurried/index.js"),X=require("../Genetics.Browser.Cacher/index.js"),Y=require("../Genetics.Browser.Layer/index.js"),Q=require("../Graphics.Canvas/index.js"),$=require("../Graphics.Drawing/index.js"),nn=require("../Graphics.Drawing.Font/index.js"),en=require("../Partial.Unsafe/index.js"),tn=require("../Record/index.js"),rn=require("../Type.Equality/index.js"),on=require("../Unsafe.Coerce/index.js"),un=require("../Web.DOM.Element/index.js"),an=require("../Web.DOM.Node/index.js"),fn=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),cn=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),ln=function(){function n(){}return n.value=new n,n}(),sn=function(){function n(){}return n.value=new n,n}(),dn=function(){function n(){}return n.value=new n,n}(),pn=function(){function n(){}return n.value=new n,n}(),mn=function(n){return n},vn=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),wn=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),En=function(n){return n},hn=function(n){return n},gn=function(e){return function(t){return function(){return n.zoomCanvasImpl(e.back,e.front,{left:t.value0,right:t.value1})}}},xn=function(e){return function(t){return function(r){return n.canvasWheelCBImpl(j.unwrap(e)(t).element)(c.const(r))}}},yn=function(e){return function(){return n.unsafeCreateElementImpl(e.elementType,e.id)}},bn=function(e){return function(t){return function(){return n.setCanvasTranslation(e)(t.back)(),n.setCanvasTranslation(e)(t.front)()}}},Cn=K.runEffectFn3(n.setElementStyleImpl),Mn=function(n){return f.traverse_(U.applicativeEffect)(f.foldableArray)(A.uncurry(Cn(n)))},qn=function(n){return Mn(n)},jn=function(n){return Cn(n)},Dn=function(n){return function(e){return jn(n)("z-index")(I.show(I.showInt)(e))}},Sn=function(n){return function(e){return qn(e)([new A.Tuple("position","absolute"),new A.Tuple("top",I.show(I.showNumber)(n.top)+"px"),new A.Tuple("left",I.show(I.showNumber)(n.left)+"px")])}},Fn=function(e){return K.runEffectFn3(n.scrollCanvasImpl)(e.back)(e.front)},Bn=new j.Newtype(function(n){return n},En),Nn=new j.Newtype(function(n){return n},mn),kn=new j.Newtype(function(n){return n},hn),In=14,Ln=nn.fontString(nn.font(nn.sansSerif)(In)(q.mempty(nn.monoidFontOptions))),Tn=function(n){return function(n){return function(e){return function(){var t=Q.withContext(n)(function(){Q.setFont(n)(Ln)();return Q.measureText(n)(e.text)()})(),r=14+t.width/2,i=function(){if(e.gravity instanceof dn)return e.point.x;if(e.gravity instanceof sn)return e.point.x-r;if(e.gravity instanceof pn)return e.point.x+r;throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 694, column 11 - line 697, column 33): "+[e.gravity.constructor.name])}(),o=d.toNumber(In);return{x:i,y:e.point.y-o,width:t.width,height:o}}}}},Rn=function(n){return function(e){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.height+n.y>e.y}},_n={width:15,height:300},An=function(n){return function(i){return t.bind(W.bindAff)(H.liftEffect(W.monadEffectAff)(Z.read(i.tracks)))(function(t){var i=b.lookup(S.ordString)(n)(t);if(i instanceof C.Just)return e.pure(W.applicativeAff)(i.value0);if(i instanceof C.Nothing)return r.throwError(W.monadThrowAff)(V.error("Could not find track '"+n+"'!"));throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 448, column 3 - line 452, column 55): "+[i.constructor.name])})}},On=function(n){return function(e){return H.liftEffect(n)(Z.read(e.layers))}},Gn=function(n){return function(e){return H.liftEffect(n)(Z.read(e.dimensions))}},Pn=l.map(l.functorFn)(Q.getContext2D)(function(){var n=j.unwrap(Nn);return function(e){return n(e).front}}()),zn=function(n){return function(e){return function(r){return t.bind(n.Monad0().Bind1())(H.liftEffect(n)(Z.read(e.tracks)))(function(e){return R.for(n.Monad0().Applicative0())(b.traversableMap)(e)(r)})}}},Un=function(n){return function(e){var t=l.void(n.Monad0().Bind1().Apply0().Functor0()),r=zn(n)(e);return function(n){return t(r(n))}}},Wn=new u.Eq(function(n){return function(e){return n instanceof sn&&e instanceof sn||(n instanceof dn&&e instanceof dn||n instanceof pn&&e instanceof pn)}}),Jn=function(e){return K.runEffectFn2(n.elementClickImpl)(e)},Hn=function(e){return function(t){return function(){var r=l.map(U.functorEffect)(on.unsafeCoerce)(yn({elementType:"canvas",id:t}))();return n.initializeCanvasImpl(r,e),r}}},Vn=function(e){return function(t){return function(r){return function(){var i=yn({elementType:"div",id:r})();n.setContainerStyle(i)(e)();var o=Hn(_n)("glyphBuffer")(),u=Z.new({size:e,padding:t})();return{layers:Z.new(q.mempty(b.monoidMap(S.ordString)))(),dimensions:u,element:i,glyphBuffer:o}}}}},Zn=function(n){return function(e){return l.void(U.functorEffect)(Q.clearRect(n)({x:0,y:0,width:e.width,height:e.height}))}},Kn=function(e){return function(t){return function(r){return function(i){return function(){var o=Q.getContext2D(e)(),u=_n.width/2,a=_n.height/2;Zn(o)(_n)(),$.render(o)($.translate(u)(a)(i.drawing))();return n.drawCopies(e,_n,t,function(n){return n.x>=r.value0&&n.x<=r.value1},i.points)}}}}},Xn=function(e){return function(t){var r;return n.canvasDragImpl(e)((r=t,function(n){var e=D.toMaybe(n.during);if(e instanceof C.Just)return r(new o.Right(e.value0));if(e instanceof C.Nothing)return r(o.Left.create(C.fromMaybe({x:0,y:0})(D.toMaybe(n.total))));throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 311, column 36 - line 313, column 73): "+[e.constructor.name])}))}},Yn=function(n){return function(t){return function(){Z.read(n.tracks)();return Xn(n.element)(function(n){if(n instanceof o.Left)return e.pure(U.applicativeEffect)(G.unit);if(n instanceof o.Right)return t(n.value0);throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 326, column 40 - line 328, column 20): "+[n.constructor.name])})()}}},Qn=function(n){return function(t){return Xn(n.element)(function(n){if(n instanceof o.Left)return e.pure(U.applicativeEffect)(G.unit);if(n instanceof o.Right)return t(n.value0);throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 335, column 40 - line 337, column 20): "+[n.constructor.name])})}},$n=function(n){return function(e){return H.liftEffect(n)(function(){return{tracks:Z.new(q.mempty(b.monoidMap(S.ordString)))(),element:e}})}},ne=function(n){return function(){bn({x:0,y:0})(n)();var e=Q.getCanvasDimensions(n.back)();return f.for_(U.applicativeEffect)(f.foldableArray)([n.back,n.front])(t.composeKleisliFlipped(U.bindEffect)(c.flip(Zn)(e))(Q.getContext2D))()}},ee=function(n){return function(e){return function(){var t={back:Hn(n)(e+"-buffer")(),front:Hn(n)(e)()};return ne(t)(),t}}},te=function(n){return function(e){return function(){Q.setCanvasDimensions(e.back)(n)(),Q.setCanvasDimensions(e.front)(n)();return ne(e)(),G.unit}}},re=function(n){return function(e){return function(t){return H.liftEffect(n)(function(){if(t instanceof vn)return l.void(U.functorEffect)(Q.setCanvasDimensions(t.value0)(e));if(t instanceof wn)return te(e)(t.value0);throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 594, column 3 - line 596, column 45): "+[t.constructor.name])}())}}},ie=function(e){return function(r){return function(i){return H.liftEffect(e)(function(){return Z.modify_(function(n){return{size:r,padding:n.padding}})(i.dimensions)(),n.setContainerStyle(i.element)(r)(),t.bindFlipped(U.bindEffect)(f.traverse_(U.applicativeEffect)(b.foldableMap)(re(H.monadEffectEffect)(r)))(On(H.monadEffectEffect)(i))()})}}},oe=function(e){return function(t){return n.appendElem(e)(t)}},ue=function(n){return function(e){return f.any(x.foldableList)(s.heytingAlgebraBoolean)(function(n){return!u.eq(u.eqRec()(u.eqRowCons(u.eqRowCons(u.eqRowCons(u.eqRowCons(u.eqRowNil)()(new L.IsSymbol(function(){return"y"}))(u.eqNumber))()(new L.IsSymbol(function(){return"x"}))(u.eqNumber))()(new L.IsSymbol(function(){return"width"}))(u.eqNumber))()(new L.IsSymbol(function(){return"height"}))(u.eqNumber)))(e.rect)(n.rect)&&Rn(e.rect)(n.rect)})(n)?n:new x.Cons(e,n)}},ae=function(n){return function(e){return function(t){var r=a.filter(a.filterableArray)(function(e){return e.point.x<n.value1&&e.point.x+100>n.value0})(i.fromFoldable(x.foldableList)(e));return function(){var e=R.for(U.applicativeEffect)(R.traversableArray)(r)(function(e){return l.map(U.functorEffect)(function(n){return{text:e.text,rect:n}})(Tn(n)(t)(e))})(),i=f.foldl(f.foldableArray)(ue)(q.mempty(x.monoidList))(e);return Q.withContext(t)(function(){Q.setFont(t)(Ln)();return f.for_(U.applicativeEffect)(x.foldableList)(i)(function(n){return Q.fillText(t)(n.text)(n.rect.x-n.rect.width/2)(n.rect.y)})()})()}}}},fe=function(e){return function(t){return function(r){return function(i){return H.liftEffect(e)(function(){return Z.modify_(b.insert(S.ordString)(r)(j.wrap(Bn)(i)))(t.tracks)(),n.appendElem(t.element)(i.element)()})}}}},ce=L.SProxy.value,le=L.SProxy.value,se=L.SProxy.value,de=L.SProxy.value,pe=function(n){return E["prism'"](vn.create)(function(n){if(n instanceof vn)return new C.Just(n.value0);if(n instanceof wn)return C.Nothing.value;throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 769, column 27 - line 771, column 23): "+[n.constructor.name])})(n)},me=function(n){var e=w._Newtype(Bn)(Bn)(n.Profunctor0()),t=h.prop(new L.IsSymbol(function(){return"layers"}))()()(L.SProxy.value)(n);return function(n){return e(t(n))}},ve=m.to(function(n){if(n instanceof vn)return n.value0;if(n instanceof wn)return j.unwrap(Nn)(n.value0).front;throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 759, column 19 - line 761, column 31): "+[n.constructor.name])}),we=function(n){return function(r){return function(i){return function(o){return function(u){return function(a){return t.bind(n.MonadEffect0().Monad0().Bind1())(l.map(n.MonadEffect0().Monad0().Bind1().Apply0().Functor0())(function(n){return n.size})(Gn(n.MonadEffect0())(o)))(function(c){return t.bind(n.MonadEffect0().Monad0().Bind1())(Gn(n.MonadEffect0())(o))(function(s){var d={left:0,top:0},p=function(n){return m.viewOn(a.value2)(Y._Component)(new A.Tuple(n,Y.slotSize(s)(Y.asSlot(a.value2))))};return t.bind(n.MonadEffect0().Monad0().Bind1())(H.liftEffect(n.MonadEffect0())(function(){var n=function(){if(a.value0 instanceof Y.Fixed)return l.map(U.functorEffect)(vn.create)(Hn(c)(u))();if(a.value0 instanceof Y.Scrolling)return l.map(U.functorEffect)(wn.create)(ee(c)(u))();throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 812, column 11 - line 814, column 67): "+[a.value0.constructor.name])}();return Sn(d)(m.viewOn(n)(ve))(),n}))(function(c){var s=j.unwrap(Bn)(o).layers;return t.discard(t.discardUnit)(n.MonadEffect0().Monad0().Bind1())(H.liftEffect(n.MonadEffect0())(function(){return Z.modify_(b.insert(S.ordString)(u)(c))(s)(),oe(j.unwrap(Bn)(o).element)(m.viewOn(c)(ve))()}))(function(){return t.bind(n.MonadEffect0().Monad0().Bind1())(J.liftAff(n)(X.new(r)(i)(p)))(function(r){return e.pure(n.MonadEffect0().Monad0().Applicative0())({drawOnCanvas:function(r){return function(i){return t.bind(n.MonadEffect0().Monad0().Bind1())(On(n.MonadEffect0())(o))(function(c){return t.bind(n.MonadEffect0().Monad0().Bind1())(function(){var t=b.lookup(S.ordString)(u)(c);if(t instanceof C.Nothing)return en.unsafeCrashWith("Tried to render layer '"+u+"', but it did not exist!");if(t instanceof C.Just)return e.pure(n.MonadEffect0().Monad0().Applicative0())(m.viewOn(t.value0)(ve));throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 830, column 16 - line 832, column 53): "+[t.constructor.name])}())(function(u){return t.bind(n.MonadEffect0().Monad0().Bind1())(Gn(n.MonadEffect0())(o))(function(c){return t.bind(n.MonadEffect0().Monad0().Bind1())(Y.slotContext(n.MonadEffect0())(a)(c)(u))(function(u){return t.discard(t.discardUnit)(n.MonadEffect0().Monad0().Bind1())(H.liftEffect(n.MonadEffect0())(Q.withContext(u)(function(){return Y.setContextTranslation(N.zero(N.semiringRecord()(N.semiringRecordCons(new L.IsSymbol(function(){return"x"}))()(N.semiringRecordCons(new L.IsSymbol(function(){return"y"}))()(N.semiringRecordNil)(N.semiringNumber))(N.semiringNumber))))(u)(),l.void(U.functorEffect)(Q.clearRect(u)(tn.merge()()({x:0,y:0})(c.size)))()})))(function(){return t.bind(n.MonadEffect0().Monad0().Bind1())(H.liftEffect(n.MonadEffect0())(Q.translate(u)({translateX:-r.value0,translateY:0})))(function(a){var c=function(e){return H.liftEffect(n.MonadEffect0())(ae(new F.Pair(r.value0,r.value1))(e)(u))},l=function(e){return H.liftEffect(n.MonadEffect0())(f.for_(U.applicativeEffect)(f.foldableArray)(e)(Kn(j.unwrap(Bn)(o).glyphBuffer)(u)(new F.Pair(r.value0,r.value1))))},s=function(e){return H.liftEffect(n.MonadEffect0())($.render(u)(e))},d=function(t){return H.liftEffect(n.MonadEffect0())(e.when(U.applicativeEffect)(t.topLeft.x<=r.value1&&t.bottomRight.x>=r.value0)($.render(u)($.translate(t.topLeft.x)(t.topLeft.y)(t.drawing(G.unit)))))},p=O.unfoldr(x.unfoldableList)(function(n){return g.null(n)?C.Nothing.value:new C.Just(new A.Tuple(g.take(250)(n),g.drop(250)(n)))})(i);return f.for_(n.MonadEffect0().Monad0().Applicative0())(x.foldableList)(p)(function(e){return t.discard(t.discardUnit)(n.MonadEffect0().Monad0().Bind1())(f.for_(n.MonadEffect0().Monad0().Applicative0())(x.foldableList)(e)(function(n){return P.onMatch()(z.variantMatchCons(z.variantMatchCons(z.variantMatchCons(z.variantMatchCons(z.variantMatchNil)()(rn.refl))()(rn.refl))()(rn.refl))()(rn.refl))()({drawing:s,bigDrawing:d,drawingBatch:l,labels:c})(P.case_)(n)}))(function(){return J.liftAff(n)(W.delay(j.wrap(T.newtypeMilliseconds)(.01)))})})})})})})})})}},run:r.run,last:r.last})})})})})})}}}}}},Ee=function(n){return function(e){return function(t){return H.liftEffect(n)(function(){var n=Z.read(e.layers)(),r=y.keys(n);f.length(k.foldableSet)(N.semiringInt)(r);return g.null(g.difference(u.eqString)(t)(g.fromFoldable(k.foldableSet)(r)))?l.void(U.functorEffect)(_.forWithIndex(U.applicativeEffect)(x.traversableWithIndexList)(t)(function(e){return function(t){return f.traverse_(U.applicativeEffect)(f.foldableMaybe)(function(n){return Dn(m.viewOn(n)(ve))(e)})(b.lookup(S.ordString)(t)(n))}}))():en.unsafeCrashWith("Called `zIndexLayers` with an order that did not contain all layers")()})}}},he=function(n){return function(e){var t=w._Newtype(n)(n)(e.Profunctor0()),r=h.prop(new L.IsSymbol(function(){return"element"}))()()(L.SProxy.value)(e);return function(n){return t(r(n))}}},ge=function(n){return function(e){return function(t){return function(r){return H.liftEffect(n)(function(){var n=On(H.monadEffectEffect)(e)();Z.modify_(b.insert(S.ordString)(t)(r))(m.viewOn(e)(me(v.strongForget)))();var i=function(n){return m.viewOn(n)(ve)};return l.void(U.functorEffect)(function(){var o=b.lookup(S.ordString)(t)(n);if(o instanceof C.Just)return an.replaceChild(i(r))(i(o.value0))(m.viewOn(e)(he(Bn)(v.strongForget)));if(o instanceof C.Nothing)return an.appendChild(i(r))(m.viewOn(e)(he(Bn)(v.strongForget)));throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 613, column 10 - line 615, column 95): "+[o.constructor.name])}())()})}}}},xe=function(n){return function(e){return function(t){return H.liftEffect(n)(function(){var n=On(H.monadEffectEffect)(e)();return function(){var r,i=b.lookup(S.ordString)(t)(n);if(i instanceof C.Nothing)return G.unit;if(i instanceof C.Just)return l.void(U.functorEffect)(an.removeChild((r=i.value0,m.viewOn(r)(ve)))(m.viewOn(e)(he(Bn)(v.strongForget))))();throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 628, column 3 - line 630, column 83): "+[i.constructor.name])}(),Z.modify_(b.delete(S.ordString)(t))(m.viewOn(e)(me(v.strongForget)))()})}}},ye=function(n){return function(e){return function(t){return H.liftEffect(n)(function(){var n=Gn(H.monadEffectEffect)(e)(),r=m.viewOn(t)(Y._Component);return Jn(m.viewOn(e)(he(Bn)(v.strongForget)))(function(e){return r((i=e,B.sub(B.ringRecord()(B.ringRecordCons(new L.IsSymbol(function(){return"x"}))()(B.ringRecordCons(new L.IsSymbol(function(){return"y"}))()(B.ringRecordNil)(B.ringNumber))(B.ringNumber)))(i)(Y.slotOffset(n)(Y.asSlot(t)))));var i})()})}}},be=function(e){return function(t){return function(){var r=Gn(H.monadEffectEffect)(e)(),i=m.viewOn(t)(Y._Component);return n.canvasWheelCBImpl(m.viewOn(e)(he(Bn)(v.strongForget)))(function(n){return i((e=n,B.sub(B.ringRecord()(B.ringRecordCons(new L.IsSymbol(function(){return"x"}))()(B.ringRecordCons(new L.IsSymbol(function(){return"y"}))()(B.ringRecordNil)(B.ringNumber))(B.ringNumber)))(e)(Y.slotOffset(r)(Y.asSlot(t)))));var e})()}}},Ce=function(n){return function(r){return function(i){var o=un.toNode(m.viewOn(r)(he(Bn)(v.strongForget)));return t.discard(t.discardUnit)(n.Monad0().Bind1())(H.liftEffect(n)(an.setTextContent("loading")(o)))(function(){return t.bind(n.Monad0().Bind1())(i)(function(r){return t.discard(t.discardUnit)(n.Monad0().Bind1())(H.liftEffect(n)(an.setTextContent("")(o)))(function(){return e.pure(n.Monad0().Applicative0())(r)})})})}}},Me=function(n){return E["prism'"](wn.create)(function(n){if(n instanceof vn)return C.Nothing.value;if(n instanceof wn)return new C.Just(n.value0);throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 765, column 9 - line 765, column 34): "+[n.constructor.name])})(n)},qe=function(n){return function(t){return function(){var r=Z.read(n.layers)(),i=a.filterMap(a.filterableMap(S.ordString))(p.preview(Me(v.choiceForget(M.monoidFirst))))(r);return f.for_(U.applicativeEffect)(b.foldableMap)(i)(function(r){if(t instanceof fn)return function(){var e=l.map(U.functorEffect)(function(n){return Y.trackSlots(n).center.size.width})(Gn(H.monadEffectEffect)(j.wrap(Bn)(n)))();return Fn(r)({x:-t.value0*e,y:0})()};if(t instanceof cn)return gn(r)(t.value0);if(t instanceof ln)return e.pure(U.applicativeEffect)(G.unit);throw new Error("Failed pattern match at Genetics.Browser.Canvas (line 284, column 26 - line 293, column 29): "+[t.constructor.name])})()}}},je=function(n){return function(e){return function(){var t=Z.read(n.layers)(),r=a.filterMap(a.filterableMap(S.ordString))(p.preview(Me(v.choiceForget(M.monoidFirst))))(t);return f.for_(U.applicativeEffect)(b.foldableMap)(r)(function(n){return Fn(n)(e)})()}}};module.exports={LLeft:sn,LCenter:dn,LRight:pn,_drawing:se,_bigDrawing:de,_drawingBatch:le,_labels:ce,newLayer:we,getDimensions:Gn,_Container:he,dragScroll:Yn,dragScrollTrack:Qn,wheelZoom:xn,trackWheel:be,trackClickHandler:ye,trackContainer:Vn,withLoadingIndicator:Ce,setTrackContainerSize:ie,setElementStyle:Cn,browserContainer:$n,addTrack:fe,getTrack:An,forTracks:zn,forTracks_:Un,Scrolling:fn,Zooming:cn,Jump:ln,animateTrack:qe,newtypeBrowserContainer:kn,eqLabelPlace:Wn}; -},{"./foreign.js":"KkC9","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Error.Class/index.js":"L8Lk","../Data.Array/index.js":"4t4C","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Filterable/index.js":"6hfS","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Int/index.js":"xNJb","../Data.Lens.Fold/index.js":"fCig","../Data.Lens.Getter/index.js":"OPOX","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.Lens.Iso.Newtype/index.js":"CiFJ","../Data.Lens.Prism/index.js":"4AcV","../Data.Lens.Record/index.js":"nwoH","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map/index.js":"62zx","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Maybe.First/index.js":"W/l6","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Nullable/index.js":"YQ8o","../Data.Ord/index.js":"r4Vb","../Data.Pair/index.js":"PpsX","../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF","../Data.Set/index.js":"+Eae","../Data.Show/index.js":"mFY7","../Data.Symbol/index.js":"4oJQ","../Data.Time.Duration/index.js":"AnkF","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unit/index.js":"NhVk","../Data.Variant/index.js":"hgdh","../Data.Variant.Internal/index.js":"kYoO","../Effect/index.js":"oTWB","../Effect.Aff/index.js":"I7lu","../Effect.Aff.Class/index.js":"I4H+","../Effect.Class/index.js":"dWtH","../Effect.Exception/index.js":"0OCW","../Effect.Ref/index.js":"/Jaj","../Effect.Uncurried/index.js":"qn3Z","../Genetics.Browser.Cacher/index.js":"61ee","../Genetics.Browser.Layer/index.js":"YWUW","../Graphics.Canvas/index.js":"rm6N","../Graphics.Drawing/index.js":"0WVi","../Graphics.Drawing.Font/index.js":"fMOI","../Partial.Unsafe/index.js":"aoR+","../Record/index.js":"0gG4","../Type.Equality/index.js":"Uq/R","../Unsafe.Coerce/index.js":"ETUV","../Web.DOM.Element/index.js":"S4h2","../Web.DOM.Node/index.js":"P+X4"}],"7rcn":[function(require,module,exports) { -"use strict";exports.unsafeStringify=function(n){return JSON.stringify(n)},exports.unsafeToFixed=function(n){return function(e){return e.toFixed(n)}},exports.unsafeToExponential=function(n){return function(e){return e.toExponential(n)}},exports.unsafeToPrecision=function(n){return function(e){return e.toPrecision(n)}},exports.unsafeDecodeURI=decodeURI,exports.unsafeEncodeURI=encodeURI,exports.unsafeDecodeURIComponent=decodeURIComponent,exports.unsafeEncodeURIComponent=encodeURIComponent; -},{}],"qSZP":[function(require,module,exports) { -"use strict";var e=require("./foreign.js");module.exports={unsafeStringify:e.unsafeStringify,unsafeToFixed:e.unsafeToFixed,unsafeToExponential:e.unsafeToExponential,unsafeToPrecision:e.unsafeToPrecision,unsafeDecodeURI:e.unsafeDecodeURI,unsafeEncodeURI:e.unsafeEncodeURI,unsafeDecodeURIComponent:e.unsafeDecodeURIComponent,unsafeEncodeURIComponent:e.unsafeEncodeURIComponent}; -},{"./foreign.js":"7rcn"}],"7bYH":[function(require,module,exports) { -"use strict";var n=require("../Data.Array/index.js"),r=require("../Data.BigInt/index.js"),e=require("../Data.Boolean/index.js"),t=require("../Data.Eq/index.js"),i=require("../Data.EuclideanRing/index.js"),u=require("../Data.Foldable/index.js"),a=require("../Data.Functor/index.js"),o=require("../Data.Generic.Rep/index.js"),c=require("../Data.Lens.Getter/index.js"),f=require("../Data.Lens.Internal.Forget/index.js"),l=require("../Data.Lens.Iso.Newtype/index.js"),d=require("../Data.Map.Internal/index.js"),s=require("../Data.Maybe/index.js"),m=require("../Data.Monoid.Additive/index.js"),g=require("../Data.Newtype/index.js"),v=require("../Data.Ord/index.js"),p=require("../Data.Pair/index.js"),w=require("../Data.Ring/index.js"),x=require("../Data.Semiring/index.js"),b=require("../Data.Traversable/index.js"),q=require("../Global.Unsafe/index.js"),h=function(n){return n},B=function(n){return n},I=function(n){return n},P=function(n){return n},y=function(n){return r.toNumber(n.coordWidth)/n.pixelWidth},j=q.unsafeStringify,S=function(n){return function(e){return r.toNumber(e)*(n.pixelWidth/r.toNumber(n.coordWidth))}},D=function(n){return function(r){return function(e){var t=new p.Pair(v.min(n)(r.value0)(e.value0),v.min(n)(r.value1)(e.value1)),i=new p.Pair(v.max(n)(r.value0)(e.value0),v.max(n)(r.value1)(e.value1));return v.greaterThanOrEq(n)(t.value1)(i.value0)}}},N=function(n){return function(r){return w.sub(n)(r.value1)(r.value0)}},F=function(n){return function(e){var t=v.max(v.ordNumber)(0)(e),i=a.map(p.functorPair)(r.toNumber)(n),u=(N(w.ringNumber)(i)*t-N(w.ringNumber)(i))/2,o=a.map(p.functorPair)(r.fromNumber)(new p.Pair(i.value0-u,i.value1+u));return a.map(p.functorPair)(s.fromJust())(o)}},z=function(n){return function(e){var t=N(r.ringBigInt)(e),u=i.div(r.euclideanRingBigInt)(w.sub(r.ringBigInt)(n)(t))(r.fromInt(2));return new p.Pair(w.sub(r.ringBigInt)(e.value0)(u),x.add(r.semiringBigInt)(e.value1)(u))}},T=function(n){return function(e){var t=a.map(a.functorFn)(s.fromJust())(r.fromNumber)(e*r.toNumber(N(r.ringBigInt)(n)));return a.map(p.functorPair)(function(n){return x.add(r.semiringBigInt)(n)(t)})(n)}},W=function(n){return function(e){var t=N(r.ringBigInt)(e);return{pixelWidth:n.width,coordWidth:t}}},A=function(n){return function(r){return function(e){return function(t){return i.div(n)(w.sub(n.CommutativeRing0().Ring0())(t)(r))(w.sub(n.CommutativeRing0().Ring0())(e)(r))}}}},C=new g.Newtype(function(n){return n},B),M=new g.Newtype(function(n){return n},P),R=function(n){return function(r){return function(e){return function(t){return x.add(n.Semiring0())(x.mul(n.Semiring0())(w.sub(n)(x.one(n.Semiring0()))(t))(r))(x.mul(n.Semiring0())(t)(e))}}}},E=new o.Generic(function(n){return n},function(n){return n}),G=new a.Functor(function(n){return function(r){return P(a.map(d.functorMap)(a.map(p.functorPair)(n))(r))}}),O=new t.Eq(function(n){return function(e){return t.eq(r.eqBigInt)(n.coordWidth)(e.coordWidth)&&n.pixelWidth===e.pixelWidth}}),L=new g.Newtype(function(n){return n},I),V=function(r){return function(e){return function(t){var i,a,o=n.unzip(t);return P(d.fromFoldable(r)(u.foldableArray)(n.zip(o.value0)((i=o.value1,a=b.scanl(b.traversableArray)(function(n){return function(r){return x.add(e)(n)(r)}})(x.zero(e))(i),n.zipWith(p.Pair.create)(n.cons(x.zero(e))(a))(a)))))}}},_=function(n){return function(r){return function(e){return new p.Pair(w.sub(n)(e.value0)(r),x.add(n.Semiring0())(e.value1)(r))}}},J=function(n){return l._Newtype(M)(M)(n.Profunctor0())},U=function(n){var r=J(f.strongForget),e=c.to(g.alaF(a.functorFn)(a.functorFn)(g.newtypeAdditive)(g.newtypeAdditive)(m.Additive)(u.foldMap(d.foldableMap)(m.monoidAdditive(n.Semiring0())))(N(n)));return function(n){return r(e(n))}},k=function(n){return function(e){return function(t){var i=c.viewOn(n)(U(r.ringBigInt)),u=g.unwrap(L)(t),a=w.sub(r.ringBigInt)(u.value1)(u.value0),o=function(){var n=v.greaterThan(r.ordBigInt)(u.value1)(i),e=v.lessThan(r.ordBigInt)(u.value0)(x.zero(r.semiringBigInt));if(e&&!n)return new p.Pair(x.zero(r.semiringBigInt),a);if(!e&&n)return new p.Pair(w.sub(r.ringBigInt)(i)(a),i);if(e&&n)return new p.Pair(x.zero(r.semiringBigInt),i);if(!e&&!n)return new p.Pair(u.value0,u.value1);throw new Error("Failed pattern match at Genetics.Browser.Coordinates (line 182, column 22 - line 186, column 39): "+[e.constructor.name,n.constructor.name])}();return z(v.min(r.ordBigInt)(i)(v.max(r.ordBigInt)(a)(e)))(new p.Pair(o.value0,o.value1))}}},H=function(n){return function(r){return a.map(d.functorMap)(a.map(p.functorPair)(S(r)))(c.viewOn(n)(J(f.strongForget)))}},K=function(n){return function(r){return function(t){return function(i){return d.filter(n)(function(n){if(v.lessThan(r)(n.value0)(i.value0)&&v.greaterThan(r)(n.value1)(i.value1))return!0;if(v.lessThan(r)(n.value0)(i.value0)&&v.lessThan(r)(n.value1)(i.value0))return!1;if(v.greaterThan(r)(n.value0)(i.value1)&&v.greaterThan(r)(n.value1)(i.value1))return!1;if(e.otherwise)return!0;throw new Error("Failed pattern match at Genetics.Browser.Coordinates (line 142, column 9 - line 146, column 29): "+[n.constructor.name])})(c.viewOn(t)(J(f.strongForget)))}}}},Q=function(n){return function(e){return function(t){return function(i){return a.map(d.functorMap)(a.map(p.functorPair)(S(i)))(K(n)(r.ordBigInt)(e)(g.unwrap(L)(t)))}}}};module.exports={CoordSysView:I,pairSize:N,_TotalSize:U,normalizeView:k,aroundPair:_,normalize:A,scalePairBy:F,scaledSegments:H,"scaledSegments'":Q,translatePairBy:T,viewScale:W,xPerPixel:y,_Segments:J,pairsOverlap:D,coordSys:V,scaleToScreen:S,newtypeNormalized:C,functorCoordSys:G,newtypeCoordSys:M,genericCoordSys:E,eqViewScale:O,coordsysviewNewtype:L}; -},{"../Data.Array/index.js":"4t4C","../Data.BigInt/index.js":"Zx+T","../Data.Boolean/index.js":"ObQr","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Foldable/index.js":"eVDl","../Data.Functor/index.js":"+0AE","../Data.Generic.Rep/index.js":"AuzG","../Data.Lens.Getter/index.js":"OPOX","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.Lens.Iso.Newtype/index.js":"CiFJ","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid.Additive/index.js":"fHyj","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Pair/index.js":"PpsX","../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF","../Data.Traversable/index.js":"n7EE","../Global.Unsafe/index.js":"qSZP"}],"71qG":[function(require,module,exports) { -"use strict";var e=require("../Control.Applicative/index.js"),r=require("../Control.Monad.Except.Trans/index.js"),n=require("../Data.Boolean/index.js"),t=require("../Data.Identity/index.js"),i=require("../Foreign/index.js"),a=function(e){return"Object"===i.tagOf(e)},o=function(o){if(a(o))return e.pure(r.applicativeExceptT(t.monadIdentity))(i.unsafeFromForeign(o));if(n.otherwise)return i.fail(new i.TypeMismatch("Object",i.tagOf(o)));throw new Error("Failed pattern match at Foreign.Generic.Internal (line 13, column 1 - line 13, column 44): "+[o.constructor.name])};module.exports={isObject:a,readObject:o}; -},{"../Control.Applicative/index.js":"qYya","../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Boolean/index.js":"ObQr","../Data.Identity/index.js":"2OKT","../Foreign/index.js":"pu1p"}],"eqin":[function(require,module,exports) { -"use strict";exports.unsafeReadPropImpl=function(r,t,e,n){return null==n?r:t(n[e])},exports.unsafeHasOwnProperty=function(r,t){return Object.prototype.hasOwnProperty.call(t,r)},exports.unsafeHasProperty=function(r,t){return r in t}; -},{}],"Ryy1":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),n=require("../Control.Applicative/index.js"),r=require("../Control.Bind/index.js"),t=require("../Control.Monad.Except.Trans/index.js"),i=require("../Data.Function/index.js"),o=require("../Data.Identity/index.js"),u=require("../Foreign/index.js"),d=function(e){this.ix=e},f=function(e,n,r,t){this.errorAt=e,this.hasOwnProperty=n,this.hasProperty=r,this.index=t},a=function(r){return function(i){return e.unsafeReadPropImpl(u.fail(new u.TypeMismatch("object",u.typeOf(i))),n.pure(t.applicativeExceptT(o.monadIdentity)),r,i)}},c=a,p=a,s=function(e){return e.ix},x=function(e){return e.index},l=new d(function(e){return function(n){return function(u){return r.bindFlipped(t.bindExceptT(o.monadIdentity))(i.flip(x(e))(u))(n)}}}),y=new d(function(e){return x(e)}),h=function(n){return function(r){return!u.isNull(r)&&(!u.isUndefined(r)&&(("object"===u.typeOf(r)||"function"===u.typeOf(r))&&e.unsafeHasProperty(n,r)))}},P=function(e){return e.hasProperty},j=function(n){return function(r){return!u.isNull(r)&&(!u.isUndefined(r)&&(("object"===u.typeOf(r)||"function"===u.typeOf(r))&&e.unsafeHasOwnProperty(n,r)))}},w=new f(u.ErrorAtIndex.create,j,h,i.flip(p)),I=new f(u.ErrorAtProperty.create,j,h,i.flip(c)),O=function(e){return e.hasOwnProperty},b=function(e){return e.errorAt};module.exports={Index:f,Indexable:d,readProp:c,readIndex:p,ix:s,index:x,hasProperty:P,hasOwnProperty:O,errorAt:b,indexString:I,indexInt:w,indexableForeign:y,indexableExceptT:l}; -},{"./foreign.js":"eqin","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Function/index.js":"ImXJ","../Data.Identity/index.js":"2OKT","../Foreign/index.js":"pu1p"}],"dhzu":[function(require,module,exports) { -exports.null=null,exports[void 0]=void 0; -},{}],"k5yP":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),n=require("../Control.Applicative/index.js"),r=require("../Control.Monad.Except.Trans/index.js"),i=require("../Data.Functor/index.js"),t=require("../Data.Identity/index.js"),u=require("../Data.Maybe/index.js"),d=require("../Foreign/index.js"),a=function(e){return function(a){return d.isNull(a)||d.isUndefined(a)?n.pure(r.applicativeExceptT(t.monadIdentity))(u.Nothing.value):i.map(r.functorExceptT(t.functorIdentity))(u.Just.create)(e(a))}};module.exports={readNullOrUndefined:a,undefined:e[void 0],null:e.null}; -},{"./foreign.js":"dhzu","../Control.Applicative/index.js":"qYya","../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Maybe/index.js":"5mN7","../Foreign/index.js":"pu1p"}],"cO3i":[function(require,module,exports) { -"use strict";function r(r){return function(n){var t=[];for(var e in n)hasOwnProperty.call(n,e)&&t.push(r(e)(n[e]));return t}}exports._copyST=function(r){return function(){var n={};for(var t in r)hasOwnProperty.call(r,t)&&(n[t]=r[t]);return n}},exports.empty={},exports.runST=function(r){return r()},exports._fmapObject=function(r,n){var t={};for(var e in r)hasOwnProperty.call(r,e)&&(t[e]=n(r[e]));return t},exports._mapWithKey=function(r,n){var t={};for(var e in r)hasOwnProperty.call(r,e)&&(t[e]=n(e)(r[e]));return t},exports._foldM=function(r){return function(n){return function(t){return function(e){var o=t;function u(r){return function(t){return n(t)(r)(e[r])}}for(var i in e)hasOwnProperty.call(e,i)&&(o=r(o)(u(i)));return o}}}},exports._foldSCObject=function(r,n,t,e){var o=n;for(var u in r)if(hasOwnProperty.call(r,u)){var i=t(o)(u)(r[u]),f=e(null)(i);if(null===f)return o;o=f}return o},exports.all=function(r){return function(n){for(var t in n)if(hasOwnProperty.call(n,t)&&!r(t)(n[t]))return!1;return!0}},exports.size=function(r){var n=0;for(var t in r)hasOwnProperty.call(r,t)&&++n;return n},exports._lookup=function(r,n,t,e){return t in e?n(e[t]):r},exports._unsafeDeleteObject=function(r,n){return delete r[n],r},exports._lookupST=function(r,n,t,e){return function(){return t in e?n(e[t]):r}},exports.toArrayWithKey=r,exports.keys=Object.keys||r(function(r){return function(){return r}}); -},{}],"hgKu":[function(require,module,exports) { -"use strict";exports.new=function(){return{}},exports.peekImpl=function(n){return function(t){return function(r){return function(e){return function(){return{}.hasOwnProperty.call(e,r)?n(e[r]):t}}}}},exports.poke=function(n){return function(t){return function(r){return function(){return r[n]=t,r}}}},exports.delete=function(n){return function(t){return function(){return delete t[n],t}}}; -},{}],"fXGJ":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),r=require("../Data.Maybe/index.js"),t=e.peekImpl(r.Just.create)(r.Nothing.value);module.exports={peek:t,new:e.new,poke:e.poke,delete:e.delete}; -},{"./foreign.js":"hgKu","../Data.Maybe/index.js":"5mN7"}],"jsiz":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),t=require("../Control.Bind/index.js"),u=require("../Control.Category/index.js"),o=require("../Control.Monad.ST.Internal/index.js"),i=require("../Data.Array/index.js"),c=require("../Data.Eq/index.js"),f=require("../Data.Foldable/index.js"),a=require("../Data.FoldableWithIndex/index.js"),l=require("../Data.Function/index.js"),d=require("../Data.Function.Uncurried/index.js"),p=require("../Data.Functor/index.js"),s=require("../Data.FunctorWithIndex/index.js"),b=require("../Data.Maybe/index.js"),y=require("../Data.Monoid/index.js"),j=require("../Data.Ord/index.js"),m=require("../Data.Semigroup/index.js"),h=require("../Data.Show/index.js"),x=require("../Data.Traversable/index.js"),v=require("../Data.TraversableWithIndex/index.js"),q=require("../Data.Tuple/index.js"),T=require("../Data.Unfoldable/index.js"),S=require("../Foreign.Object.ST/index.js"),w=require("../Unsafe.Coerce/index.js"),F=n.toArrayWithKey(function(n){return function(n){return n}}),W=function(r){var e=i.toUnfoldable(r),t=n.toArrayWithKey(q.Tuple.create);return function(n){return e(t(n))}},A=function(r){var e=i.toUnfoldable(r),t=i.sortWith(j.ordString)(q.fst),u=n.toArrayWithKey(q.Tuple.create);return function(n){return e(t(u(n)))}},O=A(T.unfoldableArray),g=n.toArrayWithKey(q.Tuple.create),D=n._copyST,k=function(r){return function(e){return n.runST(t.bindFlipped(o.bindST)(S.poke(r)(e))(S.new))}},_=function(n){return new h.Show(function(r){return"(fromFoldable "+h.show(h.showArray(q.showTuple(h.showString)(n)))(g(r))+")"})},I=function(r){return function(e){return n.runST(function(){var n=D(e)();r(n)();return n})}},K=d.runFn4(n._lookup)(!1)(l.const(!0)),M=function(r){return function(e){return n._mapWithKey(e,r)}},C=d.runFn4(n._lookup)(b.Nothing.value)(b.Just.create),U=function(r){return function(e){return function(t){return n.all(function(e){return function(u){return n._lookup(!1,c.eq(r)(u),e,t)}})(e)}}},E=n.all(function(n){return function(n){return!1}}),z=function(n){return function(r){return I(S.poke(n)(r))}},N=new p.Functor(function(r){return function(e){return n._fmapObject(e,r)}}),B=new s.FunctorWithIndex(function(){return N},M),J=function(n){return w.unsafeCoerce},H=function(r){return function(e){return function(t){return n.runST(function(){var u=S.new();return f.for_(o.applicativeST)(r)(t)(function(r){return function(){var t=n._lookupST(r.value1,e(r.value1),r.value0,u)();return S.poke(r.value0)(t)(u)()}})(),u})}}},G=function(r){return function(e){return n.runST(function(){var n=S.new();return o.foreach(i.fromFoldable(r)(e))(function(r){return p.void(o.functorST)(S.poke(r.value0)(r.value1)(n))})(),n})}},L=n._copyST,P=function(r){return function(e){return function(t){return n._foldSCObject(t,e,r,b.fromMaybe)}}},Q=function(e){return function(u){return function(o){return n._foldM(t.bind(e.Bind1()))(u)(r.pure(e.Applicative0())(o))}}},R=function(r){return new m.Semigroup(function(e){return function(t){return I(function(u){return Q(o.monadST)(function(e){return function(u){return function(o){return S.poke(u)(n._lookup(o,function(n){return m.append(r)(n)(o)},u,t))(e)}}})(u)(e)})(t)}})},V=function(r){return new y.Monoid(function(){return R(r)},n.empty)},X=function(n){return I(function(r){return Q(o.monadST)(function(n){return function(r){return function(e){return S.poke(r)(e)(n)}}})(r)(n)})},Y=function(r){return f.foldl(r)(X)(n.empty)},Z=n._foldM(l.applyFlipped),$=function(n){return function(r){return Z(function(e){return function(t){return function(u){return m.append(n.Semigroup0())(e)(r(t)(u))}}})(y.mempty(n))}},nn=new f.Foldable(function(n){return function(r){return $(n)(l.const(r))}},function(n){return Z(function(r){return function(e){return n(r)}})},function(n){return function(r){return function(e){return f.foldr(f.foldableArray)(n)(r)(F(e))}}}),rn=new a.FoldableWithIndex(function(){return nn},function(n){return $(n)},function(n){return Z(l.flip(n))},function(r){return function(e){return function(t){return f.foldr(f.foldableArray)(q.uncurry(r))(e)(n.toArrayWithKey(q.Tuple.create)(t))}}}),en=new v.TraversableWithIndex(function(){return rn},function(){return B},function(){return tn},function(t){return function(u){return function(o){return Z(function(n){return function(r){return function(o){return e.apply(t.Apply0())(p.map(t.Apply0().Functor0())(l.flip(z(r)))(n))(u(r)(o))}}})(r.pure(t)(n.empty))(o)}}}),tn=new x.Traversable(function(){return nn},function(){return N},function(n){return x.traverse(tn)(n)(u.identity(u.categoryFn))},function(n){var r=v.traverseWithIndex(en)(n);return function(n){return r(l.const(n))}}),un=function(e){return function(t){var u,i=(u=function(n){return function(t){return function(u){return e(t)(u)?S.poke(t)(u)(n):r.pure(o.applicativeST)(n)}}},function(){var n=S.new();return Q(o.monadST)(u)(n)(t)()});return n.runST(i)}},on=function(n){return un(function(r){return l.const(n(r))})},cn=function(n){return un(l.const(n))},fn=function(n){return new c.Eq(function(r){return function(e){return U(n)(r)(e)&&U(n)(e)(r)}})},an=function(n){return new j.Ord(function(){return fn(n.Eq0())},function(r){return function(e){return j.compare(j.ordArray(q.ordTuple(j.ordString)(n)))(O(r))(O(e))}})},ln=new c.Eq1(function(n){return c.eq(fn(n))}),dn=function(n){return I(S.delete(n))},pn=function(n){return function(r){return p.mapFlipped(b.functorMaybe)(C(n)(r))(function(e){return new q.Tuple(e,dn(n)(r))})}},sn=function(n){return function(r){return function(e){var t=n(C(r)(e));if(t instanceof b.Nothing)return dn(r)(e);if(t instanceof b.Just)return z(r)(t.value0)(e);throw new Error("Failed pattern match at Foreign.Object (line 208, column 15 - line 210, column 25): "+[t.constructor.name])}}},bn=function(n){return function(r){return function(e){return sn(b.maybe(b.Nothing.value)(n))(r)(e)}}};module.exports={isEmpty:E,singleton:k,insert:z,lookup:C,toUnfoldable:W,toAscUnfoldable:A,fromFoldable:G,fromFoldableWith:H,fromHomogeneous:J,delete:dn,pop:pn,member:K,alter:sn,update:bn,mapWithKey:M,filterWithKey:un,filterKeys:on,filter:cn,values:F,union:X,unions:Y,isSubmap:U,fold:Z,foldMap:$,foldM:Q,foldMaybe:P,thawST:D,freezeST:L,functorObject:N,functorWithIndexObject:B,foldableObject:nn,foldableWithIndexObject:rn,traversableObject:tn,traversableWithIndexObject:en,eqObject:fn,eq1Object:ln,ordObject:an,showObject:_,semigroupObject:R,monoidObject:V,empty:n.empty,size:n.size,keys:n.keys,all:n.all,runST:n.runST,toArrayWithKey:n.toArrayWithKey}; -},{"./foreign.js":"cO3i","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad.ST.Internal/index.js":"Sedc","../Data.Array/index.js":"4t4C","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Function.Uncurried/index.js":"TowT","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Foreign.Object.ST/index.js":"fXGJ","../Unsafe.Coerce/index.js":"ETUV"}],"hJ/N":[function(require,module,exports) { -"use strict";exports.copyRecord=function(n){var r={};for(var e in n)({}).hasOwnProperty.call(n,e)&&(r[e]=n[e]);return r},exports.unsafeInsert=function(n){return function(r){return function(e){return e[n]=r,e}}},exports.unsafeModify=function(n){return function(r){return function(e){return e[n]=r(e[n]),e}}},exports.unsafeDelete=function(n){return function(r){return delete r[n],r}},exports.unsafeRename=function(n){return function(r){return function(e){return e[r]=e[n],delete e[n],e}}}; -},{}],"VeY4":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Control.Category/index.js"),e=require("../Control.Semigroupoid/index.js"),u=require("../Data.Symbol/index.js"),t=require("../Record.Unsafe.Union/index.js"),o=require("../Unsafe.Coerce/index.js"),i=function(n){return n},f=function(n){return function(n){return function(r){return t.unsafeUnionFn(r,n)}}},c=e.semigroupoidFn,s=function(r){return function(e){return function(t){return function(t){return function(t){return function(t){return function(t){return function(o){return function(i){return n.unsafeRename(u.reflectSymbol(r)(t))(u.reflectSymbol(e)(o))(i)}}}}}}}}},l=function(n){return o.unsafeCoerce},a=function(r){return function(r){return function(r){return function(e){return function(t){return function(o){return n.unsafeModify(u.reflectSymbol(r)(e))(t)(o)}}}}}},d=function(n){return function(n){return function(n){return function(r){return t.unsafeUnionFn(r,n)}}}},m=function(r){return function(r){return function(r){return function(e){return function(t){return function(o){return n.unsafeInsert(u.reflectSymbol(r)(e))(t)(o)}}}}}},y=function(n){return function(n){return function(n){return function(r){return t.unsafeUnionFn(n,r)}}}},b=function(r){return function(e){return function(e){return function(e){return function(t){return n.unsafeDelete(u.reflectSymbol(r)(e))(t)}}}}},g=r.categoryFn,j=function(r){return function(e){return r(n.copyRecord(e))}};module.exports={build:j,insert:m,modify:a,delete:b,rename:s,merge:d,union:f,disjointUnion:y,nub:l,semigroupoidBuilder:c,categoryBuilder:g}; -},{"./foreign.js":"hJ/N","../Control.Category/index.js":"IAi2","../Control.Semigroupoid/index.js":"/riR","../Data.Symbol/index.js":"4oJQ","../Record.Unsafe.Union/index.js":"WmUk","../Unsafe.Coerce/index.js":"ETUV"}],"ZOFT":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),e=require("../Control.Bind/index.js"),u=require("../Control.Monad/index.js"),t=require("../Data.BooleanAlgebra/index.js"),o=require("../Data.Bounded/index.js"),i=require("../Data.CommutativeRing/index.js"),a=require("../Data.Eq/index.js"),c=require("../Data.Functor/index.js"),f=require("../Data.HeytingAlgebra/index.js"),l=require("../Data.Ord/index.js"),v=require("../Data.Ordering/index.js"),x=require("../Data.Ring/index.js"),d=require("../Data.Semigroup/index.js"),y=require("../Data.Semiring/index.js"),g=require("../Data.Show/index.js"),w=function(){function n(){}return n.value=new n,n}(),P=function(){function n(){}return n.value=new n,n}(),s=function(){function n(){}return n.value=new n,n}(),m=new g.Show(function(n){return"Proxy3"}),b=new g.Show(function(n){return"Proxy2"}),q=new g.Show(function(n){return"Proxy"}),p=new y.Semiring(function(n){return function(n){return w.value}},function(n){return function(n){return w.value}},w.value,w.value),A=new y.Semiring(function(n){return function(n){return P.value}},function(n){return function(n){return P.value}},P.value,P.value),j=new y.Semiring(function(n){return function(n){return s.value}},function(n){return function(n){return s.value}},s.value,s.value),D=new d.Semigroup(function(n){return function(n){return w.value}}),S=new d.Semigroup(function(n){return function(n){return P.value}}),R=new d.Semigroup(function(n){return function(n){return s.value}}),h=new x.Ring(function(){return p},function(n){return function(n){return w.value}}),B=new x.Ring(function(){return A},function(n){return function(n){return P.value}}),C=new x.Ring(function(){return j},function(n){return function(n){return s.value}}),E=new f.HeytingAlgebra(function(n){return function(n){return w.value}},function(n){return function(n){return w.value}},w.value,function(n){return function(n){return w.value}},function(n){return w.value},w.value),O=new f.HeytingAlgebra(function(n){return function(n){return P.value}},function(n){return function(n){return P.value}},P.value,function(n){return function(n){return P.value}},function(n){return P.value},P.value),H=new f.HeytingAlgebra(function(n){return function(n){return s.value}},function(n){return function(n){return s.value}},s.value,function(n){return function(n){return s.value}},function(n){return s.value},s.value),Q=new c.Functor(function(n){return function(n){return s.value}}),F=new a.Eq(function(n){return function(n){return!0}}),M=new l.Ord(function(){return F},function(n){return function(n){return v.EQ.value}}),k=new a.Eq(function(n){return function(n){return!0}}),z=new l.Ord(function(){return k},function(n){return function(n){return v.EQ.value}}),G=new a.Eq(function(n){return function(n){return!0}}),I=new l.Ord(function(){return G},function(n){return function(n){return v.EQ.value}}),J=new e.Discard(function(n){return e.bind(n)}),K=new e.Discard(function(n){return e.bind(n)}),L=new e.Discard(function(n){return e.bind(n)}),N=new i.CommutativeRing(function(){return h}),T=new i.CommutativeRing(function(){return B}),U=new i.CommutativeRing(function(){return C}),V=new o.Bounded(function(){return M},w.value,w.value),W=new o.Bounded(function(){return z},P.value,P.value),X=new o.Bounded(function(){return I},s.value,s.value),Y=new t.BooleanAlgebra(function(){return E}),Z=new t.BooleanAlgebra(function(){return O}),$=new t.BooleanAlgebra(function(){return H}),_=new r.Apply(function(){return Q},function(n){return function(n){return s.value}}),nn=new e.Bind(function(){return _},function(n){return function(n){return s.value}}),rn=new n.Applicative(function(){return _},function(n){return s.value}),en=new u.Monad(function(){return rn},function(){return nn});module.exports={Proxy:s,Proxy2:P,Proxy3:w,eqProxy:G,functorProxy:Q,ordProxy:I,applicativeProxy:rn,applyProxy:_,bindProxy:nn,booleanAlgebraProxy:$,boundedProxy:X,commutativeRingProxy:U,discardProxy:L,heytingAlgebraProxy:H,monadProxy:en,ringProxy:C,semigroupProxy:R,semiringProxy:j,showProxy:q,eqProxy2:k,ordProxy2:z,booleanAlgebraProxy2:Z,boundedProxy2:W,commutativeRingProxy2:T,discardProxy2:K,heytingAlgebraProxy2:O,ringProxy2:B,semigroupProxy2:S,semiringProxy2:A,showProxy2:b,eqProxy3:F,ordProxy3:M,booleanAlgebraProxy3:Y,boundedProxy3:V,commutativeRingProxy3:N,discardProxy3:J,heytingAlgebraProxy3:E,ringProxy3:h,semigroupProxy3:D,semiringProxy3:p,showProxy3:m}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad/index.js":"U/Ix","../Data.BooleanAlgebra/index.js":"e7y+","../Data.Bounded/index.js":"kcUU","../Data.CommutativeRing/index.js":"60TQ","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.HeytingAlgebra/index.js":"paZe","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Ring/index.js":"E2qH","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7"}],"aDiV":[function(require,module,exports) { -"use strict";var n=require("../Control.Alt/index.js"),e=require("../Control.Applicative/index.js"),t=require("../Control.Bind/index.js"),r=require("../Control.Category/index.js"),i=require("../Control.Monad.Except/index.js"),o=require("../Control.Monad.Except.Trans/index.js"),u=require("../Control.Semigroupoid/index.js"),c=require("../Data.Array/index.js"),d=require("../Data.Bifunctor/index.js"),a=require("../Data.Either/index.js"),s=require("../Data.Foldable/index.js"),f=require("../Data.Function/index.js"),p=require("../Data.Functor/index.js"),l=require("../Data.Generic.Rep/index.js"),m=require("../Data.Identity/index.js"),g=require("../Data.List/index.js"),E=require("../Data.List.Types/index.js"),x=require("../Data.Maybe/index.js"),y=require("../Data.Monoid/index.js"),w=require("../Data.Newtype/index.js"),v=require("../Data.Semigroup/index.js"),T=require("../Data.Show/index.js"),b=require("../Data.Symbol/index.js"),h=require("../Data.Traversable/index.js"),I=require("../Data.Unfoldable/index.js"),A=require("../Data.Unit/index.js"),F=require("../Data.Void/index.js"),D=require("../Foreign/index.js"),j=require("../Foreign.Generic.Internal/index.js"),q=require("../Foreign.Index/index.js"),S=require("../Foreign.NullOrUndefined/index.js"),N=require("../Foreign.Object/index.js"),O=require("../Record/index.js"),R=require("../Record.Builder/index.js"),C=require("../Type.Data.RowList/index.js"),L=require("../Type.Proxy/index.js"),P=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),W=function(n){this.encodeArgs=n},G=function(n){this.encodeOpts=n},U=function(n){this.decodeArgs=n},B=function(n){this.decodeOpts=n},K=function(n){this.countArgs=n},M=function(n){this.encodeWithOptions=n},J=function(n){this.encodeRecordWithOptions=n},z=function(n){this.encode=n},V=function(n){this.decodeWithOptions=n},k=function(n){this.decodeRecordWithOptions=n},H=function(n){this.decode=n},Q=new z(F.absurd),X=new H(function(n){return o.except(m.applicativeIdentity)(new a.Left(e.pure(E.applicativeNonEmptyList)(new D.ForeignError("Decode: void"))))}),Y=new z(function(n){return D.unsafeToForeign({})}),Z=new H(function(n){return e.pure(o.applicativeExceptT(m.monadIdentity))(A.unit)}),$=new z(D.unsafeToForeign),_=new H(D.readString),nn=new z(D.unsafeToForeign),en=new H(D.readNumber),tn=new z(D.unsafeToForeign),rn=new H(D.readInt),on=new W(function(n){return y.mempty(y.monoidFn(E.monoidList))}),un=new B(function(n){return function(n){return D.fail(new D.ForeignError("No constructors"))}}),cn=new U(function(n){return function(n){return function(t){return t instanceof E.Nil?e.pure(o.applicativeExceptT(m.monadIdentity))({result:l.NoArguments.value,rest:E.Nil.value,next:n}):D.fail(new D.ForeignError("Too many constructor arguments"))}}}),dn=new K(function(n){return new a.Left(l.NoArguments.value)}),an=new K(function(n){return new a.Right(1)}),sn=new z(r.identity(r.categoryFn)),fn=new H(e.pure(o.applicativeExceptT(m.monadIdentity))),pn=function(n){return n.encodeWithOptions},ln=function(n){return new W(function(e){return function(t){return g.singleton(pn(n)(e)(t))}})},mn=function(n){return n.encodeRecordWithOptions},gn=function(n){return function(n){return new M(function(e){var t=mn(n)(C.RLProxy.value)(e);return function(n){return D.unsafeToForeign(t(n))}})}},En=new J(function(n){return function(n){return function(n){return N.empty}}}),xn=function(n){return function(e){return function(t){return function(r){return new J(function(i){return function(i){return function(o){var u=mn(e)(C.RLProxy.value)(i)(o),c=b.reflectSymbol(t)(b.SProxy.value);return N.insert(i.fieldTransform(c))(pn(r)(i)(O.get(t)(n)(b.SProxy.value)(o)))(u)}}})}}}},yn=function(n){return n.encodeOpts},wn=new G(function(n){return function(e){return yn(wn)(n)(e)}}),vn=function(n){return function(e){return new G(function(t){return function(r){if(r instanceof l.Inl)return yn(n)({sumEncoding:t.sumEncoding,unwrapSingleConstructors:!1,unwrapSingleArguments:t.unwrapSingleArguments,fieldTransform:t.fieldTransform})(r.value0);if(r instanceof l.Inr)return yn(e)({sumEncoding:t.sumEncoding,unwrapSingleConstructors:!1,unwrapSingleArguments:t.unwrapSingleArguments,fieldTransform:t.fieldTransform})(r.value0);throw new Error("Failed pattern match at Foreign.Generic.Class (line 351, column 1 - line 355, column 85): "+[t.constructor.name,r.constructor.name])}})}},Tn=function(n){return n.encodeArgs},bn=function(n){return function(e){return new W(function(t){return function(r){return v.append(E.semigroupList)(Tn(n)(t)(r.value0))(Tn(e)(t)(r.value1))}})}},hn=function(n){return function(e){return new G(function(t){return function(r){var i,o,u=(i=g.toUnfoldable(I.unfoldableArray),o=Tn(e)(t),function(n){return 0===(e=i(o(n))).length?x.Nothing.value:1===e.length&&t.unwrapSingleArguments?new x.Just(e[0]):new x.Just(D.unsafeToForeign(e));var e}),c=b.reflectSymbol(n)(b.SProxy.value);return t.unwrapSingleConstructors?x.maybe(D.unsafeToForeign({}))(D.unsafeToForeign)(u(r)):D.unsafeToForeign(N.union(N.singleton(t.sumEncoding.value0.tagFieldName)(D.unsafeToForeign(t.sumEncoding.value0.constructorTagTransform(c))))(x.maybe(N.empty)(N.singleton(t.sumEncoding.value0.contentsFieldName))(u(r))))}})}},In=function(n){return n.encode},An=function(n){return new M(function(e){return In(n)})},Fn=function(n){return new z((e=In(n),t=w.unwrap(m.newtypeIdentity),function(n){return e(t(n))}));var e,t},Dn=function(n){return new z(x.maybe(S.null)(In(n)))},jn=function(n){return new z((e=N.mapWithKey(function(e){return In(n)}),function(n){return D.unsafeToForeign(e(n))}));var e},qn={sumEncoding:new P({tagFieldName:"tag",contentsFieldName:"contents",constructorTagTransform:r.identity(r.categoryFn)}),unwrapSingleConstructors:!1,unwrapSingleArguments:!0,fieldTransform:r.identity(r.categoryFn)},Sn=function(n){return function(e){return new z(pn(gn(n)(e))(qn))}},Nn=function(n){return n.decodeWithOptions},On=function(n){return new U(function(r){return function(u){return function(c){return c instanceof E.Cons?t.bind(o.bindExceptT(m.monadIdentity))(i.mapExcept(d.lmap(a.bifunctorEither)(p.map(E.functorNonEmptyList)(D.ErrorAtIndex.create(u))))(Nn(n)(r)(c.value0)))(function(n){return e.pure(o.applicativeExceptT(m.monadIdentity))({result:n,rest:c.value1,next:u+1|0})}):D.fail(new D.ForeignError("Not enough constructor arguments"))}}})},Rn=function(n){return n.decodeRecordWithOptions},Cn=function(n){return function(n){return new V(function(e){return p.map(p.functorFn)(p.map(o.functorExceptT(m.functorIdentity))(f.flip(R.build)({})))(Rn(n)(C.RLProxy.value)(e))})}},Ln=function(n){return function(e){return new H(Nn(Cn(n)(e))(qn))}},Pn=new k(function(n){return function(n){return function(n){return e.pure(o.applicativeExceptT(m.monadIdentity))(r.identity(R.categoryBuilder))}}}),Wn=function(n){return function(r){return function(c){return function(s){return function(f){return new k(function(l){return function(l){return function(g){return t.bind(o.bindExceptT(m.monadIdentity))(Rn(r)(C.RLProxy.value)(l)(g))(function(r){var x=b.reflectSymbol(c)(b.SProxy.value),y=l.fieldTransform(x);return t.bind(o.bindExceptT(m.monadIdentity))(q.index(q.indexString)(g)(y))(function(g){return t.bind(o.bindExceptT(m.monadIdentity))(i.mapExcept(d.lmap(a.bifunctorEither)(p.map(E.functorNonEmptyList)(D.ErrorAtProperty.create(y))))(Nn(s)(l)(g)))(function(t){return e.pure(o.applicativeExceptT(m.monadIdentity))(u.composeFlipped(R.semigroupoidBuilder)(r)(R.insert(n)(f)(c)(b.SProxy.value)(t)))})})})}}})}}}}},Gn=function(n){return n.decodeOpts},Un=function(e){return function(t){return new B(function(r){return function(i){var u={unwrapSingleConstructors:!1,fieldTransform:r.fieldTransform,sumEncoding:r.sumEncoding,unwrapSingleArguments:r.unwrapSingleArguments};return n.alt(o.altExceptT(E.semigroupNonEmptyList)(m.monadIdentity))(p.map(o.functorExceptT(m.functorIdentity))(l.Inl.create)(Gn(e)(u)(i)))(p.map(o.functorExceptT(m.functorIdentity))(l.Inr.create)(Gn(t)(u)(i)))}})}},Bn=function(n){return n.decodeArgs},Kn=function(n){return function(r){return new U(function(i){return function(u){return function(c){return t.bind(o.bindExceptT(m.monadIdentity))(Bn(n)(i)(u)(c))(function(n){return t.bind(o.bindExceptT(m.monadIdentity))(Bn(r)(i)(n.next)(n.rest))(function(t){return e.pure(o.applicativeExceptT(m.monadIdentity))({result:new l.Product(n.result,t.result),rest:t.rest,next:t.next})})})}}})}},Mn=function(n){return n.decode},Jn=function(n){return new V(function(e){return Mn(n)})},zn=function(n){return new H((e=p.map(o.functorExceptT(m.functorIdentity))(m.Identity),t=Mn(n),function(n){return e(t(n))}));var e,t},Vn=function(n){return new H(S.readNullOrUndefined(Mn(n)))},kn=function(n){return new H(t.composeKleisliFlipped(o.bindExceptT(m.monadIdentity))((e=h.sequence(N.traversableObject)(o.applicativeExceptT(m.monadIdentity)),r=N.mapWithKey(function(e){return Mn(n)}),function(n){return e(r(n))}))(j.readObject));var e,r},Hn=function(n){return n.countArgs},Qn=function(n){return function(e){return new K(function(t){var r=Hn(e)(L.Proxy.value),i=Hn(n)(L.Proxy.value);if(i instanceof a.Left&&r instanceof a.Left)return new a.Left(new l.Product(i.value0,r.value0));if(i instanceof a.Left&&r instanceof a.Right)return new a.Right(r.value0);if(i instanceof a.Right&&r instanceof a.Left)return new a.Right(i.value0);if(i instanceof a.Right&&r instanceof a.Right)return new a.Right(i.value0+r.value0|0);throw new Error("Failed pattern match at Foreign.Generic.Class (line 400, column 5 - line 404, column 40): "+[i.constructor.name,r.constructor.name])})}},Xn=function(n){return function(r){return function(u){return new B(function(c){return function(f){var x=Hn(u)(L.Proxy.value),y=function(n){if(x instanceof a.Left)return e.pure(o.applicativeExceptT(m.monadIdentity))(x.value0);if(x instanceof a.Right&&1===x.value0&&c.unwrapSingleArguments)return t.bind(o.bindExceptT(m.monadIdentity))(Bn(r)(c)(0)(g.singleton(n)))(function(n){return t.discard(t.discardUnit)(o.bindExceptT(m.monadIdentity))(e.unless(o.applicativeExceptT(m.monadIdentity))(g.null(n.rest))(D.fail(new D.ForeignError("Expected a single argument"))))(function(){return e.pure(o.applicativeExceptT(m.monadIdentity))(n.result)})});if(x instanceof a.Right)return t.bind(o.bindExceptT(m.monadIdentity))(D.readArray(n))(function(n){return t.bind(o.bindExceptT(m.monadIdentity))(Bn(r)(c)(0)(g.fromFoldable(s.foldableArray)(n)))(function(n){return t.discard(t.discardUnit)(o.bindExceptT(m.monadIdentity))(e.unless(o.applicativeExceptT(m.monadIdentity))(g.null(n.rest))(D.fail(new D.ForeignError("Expected "+T.show(T.showInt)(x.value0)+" constructor arguments"))))(function(){return e.pure(o.applicativeExceptT(m.monadIdentity))(n.result)})})});throw new Error("Failed pattern match at Foreign.Generic.Class (line 307, column 9 - line 319, column 24): "+[x.constructor.name])},w=b.reflectSymbol(n)(b.SProxy.value);return c.unwrapSingleConstructors?p.map(o.functorExceptT(m.functorIdentity))(l.Constructor)(y(f)):t.bind(o.bindExceptT(m.monadIdentity))(i.mapExcept(d.lmap(a.bifunctorEither)(p.map(E.functorNonEmptyList)(D.ErrorAtProperty.create(c.sumEncoding.value0.tagFieldName))))(t.bind(o.bindExceptT(m.monadIdentity))(t.bind(o.bindExceptT(m.monadIdentity))(q.index(q.indexString)(f)(c.sumEncoding.value0.tagFieldName))(D.readString))(function(n){var r=c.sumEncoding.value0.constructorTagTransform(w);return t.discard(t.discardUnit)(o.bindExceptT(m.monadIdentity))(e.unless(o.applicativeExceptT(m.monadIdentity))(n===r)(D.fail(new D.ForeignError("Expected "+T.show(T.showString)(r)+" tag"))))(function(){return e.pure(o.applicativeExceptT(m.monadIdentity))(n)})})))(function(n){return t.bind(o.bindExceptT(m.monadIdentity))(i.mapExcept(d.lmap(a.bifunctorEither)(p.map(E.functorNonEmptyList)(D.ErrorAtProperty.create(c.sumEncoding.value0.contentsFieldName))))(t.bind(o.bindExceptT(m.monadIdentity))(q.index(q.indexString)(f)(c.sumEncoding.value0.contentsFieldName))(y)))(function(n){return e.pure(o.applicativeExceptT(m.monadIdentity))(n)})})}})}}},Yn=new z(D.unsafeToForeign),Zn=new H(D.readChar),$n=new z(D.unsafeToForeign),_n=new H(D.readBoolean),ne=function(n){return new z((e=p.map(p.functorArray)(In(n)),function(n){return D.unsafeToForeign(e(n))}));var e},ee=function(n){return new H((e=function(e){return function(t){return i.mapExcept(d.lmap(a.bifunctorEither)(p.map(E.functorNonEmptyList)(D.ErrorAtIndex.create(e))))(Mn(n)(t))}},t.composeKleisli(o.bindExceptT(m.monadIdentity))(D.readArray)(function(n){return h.sequence(h.traversableArray)(o.applicativeExceptT(m.monadIdentity))(c.zipWith(e)(c.range(0)(c.length(n)))(n))})));var e};module.exports={countArgs:Hn,decode:Mn,decodeArgs:Bn,decodeOpts:Gn,decodeRecordWithOptions:Rn,decodeWithOptions:Nn,encode:In,encodeArgs:Tn,encodeOpts:yn,encodeRecordWithOptions:mn,encodeWithOptions:pn,TaggedObject:P,defaultOptions:qn,Decode:H,Encode:z,DecodeWithOptions:V,EncodeWithOptions:M,DecodeRecord:k,EncodeRecord:J,GenericDecode:B,GenericEncode:G,GenericDecodeArgs:U,GenericEncodeArgs:W,GenericCountArgs:K,voidDecode:X,unitDecode:Z,foreignDecode:fn,stringDecode:_,charDecode:Zn,booleanDecode:_n,numberDecode:en,intDecode:rn,identityDecode:zn,arrayDecode:ee,maybeDecode:Vn,objectDecode:kn,recordDecode:Ln,voidEncode:Q,unitEncode:Y,foreignEncode:sn,stringEncode:$,charEncode:Yn,booleanEncode:$n,numberEncode:nn,intEncode:tn,identityEncode:Fn,arrayEncode:ne,maybeEncode:Dn,objectEncode:jn,recordEncode:Sn,decodeWithOptionsRecord:Cn,decodeWithOptionsOther:Jn,encodeWithOptionsRecord:gn,encodeWithOptionsOther:An,decodeRecordNil:Pn,encodeRecordNil:En,decodeRecordCons:Wn,encodeRecordCons:xn,genericDecodeNoConstructors:un,genericEncodeNoConstructors:wn,genericDecodeConstructor:Xn,genericEncodeConstructor:hn,genericDecodeSum:Un,genericEncodeSum:vn,genericDecodeArgsNoArguments:cn,genericEncodeArgsNoArguments:on,genericDecodeArgsArgument:On,genericEncodeArgsArgument:ln,genericDecodeArgsProduct:Kn,genericEncodeArgsProduct:bn,genericCountArgsNoArguments:dn,genericCountArgsArgument:an,genericCountArgsProduct:Qn}; -},{"../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad.Except/index.js":"Fye2","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Semigroupoid/index.js":"/riR","../Data.Array/index.js":"4t4C","../Data.Bifunctor/index.js":"e2Wc","../Data.Either/index.js":"B2JL","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Generic.Rep/index.js":"AuzG","../Data.Identity/index.js":"2OKT","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Symbol/index.js":"4oJQ","../Data.Traversable/index.js":"n7EE","../Data.Unfoldable/index.js":"77+Z","../Data.Unit/index.js":"NhVk","../Data.Void/index.js":"bncE","../Foreign/index.js":"pu1p","../Foreign.Generic.Internal/index.js":"71qG","../Foreign.Index/index.js":"Ryy1","../Foreign.NullOrUndefined/index.js":"k5yP","../Foreign.Object/index.js":"jsiz","../Record/index.js":"0gG4","../Record.Builder/index.js":"VeY4","../Type.Data.RowList/index.js":"XaXP","../Type.Proxy/index.js":"ZOFT"}],"HhmG":[function(require,module,exports) { -"use strict";var e=require("../Data.CommutativeRing/index.js"),n=require("../Data.DivisionRing/index.js"),r=require("../Data.Eq/index.js"),t=require("../Data.EuclideanRing/index.js"),i=require("../Data.Lens.Getter/index.js"),u=require("../Data.Lens.Iso/index.js"),o=require("../Data.Lens.Iso.Newtype/index.js"),a=require("../Data.Maybe/index.js"),c=require("../Data.Newtype/index.js"),d=require("../Data.Number.Format/index.js"),s=require("../Data.Ord/index.js"),p=require("../Data.Ring/index.js"),w=require("../Data.Semiring/index.js"),f=require("../Data.Show/index.js"),g=require("../Data.String.CodeUnits/index.js"),m=require("../Data.String.Common/index.js"),h=require("../Data.String.Pattern/index.js"),x=require("../Foreign.Generic.Class/index.js"),q=require("../Math/index.js"),l=function(e){return e},D=function(e){return e},N=function(e){return e},j=new f.Show(function(e){return e}),B=new f.Show(function(e){return d.toStringWith(d.fixed(0))(e)+" Bp"}),y=w.semiringNumber,v=p.ringNumber,C=s.ordNumber,I=new c.Newtype(function(e){return e},l),S=new c.Newtype(function(e){return e},D),b=function(e){var n=m.toLower(c.unwrap(S)(e)),r=g.stripPrefix(c.wrap(h.newtypePattern)("chr"))(n);if(r instanceof a.Nothing)return c.wrap(S)("chr"+n);if(r instanceof a.Just)return c.wrap(S)(r.value0);throw new Error("Failed pattern match at Genetics.Browser.Types (line 54, column 6 - line 56, column 27): "+[r.constructor.name])},R=new c.Newtype(function(e){return e},N),L=t.euclideanRingNumber,_=new r.Eq(function(e){return function(n){return b(e)===b(n)}}),E=new s.Ord(function(){return _},function(e){return function(n){var r=b(e),t=b(n);return s.compare(s.ordString)(r)(t)}}),P=r.eqNumber,F=x.stringEncode,G=x.numberEncode,W=n.divisionringNumber,J=x.stringDecode,M=x.numberDecode,O=e.commutativeRingNumber,T=function(e){var n=m.toLower(e),r=g.stripPrefix(c.wrap(h.newtypePattern)("chr"))(n);if(r instanceof a.Nothing)return c.wrap(S)("chr"+n);if(r instanceof a.Just)return c.wrap(S)(r.value0);throw new Error("Failed pattern match at Genetics.Browser.Types (line 47, column 6 - line 49, column 28): "+[r.constructor.name])},U=function(e){return i.to(d.toStringWith(d.precision(e)))},k=function(e){return i.to(d.toStringWith(d.fixed(e)))},z=function(e){return i.to(d.toStringWith(d.exponential(e)))},A=function(e){return u.iso(function(e){return c.wrap(I)(-q.log(e)/q.ln10)})(function(e){return q.pow(10)(-e)})(e)},H=function(e){return o._Newtype(S)(S)(e)},K=function(e){return o._Newtype(R)(R)(e)};module.exports={Bp:N,_Bp:K,ChrId:D,chrId:T,validChrId:b,_ChrId:H,NegLog10:l,_NegLog10:A,_prec:U,_fixed:k,_exp:z,newtypeBp:R,eqBp:P,ordBp:C,semiringBp:y,ringBp:v,divisionRingBp:W,euclideanRingBp:L,commutativeRingBp:O,encodeBp:G,decodeBp:M,showBp:B,newtypeChrId:S,eqChrId:_,ordChrId:E,encodeChrId:F,decodeChrId:J,showChrId:j,newtypeNegLog10:I}; -},{"../Data.CommutativeRing/index.js":"60TQ","../Data.DivisionRing/index.js":"xYq2","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Lens.Getter/index.js":"OPOX","../Data.Lens.Iso/index.js":"fFCp","../Data.Lens.Iso.Newtype/index.js":"CiFJ","../Data.Maybe/index.js":"5mN7","../Data.Newtype/index.js":"lz8k","../Data.Number.Format/index.js":"VX77","../Data.Ord/index.js":"r4Vb","../Data.Ring/index.js":"E2qH","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.String.CodeUnits/index.js":"6c6X","../Data.String.Common/index.js":"OSrc","../Data.String.Pattern/index.js":"nKWe","../Foreign.Generic.Class/index.js":"aDiV","../Math/index.js":"Rpaz"}],"BQGe":[function(require,module,exports) { -exports._parseJSON=JSON.parse,exports._undefined=void 0; -},{}],"DqNI":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),n=require("../Control.Alt/index.js"),r=require("../Control.Applicative/index.js"),t=require("../Control.Apply/index.js"),i=require("../Control.Bind/index.js"),u=require("../Control.Category/index.js"),o=require("../Control.Monad.Except/index.js"),a=require("../Control.Monad.Except.Trans/index.js"),c=require("../Control.Semigroupoid/index.js"),f=require("../Data.Bifunctor/index.js"),d=require("../Data.Boolean/index.js"),l=require("../Data.Either/index.js"),p=require("../Data.Function/index.js"),s=require("../Data.Functor/index.js"),m=require("../Data.Identity/index.js"),y=require("../Data.List.Types/index.js"),x=require("../Data.Maybe/index.js"),w=require("../Data.Nullable/index.js"),g=require("../Data.Semigroup/index.js"),F=require("../Data.Symbol/index.js"),v=require("../Data.Traversable/index.js"),b=require("../Data.TraversableWithIndex/index.js"),E=require("../Data.Variant/index.js"),I=require("../Effect.Exception/index.js"),T=require("../Effect.Uncurried/index.js"),h=require("../Effect.Unsafe/index.js"),j=require("../Foreign/index.js"),q=require("../Foreign.Index/index.js"),S=require("../Foreign.Object/index.js"),N=require("../Global.Unsafe/index.js"),L=require("../Partial.Unsafe/index.js"),P=require("../Record/index.js"),R=require("../Record.Builder/index.js"),D=require("../Type.Data.RowList/index.js"),O=function(e){this.writeVariantImpl=e},V=function(e){this.writeImplFields=e},C=function(e){this.writeImpl=e},W=function(e){this.readVariantImpl=e},A=function(e){this.getFields=e},B=function(e){this.readImpl=e},M=function(e){return e.writeVariantImpl},J=function(e){return e.writeImplFields},K=function(e){return e.writeImpl},U=function(e){var n=K(e);return function(e){return N.unsafeStringify(n(e))}},_=function(e){return function(e){return new C(function(n){return M(e)(D.RLProxy.value)(n)})}},G=new C(j.unsafeToForeign),k=function(e){return new C((n=S.mapWithKey(p.const(K(e))),function(e){return j.unsafeToForeign(n(e))}));var n},z=new C(j.unsafeToForeign),H=function(e){return new C((n=x.maybe(j.unsafeToForeign(w.toNullable(x.Nothing.value)))(K(e)),function(e){return n(w.toMaybe(e))}));var n},Q=new C(j.unsafeToForeign),X=new C(u.identity(u.categoryFn)),Y=new C(j.unsafeToForeign),Z=new C(j.unsafeToForeign),$=function(e){return new C(function(n){return j.unsafeToForeign(s.map(s.functorArray)(K(e))(n))})},ee=function(e){return K(e)},ne=e._undefined,re=function(e){return new C(x.maybe(ne)(K(e)))},te=function(e){return function(e){return new C(function(n){var r=J(e)(D.RLProxy.value)(n);return j.unsafeToForeign(R.build(r)({}))})}},ie=new W(function(e){return function(e){return j.fail(new j.ForeignError("Unable to match any variant member."))}}),ue=function(e){return e.readVariantImpl},oe=new B(j.readString),ae=new B(j.readNumber),ce=new B(j.readInt),fe=function(e){return e.readImpl},de=function(e){return new B((n=fe(e),function(e){return j.isNull(e)||j.isUndefined(e)?r.pure(a.applicativeExceptT(m.monadIdentity))(x.Nothing.value):s.map(a.functorExceptT(m.functorIdentity))(x.Just.create)(n(e))}));var n},le=function(e){return new B(function(n){return o.withExcept(s.map(y.functorNonEmptyList)(function(e){return e instanceof j.TypeMismatch?new j.TypeMismatch("Nullable "+e.value0,e.value1):e}))(i.bindFlipped(a.bindExceptT(m.monadIdentity))(s.map(s.functorFn)(s.map(a.functorExceptT(m.functorIdentity))(w.toNullable))(v.traverse(v.traversableMaybe)(a.applicativeExceptT(m.monadIdentity))(fe(e))))(j.readNull(n)))})},pe=function(e){return new B(i.composeKleisliFlipped(a.bindExceptT(m.monadIdentity))((n=v.sequence(S.traversableObject)(a.applicativeExceptT(m.monadIdentity)),t=S.mapWithKey(p.const(fe(e))),function(e){return n(t(e))}))(function(e){if("Object"===j.tagOf(e))return r.pure(a.applicativeExceptT(m.monadIdentity))(j.unsafeFromForeign(e));if(d.otherwise)return j.fail(new j.TypeMismatch("Object",j.tagOf(e)));throw new Error("Failed pattern match at Simple.JSON (line 188, column 7 - line 188, column 51): "+[e.constructor.name])}));var n,t},se=function(e){return function(e){return new B(function(n){return ue(e)(D.RLProxy.value)(n)})}},me=new B(r.pure(a.applicativeExceptT(m.monadIdentity))),ye=new A(function(e){return function(e){return r.pure(a.applicativeExceptT(m.monadIdentity))(u.identity(R.categoryBuilder))}}),xe=new B(j.readChar),we=new B(j.readBoolean),ge=function(e){return new B(i.composeKleisliFlipped(a.bindExceptT(m.monadIdentity))(b.traverseWithIndex(b.traversableWithIndexArray)(a.applicativeExceptT(m.monadIdentity))(function(n){return function(r){return o.withExcept(s.map(y.functorNonEmptyList)(j.ErrorAtIndex.create(n)))(fe(e)(r))}}))(j.readArray))},Fe=function(e){return fe(e)},ve=function(e){var n=fe(e);return function(e){return o.runExcept(n(e))}},be=function(e){var n=ve(e);return function(e){return n(j.unsafeToForeign(e))}},Ee=function(e){var n=ve(e);return function(e){return l.hush(n(e))}},Ie=function(){var n,t=f.lmap(l.bifunctorEither)((n=r.pure(y.applicativeNonEmptyList),function(e){return n(j.ForeignError.create(I.message(e)))})),i=T.runEffectFn1(e._parseJSON);return function(e){return a.ExceptT(m.Identity(t(h.unsafePerformEffect(I.try(i(e))))))}}(),Te=function(e){var n=i.composeKleisliFlipped(a.bindExceptT(m.monadIdentity))(fe(e))(Ie);return function(e){return o.runExcept(n(e))}},he=function(e){var n=Te(e);return function(e){return l.hush(n(e))}},je=function(e){return i.composeKleisliFlipped(a.bindExceptT(m.monadIdentity))(fe(e))(Ie)},qe=new O(function(e){return function(e){return L.unsafeCrashWith("Variant was not able to be writen row WriteForeign.")}}),Se=new V(function(e){return function(e){return u.identity(R.categoryBuilder)}}),Ne=function(e){return e.getFields},Le=function(e){return function(e){return new B(function(n){return s.map(a.functorExceptT(m.functorIdentity))(p.flip(R.build)({}))(Ne(e)(D.RLProxy.value)(n))})}},Pe=function(e){return function(n){return function(r){return function(t){return new O(function(i){return function(i){return E.on(r)(e)(F.SProxy.value)(function(r){return j.unsafeToForeign({type:F.reflectSymbol(e)(F.SProxy.value),value:K(n)(r)})})(M(t)(D.RLProxy.value))(i)}})}}}},Re=function(e){return function(n){return function(r){return function(t){return function(i){return function(u){return new V(function(o){return function(o){var a=J(r)(D.RLProxy.value)(o),f=K(n)(P.get(e)(t)(F.SProxy.value)(o));return c.compose(R.semigroupoidBuilder)(R.insert(u)(i)(e)(F.SProxy.value)(f))(a)}})}}}}}},De=function(e){return function(n){return function(r){if(n instanceof l.Left&&r instanceof l.Right)return new l.Left(n.value0);if(n instanceof l.Left&&r instanceof l.Left)return new l.Left(g.append(e)(n.value0)(r.value0));if(n instanceof l.Right&&r instanceof l.Left)return new l.Left(r.value0);if(n instanceof l.Right&&r instanceof l.Right)return new l.Right(n.value0(r.value0));throw new Error("Failed pattern match at Simple.JSON (line 232, column 1 - line 232, column 90): "+[n.constructor.name,r.constructor.name])}}},Oe=function(e){return function(n){return function(r){return function(i){return a.ExceptT(t.apply(n.Apply0())(s.map(n.Apply0().Functor0())(De(e))(a.runExceptT(r)))(a.runExceptT(i)))}}}},Ve=function(e){return function(n){return function(t){return function(u){return function(f){return new A(function(d){return function(d){var l=Ne(t)(D.RLProxy.value)(d),p=F.reflectSymbol(e)(F.SProxy.value),x=o.withExcept(s.map(y.functorNonEmptyList)(j.ErrorAtProperty.create(p))),w=i.bind(a.bindExceptT(m.monadIdentity))(x(i.bindFlipped(a.bindExceptT(m.monadIdentity))(fe(n))(q.readProp(p)(d))))(function(n){return r.pure(a.applicativeExceptT(m.monadIdentity))(R.insert(f)(u)(e)(F.SProxy.value)(n))});return Oe(y.semigroupNonEmptyList)(m.applicativeIdentity)(s.map(a.functorExceptT(m.functorIdentity))(c.compose(R.semigroupoidBuilder))(w))(l)}})}}}}},Ce=function(e){return function(t){return function(u){return function(o){return new W(function(c){return function(c){var f=F.reflectSymbol(e)(F.SProxy.value);return n.alt(a.altExceptT(y.semigroupNonEmptyList)(m.monadIdentity))(i.bind(a.bindExceptT(m.monadIdentity))(fe(Le()(Ve(new F.IsSymbol(function(){return"type"}))(oe)(Ve(new F.IsSymbol(function(){return"value"}))(me)(ye)()())()()))(c))(function(n){return n.type===f?i.bind(a.bindExceptT(m.monadIdentity))(fe(t)(n.value))(function(n){return r.pure(a.applicativeExceptT(m.monadIdentity))(E.inj(u)(e)(F.SProxy.value)(n))}):j.fail(j.ForeignError.create("Did not match variant tag "+f))}))(ue(o)(D.RLProxy.value)(c))}})}}}};module.exports={readJSON:Te,"readJSON'":je,readJSON_:he,writeJSON:U,write:ee,read:ve,"read'":Fe,read_:Ee,parseJSON:Ie,undefined:ne,ReadForeign:B,readImpl:fe,ReadForeignFields:A,getFields:Ne,ReadForeignVariant:W,readVariantImpl:ue,WriteForeign:C,writeImpl:K,WriteForeignFields:V,writeImplFields:J,WriteForeignVariant:O,writeVariantImpl:M,readForeign:me,readChar:xe,readNumber:ae,readInt:ce,readString:oe,readBoolean:we,readArray:ge,readMaybe:de,readNullable:le,readObject:pe,readRecord:Le,readFieldsCons:Ve,readFieldsNil:ye,readForeignVariant:se,readVariantNil:ie,readVariantCons:Ce,writeForeignForeign:X,writeForeignString:G,writeForeignInt:Q,writeForeignChar:Y,writeForeignNumber:z,writeForeignBoolean:Z,writeForeignArray:$,writeForeignMaybe:re,writeForeignNullable:H,writeForeignObject:k,recordWriteForeign:te,consWriteForeignFields:Re,nilWriteForeignFields:Se,writeForeignVariant:_,nilWriteForeignVariant:qe,consWriteForeignVariant:Pe}; -},{"./foreign.js":"BQGe","../Control.Alt/index.js":"lN+m","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad.Except/index.js":"Fye2","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Semigroupoid/index.js":"/riR","../Data.Bifunctor/index.js":"e2Wc","../Data.Boolean/index.js":"ObQr","../Data.Either/index.js":"B2JL","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.List.Types/index.js":"Xxuc","../Data.Maybe/index.js":"5mN7","../Data.Nullable/index.js":"YQ8o","../Data.Semigroup/index.js":"EsAJ","../Data.Symbol/index.js":"4oJQ","../Data.Traversable/index.js":"n7EE","../Data.TraversableWithIndex/index.js":"V4EF","../Data.Variant/index.js":"hgdh","../Effect.Exception/index.js":"0OCW","../Effect.Uncurried/index.js":"qn3Z","../Effect.Unsafe/index.js":"tPW2","../Foreign/index.js":"pu1p","../Foreign.Index/index.js":"Ryy1","../Foreign.Object/index.js":"jsiz","../Global.Unsafe/index.js":"qSZP","../Partial.Unsafe/index.js":"aoR+","../Record/index.js":"0gG4","../Record.Builder/index.js":"VeY4","../Type.Data.RowList/index.js":"XaXP"}],"X0te":[function(require,module,exports) { -"use strict";var e=require("../Color/index.js"),n=require("../Color.Scheme.Clrs/index.js"),r=require("../Control.Applicative/index.js"),t=require("../Control.Bind/index.js"),i=require("../Control.Monad.Except.Trans/index.js"),a=require("../Control.Monad.State/index.js"),o=require("../Control.Monad.State.Class/index.js"),u=require("../Control.Monad.State.Trans/index.js"),d=require("../Data.Array/index.js"),l=require("../Data.BigInt/index.js"),s=require("../Data.Either/index.js"),c=require("../Data.EuclideanRing/index.js"),f=require("../Data.Foldable/index.js"),p=require("../Data.Function/index.js"),m=require("../Data.Functor/index.js"),g=require("../Data.FunctorWithIndex/index.js"),x=require("../Data.HeytingAlgebra/index.js"),v=require("../Data.Identity/index.js"),w=require("../Data.Int/index.js"),h=require("../Data.Lens.Getter/index.js"),y=require("../Data.List/index.js"),S=require("../Data.List.Types/index.js"),b=require("../Data.Map.Internal/index.js"),j=require("../Data.Maybe/index.js"),q=require("../Data.Monoid/index.js"),D=require("../Data.Newtype/index.js"),C=require("../Data.Number.Format/index.js"),I=require("../Data.Ord/index.js"),L=require("../Data.Pair/index.js"),N=require("../Data.Ring/index.js"),F=require("../Data.Semigroup/index.js"),P=require("../Data.Semiring/index.js"),M=require("../Data.Show/index.js"),T=require("../Data.String.CodePoints/index.js"),A=require("../Data.Symbol/index.js"),B=require("../Data.Traversable/index.js"),k=require("../Data.Tuple/index.js"),O=require("../Data.Variant/index.js"),z=require("../Foreign/index.js"),G=require("../Genetics.Browser.Canvas/index.js"),E=require("../Genetics.Browser.Coordinates/index.js"),R=require("../Genetics.Browser.Layer/index.js"),_=require("../Genetics.Browser.Types/index.js"),W=require("../Graphics.Drawing/index.js"),H=require("../Graphics.Drawing.Font/index.js"),U=require("../Math/index.js"),V=require("../Record/index.js"),J=require("../Simple.JSON/index.js"),K=function(e){return e},X=function(e){return function(n){return function(r){return function(t){return d.nubBy(p.on(I.compare(I.ordString))(function(e){return e.text}))(d.fromFoldable(e)(m.map(n)(r)(t)))}}}},Q=function(e){return function(n){return function(r){return function(t){return function(i){return m.map(b.functorMap)(E.aroundPair(N.ringNumber)(-n.segmentPadding))(E["scaledSegments'"](e)(r)(i)(E.viewScale(t)(i)))}}}}},Y=function(e){return function(n){return function(r){return function(t){return m.map(b.functorMap)(E.aroundPair(N.ringNumber)(-e.segmentPadding))(E.scaledSegments(n)(E.viewScale(r)(t)))}}}},Z=function(e){return function(n){return function(r){return function(t){return function(i){var a=Y(r)(r.coordinateSystem),o=m.map(R.functorComponent)(function(r){return function(i){return r(V.get(e)(n)(t)(i.value0))(a(i.value1)(i.value0.view))(i.value1)}})(i);return new R.Layer(R.Scrolling.value,new R.Masked(5),o)}}}}},$=t.composeKleisliFlipped(i.bindExceptT(v.monadIdentity))(function(n){return i.except(v.applicativeIdentity)(s.note(r.pure(S.applicativeNonEmptyList)(new z.ForeignError("Could not parse color: expected hex string")))(e.fromHexString(n)))})(z.readString),ee=new D.Newtype(function(e){return e},K),ne=new J.ReadForeign(m.map(m.functorFn)(m.map(i.functorExceptT(v.functorIdentity))(D.wrap(ee)))($)),re=function(e){var n=e.value1.height-E.normalize(c.euclideanRingNumber)(e.value0.threshold.min)(e.value0.threshold.max)(e.value0.threshold.sig)*e.value1.height,r="P = "+h.viewOn(U.pow(10)(-e.value0.threshold.sig))(_._exp(1)),t=F.append(W.semigroupOutlineStyle)(W.outlineColor(D.unwrap(ee)(e.value0.rulerColor)))(W.lineWidth(2)),i=W.outlined(t)(W.path(f.foldableArray)([{x:-5,y:n},{x:e.value1.width+5,y:n}])),a=H.font(H.sansSerif)(16)(q.mempty(H.monoidFontOptions)),o=W.text(a)(e.value1.width+10)(n-6)(W.fillColor(D.unwrap(ee)(e.value0.rulerColor)))(r);return{renderables:y.fromFoldable(f.foldableArray)([O.inj()(new A.IsSymbol(function(){return"drawing"}))(G._drawing)(i),O.inj()(new A.IsSymbol(function(){return"drawing"}))(G._drawing)(o)])}},te=function(e){return function(n){return function(t){return function(i){return function(a){return f.foldl(t)(function(t){return function(o){return b.alter(n)((u=o,function(n){return F.append(j.semigroupMaybe(e.Semigroup0()))(r.pure(j.applicativeMaybe)(r.pure(i)(u)))(n)}))(a(o))(t);var u}})(q.mempty(b.monoidMap(n)))}}}}},ie=function(e){return R.Layer.create(R.Fixed.value)(R.NoMask.value)(m.map(R.functorComponent)(function(e){return function(n){return{renderables:r.pure(S.applicativeList)(O.inj()(new A.IsSymbol(function(){return"drawing"}))(G._drawing)(e(n.value1)))}}})(e))},ae=function(e){return D.wrap(E.newtypeNormalized)(D.unwrap(_.newtypeBp)(c.div(_.euclideanRingBp)(e.position.value0)(e.frameSize)))},oe=function(n){return function(r){var t=m.map(m.functorArray)(function(e){return w.toNumber(e)/w.toNumber(n.numSteps)})(d.range(0)(n.numSteps)),i=r.width*n.hPad,a=f.foldMap(f.foldableArray)(W.monoidDrawing)(function(t){return W.text(H.font(H.sansSerif)(n.fonts.scaleSize)(q.mempty(H.monoidFontOptions)))(.6*r.width-i)(t*r.height+5)(W.fillColor(e.black))(C.toStringWith(C.fixed(0))((a=n.min+(1-t)*(n.max-n.min),I.min(I.ordNumber)(n.max)(a))));var a})(t),o=W.translate(.4*r.width-i)(.72*r.height)(W.rotate(-U.pi/2)(W.text(H.font(H.sansSerif)(n.fonts.labelSize)(q.mempty(H.monoidFontOptions)))(0)(0)(W.fillColor(e.black))("-log10 (P value)"))),u=7*i,l=W.path(f.foldableArray)([{x:u,y:0},{x:u,y:r.height}]),s=F.append(W.semigroupShape)(l)(f.foldMap(f.foldableArray)(W.monoidShape)(function(e){return(n=8,function(e){return W.path(f.foldableArray)([{x:u-n,y:e},{x:u,y:e}])})(e*r.height);var n})(t)),c=F.append(W.semigroupOutlineStyle)(W.outlineColor(D.unwrap(ee)(n.color)))(W.lineWidth(2));return F.append(W.semigroupDrawing)(W.outlined(c)(s))(F.append(W.semigroupDrawing)(a)(o))}},ue=function(n){var r=H.font(H.sansSerif)(12)(q.mempty(H.monoidFontOptions)),t=W.text(r)(12)(0)(W.fillColor(e.black))(n.text);return F.append(W.semigroupDrawing)(n.icon)(t)},de=function(n){return function(r){var t=r.height*n.vPad,i=r.width*n.hPad,a=H.font(H.sansSerif)(n.fontSize)(q.mempty(H.monoidFontOptions)),o=g.mapWithIndex(g.functorWithIndexArray)(function(n){return function(r){return(o=t*w.toNumber(n+1|0),function(n){return W.translate(i)(o)(F.append(W.semigroupDrawing)(n.icon)(W.text(a)(12)(0)(W.fillColor(e.black))(n.text)))})(r);var o}})(n.entries);r.height,f.length(f.foldableArray)(P.semiringNumber)(n.entries);return f.fold(f.foldableArray)(W.monoidDrawing)(o)}},le={color:D.wrap(ee)(e.black),hPad:.125,numSteps:3,fonts:{labelSize:18,scaleSize:14}},se={hPad:.2,vPad:.2,fontSize:12},ce=function(n){return function(r){var t=function(n){return function(t){return function(i){return W.text(H.font(H.sansSerif)(r.fontSize)(q.mempty(H.monoidFontOptions)))(function(e){return function(n){var r=I.min(I.ordNumber)(e.value1)(n.value1),t=I.max(I.ordNumber)(e.value0)(n.value0);return t+(r-t)/2}}(function(e){return function(n){var r=m.map(L.functorPair)(l.toNumber)(D.unwrap(E.coordsysviewNewtype)(n)),t=E.viewScale(e)(n);return m.map(L.functorPair)(function(e){return e/E.xPerPixel(t)})(r)}}(n)(t))(i.value1)-(a=i.value0,.3*w.toNumber(r.fontSize*T.length(M.show(_.showChrId)(a))|0)))(.7*n.height)(W.fillColor(e.black))(M.show(_.showChrId)(i.value0));var a}}};return R.Layer.create(R.Scrolling.value)(new R.Masked(5))(new R.CBottom(function(e){return{renderables:m.map(S.functorList)((r=O.inj()(new A.IsSymbol(function(){return"drawing"}))(G._drawing),i=t(e.value1)(e.value0.view),function(e){return r(i(e))}))(b.toUnfoldable(S.unfoldableList)(Y(n)(n.coordinateSystem)(e.value1)(e.value0.view)))};var r,i}))}},fe=function(e){return function(n){return function(i){var d,l;return{renderables:m.map(S.functorList)((d=O.inj()(new A.IsSymbol(function(){return"drawing"}))(G._drawing),l=k.uncurry(function(e){return function(n){return W.filled(W.fillColor(e))(n)}}),function(e){return d(l(e))}))(a.evalState(B.traverse(S.traversableList)(u.applicativeStateT(v.monadIdentity))(function(n){return t.bind(u.bindStateT(v.monadIdentity))(o.get(u.monadStateStateT(v.monadIdentity)))(function(a){return t.discard(t.discardUnit)(u.bindStateT(v.monadIdentity))(o.modify_(u.monadStateStateT(v.monadIdentity))(x.not(x.heytingAlgebraBoolean)))(function(){return r.pure(u.applicativeStateT(v.monadIdentity))(new k.Tuple(D.unwrap(ee)(a?e.chrBG1:e.chrBG2),W.rectangle(n.value0-e.segmentPadding)(-5)(n.value1-n.value0+2*e.segmentPadding)(i.height+10)))})})})(b.values(n)))(!1))}}}};module.exports={featureNormX:ae,groupToMap:te,pixelSegments:Y,pixelSegmentsOpt:Q,trackLikeLayer:Z,fixedUILayer:ie,thresholdRuler:re,chrLabelsLayer:ce,chrBackgroundLayer:fe,HexColor:K,parseColor:$,defaultVScaleConfig:le,drawVScaleInSlot:oe,drawLegendItem:ue,defaultLegendConfig:se,drawLegendInSlot:de,trackLegend:X,newtypeHexColor:ee,readforeignHexColor:ne}; -},{"../Color/index.js":"f3ma","../Color.Scheme.Clrs/index.js":"rp+n","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Monad.State/index.js":"mGZW","../Control.Monad.State.Class/index.js":"u1pL","../Control.Monad.State.Trans/index.js":"34Kp","../Data.Array/index.js":"4t4C","../Data.BigInt/index.js":"Zx+T","../Data.Either/index.js":"B2JL","../Data.EuclideanRing/index.js":"2IRB","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.HeytingAlgebra/index.js":"paZe","../Data.Identity/index.js":"2OKT","../Data.Int/index.js":"xNJb","../Data.Lens.Getter/index.js":"OPOX","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Number.Format/index.js":"VX77","../Data.Ord/index.js":"r4Vb","../Data.Pair/index.js":"PpsX","../Data.Ring/index.js":"E2qH","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.String.CodePoints/index.js":"mAJY","../Data.Symbol/index.js":"4oJQ","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Variant/index.js":"hgdh","../Foreign/index.js":"pu1p","../Genetics.Browser.Canvas/index.js":"VVkU","../Genetics.Browser.Coordinates/index.js":"7bYH","../Genetics.Browser.Layer/index.js":"YWUW","../Genetics.Browser.Types/index.js":"HhmG","../Graphics.Drawing/index.js":"0WVi","../Graphics.Drawing.Font/index.js":"fMOI","../Math/index.js":"Rpaz","../Record/index.js":"0gG4","../Simple.JSON/index.js":"DqNI"}],"GTi5":[function(require,module,exports) { - -var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a<e;)c&&c[a].run();a=-1,e=s.length}c=null,l=!1,u(t)}}function m(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new m(t,e)),1!==s.length||l||i(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}; -},{}],"sseR":[function(require,module,exports) { -var process = require("process"); -var e=require("process");exports._ajax=function(){var r={};return"undefined"==typeof module||!module.require||void 0!==e&&e.versions.electron?(r.newXHR=function(){return new XMLHttpRequest},r.fixupUrl=function(e){return e||"/"},r.getResponse=function(e){return e.response}):(r.newXHR=function(){return new(module.require("xhr2"))},r.fixupUrl=function(e){var r=module.require("url"),t=r.parse(e);return t.protocol=t.protocol||"http:",t.hostname=t.hostname||"localhost",r.format(t)},r.getResponse=function(e){return e.response}),function(e,t){return function(n,o){var u=r.newXHR(),s=r.fixupUrl(t.url);if(u.open(t.method||"GET",s,!0,t.username,t.password),t.headers)try{for(var i,a=0;null!=(i=t.headers[a]);a++)u.setRequestHeader(i.field,i.value)}catch(f){n(f)}var l=function(e){return function(){n(new Error(e+": "+t.method+" "+t.url))}};return u.onerror=l("AJAX request failed"),u.ontimeout=l("AJAX request timed out"),u.onload=function(){o({status:u.status,statusText:u.statusText,headers:u.getAllResponseHeaders().split("\r\n").filter(function(e){return e.length>0}).map(function(r){var t=r.indexOf(":");return e(r.substring(0,t))(r.substring(t+2))}),body:r.getResponse(u)})},u.responseType=t.responseType,u.withCredentials=t.withCredentials,u.send(t.content),function(e,r,t){try{u.abort()}catch(f){return r(f)}return t()}}}}(); -},{"process":"GTi5"}],"PJcd":[function(require,module,exports) { -"use strict";var t="text/xml",a="text/plain",i="text/html",p="text/csv",e="multipart/form-data",o="image/png",l="image/jpeg",c="image/gif",m="application/xml",n="application/octet-stream",r="application/javascript",x="application/json",g="application/x-www-form-urlencoded";module.exports={applicationFormURLEncoded:g,applicationJSON:x,applicationJavascript:r,applicationOctetStream:n,applicationXML:m,imageGIF:c,imageJPEG:l,imagePNG:o,multipartFormData:e,textCSV:p,textHTML:i,textPlain:a,textXML:t}; -},{}],"TX3z":[function(require,module,exports) { -"use strict";var n=require("../Data.Maybe/index.js"),e=require("../Data.MediaType.Common/index.js"),t=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),r=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),u=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),i=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),o=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),c=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),a=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),f=function(t){return t instanceof c?new n.Just(e.applicationFormURLEncoded):t instanceof a?new n.Just(e.applicationJSON):n.Nothing.value},s=i.create,l=a.create,d=c.create,w=o.create,m=u.create,v=r.create,h=function(n){return new t(function(e){return e(n)})};module.exports={ArrayView:t,Blob:r,Document:u,String:i,FormData:o,FormURLEncoded:c,Json:a,arrayView:h,blob:v,document:m,string:s,formData:w,formURLEncoded:d,json:l,toMediaType:f}; -},{"../Data.Maybe/index.js":"5mN7","../Data.MediaType.Common/index.js":"PJcd"}],"cjQ0":[function(require,module,exports) { -"use strict";var e=require("../Data.Eq/index.js"),n=require("../Data.Newtype/index.js"),r=require("../Data.Ord/index.js"),t=require("../Data.Show/index.js"),i=function(e){return e},u=new t.Show(function(e){return"(MediaType "+t.show(t.showString)(e)+")"}),o=new n.Newtype(function(e){return e},i),a=new e.Eq(function(e){return function(n){return e===n}}),d=new r.Ord(function(){return a},function(e){return function(n){return r.compare(r.ordString)(e)(n)}});module.exports={MediaType:i,newtypeMediaType:o,eqMediaType:a,ordMediaType:d,showMediaType:u}; -},{"../Data.Eq/index.js":"Pq4F","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Show/index.js":"mFY7"}],"QBMh":[function(require,module,exports) { -"use strict";var e=require("../Data.Eq/index.js"),n=require("../Data.MediaType/index.js"),t=require("../Data.Newtype/index.js"),r=require("../Data.Ord/index.js"),a=require("../Data.Ordering/index.js"),u=require("../Data.Show/index.js"),i=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),o=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),c=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(t){return new e(n,t)}},e}(),f=function(e){if(e instanceof i)return t.unwrap(n.newtypeMediaType)(e.value0);if(e instanceof o)return t.unwrap(n.newtypeMediaType)(e.value0);if(e instanceof c)return e.value1;throw new Error("Failed pattern match at Affjax.RequestHeader (line 26, column 1 - line 26, column 33): "+[e.constructor.name])},s=new u.Show(function(e){if(e instanceof i)return"(Accept "+u.show(n.showMediaType)(e.value0)+")";if(e instanceof o)return"(ContentType "+u.show(n.showMediaType)(e.value0)+")";if(e instanceof c)return"(RequestHeader "+u.show(u.showString)(e.value0)+" "+u.show(u.showString)(e.value1)+")";throw new Error("Failed pattern match at Affjax.RequestHeader (line 16, column 1 - line 19, column 81): "+[e.constructor.name])}),l=function(e){if(e instanceof i)return"Accept";if(e instanceof o)return"Content-Type";if(e instanceof c)return e.value0;throw new Error("Failed pattern match at Affjax.RequestHeader (line 21, column 1 - line 21, column 32): "+[e.constructor.name])},d=new e.Eq(function(t){return function(r){return t instanceof i&&r instanceof i?e.eq(n.eqMediaType)(t.value0)(r.value0):t instanceof o&&r instanceof o?e.eq(n.eqMediaType)(t.value0)(r.value0):t instanceof c&&r instanceof c&&(t.value0===r.value0&&t.value1===r.value1)}}),v=new r.Ord(function(){return d},function(e){return function(t){if(e instanceof i&&t instanceof i)return r.compare(n.ordMediaType)(e.value0)(t.value0);if(e instanceof i)return a.LT.value;if(t instanceof i)return a.GT.value;if(e instanceof o&&t instanceof o)return r.compare(n.ordMediaType)(e.value0)(t.value0);if(e instanceof o)return a.LT.value;if(t instanceof o)return a.GT.value;if(e instanceof c&&t instanceof c){var u=r.compare(r.ordString)(e.value0)(t.value0);return u instanceof a.LT?a.LT.value:u instanceof a.GT?a.GT.value:r.compare(r.ordString)(e.value1)(t.value1)}throw new Error("Failed pattern match at Affjax.RequestHeader (line 14, column 1 - line 14, column 54): "+[e.constructor.name,t.constructor.name])}});module.exports={Accept:i,ContentType:o,RequestHeader:c,name:l,value:f,eqRequestHeader:d,ordRequestHeader:v,showRequestHeader:s}; -},{"../Data.Eq/index.js":"Pq4F","../Data.MediaType/index.js":"cjQ0","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7"}],"QSsR":[function(require,module,exports) { -"use strict";var n=require("../Control.Category/index.js"),e=require("../Data.Maybe/index.js"),t=require("../Data.MediaType.Common/index.js"),r=require("../Foreign/index.js"),i=function(){function n(n,e){this.value0=n,this.value1=e}return n.create=function(e){return function(t){return new n(e,t)}},n}(),o=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),u=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),a=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),c=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),f=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),s=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),l=function(n){if(n instanceof o)return"arraybuffer";if(n instanceof u)return"blob";if(n instanceof a)return"document";if(n instanceof c)return"text";if(n instanceof f)return"text";if(n instanceof s)return"";throw new Error("Failed pattern match at Affjax.ResponseFormat (line 46, column 3 - line 52, column 19): "+[n.constructor.name])},y=function(n){return n instanceof c?new e.Just(t.applicationJSON):e.Nothing.value},d=new f(n.identity(n.categoryFn)),w=function(n){return r.renderForeignError(n.value0)},g=new c(n.identity(n.categoryFn)),m=new s(n.identity(n.categoryFn)),p=new a(n.identity(n.categoryFn)),F=new u(n.identity(n.categoryFn)),h=new o(n.identity(n.categoryFn));module.exports={ArrayBuffer:o,Blob:u,Document:a,Json:c,String:f,Ignore:s,arrayBuffer:h,blob:F,document:p,json:g,string:d,ignore:m,toResponseType:l,toMediaType:y,ResponseFormatError:i,printResponseFormatError:w}; -},{"../Control.Category/index.js":"IAi2","../Data.Maybe/index.js":"5mN7","../Data.MediaType.Common/index.js":"PJcd","../Foreign/index.js":"pu1p"}],"ev5/":[function(require,module,exports) { -"use strict";var e=require("../Data.Eq/index.js"),n=require("../Data.Ord/index.js"),r=require("../Data.Ordering/index.js"),u=require("../Data.Show/index.js"),t=function(){function e(e,n){this.value0=e,this.value1=n}return e.create=function(n){return function(r){return new e(n,r)}},e}(),a=function(e){return e.value1},o=new u.Show(function(e){return"(ResponseHeader "+u.show(u.showString)(e.value0)+" "+u.show(u.showString)(e.value1)+")"}),i=function(e){return e.value0},s=new e.Eq(function(e){return function(n){return e.value0===n.value0&&e.value1===n.value1}}),v=new n.Ord(function(){return s},function(e){return function(u){var t=n.compare(n.ordString)(e.value0)(u.value0);return t instanceof r.LT?r.LT.value:t instanceof r.GT?r.GT.value:n.compare(n.ordString)(e.value1)(u.value1)}});module.exports={ResponseHeader:t,name:i,value:a,eqResponseHeader:s,ordResponseHeader:v,showResponseHeader:o}; -},{"../Data.Eq/index.js":"Pq4F","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7"}],"fv/y":[function(require,module,exports) { -"use strict";function r(r){return r}exports.fromBoolean=r,exports.fromNumber=r,exports.fromString=r,exports.fromArray=r,exports.fromObject=r,exports.jsonNull=null,exports.stringify=function(r){return JSON.stringify(r)};var t=Object.prototype.toString,e=Object.keys;function n(r){return"[object Array]"===t.call(r)}exports._caseJson=function(r,e,n,o,f,u,l){return null==l?r():"boolean"==typeof l?e(l):"number"==typeof l?n(l):"string"==typeof l?o(l):"[object Array]"===t.call(l)?f(l):u(l)},exports._compare=function r(t,o,f,u,l){if(null==u)return null==l?t:f;if("boolean"==typeof u)return"boolean"==typeof l?u===l?t:!1===u?f:o:null==l?o:f;if("number"==typeof u)return"number"==typeof l?u===l?t:u<l?f:o:null==l?o:"boolean"==typeof l?o:f;if("string"==typeof u)return"string"==typeof l?u===l?t:u<l?f:o:null==l?o:"boolean"==typeof l?o:"number"==typeof l?o:f;if(n(u)){if(n(l)){for(var i=0;i<Math.min(u.length,l.length);i++){var p=r(t,o,f,u[i],l[i]);if(p!==t)return p}return u.length===l.length?t:u.length<l.length?f:o}return null==l?o:"boolean"==typeof l?o:"number"==typeof l?o:"string"==typeof l?o:f}if(null==l)return o;if("boolean"==typeof l)return o;if("number"==typeof l)return o;if("string"==typeof l)return o;if(n(l))return o;var y=e(u),a=e(l);if(y.length<a.length)return f;if(y.length>a.length)return o;for(var s=y.concat(a).sort(),g=0;g<s.length;g++){var b=s[g];if(void 0===u[b])return f;if(void 0===l[b])return o;var c=r(t,o,f,u[b],l[b]);if(c!==t)return c}return t}; -},{}],"pA4l":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Data.Eq/index.js"),t=require("../Data.Function/index.js"),o=require("../Data.Maybe/index.js"),e=require("../Data.Ord/index.js"),u=require("../Data.Ordering/index.js"),c=require("../Foreign.Object/index.js"),s=function(n){return function(r){return function(t){return t(n)(r)}}},i=s(o.Nothing.value)(o.Just.create),f=n.fromNumber(0),a=n.fromBoolean(!0),m=function(r){return function(t){return n.fromObject(c.singleton(r)(t))}},l=function(r){return n.fromArray([r])},j=n.fromBoolean(!1),b=n.fromString(""),g=n.fromObject(c.empty),J=n.fromArray([]),y=s(!1)(t.const(!0)),O=new e.Ord(function(){return d},function(r){return function(t){return n._compare(u.EQ.value,u.GT.value,u.LT.value,r,t)}}),d=new r.Eq(function(n){return function(t){return r.eq(u.eqOrdering)(e.compare(O)(n)(t))(u.EQ.value)}}),q=new r.Eq(function(n){return function(n){return!0}}),N=new e.Ord(function(){return q},function(n){return function(n){return u.EQ.value}}),A=function(r){return function(o){return function(e){return n._caseJson(t.const(r),t.const(r),t.const(r),o,t.const(r),t.const(r),e)}}},E=y(A),S=i(A),_=function(r){return function(o){return function(e){return n._caseJson(t.const(r),t.const(r),t.const(r),t.const(r),t.const(r),o,e)}}},p=y(_),v=i(_),x=function(r){return function(o){return function(e){return n._caseJson(t.const(r),t.const(r),o,t.const(r),t.const(r),t.const(r),e)}}},B=y(x),D=i(x),w=function(r){return function(o){return function(e){return n._caseJson(o,t.const(r),t.const(r),t.const(r),t.const(r),t.const(r),e)}}},F=y(w),Q=i(w),T=function(r){return function(o){return function(e){return n._caseJson(t.const(r),o,t.const(r),t.const(r),t.const(r),t.const(r),e)}}},h=y(T),G=i(T),L=function(r){return function(o){return function(e){return n._caseJson(t.const(r),t.const(r),t.const(r),t.const(r),o,t.const(r),e)}}},M=y(L),Z=i(L),k=function(r){return function(t){return function(o){return function(e){return function(u){return function(c){return function(s){return n._caseJson(r,t,o,e,u,c,s)}}}}}}};module.exports={caseJson:k,caseJsonNull:w,caseJsonBoolean:T,caseJsonNumber:x,caseJsonString:A,caseJsonArray:L,caseJsonObject:_,isNull:F,isBoolean:h,isNumber:B,isString:E,isArray:M,isObject:p,toNull:Q,toBoolean:G,toNumber:D,toString:S,toArray:Z,toObject:v,jsonTrue:a,jsonFalse:j,jsonZero:f,jsonEmptyString:b,jsonEmptyArray:J,jsonSingletonArray:l,jsonEmptyObject:g,jsonSingletonObject:m,eqJson:d,ordJson:O,fromBoolean:n.fromBoolean,fromNumber:n.fromNumber,fromString:n.fromString,fromArray:n.fromArray,fromObject:n.fromObject,jsonNull:n.jsonNull,stringify:n.stringify}; -},{"./foreign.js":"fv/y","../Data.Eq/index.js":"Pq4F","../Data.Function/index.js":"ImXJ","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Foreign.Object/index.js":"jsiz"}],"p7JN":[function(require,module,exports) { -"use strict";exports._jsonParser=function(r,e,s){try{return e(JSON.parse(s))}catch(t){return r(t.message)}}; -},{}],"QxUV":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),r=require("../Data.Either/index.js"),t=function(t){return e._jsonParser(r.Left.create,r.Right.create,t)};module.exports={jsonParser:t}; -},{"./foreign.js":"p7JN","../Data.Either/index.js":"B2JL"}],"7T8V":[function(require,module,exports) { -"use strict";var e=require("../Data.Eq/index.js"),r=require("../Data.Functor/index.js"),n=require("../Data.Maybe/index.js"),o=require("../Data.Monoid/index.js"),t=require("../Data.Newtype/index.js"),a=require("../Data.Ord/index.js"),i=require("../Data.Semigroup/index.js"),u=require("../Data.Show/index.js"),d=require("../Data.String.Common/index.js"),s=require("../Data.Tuple/index.js"),c=require("../Global.Unsafe/index.js"),m=function(e){return e},l=function(e){return e},q=new u.Show(function(e){return"(FormURLEncoded "+u.show(u.showArray(s.showTuple(u.showString)(n.showMaybe(u.showString))))(e)+")"}),f=i.semigroupArray,p=a.ordArray(s.ordTuple(a.ordString)(n.ordMaybe(a.ordString))),w=new t.Newtype(function(e){return e},m),y=o.monoidArray,E=m,h=e.eqArray(s.eqTuple(e.eqString)(n.eqMaybe(e.eqString))),U=function(){var e=d.joinWith("&"),o=r.map(r.functorArray)(function(e){if(e.value1 instanceof n.Nothing)return c.unsafeEncodeURIComponent(e.value0);if(e.value1 instanceof n.Just)return c.unsafeEncodeURIComponent(e.value0)+"="+c.unsafeEncodeURIComponent(e.value1.value0);throw new Error("Failed pattern match at Data.FormURLEncoded (line 35, column 18 - line 37, column 90): "+[e.constructor.name])});return function(r){return e(o(l(r)))}}();module.exports={FormURLEncoded:m,fromArray:E,toArray:l,encode:U,newtypeFormUrlEncoded:w,eqFormUrlEncoded:h,ordFormUrlEncoded:p,semigroupFormUrlEncoded:f,monoidFormUrlEncoded:y,showFormUrlEncoded:q}; -},{"../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.String.Common/index.js":"OSrc","../Data.Tuple/index.js":"II/O","../Global.Unsafe/index.js":"qSZP"}],"7p2I":[function(require,module,exports) { -"use strict";var n=require("../Data.Either/index.js"),e=require("../Data.Eq/index.js"),t=require("../Data.Ord/index.js"),i=require("../Data.Ordering/index.js"),u=require("../Data.Show/index.js"),f=require("../Data.String.Common/index.js"),r=function(){function n(){}return n.value=new n,n}(),a=function(){function n(){}return n.value=new n,n}(),o=function(){function n(){}return n.value=new n,n}(),c=function(){function n(){}return n.value=new n,n}(),s=function(){function n(){}return n.value=new n,n}(),l=function(){function n(){}return n.value=new n,n}(),v=function(){function n(){}return n.value=new n,n}(),T=function(){function n(){}return n.value=new n,n}(),w=function(){function n(){}return n.value=new n,n}(),E=function(){function n(){}return n.value=new n,n}(),L=function(){function n(){}return n.value=new n,n}(),O=function(){function n(){}return n.value=new n,n}(),C=function(){function n(){}return n.value=new n,n}(),P=function(){function n(){}return n.value=new n,n}(),d=function(){function n(){}return n.value=new n,n}(),h=function(){function n(){}return n.value=new n,n}(),m=function(n){return n},G=function(n){return n},D=new u.Show(function(n){if(n instanceof r)return"OPTIONS";if(n instanceof a)return"GET";if(n instanceof o)return"HEAD";if(n instanceof c)return"POST";if(n instanceof s)return"PUT";if(n instanceof l)return"DELETE";if(n instanceof v)return"TRACE";if(n instanceof T)return"CONNECT";if(n instanceof w)return"PROPFIND";if(n instanceof E)return"PROPPATCH";if(n instanceof L)return"MKCOL";if(n instanceof O)return"COPY";if(n instanceof C)return"MOVE";if(n instanceof P)return"LOCK";if(n instanceof d)return"UNLOCK";if(n instanceof h)return"PATCH";throw new Error("Failed pattern match at Data.HTTP.Method (line 40, column 1 - line 56, column 23): "+[n.constructor.name])}),M=new u.Show(function(n){return"(CustomMethod "+u.show(u.showString)(n)+")"}),Q=n.either(u.show(D))(G),N=function(e){var t=f.toUpper(e);return"OPTIONS"===t?new n.Left(r.value):"GET"===t?new n.Left(a.value):"HEAD"===t?new n.Left(o.value):"POST"===t?new n.Left(c.value):"PUT"===t?new n.Left(s.value):"DELETE"===t?new n.Left(l.value):"TRACE"===t?new n.Left(v.value):"CONNECT"===t?new n.Left(T.value):"PROPFIND"===t?new n.Left(w.value):"PROPPATCH"===t?new n.Left(E.value):"MKCOL"===t?new n.Left(L.value):"COPY"===t?new n.Left(O.value):"MOVE"===t?new n.Left(C.value):"LOCK"===t?new n.Left(P.value):"UNLOCK"===t?new n.Left(d.value):"PATCH"===t?new n.Left(h.value):new n.Right(t)},S=new e.Eq(function(n){return function(e){return n instanceof r&&e instanceof r||(n instanceof a&&e instanceof a||(n instanceof o&&e instanceof o||(n instanceof c&&e instanceof c||(n instanceof s&&e instanceof s||(n instanceof l&&e instanceof l||(n instanceof v&&e instanceof v||(n instanceof T&&e instanceof T||(n instanceof w&&e instanceof w||(n instanceof E&&e instanceof E||(n instanceof L&&e instanceof L||(n instanceof O&&e instanceof O||(n instanceof C&&e instanceof C||(n instanceof P&&e instanceof P||(n instanceof d&&e instanceof d||n instanceof h&&e instanceof h))))))))))))))}}),A=new t.Ord(function(){return S},function(n){return function(e){if(n instanceof r&&e instanceof r)return i.EQ.value;if(n instanceof r)return i.LT.value;if(e instanceof r)return i.GT.value;if(n instanceof a&&e instanceof a)return i.EQ.value;if(n instanceof a)return i.LT.value;if(e instanceof a)return i.GT.value;if(n instanceof o&&e instanceof o)return i.EQ.value;if(n instanceof o)return i.LT.value;if(e instanceof o)return i.GT.value;if(n instanceof c&&e instanceof c)return i.EQ.value;if(n instanceof c)return i.LT.value;if(e instanceof c)return i.GT.value;if(n instanceof s&&e instanceof s)return i.EQ.value;if(n instanceof s)return i.LT.value;if(e instanceof s)return i.GT.value;if(n instanceof l&&e instanceof l)return i.EQ.value;if(n instanceof l)return i.LT.value;if(e instanceof l)return i.GT.value;if(n instanceof v&&e instanceof v)return i.EQ.value;if(n instanceof v)return i.LT.value;if(e instanceof v)return i.GT.value;if(n instanceof T&&e instanceof T)return i.EQ.value;if(n instanceof T)return i.LT.value;if(e instanceof T)return i.GT.value;if(n instanceof w&&e instanceof w)return i.EQ.value;if(n instanceof w)return i.LT.value;if(e instanceof w)return i.GT.value;if(n instanceof E&&e instanceof E)return i.EQ.value;if(n instanceof E)return i.LT.value;if(e instanceof E)return i.GT.value;if(n instanceof L&&e instanceof L)return i.EQ.value;if(n instanceof L)return i.LT.value;if(e instanceof L)return i.GT.value;if(n instanceof O&&e instanceof O)return i.EQ.value;if(n instanceof O)return i.LT.value;if(e instanceof O)return i.GT.value;if(n instanceof C&&e instanceof C)return i.EQ.value;if(n instanceof C)return i.LT.value;if(e instanceof C)return i.GT.value;if(n instanceof P&&e instanceof P)return i.EQ.value;if(n instanceof P)return i.LT.value;if(e instanceof P)return i.GT.value;if(n instanceof d&&e instanceof d)return i.EQ.value;if(n instanceof d)return i.LT.value;if(e instanceof d)return i.GT.value;if(n instanceof h&&e instanceof h)return i.EQ.value;throw new Error("Failed pattern match at Data.HTTP.Method (line 38, column 1 - line 38, column 40): "+[n.constructor.name,e.constructor.name])}}),q=new e.Eq(function(n){return function(e){return n===e}}),H=new t.Ord(function(){return q},function(n){return function(e){return t.compare(t.ordString)(n)(e)}});module.exports={OPTIONS:r,GET:a,HEAD:o,POST:c,PUT:s,DELETE:l,TRACE:v,CONNECT:T,PROPFIND:w,PROPPATCH:E,MKCOL:L,COPY:O,MOVE:C,LOCK:P,UNLOCK:d,PATCH:h,unCustomMethod:G,fromString:N,print:Q,eqMethod:S,ordMethod:A,showMethod:D,eqCustomMethod:q,ordCustomMethod:H,showCustomMethod:M}; -},{"../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7","../Data.String.Common/index.js":"OSrc"}],"z+2M":[function(require,module,exports) { -"use strict";var n=require("../Data.Either/index.js"),e=require("../Effect.Aff/index.js"),t=function(n){return n},r=function(n){return n},f=function(t){return e.makeAff(function(r){return function(){var f=t(function(e){return r(n.Left.create(e))()},function(e){return r(n.Right.create(e))()});return function(t){return e.makeAff(function(r){return function(){return f(t,function(e){return r(n.Left.create(e))()},function(e){return r(n.Right.create(e))()}),e.nonCanceler}})}}})};module.exports={EffectFnAff:r,EffectFnCanceler:t,fromEffectFnAff:f}; -},{"../Data.Either/index.js":"B2JL","../Effect.Aff/index.js":"I7lu"}],"IjAr":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),t=require("../Affjax.RequestBody/index.js"),n=require("../Affjax.RequestHeader/index.js"),r=require("../Affjax.ResponseFormat/index.js"),a=require("../Affjax.ResponseHeader/index.js"),u=require("../Control.Applicative/index.js"),o=require("../Control.Bind/index.js"),i=require("../Control.Monad.Error.Class/index.js"),s=require("../Control.Monad.Except/index.js"),f=require("../Control.Monad.Except.Trans/index.js"),d=require("../Control.Parallel/index.js"),c=require("../Data.Argonaut.Core/index.js"),l=require("../Data.Argonaut.Parser/index.js"),m=require("../Data.Array/index.js"),p=require("../Data.Either/index.js"),h=require("../Data.Eq/index.js"),w=require("../Data.Foldable/index.js"),x=require("../Data.FormURLEncoded/index.js"),v=require("../Data.Function/index.js"),A=require("../Data.Functor/index.js"),g=require("../Data.HTTP.Method/index.js"),T=require("../Data.HeytingAlgebra/index.js"),j=require("../Data.Identity/index.js"),y=require("../Data.Int/index.js"),F=require("../Data.List.NonEmpty/index.js"),b=require("../Data.Maybe/index.js"),q=require("../Data.Nullable/index.js"),E=require("../Data.Ord/index.js"),C=require("../Data.Time.Duration/index.js"),R=require("../Data.Unit/index.js"),D=require("../Effect.Aff/index.js"),L=require("../Effect.Aff.Compat/index.js"),N=require("../Effect.Class/index.js"),M=require("../Effect.Exception/index.js"),P=require("../Effect.Ref/index.js"),J=require("../Foreign/index.js"),S=require("../Math/index.js"),B=function(e){return function(t){return function(n){var r=function(t){if(t instanceof p.Left)return p.Left.create(new p.Left(t.value0));if(t instanceof p.Right)return 200===t.value0.status?new p.Right(t.value0):e.shouldRetryWithStatusCode(t.value0.status)?p.Left.create(new p.Right(t.value0)):new p.Right(t.value0);throw new Error("Failed pattern match at Affjax (line 206, column 5 - line 208, column 39): "+[t.constructor.name])};return o.bind(D.bindAff)(N.liftEffect(D.monadEffectAff)(P.new(b.Nothing.value)))(function(a){var s=function a(s){return function(f){return o.bind(D.bindAff)(A.map(D.functorAff)(r)(i.try(D.monadErrorAff)(t(n))))(function(t){if(t instanceof p.Left)return o.discard(o.discardUnit)(D.bindAff)(N.liftEffect(D.monadEffectAff)(P.write(new b.Just(t.value0))(s)))(function(){return o.discard(o.discardUnit)(D.bindAff)(D.delay(e.delayCurve(f)))(function(){return a(s)(f+1|0)})});if(t instanceof p.Right)return u.pure(D.applicativeAff)(t.value0);throw new Error("Failed pattern match at Affjax (line 221, column 7 - line 226, column 32): "+[t.constructor.name])})}}(a);if(e.timeout instanceof b.Nothing)return s(1);if(e.timeout instanceof b.Just)return o.bind(D.bindAff)(d.parOneOf(D.parallelAff)(D.alternativeParAff)(w.foldableArray)(A.functorArray)([A.map(D.functorAff)(b.Just.create)(s(1)),A.voidRight(D.functorAff)(b.Nothing.value)(D.delay(e.timeout.value0))]))(function(e){if(e instanceof b.Nothing)return o.bind(D.bindAff)(N.liftEffect(D.monadEffectAff)(P.read(a)))(function(e){if(e instanceof b.Nothing)return i.throwError(D.monadThrowAff)(M.error("Timeout"));if(e instanceof b.Just)return p.either(i.throwError(D.monadThrowAff))(u.pure(D.applicativeAff))(e.value0);throw new Error("Failed pattern match at Affjax (line 201, column 11 - line 203, column 61): "+[e.constructor.name])});if(e instanceof b.Just)return u.pure(D.applicativeAff)(e.value0);throw new Error("Failed pattern match at Affjax (line 198, column 7 - line 204, column 31): "+[e.constructor.name])});throw new Error("Failed pattern match at Affjax (line 194, column 3 - line 204, column 31): "+[e.timeout.constructor.name])})}}},_=function(i){var d,y=function(){if(i.responseFormat instanceof r.ArrayBuffer)return J.unsafeReadTagged("ArrayBuffer");if(i.responseFormat instanceof r.Blob)return J.unsafeReadTagged("Blob");if(i.responseFormat instanceof r.Document)return J.unsafeReadTagged("Document");if(i.responseFormat instanceof r.Json)return o.composeKleisliFlipped(f.bindExceptT(j.monadIdentity))(function(e){return i.responseFormat.value0(""===(t=e)?u.pure(f.applicativeExceptT(j.monadIdentity))(c.jsonEmptyObject):p.either(function(e){return J.fail(J.ForeignError.create(e))})(u.pure(f.applicativeExceptT(j.monadIdentity)))(l.jsonParser(t)));var t})(J.unsafeReadTagged("String"));if(i.responseFormat instanceof r.String)return J.unsafeReadTagged("String");if(i.responseFormat instanceof r.Ignore)return v.const(i.responseFormat.value0(u.pure(f.applicativeExceptT(j.monadIdentity))(R.unit)));throw new Error("Failed pattern match at Affjax (line 294, column 19 - line 300, column 57): "+[i.responseFormat.constructor.name])}(),E=function(e){return function(t){return e instanceof b.Just&&!w.any(w.foldableArray)(T.heytingAlgebraBoolean)(v.on(h.eq(h.eqString))(n.name)(e.value0))(t)?m.snoc(t)(e.value0):t}},C={method:g.print(i.method),url:i.url,headers:A.map(A.functorArray)(function(e){return{field:n.name(e),value:n.value(e)}})((d=i.content,E(A.map(b.functorMaybe)(n.ContentType.create)(o.bindFlipped(b.bindMaybe)(t.toMediaType)(d)))(E(A.map(b.functorMaybe)(n.Accept.create)(r.toMediaType(i.responseFormat)))(i.headers)))),content:q.toNullable(A.map(b.functorMaybe)(function(e){if(e instanceof t.ArrayView)return e.value0(J.unsafeToForeign);if(e instanceof t.Blob)return J.unsafeToForeign(e.value0);if(e instanceof t.Document)return J.unsafeToForeign(e.value0);if(e instanceof t.String)return J.unsafeToForeign(e.value0);if(e instanceof t.FormData)return J.unsafeToForeign(e.value0);if(e instanceof t.FormURLEncoded)return J.unsafeToForeign(x.encode(e.value0));if(e instanceof t.Json)return J.unsafeToForeign(c.stringify(e.value0));throw new Error("Failed pattern match at Affjax (line 268, column 20 - line 275, column 57): "+[e.constructor.name])})(i.content)),responseType:r.toResponseType(i.responseFormat),username:q.toNullable(i.username),password:q.toNullable(i.password),withCredentials:i.withCredentials};return o.bind(D.bindAff)(L.fromEffectFnAff(e._ajax(a.ResponseHeader.create,C)))(function(e){var t=s.runExcept(y(e.body));if(t instanceof p.Left)return u.pure(D.applicativeAff)({body:new p.Left(new r.ResponseFormatError(F.head(t.value0),e.body)),headers:e.headers,status:e.status,statusText:e.statusText});if(t instanceof p.Right)return u.pure(D.applicativeAff)({body:new p.Right(t.value0),headers:e.headers,status:e.status,statusText:e.statusText});throw new Error("Failed pattern match at Affjax (line 248, column 3 - line 252, column 39): "+[t.constructor.name])})},H={timeout:b.Nothing.value,delayCurve:function(e){return C.Milliseconds(E.max(E.ordNumber)(3e4)(100*S.pow(2)(y.toNumber(e-1|0))))},shouldRetryWithStatusCode:v.const(!1)},I={method:new p.Left(g.GET.value),url:"/",headers:[],content:b.Nothing.value,username:b.Nothing.value,password:b.Nothing.value,withCredentials:!1,responseFormat:r.ignore},U=function(e){return function(t){return _({method:new p.Left(g.DELETE.value),url:t,headers:I.headers,content:I.content,username:I.username,password:I.password,withCredentials:I.withCredentials,responseFormat:e})}},O=function(){var e=A.map(D.functorAff)(function(e){return{body:R.unit,headers:e.headers,status:e.status,statusText:e.statusText}}),t=U(r.ignore);return function(n){return e(t(n))}}(),W=function(e){return function(t){return _({method:I.method,url:t,headers:I.headers,content:I.content,username:I.username,password:I.password,withCredentials:I.withCredentials,responseFormat:e})}},G=function(e){return function(t){return function(n){return _({method:new p.Left(g.PATCH.value),url:t,headers:I.headers,content:new b.Just(n),username:I.username,password:I.password,withCredentials:I.withCredentials,responseFormat:e})}}},K=function(e){var t=A.map(D.functorAff)(function(e){return{body:R.unit,headers:e.headers,status:e.status,statusText:e.statusText}}),n=G(r.ignore)(e);return function(e){return t(n(e))}},V=function(e){return function(t){return function(n){return _({method:new p.Left(g.PATCH.value),url:t,headers:I.headers,content:n,username:I.username,password:I.password,withCredentials:I.withCredentials,responseFormat:e})}}},k=function(e){var t=A.map(D.functorAff)(function(e){return{body:R.unit,headers:e.headers,status:e.status,statusText:e.statusText}}),n=V(r.ignore)(e);return function(e){return t(n(e))}},z=function(e){return function(t){return function(n){return _({method:new p.Left(g.POST.value),url:t,headers:I.headers,content:new b.Just(n),username:I.username,password:I.password,withCredentials:I.withCredentials,responseFormat:e})}}},Q=function(e){var t=A.map(D.functorAff)(function(e){return{body:R.unit,headers:e.headers,status:e.status,statusText:e.statusText}}),n=z(r.ignore)(e);return function(e){return t(n(e))}},X=function(e){return function(t){return function(n){return _({method:new p.Left(g.POST.value),url:t,headers:I.headers,content:n,username:I.username,password:I.password,withCredentials:I.withCredentials,responseFormat:e})}}},Y=function(e){var t=A.map(D.functorAff)(function(e){return{body:R.unit,headers:e.headers,status:e.status,statusText:e.statusText}}),n=X(r.ignore)(e);return function(e){return t(n(e))}},Z=function(e){return function(t){return function(n){return _({method:new p.Left(g.PUT.value),url:t,headers:I.headers,content:new b.Just(n),username:I.username,password:I.password,withCredentials:I.withCredentials,responseFormat:e})}}},$=function(e){var t=A.map(D.functorAff)(function(e){return{body:R.unit,headers:e.headers,status:e.status,statusText:e.statusText}}),n=Z(r.ignore)(e);return function(e){return t(n(e))}},ee=function(e){return function(t){return function(n){return _({method:new p.Left(g.PUT.value),url:t,headers:I.headers,content:n,username:I.username,password:I.password,withCredentials:I.withCredentials,responseFormat:e})}}},te=function(e){var t=A.map(D.functorAff)(function(e){return{body:R.unit,headers:e.headers,status:e.status,statusText:e.statusText}}),n=ee(r.ignore)(e);return function(e){return t(n(e))}};module.exports={defaultRequest:I,request:_,get:W,post:z,post_:Q,"post'":X,"post_'":Y,put:Z,put_:$,"put'":ee,"put_'":te,delete:U,delete_:O,patch:G,patch_:K,"patch'":V,"patch_'":k,defaultRetryPolicy:H,retry:B}; -},{"./foreign.js":"sseR","../Affjax.RequestBody/index.js":"TX3z","../Affjax.RequestHeader/index.js":"QBMh","../Affjax.ResponseFormat/index.js":"QSsR","../Affjax.ResponseHeader/index.js":"ev5/","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Except/index.js":"Fye2","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Parallel/index.js":"LNK1","../Data.Argonaut.Core/index.js":"pA4l","../Data.Argonaut.Parser/index.js":"QxUV","../Data.Array/index.js":"4t4C","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.FormURLEncoded/index.js":"7T8V","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.HTTP.Method/index.js":"7p2I","../Data.HeytingAlgebra/index.js":"paZe","../Data.Identity/index.js":"2OKT","../Data.Int/index.js":"xNJb","../Data.List.NonEmpty/index.js":"XAY7","../Data.Maybe/index.js":"5mN7","../Data.Nullable/index.js":"YQ8o","../Data.Ord/index.js":"r4Vb","../Data.Time.Duration/index.js":"AnkF","../Data.Unit/index.js":"NhVk","../Effect.Aff/index.js":"I7lu","../Effect.Aff.Compat/index.js":"z+2M","../Effect.Class/index.js":"dWtH","../Effect.Exception/index.js":"0OCW","../Effect.Ref/index.js":"/Jaj","../Foreign/index.js":"pu1p","../Math/index.js":"Rpaz"}],"cxC4":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Data.Array/index.js"),e=require("../Data.Array.NonEmpty/index.js"),t=require("../Data.Eq/index.js"),u=require("../Data.Functor/index.js"),i=require("../Data.Identity/index.js"),o=require("../Data.Lens.Internal.Wander/index.js"),a=require("../Data.Map.Internal/index.js"),c=require("../Data.Maybe/index.js"),f=require("../Data.Set/index.js"),d=require("../Data.Traversable/index.js"),p=require("../Foreign.Object/index.js"),x=function(n){this.ix=n},s=function(n){return n.ix},y=function(r){return new x(function(e){return function(t){return o.wander(t)(function(t){return function(u){var i=n.pure(t),o=f.insert(r)(e);return function(n){return i(o(n))}}})}})},l=new x(function(r){return function(t){return o.wander(t)(function(t){return function(i){return function(o){return c.maybe(n.pure(t)(o))((a=u.map(t.Apply0().Functor0())(function(n){return c.fromMaybe(o)(e.updateAt(r)(n)(o))}),function(n){return a(i(n))}))(e.index(o)(r));var a}}})}}),w=new x(function(n){return function(n){return o.wander(n)(function(n){return d.traverse(d.traversableMaybe)(n)})}}),b=function(r){return new x(function(e){return function(t){return o.wander(t)(function(t){return function(i){return function(o){return c.maybe(n.pure(t)(o))((f=u.map(t.Apply0().Functor0())(function(n){return a.insert(r)(e)(n)(o)}),function(n){return f(i(n))}))(a.lookup(r)(e)(o));var f}}})}})},j=new x(function(n){return function(n){return o.wander(n)(function(n){return d.traverse(i.traversableIdentity)(n)})}}),m=new x(function(r){return function(e){return o.wander(e)(function(e){return function(t){return function(i){return c.maybe(n.pure(e)(i))((o=u.map(e.Apply0().Functor0())(function(n){return p.insert(r)(n)(i)}),function(n){return o(t(n))}))(p.lookup(r)(i));var o}}})}}),q=new x(function(e){return function(t){return o.wander(t)(function(t){return function(i){return function(o){return c.maybe(n.pure(t)(o))((a=u.map(t.Apply0().Functor0())(function(n){return c.fromMaybe(o)(r.updateAt(e)(n)(o))}),function(n){return a(i(n))}))(r.index(o)(e));var a}}})}}),A=function(n){return new x(function(r){return function(e){return o.wander(e)(function(e){return function(i){return function(o){return u.mapFlipped(e.Apply0().Functor0())(i(o(r)))(function(e){return function(u){return t.eq(n)(r)(u)?e:o(u)}})}}})}})};module.exports={Index:x,ix:s,indexArr:A,indexMaybe:w,indexIdentity:j,indexArray:q,indexNonEmptyArray:l,indexSet:y,indexMap:b,indexForeignObject:m}; -},{"../Control.Applicative/index.js":"qYya","../Data.Array/index.js":"4t4C","../Data.Array.NonEmpty/index.js":"eTKN","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Identity/index.js":"2OKT","../Data.Lens.Internal.Wander/index.js":"i7fd","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Set/index.js":"+Eae","../Data.Traversable/index.js":"n7EE","../Foreign.Object/index.js":"jsiz"}],"kMIS":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),t=require("../Data.Either/index.js"),r=require("../Data.Eq/index.js"),u=require("../Data.Foldable/index.js"),i=require("../Data.Function/index.js"),o=require("../Data.Functor/index.js"),c=require("../Data.Monoid/index.js"),a=require("../Data.Newtype/index.js"),f=require("../Data.Ord/index.js"),l=require("../Data.Semigroup/index.js"),p=require("../Data.Show/index.js"),s=require("../Data.Traversable/index.js"),d=function(n){return n},m=function(n){return function(e){return function(r){if(r instanceof t.Left)return n(r.value0);if(r instanceof t.Right)return e(r.value0);throw new Error("Failed pattern match at Data.Validation.Semigroup (line 47, column 1 - line 47, column 77): "+[n.constructor.name,e.constructor.name,r.constructor.name])}}},w=function(n){return n},h=function(n){return function(e){return new p.Show(function(r){if(r instanceof t.Left)return"invalid ("+p.show(n)(r.value0)+")";if(r instanceof t.Right)return"pure ("+p.show(e)(r.value0)+")";throw new Error("Failed pattern match at Data.Validation.Semigroup (line 80, column 10 - line 82, column 55): "+[r.constructor.name])})}},q=new a.Newtype(function(n){return n},d),v=function(n){return n instanceof t.Right},V=function(n){return d(t.Left.create(n))},g=t.functorEither,E=new u.Foldable(function(n){return m(i.const(c.mempty(n)))},function(n){return function(e){return m(i.const(e))(n(e))}},function(n){return function(e){return m(i.const(e))(i.flip(n)(e))}}),x=new s.Traversable(function(){return E},function(){return g},function(e){return m((r=n.pure(e),function(n){return r(d(t.Left.create(n)))}))(o.map(e.Apply0().Functor0())(function(n){return d(t.Right.create(n))}));var r},function(e){return function(r){return m((i=n.pure(e),function(n){return i(d(t.Left.create(n)))}))((u=o.map(e.Apply0().Functor0())(function(n){return d(t.Right.create(n))}),function(n){return u(r(n))}));var u,i}}),D=function(n){return function(e){return new r.Eq(function(u){return function(i){return r.eq(t.eqEither(n)(e))(u)(i)}})}},j=function(n){return function(e){return new f.Ord(function(){return D(n.Eq0())(e.Eq0())},function(r){return function(u){return f.compare(t.ordEither(n)(e))(r)(u)}})}},L=function(n){return new r.Eq1(function(e){return r.eq(D(n)(e))})},y=function(n){return new f.Ord1(function(){return L(n.Eq0())},function(e){return f.compare(j(n)(e))})},F=t.bifunctorEither,R=function(n){return new e.Apply(function(){return g},function(e){return function(r){if(e instanceof t.Left&&r instanceof t.Left)return new t.Left(l.append(n)(e.value0)(r.value0));if(e instanceof t.Left)return new t.Left(e.value0);if(r instanceof t.Left)return new t.Left(r.value0);if(e instanceof t.Right&&r instanceof t.Right)return new t.Right(e.value0(r.value0));throw new Error("Failed pattern match at Data.Validation.Semigroup (line 88, column 1 - line 92, column 54): "+[e.constructor.name,r.constructor.name])}})},b=function(n){return function(t){return new l.Semigroup(e.lift2(R(n))(l.append(t)))}},S=function(e){return new n.Applicative(function(){return R(e)},function(n){return d(t.Right.create(n))})},A=function(e){return function(t){return new c.Monoid(function(){return b(e)(t.Semigroup0())},n.pure(S(e))(c.mempty(t)))}},O=function(n){return function(e){return m(V)(e)(n)}};module.exports={V:d,unV:m,invalid:V,isValid:v,toEither:w,andThen:O,newtypeV:q,eqV:D,eq1V:L,ordV:j,ord1V:y,showV:h,functorV:g,bifunctorV:F,applyV:R,applicativeV:S,semigroupV:b,monoidV:A,foldableV:E,traversableV:x}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Semigroup/index.js":"EsAJ","../Data.Show/index.js":"mFY7","../Data.Traversable/index.js":"n7EE"}],"UuEA":[function(require,module,exports) { -var process = require("process"); -var e=require("process"),r=require("../Affjax/index.js"),n=require("../Affjax.ResponseFormat/index.js"),t=require("../Control.Applicative/index.js"),i=require("../Control.Apply/index.js"),a=require("../Control.Bind/index.js"),o=require("../Control.Monad.Error.Class/index.js"),u=require("../Control.Monad.Except/index.js"),s=require("../Data.Array/index.js"),d=require("../Data.BigInt/index.js"),p=require("../Data.Either/index.js"),c=require("../Data.Filterable/index.js"),l=require("../Data.Foldable/index.js"),f=require("../Data.Functor/index.js"),m=require("../Data.Int/index.js"),g=require("../Data.Lens.Fold/index.js"),y=require("../Data.Lens.Index/index.js"),b=require("../Data.Lens.Internal.Forget/index.js"),S=require("../Data.List/index.js"),h=require("../Data.List.Types/index.js"),x=require("../Data.Map.Internal/index.js"),w=require("../Data.Maybe/index.js"),E=require("../Data.Maybe.First/index.js"),v=require("../Data.Monoid/index.js"),j=require("../Data.Newtype/index.js"),q=require("../Data.Pair/index.js"),F=require("../Data.String.CodePoints/index.js"),I=require("../Data.String.Common/index.js"),L=require("../Data.String.Pattern/index.js"),C=require("../Data.Symbol/index.js"),N=require("../Data.Time.Duration/index.js"),D=require("../Data.Traversable/index.js"),k=require("../Data.Tuple/index.js"),A=require("../Data.Unfoldable/index.js"),B=require("../Data.Validation.Semigroup/index.js"),V=require("../Effect.Aff/index.js"),M=require("../Effect.Exception/index.js"),P=require("../Foreign/index.js"),T=require("../Genetics.Browser/index.js"),R=require("../Genetics.Browser.Coordinates/index.js"),z=require("../Genetics.Browser.Types/index.js"),G=require("../Simple.JSON/index.js"),J=function(e){var r=m.fromString(e);if(r instanceof w.Nothing)return B.invalid(t.pure(h.applicativeNonEmptyList)("Error parsing int "+e));if(r instanceof w.Just)return t.pure(B.applicativeV(h.semigroupNonEmptyList))(r.value0);throw new Error("Failed pattern match at Genetics.Browser.Bed (line 98, column 14 - line 100, column 20): "+[r.constructor.name])},O=function(){var e=t.pure(B.applicativeV(h.semigroupNonEmptyList)),r=j.wrap(z.newtypeChrId),n=F.drop(3);return function(t){return e(r(n(t)))}}(),U=function(e){var r=d.fromString(e);if(r instanceof w.Nothing)return B.invalid(t.pure(h.applicativeNonEmptyList)("Error parsing int "+e));if(r instanceof w.Just)return t.pure(B.applicativeV(h.semigroupNonEmptyList))(r.value0);throw new Error("Failed pattern match at Genetics.Browser.Bed (line 103, column 17 - line 105, column 20): "+[r.constructor.name])},W=function(e){return D.traverse(D.traversableArray)(B.applicativeV(h.semigroupNonEmptyList))(U)(I.split(j.wrap(L.newtypePattern)(","))(e))},_=function(e){return i.apply(B.applyV(h.semigroupNonEmptyList))(i.apply(B.applyV(h.semigroupNonEmptyList))(i.apply(B.applyV(h.semigroupNonEmptyList))(i.apply(B.applyV(h.semigroupNonEmptyList))(i.apply(B.applyV(h.semigroupNonEmptyList))(i.apply(B.applyV(h.semigroupNonEmptyList))(i.apply(B.applyV(h.semigroupNonEmptyList))(i.apply(B.applyV(h.semigroupNonEmptyList))(f.map(B.functorV)(function(r){return function(n){return function(t){return function(i){return function(a){return function(o){return function(u){return function(s){return function(d){return{chrom:r,chromStart:n,chromEnd:t,score:i,thickStart:a,thickEnd:o,blockCount:u,blockSizes:s,blockStarts:d,geneId:e.geneId,geneName:e.geneName,itemRgb:e.itemRgb,name:e.name,strand:e.strand,tags:e.tags,type:e.type}}}}}}}}}})(O(e.chrom)))(U(e.chromStart)))(U(e.chromEnd)))(J(e.score)))(U(e.thickStart)))(U(e.thickEnd)))(J(e.blockCount)))(W(e.blockSizes)))(W(e.blockStarts))},H=function(e){return function(r){return a.bind(w.bindMaybe)(g.previewOn(e)((n=R._Segments(b.strongForget),i=y.ix(y.indexMap(z.ordChrId))(r.chrom)(b.wanderForget(E.monoidFirst)),function(e){return n(i(e))})))(function(e){var n,i=(n=j.wrap(z.newtypeBp),function(e){return n(d.toNumber(e))}),a=f.map(q.functorPair)(i)(new q.Pair(r.thickStart,r.thickEnd)),o=f.map(q.functorPair)(i)(new q.Pair(r.chromStart,r.chromEnd)),u=i(R.pairSize(d.ringBigInt)(e)),p=s.zipWith(function(e){return function(r){return f.map(q.functorPair)(i)(new q.Pair(e,r))}})(r.blockStarts)(r.blockSizes);return t.pure(w.applicativeMaybe)({position:o,frameSize:u,feature:{thickRange:a,blocks:p,geneId:r.geneId,geneName:r.geneName,chrId:r.chrom}})});var n,i}},K=function(e){return function(r){return a.bind(p.bindEither)(G.read(G.readRecord()(G.readFieldsCons(new C.IsSymbol(function(){return"blockCount"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"blockSizes"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"blockStarts"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"chrom"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"chromEnd"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"chromStart"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"geneId"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"geneName"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"itemRgb"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"name"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"score"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"strand"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"tags"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"thickEnd"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"thickStart"}))(G.readString)(G.readFieldsCons(new C.IsSymbol(function(){return"type"}))(G.readString)(G.readFieldsNil)()())()())()())()())()())()())()())()())()())()())()())()())()())()())()())()()))(r))(function(r){return a.bind(p.bindEither)(B.unV((n=f.map(h.functorNonEmptyList)(P.ForeignError.create),function(e){return p.Left.create(n(e))}))(t.pure(p.applicativeEither))(_(r)))(function(r){return w.maybe(p.Left.create(t.pure(h.applicativeNonEmptyList)(new P.ForeignError("Error parsing BedFeature"))))(t.pure(p.applicativeEither))(H(e)(r))});var n})}},Q=function(e){return function(i){return a.bind(V.bindAff)(r.get(n.json)(i))(function(r){return a.bind(V.bindAff)(p.either((i=o.throwError(V.monadThrowAff),function(e){return i(M.error(n.printResponseFormatError(e)))}))(t.pure(V.applicativeAff))(r.body))(function(r){var n,i,d=(n=o.throwError(V.monadThrowAff),i=l.foldMap(h.foldableNonEmptyList)(v.monoidString)(function(e){return e+", "}),function(e){return n(M.error(i(e)))});return a.bind(V.bindAff)(function(){var e=u.runExcept(P.readArray(r));if(e instanceof p.Left)return d(f.map(h.functorNonEmptyList)(P.renderForeignError)(e.value0));if(e instanceof p.Right)return t.pure(V.applicativeAff)(e.value0);throw new Error("Failed pattern match at Genetics.Browser.Bed (line 193, column 12 - line 195, column 24): "+[e.constructor.name])}())(function(r){var n=A.unfoldr(h.unfoldableList)(function(e){return S.null(e)?w.Nothing.value:new w.Just(new k.Tuple(S.take(100)(e),S.drop(100)(e)))})(S.fromFoldable(l.foldableArray)(r));return a.bind(V.bindAff)(D.traverse(h.traversableList)(V.applicativeAff)(function(r){return a.discard(a.discardUnit)(V.bindAff)(V.delay(j.wrap(N.newtypeMilliseconds)(.1)))(function(){var n=c.partitionMap(c.filterableList)(K(e))(r);return t.pure(V.applicativeAff)(n.right)})})(n))(function(e){var r=f.map(x.functorMap)(s.fromFoldable(h.foldableList))(T.groupToMap(h.monoidList)(z.ordChrId)(h.foldableList)(h.applicativeList)(function(e){return e.feature.chrId})(S.concat(e)));return t.pure(V.applicativeAff)(r)})})});var i})}};module.exports={validChrId:O,validInt:J,validBigInt:U,validList:W,validLine:_,parseBed:K,bedToFeature:H,getGenes:Q}; -},{"../Affjax/index.js":"IjAr","../Affjax.ResponseFormat/index.js":"QSsR","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Except/index.js":"Fye2","../Data.Array/index.js":"4t4C","../Data.BigInt/index.js":"Zx+T","../Data.Either/index.js":"B2JL","../Data.Filterable/index.js":"6hfS","../Data.Foldable/index.js":"eVDl","../Data.Functor/index.js":"+0AE","../Data.Int/index.js":"xNJb","../Data.Lens.Fold/index.js":"fCig","../Data.Lens.Index/index.js":"cxC4","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Maybe.First/index.js":"W/l6","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Pair/index.js":"PpsX","../Data.String.CodePoints/index.js":"mAJY","../Data.String.Common/index.js":"OSrc","../Data.String.Pattern/index.js":"nKWe","../Data.Symbol/index.js":"4oJQ","../Data.Time.Duration/index.js":"AnkF","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Validation.Semigroup/index.js":"kMIS","../Effect.Aff/index.js":"I7lu","../Effect.Exception/index.js":"0OCW","../Foreign/index.js":"pu1p","../Genetics.Browser/index.js":"X0te","../Genetics.Browser.Coordinates/index.js":"7bYH","../Genetics.Browser.Types/index.js":"HhmG","../Simple.JSON/index.js":"DqNI","process":"GTi5"}],"bDzA":[function(require,module,exports) { -"use strict";var r=require("../Color/index.js"),g=r.rgb(154)(205)(50),e=r.rgb(255)(255)(0),b=r.rgb(245)(245)(245),l=r.rgb(245)(222)(179),a=r.rgb(238)(130)(238),i=r.rgb(64)(224)(208),o=r.rgb(255)(99)(71),n=r.rgb(216)(191)(216),d=r.rgb(0)(128)(128),t=r.rgb(210)(180)(140),u=r.rgb(70)(130)(180),s=r.rgb(0)(255)(127),m=r.rgb(255)(250)(250),h=r.rgb(112)(128)(144),y=r.rgb(112)(128)(144),k=r.rgb(106)(90)(205),c=r.rgb(135)(206)(235),p=r.rgb(192)(192)(192),w=r.rgb(160)(82)(45),v=r.rgb(255)(245)(238),q=r.rgb(46)(139)(87),f=r.rgb(244)(164)(96),j=r.rgb(250)(128)(114),x=r.rgb(139)(69)(19),z=r.rgb(65)(105)(225),C=r.rgb(188)(143)(143),A=r.rgb(255)(0)(0),B=r.rgb(128)(0)(128),D=r.rgb(176)(224)(230),E=r.rgb(221)(160)(221),F=r.rgb(255)(192)(203),G=r.rgb(205)(133)(63),H=r.rgb(255)(218)(185),I=r.rgb(255)(239)(213),J=r.rgb(219)(112)(147),K=r.rgb(175)(238)(238),L=r.rgb(152)(251)(152),M=r.rgb(238)(232)(170),N=r.rgb(218)(112)(214),O=r.rgb(255)(69)(0),P=r.rgb(255)(165)(0),Q=r.rgb(107)(142)(35),R=r.rgb(128)(128)(0),S=r.rgb(253)(245)(230),T=r.rgb(0)(0)(128),U=r.rgb(255)(222)(173),V=r.rgb(255)(228)(181),W=r.rgb(255)(228)(225),X=r.rgb(245)(255)(250),Y=r.rgb(25)(25)(112),Z=r.rgb(199)(21)(133),$=r.rgb(72)(209)(204),_=r.rgb(0)(250)(154),rr=r.rgb(123)(104)(238),gr=r.rgb(60)(179)(113),er=r.rgb(147)(112)(219),br=r.rgb(186)(85)(211),lr=r.rgb(0)(0)(205),ar=r.rgb(102)(205)(170),ir=r.rgb(128)(0)(0),or=r.rgb(255)(0)(255),nr=r.rgb(250)(240)(230),dr=r.rgb(50)(205)(50),tr=r.rgb(0)(255)(0),ur=r.rgb(255)(255)(224),sr=r.rgb(176)(196)(222),mr=r.rgb(119)(136)(153),hr=r.rgb(119)(136)(153),yr=r.rgb(135)(206)(250),kr=r.rgb(32)(178)(170),cr=r.rgb(255)(160)(122),pr=r.rgb(255)(182)(193),wr=r.rgb(211)(211)(211),vr=r.rgb(144)(238)(144),qr=r.rgb(211)(211)(211),fr=r.rgb(250)(250)(210),jr=r.rgb(224)(255)(255),xr=r.rgb(240)(128)(128),zr=r.rgb(173)(216)(230),Cr=r.rgb(255)(250)(205),Ar=r.rgb(124)(252)(0),Br=r.rgb(255)(240)(245),Dr=r.rgb(230)(230)(250),Er=r.rgb(240)(230)(140),Fr=r.rgb(255)(255)(240),Gr=r.rgb(75)(0)(130),Hr=r.rgb(205)(92)(92),Ir=r.rgb(255)(105)(180),Jr=r.rgb(240)(255)(240),Kr=r.rgb(128)(128)(128),Lr=r.rgb(173)(255)(47),Mr=r.rgb(0)(128)(0),Nr=r.rgb(128)(128)(128),Or=r.rgb(218)(165)(32),Pr=r.rgb(255)(215)(0),Qr=r.rgb(248)(248)(255),Rr=r.rgb(220)(220)(220),Sr=r.rgb(255)(0)(255),Tr=r.rgb(34)(139)(34),Ur=r.rgb(255)(250)(240),Vr=r.rgb(178)(34)(34),Wr=r.rgb(30)(144)(255),Xr=r.rgb(105)(105)(105),Yr=r.rgb(105)(105)(105),Zr=r.rgb(0)(191)(255),$r=r.rgb(255)(20)(147),_r=r.rgb(148)(0)(211),rg=r.rgb(0)(206)(209),gg=r.rgb(47)(79)(79),eg=r.rgb(47)(79)(79),bg=r.rgb(72)(61)(139),lg=r.rgb(143)(188)(143),ag=r.rgb(233)(150)(122),ig=r.rgb(139)(0)(0),og=r.rgb(153)(50)(204),ng=r.rgb(255)(140)(0),dg=r.rgb(85)(107)(47),tg=r.rgb(139)(0)(139),ug=r.rgb(189)(183)(107),sg=r.rgb(169)(169)(169),mg=r.rgb(0)(100)(0),hg=r.rgb(169)(169)(169),yg=r.rgb(184)(134)(11),kg=r.rgb(0)(139)(139),cg=r.rgb(0)(0)(139),pg=r.rgb(0)(255)(255),wg=r.rgb(220)(20)(60),vg=r.rgb(255)(248)(220),qg=r.rgb(100)(149)(237),fg=r.rgb(255)(127)(80),jg=r.rgb(210)(105)(30),xg=r.rgb(127)(255)(0),zg=r.rgb(95)(158)(160),Cg=r.rgb(222)(184)(135),Ag=r.rgb(165)(42)(42),Bg=r.rgb(138)(43)(226),Dg=r.rgb(0)(0)(255),Eg=r.rgb(255)(235)(205),Fg=r.rgb(255)(228)(196),Gg=r.rgb(245)(245)(220),Hg=r.rgb(240)(255)(255),Ig=r.rgb(127)(255)(212),Jg=r.rgb(0)(255)(255),Kg=r.rgb(250)(235)(215),Lg=r.rgb(240)(248)(255);module.exports={aliceblue:Lg,antiquewhite:Kg,aqua:Jg,aquamarine:Ig,azure:Hg,beige:Gg,bisque:Fg,blanchedalmond:Eg,blue:Dg,blueviolet:Bg,brown:Ag,burlywood:Cg,cadetblue:zg,chartreuse:xg,chocolate:jg,coral:fg,cornflowerblue:qg,cornsilk:vg,crimson:wg,cyan:pg,darkblue:cg,darkcyan:kg,darkgoldenrod:yg,darkgray:hg,darkgreen:mg,darkgrey:sg,darkkhaki:ug,darkmagenta:tg,darkolivegreen:dg,darkorange:ng,darkorchid:og,darkred:ig,darksalmon:ag,darkseagreen:lg,darkslateblue:bg,darkslategray:eg,darkslategrey:gg,darkturquoise:rg,darkviolet:_r,deeppink:$r,deepskyblue:Zr,dimgray:Yr,dimgrey:Xr,dodgerblue:Wr,firebrick:Vr,floralwhite:Ur,forestgreen:Tr,fuchsia:Sr,gainsboro:Rr,ghostwhite:Qr,gold:Pr,goldenrod:Or,gray:Nr,green:Mr,greenyellow:Lr,grey:Kr,honeydew:Jr,hotpink:Ir,indianred:Hr,indigo:Gr,ivory:Fr,khaki:Er,lavender:Dr,lavenderblush:Br,lawngreen:Ar,lemonchiffon:Cr,lightblue:zr,lightcoral:xr,lightcyan:jr,lightgoldenrodyellow:fr,lightgray:qr,lightgreen:vr,lightgrey:wr,lightpink:pr,lightsalmon:cr,lightseagreen:kr,lightskyblue:yr,lightslategray:hr,lightslategrey:mr,lightsteelblue:sr,lightyellow:ur,lime:tr,limegreen:dr,linen:nr,magenta:or,maroon:ir,mediumaquamarine:ar,mediumblue:lr,mediumorchid:br,mediumpurple:er,mediumseagreen:gr,mediumslateblue:rr,mediumspringgreen:_,mediumturquoise:$,mediumvioletred:Z,midnightblue:Y,mintcream:X,mistyrose:W,moccasin:V,navajowhite:U,navy:T,oldlace:S,olive:R,olivedrab:Q,orange:P,orangered:O,orchid:N,palegoldenrod:M,palegreen:L,paleturquoise:K,palevioletred:J,papayawhip:I,peachpuff:H,peru:G,pink:F,plum:E,powderblue:D,purple:B,red:A,rosybrown:C,royalblue:z,saddlebrown:x,salmon:j,sandybrown:f,seagreen:q,seashell:v,sienna:w,silver:p,skyblue:c,slateblue:k,slategray:y,slategrey:h,snow:m,springgreen:s,steelblue:u,tan:t,teal:d,thistle:n,tomato:o,turquoise:i,violet:a,wheat:l,whitesmoke:b,yellow:e,yellowgreen:g}; -},{"../Color/index.js":"f3ma"}],"RTVM":[function(require,module,exports) { -"use strict";var r=require("../Data.Profunctor.Strong/index.js"),t=function(t){return r.second(t)},n=function(t){return r.first(t)};module.exports={_1:n,_2:t}; -},{"../Data.Profunctor.Strong/index.js":"w9p6"}],"3sXk":[function(require,module,exports) { -"use strict";exports.unsafeKeys=Object.keys||function(e){var r=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.push(t);return r}; -},{}],"hcOM":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),i=require("../Control.Applicative/index.js"),n=require("../Control.Monad.Except.Trans/index.js"),r=require("../Data.Boolean/index.js"),t=require("../Data.Identity/index.js"),o=require("../Foreign/index.js"),a=function(a){if(o.isNull(a))return o.fail(new o.TypeMismatch("object","null"));if(o.isUndefined(a))return o.fail(new o.TypeMismatch("object","undefined"));if("object"===o.typeOf(a))return i.pure(n.applicativeExceptT(t.monadIdentity))(e.unsafeKeys(a));if(r.otherwise)return o.fail(new o.TypeMismatch("object",o.typeOf(a)));throw new Error("Failed pattern match at Foreign.Keys (line 15, column 1 - line 15, column 36): "+[a.constructor.name])};module.exports={keys:a}; -},{"./foreign.js":"3sXk","../Control.Applicative/index.js":"qYya","../Control.Monad.Except.Trans/index.js":"gr8B","../Data.Boolean/index.js":"ObQr","../Data.Identity/index.js":"2OKT","../Foreign/index.js":"pu1p"}],"OuXj":[function(require,module,exports) { -"use strict";exports.pickFn=function(r,t){for(var n={},e=0;e<r.length;e++)n[r[e]]=t[r[e]];return n}; -},{}],"KzZr":[function(require,module,exports) { -"use strict";var n=require("./foreign.js"),r=require("../Control.Applicative/index.js"),e=require("../Control.Apply/index.js"),u=require("../Control.Category/index.js"),t=require("../Control.Semigroupoid/index.js"),o=require("../Data.Array/index.js"),i=require("../Data.Function.Uncurried/index.js"),c=require("../Data.Functor/index.js"),f=require("../Data.List.Types/index.js"),a=require("../Data.Monoid/index.js"),l=require("../Data.Ord/index.js"),d=require("../Data.Ordering/index.js"),s=require("../Data.Symbol/index.js"),p=require("../Data.Tuple/index.js"),y=require("../Record/index.js"),R=require("../Record.Builder/index.js"),x=require("../Type.Data.Row/index.js"),m=require("../Type.Data.RowList/index.js"),v=function(){function n(){}return n.value=new n,n}(),P=function(n){this.zipRecordImpl=n},q=function(n,r){this.Functor0=n,this.sequenceRecordImpl=r},S={},L=function(n){this.compareRecordImpl=n},g=function(n){this.mapRecordBuilder=n},j=function(n){this.keysImpl=n},w=new P(function(n){return function(n){return function(n){return function(n){return u.identity(R.categoryBuilder)}}}}),F=function(n){return n.zipRecordImpl},I=function(n){return function(r){return function(e){return function(u){return function(o){return function(i){return new P(function(c){return function(c){return function(f){return function(f){var a=F(i)(m.RLProxy.value)(c)(m.RLProxy.value)(f),l=new p.Tuple(y.get(n)(r)(s.SProxy.value)(c),y.get(n)(e)(s.SProxy.value)(f)),d=R.insert(u)(o)(n)(s.SProxy.value)(l);return t.compose(R.semigroupoidBuilder)(d)(a)}}}})}}}}}},C=function(n){return function(n){return function(n){return function(r){return function(e){var u=F(n)(m.RLProxy.value)(r)(m.RLProxy.value)(e);return R.build(u)({})}}}}},D=S,B=function(n){return S},k=function(n){return function(r){return function(e){return function(u){return function(t){return new q(function(){return e},function(o){return function(o){var i=y.get(n)(r)(s.SProxy.value)(o);return c.map(e)(R.insert(t)(u)(n)(s.SProxy.value))(i)}})}}}}},T=function(n){return new q(n.Apply0().Functor0,function(e){return function(e){return r.pure(n)(u.identity(R.categoryBuilder))}})},b=function(n){return n.sequenceRecordImpl},h=function(n){return function(r){return function(u){return function(o){return function(i){return function(f){return new q(u.Functor0,function(a){return function(a){var l=b(o)(m.RLProxy.value)(a),d=y.get(n)(r)(s.SProxy.value)(a);return e.apply(u)(c.map(u.Functor0())(function(r){return function(e){return t.compose(R.semigroupoidBuilder)(R.insert(f)(i)(n)(s.SProxy.value)(r))(e)}})(d))(l)}})}}}}}},z=function(n){return function(n){return function(r){var e=b(n)(m.RLProxy.value)(r);return c.map(n.Functor0())(c.flap(c.functorFn)(R.build)({}))(e)}}},N=new L(function(n){return function(n){return function(n){return d.EQ.value}}}),A=new j(function(n){return a.mempty(f.monoidList)}),K=new g(function(n){return function(n){return function(n){return u.identity(R.categoryBuilder)}}}),O=function(n){return n.mapRecordBuilder},E=function(n){return function(r){return function(e){return function(u){return function(o){return new g(function(i){return function(i){return function(c){var f=O(e)(m.RLProxy.value)(i)(c),a=i(y.get(n)(r)(s.SProxy.value)(c)),l=R.insert(o)(u)(n)(s.SProxy.value)(a);return t.compose(R.semigroupoidBuilder)(l)(f)}}})}}}}},M=function(n){return function(n){return function(r){return function(e){var u=O(n)(m.RLProxy.value)(r)(e);return R.build(u)({})}}}},Q=function(n){return n.keysImpl},U=function(n){return function(n){return function(r){return Q(n)(m.RLProxy.value)}}},Z=function(n){return function(n){return function(r){return Q(n)(m.RLProxy.value)}}},G=function(r){return function(r){return function(e){var u=o.fromFoldable(f.foldableList)(Z(r)(e)(x.RProxy.value));return i.runFn2(n.pickFn)(u)}}},H=function(n){return function(r){return new j(function(e){var u=Q(r)(m.RLProxy.value),t=s.reflectSymbol(n)(s.SProxy.value);return new f.Cons(t,u)})}},J=function(n){return n.compareRecordImpl},V=function(n){return function(r){return function(e){return function(u){return new L(function(t){return function(t){return function(o){var i=y.get(n)(e)(s.SProxy.value)(t),c=y.get(n)(e)(s.SProxy.value)(o),f=l.compare(r)(i)(c);return f instanceof d.EQ?J(u)(m.RLProxy.value)(t)(o):f}}})}}}},W=function(n){return function(n){return function(r){return function(e){return J(n)(m.RLProxy.value)(r)(e)}}}};module.exports={compareRecordImpl:J,keysImpl:Q,mapRecordBuilder:O,sequenceRecordImpl:b,zipRecordImpl:F,mapRecord:M,MapRecord:g,ZipRecord:P,zipRecord:C,Keys:j,keys:Z,pick:G,slistKeys:U,SLProxy:v,SListToRowList:S,OrdRecord:L,compareRecord:W,SequenceRecord:q,sequenceRecord:z,mapRecordCons:E,mapRecordNil:K,zipRecordNil:w,zipRecordCons:I,nilKeys:A,consKeys:H,slToRlSNil:D,slToRlSCons:B,ordRecordCons:V,ordRecordNil:N,sequenceRecordSingle:k,sequenceRecordCons:h,sequenceRecordNil:T,pickFn:n.pickFn}; -},{"./foreign.js":"OuXj","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Category/index.js":"IAi2","../Control.Semigroupoid/index.js":"/riR","../Data.Array/index.js":"4t4C","../Data.Function.Uncurried/index.js":"TowT","../Data.Functor/index.js":"+0AE","../Data.List.Types/index.js":"Xxuc","../Data.Monoid/index.js":"TiEB","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Symbol/index.js":"4oJQ","../Data.Tuple/index.js":"II/O","../Record/index.js":"0gG4","../Record.Builder/index.js":"VeY4","../Type.Data.Row/index.js":"ukdD","../Type.Data.RowList/index.js":"XaXP"}],"mKwt":[function(require,module,exports) { -"use strict";var e=require("../Affjax/index.js"),n=require("../Affjax.ResponseFormat/index.js"),r=require("../Color/index.js"),t=require("../Color.Scheme.Clrs/index.js"),i=require("../Color.Scheme.X11/index.js"),o=require("../Control.Applicative/index.js"),a=require("../Control.Bind/index.js"),u=require("../Control.Category/index.js"),f=require("../Control.Monad.Error.Class/index.js"),c=require("../Control.Monad.Except/index.js"),d=require("../Control.Monad.Except.Trans/index.js"),l=require("../Control.Semigroupoid/index.js"),s=require("../Data.Array/index.js"),p=require("../Data.BigInt/index.js"),m=require("../Data.Boolean/index.js"),y=require("../Data.Either/index.js"),b=require("../Data.Eq/index.js"),w=require("../Data.EuclideanRing/index.js"),g=require("../Data.Filterable/index.js"),h=require("../Data.Foldable/index.js"),v=require("../Data.FoldableWithIndex/index.js"),x=require("../Data.Function/index.js"),A=require("../Data.Functor/index.js"),S=require("../Data.FunctorWithIndex/index.js"),I=require("../Data.Identity/index.js"),C=require("../Data.Lens.Getter/index.js"),j=require("../Data.Lens.Internal.Forget/index.js"),q=require("../Data.Lens.Internal.Re/index.js"),L=require("../Data.Lens.Iso/index.js"),E=require("../Data.Lens.Lens.Tuple/index.js"),B=require("../Data.List/index.js"),D=require("../Data.List.Types/index.js"),F=require("../Data.Map.Internal/index.js"),M=require("../Data.Maybe/index.js"),N=require("../Data.Monoid/index.js"),T=require("../Data.Newtype/index.js"),k=require("../Data.Ord/index.js"),P=require("../Data.Pair/index.js"),G=require("../Data.Profunctor.Strong/index.js"),R=require("../Data.Ring/index.js"),O=require("../Data.Semigroup/index.js"),_=require("../Data.Semiring/index.js"),z=require("../Data.Show/index.js"),U=require("../Data.Symbol/index.js"),W=require("../Data.Traversable/index.js"),K=require("../Data.Tuple/index.js"),H=require("../Data.Unfoldable/index.js"),J=require("../Data.Unit/index.js"),X=require("../Data.Variant/index.js"),V=require("../Effect/index.js"),Y=require("../Effect.Aff/index.js"),Q=require("../Effect.Aff.Class/index.js"),Z=require("../Effect.Class/index.js"),$=require("../Effect.Class.Console/index.js"),ee=require("../Effect.Exception/index.js"),ne=require("../Foreign/index.js"),re=require("../Foreign.Index/index.js"),te=require("../Foreign.Keys/index.js"),ie=require("../Genetics.Browser/index.js"),oe=require("../Genetics.Browser.Cacher/index.js"),ae=require("../Genetics.Browser.Canvas/index.js"),ue=require("../Genetics.Browser.Coordinates/index.js"),fe=require("../Genetics.Browser.Layer/index.js"),ce=require("../Genetics.Browser.Types/index.js"),de=require("../Graphics.Drawing/index.js"),le=require("../Math/index.js"),se=require("../Record/index.js"),pe=require("../Record.Builder/index.js"),me=require("../Record.Extra/index.js"),ye=require("../Simple.JSON/index.js"),be=require("../Type.Equality/index.js"),we=function(e){return ie.fixedUILayer(fe.CLeft.create(ie.drawVScaleInSlot(e)))},ge=function(e){return function(n){return a.bind(M.bindMaybe)(h.minimumBy(h.foldableArray)(x.on(k.compare(k.ordNumber))(function(e){return e.feature.score}))(n))(function(r){var t=ue.aroundPair(ce.ringBp)(e)(r.position),i=g.partition(g.filterableArray)(function(e){return ue.pairsOverlap(ce.ordBp)(e.position)(t)})(n);return o.pure(M.applicativeMaybe)(new K.Tuple({covers:t,y:r.feature.score,elements:i.yes},i.no))})}},he=function(e){return e.field+": "+e.value},ve=function(e){var n="Chr: "+z.show(ce.showChrId)(e.feature.chr),r=M.fromMaybe("SNP: "+e.feature.name)(A.map(M.functorMaybe)(function(e){return"Gene: "+e})(e.feature.gene)),t="Pos: "+z.show(ce.showBp)(e.feature.pos);return O.append(D.semigroupList)(B.fromFoldable(h.foldableArray)([r,n,t]))(A.map(D.functorList)(he)(e.feature.rest))},xe=function(e){return function(n){return a.bind(M.bindMaybe)(h.minimumBy(h.foldableArray)(x.on(k.compare(k.ordNumber))(function(e){return e.feature.score}))(n))(function(r){var t=ue.aroundPair(ce.ringBp)(e)(r.position),i=g.partition(g.filterableArray)(function(e){return ue.pairsOverlap(ce.ordBp)(e.position)(t)})(n);return o.pure(M.applicativeMaybe)(new K.Tuple({covers:t,y:r.feature.score,elements:i.yes},i.no))})}},Ae=function(e){return function(n){return H.unfoldr(H.unfoldableArray)(xe(e))(n)}},Se=function(e){return function(n){return a.bind(d.bindExceptT(I.monadIdentity))(ye["read'"](ye.readRecord()(ye.readFieldsCons(new U.IsSymbol(function(){return"chr"}))(ye.readString)(ye.readFieldsCons(new U.IsSymbol(function(){return"p_wald"}))(ye.readNumber)(ye.readFieldsCons(new U.IsSymbol(function(){return"ps"}))(ye.readNumber)(ye.readFieldsCons(new U.IsSymbol(function(){return"rs"}))(ye.readString)(ye.readFieldsNil)()())()())()())()()))(n))(function(n){var r,t=(r=n.ps,A.map(P.functorPair)(T.wrap(ce.newtypeBp))(new P.Pair(r,r))),i={score:n.p_wald,chrId:T.wrap(ce.newtypeChrId)(n.chr),name:n.rs};return a.bind(d.bindExceptT(I.monadIdentity))(function(){var n=F.lookup(ce.ordChrId)(i.chrId)(C.view(ue._Segments(j.strongForget))(e));if(n instanceof M.Nothing)return f.throwError(d.monadThrowExceptT(I.monadIdentity))(o.pure(D.applicativeNonEmptyList)(new ne.ForeignError("Annotation chr not found in coordinate system!")));if(n instanceof M.Just)return o.pure(d.applicativeExceptT(I.monadIdentity))(ce.Bp(p.toNumber(ue.pairSize(p.ringBigInt)(n.value0))));throw new Error("Failed pattern match at Genetics.Browser.Demo (line 169, column 16 - line 175, column 49): "+[n.constructor.name])}())(function(e){return o.pure(d.applicativeExceptT(I.monadIdentity))({position:t,frameSize:e,feature:i})})})}},Ie=function(e){var n=ue.normalize(w.euclideanRingNumber)(e.min)(e.max),r=T.unwrap(ce.newtypeNegLog10),t=C.view(ce._NegLog10(j.profunctorForget));return function(e){return n(r(t(e)))}},Ce=function(r){return function(t){return a.bind(Y.bindAff)(e.get(n.json)(t))(function(e){return a.discard(a.discardUnit)(Y.bindAff)(Z.liftEffect(Y.monadEffectAff)($.log(Z.monadEffectEffect)(e.body)))(function(){return a.bind(Y.bindAff)(y.either((t=f.throwError(Y.monadThrowAff),function(e){return t(ee.error(n.printResponseFormatError(e)))}))(o.pure(Y.applicativeAff))(e.body))(function(e){return a.bind(Y.bindAff)(function(){var n=c.runExcept(ne.readArray(e));if(n instanceof y.Left)return f.throwError(Y.monadThrowAff)(ee.error("SNP data is not an array"));if(n instanceof y.Right)return o.pure(Y.applicativeAff)(n.value0);throw new Error("Failed pattern match at Genetics.Browser.Demo (line 277, column 5 - line 281, column 31): "+[n.constructor.name])}())(function(e){var n,t=g.partitionMap(g.filterableArray)((n=Se(r),function(e){return c.runExcept(n(e))}))(e);return o.pure(Y.applicativeAff)(ie.groupToMap(N.monoidArray)(ce.ordChrId)(h.foldableArray)(o.applicativeArray)(function(e){return e.feature.chrId})(g.filter(g.filterableArray)(function(e){return k.greaterThanOrEq(ce.ordBp)(P.fst(e.position))(T.wrap(ce.newtypeBp)(0))})(t.right)))})});var t})})}},je=function(e){return A.map(F.functorMap)(g.filter(g.filterableArray)(function(n){return n.feature.score<=C.viewOn(e.sig)(L.re(ce._NegLog10(q.profunctorRe(j.profunctorForget))))}))},qe=function(e){return function(n){return function(t){var a=ue.pairSize(R.ringNumber)(n),u=function(e){return a*T.unwrap(ce.newtypeBp)(w.div(ce.euclideanRingBp)(e)(t.frameSize))},f=u(R.sub(ce.ringBp)(t.position.value1)(t.position.value0)),c=function(e){var n=A.map(P.functorPair)(u)(e);return de.rectangle(n.value0)(0)(n.value1)(30)},d=function(e){var n=h.foldMap(h.foldableArray)(de.monoidShape)(c)(g.filter(g.filterableArray)(function(e){return function(e){return P.snd(A.map(P.functorPair)(u)(e))}(e)>1})(t.feature.blocks));return O.append(de.semigroupDrawing)(de.outlined(O.append(de.semigroupOutlineStyle)(de.outlineColor(i.darkgrey))(de.lineWidth(1)))(n))(de.filled(de.fillColor(i.lightgrey))(n))};if(f<1)return M.Nothing.value;var l={x:n.value0+ue.pairSize(R.ringNumber)(n)*T.unwrap(ue.newtypeNormalized)(ie.featureNormX(t)),y:.5*e.height},s={x:l.x+f,y:l.y+15};return o.pure(M.applicativeMaybe)({bigDrawing:{drawing:function(e){return O.append(de.semigroupDrawing)((J.unit,n=de.rectangle(1.5)(14)(f-1.5)(2),O.append(de.semigroupDrawing)(de.outlined(O.append(de.semigroupOutlineStyle)(de.outlineColor(r.black))(de.lineWidth(3)))(n))(de.filled(de.fillColor(r.black))(n))))(d(J.unit));var n},topLeft:l,bottomRight:s},label:{text:t.feature.geneName,point:l,gravity:ae.LCenter.value}})}}},Le=function(e){return function(n){return function(n){return function(r){var t,i=F.toUnfoldable(D.unfoldableList)(A.map(F.functorMap)(B.fromFoldable(h.foldableArray))(e)),u=B.concatMap(function(e){return M.fromMaybe(N.mempty(D.monoidList))(a.bind(M.bindMaybe)(F.lookup(ce.ordChrId)(e.value0)(n))(function(n){return o.pure(M.applicativeMaybe)(g.filterMap(g.filterableList)(qe(r)(n))(e.value1))}))})(i),f=X.inj()(new U.IsSymbol(function(){return"labels"}))(ae._labels)(A.map(D.functorList)(function(e){return e.label})(u)),c=A.map(D.functorList)((t=X.inj()(new U.IsSymbol(function(){return"bigDrawing"}))(ae._bigDrawing),function(e){return t(e.bigDrawing)}))(u);return{renderables:new D.Cons(f,c)}}}}},Ee=function(e){return function(n){var r=e.y-n.y,t=e.x-n.x;return le.sqrt(le.pow(t)(2)+le.pow(r)(2))}},Be=function(e){return function(n){var r,t,i,a=A.map(F.functorMap)(B.fromFoldable(h.foldableArray))(e),f=function(e){return v.foldMapWithIndex(F.foldableWithIndexMap)(D.monoidList)(function(r){return function(t){return h.foldMap(h.foldableMaybe)(D.monoidList)(A.map(D.functorList)(G.fanout(u.categoryFn)(G.strongFn)(u.identity(u.categoryFn))((i=t,function(r){return{x:i.value0+ue.pairSize(R.ringNumber)(i)*T.unwrap(ue.newtypeNormalized)(ie.featureNormX(r)),y:e.height*(1-Ie(n.threshold)(r.feature.score))}}))))(F.lookup(ce.ordChrId)(r)(a));var i}})},c=function(e){return function(r){return function(t){return s.fromFoldable(D.foldableList)(g.filterMap(g.filterableList)(function(e){if(Ee(e.value1)(t)<=n.render.radius+r)return new M.Just(e.value0);if(m.otherwise)return M.Nothing.value;throw new Error("Failed pattern match at Genetics.Browser.Demo (line 500, column 15 - line 500, column 63): "+[e.constructor.name])})(e))}}},d=(r=de.circle(n.render.pixelOffset.x)(n.render.pixelOffset.y)(n.render.radius),t=de.filled(de.fillColor(T.unwrap(ie.newtypeHexColor)(n.render.color.fill)))(r),i=de.outlined(O.append(de.semigroupOutlineStyle)(de.outlineColor(T.unwrap(ie.newtypeHexColor)(n.render.color.outline)))(de.lineWidth(n.render.lineWidth)))(r),O.append(de.semigroupDrawing)(i)(t)),l=function(e){return o.pure(o.applicativeArray)({drawing:d,points:A.map(A.functorArray)(C.view(E._2(j.strongForget)))(s.fromFoldable(D.foldableList)(e))})};return function(e){return function(n){var r=f(n)(e);return{renderables:o.pure(D.applicativeList)(X.inj()(new U.IsSymbol(function(){return"drawingBatch"}))(ae._drawingBatch)(l(r))),hotspots:c(r)}}}}},De={radius:3.75,lineWidth:1,color:{outline:T.wrap(ie.newtypeHexColor)(i.darkblue),fill:T.wrap(ie.newtypeHexColor)(i.darkblue)},pixelOffset:{x:0,y:0}},Fe={radius:5.5,outline:T.wrap(ie.newtypeHexColor)(r.black),snpColor:T.wrap(ie.newtypeHexColor)(t.blue),geneColor:T.wrap(ie.newtypeHexColor)(t.red)},Me=function(e){return ie.fixedUILayer(fe.CRight.create(ie.drawLegendInSlot(e)))},Ne=function(e){return function(e){return function(n){return S.mapWithIndex(F.functorWithIndexMap)(function(r){return function(t){return M.fromMaybe([])(a.bind(M.bindMaybe)(F.lookup(ce.ordChrId)(r)(e))(function(e){return a.bind(M.bindMaybe)(F.lookup(ce.ordChrId)(r)(n))(function(n){return a.bind(M.bindMaybe)(A.map(M.functorMaybe)(function(e){return e.frameSize})(s.head(e)))(function(r){var i=w.div(ce.euclideanRingBp)(_.mul(ce.semiringBp)(T.wrap(ce.newtypeBp)(3.75))(r))(T.wrap(ce.newtypeBp)(ue.pairSize(R.ringNumber)(t)));return o.pure(M.applicativeMaybe)(A.map(A.functorArray)(function(e){return{elements:g.filter(g.filterableArray)((r=ue.pairsOverlap(ce.ordBp)(e.covers),function(e){return r(e.position)}))(n),covers:e.covers,y:e.y};var r})(Ae(i)(e)))})})}))}})}}},Te=function(e){return function(n){var r=function(n){return O.append(O.semigroupFn(de.semigroupDrawing))(de.outlined(O.append(de.semigroupOutlineStyle)(de.outlineColor(T.unwrap(ie.newtypeHexColor)(e.outline)))(de.lineWidth(2))))(de.filled(de.fillColor(T.unwrap(ie.newtypeHexColor)(n))))(de.circle(0)(0)(e.radius))};if(n.feature.gene instanceof M.Nothing)return{text:"SNP name",icon:r(e.snpColor)};if(n.feature.gene instanceof M.Just)return{text:"Gene name",icon:r(e.geneColor)};throw new Error("Failed pattern match at Genetics.Browser.Demo (line 389, column 6 - line 391, column 69): "+[n.feature.gene.constructor.name])}},ke=function(e){return function(n){return function(n){return function(r){var t=s.concat(s.fromFoldable(D.foldableList)(A.map(D.functorList)(s.fromFoldable(e))(F.values(r))));return ie.trackLegend(h.foldableArray)(A.functorArray)(Te(n))(t)}}}},Pe=function(e){return function(n){return function(t){return function(i){return function(u){var f=.06*u.height,c=function(e){var n=e.covers.value0+.5*(e.covers.value1-e.covers.value0),i=s.null(e.elements)?N.mempty(de.monoidDrawing):de.outlined(O.append(de.semigroupOutlineStyle)(de.lineWidth(1.3))(de.outlineColor(r.black)))(de.path(h.foldableArray)([{x:0,y:0},{x:0,y:-f}])),o=de.translate(0)(-f)(h.foldr(h.foldableArray)(function(e){return function(n){return de.translate(0)(-6.5)(O.append(de.semigroupDrawing)(Te(t)(e).icon)(n))}})(N.mempty(de.monoidDrawing))(e.elements)),a=14*h.length(h.foldableArray)(_.semiringNumber)(e.elements),u={drawing:O.append(de.semigroupDrawing)(i)(o),points:[{x:n,y:e.y}]},c=function(e){var n=f+4.5*h.length(h.foldableArray)(_.semiringNumber)(e.elements),r=e.y-n;return{x:e.covers.value0,y:r,width:14,height:n}}(e),d=c.y>a?{g:ae.LCenter.value,y0:c.y}:{g:ae.LLeft.value,y0:e.y},l=K.snd(h.foldr(h.foldableArray)(function(e){return function(r){return K.Tuple.create(r.value0-8)(new D.Cons({text:M.fromMaybe(e.feature.name)(e.feature.gene),point:{x:n,y:r.value0},gravity:d.g},r.value1))}})(new K.Tuple(d.y0,N.mempty(D.monoidList)))(e.elements));return new K.Tuple([u],l)};return function(r){var t,f=(t=function(r){return S.mapWithIndex(F.functorWithIndexMap)(function(t){return function(i){return M.fromMaybe([])(a.bind(M.bindMaybe)(A.map(M.functorMaybe)((f=T.wrap(ce.newtypeBp),c=ue.pairSize(p.ringBigInt),function(e){return f(p.toNumber(c(e)))}))(F.lookup(ce.ordChrId)(t)(C.viewOn(e)(ue._Segments(j.strongForget)))))(function(e){return a.bind(M.bindMaybe)(F.lookup(ce.ordChrId)(t)(r))(function(r){return o.pure(M.applicativeMaybe)(A.map(A.functorArray)(function(t){return{covers:A.map(P.functorPair)(function(n){return r.value0+ue.pairSize(R.ringNumber)(r)*T.unwrap(ce.newtypeBp)(w.div(ce.euclideanRingBp)(n)(e))})(t.covers),y:u.height*(1-Ie(n)(t.y)),elements:t.elements}})(i))})}));var f,c}})(i)}(r),h.foldMap(F.foldableMap)(K.monoidTuple(N.monoidArray)(D.monoidList))(h.foldMap(h.foldableArray)(K.monoidTuple(N.monoidArray)(D.monoidList))(c))(t));return{drawingBatch:f.value0,labels:f.value1}}}}}}},Ge=function(e){return function(n){return function(r){return function(t){var i=Ne(e)(n)(r);return function(n){return function(r){var o=Pe(e)(t.threshold)(t.render)(i(n))(r)(n);return{renderables:B.fromFoldable(h.foldableArray)([X.inj()(new U.IsSymbol(function(){return"drawingBatch"}))(ae._drawingBatch)(o.drawingBatch),X.inj()(new U.IsSymbol(function(){return"labels"}))(ae._labels)(o.labels)])}}}}}}},Re=function(e){return function(e){return me.keys()(me.consKeys(new U.IsSymbol(function(){return"chr"}))(me.consKeys(new U.IsSymbol(function(){return"gene"}))(me.consKeys(new U.IsSymbol(function(){return"name"}))(me.consKeys(new U.IsSymbol(function(){return"pos"}))(me.consKeys(new U.IsSymbol(function(){return"url"}))(me.nilKeys))))))(J.unit)}},Oe=function(e){return a.bind(d.bindExceptT(I.monadIdentity))(A.map(d.functorExceptT(I.functorIdentity))(B.fromFoldable(h.foldableArray))(te.keys(e)))(function(n){var r=B.difference(b.eqString)(n)(Re(me.consKeys(new U.IsSymbol(function(){return"chr"}))(me.consKeys(new U.IsSymbol(function(){return"gene"}))(me.consKeys(new U.IsSymbol(function(){return"name"}))(me.consKeys(new U.IsSymbol(function(){return"pos"}))(me.consKeys(new U.IsSymbol(function(){return"url"}))(me.nilKeys))))))());return W.for(d.applicativeExceptT(I.monadIdentity))(D.traversableList)(r)(function(n){return A.map(d.functorExceptT(I.functorIdentity))(function(e){return{field:n,value:e}})(re.readProp(n)(e))})})},_e=function(e){return function(n){return a.bind(d.bindExceptT(I.monadIdentity))(ye["read'"](ye.readRecord()(ye.readFieldsCons(new U.IsSymbol(function(){return"chr"}))(ye.readString)(ye.readFieldsCons(new U.IsSymbol(function(){return"gene"}))(ye.readMaybe(ye.readString))(ye.readFieldsCons(new U.IsSymbol(function(){return"name"}))(ye.readString)(ye.readFieldsCons(new U.IsSymbol(function(){return"pos"}))(ye.readNumber)(ye.readFieldsCons(new U.IsSymbol(function(){return"url"}))(ye.readMaybe(ye.readString))(ye.readFieldsNil)()())()())()())()())()()))(n))(function(r){return a.bind(d.bindExceptT(I.monadIdentity))(Oe(n))(function(n){var t,i=pe.build(l.composeFlipped(pe.semigroupoidBuilder)(pe.insert()()(new U.IsSymbol(function(){return"rest"}))(U.SProxy.value)(n))(l.composeFlipped(pe.semigroupoidBuilder)(pe.modify()()(new U.IsSymbol(function(){return"chr"}))(U.SProxy.value)(ce.ChrId))(pe.modify()()(new U.IsSymbol(function(){return"pos"}))(U.SProxy.value)(ce.Bp))))(r),u=(t=i.pos,new P.Pair(t,t));return a.bind(d.bindExceptT(I.monadIdentity))(function(){var n=F.lookup(ce.ordChrId)(i.chr)(C.view(ue._Segments(j.strongForget))(e));if(n instanceof M.Nothing)return f.throwError(d.monadThrowExceptT(I.monadIdentity))(o.pure(D.applicativeNonEmptyList)(new ne.ForeignError("Annotation chr not found in coordinate system!")));if(n instanceof M.Just)return o.pure(d.applicativeExceptT(I.monadIdentity))(ce.Bp(p.toNumber(ue.pairSize(p.ringBigInt)(n.value0))));throw new Error("Failed pattern match at Genetics.Browser.Demo (line 221, column 16 - line 228, column 49): "+[n.constructor.name])}())(function(e){return o.pure(d.applicativeExceptT(I.monadIdentity))({position:u,frameSize:e,feature:i})})})})}},ze=function(r){return function(t){return a.bind(Y.bindAff)(e.get(n.json)(t))(function(e){return a.bind(Y.bindAff)(y.either((t=f.throwError(Y.monadThrowAff),function(e){return t(ee.error(n.printResponseFormatError(e)))}))(o.pure(Y.applicativeAff))(e.body))(function(e){return a.bind(Y.bindAff)(function(){var n=c.runExcept(ne.readArray(e));if(n instanceof y.Left)return f.throwError(Y.monadThrowAff)(ee.error("Annotations data is not an array"));if(n instanceof y.Right)return o.pure(Y.applicativeAff)(n.value0);throw new Error("Failed pattern match at Genetics.Browser.Demo (line 303, column 16 - line 307, column 37): "+[n.constructor.name])}())(function(e){var n,t=g.partitionMap(g.filterableArray)((n=_e(r),function(e){return c.runExcept(n(e))}))(e);return a.discard(a.discardUnit)(Y.bindAff)(Z.liftEffect(Y.monadEffectAff)(function(){return $.log(Z.monadEffectEffect)("Raw annotations array length: "+z.show(z.showInt)(s.length(e)))(),$.log(Z.monadEffectEffect)("Could not parse "+z.show(z.showInt)(h.length(h.foldableArray)(_.semiringInt)(t.left))+" annotations.")(),$.log(Z.monadEffectEffect)("Successfully parsed "+z.show(z.showInt)(h.length(h.foldableArray)(_.semiringInt)(t.right))+" annotations.")(),$.log(Z.monadEffectEffect)(t.right)()}))(function(){return a.discard(a.discardUnit)(Y.bindAff)(function(){var e=s.head(t.right);if(e instanceof M.Nothing)return o.pure(Y.applicativeAff)(J.unit);if(e instanceof M.Just)return Z.liftEffect(Y.monadEffectAff)(function(){return $.log(Z.monadEffectEffect)("first annotation: ")(),h.sequence_(V.applicativeEffect)(D.foldableList)(A.map(D.functorList)($.log(Z.monadEffectEffect))(A.map(D.functorList)(function(e){return"> "+e})(ve(e.value0))))()});throw new Error("Failed pattern match at Genetics.Browser.Demo (line 325, column 3 - line 329, column 62): "+[e.constructor.name])}())(function(){return o.pure(Y.applicativeAff)(ie.groupToMap(N.monoidArray)(ce.ordChrId)(h.foldableArray)(o.applicativeArray)(function(e){return e.feature.chr})(t.right))})})})});var t})}},Ue=function(e){return function(n){return function(n){return function(r){var t={segmentPadding:12,coordinateSystem:e},i=ie.trackLikeLayer(new U.IsSymbol(function(){return"genes"}))()(t)(U.SProxy.value)(fe.Center.create(Le(n.genes)));return a.bind(Y.bindAff)(ae.newLayer(Q.monadAffAff)()(oe.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(oe.cacherAffNil(be.refl)))(r)("genes")(i))(function(e){return o.pure(Y.applicativeAff)({genes:function(n){return function(r){return a.discard(a.discardUnit)(Y.bindAff)(e.run({genes:{},view:r}))(function(){return a.bind(Y.bindAff)(e.last.renderables)(e.drawOnCanvas(n))})}}})})}}}},We=function(e){return function(n){return function(r){return a.bind(Y.bindAff)(ae.newLayer(Q.monadAffAff)()(oe.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(oe.cacherAffNil(be.refl)))(r)("chrBackground")(ie.trackLikeLayer(new U.IsSymbol(function(){return"background"}))()(e)(U.SProxy.value)(new fe.Center(ie.chrBackgroundLayer))))(function(t){return a.bind(Y.bindAff)(ae.newLayer(Q.monadAffAff)()(oe.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(oe.cacherAffNil(be.refl)))(r)("chrLabels")(ie.chrLabelsLayer(e)({fontSize:n.chrLabels.fontSize})))(function(r){return o.pure(Y.applicativeAff)(function(i){return function(o){var u={background:{chrBG1:n.chrBG1,chrBG2:n.chrBG2,segmentPadding:e.segmentPadding},view:o};return h.traverse_(Y.applicativeAff)(h.foldableArray)(function(e){return a.discard(a.discardUnit)(Y.bindAff)(e.run(u))(function(){return a.bind(Y.bindAff)(e.last.renderables)(e.drawOnCanvas(i))})})([t,r])}})})})}}},Ke=U.SProxy.value,He=U.SProxy.value,Je=function(e){return function(n){return function(r){var i=pe.build(pe.merge()()(n.vscale))(n.score),u=je(n.score)(r.snps),f=se.insert(new U.IsSymbol(function(){return"entries"}))()()(U.SProxy.value)(ke(h.foldableArray)(A.functorArray)(n.annotations)(r.annotations))(n.legend),c={segmentPadding:12,coordinateSystem:e},d=ie.trackLikeLayer(new U.IsSymbol(function(){return"snps"}))()(c)(Ke)(fe.Center.create(Be(r.snps))),l=ie.trackLikeLayer(new U.IsSymbol(function(){return"annotations"}))()(c)(He)(fe.Center.create(Ge(e)(u)(r.annotations)));return function(e){return a.bind(Y.bindAff)(ae.newLayer(Q.monadAffAff)()(oe.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(oe.cacherAffNil(be.refl)))(e)("ruler")(new fe.Layer(fe.Fixed.value,fe.NoMask.value,new fe.Center(ie.thresholdRuler))))(function(r){return a.bind(Y.bindAff)(ae.newLayer(Q.monadAffAff)()(oe.cacherAffCons(new U.IsSymbol(function(){return"hotspots"}))()()()()(oe.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(oe.cacherAffNil(be.refl))))(e)("snps")(d))(function(u){return a.bind(Y.bindAff)(ae.newLayer(Q.monadAffAff)()(oe.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(oe.cacherAffNil(be.refl)))(e)("annotations")(l))(function(c){return a.bind(Y.bindAff)(ae.newLayer(Q.monadAffAff)()(oe.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(oe.cacherAffNil(be.refl)))(e)("vscale")(we(i)))(function(i){return a.bind(Y.bindAff)(ae.newLayer(Q.monadAffAff)()(oe.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(oe.cacherAffNil(be.refl)))(e)("legend")(Me(f)))(function(e){var f,d=(f={rulerColor:T.wrap(ie.newtypeHexColor)(t.red),threshold:n.score},h.traverse_(Y.applicativeAff)(h.foldableArray)(function(e){return a.discard(a.discardUnit)(Y.bindAff)(e.run(f))(function(){return a.bind(Y.bindAff)(e.last.renderables)(e.drawOnCanvas(new P.Pair(0,0)))})})([e,i,r]));return o.pure(Y.applicativeAff)({snps:function(e){return function(r){return a.discard(a.discardUnit)(Y.bindAff)(u.run({snps:{threshold:n.score,render:n.snps},view:r}))(function(){return a.bind(Y.bindAff)(u.last.renderables)(u.drawOnCanvas(e))})}},annotations:function(e){return function(r){return a.discard(a.discardUnit)(Y.bindAff)(c.run({annotations:{threshold:n.score,render:n.annotations},view:r}))(function(){return a.bind(Y.bindAff)(c.last.renderables)(c.drawOnCanvas(e))})}},hotspots:u.last.hotspots,fixedUI:d})})})})})})}}}};module.exports={renderGenes:Le,drawGene:qe,parseSNP:Se,annotationFields:Re,parseAnnotation:_e,parseAnnotationRest:Oe,showAnnotationField:he,showAnnotation:ve,getSNPs:Ce,getAnnotations:ze,snpPeak:ge,peak1:xe,peaks:Ae,defaultAnnotationsConfig:Fe,annotationLegendEntry:Te,annotationLegendTest:ke,normYLogScore:Ie,dist:Ee,filterSig:je,snpsUI:we,annotationsUI:Me,defaultSNPConfig:De,renderSNPs:Be,annotationsForScale:Ne,renderAnnotationPeaks:Pe,renderAnnotations:Ge,_snps:Ke,_annotations:He,addChrLayers:We,addGWASLayers:Je,addGeneLayers:Ue}; -},{"../Affjax/index.js":"IjAr","../Affjax.ResponseFormat/index.js":"QSsR","../Color/index.js":"f3ma","../Color.Scheme.Clrs/index.js":"rp+n","../Color.Scheme.X11/index.js":"bDzA","../Control.Applicative/index.js":"qYya","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Control.Monad.Error.Class/index.js":"L8Lk","../Control.Monad.Except/index.js":"Fye2","../Control.Monad.Except.Trans/index.js":"gr8B","../Control.Semigroupoid/index.js":"/riR","../Data.Array/index.js":"4t4C","../Data.BigInt/index.js":"Zx+T","../Data.Boolean/index.js":"ObQr","../Data.Either/index.js":"B2JL","../Data.Eq/index.js":"Pq4F","../Data.EuclideanRing/index.js":"2IRB","../Data.Filterable/index.js":"6hfS","../Data.Foldable/index.js":"eVDl","../Data.FoldableWithIndex/index.js":"9Efi","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.FunctorWithIndex/index.js":"OHRN","../Data.Identity/index.js":"2OKT","../Data.Lens.Getter/index.js":"OPOX","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.Lens.Internal.Re/index.js":"IZDD","../Data.Lens.Iso/index.js":"fFCp","../Data.Lens.Lens.Tuple/index.js":"RTVM","../Data.List/index.js":"ezw6","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Pair/index.js":"PpsX","../Data.Profunctor.Strong/index.js":"w9p6","../Data.Ring/index.js":"E2qH","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.Symbol/index.js":"4oJQ","../Data.Traversable/index.js":"n7EE","../Data.Tuple/index.js":"II/O","../Data.Unfoldable/index.js":"77+Z","../Data.Unit/index.js":"NhVk","../Data.Variant/index.js":"hgdh","../Effect/index.js":"oTWB","../Effect.Aff/index.js":"I7lu","../Effect.Aff.Class/index.js":"I4H+","../Effect.Class/index.js":"dWtH","../Effect.Class.Console/index.js":"3Dts","../Effect.Exception/index.js":"0OCW","../Foreign/index.js":"pu1p","../Foreign.Index/index.js":"Ryy1","../Foreign.Keys/index.js":"hcOM","../Genetics.Browser/index.js":"X0te","../Genetics.Browser.Cacher/index.js":"61ee","../Genetics.Browser.Canvas/index.js":"VVkU","../Genetics.Browser.Coordinates/index.js":"7bYH","../Genetics.Browser.Layer/index.js":"YWUW","../Genetics.Browser.Types/index.js":"HhmG","../Graphics.Drawing/index.js":"0WVi","../Math/index.js":"Rpaz","../Record/index.js":"0gG4","../Record.Builder/index.js":"VeY4","../Record.Extra/index.js":"KzZr","../Simple.JSON/index.js":"DqNI","../Type.Equality/index.js":"Uq/R"}],"HH6s":[function(require,module,exports) { -"use strict";var n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),t=require("../Control.Bind/index.js"),u=require("../Data.Foldable/index.js"),e=require("../Data.Functor/index.js"),o=require("../Data.Monoid/index.js"),i=require("../Data.Semigroup/index.js"),f=require("../Data.Symbol/index.js"),c=require("../Effect/index.js"),a=require("../Effect.Aff/index.js"),l=require("../Genetics.Browser.Canvas/index.js"),s=require("../Record/index.js"),d=require("../Type.Data.RowList/index.js"),p=require("../Type.Equality/index.js"),m=function(n){return n},y={},v=function(n){this.buildTrack=n},x=function(n){this.fetchDataImpl=n},g=function(n){this.makeContainersImpl=n},C={},P=function(n){this.getTrackConfigImpl=n},S=function(n){this.getLayerConfigImpl=n},h=function(n){this.getBrowserConfigImpl=n},b={},k={},A=function(n){this.combineFunsImpl=n},w={},R=function(n){this.applyLayerDefImpl=n},I=y,L=function(n){return y},F=function(n){return new v(function(n){return function(n){return function(n){return o.mempty(a.monoidAff(o.monoidRecord()(o.monoidRecordCons(new f.IsSymbol(function(){return"hotspots"}))(a.monoidAff(o.monoidFn(o.monoidFn(o.monoidArray))))()(o.monoidRecordCons(new f.IsSymbol(function(){return"render"}))(o.monoidFn(o.monoidFn(a.monoidAff(o.monoidUnit))))()(o.monoidRecordNil)))))}}})},D=function(r){return new x(function(t){return function(t){return function(t){return n.pure(a.applicativeAff)(p.from(r)({}))}}})},q=function(r){return new g(function(t){return function(t){return function(t){return n.pure(c.applicativeEffect)(p.from(r)({}))}}})},j=function(n){return function(n){return function(n){return function(n){return function(n){return C}}}}},T=function(n){return n.makeContainersImpl},N=function(n){return function(r){return function(t){return function(u){return function(e){return function(o){return function(i){return new g(function(c){return function(c){return function(a){var m=p.from(i)(s.get(n)(t)(f.SProxy.value)(a));return function(){var i=l.trackContainer({width:c,height:m.trackHeight})(m.padding)(f.reflectSymbol(n)(f.SProxy.value))(),y=T(r)(d.RLProxy.value)(c)(s.delete(n)(u)(t)(f.SProxy.value)(p.from(p.refl)(a)))();return s.insert(n)(o)(e)(f.SProxy.value)(i)(y)}}}})}}}}}}},U=function(n){return function(n){return T(n)(d.RLProxy.value)}},E=function(n){return n.getTrackConfigImpl},W=function(n){return function(r){return function(t){return function(u){return function(e){return function(o){return function(i){return function(i){return function(c){return function(c){return function(a){return new P(function(l){return function(d){var m=s.get(n)(o)(p.from(r)(f.SProxy.value))(l),y=s.get(e)(i)(p.from(p.refl)(f.SProxy.value))(m);return s.delete(t)(a)(c)(p.from(u)(f.SProxy.value))(y)}})}}}}}}}}}}},B=function(n){return n.getLayerConfigImpl},M=function(n){return function(r){return function(t){return function(u){return function(e){return function(o){return function(i){return function(c){return function(c){return function(a){return function(a){return function(l){return function(l){return function(d){return new S(function(d){return function(m){return function(m){var y=s.get(n)(i)(p.from(r)(f.SProxy.value))(d),v=s.get(e)(c)(p.from(p.refl)(f.SProxy.value))(y),x=s.get(t)(a)(p.from(u)(f.SProxy.value))(v);return s.get(o)(l)(p.from(p.refl)(f.SProxy.value))(x)}}})}}}}}}}}}}}}}},H=function(n){return n.getBrowserConfigImpl},G=function(n){return function(r){return function(t){return function(u){return function(e){return function(o){return function(o){return function(i){return new h(function(c){var a=s.get(n)(e)(p.from(r)(f.SProxy.value))(c);return s.delete(t)(i)(o)(p.from(u)(f.SProxy.value))(a)})}}}}}}}},z=function(n){return n.fetchDataImpl},J=function(r){return function(e){return function(o){return function(i){return function(c){return function(l){return function(p){return function(m){return new x(function(y){return function(y){return function(v){return t.bind(a.bindAff)(z(m)(d.RLProxy.value)(s.delete(r)(e)(o)(f.SProxy.value)(y))(v))(function(e){return t.bind(a.bindAff)(u.foldMap(u.foldableMaybe)(a.monoidAff(i))(s.get(r)(o)(f.SProxy.value)(y))(s.get(r)(c)(f.SProxy.value)(v)))(function(t){return n.pure(a.applicativeAff)(s.insert(r)(l)(p)(f.SProxy.value)(t)(e))})})}}})}}}}}}}},K=function(n){return function(n){return function(n){return function(r){return function(t){return function(u){return l.withLoadingIndicator(a.monadEffectAff)(r)(z(n)(d.RLProxy.value)(t)(u))}}}}}},O=b,Q=b,V=function(n){return b},X=function(n){return b},Y=k,Z=function(n){return function(n){return function(n){return k}}},$=function(n){return n.combineFunsImpl},_=function(n){return function(n){return function(r){return function(t){return $(n)(d.RLProxy.value)(r)(t)}}}},nn=function(n){return new A(function(r){return function(r){return function(r){return p.from(n)({})}}})},rn=function(n){return function(r){return function(t){return function(u){return function(u){return function(e){return function(o){return new A(function(i){return function(i){return function(c){var a=$(o)(d.RLProxy.value)(s.delete(n)(r)(t)(f.SProxy.value)(i))(c),l=s.get(n)(t)(f.SProxy.value)(i);return s.insert(n)(u)(e)(f.SProxy.value)(l(c))(a)}}})}}}}}}},tn=function(n){return n.buildTrack},un=function(n){return function(n){return function(r){return function(t){return tn(n)(d.RLProxy.value)(r)(t)}}}},en=function(u){return function(o){return function(c){return function(l){return function(m){return new v(function(y){return function(y){return function(v){return t.bind(a.bindAff)(tn(m)(d.RLProxy.value)(s.delete(u)(o)(c)(f.SProxy.value)(y))(v))(function(t){var o=r.apply(a.applyAff)(e.map(a.functorAff)(function(n){return function(r){return function(t){return function(u){return i.append(i.semigroupArray)(n(t)(p.from(l)(u)))(r(t)(u))}}}})(s.get(u)(c)(f.SProxy.value)(y)))(t.hotspots);return n.pure(a.applicativeAff)({render:t.render,hotspots:o})})}}})}}}}},on=function(r){return function(u){return function(e){return function(o){return new v(function(c){return function(c){return function(l){return t.bind(a.bindAff)(tn(o)(d.RLProxy.value)(s.delete(r)(u)(e)(f.SProxy.value)(c))(l))(function(t){return n.pure(a.applicativeAff)({render:i.append(i.semigroupFn(i.semigroupFn(a.semigroupAff(i.semigroupUnit))))(function(n){return function(t){return s.get(r)(e)(f.SProxy.value)(c)(n)(t)}})(t.render),hotspots:t.hotspots})})}}})}}}},fn=function(r){return function(u){return function(e){return function(o){return new v(function(c){return function(c){return function(l){return t.bind(a.bindAff)(tn(o)(d.RLProxy.value)(s.delete(r)(u)(e)(f.SProxy.value)(c))(l))(function(t){return n.pure(a.applicativeAff)({render:i.append(i.semigroupFn(i.semigroupFn(a.semigroupAff(i.semigroupUnit))))(function(n){return function(n){return s.get(r)(e)(f.SProxy.value)(c)}})(t.render),hotspots:t.hotspots})})}}})}}}},cn=function(n){return function(n){return function(n){return function(r){return function(t){return new R(function(u){return function(e){return function(o){return function(i){var f=E(r)(i)(e),c=B(t)(i)(e)(o),a=H(n)(i);return u({browserConfig:a,trackConfig:f,layerConfig:c})}}}})}}}}},an=function(n){return n.applyLayerDefImpl},ln=function(n){return function(n){return function(n){return an(n)}}};module.exports={TrackRecord:v,buildTrack:tn,makeTrack:un,TrackConfig:g,makeContainersImpl:T,makeContainers:U,TrackData:x,fetchDataImpl:z,fetchData:K,CombineFuns:A,combineFunsImpl:$,combineFuns:_,SafeUnion:C,UnionConflict:y,ConflictingList:k,ConflictsWith:b,LayerDef:m,trackRecordRender:on,trackRecordUI:fn,trackRecordHotspots:en,trackRecordNil:F,trackConfigNil:q,trackConfigCons:N,trackDataCons:J,trackDataNil:D,combineFunCons:rn,combineFunNil:nn,conflictsWithNil:O,conflictsWithCons1:X,conflictsWithCons3:Q,conflictsWithCons2:V,conflictingListNil:Y,conflictingListCons:Z,unionConflictFail:L,unionConflictSuccess:I,safeUnion:j}; -},{"../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Data.Foldable/index.js":"eVDl","../Data.Functor/index.js":"+0AE","../Data.Monoid/index.js":"TiEB","../Data.Semigroup/index.js":"EsAJ","../Data.Symbol/index.js":"4oJQ","../Effect/index.js":"oTWB","../Effect.Aff/index.js":"I7lu","../Genetics.Browser.Canvas/index.js":"VVkU","../Record/index.js":"0gG4","../Type.Data.RowList/index.js":"XaXP","../Type.Equality/index.js":"Uq/R"}],"nvf7":[function(require,module,exports) { -"use strict";exports.onTimeout=function(n){return function(t){return function(){var u=null;return{run:function(){u&&clearTimeout(u),u=setTimeout(function(){u=null,t()},n)},cancel:function(){clearTimeout(u)}}}}},exports.onFrame=function(n){return function(){var t=null;return{run:function(){t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame(function(u){n(),t=null})},cancel:function(){t&&(window.cancelAnimationFrame(t),t=null)}}}}; -},{}],"Tmz+":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),n=require("../Control.Bind/index.js"),r=require("../Control.Category/index.js"),t=require("../Data.BigInt/index.js"),i=require("../Data.Either/index.js"),o=require("../Data.Foldable/index.js"),u=require("../Data.Function/index.js"),a=require("../Data.Lens.Getter/index.js"),c=require("../Data.List.Types/index.js"),s=require("../Data.Monoid/index.js"),f=require("../Data.Newtype/index.js"),l=require("../Data.Ord/index.js"),d=require("../Data.Pair/index.js"),w=require("../Data.Semigroup/index.js"),m=require("../Data.Semiring/index.js"),v=require("../Data.Show/index.js"),p=require("../Effect/index.js"),g=require("../Effect.Class/index.js"),q=require("../Effect.Ref/index.js"),h=require("../Genetics.Browser.Canvas/index.js"),y=require("../Genetics.Browser.Coordinates/index.js"),j=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),x=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),B=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),V=function(e){return f.over(y.coordsysviewNewtype)(y.coordsysviewNewtype)(y.CoordSysView)(function(){if(e instanceof x)return function(n){return y.scalePairBy(n)(e.value0)};if(e instanceof j)return function(n){return y.translatePairBy(n)(e.value0)};if(e instanceof B)return e.value0;throw new Error("Failed pattern match at Genetics.Browser.UI.View (line 58, column 39 - line 61, column 20): "+[e.constructor.name])}())},E=new v.Show(function(e){return e instanceof j?"(Scroll by "+v.show(v.showNumber)(e.value0)+")":e instanceof x?"(Zoom by "+v.show(v.showNumber)(e.value0)+")":"(ModView)"}),D=new w.Semigroup(function(e){return function(n){return e instanceof j&&n instanceof j?new j(e.value0+n.value0):e instanceof x&&n instanceof x?new x(e.value0*n.value0):n}}),I=new s.Monoid(function(){return D},new B(r.identity(r.categoryFn))),S=function(n){return function(r){return function(t){return function(o){return function(u){return function(){var a=q.new(o.position)(),c=q.new(o.velocity)(),f=e.onTimeout(u)(function(){var e=q.read(a)();return t(new i.Left(e))()})(),l=e.onFrame(function(){var e=q.read(c)();q.write(s.mempty(n))(c)();var o=q.read(a)();return q.write(r.step(e)(o))(a)(),t(i.Right.create(r.animate(e)(o)))(),f.run()})(),d=q.read(c);return{update:function(e){return function(){return q.modify_(function(r){return w.append(n.Semigroup0())(r)(e)})(c)(),l.run()}},position:q.read(a),velocity:d}}}}}}},T=function(e){return function(r){return function(f){return function(w){return function(){var v=q.new(s.mempty(c.monoidList))(),E={position:f.initialView,velocity:s.mempty(I)},D=S(I)({step:function(n){var r=y.normalizeView(e)(t.fromInt(2e5)),i=V(n);return function(e){return r(i(e))}},animate:function(n){return function(r){if(n instanceof j)return new h.Scrolling((i=r,function(n){return n<0?l.lessThanOrEq(t.ordBigInt)(i.value0)(m.zero(t.semiringBigInt))?0:n:l.greaterThanOrEq(t.ordBigInt)(i.value1)(a.viewOn(e)(y._TotalSize(t.ringBigInt)))?0:n})(n.value0));var i;if(n instanceof x)return new h.Zooming(function(n){return function(r){var i=(r-1)/2,o=l.lessThanOrEq(t.ordBigInt)(n.value0)(m.zero(t.semiringBigInt))?0:-i,u=l.greaterThanOrEq(t.ordBigInt)(n.value1)(a.viewOn(e)(y._TotalSize(t.ringBigInt)))?1:1+i;return new d.Pair(o,u)}}(r)(n.value0));if(n instanceof B)return h.Jump.value;throw new Error("Failed pattern match at Genetics.Browser.UI.View (line 130, column 24 - line 133, column 29): "+[n.constructor.name])}}})(function(e){if(e instanceof i.Right)return h.forTracks_(g.monadEffectEffect)(w)(u.flip(h.animateTrack)(e.value0));if(e instanceof i.Left)return n.bind(p.bindEffect)(q.read(v))(o.traverse_(p.applicativeEffect)(c.foldableList)(function(n){return n(e.value0)}));throw new Error("Failed pattern match at Genetics.Browser.UI.View (line 151, column 18 - line 153, column 54): "+[e.constructor.name])})(E)(r)();return{updateView:D.update,browserView:D.position,addCallback:function(e){return q.modify_(c.Cons.create(e))(v)}}}}}}};module.exports={ScrollView:j,ZoomView:x,ModView:B,updateViewFold:V,animateDelta:S,browserViewManager:T,showUpdateView:E,semigroupUpdateView:D,monoidUpdateView:I,onTimeout:e.onTimeout,onFrame:e.onFrame}; -},{"./foreign.js":"nvf7","../Control.Bind/index.js":"7VcT","../Control.Category/index.js":"IAi2","../Data.BigInt/index.js":"Zx+T","../Data.Either/index.js":"B2JL","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Lens.Getter/index.js":"OPOX","../Data.List.Types/index.js":"Xxuc","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Ord/index.js":"r4Vb","../Data.Pair/index.js":"PpsX","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Effect/index.js":"oTWB","../Effect.Class/index.js":"dWtH","../Effect.Ref/index.js":"/Jaj","../Genetics.Browser.Canvas/index.js":"VVkU","../Genetics.Browser.Coordinates/index.js":"7bYH"}],"CI3f":[function(require,module,exports) { -"use strict";var t=function(t){return function(e){return function(){return e[t]}}};exports.url=t("URL"),exports.documentURI=t("documentURI"),exports.origin=t("origin"),exports.compatMode=t("compatMode"),exports.characterSet=t("characterSet"),exports.contentType=t("contentType"),exports._doctype=t("doctype"),exports._documentElement=t("documentElement"),exports.getElementsByTagName=function(t){return function(e){return function(){return e.getElementsByTagName(t)}}},exports._getElementsByTagNameNS=function(t){return function(e){return function(n){return function(){return n.getElementsByTagNameNS(t,e)}}}},exports.getElementsByClassName=function(t){return function(e){return function(){return e.getElementsByClassName(t)}}},exports.createElement=function(t){return function(e){return function(){return e.createElement(t)}}},exports._createElementNS=function(t){return function(e){return function(n){return function(){return n.createElementNS(t,e)}}}},exports.createDocumentFragment=function(t){return function(){return t.createDocumentFragment()}},exports.createTextNode=function(t){return function(e){return function(){return e.createTextNode(t)}}},exports.createComment=function(t){return function(e){return function(){return e.createComment(t)}}},exports.createProcessingInstruction=function(t){return function(e){return function(n){return function(){return n.createProcessingInstruction(t,e)}}}},exports.importNode=function(t){return function(e){return function(n){return function(){return n.importNode(t,e)}}}},exports.adoptNode=function(t){return function(e){return function(){return e.adoptNode(t)}}}; -},{}],"0hiR":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),t=require("../Data.Functor/index.js"),n=require("../Data.Nullable/index.js"),o=require("../Effect/index.js"),r=require("../Unsafe.Coerce/index.js"),a=require("../Web.Internal.FFI/index.js"),c=r.unsafeCoerce,u=r.unsafeCoerce,m=r.unsafeCoerce,d=r.unsafeCoerce,s=function(t){return e._getElementsByTagNameNS(n.toNullable(t))},i=a.unsafeReadProtoTagged("Document"),l=a.unsafeReadProtoTagged("Document"),f=a.unsafeReadProtoTagged("Document"),g=a.unsafeReadProtoTagged("Document"),N=function(){var r=t.map(o.functorEffect)(n.toMaybe);return function(t){return r(e._documentElement(t))}}(),E=function(){var r=t.map(o.functorEffect)(n.toMaybe);return function(t){return r(e._doctype(t))}}(),T=function(t){return e._createElementNS(n.toNullable(t))};module.exports={fromNode:f,fromParentNode:i,fromNonElementParentNode:l,fromEventTarget:g,toNode:m,toParentNode:c,toNonElementParentNode:u,toEventTarget:d,doctype:E,documentElement:N,getElementsByTagNameNS:s,createElementNS:T,url:e.url,documentURI:e.documentURI,origin:e.origin,compatMode:e.compatMode,characterSet:e.characterSet,contentType:e.contentType,getElementsByTagName:e.getElementsByTagName,getElementsByClassName:e.getElementsByClassName,createElement:e.createElement,createDocumentFragment:e.createDocumentFragment,createTextNode:e.createTextNode,createComment:e.createComment,createProcessingInstruction:e.createProcessingInstruction,importNode:e.importNode,adoptNode:e.adoptNode}; -},{"./foreign.js":"CI3f","../Data.Functor/index.js":"+0AE","../Data.Nullable/index.js":"YQ8o","../Effect/index.js":"oTWB","../Unsafe.Coerce/index.js":"ETUV","../Web.Internal.FFI/index.js":"fdUh"}],"9SEv":[function(require,module,exports) { -"use strict";var e=function(e){return function(t){return function(){return t[e]}}};exports.children=e("children"),exports._firstElementChild=e("firstElementChild"),exports._lastElementChild=e("lastElementChild"),exports.childElementCount=e("childElementCount"),exports._querySelector=function(e){return function(t){return function(){return t.querySelector(e)}}},exports.querySelectorAll=function(e){return function(t){return function(){return t.querySelectorAll(e)}}}; -},{}],"lU5U":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),r=require("../Data.Eq/index.js"),t=require("../Data.Functor/index.js"),n=require("../Data.Newtype/index.js"),u=require("../Data.Nullable/index.js"),i=require("../Data.Ord/index.js"),l=require("../Effect/index.js"),o=function(e){return e},c=function(r){var n=t.map(l.functorEffect)(u.toMaybe),i=e._querySelector(r);return function(e){return n(i(e))}},a=i.ordString,f=new n.Newtype(function(e){return e},o),d=function(){var r=t.map(l.functorEffect)(u.toMaybe);return function(t){return r(e._lastElementChild(t))}}(),q=function(){var r=t.map(l.functorEffect)(u.toMaybe);return function(t){return r(e._firstElementChild(t))}}(),s=r.eqString;module.exports={firstElementChild:q,lastElementChild:d,QuerySelector:o,querySelector:c,eqQuerySelector:s,ordQuerySelector:a,newtypeQuerySelector:f,children:e.children,childElementCount:e.childElementCount,querySelectorAll:e.querySelectorAll}; -},{"./foreign.js":"9SEv","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Nullable/index.js":"YQ8o","../Data.Ord/index.js":"r4Vb","../Effect/index.js":"oTWB"}],"UOgE":[function(require,module,exports) { -"use strict";exports.window=function(){return window}; -},{}],"UQRJ":[function(require,module,exports) { -"use strict";var e=require("./foreign.js");module.exports={window:e.window}; -},{"./foreign.js":"UOgE"}],"dln3":[function(require,module,exports) { -"use strict";exports._body=function(t){return function(){return t.body}},exports._readyState=function(t){return function(){return t.readyState}},exports._activeElement=function(t){return function(){return t.activeElement}},exports._currentScript=function(t){return function(){return t.currentScript}},exports.referrer=function(t){return function(){return t.referrer}},exports.title=function(t){return function(){return t.title}},exports.setTitle=function(t){return function(r){return function(){return r.title=t,{}}}}; -},{}],"v4VO":[function(require,module,exports) { -"use strict";var n=require("../Data.Eq/index.js"),e=require("../Data.Maybe/index.js"),t=require("../Data.Ord/index.js"),r=require("../Data.Ordering/index.js"),a=require("../Data.Show/index.js"),i=function(){function n(){}return n.value=new n,n}(),o=function(){function n(){}return n.value=new n,n}(),u=function(){function n(){}return n.value=new n,n}(),c=new a.Show(function(n){if(n instanceof i)return"Loading";if(n instanceof o)return"Interactive";if(n instanceof u)return"Complete";throw new Error("Failed pattern match at Web.HTML.HTMLDocument.ReadyState (line 15, column 10 - line 18, column 27): "+[n.constructor.name])}),f=function(n){if(n instanceof i)return"loading";if(n instanceof o)return"interactive";if(n instanceof u)return"complete";throw new Error("Failed pattern match at Web.HTML.HTMLDocument.ReadyState (line 21, column 9 - line 24, column 25): "+[n.constructor.name])},s=function(n){return"loading"===n?new e.Just(i.value):"interactive"===n?new e.Just(o.value):"complete"===n?new e.Just(u.value):e.Nothing.value},l=new n.Eq(function(n){return function(e){return n instanceof i&&e instanceof i||(n instanceof o&&e instanceof o||n instanceof u&&e instanceof u)}}),d=new t.Ord(function(){return l},function(n){return function(e){if(n instanceof i&&e instanceof i)return r.EQ.value;if(n instanceof i)return r.LT.value;if(e instanceof i)return r.GT.value;if(n instanceof o&&e instanceof o)return r.EQ.value;if(n instanceof o)return r.LT.value;if(e instanceof o)return r.GT.value;if(n instanceof u&&e instanceof u)return r.EQ.value;throw new Error("Failed pattern match at Web.HTML.HTMLDocument.ReadyState (line 12, column 1 - line 12, column 48): "+[n.constructor.name,e.constructor.name])}});module.exports={Loading:i,Interactive:o,Complete:u,print:f,parse:s,eqReadyState:l,ordReadyState:d,showReadyState:c}; -},{"../Data.Eq/index.js":"Pq4F","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Data.Show/index.js":"mFY7"}],"EU5r":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),r=require("../Data.Functor/index.js"),t=require("../Data.Maybe/index.js"),n=require("../Data.Nullable/index.js"),o=require("../Effect/index.js"),a=require("../Unsafe.Coerce/index.js"),u=require("../Web.HTML.HTMLDocument.ReadyState/index.js"),f=require("../Web.Internal.FFI/index.js"),c=a.unsafeCoerce,i=a.unsafeCoerce,d=a.unsafeCoerce,s=a.unsafeCoerce,m=a.unsafeCoerce,T=function(){var n,a=r.map(o.functorEffect)((n=t.fromMaybe(u.Loading.value),function(e){return n(u.parse(e))}));return function(r){return a(e._readyState(r))}}(),g=f.unsafeReadProtoTagged("HTMLDocument"),l=f.unsafeReadProtoTagged("HTMLDocument"),M=f.unsafeReadProtoTagged("HTMLDocument"),D=f.unsafeReadProtoTagged("HTMLDocument"),E=f.unsafeReadProtoTagged("HTMLDocument"),b=function(){var t=r.map(o.functorEffect)(n.toMaybe);return function(r){return t(e._currentScript(r))}}(),v=function(){var t=r.map(o.functorEffect)(n.toMaybe);return function(r){return t(e._body(r))}}(),y=function(){var t=r.map(o.functorEffect)(n.toMaybe);return function(r){return t(e._activeElement(r))}}();module.exports={fromDocument:E,fromNode:M,fromParentNode:g,fromNonElementParentNode:l,fromEventTarget:D,toDocument:m,toNode:d,toParentNode:c,toNonElementParentNode:i,toEventTarget:s,body:v,readyState:T,activeElement:y,currentScript:b,referrer:e.referrer,title:e.title,setTitle:e.setTitle}; -},{"./foreign.js":"dln3","../Data.Functor/index.js":"+0AE","../Data.Maybe/index.js":"5mN7","../Data.Nullable/index.js":"YQ8o","../Effect/index.js":"oTWB","../Unsafe.Coerce/index.js":"ETUV","../Web.HTML.HTMLDocument.ReadyState/index.js":"v4VO","../Web.Internal.FFI/index.js":"fdUh"}],"qu+f":[function(require,module,exports) { -"use strict";exports.document=function(n){return function(){return n.document}},exports.navigator=function(n){return function(){return n.navigator}},exports.location=function(n){return function(){return n.location}},exports.history=function(n){return function(){return n.history}},exports.innerWidth=function(n){return function(){return n.innerWidth}},exports.innerHeight=function(n){return function(){return n.innerHeight}},exports.alert=function(n){return function(r){return function(){return r.alert(n),{}}}},exports.confirm=function(n){return function(r){return function(){return r.confirm(n)}}},exports.moveBy=function(n){return function(r){return function(t){return function(){return t.moveBy(n,r),{}}}}},exports.moveTo=function(n){return function(r){return function(t){return function(){return t.moveTo(n,r),{}}}}},exports._open=function(n){return function(r){return function(t){return function(e){return function(){return e.open(n,r,t)}}}}},exports.outerHeight=function(n){return function(){return n.outerHeight}},exports.outerWidth=function(n){return function(){return n.outerWidth}},exports.print=function(n){return function(){return n.print(),{}}},exports._prompt=function(n){return function(r){return function(t){return function(){return t.prompt(n,r)}}}},exports.resizeBy=function(n){return function(r){return function(t){return function(){return t.resizeBy(n,r),{}}}}},exports.resizeTo=function(n){return function(r){return function(t){return function(){return t.resizeTo(n,r),{}}}}},exports.screenX=function(n){return function(){return n.screenX}},exports.screenY=function(n){return function(){return n.screenY}},exports.scroll=function(n){return function(r){return function(t){return function(){return t.scroll(n,r),{}}}}},exports.scrollBy=function(n){return function(r){return function(t){return function(){return t.scrollBy(n,r),{}}}}},exports.scrollX=function(n){return function(){return n.scrollX}},exports.scrollY=function(n){return function(){return n.scrollY}},exports.localStorage=function(n){return function(){return n.localStorage}},exports.sessionStorage=function(n){return function(){return n.sessionStorage}},exports._requestAnimationFrame=function(n){return function(r){return function(){return r.requestAnimationFrame(n)}}},exports._cancelAnimationFrame=function(n){return function(r){return function(){return r.cancelAnimationFrame(n)}}},exports._requestIdleCallback=function(n){return function(r){return function(t){return function(){return t.requestIdleCallback(r,n)}}}},exports._cancelIdleCallback=function(n){return function(r){return function(){return r.cancelIdleCallback(n)}}},exports.parent=function(n){return function(){return n.parent}},exports._opener=function(n){return function(){return n.opener}}; -},{}],"o+50":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),n=require("../Data.Eq/index.js"),r=require("../Data.Functor/index.js"),t=require("../Data.Newtype/index.js"),o=require("../Data.Nullable/index.js"),u=require("../Data.Ord/index.js"),i=require("../Effect/index.js"),c=require("../Unsafe.Coerce/index.js"),a=function(e){return e},f=function(e){return e},l=c.unsafeCoerce,s=function(n){return function(t){var o=r.map(i.functorEffect)(a),u=e._requestIdleCallback(n)(t);return function(e){return o(u(e))}}},m=function(n){var t=r.map(i.functorEffect)(f),o=e._requestAnimationFrame(n);return function(e){return t(o(e))}},d=function(n){return function(t){return function(u){return r.map(i.functorEffect)(o.toMaybe)(e._prompt(n)(t)(u))}}},p=function(n){return function(t){return r.map(i.functorEffect)(o.toMaybe)(e._prompt(n)("")(t))}},q=function(n){return r.map(i.functorEffect)(o.toMaybe)(e._opener(n))},y=function(n){return function(t){return function(u){return function(c){return r.map(i.functorEffect)(o.toMaybe)(e._open(n)(t)(u)(c))}}}},I=new t.Newtype(function(e){return e},a),w=new t.Newtype(function(e){return e},f),b=new n.Eq(function(e){return function(n){return e===n}}),g=new u.Ord(function(){return b},function(e){return function(n){return u.compare(u.ordInt)(e)(n)}}),E=new n.Eq(function(e){return function(n){return e===n}}),h=new u.Ord(function(){return E},function(e){return function(n){return u.compare(u.ordInt)(e)(n)}}),v=function(n){return e._cancelIdleCallback(t.unwrap(I)(n))},C=function(n){return e._cancelAnimationFrame(t.unwrap(w)(n))};module.exports={toEventTarget:l,open:y,prompt:p,promptDefault:d,requestAnimationFrame:m,cancelAnimationFrame:C,requestIdleCallback:s,cancelIdleCallback:v,opener:q,newtypeRequestAnimationFrameId:w,eqRequestAnimationFrameId:E,ordRequestAnimationFrameId:h,newtypeRequestIdleCallbackId:I,eqRequestIdleCallbackId:b,ordRequestIdleCallbackId:g,document:e.document,navigator:e.navigator,location:e.location,history:e.history,innerWidth:e.innerWidth,innerHeight:e.innerHeight,alert:e.alert,confirm:e.confirm,moveBy:e.moveBy,moveTo:e.moveTo,outerHeight:e.outerHeight,outerWidth:e.outerWidth,print:e.print,resizeBy:e.resizeBy,resizeTo:e.resizeTo,screenX:e.screenX,screenY:e.screenY,scroll:e.scroll,scrollBy:e.scrollBy,scrollX:e.scrollX,scrollY:e.scrollY,localStorage:e.localStorage,sessionStorage:e.sessionStorage,parent:e.parent}; -},{"./foreign.js":"qu+f","../Data.Eq/index.js":"Pq4F","../Data.Functor/index.js":"+0AE","../Data.Newtype/index.js":"lz8k","../Data.Nullable/index.js":"YQ8o","../Data.Ord/index.js":"r4Vb","../Effect/index.js":"oTWB","../Unsafe.Coerce/index.js":"ETUV"}],"MKE0":[function(require,module,exports) { -"use strict";exports.key=function(t){return t.key},exports.code=function(t){return t.code},exports.locationIndex=function(t){return t.location},exports.ctrlKey=function(t){return t.ctrlKey},exports.shiftKey=function(t){return t.shiftKey},exports.altKey=function(t){return t.altKey},exports.metaKey=function(t){return t.metaKey},exports.repeat=function(t){return t.repeat},exports.isComposing=function(t){return t.isComposing},exports.getModifierState=function(t){return function(e){return function(){return e.getModifierState(t)}}}; -},{}],"o/+T":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),n=require("../Data.Bounded/index.js"),t=require("../Data.Enum/index.js"),r=require("../Data.Eq/index.js"),o=require("../Data.Maybe/index.js"),u=require("../Data.Ord/index.js"),a=require("../Data.Ordering/index.js"),i=require("../Unsafe.Coerce/index.js"),c=require("../Web.Internal.FFI/index.js"),f=function(){function e(){}return e.value=new e,e}(),s=function(){function e(){}return e.value=new e,e}(),d=function(){function e(){}return e.value=new e,e}(),l=function(){function e(){}return e.value=new e,e}(),v=i.unsafeCoerce,m=i.unsafeCoerce,E=function(e){return 0===e?new o.Just(f.value):1===e?new o.Just(s.value):2===e?new o.Just(d.value):3===e?new o.Just(l.value):o.Nothing.value},y=c.unsafeReadProtoTagged("KeyboardEvent"),K=c.unsafeReadProtoTagged("KeyboardEvent"),w=function(e){if(e instanceof f)return 0;if(e instanceof s)return 1;if(e instanceof d)return 2;if(e instanceof l)return 3;throw new Error("Failed pattern match at Web.UIEvent.KeyboardEvent (line 107, column 3 - line 111, column 16): "+[e.constructor.name])},g=new r.Eq(function(e){return function(n){return e instanceof f&&n instanceof f||(e instanceof s&&n instanceof s||(e instanceof d&&n instanceof d||e instanceof l&&n instanceof l))}}),q=new u.Ord(function(){return g},function(e){return function(n){if(e instanceof f&&n instanceof f)return a.EQ.value;if(e instanceof f)return a.LT.value;if(n instanceof f)return a.GT.value;if(e instanceof s&&n instanceof s)return a.EQ.value;if(e instanceof s)return a.LT.value;if(n instanceof s)return a.GT.value;if(e instanceof d&&n instanceof d)return a.EQ.value;if(e instanceof d)return a.LT.value;if(n instanceof d)return a.GT.value;if(e instanceof l&&n instanceof l)return a.EQ.value;throw new Error("Failed pattern match at Web.UIEvent.KeyboardEvent (line 81, column 1 - line 81, column 50): "+[e.constructor.name,n.constructor.name])}}),x=new t.Enum(function(){return q},t.defaultPred(E)(w),t.defaultSucc(E)(w)),L=new n.Bounded(function(){return q},f.value,l.value),b=new t.BoundedEnum(function(){return L},function(){return x},4,w,E),j=function(n){var r=o.fromJust(n),u=t.toEnum(b);return function(n){return r(u(e.locationIndex(n)))}};module.exports={fromUIEvent:y,fromEvent:K,toUIEvent:v,toEvent:m,location:j,Standard:f,Left:s,Right:d,Numpad:l,toEnumKeyLocation:E,fromEnumKeyLocation:w,eqKeyLocation:g,ordKeyLocation:q,boundedKeyLocation:L,enumKeyLocation:x,boundedEnumKeyLocation:b,key:e.key,code:e.code,locationIndex:e.locationIndex,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,repeat:e.repeat,isComposing:e.isComposing,getModifierState:e.getModifierState}; -},{"./foreign.js":"MKE0","../Data.Bounded/index.js":"kcUU","../Data.Enum/index.js":"oOsU","../Data.Eq/index.js":"Pq4F","../Data.Maybe/index.js":"5mN7","../Data.Ord/index.js":"r4Vb","../Data.Ordering/index.js":"5Eun","../Unsafe.Coerce/index.js":"ETUV","../Web.Internal.FFI/index.js":"fdUh"}],"JuOH":[function(require,module,exports) { -"use strict";var e=require("./foreign.js"),n=require("../Control.Applicative/index.js"),r=require("../Control.Apply/index.js"),t=require("../Control.Bind/index.js"),i=require("../Data.Array/index.js"),o=require("../Data.Bifunctor/index.js"),a=require("../Data.BigInt/index.js"),u=require("../Data.Either/index.js"),f=require("../Data.Filterable/index.js"),s=require("../Data.Foldable/index.js"),d=require("../Data.Function/index.js"),c=require("../Data.Functor/index.js"),l=require("../Data.Generic.Rep/index.js"),w=require("../Data.Generic.Rep.Show/index.js"),m=require("../Data.Int/index.js"),b=require("../Data.Lens.Getter/index.js"),p=require("../Data.Lens.Internal.Forget/index.js"),y=require("../Data.Lens.Iso.Newtype/index.js"),I=require("../Data.List.Types/index.js"),S=require("../Data.Map.Internal/index.js"),g=require("../Data.Maybe/index.js"),v=require("../Data.Monoid/index.js"),h=require("../Data.Newtype/index.js"),C=require("../Data.Pair/index.js"),A=require("../Data.Semigroup/index.js"),E=require("../Data.Semiring/index.js"),x=require("../Data.Show/index.js"),F=require("../Data.Symbol/index.js"),N=require("../Data.Time.Duration/index.js"),M=require("../Data.Tuple/index.js"),j=require("../Data.Unit/index.js"),q=require("../Data.Variant/index.js"),D=require("../Data.Variant.Internal/index.js"),k=require("../Effect/index.js"),B=require("../Effect.Aff/index.js"),T=require("../Effect.Aff.AVar/index.js"),R=require("../Effect.Class/index.js"),G=require("../Effect.Class.Console/index.js"),L=require("../Effect.Exception/index.js"),U=require("../Effect.Ref/index.js"),z=require("../Foreign/index.js"),H=require("../Genetics.Browser/index.js"),V=require("../Genetics.Browser.Bed/index.js"),P=require("../Genetics.Browser.Canvas/index.js"),_=require("../Genetics.Browser.Coordinates/index.js"),O=require("../Genetics.Browser.Demo/index.js"),W=require("../Genetics.Browser.Layer/index.js"),J=require("../Genetics.Browser.Track/index.js"),Z=require("../Genetics.Browser.Types/index.js"),X=require("../Genetics.Browser.UI.View/index.js"),Y=require("../Global.Unsafe/index.js"),K=require("../Math/index.js"),Q=require("../Record/index.js"),$=require("../Simple.JSON/index.js"),ee=require("../Type.Equality/index.js"),ne=require("../Web.DOM.Document/index.js"),re=require("../Web.DOM.Element/index.js"),te=require("../Web.DOM.Node/index.js"),ie=require("../Web.DOM.ParentNode/index.js"),oe=require("../Web.HTML/index.js"),ae=require("../Web.HTML.HTMLDocument/index.js"),ue=require("../Web.HTML.Window/index.js"),fe=require("../Web.UIEvent.KeyboardEvent/index.js"),se=function(){function e(){}return e.value=new e,e}(),de=function(){function e(){}return e.value=new e,e}(),ce=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),le=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),we=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),me=function(e){return function(n){return"<"+e+">"+n+"</"+e+">"}},be=function(n){return function(r){if(r instanceof se)return P.setElementStyle(n)("visibility")("visible");if(r instanceof de)return P.setElementStyle(n)("visibility")("hidden");if(r instanceof le)return P.setElementStyle(n)("left")(x.show(x.showInt)(r.value0)+"px");if(r instanceof ce)return P.setElementStyle(n)("top")(x.show(x.showInt)(r.value0)+"px");if(r instanceof we)return e.setElementContents(n)(r.value0);throw new Error("Failed pattern match at Genetics.Browser.UI (line 335, column 3 - line 345, column 33): "+[r.constructor.name])}},pe=function(e){var n,r,t,i=s.foldMap(s.foldableArray)(v.monoidString)(me("p"))(["SNP: "+e.feature.name,"Chr: "+x.show(Z.showChrId)(e.feature.chrId),"Pos: "+x.show(Z.showBp)(C.fst(e.position)),"-log10: "+b.viewOn(e.feature.score)((n=Z._NegLog10(p.profunctorForget),r=y._Newtype(Z.newtypeNegLog10)(Z.newtypeNegLog10)(p.profunctorForget),t=Z._prec(4),function(e){return n(r(t(e)))}))]);return me("div")(i)},ye=function(e){var n=s.length(s.foldableArray)(E.semiringInt)(e);return function(){return G.log(R.monadEffectEffect)("showing "+x.show(x.showInt)(5)+" out of "+x.show(x.showInt)(n)+" clicked glyphs")(),s.for_(k.applicativeEffect)(s.foldableArray)(i.take(5)(e))((r=G.log(R.monadEffectEffect),function(e){return r(e)}))();var r}},Ie=function(e){return function(n){var r=i.uncons(n.elements);if(r instanceof g.Nothing)return"";if(r instanceof g.Just&&0===r.value0.tail.length)return e(r.value0.head);if(r instanceof g.Just)return me("div")(me("p")(x.show(x.showInt)(s.length(s.foldableArray)(E.semiringInt)(r.value0.tail)+1|0)+" annotations"));throw new Error("Failed pattern match at Genetics.Browser.UI (line 244, column 3 - line 249, column 51): "+[r.constructor.name])}},Se=c.map(c.functorArray)(o.bimap(M.bifunctorTuple)(Z.ChrId)(function(){var e=g.fromJust();return function(n){return e(a.fromString(n))}}()))([new M.Tuple("1","195471971"),new M.Tuple("2","182113224"),new M.Tuple("3","160039680"),new M.Tuple("4","156508116"),new M.Tuple("5","151834684"),new M.Tuple("6","149736546"),new M.Tuple("7","145441459"),new M.Tuple("8","129401213"),new M.Tuple("9","124595110"),new M.Tuple("10","130694993"),new M.Tuple("11","122082543"),new M.Tuple("12","120129022"),new M.Tuple("13","120421639"),new M.Tuple("14","124902244"),new M.Tuple("15","104043685"),new M.Tuple("16","98207768"),new M.Tuple("17","94987271"),new M.Tuple("18","90702639"),new M.Tuple("19","61431566")]),ge=function(r){return function(t){return function(i){return e.keydownEvent(r)(function(e){var r=fe.key(e);return"ArrowLeft"===r?i(new X.ScrollView(-t.scrollMod)):"ArrowRight"===r?i(new X.ScrollView(t.scrollMod)):n.pure(k.applicativeEffect)(j.unit)})}}},ve="infoBox",he=function(){var e=c.map(k.functorEffect)(ae.toDocument)(t.bindFlipped(k.bindEffect)(ue.document)(oe.window))(),n=ne.createElement("div")(e)();return re.setId(ve)(n)(),function(){var r=ne.documentElement(e)();if(r instanceof g.Nothing)return L.throw("Couldn't find document body!")();if(r instanceof g.Just)return c.void(k.functorEffect)(te.appendChild(re.toNode(n))(re.toNode(r.value0)))();throw new Error("Failed pattern match at Genetics.Browser.UI (line 358, column 31 - line 360, column 84): "+[r.constructor.name])}(),be(n)},Ce=new l.Generic(function(e){if(e instanceof se)return new l.Inl(l.NoArguments.value);if(e instanceof de)return new l.Inr(new l.Inl(l.NoArguments.value));if(e instanceof ce)return new l.Inr(new l.Inr(new l.Inl(e.value0)));if(e instanceof le)return new l.Inr(new l.Inr(new l.Inr(new l.Inl(e.value0))));if(e instanceof we)return new l.Inr(new l.Inr(new l.Inr(new l.Inr(e.value0))));throw new Error("Failed pattern match at Genetics.Browser.UI (line 328, column 1 - line 328, column 54): "+[e.constructor.name])},function(e){if(e instanceof l.Inl)return se.value;if(e instanceof l.Inr&&e.value0 instanceof l.Inl)return de.value;if(e instanceof l.Inr&&e.value0 instanceof l.Inr&&e.value0.value0 instanceof l.Inl)return new ce(e.value0.value0.value0);if(e instanceof l.Inr&&e.value0 instanceof l.Inr&&e.value0.value0 instanceof l.Inr&&e.value0.value0.value0 instanceof l.Inl)return new le(e.value0.value0.value0.value0);if(e instanceof l.Inr&&e.value0 instanceof l.Inr&&e.value0.value0 instanceof l.Inr&&e.value0.value0.value0 instanceof l.Inr)return new we(e.value0.value0.value0.value0);throw new Error("Failed pattern match at Genetics.Browser.UI (line 328, column 1 - line 328, column 54): "+[e.constructor.name])}),Ae=new x.Show(w.genericShow(Ce)(w.genericShowSum(w.genericShowConstructor(w.genericShowArgsNoArguments)(new F.IsSymbol(function(){return"IBoxShow"})))(w.genericShowSum(w.genericShowConstructor(w.genericShowArgsNoArguments)(new F.IsSymbol(function(){return"IBoxHide"})))(w.genericShowSum(w.genericShowConstructor(w.genericShowArgsArgument(x.showInt))(new F.IsSymbol(function(){return"IBoxSetY"})))(w.genericShowSum(w.genericShowConstructor(w.genericShowArgsArgument(x.showInt))(new F.IsSymbol(function(){return"IBoxSetX"})))(w.genericShowConstructor(w.genericShowArgsArgument(x.showString))(new F.IsSymbol(function(){return"IBoxSetContents"})))))))),Ee=function(n){return function(r){return function(){return e.buttonEvent("scrollLeft")(r(new X.ScrollView(-n.scrollMod)))(),e.buttonEvent("scrollRight")(r(new X.ScrollView(n.scrollMod)))(),e.buttonEvent("zoomOut")(r(X.ZoomView.create(1+n.zoomMod)))(),e.buttonEvent("zoomIn")(r(X.ZoomView.create(1-n.zoomMod)))()}}},xe=Ee({scrollMod:.5,zoomMod:1}),Fe=function(e){var n=g.fromMaybe(e.feature.name)(e.feature.gene),r=function(){if(e.feature.url instanceof g.Nothing)return n;if(e.feature.url instanceof g.Just)return"<a target='_blank' href='"+e.feature.url.value0+"'>"+n+"</a>";throw new Error("Failed pattern match at Genetics.Browser.UI (line 308, column 18 - line 310, column 84): "+[e.feature.url.constructor.name])}();return me("p")(r)},Ne=function(e){return function(n){var r=g.fromMaybe("No URL")(c.map(g.functorMaybe)(function(e){return"URL: <a target='_blank' href='"+e+"'>"+e+"</a>"})(n.feature.url)),t=g.fromMaybe("Annotated SNP: "+n.feature.name)(c.map(g.functorMaybe)(function(e){return"Gene: "+e})(n.feature.gene)),o=s.foldMap(s.foldableArray)(v.monoidString)(me("p"))(A.append(A.semigroupArray)([t,r])(f.filterMap(f.filterableArray)(e)(i.fromFoldable(I.foldableList)(n.feature.rest))));return me("div")(o)}},Me=Ne(function(){var e=n.pure(g.applicativeMaybe);return function(n){return e(O.showAnnotationField(n))}}()),je=Ne(function(e){return n.pure(g.applicativeMaybe)("p_lrt"===e.field?"p_lrt: "+b.viewOn(e.value)((r=Z._NegLog10(p.profunctorForget),t=y._Newtype(Z.newtypeNegLog10)(Z.newtypeNegLog10)(p.profunctorForget),i=Z._prec(4),function(e){return r(t(i(e)))})):O.showAnnotationField(e));var r,t,i}),qe=function(e){var n=i.uncons(e.elements);if(n instanceof g.Nothing)return"";if(n instanceof g.Just&&0===n.value0.tail.length)return Me(n.value0.head);if(n instanceof g.Just)return me("div")(me("p")("Annotations:")+s.foldMap(s.foldableArray)(v.monoidString)(Fe)(e.elements));throw new Error("Failed pattern match at Genetics.Browser.UI (line 256, column 3 - line 261, column 75): "+[n.constructor.name])},De=F.SProxy.value,ke=function(e){return function(r){return function(i){return function(i){return function(o){return function(a){return t.bind(B.bindAff)(T.empty)(function(u){return t.bind(B.bindAff)(T.empty)(function(f){return t.bind(B.bindAff)(J.makeTrack(e)(r)(i)(a))(function(e){var r=d.flip(T.put)(f),i=t.bind(B.bindAff)(T.take(f))(function(f){return t.discard(t.discardUnit)(B.bindAff)(q.match()(D.variantMatchCons(D.variantMatchCons(D.variantMatchNil)()(ee.refl))()(ee.refl))()({render:function(e){return n.pure(B.applicativeAff)(j.unit)},docResize:function(e){return t.bind(B.bindAff)(c.map(B.functorAff)(function(e){return e.size})(P.getDimensions(B.monadEffectAff)(a)))(function(n){return t.discard(t.discardUnit)(B.bindAff)(P.setTrackContainerSize(B.monadEffectAff)({width:e.width,height:n.height})(a))(function(){return t.discard(t.discardUnit)(B.bindAff)(r(q.inj()(new F.IsSymbol(function(){return"render"}))(De)(j.unit)))(function(){return i})})})}})(f))(function(){return t.discard(t.discardUnit)(B.bindAff)(t.bindFlipped(B.bindAff)(s.traverse_(B.applicativeAff)(s.foldableMaybe)(B.killFiber(L.error("Resetting renderer"))))(T.tryTake(u)))(function(){return t.bind(B.bindAff)(R.liftEffect(B.monadEffectAff)(o))(function(n){return t.bind(B.bindAff)(P.getDimensions(B.monadEffectAff)(a))(function(r){var o=W.trackSlots(r).center,a=_.viewScale(o.size)(n),f=c.map(C.functorPair)(_.scaleToScreen(a))(h.unwrap(_.coordsysviewNewtype)(n));return t.bind(B.bindAff)(B.forkAff(e.render(f)(n)))(function(e){return t.discard(t.discardUnit)(B.bindAff)(T.put(e)(u))(function(){return i})})})})})})});return t.bind(B.bindAff)(B.forkAff(i))(function(i){return t.discard(t.discardUnit)(B.bindAff)(r(q.inj()(new F.IsSymbol(function(){return"render"}))(De)(j.unit)))(function(){return n.pure(B.applicativeAff)({lastHotspots:e.hotspots,queueCommand:r})})})})})})}}}}}},Be=F.SProxy.value,Te=function(r){return function(t){return function(i){return R.liftEffect(B.monadEffectAff)(function(){return e.resizeEvent(function(e){return B.launchAff_(i.queueCommand(q.inj()(new F.IsSymbol(function(){return"docResize"}))(Be)(e)))})(),P.dragScrollTrack(t)(function(e){return n.when(k.applicativeEffect)(K.abs(e.x)>=1)(function(){var n=c.map(k.functorEffect)(function(e){return W.trackSlots(e).center})(P.getDimensions(R.monadEffectEffect)(t))(),i=X.ScrollView.create(e.x/n.size.width);return r.updateView(i)()})})()})}}},Re=function(e){return function(r){return t.bind(B.bindAff)(R.liftEffect(B.monadEffectAff)(U.read(e)))(function(e){return t.bind(B.bindAff)(P.getTrack("gene")(e.container))(function(i){return t.bind(B.bindAff)(J.fetchData()()(J.trackDataCons(new F.IsSymbol(function(){return"genes"}))()()(S.monoidMap(Z.ordChrId))()()()(J.trackDataNil(ee.refl)))(i)({genes:V.getGenes(e.coordSys)})(r.urls))(function(o){return t.bind(B.bindAff)(t.bind(B.bindAff)(O.addChrLayers({coordinateSystem:e.coordSys,segmentPadding:12})(r.chrs)(i))(function(a){return t.bind(B.bindAff)(O.addGeneLayers(e.coordSys)(r.tracks.gene)(o)(i))(function(e){return n.pure(B.applicativeAff)(Q.merge()()({chrs:a})(e))})}))(function(n){return t.bind(B.bindAff)(ke()(J.trackRecordRender(new F.IsSymbol(function(){return"chrs"}))()()(J.trackRecordRender(new F.IsSymbol(function(){return"genes"}))()()(J.trackRecordNil(ee.refl))))(e.coordSys)(n)(e.viewManager.browserView)(i))(function(n){return t.discard(t.discardUnit)(B.bindAff)(Te(e.viewManager)(i)(n))(function(){return R.liftEffect(B.monadEffectAff)(e.viewManager.addCallback(function(e){return B.launchAff_(n.queueCommand(q.inj()(new F.IsSymbol(function(){return"render"}))(De)(j.unit)))}))})})})})})})}},Ge=function(e){return function(r){return t.bind(B.bindAff)(R.liftEffect(B.monadEffectAff)(U.read(e)))(function(e){return t.bind(B.bindAff)(P.getTrack("gwas")(e.container))(function(o){return t.bind(B.bindAff)(J.fetchData()()(J.trackDataCons(new F.IsSymbol(function(){return"annotations"}))()()(S.monoidMap(Z.ordChrId))()()()(J.trackDataCons(new F.IsSymbol(function(){return"snps"}))()()(S.monoidMap(Z.ordChrId))()()()(J.trackDataNil(ee.refl))))(o)({snps:O.getSNPs(e.coordSys),annotations:O.getAnnotations(e.coordSys)})(r.urls))(function(a){return t.bind(B.bindAff)(t.bind(B.bindAff)(O.addChrLayers({coordinateSystem:e.coordSys,segmentPadding:12})(r.chrs)(o))(function(i){return t.bind(B.bindAff)(O.addGWASLayers(e.coordSys)(r.tracks.gwas)(a)(o))(function(e){return n.pure(B.applicativeAff)(Q.merge()()({chrs:i})(e))})}))(function(n){return t.bind(B.bindAff)(ke()(J.trackRecordRender(new F.IsSymbol(function(){return"annotations"}))()()(J.trackRecordRender(new F.IsSymbol(function(){return"chrs"}))()()(J.trackRecordUI(new F.IsSymbol(function(){return"fixedUI"}))()()(J.trackRecordHotspots(new F.IsSymbol(function(){return"hotspots"}))()()(ee.refl)(J.trackRecordRender(new F.IsSymbol(function(){return"snps"}))()()(J.trackRecordNil(ee.refl)))))))(e.coordSys)(n)(e.viewManager.browserView)(o))(function(n){return t.discard(t.discardUnit)(B.bindAff)(Te(e.viewManager)(o)(n))(function(){return t.discard(t.discardUnit)(B.bindAff)(R.liftEffect(B.monadEffectAff)(e.viewManager.addCallback(function(e){return B.launchAff_(n.queueCommand(q.inj()(new F.IsSymbol(function(){return"render"}))(De)(j.unit)))})))(function(){return R.liftEffect(B.monadEffectAff)((u=O.filterSig(r.score)(a.snps),P.trackClickHandler(R.monadEffectEffect)(o)(new W.Center(function(r){return B.launchAff_(t.bind(B.bindAff)(R.liftEffect(B.monadEffectAff)(e.viewManager.browserView))(function(f){return t.bind(B.bindAff)(c.map(B.functorAff)(function(e){return W.trackSlots(e).center})(P.getDimensions(B.monadEffectAff)(o)))(function(o){var d=H.pixelSegments({segmentPadding:12})(e.coordSys)(o.size)(f),c=O.annotationsForScale(e.coordSys)(u)(a.annotations)(d);return t.bind(B.bindAff)(n.lastHotspots)(function(n){var o=n(1)(r);return R.liftEffect(B.monadEffectAff)(function(){var n=i.head(o);if(n instanceof g.Nothing)return e.cmdInfoBox(de.value);if(n instanceof g.Just)return function(){return e.cmdInfoBox(se.value)(),e.cmdInfoBox(le.create(m.round(r.x)))(),e.cmdInfoBox(ce.create(m.round(r.y)))(),e.cmdInfoBox(we.create(pe(n.value0)+s.foldMap(s.foldableMaybe)(v.monoidString)(qe)((i=c,function(e){return t.bindFlipped(g.bindMaybe)(s.find(s.foldableArray)(function(n){return _.pairsOverlap(Z.ordBp)(n.covers)(e.position)}))(S.lookup(Z.ordChrId)(e.feature.chrId)(i))})(n.value0))))();var i};throw new Error("Failed pattern match at Genetics.Browser.UI (line 436, column 15 - line 444, column 70): "+[n.constructor.name])}())})})}))}))));var u})})})})})})})}},Le=function(i){return function(o){return B.launchAff((u=_.coordSys(Z.ordChrId)(a.semiringBigInt)(Se),f=g.fromMaybe(h.wrap(_.coordsysviewNewtype)(new C.Pair(E.zero(a.semiringBigInt),b.viewOn(u)(_._TotalSize(a.ringBigInt)))))(t.bind(g.bindMaybe)(i.initialChrs)(function(e){return t.bind(g.bindMaybe)(S.lookup(Z.ordChrId)(h.wrap(Z.newtypeChrId)(e.left))(b.viewOn(u)(_._Segments(p.strongForget))))(function(r){return t.bind(g.bindMaybe)(S.lookup(Z.ordChrId)(h.wrap(Z.newtypeChrId)(e.right))(b.viewOn(u)(_._Segments(p.strongForget))))(function(e){return n.pure(g.applicativeMaybe)(h.wrap(_.coordsysviewNewtype)(new C.Pair(r.value0,e.value1)))})})})),t.discard(t.discardUnit)(B.bindAff)(R.liftEffect(B.monadEffectAff)(e.initDebugDiv(1)))(function(){return t.bind(B.bindAff)(R.liftEffect(B.monadEffectAff)(he))(function(a){return t.bind(B.bindAff)(R.liftEffect(B.monadEffectAff)(X.browserViewManager(u)(h.wrap(N.newtypeMilliseconds)(200))({initialView:f})(o)))(function(s){return t.bind(B.bindAff)(R.liftEffect(B.monadEffectAff)(U.new({viewManager:s,cmdInfoBox:a,container:o,coordSys:u})))(function(a){return t.discard(t.discardUnit)(B.bindAff)(R.liftEffect(B.monadEffectAff)((u={scrollMod:.1,zoomMod:.15},function(){var n;return Ee(u)(function(e){return s.updateView(e)})(),e.buttonEvent("reset")((n=new X.ModView(d.const(h.unwrap(_.coordsysviewNewtype)(f))),s.updateView(n)))(),ge(b.viewOn(o)(P._Container(P.newtypeBrowserContainer)(p.strongForget)))({scrollMod:.075})(function(e){return s.updateView(e)})(),P.wheelZoom(P.newtypeBrowserContainer)(o)(function(e){var n=X.ZoomView.create(1+.06*e);return s.updateView(n)})()})))(function(){if(i.urls.snps instanceof g.Just)return r.applySecond(B.applyAff)(Ge(a)(i))(n.pure(B.applicativeAff)(j.unit));if(i.urls.snps instanceof g.Nothing)return n.pure(B.applicativeAff)(j.unit);throw new Error("Failed pattern match at Genetics.Browser.UI (line 527, column 3 - line 529, column 25): "+[i.urls.snps.constructor.name])});var u})})})})));var u,f}},Ue=function(i){return function(){var o,a=function(){var e=c.map(k.functorEffect)(ae.toDocument)(t.bindFlipped(k.bindEffect)(ue.document)(oe.window))();return ie.querySelector(h.wrap(ie.newtypeQuerySelector)("#browser"))(ne.toParentNode(e))()}();if(a instanceof g.Nothing)return G.log(R.monadEffectEffect)("Could not find element '#browser'")();if(a instanceof g.Just){var f=$.read($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"chrs"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"chrBG1"}))(H.readforeignHexColor)($.readFieldsCons(new F.IsSymbol(function(){return"chrBG2"}))(H.readforeignHexColor)($.readFieldsCons(new F.IsSymbol(function(){return"chrLabels"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"fontSize"}))($.readInt)($.readFieldsNil)()()))($.readFieldsNil)()())()())()()))($.readFieldsCons(new F.IsSymbol(function(){return"initialChrs"}))($.readMaybe($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"left"}))($.readString)($.readFieldsCons(new F.IsSymbol(function(){return"right"}))($.readString)($.readFieldsNil)()())()())))($.readFieldsCons(new F.IsSymbol(function(){return"score"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"max"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"min"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"sig"}))($.readNumber)($.readFieldsNil)()())()())()()))($.readFieldsCons(new F.IsSymbol(function(){return"tracks"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"gwas"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"annotations"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"geneColor"}))(H.readforeignHexColor)($.readFieldsCons(new F.IsSymbol(function(){return"outline"}))(H.readforeignHexColor)($.readFieldsCons(new F.IsSymbol(function(){return"radius"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"snpColor"}))(H.readforeignHexColor)($.readFieldsNil)()())()())()())()()))($.readFieldsCons(new F.IsSymbol(function(){return"legend"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"fontSize"}))($.readInt)($.readFieldsCons(new F.IsSymbol(function(){return"hPad"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"vPad"}))($.readNumber)($.readFieldsNil)()())()())()()))($.readFieldsCons(new F.IsSymbol(function(){return"padding"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"bottom"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"left"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"right"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"top"}))($.readNumber)($.readFieldsNil)()())()())()())()()))($.readFieldsCons(new F.IsSymbol(function(){return"score"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"max"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"min"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"sig"}))($.readNumber)($.readFieldsNil)()())()())()()))($.readFieldsCons(new F.IsSymbol(function(){return"snps"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"color"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"fill"}))(H.readforeignHexColor)($.readFieldsCons(new F.IsSymbol(function(){return"outline"}))(H.readforeignHexColor)($.readFieldsNil)()())()()))($.readFieldsCons(new F.IsSymbol(function(){return"lineWidth"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"pixelOffset"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"x"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"y"}))($.readNumber)($.readFieldsNil)()())()()))($.readFieldsCons(new F.IsSymbol(function(){return"radius"}))($.readNumber)($.readFieldsNil)()())()())()())()()))($.readFieldsCons(new F.IsSymbol(function(){return"trackHeight"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"vscale"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"color"}))(H.readforeignHexColor)($.readFieldsCons(new F.IsSymbol(function(){return"fonts"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"labelSize"}))($.readInt)($.readFieldsCons(new F.IsSymbol(function(){return"scaleSize"}))($.readInt)($.readFieldsNil)()())()()))($.readFieldsCons(new F.IsSymbol(function(){return"hPad"}))($.readNumber)($.readFieldsCons(new F.IsSymbol(function(){return"numSteps"}))($.readInt)($.readFieldsNil)()())()())()())()()))($.readFieldsNil)()())()())()())()())()())()())()()))($.readFieldsNil)()()))($.readFieldsCons(new F.IsSymbol(function(){return"urls"}))($.readRecord()($.readFieldsCons(new F.IsSymbol(function(){return"annotations"}))($.readMaybe($.readString))($.readFieldsCons(new F.IsSymbol(function(){return"genes"}))($.readMaybe($.readString))($.readFieldsCons(new F.IsSymbol(function(){return"snps"}))($.readMaybe($.readString))($.readFieldsNil)()())()())()()))($.readFieldsNil)()())()())()())()())()()))(i);if(f instanceof u.Left)return e.setElementContents(a.value0)("<p>Error when parsing provided config object:<p>"+s.foldMap(I.foldableNonEmptyList)(v.monoidString)((o=me("p"),function(e){return o(z.renderForeignError(e))}))(f.value0))();if(f instanceof u.Right){var d=e.windowInnerSize(),l=J.makeContainers()(J.trackConfigCons(new F.IsSymbol(function(){return"gwas"}))(J.trackConfigNil(ee.refl))()()()()(ee.refl))(d.width)(f.value0.tracks)(),w=P.browserContainer(R.monadEffectEffect)(a.value0)();return function(){if(f.value0.urls.snps instanceof g.Just)return r.applySecond(k.applyEffect)(P.addTrack(R.monadEffectEffect)(w)("gwas")(l.gwas))(n.pure(k.applicativeEffect)(j.unit))();if(f.value0.urls.snps instanceof g.Nothing)return j.unit;throw new Error("Failed pattern match at Genetics.Browser.UI (line 586, column 11 - line 588, column 33): "+[f.value0.urls.snps.constructor.name])}(),G.log(R.monadEffectEffect)(Y.unsafeStringify(f.value0))(),c.void(k.functorEffect)(Le(f.value0)(w))()}throw new Error("Failed pattern match at Genetics.Browser.UI (line 572, column 7 - line 595, column 33): "+[f.constructor.name])}throw new Error("Failed pattern match at Genetics.Browser.UI (line 568, column 3 - line 595, column 33): "+[a.constructor.name])}};module.exports={_render:De,_docResize:Be,initializeTrack:ke,btnUI:Ee,btnUIFixed:xe,keyUI:ge,printSNPInfo:ye,wrapWith:me,snpHTML:pe,peakHTML:Ie,annoPeakHTML:qe,annotationHTML:Ne,annotationHTMLAll:Me,annotationHTMLDefault:je,annotationHTMLShort:Fe,IBoxShow:se,IBoxHide:de,IBoxSetY:ce,IBoxSetX:le,IBoxSetContents:we,updateInfoBox:be,infoBoxId:ve,initInfoBox:he,setHandlers:Te,mkGwas:Ge,mkGene:Re,runBrowser:Le,main:Ue,mouseChrSizes:Se,genericInfoBoxF:Ce,showInfoBoxF:Ae,windowInnerSize:e.windowInnerSize,buttonEvent:e.buttonEvent,keydownEvent:e.keydownEvent,resizeEvent:e.resizeEvent,initDebugDiv:e.initDebugDiv,setDebugDivVisibility:e.setDebugDivVisibility,setDebugDivPoint:e.setDebugDivPoint,setElementContents:e.setElementContents,setWindow:e.setWindow}; -},{"./foreign.js":"DuPX","../Control.Applicative/index.js":"qYya","../Control.Apply/index.js":"QcLv","../Control.Bind/index.js":"7VcT","../Data.Array/index.js":"4t4C","../Data.Bifunctor/index.js":"e2Wc","../Data.BigInt/index.js":"Zx+T","../Data.Either/index.js":"B2JL","../Data.Filterable/index.js":"6hfS","../Data.Foldable/index.js":"eVDl","../Data.Function/index.js":"ImXJ","../Data.Functor/index.js":"+0AE","../Data.Generic.Rep/index.js":"AuzG","../Data.Generic.Rep.Show/index.js":"lpst","../Data.Int/index.js":"xNJb","../Data.Lens.Getter/index.js":"OPOX","../Data.Lens.Internal.Forget/index.js":"mj9z","../Data.Lens.Iso.Newtype/index.js":"CiFJ","../Data.List.Types/index.js":"Xxuc","../Data.Map.Internal/index.js":"RRDs","../Data.Maybe/index.js":"5mN7","../Data.Monoid/index.js":"TiEB","../Data.Newtype/index.js":"lz8k","../Data.Pair/index.js":"PpsX","../Data.Semigroup/index.js":"EsAJ","../Data.Semiring/index.js":"11NF","../Data.Show/index.js":"mFY7","../Data.Symbol/index.js":"4oJQ","../Data.Time.Duration/index.js":"AnkF","../Data.Tuple/index.js":"II/O","../Data.Unit/index.js":"NhVk","../Data.Variant/index.js":"hgdh","../Data.Variant.Internal/index.js":"kYoO","../Effect/index.js":"oTWB","../Effect.Aff/index.js":"I7lu","../Effect.Aff.AVar/index.js":"hACG","../Effect.Class/index.js":"dWtH","../Effect.Class.Console/index.js":"3Dts","../Effect.Exception/index.js":"0OCW","../Effect.Ref/index.js":"/Jaj","../Foreign/index.js":"pu1p","../Genetics.Browser/index.js":"X0te","../Genetics.Browser.Bed/index.js":"UuEA","../Genetics.Browser.Canvas/index.js":"VVkU","../Genetics.Browser.Coordinates/index.js":"7bYH","../Genetics.Browser.Demo/index.js":"mKwt","../Genetics.Browser.Layer/index.js":"YWUW","../Genetics.Browser.Track/index.js":"HH6s","../Genetics.Browser.Types/index.js":"HhmG","../Genetics.Browser.UI.View/index.js":"Tmz+","../Global.Unsafe/index.js":"qSZP","../Math/index.js":"Rpaz","../Record/index.js":"0gG4","../Simple.JSON/index.js":"DqNI","../Type.Equality/index.js":"Uq/R","../Web.DOM.Document/index.js":"0hiR","../Web.DOM.Element/index.js":"S4h2","../Web.DOM.Node/index.js":"P+X4","../Web.DOM.ParentNode/index.js":"lU5U","../Web.HTML/index.js":"UQRJ","../Web.HTML.HTMLDocument/index.js":"EU5r","../Web.HTML.Window/index.js":"o+50","../Web.UIEvent.KeyboardEvent/index.js":"o/+T"}],"Focm":[function(require,module,exports) { -var e=require("./output/Genetics.Browser.UI");window.GenomeBrowser=e; -},{"./output/Genetics.Browser.UI":"JuOH"}]},{},["Focm"], null)
\ No newline at end of file diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html index b8b64761..7b99fd35 100644 --- a/wqflask/wqflask/templates/mapping_results.html +++ b/wqflask/wqflask/templates/mapping_results.html @@ -4,7 +4,7 @@ <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/css/jquery.dataTables.css" /> <link rel="stylesheet" type="text/css" href="/static/packages/DT_bootstrap/DT_bootstrap.css" /> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> - <link rel="stylesheet" type="text/css" href="/static/packages/purescript_genome_browser/css/purescript_genetics_browser_v01.css" /> + <link rel="stylesheet" type="text/css" href="/static/packages/purescript_genome_browser/css/purescript-genetics-browser.css" /> <link rel="stylesheet" type="text/css" href="/static/new/css/marker_regression.css" /> @@ -195,6 +195,7 @@ </button> <button id="reset" type="button" >Reset</button> </div> + <div id="infoBox"></div> </div> </div> </div> @@ -320,7 +321,7 @@ <script language="javascript" type="text/javascript" src="https://cdn.datatables.net/buttons/1.0.0/js/dataTables.buttons.min.js"></script> <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/dataTables.scientific.js"></script> <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/dataTables.naturalSort.js"></script> - <script language="javascript" type="text/javascript" src="/static/packages/purescript_genome_browser/js/purescript-genetics-browser_v01.js"></script> + <script language="javascript" type="text/javascript" src="/static/packages/purescript_genome_browser/js/purescript-genetics-browser.js"></script> <script> js_data = {{ js_data | safe }} @@ -340,9 +341,8 @@ { "type": "natural", "width": "25%" }, { "type": "natural" }, { "type": "natural" }, - { "type": "natural" }, - { "type": "natural" }{% if 'additive' in marker %}, - { "type": "natural" }{% endif %}{% if 'dominance' in marker and dataset.group.genetic_type != "riset" %}, + { "type": "natural" }{% if 'additive' in qtlresults[0] %}, + { "type": "natural" }{% endif %}{% if 'dominance' in qtlresults[0] and dataset.group.genetic_type != "riset" %}, { "type": "natural" }{% endif %} ], "columnDefs": [ { diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index fbcaefc1..6525c242 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -698,8 +698,8 @@ def mapping_results_page(): #Redis.expire(key, 1*60) with Bench("Rendering template"): - if (gn1_template_vars['mapping_method'] == "gemma") or (gn1_template_vars['mapping_method'] == "plink"): - gn1_template_vars.pop('qtlresults', None) + #if (gn1_template_vars['mapping_method'] == "gemma") or (gn1_template_vars['mapping_method'] == "plink"): + #gn1_template_vars.pop('qtlresults', None) rendered_template = render_template("mapping_results.html", **gn1_template_vars) return rendered_template |