aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2019-09-20 13:13:03 -0500
committerGitHub2019-09-20 13:13:03 -0500
commita708a0097e29509b209494e21a09f49d79467750 (patch)
tree3d8fe0530ee36ec65a72ed5196a6e0243c5c1c71 /wqflask
parentff67d4bb0e15339697e97c918df1f1cc4385dce6 (diff)
parent78d3086c3978525065d91c0e02f2c2e0583f8705 (diff)
downloadgenenetwork2-a708a0097e29509b209494e21a09f49d79467750.tar.gz
Merge branch 'testing' into 360_update_htmlgen
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/base/data_set.py56
-rw-r--r--wqflask/base/trait.py34
-rw-r--r--wqflask/base/webqtlConfig.py6
-rw-r--r--wqflask/utility/gen_geno_ob.py270
-rw-r--r--wqflask/utility/tools.py9
-rw-r--r--wqflask/utility/type_checking.py2
-rw-r--r--wqflask/wqflask/api/gen_menu.py239
-rw-r--r--wqflask/wqflask/api/mapping.py263
-rw-r--r--wqflask/wqflask/api/router.py486
-rw-r--r--wqflask/wqflask/collect.py2
-rw-r--r--wqflask/wqflask/correlation/corr_scatter_plot.py44
-rw-r--r--wqflask/wqflask/correlation/show_corr_results.py95
-rw-r--r--wqflask/wqflask/database.py2
-rw-r--r--wqflask/wqflask/do_search.py37
-rw-r--r--wqflask/wqflask/gsearch.py14
-rw-r--r--wqflask/wqflask/heatmap/heatmap.py4
-rw-r--r--wqflask/wqflask/marker_regression/display_mapping_results.py73
-rw-r--r--wqflask/wqflask/marker_regression/gemma_mapping.py64
-rw-r--r--wqflask/wqflask/marker_regression/qtlreaper_mapping.py122
-rw-r--r--wqflask/wqflask/marker_regression/run_mapping.py242
-rw-r--r--wqflask/wqflask/search_results.py85
-rw-r--r--wqflask/wqflask/show_trait/show_trait.py117
-rw-r--r--wqflask/wqflask/snp_browser/snp_browser.py56
-rw-r--r--wqflask/wqflask/static/gif/89.gifbin0 -> 27183 bytes
-rw-r--r--wqflask/wqflask/static/new/javascript/create_corr_matrix.js14
-rw-r--r--wqflask/wqflask/static/new/javascript/dataset_menu_structure.json160
-rw-r--r--wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js3
-rw-r--r--wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js151
-rw-r--r--wqflask/wqflask/static/new/javascript/init_genome_browser.js84
-rw-r--r--wqflask/wqflask/static/new/javascript/plotly_probability_plot.js23
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait.js84
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js2
-rw-r--r--wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css4
-rw-r--r--wqflask/wqflask/static/packages/purescript_genome_browser/css/purescript-genetics-browser.css1
-rw-r--r--wqflask/wqflask/static/packages/purescript_genome_browser/js/purescript-genetics-browser.js659
-rw-r--r--wqflask/wqflask/templates/base.html100
-rw-r--r--wqflask/wqflask/templates/collections/list.html7
-rw-r--r--wqflask/wqflask/templates/collections/view.html7
-rw-r--r--wqflask/wqflask/templates/correlation_matrix.html104
-rw-r--r--wqflask/wqflask/templates/correlation_page.html276
-rw-r--r--wqflask/wqflask/templates/docs.html4
-rw-r--r--wqflask/wqflask/templates/gsearch_gene.html66
-rw-r--r--wqflask/wqflask/templates/gsearch_pheno.html63
-rwxr-xr-xwqflask/wqflask/templates/index_page_orig.html50
-rw-r--r--wqflask/wqflask/templates/loading.html29
-rw-r--r--wqflask/wqflask/templates/mapping_error.html6
-rw-r--r--wqflask/wqflask/templates/mapping_results.html101
-rw-r--r--wqflask/wqflask/templates/new_security/login_user.html83
-rw-r--r--wqflask/wqflask/templates/search_result_page.html96
-rw-r--r--wqflask/wqflask/templates/show_trait.html10
-rw-r--r--wqflask/wqflask/templates/show_trait_details.html89
-rw-r--r--wqflask/wqflask/templates/show_trait_mapping_tools.html37
-rw-r--r--wqflask/wqflask/templates/snp_browser.html8
-rw-r--r--wqflask/wqflask/templates/submit_trait.html19
-rw-r--r--wqflask/wqflask/views.py89
55 files changed, 3427 insertions, 1324 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index b324ac74..41de8492 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -46,6 +46,8 @@ from utility import chunks
from utility import gen_geno_ob
from utility.tools import locate, locate_ignore_error, flat_files
+from wqflask.api import gen_menu
+
from maintenance import get_group_samplelists
from MySQLdb import escape_string as escape
@@ -92,7 +94,7 @@ Publish or ProbeSet. E.g.
"""
self.datasets = {}
if USE_GN_SERVER:
- data = menu_main()
+ data = gen_menu.gen_dropdown_json()
else:
file_name = "wqflask/static/new/javascript/dataset_menu_structure.json"
with open(file_name, 'r') as fh:
@@ -289,7 +291,6 @@ class DatasetGroup(object):
self.parlist = None
self.get_f1_parent_strains()
- self.accession_id = self.get_accession_id()
self.mapping_id, self.mapping_names = self.get_mapping_methods()
self.species = webqtlDatabaseFunction.retrieve_species(self.name)
@@ -299,20 +300,6 @@ class DatasetGroup(object):
self._datasets = None
self.genofile = None
- def get_accession_id(self):
- results = g.db.execute("""select InfoFiles.GN_AccesionId from InfoFiles, PublishFreeze, InbredSet where
- InbredSet.Name = %s and
- PublishFreeze.InbredSetId = InbredSet.Id and
- InfoFiles.InfoPageName = PublishFreeze.Name and
- PublishFreeze.public > 0 and
- PublishFreeze.confidentiality < 1 order by
- PublishFreeze.CreateTime desc""", (self.name)).fetchone()
-
- if results != None:
- return str(results[0])
- else:
- return "None"
-
def get_mapping_methods(self):
mapping_id = g.db.execute("select MappingMethodId from InbredSet where Name= '%s'" % self.name).fetchone()[0]
@@ -384,7 +371,7 @@ class DatasetGroup(object):
[result.extend(l) for l in lists if l]
return result
- def read_genotype_file(self):
+ def read_genotype_file(self, use_reaper=False):
'''Read genotype from .geno file instead of database'''
#genotype_1 is Dataset Object without parents and f1
#genotype_2 is Dataset Object with parents and f1 (not for intercross)
@@ -396,9 +383,12 @@ class DatasetGroup(object):
full_filename = str(locate(self.genofile, 'genotype'))
else:
full_filename = str(locate(self.name + '.geno', 'genotype'))
- #genotype_1.read(full_filename)
- genotype_1 = gen_geno_ob.genotype(full_filename)
+ if use_reaper:
+ genotype_1 = reaper.Dataset()
+ genotype_1.read(full_filename)
+ else:
+ genotype_1 = gen_geno_ob.genotype(full_filename)
if genotype_1.type == "group" and self.parlist:
genotype_2 = genotype_1.add(Mat=self.parlist[0], Pat=self.parlist[1]) #, F1=_f1)
@@ -445,7 +435,7 @@ def datasets(group_name, this_group = None):
and InbredSet.Name like %s
and ProbeSetFreeze.public > %s
and ProbeSetFreeze.confidentiality < 1
- ORDER BY Tissue.Name)
+ ORDER BY Tissue.Name, ProbeSetFreeze.OrderList DESC)
''' % (group_name, webqtlConfig.PUBLICTHRESH,
group_name, webqtlConfig.PUBLICTHRESH,
"'" + group_name + "'", webqtlConfig.PUBLICTHRESH))
@@ -507,6 +497,7 @@ class DataSet(object):
self.check_confidentiality()
self.retrieve_other_names()
self.group = DatasetGroup(self) # sets self.group and self.group_id and gets genotype
+ self.accession_id = self.get_accession_id()
if get_samplelist == True:
self.group.get_samplelist()
self.species = species.TheSpecies(self)
@@ -521,6 +512,31 @@ class DataSet(object):
def riset():
Weve_Renamed_This_As_Group
+ def get_accession_id(self):
+ if self.type == "Publish":
+ results = g.db.execute("""select InfoFiles.GN_AccesionId from InfoFiles, PublishFreeze, InbredSet where
+ InbredSet.Name = %s and
+ PublishFreeze.InbredSetId = InbredSet.Id and
+ InfoFiles.InfoPageName = PublishFreeze.Name and
+ PublishFreeze.public > 0 and
+ PublishFreeze.confidentiality < 1 order by
+ PublishFreeze.CreateTime desc""", (self.group.name)).fetchone()
+ elif self.type == "Geno":
+ results = g.db.execute("""select InfoFiles.GN_AccesionId from InfoFiles, GenoFreeze, InbredSet where
+ InbredSet.Name = %s and
+ GenoFreeze.InbredSetId = InbredSet.Id and
+ InfoFiles.InfoPageName = GenoFreeze.ShortName and
+ GenoFreeze.public > 0 and
+ GenoFreeze.confidentiality < 1 order by
+ GenoFreeze.CreateTime desc""", (self.group.name)).fetchone()
+ else:
+ results = None
+
+ if results != None:
+ return str(results[0])
+ else:
+ return "None"
+
def retrieve_other_names(self):
"""This method fetches the the dataset names in search_result.
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 6fecf725..58169b5c 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -3,6 +3,7 @@ from __future__ import absolute_import, division, print_function
import string
import resource
import codecs
+import requests
import redis
Redis = redis.StrictRedis()
@@ -120,11 +121,34 @@ class GeneralTrait(object):
@property
def alias_fmt(self):
'''Return a text formatted alias'''
+
+ alias = 'Not available'
if self.alias:
alias = string.replace(self.alias, ";", " ")
alias = string.join(string.split(alias), ", ")
- else:
- alias = 'Not available'
+
+ return alias
+
+ @property
+ def wikidata_alias_fmt(self):
+ '''Return a text formatted alias'''
+
+ alias = 'Not available'
+ if self.symbol:
+ human_response = requests.get("http://gn2.genenetwork.org/gn3/gene/aliases/" + self.symbol.upper())
+ mouse_response = requests.get("http://gn2.genenetwork.org/gn3/gene/aliases/" + self.symbol.capitalize())
+ other_response = requests.get("http://gn2.genenetwork.org/gn3/gene/aliases/" + self.symbol.lower())
+ alias_list = json.loads(human_response.content) + json.loads(mouse_response.content) + json.loads(other_response.content)
+
+ filtered_aliases = []
+ seen = set()
+ for item in alias_list:
+ if item in seen:
+ continue
+ else:
+ filtered_aliases.append(item)
+ seen.add(item)
+ alias = "; ".join(filtered_aliases)
return alias
@@ -396,8 +420,10 @@ def retrieve_trait_info(trait, dataset, get_qtl_info=False):
#XZ: assign SQL query result to trait attributes.
for i, field in enumerate(dataset.display_fields):
holder = trait_info[i]
- if isinstance(trait_info[i], basestring):
- holder = unicode(trait_info[i], "utf-8", "ignore")
+ # if isinstance(trait_info[i], basestring):
+ # logger.debug("HOLDER:", holder)
+ # logger.debug("HOLDER2:", holder.decode(encoding='latin1'))
+ # holder = unicode(trait_info[i], "utf-8", "ignore")
setattr(trait, field, holder)
if dataset.type == 'Publish':
diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py
index b14cc4b0..0b884815 100644
--- a/wqflask/base/webqtlConfig.py
+++ b/wqflask/base/webqtlConfig.py
@@ -43,6 +43,7 @@ HOMOLOGENE_ID = "http://www.ncbi.nlm.nih.gov/homologene/?term=%s"
GENOTATION_URL = "http://www.genotation.org/Getd2g.pl?gene_list=%s"
GTEX_URL = "https://www.gtexportal.org/home/gene/%s"
GENEBRIDGE_URL = "https://www.systems-genetics.org/modules_by_gene/%s?organism=%s"
+GENEMANIA_URL = "https://genemania.org/search/%s/%s"
UCSC_REFSEQ = "http://genome.cse.ucsc.edu/cgi-bin/hgTracks?db=%s&hgg_gene=%s&hgg_chrom=chr%s&hgg_start=%s&hgg_end=%s"
BIOGPS_URL = "http://biogps.org/?org=%s#goto=genereport&id=%s"
STRING_URL = "http://string-db.org/newstring_cgi/show_network_section.pl?identifier=%s"
@@ -52,7 +53,9 @@ ABA_URL = "http://mouse.brain-map.org/search/show?search_type=gene&search_term=%
EBIGWAS_URL = "https://www.ebi.ac.uk/gwas/search?query=%s"
WIKI_PI_URL = "http://severus.dbmi.pitt.edu/wiki-pi/index.php/search?q=%s"
ENSEMBLETRANSCRIPT_URL="http://useast.ensembl.org/Mus_musculus/Transcript/Idhistory?t=%s"
-DBSNP = 'http://www.ncbi.nlm.nih.gov/SNP/snp_ref.cgi?type=rs&rs=%s'
+DBSNP = 'http://ensembl.org/Mus_musculus/Variation/Population?v=%s'
+PROTEIN_ATLAS_URL = "http://www.proteinatlas.org/search/%s"
+OPEN_TARGETS_URL = "https://genetics.opentargets.org/gene/%s"
# Temporary storage (note that this TMPDIR can be set as an
# environment variable - use utility.tools.TEMPDIR when you
@@ -87,4 +90,3 @@ if not valid_path(JSON_GENODIR):
PORTADDR = "http://50.16.251.170"
INFOPAGEHREF = '/dbdoc/%s.html'
CGIDIR = '/webqtl/' #XZ: The variable name 'CGIDIR' should be changed to 'PYTHONDIR'
-SCRIPTFILE = 'main.py'
diff --git a/wqflask/utility/gen_geno_ob.py b/wqflask/utility/gen_geno_ob.py
index 5824b0b3..5172369f 100644
--- a/wqflask/utility/gen_geno_ob.py
+++ b/wqflask/utility/gen_geno_ob.py
@@ -1,135 +1,137 @@
-from __future__ import absolute_import, division, print_function
-
-class genotype(object):
- """
- Replacement for reaper.Dataset so we can remove qtlreaper use while still generating mapping output figure
- """
-
- def __init__(self, filename):
- self.group = None
- self.type = "riset"
- self.prgy = []
- self.nprgy = 0
- self.mat = -1
- self.pat = 1
- self.het = 0
- self.unk = "U"
- self.filler = False
- self.mb_exists = False
-
- #ZS: This is because I'm not sure if some files switch the column that contains Mb/cM positions; might be unnecessary
- self.cm_column = 2
- self.mb_column = 3
-
- self.chromosomes = []
-
- self.read_file(filename)
-
- def __iter__(self):
- return iter(self.chromosomes)
-
- def __getitem__(self, index):
- return self.chromosomes[index]
-
- def __len__(self):
- return len(self.chromosomes)
-
- def read_file(self, filename):
-
- with open(filename, 'r') as geno_file:
- lines = geno_file.readlines()
-
- this_chr = "" #ZS: This is so it can track when the chromosome changes as it iterates through markers
- chr_ob = None
- for line in lines:
- if line[0] == "#":
- continue
- elif line[0] == "@":
- label = line.split(":")[0][1:]
- if label == "name":
- self.group = line.split(":")[1]
- elif label == "filler":
- if line.split(":")[1] == "yes":
- self.filler = True
- elif label == "type":
- self.type = line.split(":")[1]
- elif label == "mat":
- self.mat = line.split(":")[1]
- elif label == "pat":
- self.pat = line.split(":")[1]
- elif label == "het":
- self.het = line.split(":")[1]
- elif label == "unk":
- self.unk = line.split(":")[1]
- else:
- continue
- elif line[:3] == "Chr":
- header_row = line.split("\t")
- if header_row[2] == "Mb":
- self.mb_exists = True
- self.mb_column = 2
- self.cm_column = 3
- elif header_row[3] == "Mb":
- self.mb_exists = True
- self.mb_column = 3
- elif header_row[2] == "cM":
- self.cm_column = 2
-
- if self.mb_exists:
- self.prgy = header_row[4:]
- else:
- self.prgy = header_row[3:]
- self.nprgy = len(self.prgy)
- else:
- if line.split("\t")[0] != this_chr:
- if this_chr != "":
- self.chromosomes.append(chr_ob)
- this_chr = line.split("\t")[0]
- chr_ob = Chr(line.split("\t")[0], self)
- chr_ob.add_marker(line.split("\t"))
-
-class Chr(object):
- def __init__(self, name, geno_ob):
- self.name = name
- self.loci = []
- self.mb_exists = geno_ob.mb_exists
- self.cm_column = geno_ob.cm_column
- self.mb_column = geno_ob.mb_column
- self.geno_ob = geno_ob
-
- def __iter__(self):
- return iter(self.loci)
-
- def __getitem__(self, index):
- return self.loci[index]
-
- def __len__(self):
- return len(self.loci)
-
- def add_marker(self, marker_row):
- self.loci.append(Locus(marker_row, self.geno_ob))
-
-class Locus(object):
- def __init__(self, marker_row, geno_ob):
- self.chr = marker_row[0]
- self.name = marker_row[1]
- self.cM = float(marker_row[geno_ob.cm_column])
- self.Mb = float(marker_row[geno_ob.mb_column]) if geno_ob.mb_exists else None
-
- geno_table = {
- geno_ob.mat: -1,
- geno_ob.pat: 1,
- geno_ob.het: 0,
- geno_ob.unk: "U"
- }
-
- self.genotype = []
- if geno_ob.mb_exists:
- start_pos = 4
- else:
- start_pos = 3
- for allele in marker_row[start_pos:]:
- if allele in geno_table.keys():
- self.genotype.append(geno_table[allele])
- else: #ZS: Some genotype appears that isn't specified in the metadata, make it unknown
+from __future__ import absolute_import, division, print_function
+
+class genotype(object):
+ """
+ Replacement for reaper.Dataset so we can remove qtlreaper use while still generating mapping output figure
+ """
+
+ def __init__(self, filename):
+ self.group = None
+ self.type = "riset"
+ self.prgy = []
+ self.nprgy = 0
+ self.mat = -1
+ self.pat = 1
+ self.het = 0
+ self.unk = "U"
+ self.filler = False
+ self.mb_exists = False
+
+ #ZS: This is because I'm not sure if some files switch the column that contains Mb/cM positions; might be unnecessary
+ self.cm_column = 2
+ self.mb_column = 3
+
+ self.chromosomes = []
+
+ self.read_file(filename)
+
+ def __iter__(self):
+ return iter(self.chromosomes)
+
+ def __getitem__(self, index):
+ return self.chromosomes[index]
+
+ def __len__(self):
+ return len(self.chromosomes)
+
+ def read_file(self, filename):
+
+ with open(filename, 'r') as geno_file:
+ lines = geno_file.readlines()
+
+ this_chr = "" #ZS: This is so it can track when the chromosome changes as it iterates through markers
+ chr_ob = None
+ for line in lines:
+ if line[0] == "#":
+ continue
+ elif line[0] == "@":
+ label = line.split(":")[0][1:]
+ if label == "name":
+ self.group = line.split(":")[1]
+ elif label == "filler":
+ if line.split(":")[1] == "yes":
+ self.filler = True
+ elif label == "type":
+ self.type = line.split(":")[1]
+ elif label == "mat":
+ self.mat = line.split(":")[1]
+ elif label == "pat":
+ self.pat = line.split(":")[1]
+ elif label == "het":
+ self.het = line.split(":")[1]
+ elif label == "unk":
+ self.unk = line.split(":")[1]
+ else:
+ continue
+ elif line[:3] == "Chr":
+ header_row = line.split("\t")
+ if header_row[2] == "Mb":
+ self.mb_exists = True
+ self.mb_column = 2
+ self.cm_column = 3
+ elif header_row[3] == "Mb":
+ self.mb_exists = True
+ self.mb_column = 3
+ elif header_row[2] == "cM":
+ self.cm_column = 2
+
+ if self.mb_exists:
+ self.prgy = header_row[4:]
+ else:
+ self.prgy = header_row[3:]
+ self.nprgy = len(self.prgy)
+ else:
+ if line.split("\t")[0] != this_chr:
+ if this_chr != "":
+ self.chromosomes.append(chr_ob)
+ this_chr = line.split("\t")[0]
+ chr_ob = Chr(line.split("\t")[0], self)
+ chr_ob.add_marker(line.split("\t"))
+
+ self.chromosomes.append(chr_ob)
+
+class Chr(object):
+ def __init__(self, name, geno_ob):
+ self.name = name
+ self.loci = []
+ self.mb_exists = geno_ob.mb_exists
+ self.cm_column = geno_ob.cm_column
+ self.mb_column = geno_ob.mb_column
+ self.geno_ob = geno_ob
+
+ def __iter__(self):
+ return iter(self.loci)
+
+ def __getitem__(self, index):
+ return self.loci[index]
+
+ def __len__(self):
+ return len(self.loci)
+
+ def add_marker(self, marker_row):
+ self.loci.append(Locus(marker_row, self.geno_ob))
+
+class Locus(object):
+ def __init__(self, marker_row, geno_ob):
+ self.chr = marker_row[0]
+ self.name = marker_row[1]
+ self.cM = float(marker_row[geno_ob.cm_column])
+ self.Mb = float(marker_row[geno_ob.mb_column]) if geno_ob.mb_exists else None
+
+ geno_table = {
+ geno_ob.mat: -1,
+ geno_ob.pat: 1,
+ geno_ob.het: 0,
+ geno_ob.unk: "U"
+ }
+
+ self.genotype = []
+ if geno_ob.mb_exists:
+ start_pos = 4
+ else:
+ start_pos = 3
+ for allele in marker_row[start_pos:]:
+ if allele in geno_table.keys():
+ self.genotype.append(geno_table[allele])
+ else: #ZS: Some genotype appears that isn't specified in the metadata, make it unknown
self.genotype.append("U") \ No newline at end of file
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 8b2260f5..ec9f01bd 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -107,6 +107,9 @@ def js_path(module=None):
return try_guix
raise "No JS path found for "+module+" (if not in Guix check JS_GN_PATH)"
+def reaper_command(guess=None):
+ return get_setting("REAPER_COMMAND",guess)
+
def gemma_command(guess=None):
return assert_bin(get_setting("GEMMA_COMMAND",guess))
@@ -274,6 +277,7 @@ SMTP_CONNECT = get_setting('SMTP_CONNECT')
SMTP_USERNAME = get_setting('SMTP_USERNAME')
SMTP_PASSWORD = get_setting('SMTP_PASSWORD')
+REAPER_COMMAND = app_set("REAPER_COMMAND",reaper_command())
GEMMA_COMMAND = app_set("GEMMA_COMMAND",gemma_command())
assert(GEMMA_COMMAND is not None)
PLINK_COMMAND = app_set("PLINK_COMMAND",plink_command())
@@ -285,11 +289,14 @@ assert_dir(TEMPDIR)
JS_GUIX_PATH = get_setting("JS_GUIX_PATH")
assert_dir(JS_GUIX_PATH)
assert_dir(JS_GUIX_PATH+'/cytoscape-panzoom')
+
CSS_PATH = "UNKNOWN"
# assert_dir(JS_PATH)
-JS_TWITTER_POST_FETCHER_PATH = get_setting("JS_TWITTER_POST_FETCHER_PATH",js_path("Twitter-Post-Fetcher"))
+
+JS_TWITTER_POST_FETCHER_PATH = get_setting("JS_TWITTER_POST_FETCHER_PATH",js_path("javascript-twitter-post-fetcher"))
assert_dir(JS_TWITTER_POST_FETCHER_PATH)
assert_file(JS_TWITTER_POST_FETCHER_PATH+"/js/twitterFetcher_min.js")
+
JS_CYTOSCAPE_PATH = get_setting("JS_CYTOSCAPE_PATH",js_path("cytoscape"))
assert_dir(JS_CYTOSCAPE_PATH)
assert_file(JS_CYTOSCAPE_PATH+'/cytoscape.min.js')
diff --git a/wqflask/utility/type_checking.py b/wqflask/utility/type_checking.py
index 220e5f62..f15b17e2 100644
--- a/wqflask/utility/type_checking.py
+++ b/wqflask/utility/type_checking.py
@@ -27,7 +27,7 @@ def get_float(vars,name,default=None):
if name in vars:
if is_float(vars[name]):
return float(vars[name])
- return None
+ return default
def get_int(vars,name,default=None):
if name in vars:
diff --git a/wqflask/wqflask/api/gen_menu.py b/wqflask/wqflask/api/gen_menu.py
new file mode 100644
index 00000000..5182ea13
--- /dev/null
+++ b/wqflask/wqflask/api/gen_menu.py
@@ -0,0 +1,239 @@
+from __future__ import print_function, division
+
+import sys
+
+from flask import g
+
+from utility.tools import locate, locate_ignore_error, TEMPDIR, SQL_URI
+from utility.benchmark import Bench
+
+import MySQLdb
+
+import urlparse
+
+import utility.logger
+logger = utility.logger.getLogger(__name__ )
+
+def gen_dropdown_json():
+ """Generates and outputs (as json file) the data for the main dropdown menus on the home page"""
+
+ species = get_species()
+ groups = get_groups(species)
+ types = get_types(groups)
+ datasets = get_datasets(types)
+
+ species.append(('All Species', 'All Species'))
+ groups['All Species'] = [('All Groups', 'All Groups')]
+ types['All Species'] = {}
+ types['All Species']['All Groups'] = [('Phenotypes', 'Phenotypes')]
+ datasets['All Species'] = {}
+ datasets['All Species']['All Groups'] = {}
+ datasets['All Species']['All Groups']['Phenotypes'] = [('All Phenotypes','All Phenotypes')]
+
+ data = dict(species=species,
+ groups=groups,
+ types=types,
+ datasets=datasets)
+
+ return data
+
+def get_species():
+ """Build species list"""
+ results = g.db.execute("""SELECT Name, MenuName
+ FROM Species
+ WHERE Species.Name != 'macaque monkey'
+ ORDER BY OrderId""").fetchall()
+
+ species = []
+ for result in results:
+ species.append([str(result[0]), str(result[1])])
+
+ return species
+
+def get_groups(species):
+ """Build groups list"""
+ groups = {}
+ for species_name, _species_full_name in species:
+ groups[species_name] = []
+ # results = g.db.execute("""SELECT InbredSet.Name, InbredSet.FullName
+ # FROM InbredSet, Species, ProbeFreeze, GenoFreeze, PublishFreeze
+ # WHERE Species.Name = '{}' AND
+ # InbredSet.SpeciesId = Species.Id AND
+ # (PublishFreeze.InbredSetId = InbredSet.Id OR
+ # GenoFreeze.InbredSetId = InbredSet.Id OR
+ # ProbeFreeze.InbredSetId = InbredSet.Id)
+ # GROUP by InbredSet.Name
+ # ORDER BY InbredSet.FullName""".format(species_name)).fetchall()
+
+ results = g.db.execute("""SELECT InbredSet.Name, InbredSet.FullName
+ FROM InbredSet, Species
+ WHERE Species.Name = '{}' AND
+ InbredSet.SpeciesId = Species.Id
+ GROUP by InbredSet.Name
+ ORDER BY InbredSet.FullName""".format(species_name)).fetchall()
+
+ for result in results:
+ groups[species_name].append([str(result[0]), str(result[1])])
+
+ return groups
+
+def get_types(groups):
+ """Build types list"""
+ types = {}
+
+ for species, group_dict in groups.iteritems():
+ types[species] = {}
+ for group_name, _group_full_name in group_dict:
+ if phenotypes_exist(group_name):
+ types[species][group_name] = [("Phenotypes", "Phenotypes")]
+ if genotypes_exist(group_name):
+ if group_name in types[species]:
+ types[species][group_name] += [("Genotypes", "Genotypes")]
+ else:
+ types[species][group_name] = [("Genotypes", "Genotypes")]
+ if group_name in types[species]:
+ types_list = build_types(species, group_name)
+ if len(types_list) > 0:
+ types[species][group_name] += types_list
+ else:
+ if not phenotypes_exist(group_name) and not genotypes_exist(group_name):
+ types[species].pop(group_name, None)
+ groups[species] = list(group for group in groups[species] if group[0] != group_name)
+ else: #ZS: This whole else statement might be unnecessary, need to check
+ types_list = build_types(species, group_name)
+ if len(types_list) > 0:
+ types[species][group_name] = types_list
+ else:
+ types[species].pop(group_name, None)
+ groups[species] = list(group for group in groups[species] if group[0] != group_name)
+ return types
+
+def phenotypes_exist(group_name):
+ results = g.db.execute("""SELECT Name
+ FROM PublishFreeze
+ WHERE PublishFreeze.Name = '{}'""".format(group_name+"Publish")).fetchone()
+
+ if results != None:
+ return True
+ else:
+ return False
+
+def genotypes_exist(group_name):
+ results = g.db.execute("""SELECT Name
+ FROM GenoFreeze
+ WHERE GenoFreeze.Name = '{}'""".format(group_name+"Geno")).fetchone()
+
+ if results != None:
+ return True
+ else:
+ return False
+
+def build_types(species, group):
+ """Fetches tissues
+
+ Gets the tissues with data for this species/group
+ (all types except phenotype/genotype are tissues)
+
+ """
+
+ query = """SELECT DISTINCT Tissue.Name
+ FROM ProbeFreeze, ProbeSetFreeze, InbredSet, Tissue, Species
+ WHERE Species.Name = '{0}' AND
+ Species.Id = InbredSet.SpeciesId AND
+ InbredSet.Name = '{1}' AND
+ ProbeFreeze.TissueId = Tissue.Id AND
+ ProbeFreeze.InbredSetId = InbredSet.Id AND
+ ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id AND
+ ProbeSetFreeze.public > 0 AND
+ ProbeSetFreeze.confidentiality < 1
+ ORDER BY Tissue.Name""".format(species, group)
+
+ results = []
+ for result in g.db.execute(query).fetchall():
+ if len(result):
+ these_datasets = build_datasets(species, group, result[0])
+ if len(these_datasets) > 0:
+ results.append([str(result[0]), str(result[0])])
+
+ return results
+
+def get_datasets(types):
+ """Build datasets list"""
+ datasets = {}
+ for species, group_dict in types.iteritems():
+ datasets[species] = {}
+ for group, type_list in group_dict.iteritems():
+ datasets[species][group] = {}
+ for type_name in type_list:
+ these_datasets = build_datasets(species, group, type_name[0])
+ if len(these_datasets) > 0:
+ datasets[species][group][type_name[0]] = these_datasets
+
+ return datasets
+
+
+def build_datasets(species, group, type_name):
+ """Gets dataset names from database"""
+ dataset_text = dataset_value = None
+ datasets = []
+ if type_name == "Phenotypes":
+ results = g.db.execute("""SELECT InfoFiles.GN_AccesionId, PublishFreeze.Name, PublishFreeze.FullName
+ FROM InfoFiles, PublishFreeze, InbredSet
+ WHERE InbredSet.Name = '{}' AND
+ PublishFreeze.InbredSetId = InbredSet.Id AND
+ InfoFiles.InfoPageName = PublishFreeze.Name
+ ORDER BY PublishFreeze.CreateTime ASC""".format(group)).fetchall()
+
+ if len(results) > 0:
+ for result in results:
+ dataset_id = str(result[0])
+ dataset_value = str(result[1])
+ if group == 'MDP':
+ dataset_text = "Mouse Phenome Database"
+ else:
+ #dataset_text = "%s Phenotypes" % group
+ dataset_text = str(result[2])
+ datasets.append([dataset_id, dataset_value, dataset_text])
+ else:
+ dataset_id = "None"
+ dataset_value = "%sPublish" % group
+ dataset_text = "%s Phenotypes" % group
+ datasets.append([dataset_id, dataset_value, dataset_text])
+
+ elif type_name == "Genotypes":
+ results = g.db.execute("""SELECT InfoFiles.GN_AccesionId
+ FROM InfoFiles, GenoFreeze, InbredSet
+ WHERE InbredSet.Name = '{}' AND
+ GenoFreeze.InbredSetId = InbredSet.Id AND
+ InfoFiles.InfoPageName = GenoFreeze.ShortName AND
+ GenoFreeze.public > 0 AND
+ GenoFreeze.confidentiality < 1
+ ORDER BY GenoFreeze.CreateTime DESC""".format(group)).fetchone()
+
+ if results != None:
+ dataset_id = str(results[0])
+ else:
+ dataset_id = "None"
+ dataset_value = "%sGeno" % group
+ dataset_text = "%s Genotypes" % group
+ datasets.append([dataset_id, dataset_value, dataset_text])
+
+ else: # for mRNA expression/ProbeSet
+ results = g.db.execute("""SELECT ProbeSetFreeze.Id, ProbeSetFreeze.Name, ProbeSetFreeze.FullName
+ FROM ProbeSetFreeze, ProbeFreeze, InbredSet, Tissue, Species
+ WHERE Species.Name = '{0}' AND
+ Species.Id = InbredSet.SpeciesId AND
+ InbredSet.Name = '{1}' AND
+ ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and Tissue.Name = '{2}' AND
+ ProbeFreeze.TissueId = Tissue.Id and ProbeFreeze.InbredSetId = InbredSet.Id AND
+ ProbeSetFreeze.confidentiality < 1 and ProbeSetFreeze.public > 0
+ ORDER BY ProbeSetFreeze.CreateTime DESC""".format(species, group, type_name)).fetchall()
+
+ datasets = []
+ for dataset_info in results:
+ this_dataset_info = []
+ for info in dataset_info:
+ this_dataset_info.append(str(info))
+ datasets.append(this_dataset_info)
+
+ return datasets \ No newline at end of file
diff --git a/wqflask/wqflask/api/mapping.py b/wqflask/wqflask/api/mapping.py
index 83c61796..d830cefc 100644
--- a/wqflask/wqflask/api/mapping.py
+++ b/wqflask/wqflask/api/mapping.py
@@ -1,122 +1,141 @@
-from __future__ import absolute_import, division, print_function
-
-import string
-
-from base import data_set
-from base import webqtlConfig
-from base.trait import GeneralTrait, retrieve_sample_data
-
-from utility import helper_functions
-from wqflask.marker_regression import gemma_mapping, rqtl_mapping, qtlreaper_mapping, plink_mapping
-
-import utility.logger
-logger = utility.logger.getLogger(__name__ )
-
-def do_mapping_for_api(start_vars):
- assert('db' in start_vars)
- assert('trait_id' in start_vars)
-
- dataset = data_set.create_dataset(dataset_name = start_vars['db'])
- dataset.group.get_markers()
- this_trait = GeneralTrait(dataset = dataset, name = start_vars['trait_id'])
- this_trait = retrieve_sample_data(this_trait, dataset)
-
- samples = []
- vals = []
-
- for sample in dataset.group.samplelist:
- in_trait_data = False
- for item in this_trait.data:
- if this_trait.data[item].name == sample:
- value = str(this_trait.data[item].value)
- samples.append(item)
- vals.append(value)
- in_trait_data = True
- break
- if not in_trait_data:
- vals.append("x")
-
- mapping_params = initialize_parameters(start_vars, dataset, this_trait)
-
- covariates = "" #ZS: It seems to take an empty string as default. This should probably be changed.
-
- if mapping_params['mapping_method'] == "gemma":
- header_row = ["name", "chr", "Mb", "lod_score", "p_value"]
- if mapping_params['use_loco'] == "True": #ZS: gemma_mapping returns both results and the filename for LOCO, so need to only grab the former for api
- result_markers = gemma_mapping.run_gemma(this_trait, dataset, samples, vals, covariates, mapping_params['use_loco'], mapping_params['maf'])[0]
- else:
- result_markers = gemma_mapping.run_gemma(this_trait, dataset, samples, vals, covariates, mapping_params['use_loco'], mapping_params['maf'])
- elif mapping_params['mapping_method'] == "rqtl":
- header_row = ["name", "chr", "Mb", "lod_score"]
- if mapping_params['num_perm'] > 0:
- _sperm_output, _suggestive, _significant, result_markers = rqtl_mapping.run_rqtl_geno(vals, dataset, mapping_params['rqtl_method'], mapping_params['rqtl_model'],
- mapping_params['perm_check'], mapping_params['num_perm'],
- mapping_params['do_control'], mapping_params['control_marker'],
- mapping_params['manhattan_plot'], mapping_params['pair_scan'])
- else:
- result_markers = rqtl_mapping.run_rqtl_geno(vals, dataset, mapping_params['rqtl_method'], mapping_params['rqtl_model'],
- mapping_params['perm_check'], mapping_params['num_perm'],
- mapping_params['do_control'], mapping_params['control_marker'],
- mapping_params['manhattan_plot'], mapping_params['pair_scan'])
-
- output_rows = []
- output_rows.append(header_row)
- for marker in result_markers:
- this_row = [marker[header] for header in header_row]
- output_rows.append(this_row)
-
- return output_rows
-
-
-def initialize_parameters(start_vars, dataset, this_trait):
- mapping_params = {}
- mapping_params['mapping_method'] = "gemma"
- if 'method' in start_vars:
- mapping_params['mapping_method'] = start_vars['method']
-
- if mapping_params['mapping_method'] == "rqtl":
- mapping_params['rqtl_method'] = "hk"
- mapping_params['rqtl_model'] = "normal"
- mapping_params['do_control'] = False
- mapping_params['control_marker'] = ""
- mapping_params['manhattan_plot'] = True
- mapping_params['pair_scan'] = False
- if 'rqtl_method' in start_vars:
- mapping_params['rqtl_method'] = start_vars['rqtl_method']
- if 'rqtl_model' in start_vars:
- mapping_params['rqtl_model'] = start_vars['rqtl_model']
- if 'control_marker' in start_vars:
- mapping_params['control_marker'] = start_vars['control_marker']
- mapping_params['do_control'] = True
- if 'pair_scan' in start_vars:
- if start_vars['pair_scan'].lower() == "true":
- mapping_params['pair_scan'] = True
-
- if 'interval_mapping' in start_vars:
- if start_vars['interval_mapping'].lower() == "true":
- mapping_params['manhattan_plot'] = False
- elif 'manhattan_plot' in start_vars:
- if start_vars['manhattan_plot'].lower() != "true":
- mapping_params['manhattan_plot'] = False
-
- mapping_params['maf'] = 0.01
- if 'maf' in start_vars:
- mapping_params['maf'] = start_vars['maf'] # Minor allele frequency
-
- mapping_params['use_loco'] = False
- if 'use_loco' in start_vars:
- if start_vars['use_loco'].lower() != "false":
- mapping_params['use_loco'] = start_vars['use_loco']
-
- mapping_params['num_perm'] = 0
- mapping_params['perm_check'] = False
- if 'num_perm' in start_vars:
- try:
- mapping_params['num_perm'] = int(start_vars['num_perm'])
- mapping_params['perm_check'] = "ON"
- except:
- mapping_params['perm_check'] = False
-
- return mapping_params
-
-
+from __future__ import absolute_import, division, print_function
+
+import string
+
+from base import data_set
+from base import webqtlConfig
+from base.trait import GeneralTrait, retrieve_sample_data
+
+from utility import helper_functions
+from wqflask.marker_regression import gemma_mapping, rqtl_mapping, qtlreaper_mapping, plink_mapping
+
+import utility.logger
+logger = utility.logger.getLogger(__name__ )
+
+def do_mapping_for_api(start_vars):
+ assert('db' in start_vars)
+ assert('trait_id' in start_vars)
+
+ dataset = data_set.create_dataset(dataset_name = start_vars['db'])
+ dataset.group.get_markers()
+ this_trait = GeneralTrait(dataset = dataset, name = start_vars['trait_id'])
+ this_trait = retrieve_sample_data(this_trait, dataset)
+
+ samples = []
+ vals = []
+
+ for sample in dataset.group.samplelist:
+ in_trait_data = False
+ for item in this_trait.data:
+ if this_trait.data[item].name == sample:
+ value = str(this_trait.data[item].value)
+ samples.append(item)
+ vals.append(value)
+ in_trait_data = True
+ break
+ if not in_trait_data:
+ vals.append("x")
+
+ mapping_params = initialize_parameters(start_vars, dataset, this_trait)
+
+ covariates = "" #ZS: It seems to take an empty string as default. This should probably be changed.
+
+ if mapping_params['mapping_method'] == "gemma":
+ header_row = ["name", "chr", "Mb", "lod_score", "p_value"]
+ if mapping_params['use_loco'] == "True": #ZS: gemma_mapping returns both results and the filename for LOCO, so need to only grab the former for api
+ result_markers = gemma_mapping.run_gemma(this_trait, dataset, samples, vals, covariates, mapping_params['use_loco'], mapping_params['maf'])[0]
+ else:
+ result_markers = gemma_mapping.run_gemma(this_trait, dataset, samples, vals, covariates, mapping_params['use_loco'], mapping_params['maf'])
+ elif mapping_params['mapping_method'] == "rqtl":
+ header_row = ["name", "chr", "cM", "lod_score"]
+ if mapping_params['num_perm'] > 0:
+ _sperm_output, _suggestive, _significant, result_markers = rqtl_mapping.run_rqtl_geno(vals, dataset, mapping_params['rqtl_method'], mapping_params['rqtl_model'],
+ mapping_params['perm_check'], mapping_params['num_perm'],
+ mapping_params['do_control'], mapping_params['control_marker'],
+ mapping_params['manhattan_plot'], mapping_params['pair_scan'])
+ else:
+ result_markers = rqtl_mapping.run_rqtl_geno(vals, dataset, mapping_params['rqtl_method'], mapping_params['rqtl_model'],
+ mapping_params['perm_check'], mapping_params['num_perm'],
+ mapping_params['do_control'], mapping_params['control_marker'],
+ mapping_params['manhattan_plot'], mapping_params['pair_scan'])
+
+ if mapping_params['limit_to']:
+ result_markers = result_markers[:mapping_params['limit_to']]
+
+ if mapping_params['format'] == "csv":
+ output_rows = []
+ output_rows.append(header_row)
+ for marker in result_markers:
+ this_row = [marker[header] for header in header_row]
+ output_rows.append(this_row)
+
+ return output_rows, mapping_params['format']
+ elif mapping_params['format'] == "json":
+ return result_markers, mapping_params['format']
+ else:
+ return result_markers, None
+
+
+
+def initialize_parameters(start_vars, dataset, this_trait):
+ mapping_params = {}
+
+ mapping_params['format'] = "json"
+ if 'format' in start_vars:
+ mapping_params['format'] = start_vars['format']
+
+ mapping_params['limit_to'] = False
+ if 'limit_to' in start_vars:
+ if start_vars['limit_to'].isdigit():
+ mapping_params['limit_to'] = int(start_vars['limit_to'])
+
+ mapping_params['mapping_method'] = "gemma"
+ if 'method' in start_vars:
+ mapping_params['mapping_method'] = start_vars['method']
+
+ if mapping_params['mapping_method'] == "rqtl":
+ mapping_params['rqtl_method'] = "hk"
+ mapping_params['rqtl_model'] = "normal"
+ mapping_params['do_control'] = False
+ mapping_params['control_marker'] = ""
+ mapping_params['manhattan_plot'] = True
+ mapping_params['pair_scan'] = False
+ if 'rqtl_method' in start_vars:
+ mapping_params['rqtl_method'] = start_vars['rqtl_method']
+ if 'rqtl_model' in start_vars:
+ mapping_params['rqtl_model'] = start_vars['rqtl_model']
+ if 'control_marker' in start_vars:
+ mapping_params['control_marker'] = start_vars['control_marker']
+ mapping_params['do_control'] = True
+ if 'pair_scan' in start_vars:
+ if start_vars['pair_scan'].lower() == "true":
+ mapping_params['pair_scan'] = True
+
+ if 'interval_mapping' in start_vars:
+ if start_vars['interval_mapping'].lower() == "true":
+ mapping_params['manhattan_plot'] = False
+ elif 'manhattan_plot' in start_vars:
+ if start_vars['manhattan_plot'].lower() != "true":
+ mapping_params['manhattan_plot'] = False
+
+ mapping_params['maf'] = 0.01
+ if 'maf' in start_vars:
+ mapping_params['maf'] = start_vars['maf'] # Minor allele frequency
+
+ mapping_params['use_loco'] = True
+ if 'use_loco' in start_vars:
+ if (start_vars['use_loco'].lower() == "false") or (start_vars['use_loco'].lower() == "no"):
+ mapping_params['use_loco'] = False
+
+ mapping_params['num_perm'] = 0
+ mapping_params['perm_check'] = False
+ if 'num_perm' in start_vars:
+ try:
+ mapping_params['num_perm'] = int(start_vars['num_perm'])
+ mapping_params['perm_check'] = "ON"
+ except:
+ mapping_params['perm_check'] = False
+
+ return mapping_params
+
+
diff --git a/wqflask/wqflask/api/router.py b/wqflask/wqflask/api/router.py
index 845873a0..8ec93e48 100644
--- a/wqflask/wqflask/api/router.py
+++ b/wqflask/wqflask/api/router.py
@@ -11,7 +11,7 @@ from flask import g, Response, request, make_response, render_template, send_fro
import sqlalchemy
from wqflask import app
-from wqflask.api import correlation, mapping
+from wqflask.api import correlation, mapping, gen_menu
from utility.tools import flat_files
@@ -22,7 +22,7 @@ version = "pre1"
@app.route("/api/v_{}/".format(version))
def hello_world():
- return flask.jsonify({'hello':'world'})
+ return flask.jsonify({"hello":"world"})
@app.route("/api/v_{}/species".format(version))
def get_species_list():
@@ -31,10 +31,10 @@ def get_species_list():
species_list = []
for species in the_species:
species_dict = {
- 'Id' : species[0],
- 'Name' : species[1],
- 'FullName' : species[2],
- 'TaxonomyId' : species[3]
+ "Id" : species[0],
+ "Name" : species[1],
+ "FullName" : species[2],
+ "TaxonomyId" : species[3]
}
species_list.append(species_dict)
@@ -45,34 +45,34 @@ def get_species_list():
def get_species_info(species_name, file_format = "json"):
results = g.db.execute("""SELECT SpeciesId, Name, FullName, TaxonomyId
FROM Species
- WHERE (Name='{0}' OR FullName='{0}' OR SpeciesName='{0}');""".format(species_name))
+ WHERE (Name="{0}" OR FullName="{0}" OR SpeciesName="{0}");""".format(species_name))
the_species = results.fetchone()
species_dict = {
- 'Id' : the_species[0],
- 'Name' : the_species[1],
- 'FullName' : the_species[2],
- 'TaxonomyId' : the_species[3]
+ "Id" : the_species[0],
+ "Name" : the_species[1],
+ "FullName" : the_species[2],
+ "TaxonomyId" : the_species[3]
}
return flask.jsonify(species_dict)
@app.route("/api/v_{}/groups".format(version))
-@app.route("/api/v_{}/<path:species_name>/groups".format(version))
+@app.route("/api/v_{}/groups/<path:species_name>".format(version))
def get_groups_list(species_name=None):
if species_name:
- results = g.db.execute("""SELECT InbredSet.InbredSetId, InbredSet.SpeciesId, InbredSet.InbredSetName,
- InbredSet.Name, InbredSet.FullName, InbredSet.public,
- InbredSet.MappingMethodId, InbredSet.GeneticType
+ results = g.db.execute("""SELECT InbredSet.InbredSetId, InbredSet.SpeciesId, InbredSet.InbredSetName,
+ InbredSet.Name, InbredSet.FullName, InbredSet.public,
+ IFNULL(InbredSet.MappingMethodId, "None"), IFNULL(InbredSet.GeneticType, "None")
FROM InbredSet, Species
WHERE InbredSet.SpeciesId = Species.Id AND
- (Species.Name = '{0}' OR
- Species.FullName='{0}' OR
- Species.SpeciesName='{0}');""".format(species_name))
+ (Species.Name = "{0}" OR
+ Species.FullName="{0}" OR
+ Species.SpeciesName="{0}");""".format(species_name))
else:
results = g.db.execute("""SELECT InbredSet.InbredSetId, InbredSet.SpeciesId, InbredSet.InbredSetName,
InbredSet.Name, InbredSet.FullName, InbredSet.public,
- InbredSet.MappingMethodId, InbredSet.GeneticType
+ IFNULL(InbredSet.MappingMethodId, "None"), IFNULL(InbredSet.GeneticType, "None")
FROM InbredSet;""")
the_groups = results.fetchall()
@@ -80,14 +80,14 @@ def get_groups_list(species_name=None):
groups_list = []
for group in the_groups:
group_dict = {
- 'Id' : group[0],
- 'SpeciesId' : group[1],
- 'DisplayName' : group[2],
- 'Name' : group[3],
- 'FullName' : group[4],
- 'public' : group[5],
- 'MappingMethodId' : group[6],
- 'GeneticType' : group[7]
+ "Id" : group[0],
+ "SpeciesId" : group[1],
+ "DisplayName" : group[2],
+ "Name" : group[3],
+ "FullName" : group[4],
+ "public" : group[5],
+ "MappingMethodId" : group[6],
+ "GeneticType" : group[7]
}
groups_list.append(group_dict)
@@ -103,35 +103,35 @@ def get_group_info(group_name, species_name = None, file_format = "json"):
if species_name:
results = g.db.execute("""SELECT InbredSet.InbredSetId, InbredSet.SpeciesId, InbredSet.InbredSetName,
InbredSet.Name, InbredSet.FullName, InbredSet.public,
- InbredSet.MappingMethodId, InbredSet.GeneticType
+ IFNULL(InbredSet.MappingMethodId, "None"), IFNULL(InbredSet.GeneticType, "None")
FROM InbredSet, Species
WHERE InbredSet.SpeciesId = Species.Id AND
- (InbredSet.InbredSetName = '{0}' OR
- InbredSet.Name = '{0}' OR
- InbredSet.FullName = '{0}') AND
- (Species.Name = '{1}' OR
- Species.FullName='{1}' OR
- Species.SpeciesName='{1}');""".format(group_name, species_name))
+ (InbredSet.InbredSetName = "{0}" OR
+ InbredSet.Name = "{0}" OR
+ InbredSet.FullName = "{0}") AND
+ (Species.Name = "{1}" OR
+ Species.FullName="{1}" OR
+ Species.SpeciesName="{1}");""".format(group_name, species_name))
else:
results = g.db.execute("""SELECT InbredSet.InbredSetId, InbredSet.SpeciesId, InbredSet.InbredSetName,
InbredSet.Name, InbredSet.FullName, InbredSet.public,
- InbredSet.MappingMethodId, InbredSet.GeneticType
+ IFNULL(InbredSet.MappingMethodId, "None"), IFNULL(InbredSet.GeneticType, "None")
FROM InbredSet
- WHERE (InbredSet.InbredSetName = '{0}' OR
- InbredSet.Name = '{0}' OR
- InbredSet.FullName = '{0}');""".format(group_name))
+ WHERE (InbredSet.InbredSetName = "{0}" OR
+ InbredSet.Name = "{0}" OR
+ InbredSet.FullName = "{0}");""".format(group_name))
group = results.fetchone()
if group:
group_dict = {
- 'Id' : group[0],
- 'SpeciesId' : group[1],
- 'DisplayName' : group[2],
- 'Name' : group[3],
- 'FullName' : group[4],
- 'public' : group[5],
- 'MappingMethodId' : group[6],
- 'GeneticType' : group[7]
+ "Id" : group[0],
+ "SpeciesId" : group[1],
+ "DisplayName" : group[2],
+ "Name" : group[3],
+ "FullName" : group[4],
+ "public" : group[5],
+ "MappingMethodId" : group[6],
+ "GeneticType" : group[7]
}
return flask.jsonify(group_dict)
@@ -150,9 +150,9 @@ def get_datasets_for_group(group_name, species_name=None):
FROM ProbeSetFreeze, ProbeFreeze, InbredSet, Species
WHERE ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id AND
ProbeFreeze.InbredSetId = InbredSet.Id AND
- (InbredSet.Name = '{0}' OR InbredSet.InbredSetName = '{0}' OR InbredSet.FullName = '{0}') AND
+ (InbredSet.Name = "{0}" OR InbredSet.InbredSetName = "{0}" OR InbredSet.FullName = "{0}") AND
InbredSet.SpeciesId = Species.Id AND
- (Species.SpeciesName = '{1}' OR Species.MenuName = '{1}' OR Species.FullName = '{1}');
+ (Species.SpeciesName = "{1}" OR Species.MenuName = "{1}" OR Species.FullName = "{1}");
""".format(group_name, species_name))
else:
results = g.db.execute("""
@@ -163,7 +163,7 @@ def get_datasets_for_group(group_name, species_name=None):
FROM ProbeSetFreeze, ProbeFreeze, InbredSet
WHERE ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id AND
ProbeFreeze.InbredSetId = InbredSet.Id AND
- (InbredSet.Name = '{0}' OR InbredSet.InbredSetName = '{0}' OR InbredSet.FullName = '{0}');
+ (InbredSet.Name = "{0}" OR InbredSet.InbredSetName = "{0}" OR InbredSet.FullName = "{0}");
""".format(group_name))
the_datasets = results.fetchall()
@@ -172,17 +172,17 @@ def get_datasets_for_group(group_name, species_name=None):
datasets_list = []
for dataset in the_datasets:
dataset_dict = {
- 'Id' : dataset[0],
- 'ProbeFreezeId' : dataset[1],
- 'AvgID' : dataset[2],
- 'Short_Abbreviation' : dataset[3],
- 'Long_Abbreviation' : dataset[4],
- 'FullName' : dataset[5],
- 'ShortName' : dataset[6],
- 'CreateTime' : dataset[7],
- 'public' : dataset[8],
- 'confidentiality' : dataset[9],
- 'DataScale' : dataset[10]
+ "Id" : dataset[0],
+ "ProbeFreezeId" : dataset[1],
+ "AvgID" : dataset[2],
+ "Short_Abbreviation" : dataset[3],
+ "Long_Abbreviation" : dataset[4],
+ "FullName" : dataset[5],
+ "ShortName" : dataset[6],
+ "CreateTime" : dataset[7],
+ "public" : dataset[8],
+ "confidentiality" : dataset[9],
+ "DataScale" : dataset[10]
}
datasets_list.append(dataset_dict)
@@ -197,7 +197,7 @@ def get_datasets_for_group(group_name, species_name=None):
def get_dataset_info(dataset_name, group_name = None, file_format="json"):
#ZS: First get ProbeSet (mRNA expression) datasets and then get Phenotype datasets
- datasets_list = [] #ZS: I figure I might as well return a list if there are multiple matches, though I don't know if this will actually happen in practice
+ datasets_list = [] #ZS: I figure I might as well return a list if there are multiple matches, though I don"t know if this will actually happen in practice
probeset_query = """
SELECT ProbeSetFreeze.Id, ProbeSetFreeze.Name, ProbeSetFreeze.FullName,
@@ -212,12 +212,12 @@ def get_dataset_info(dataset_name, group_name = None, file_format="json"):
"""
if dataset_name.isdigit():
where_statement += """
- ProbeSetFreeze.Id = '{}'
+ ProbeSetFreeze.Id = "{}"
""".format(dataset_name)
else:
where_statement += """
- (ProbeSetFreeze.Name = '{0}' OR ProbeSetFreeze.Name2 = '{0}' OR
- ProbeSetFreeze.FullName = '{0}' OR ProbeSetFreeze.ShortName = '{0}')
+ (ProbeSetFreeze.Name = "{0}" OR ProbeSetFreeze.Name2 = "{0}" OR
+ ProbeSetFreeze.FullName = "{0}" OR ProbeSetFreeze.ShortName = "{0}")
""".format(dataset_name)
probeset_query += where_statement
@@ -226,16 +226,16 @@ def get_dataset_info(dataset_name, group_name = None, file_format="json"):
if dataset:
dataset_dict = {
- 'dataset_type' : "mRNA expression",
- 'id' : dataset[0],
- 'name' : dataset[1],
- 'full_name' : dataset[2],
- 'short_name' : dataset[3],
- 'data_scale' : dataset[4],
- 'tissue_id' : dataset[5],
- 'tissue' : dataset[6],
- 'public' : dataset[7],
- 'confidential' : dataset[8]
+ "dataset_type" : "mRNA expression",
+ "id" : dataset[0],
+ "name" : dataset[1],
+ "full_name" : dataset[2],
+ "short_name" : dataset[3],
+ "data_scale" : dataset[4],
+ "tissue_id" : dataset[5],
+ "tissue" : dataset[6],
+ "public" : dataset[7],
+ "confidential" : dataset[8]
}
datasets_list.append(dataset_dict)
@@ -249,7 +249,7 @@ def get_dataset_info(dataset_name, group_name = None, file_format="json"):
WHERE PublishXRef.InbredSetId = InbredSet.Id AND
PublishXRef.PhenotypeId = Phenotype.Id AND
PublishXRef.PublicationId = Publication.Id AND
- InbredSet.Name = '{0}' AND PublishXRef.Id = '{1}'
+ InbredSet.Name = "{0}" AND PublishXRef.Id = "{1}"
""".format(group_name, dataset_name)
logger.debug("QUERY:", pheno_query)
@@ -260,25 +260,25 @@ def get_dataset_info(dataset_name, group_name = None, file_format="json"):
if dataset:
if dataset[5]:
dataset_dict = {
- 'dataset_type' : "phenotype",
- 'id' : dataset[0],
- 'name' : dataset[1],
- 'description' : dataset[2],
- 'pubmed_id' : dataset[5],
- 'title' : dataset[6],
- 'year' : dataset[7]
+ "dataset_type" : "phenotype",
+ "id" : dataset[0],
+ "name" : dataset[1],
+ "description" : dataset[2],
+ "pubmed_id" : dataset[5],
+ "title" : dataset[6],
+ "year" : dataset[7]
}
elif dataset[4]:
dataset_dict = {
- 'dataset_type' : "phenotype",
- 'id' : dataset[0],
- 'name' : dataset[3],
- 'description' : dataset[4]
+ "dataset_type" : "phenotype",
+ "id" : dataset[0],
+ "name" : dataset[3],
+ "description" : dataset[4]
}
else:
dataset_dict = {
- 'dataset_type' : "phenotype",
- 'id' : dataset[0]
+ "dataset_type" : "phenotype",
+ "id" : dataset[0]
}
datasets_list.append(dataset_dict)
@@ -290,11 +290,129 @@ def get_dataset_info(dataset_name, group_name = None, file_format="json"):
else:
return return_error(code=204, source=request.url_rule.rule, title="No Results", details="")
+@app.route("/api/v_{}/traits/<path:dataset_name>".format(version), methods=("GET",))
+@app.route("/api/v_{}/traits/<path:dataset_name>.<path:file_format>".format(version), methods=("GET",))
+def fetch_traits(dataset_name, file_format = "json"):
+ trait_ids, trait_names, data_type, dataset_id = get_dataset_trait_ids(dataset_name, request.args)
+ if ("ids_only" in request.args) and (len(trait_ids) > 0):
+ if file_format == "json":
+ filename = dataset_name + "_trait_ids.json"
+ return flask.jsonify(trait_ids)
+ else:
+ filename = dataset_name + "_trait_ids.csv"
+
+ si = StringIO.StringIO()
+ csv_writer = csv.writer(si)
+ csv_writer.writerows([[trait_id] for trait_id in trait_ids])
+ output = make_response(si.getvalue())
+ output.headers["Content-Disposition"] = "attachment; filename=" + filename
+ output.headers["Content-type"] = "text/csv"
+ return output
+ elif ("names_only" in request.args) and (len(trait_ids) > 0):
+ if file_format == "json":
+ filename = dataset_name + "_trait_names.json"
+ return flask.jsonify(trait_names)
+ else:
+ filename = dataset_name + "_trait_names.csv"
+
+ si = StringIO.StringIO()
+ csv_writer = csv.writer(si)
+ csv_writer.writerows([[trait_name] for trait_name in trait_names])
+ output = make_response(si.getvalue())
+ output.headers["Content-Disposition"] = "attachment; filename=" + filename
+ output.headers["Content-type"] = "text/csv"
+ return output
+ else:
+ if len(trait_ids) > 0:
+ if data_type == "ProbeSet":
+ query = """
+ SELECT
+ ProbeSet.Id, ProbeSet.Name, ProbeSet.Symbol, ProbeSet.description, ProbeSet.Chr, ProbeSet.Mb, ProbeSet.alias,
+ ProbeSetXRef.mean, ProbeSetXRef.se, ProbeSetXRef.Locus, ProbeSetXRef.LRS, ProbeSetXRef.pValue, ProbeSetXRef.additive, ProbeSetXRef.h2
+ FROM
+ ProbeSet, ProbeSetXRef
+ WHERE
+ ProbeSetXRef.ProbeSetFreezeId = "{0}" AND
+ ProbeSetXRef.ProbeSetId = ProbeSet.Id
+ ORDER BY
+ ProbeSet.Id
+ """
+
+ field_list = ["Id", "Name", "Symbol", "Description", "Chr", "Mb", "Aliases", "Mean", "SE", "Locus", "LRS", "P-Value", "Additive", "h2"]
+ elif data_type == "Geno":
+ query = """
+ SELECT
+ Geno.Id, Geno.Name, Geno.Marker_Name, Geno.Chr, Geno.Mb, Geno.Sequence, Geno.Source
+ FROM
+ Geno, GenoXRef
+ WHERE
+ GenoXRef.GenoFreezeId = "{0}" AND
+ GenoXRef.GenoId = Geno.Id
+ ORDER BY
+ Geno.Id
+ """
+
+ field_list = ["Id", "Name", "Marker_Name", "Chr", "Mb", "Sequence", "Source"]
+ else:
+ query = """
+ SELECT
+ PublishXRef.Id, PublishXRef.PhenotypeId, PublishXRef.PublicationId, PublishXRef.Locus, PublishXRef.LRS, PublishXRef.additive, PublishXRef.Sequence
+ FROM
+ PublishXRef
+ WHERE
+ PublishXRef.InbredSetId = {0}
+ ORDER BY
+ PublishXRef.Id
+ """
+
+ field_list = ["Id", "PhenotypeId", "PublicationId", "Locus", "LRS", "Additive", "Sequence"]
+
+ if 'limit_to' in request.args:
+ limit_number = request.args['limit_to']
+ query += "LIMIT " + str(limit_number)
+
+ if file_format == "json":
+ filename = dataset_name + "_traits.json"
+
+ final_query = query.format(dataset_id)
+
+ result_list = []
+ for result in g.db.execute(final_query).fetchall():
+ trait_dict = {}
+ for i, field in enumerate(field_list):
+ if result[i]:
+ trait_dict[field] = result[i]
+ result_list.append(trait_dict)
+
+ return flask.jsonify(result_list)
+ elif file_format == "csv":
+ filename = dataset_name + "_traits.csv"
+
+ results_list = []
+ header_list = []
+ header_list += field_list
+ results_list.append(header_list)
+
+ final_query = query.format(dataset_id)
+ for result in g.db.execute(final_query).fetchall():
+ results_list.append(result)
+
+ si = StringIO.StringIO()
+ csv_writer = csv.writer(si)
+ csv_writer.writerows(results_list)
+ output = make_response(si.getvalue())
+ output.headers["Content-Disposition"] = "attachment; filename=" + filename
+ output.headers["Content-type"] = "text/csv"
+ return output
+ else:
+ return return_error(code=400, source=request.url_rule.rule, title="Invalid Output Format", details="Current formats available are JSON and CSV, with CSV as default")
+ else:
+ return return_error(code=204, source=request.url_rule.rule, title="No Results", details="")
@app.route("/api/v_{}/sample_data/<path:dataset_name>".format(version))
@app.route("/api/v_{}/sample_data/<path:dataset_name>.<path:file_format>".format(version))
def all_sample_data(dataset_name, file_format = "csv"):
- trait_ids, trait_names, data_type, dataset_id = get_dataset_trait_ids(dataset_name)
+ trait_ids, trait_names, data_type, dataset_id = get_dataset_trait_ids(dataset_name, request.args)
if len(trait_ids) > 0:
sample_list = get_samplelist(dataset_name)
@@ -308,8 +426,8 @@ def all_sample_data(dataset_name, file_format = "csv"):
LEFT JOIN ProbeSetSE ON
(ProbeSetSE.DataId = ProbeSetData.Id AND ProbeSetSE.StrainId = ProbeSetData.StrainId)
WHERE
- ProbeSetXRef.ProbeSetFreezeId = '{0}' AND
- ProbeSetXRef.ProbeSetId = '{1}' AND
+ ProbeSetXRef.ProbeSetFreezeId = "{0}" AND
+ ProbeSetXRef.ProbeSetId = "{1}" AND
ProbeSetXRef.DataId = ProbeSetData.Id AND
ProbeSetData.StrainId = Strain.Id
ORDER BY
@@ -324,8 +442,8 @@ def all_sample_data(dataset_name, file_format = "csv"):
LEFT JOIN GenoSE ON
(GenoSE.DataId = GenoData.Id AND GenoSE.StrainId = GenoData.StrainId)
WHERE
- GenoXRef.GenoFreezeId = '{0}' AND
- GenoXRef.GenoId = '{1}' AND
+ GenoXRef.GenoFreezeId = "{0}" AND
+ GenoXRef.GenoId = "{1}" AND
GenoXRef.DataId = GenoData.Id AND
GenoData.StrainId = Strain.Id
ORDER BY
@@ -343,8 +461,8 @@ def all_sample_data(dataset_name, file_format = "csv"):
(NStrain.DataId = PublishData.Id AND
NStrain.StrainId = PublishData.StrainId)
WHERE
- PublishXRef.InbredSetId = '{0}' AND
- PublishXRef.PhenotypeId = '{1}' AND
+ PublishXRef.InbredSetId = "{0}" AND
+ PublishXRef.PhenotypeId = "{1}" AND
PublishData.Id = PublishXRef.DataId AND
PublishData.StrainId = Strain.Id
ORDER BY
@@ -382,7 +500,7 @@ def all_sample_data(dataset_name, file_format = "csv"):
output.headers["Content-type"] = "text/csv"
return output
else:
- return return_error(code=204, source=request.url_rule.rule, title="No Results", details="")
+ return return_error(code=415, source=request.url_rule.rule, title="Unsupported file format", details="")
else:
return return_error(code=204, source=request.url_rule.rule, title="No Results", details="")
@@ -397,9 +515,9 @@ def trait_sample_data(dataset_name, trait_name, file_format = "json"):
LEFT JOIN ProbeSetSE ON
(ProbeSetSE.DataId = ProbeSetData.Id AND ProbeSetSE.StrainId = ProbeSetData.StrainId)
WHERE
- ProbeSet.Name = '{0}' AND ProbeSetXRef.ProbeSetId = ProbeSet.Id AND
+ ProbeSet.Name = "{0}" AND ProbeSetXRef.ProbeSetId = ProbeSet.Id AND
ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id AND
- ProbeSetFreeze.Name = '{1}' AND
+ ProbeSetFreeze.Name = "{1}" AND
ProbeSetXRef.DataId = ProbeSetData.Id AND
ProbeSetData.StrainId = Strain.Id
ORDER BY
@@ -413,13 +531,13 @@ def trait_sample_data(dataset_name, trait_name, file_format = "json"):
sample_list = []
for sample in sample_data:
sample_dict = {
- 'sample_name' : sample[0],
- 'sample_name_2' : sample[1],
- 'value' : sample[2],
- 'data_id' : sample[3],
+ "sample_name" : sample[0],
+ "sample_name_2" : sample[1],
+ "value" : sample[2],
+ "data_id" : sample[3],
}
if sample[4]:
- sample_dict['se'] = sample[4]
+ sample_dict["se"] = sample[4]
sample_list.append(sample_dict)
return flask.jsonify(sample_list)
@@ -434,7 +552,7 @@ def trait_sample_data(dataset_name, trait_name, file_format = "json"):
dataset_or_group = dataset_name
pheno_query = """
- SELECT
+ SELECT DISTINCT
Strain.Name, Strain.Name2, PublishData.value, PublishData.Id, PublishSE.error, NStrain.count
FROM
(PublishData, Strain, PublishXRef, PublishFreeze)
@@ -445,9 +563,9 @@ def trait_sample_data(dataset_name, trait_name, file_format = "json"):
NStrain.StrainId = PublishData.StrainId)
WHERE
PublishXRef.InbredSetId = PublishFreeze.InbredSetId AND
- PublishData.Id = PublishXRef.DataId AND PublishXRef.Id = '{1}' AND
- (PublishFreeze.Id = '{0}' OR PublishFreeze.Name = '{0}' OR
- PublishFreeze.ShortName = '{0}' OR PublishXRef.InbredSetId = '{0}') AND
+ PublishData.Id = PublishXRef.DataId AND PublishXRef.Id = "{1}" AND
+ (PublishFreeze.Id = "{0}" OR PublishFreeze.Name = "{0}" OR
+ PublishFreeze.ShortName = "{0}" OR PublishXRef.InbredSetId = "{0}") AND
PublishData.StrainId = Strain.Id
ORDER BY
Strain.Name
@@ -460,15 +578,15 @@ def trait_sample_data(dataset_name, trait_name, file_format = "json"):
sample_list = []
for sample in sample_data:
sample_dict = {
- 'sample_name' : sample[0],
- 'sample_name_2' : sample[1],
- 'value' : sample[2],
- 'data_id' : sample[3]
+ "sample_name" : sample[0],
+ "sample_name_2" : sample[1],
+ "value" : sample[2],
+ "data_id" : sample[3]
}
if sample[4]:
- sample_dict['se'] = sample[4]
+ sample_dict["se"] = sample[4]
if sample[5]:
- sample_dict['n_cases'] = sample[5]
+ sample_dict["n_cases"] = sample[5]
sample_list.append(sample_dict)
return flask.jsonify(sample_list)
@@ -482,15 +600,15 @@ def trait_sample_data(dataset_name, trait_name, file_format = "json"):
def get_trait_info(dataset_name, trait_name, file_format = "json"):
probeset_query = """
SELECT
- ProbeSet.Id, ProbeSet.Name, ProbeSet.Symbol, ProbeSet.description, ProbeSet.Chr, ProbeSet.Mb, ProbeSet.alias,
+ ProbeSet.Id, ProbeSet.Name, ProbeSet.Symbol, ProbeSet.description, ProbeSet.Chr, ProbeSet.Mb, ProbeSet.alias,
ProbeSetXRef.mean, ProbeSetXRef.se, ProbeSetXRef.Locus, ProbeSetXRef.LRS, ProbeSetXRef.pValue, ProbeSetXRef.additive
FROM
ProbeSet, ProbeSetXRef, ProbeSetFreeze
WHERE
- ProbeSet.Name = '{0}' AND
+ ProbeSet.Name = "{0}" AND
ProbeSetXRef.ProbeSetId = ProbeSet.Id AND
ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id AND
- ProbeSetFreeze.Name = '{1}'
+ ProbeSetFreeze.Name = "{1}"
""".format(trait_name, dataset_name)
probeset_results = g.db.execute(probeset_query)
@@ -498,19 +616,19 @@ def get_trait_info(dataset_name, trait_name, file_format = "json"):
trait_info = probeset_results.fetchone()
if trait_info:
trait_dict = {
- 'id' : trait_info[0],
- 'name' : trait_info[1],
- 'symbol' : trait_info[2],
- 'description' : trait_info[3],
- 'chr' : trait_info[4],
- 'mb' : trait_info[5],
- 'alias' :trait_info[6],
- 'mean' : trait_info[7],
- 'se' : trait_info[8],
- 'locus' : trait_info[9],
- 'lrs' : trait_info[10],
- 'p_value' : trait_info[11],
- 'additive' : trait_info[12]
+ "id" : trait_info[0],
+ "name" : trait_info[1],
+ "symbol" : trait_info[2],
+ "description" : trait_info[3],
+ "chr" : trait_info[4],
+ "mb" : trait_info[5],
+ "alias" :trait_info[6],
+ "mean" : trait_info[7],
+ "se" : trait_info[8],
+ "locus" : trait_info[9],
+ "lrs" : trait_info[10],
+ "p_value" : trait_info[11],
+ "additive" : trait_info[12]
}
return flask.jsonify(trait_dict)
@@ -525,28 +643,26 @@ def get_trait_info(dataset_name, trait_name, file_format = "json"):
FROM
PublishXRef
WHERE
- PublishXRef.Id = '{0}' AND
- PublishXRef.InbredSetId = '{1}'
+ PublishXRef.Id = "{0}" AND
+ PublishXRef.InbredSetId = "{1}"
""".format(trait_name, group_id)
-
- logger.debug("QUERY:", pheno_query)
pheno_results = g.db.execute(pheno_query)
trait_info = pheno_results.fetchone()
if trait_info:
trait_dict = {
- 'id' : trait_info[0],
- 'locus' : trait_info[1],
- 'lrs' : trait_info[2],
- 'additive' : trait_info[3]
+ "id" : trait_info[0],
+ "locus" : trait_info[1],
+ "lrs" : trait_info[2],
+ "additive" : trait_info[3]
}
return flask.jsonify(trait_dict)
else:
return return_error(code=204, source=request.url_rule.rule, title="No Results", details="")
-@app.route("/api/v_{}/correlation".format(version), methods=('GET',))
+@app.route("/api/v_{}/correlation".format(version), methods=("GET",))
def get_corr_results():
results = correlation.do_correlation(request.args)
@@ -555,53 +671,71 @@ def get_corr_results():
else:
return return_error(code=204, source=request.url_rule.rule, title="No Results", details="")
-@app.route("/api/v_{}/mapping".format(version), methods=('GET',))
+@app.route("/api/v_{}/mapping".format(version), methods=("GET",))
def get_mapping_results():
- results = mapping.do_mapping_for_api(request.args)
+ results, format = mapping.do_mapping_for_api(request.args)
if len(results) > 0:
- filename = "mapping_" + datetime.datetime.utcnow().strftime('%b_%d_%Y_%I:%M%p') + ".csv"
+ if format == "csv":
+ filename = "mapping_" + datetime.datetime.utcnow().strftime("%b_%d_%Y_%I:%M%p") + ".csv"
- si = StringIO.StringIO()
- csv_writer = csv.writer(si)
- csv_writer.writerows(results)
- output = make_response(si.getvalue())
- output.headers["Content-Disposition"] = "attachment; filename=" + filename
- output.headers["Content-type"] = "text/csv"
+ si = StringIO.StringIO()
+ csv_writer = csv.writer(si)
+ csv_writer.writerows(results)
+ output = make_response(si.getvalue())
+ output.headers["Content-Disposition"] = "attachment; filename=" + filename
+ output.headers["Content-type"] = "text/csv"
- return output
+ return output
+ elif format == "json":
+ return flask.jsonify(results)
+ else:
+ return return_error(code=415, source=request.url_rule.rule, title="Unsupported Format", details="")
else:
return return_error(code=204, source=request.url_rule.rule, title="No Results", details="")
@app.route("/api/v_{}/genotypes/<path:group_name>".format(version))
@app.route("/api/v_{}/genotypes/<path:group_name>.<path:file_format>".format(version))
def get_genotypes(group_name, file_format="csv"):
+ limit_num = None
+ if 'limit_to' in request.args:
+ if request.args['limit_to'].isdigit():
+ limit_num = int(request.args['limit_to'])
+
si = StringIO.StringIO()
if file_format == "csv" or file_format == "geno":
filename = group_name + ".geno"
- if os.path.isfile('{0}/{1}.geno'.format(flat_files('genotype'), group_name)):
+ if os.path.isfile("{0}/{1}.geno".format(flat_files("genotype"), group_name)):
output_lines = []
- with open('{0}/{1}.geno'.format(flat_files('genotype'), group_name)) as genofile:
+ with open("{0}/{1}.geno".format(flat_files("genotype"), group_name)) as genofile:
+ i = 0
for line in genofile:
if line[0] == "#" or line[0] == "@":
output_lines.append([line.strip()])
else:
+ if limit_num and i >= limit_num:
+ break
output_lines.append(line.split())
+ i += 1
- csv_writer = csv.writer(si, delimiter = '\t', escapechar = "\\", quoting = csv.QUOTE_NONE)
+ csv_writer = csv.writer(si, delimiter = "\t", escapechar = "\\", quoting = csv.QUOTE_NONE)
else:
return return_error(code=204, source=request.url_rule.rule, title="No Results", details="")
else:
filename = group_name + ".bimbam"
- if os.path.isfile('{0}/{1}.geno'.format(flat_files('genotype'), group_name)):
+ if os.path.isfile("{0}/{1}.geno".format(flat_files("genotype"), group_name)):
output_lines = []
- with open('{0}/{1}_geno.txt'.format(flat_files('genotype/bimbam'), group_name)) as genofile:
+ with open("{0}/{1}_geno.txt".format(flat_files("genotype/bimbam"), group_name)) as genofile:
+ i = 0
for line in genofile:
+ if limit_num and i >= limit_num:
+ break
output_lines.append([line.strip() for line in line.split(",")])
+ i += 1
- csv_writer = csv.writer(si, delimiter = ',')
+ csv_writer = csv.writer(si, delimiter = ",")
else:
return return_error(code=204, source=request.url_rule.rule, title="No Results", details="")
@@ -612,12 +746,14 @@ def get_genotypes(group_name, file_format="csv"):
return output
-@app.route("/api/v_{}/traits/<path:dataset_name>".format(version), methods=('GET',))
-@app.route("/api/v_{}/traits/<path:dataset_name>.<path:file_format>".format(version), methods=('GET',))
-def get_traits(dataset_name, file_format = "json"):
- #ZS: Need to check about the "start" and "stop" stuff since it seems to just limit the number of results to stop - start + 1 in Pjotr's elixir code
+@app.route("/api/v_{}/gen_dropdown".format(version), methods=("GET",))
+def gen_dropdown_menu():
+ results = gen_menu.gen_dropdown_json()
- NotImplemented
+ if len(results) > 0:
+ return flask.jsonify(results)
+ else:
+ return return_error(code=500, source=request.url_rule.rule, title="Some error occurred", details="")
def return_error(code, source, title, details):
json_ob = {"errors": [
@@ -631,7 +767,13 @@ def return_error(code, source, title, details):
return flask.jsonify(json_ob)
-def get_dataset_trait_ids(dataset_name):
+def get_dataset_trait_ids(dataset_name, start_vars):
+
+ if 'limit_to' in start_vars:
+ limit_string = "LIMIT " + str(start_vars['limit_to'])
+ else:
+ limit_string = ""
+
if "Geno" in dataset_name:
data_type = "Geno" #ZS: Need to pass back the dataset type
query = """
@@ -642,8 +784,9 @@ def get_dataset_trait_ids(dataset_name):
WHERE
Geno.Id = GenoXRef.GenoId AND
GenoXRef.GenoFreezeId = GenoFreeze.Id AND
- GenoFreeze.Name = '{0}'
- """.format(dataset_name)
+ GenoFreeze.Name = "{0}"
+ {1}
+ """.format(dataset_name, limit_string)
results = g.db.execute(query).fetchall()
@@ -652,7 +795,7 @@ def get_dataset_trait_ids(dataset_name):
dataset_id = results[0][2]
return trait_ids, trait_names, data_type, dataset_id
- elif "Publish" in dataset_name:
+ elif "Publish" in dataset_name or get_group_id(dataset_name):
data_type = "Publish"
dataset_name = dataset_name.replace("Publish", "")
dataset_id = get_group_id(dataset_name)
@@ -663,8 +806,9 @@ def get_dataset_trait_ids(dataset_name):
FROM
PublishXRef
WHERE
- PublishXRef.InbredSetId = '{0}'
- """.format(dataset_id)
+ PublishXRef.InbredSetId = "{0}"
+ {1}
+ """.format(dataset_id, limit_string)
results = g.db.execute(query).fetchall()
@@ -682,8 +826,9 @@ def get_dataset_trait_ids(dataset_name):
WHERE
ProbeSet.Id = ProbeSetXRef.ProbeSetId AND
ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id AND
- ProbeSetFreeze.Name = '{0}'
- """.format(dataset_name)
+ ProbeSetFreeze.Name = "{0}"
+ {1}
+ """.format(dataset_name, limit_string)
results = g.db.execute(query).fetchall()
@@ -743,13 +888,16 @@ def get_group_id_from_dataset(dataset_name):
result = g.db.execute(query).fetchone()
- return result[0]
+ if len(result) > 0:
+ return result[0]
+ else:
+ return None
def get_group_id(group_name):
query = """
SELECT InbredSet.Id
FROM InbredSet
- WHERE InbredSet.Name = '{}'
+ WHERE InbredSet.Name = "{}"
""".format(group_name)
group_id = g.db.execute(query).fetchone()
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py
index 74013239..7e3337a0 100644
--- a/wqflask/wqflask/collect.py
+++ b/wqflask/wqflask/collect.py
@@ -214,6 +214,8 @@ def collections_new():
if "create_new" in params:
logger.debug("in create_new")
collection_name = params['new_collection']
+ if collection_name.strip() == "":
+ collection_name = datetime.datetime.utcnow().strftime('Collection_%b_%d_%H:%M')
return create_new(collection_name)
elif "add_to_existing" in params:
logger.debug("in add to existing")
diff --git a/wqflask/wqflask/correlation/corr_scatter_plot.py b/wqflask/wqflask/correlation/corr_scatter_plot.py
index 925e8783..07aa947e 100644
--- a/wqflask/wqflask/correlation/corr_scatter_plot.py
+++ b/wqflask/wqflask/correlation/corr_scatter_plot.py
@@ -1,5 +1,7 @@
from __future__ import absolute_import, print_function, division
+import math
+
from flask import g
from base.trait import GeneralTrait
@@ -35,17 +37,30 @@ class CorrScatterPlot(object):
vals_2.append(samples_2[sample].value)
self.data.append(vals_2)
- x = np.array(vals_1)
- y = np.array(vals_2)
- slope, intercept, r_value, p_value, std_err = stats.linregress(x, y)
+ slope, intercept, r_value, p_value, std_err = stats.linregress(vals_1, vals_2)
- rx = stats.rankdata(x)
- ry = stats.rankdata(y)
+ x_buffer = (max(vals_1) - min(vals_1))*0.1
+ y_buffer = (max(vals_2) - min(vals_2))*0.1
+
+ x_range = [min(vals_1) - x_buffer, max(vals_1) + x_buffer]
+ y_range = [min(vals_2) - y_buffer, max(vals_2) + y_buffer]
+
+ intercept_coords = get_intercept_coords(slope, intercept, x_range, y_range)
+
+ rx = stats.rankdata(vals_1)
+ ry = stats.rankdata(vals_2)
self.rdata = []
self.rdata.append(rx.tolist())
self.rdata.append(ry.tolist())
srslope, srintercept, srr_value, srp_value, srstd_err = stats.linregress(rx, ry)
+ x_buffer = (max(rx) - min(rx))*0.1
+ y_buffer = (max(ry) - min(ry))*0.1
+
+ sr_range = [min(rx) - x_buffer, max(rx) + x_buffer]
+
+ sr_intercept_coords = get_intercept_coords(srslope, srintercept, sr_range, sr_range)
+
#vals_3 = []
#for sample in self.trait_3.data:
# vals_3.append(self.trait_3.data[sample].value)
@@ -68,6 +83,11 @@ class CorrScatterPlot(object):
num_overlap = num_overlap,
vals_1 = vals_1,
vals_2 = vals_2,
+ x_range = x_range,
+ y_range = y_range,
+ sr_range = sr_range,
+ intercept_coords = intercept_coords,
+ sr_intercept_coords = sr_intercept_coords,
slope = slope,
intercept = intercept,
@@ -83,3 +103,17 @@ class CorrScatterPlot(object):
#vals_3 = vals_3
)
self.jsdata = self.js_data
+
+
+def get_intercept_coords(slope, intercept, x_range, y_range):
+ intercept_coords = []
+
+ y1 = slope*x_range[0] + intercept
+ y2 = slope*x_range[1] + intercept
+ x1 = (y1-intercept)/slope
+ x2 = (y2-intercept)/slope
+
+ intercept_coords.append([x1, y1])
+ intercept_coords.append([x2, y2])
+
+ return intercept_coords \ No newline at end of file
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index 1aa7945d..0db8fa38 100644
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -83,7 +83,7 @@ class CorrelationResults(object):
assert('corr_sample_method' in start_vars)
assert('corr_samples_group' in start_vars)
assert('corr_dataset' in start_vars)
- assert('min_expr' in start_vars)
+ #assert('min_expr' in start_vars)
assert('corr_return_results' in start_vars)
if 'loc_chr' in start_vars:
assert('min_loc_mb' in start_vars)
@@ -117,6 +117,8 @@ class CorrelationResults(object):
self.location_chr = get_string(start_vars,'loc_chr')
self.min_location_mb = get_int(start_vars,'min_loc_mb')
self.max_location_mb = get_int(start_vars,'max_loc_mb')
+ else:
+ self.location_chr = self.min_location_mb = self.max_location_mb = None
self.get_formatted_corr_type()
self.return_number = int(start_vars['corr_return_results'])
@@ -146,6 +148,15 @@ class CorrelationResults(object):
self.target_dataset = data_set.create_dataset(start_vars['corr_dataset'])
self.target_dataset.get_trait_data(self.sample_data.keys())
+ self.header_fields = get_header_fields(self.target_dataset.type, self.corr_method)
+
+ if self.target_dataset.type == "ProbeSet":
+ self.filter_cols = [7, 6]
+ elif self.target_dataset.type == "Publish":
+ self.filter_cols = [6, 0]
+ else:
+ self.filter_cols = [4, 0]
+
self.correlation_results = []
self.correlation_data = {}
@@ -179,8 +190,9 @@ class CorrelationResults(object):
#ZS: Convert min/max chromosome to an int for the location range option
range_chr_as_int = None
for order_id, chr_info in self.dataset.species.chromosomes.chromosomes.iteritems():
- if chr_info.name == self.location_chr:
- range_chr_as_int = order_id
+ if 'loc_chr' in start_vars:
+ if chr_info.name == self.location_chr:
+ range_chr_as_int = order_id
for _trait_counter, trait in enumerate(self.correlation_data.keys()[:self.return_number]):
trait_object = GeneralTrait(dataset=self.target_dataset, name=trait, get_qtl_info=True, get_sample_info=False)
@@ -534,3 +546,80 @@ def generate_corr_json(corr_results, this_trait, dataset, target_dataset, for_ap
results_list.append(results_dict)
return json.dumps(results_list)
+
+def get_header_fields(data_type, corr_method):
+ if data_type == "ProbeSet":
+ if corr_method == "pearson":
+ header_fields = ['Index',
+ 'Record',
+ 'Symbol',
+ 'Description',
+ 'Location',
+ 'Mean',
+ 'Sample r',
+ 'N',
+ 'Sample p(r)',
+ 'Lit r',
+ 'Tissue r',
+ 'Tissue p(r)',
+ 'Max LRS',
+ 'Max LRS Location',
+ 'Additive Effect']
+ else:
+ header_fields = ['Index',
+ 'Record',
+ 'Symbol',
+ 'Description',
+ 'Location',
+ 'Mean',
+ 'Sample rho',
+ 'N',
+ 'Sample p(rho)',
+ 'Lit rho',
+ 'Tissue rho',
+ 'Tissue p(rho)',
+ 'Max LRS',
+ 'Max LRS Location',
+ 'Additive Effect']
+ elif data_type == "Publish":
+ if corr_method == "pearson":
+ header_fields = ['Index',
+ 'Record',
+ 'Description',
+ 'Authors',
+ 'Year',
+ 'Sample r',
+ 'N',
+ 'Sample p(r)',
+ 'Max LRS',
+ 'Max LRS Location',
+ 'Additive Effect']
+ else:
+ header_fields = ['Index',
+ 'Record',
+ 'Description',
+ 'Authors',
+ 'Year',
+ 'Sample rho',
+ 'N',
+ 'Sample p(rho)',
+ 'Max LRS',
+ 'Max LRS Location',
+ 'Additive Effect']
+ else:
+ if corr_method == "pearson":
+ header_fields = ['Index',
+ 'ID',
+ 'Location'
+ 'Sample r',
+ 'N',
+ 'Sample p(r)']
+ else:
+ header_fields = ['Index',
+ 'ID',
+ 'Location'
+ 'Sample rho',
+ 'N',
+ 'Sample p(rho)']
+
+ return header_fields \ No newline at end of file
diff --git a/wqflask/wqflask/database.py b/wqflask/wqflask/database.py
index 96c2c301..adeed6ad 100644
--- a/wqflask/wqflask/database.py
+++ b/wqflask/wqflask/database.py
@@ -9,7 +9,7 @@ import utility.logger
logger = utility.logger.getLogger(__name__ )
-engine = create_engine(SQL_URI, convert_unicode=True)
+engine = create_engine(SQL_URI, encoding="latin1")
db_session = scoped_session(sessionmaker(autocommit=False,
autoflush=False,
diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py
index c7dbc972..8476649f 100644
--- a/wqflask/wqflask/do_search.py
+++ b/wqflask/wqflask/do_search.py
@@ -22,12 +22,13 @@ class DoSearch(object):
# Used to translate search phrases into classes
search_types = dict()
- def __init__(self, search_term, search_operator=None, dataset=None):
+ def __init__(self, search_term, search_operator=None, dataset=None, search_type=None):
self.search_term = search_term
# Make sure search_operator is something we expect
assert search_operator in (None, "=", "<", ">", "<=", ">="), "Bad search operator"
self.search_operator = search_operator
self.dataset = dataset
+ self.search_type = search_type
if self.dataset:
logger.debug("self.dataset is boo: ", type(self.dataset), pf(self.dataset))
@@ -69,7 +70,7 @@ class DoSearch(object):
logger.debug("search_types are:", pf(cls.search_types))
search_type_string = search_type['dataset_type']
- if 'key' in search_type:
+ if 'key' in search_type and search_type['key'] != None:
search_type_string += '_' + search_type['key']
logger.debug("search_type_string is:", search_type_string)
@@ -444,12 +445,13 @@ class LrsSearch(DoSearch):
"""
- DoSearch.search_types['LRS'] = 'LrsSearch'
+ for search_key in ('LRS', 'LOD'):
+ DoSearch.search_types[search_key] = "LrsSearch"
def get_from_clause(self):
#If the user typed, for example "Chr4", the "Chr" substring needs to be removed so that all search elements can be converted to floats
- if len(self.search_term) > 2 and "Chr" in self.search_term[2]:
- chr_num = self.search_term[2].replace("Chr", "")
+ if len(self.search_term) > 2 and "chr" in self.search_term[2].lower():
+ chr_num = self.search_term[2].lower().replace("chr", "")
self.search_term[2] = chr_num
self.search_term = [float(value) for value in self.search_term]
@@ -465,6 +467,9 @@ class LrsSearch(DoSearch):
if self.search_operator == "=":
assert isinstance(self.search_term, (list, tuple))
lrs_min, lrs_max = self.search_term[:2]
+ if self.search_type == "LOD":
+ lrs_min = lrs_min*4.61
+ lrs_max = lrs_max*4.61
where_clause = """ %sXRef.LRS > %s and
%sXRef.LRS < %s """ % self.mescape(self.dataset.type,
@@ -489,6 +494,10 @@ class LrsSearch(DoSearch):
else:
# Deal with >, <, >=, and <=
logger.debug("self.search_term is:", self.search_term)
+ lrs_val = self.search_term[0]
+ if self.search_type == "LOD":
+ lrs_val = lrs_val*4.61
+
where_clause = """ %sXRef.LRS %s %s """ % self.mescape(self.dataset.type,
self.search_operator,
self.search_term[0])
@@ -505,9 +514,11 @@ class LrsSearch(DoSearch):
return self.execute(self.query)
+
class MrnaLrsSearch(LrsSearch, MrnaAssaySearch):
- DoSearch.search_types['ProbeSet_LRS'] = 'MrnaLrsSearch'
+ for search_key in ('LRS', 'LOD'):
+ DoSearch.search_types['ProbeSet_' + search_key] = "MrnaLrsSearch"
def run(self):
@@ -520,7 +531,8 @@ class MrnaLrsSearch(LrsSearch, MrnaAssaySearch):
class PhenotypeLrsSearch(LrsSearch, PhenotypeSearch):
- DoSearch.search_types['Publish_LRS'] = 'PhenotypeLrsSearch'
+ for search_key in ('LRS', 'LOD'):
+ DoSearch.search_types['Publish_' + search_key] = "PhenotypeLrsSearch"
def run(self):
@@ -532,7 +544,6 @@ class PhenotypeLrsSearch(LrsSearch, PhenotypeSearch):
return self.execute(self.query)
-
class CisTransLrsSearch(DoSearch):
def get_from_clause(self):
@@ -557,6 +568,10 @@ class CisTransLrsSearch(DoSearch):
else:
SomeError
+ if self.search_type == "CISLOD" or self.search_type == "TRANSLOD":
+ lrs_min = lrs_min * 4.61
+ lrs_max = lrs_max * 4.61
+
sub_clause = """ %sXRef.LRS > %s and
%sXRef.LRS < %s and """ % (
escape(self.dataset.type),
@@ -619,7 +634,8 @@ class CisLrsSearch(CisTransLrsSearch, MrnaAssaySearch):
"""
- DoSearch.search_types['ProbeSet_CISLRS'] = 'CisLrsSearch'
+ for search_key in ('LRS', 'LOD'):
+ DoSearch.search_types['ProbeSet_CIS'+search_key] = "CisLrsSearch"
def get_where_clause(self):
return CisTransLrsSearch.get_where_clause(self, "cis")
@@ -648,7 +664,8 @@ class TransLrsSearch(CisTransLrsSearch, MrnaAssaySearch):
"""
- DoSearch.search_types['ProbeSet_TRANSLRS'] = 'TransLrsSearch'
+ for search_key in ('LRS', 'LOD'):
+ DoSearch.search_types['ProbeSet_TRANS'+search_key] = "TransLrsSearch"
def get_where_clause(self):
return CisTransLrsSearch.get_where_clause(self, "trans")
diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py
index 62398154..dbb77826 100644
--- a/wqflask/wqflask/gsearch.py
+++ b/wqflask/wqflask/gsearch.py
@@ -61,6 +61,7 @@ class GSearch(object):
with Bench("Running query"):
logger.sql(sql)
re = g.db.execute(sql).fetchall()
+
trait_list = []
with Bench("Creating trait objects"):
for i, line in enumerate(re):
@@ -74,11 +75,14 @@ class GSearch(object):
this_trait['group'] = line[1]
this_trait['tissue'] = line[2]
this_trait['symbol'] = line[6]
- this_trait['description'] = line[7]
+ this_trait['description'] = line[7].decode('utf-8', 'replace')
this_trait['location_repr'] = 'N/A'
if (line[8] != "NULL" and line[8] != "") and (line[9] != 0):
this_trait['location_repr'] = 'Chr%s: %.6f' % (line[8], float(line[9]))
- this_trait['mean'] = '%.3f' % line[10]
+ try:
+ this_trait['mean'] = '%.3f' % line[10]
+ except:
+ this_trait['mean'] = "N/A"
this_trait['LRS_score_repr'] = "N/A"
if line[11] != "" and line[11] != None:
this_trait['LRS_score_repr'] = '%3.1f' % line[11]
@@ -97,6 +101,7 @@ class GSearch(object):
trait_list.append(this_trait)
+ self.trait_count = len(trait_list)
self.trait_list = json.dumps(trait_list)
elif self.type == "phenotype":
@@ -147,9 +152,9 @@ class GSearch(object):
this_trait['species'] = line[0]
this_trait['group'] = line[1]
if line[9] != None and line[6] != None:
- this_trait['description'] = unicode(line[6], "utf-8", "ignore")
+ this_trait['description'] = line[6].decode('utf-8', 'replace')
elif line[5] != None:
- this_trait['description'] = unicode(line[5], "utf-8", "ignore")
+ this_trait['description'] = line[5].decode('utf-8', 'replace')
else:
this_trait['description'] = "N/A"
this_trait['authors'] = line[7]
@@ -183,4 +188,5 @@ class GSearch(object):
trait_list.append(this_trait)
+ self.trait_count = len(trait_list)
self.trait_list = json.dumps(trait_list)
diff --git a/wqflask/wqflask/heatmap/heatmap.py b/wqflask/wqflask/heatmap/heatmap.py
index 9d33961c..37454dfb 100644
--- a/wqflask/wqflask/heatmap/heatmap.py
+++ b/wqflask/wqflask/heatmap/heatmap.py
@@ -120,14 +120,14 @@ class Heatmap(object):
self.dataset.group.get_markers()
this_trait = trait_db[0]
#this_db = trait_db[1]
- genotype = self.dataset.group.read_genotype_file()
+ genotype = self.dataset.group.read_genotype_file(use_reaper=True)
samples, values, variances, sample_aliases = this_trait.export_informative()
trimmed_samples = []
trimmed_values = []
for i in range(0, len(samples)):
if samples[i] in self.dataset.group.samplelist:
- trimmed_samples.append(samples[i])
+ trimmed_samples.append(str(samples[i]))
trimmed_values.append(values[i])
reaper_results = genotype.regression(strains = trimmed_samples,
diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py
index 6a3eeccc..00f9acb3 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
@@ -182,7 +183,7 @@ class DisplayMappingResults(object):
self.dataset = start_vars['dataset']
self.this_trait = start_vars['this_trait']
- self.n_samples = len(start_vars['vals'])
+ self.n_samples = start_vars['num_vals']
self.species = start_vars['species']
self.genofile_string = ""
if 'genofile_string' in start_vars:
@@ -204,8 +205,8 @@ class DisplayMappingResults(object):
self.mapmodel_rqtl_geno = start_vars['model']
self.pair_scan = start_vars['pair_scan']
- if self.mapping_method != "gemma" and self.mapping_method != "plink":
- self.js_data = start_vars['js_data']
+ #if self.mapping_method != "gemma" and self.mapping_method != "plink":
+ self.js_data = start_vars['js_data']
self.trimmed_markers = start_vars['trimmed_markers'] #Top markers to display in table
if self.dataset.group.species == "rat":
@@ -264,17 +265,24 @@ class DisplayMappingResults(object):
self.covariates = start_vars['covariates']
if 'maf' in start_vars.keys():
self.maf = start_vars['maf']
+ if 'output_files' in start_vars.keys():
+ self.output_files = start_vars['output_files']
if 'use_loco' in start_vars.keys() and self.mapping_method == "gemma":
self.use_loco = start_vars['use_loco']
- if self.use_loco == "True":
- self.gwa_filename = start_vars['gwa_filename']
+
+ if 'reaper_version' in start_vars.keys() and self.mapping_method == "reaper":
+ self.reaper_version = start_vars['reaper_version']
+ if 'output_files' in start_vars:
+ self.output_files = ",".join(start_vars['output_files'])
self.selectedChr = int(start_vars['selected_chr'])
self.strainlist = start_vars['samples']
- self.genotype = self.dataset.group.read_genotype_file()
+
if self.mapping_method == "reaper" and self.manhattan_plot != True:
- self.genotype = self.genotype.addinterval()
+ self.genotype = self.dataset.group.read_genotype_file(use_reaper=True)
+ else:
+ self.genotype = self.dataset.group.read_genotype_file()
#Darwing Options
try:
@@ -790,7 +798,7 @@ class DisplayMappingResults(object):
locPixel += (Mb*(_chr[-1].cM-_chr[0].cM)/self.ChrLengthCMList[i])*plotXScale
break
if locPixel >= 0 and self.plotScale == 'physic':
- traitPixel = ((locPixel, yZero), (locPixel-6, yZero+12), (locPixel+6, yZero+12))
+ traitPixel = ((locPixel, yZero), (locPixel-7, yZero+14), (locPixel+7, yZero+14))
canvas.drawPolygon(traitPixel, edgeColor=pid.black, fillColor=self.TRANSCRIPT_LOCATION_COLOR, closed=1)
if self.legendChecked:
@@ -801,7 +809,7 @@ class DisplayMappingResults(object):
leftOffset = xLeftOffset
else:
leftOffset = xLeftOffset+(nCol-1)*200*fontZoom
- canvas.drawPolygon(((leftOffset+6, startPosY-6), (leftOffset, startPosY+6), (leftOffset+12, startPosY+6)), edgeColor=pid.black, fillColor=self.TRANSCRIPT_LOCATION_COLOR, closed=1)
+ canvas.drawPolygon(((leftOffset+7, startPosY-7), (leftOffset, startPosY+7), (leftOffset+14, startPosY+7)), edgeColor=pid.black, fillColor=self.TRANSCRIPT_LOCATION_COLOR, closed=1)
canvas.drawString("Sequence Site", (leftOffset+15), (startPosY+5), smallLabelFont, self.TOP_RIGHT_INFO_COLOR)
def drawSNPTrackNew(self, canvas, offset= (40, 120, 80, 10), zoom = 1, startMb = None, endMb = None):
@@ -1451,9 +1459,9 @@ class DisplayMappingResults(object):
if self.dataset.group.species == "mouse" or self.dataset.group.species == "rat":
PHENOGEN_COORDS = "%d, %d, %d, %d" % (xBrowse1, phenogenPaddingTop, xBrowse2, (phenogenPaddingTop+self.BAND_HEIGHT))
if self.dataset.group.species == "mouse":
- PHENOGEN_HREF = "https://phenogen.ucdenver.edu/PhenoGen/gene.jsp?speciesCB=Mm&auto=Y&geneTxt=chr%s:%d-%d&genomeVer=mm10" % (self.selectedChr, max(0, calBase-flankingWidthInBases), calBase+flankingWidthInBases)
+ PHENOGEN_HREF = "https://phenogen.org/PhenoGen/gene.jsp?speciesCB=Mm&auto=Y&geneTxt=chr%s:%d-%d&genomeVer=mm10" % (self.selectedChr, max(0, calBase-flankingWidthInBases), calBase+flankingWidthInBases)
else:
- PHENOGEN_HREF = "https://phenogen.ucdenver.edu/PhenoGen/gene.jsp?speciesCB=Mm&auto=Y&geneTxt=chr%s:%d-%d&genomeVer=mm10" % (self.selectedChr, max(0, calBase-flankingWidthInBases), calBase+flankingWidthInBases)
+ PHENOGEN_HREF = "https://phenogen.org/PhenoGen/gene.jsp?speciesCB=Mm&auto=Y&geneTxt=chr%s:%d-%d&genomeVer=mm10" % (self.selectedChr, max(0, calBase-flankingWidthInBases), calBase+flankingWidthInBases)
PHENOGEN_TITLE = "Click to view this section of the genome in PhenoGen"
gifmap.areas.append(make_map_area(shape='rect',coords=PHENOGEN_COORDS,href=PHENOGEN_HREF, title=PHENOGEN_TITLE))
canvas.drawRect(xBrowse1, phenogenPaddingTop, xBrowse2, (phenogenPaddingTop+self.BAND_HEIGHT), edgeColor=self.CLICKABLE_PHENOGEN_REGION_COLOR, fillColor=self.CLICKABLE_PHENOGEN_REGION_COLOR)
@@ -1730,6 +1738,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.61
+ 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:
@@ -1827,11 +1843,10 @@ class DisplayMappingResults(object):
m = 0
thisLRSColor = self.colorCollection[0]
if qtlresult['chr'] != previous_chr and self.selectedChr == -1:
-
if self.manhattan_plot != True:
canvas.drawPolygon(LRSCoordXY,edgeColor=thisLRSColor,closed=0, edgeWidth=lrsEdgeWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
- if not self.multipleInterval and not self.manhattan_plot and self.additiveChecked:
+ if not self.multipleInterval and self.additiveChecked:
plusColor = self.ADDITIVE_COLOR_POSITIVE
minusColor = self.ADDITIVE_COLOR_NEGATIVE
for k, aPoint in enumerate(AdditiveCoordXY):
@@ -1902,10 +1917,18 @@ class DisplayMappingResults(object):
if self.manhattan_plot == True:
if self.selectedChr == -1 and (previous_chr_as_int % 2 == 1):
- point_color = pid.grey
+ point_color = pid.red
+ else:
+ point_color = pid.blue
+
+ final_x_pos = Xc-canvas.stringWidth("5",font=symbolFont)/2+1
+ if final_x_pos > (xLeftOffset + plotWidth):
+ continue
+ #break ZS: This is temporary until issue with sorting for GEMMA is fixed
+ elif final_x_pos < xLeftOffset:
+ continue
else:
- point_color = pid.black
- canvas.drawString("5", Xc-canvas.stringWidth("5",font=symbolFont)/2+1,Yc+2,color=point_color, font=symbolFont)
+ canvas.drawString("5", final_x_pos,Yc+2,color=point_color, font=symbolFont)
else:
LRSCoordXY.append((Xc, Yc))
@@ -2082,11 +2105,11 @@ class DisplayMappingResults(object):
#########################################
# Permutation Graph
#########################################
- myCanvas = pid.PILCanvas(size=(400,300))
+ myCanvas = pid.PILCanvas(size=(500,300))
if 'lod_score' in self.qtlresults[0] and self.LRS_LOD == "LRS":
- perm_output = [value*4.16 for value in self.perm_output]
+ perm_output = [value*4.61 for value in self.perm_output]
elif 'lod_score' not in self.qtlresults[0] and self.LRS_LOD == "LOD":
- perm_output = [value/4.16 for value in self.perm_output]
+ perm_output = [value/4.61 for value in self.perm_output]
else:
perm_output = self.perm_output
@@ -2245,7 +2268,7 @@ class DisplayMappingResults(object):
this_row = [] #container for the cells of each row
selectCheck = make_input(type_="checkbox", name="searchResult", class_="checkbox", onClick="highlight(this)").__str__() #checkbox for each row
- webqtlSearch = make_link(os.path.join(webqtlConfig.CGIDIR, webqtlConfig.SCRIPTFILE)+"?cmd=sch&gene=%s&alias=1&species=rat" % theGO["GeneSymbol"], content=(">>",), target="_blank").__str__()
+ #webqtlSearch = make_link(os.path.join(webqtlConfig.CGIDIR, webqtlConfig.SCRIPTFILE)+"?cmd=sch&gene=%s&alias=1&species=rat" % theGO["GeneSymbol"], content=(">>",), target="_blank").__str__()
if theGO["GeneID"] != "":
geneSymbolNCBI = make_link("http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=%s" % theGO["GeneID"], content=(theGO["GeneSymbol"],), class_="normalsize", target="_blank").__str__()
@@ -2269,14 +2292,14 @@ class DisplayMappingResults(object):
#Mouse Gene
if theGO['mouseGene']:
mouseChr = theGO['mouseGene']["Chromosome"]
- mouseTxStart = theGO['mouseGene']["TxStart"]
+ mouseTxStart = "%0.6f" % theGO['mouseGene']["TxStart"]
else:
mouseChr = mouseTxStart = ""
#the chromosomes for human 1 are 1qXX.XX
if theGO['humanGene']:
humanChr = theGO['humanGene']["Chromosome"]
- humanTxStart = theGO['humanGene']["TxStart"]
+ humanTxStart = "%0.6f" % theGO['humanGene']["TxStart"]
else:
humanChr = humanTxStart = ""
@@ -2286,9 +2309,9 @@ class DisplayMappingResults(object):
this_row = [selectCheck.__str__(),
str(gIndex+1),
- webqtlSearch.__str__() + geneSymbolNCBI,
- theGO["TxStart"],
- make_link(geneLengthURL, content=("%0.3f" % (geneLength*1000.0),)).__str__(),
+ geneSymbolNCBI,
+ "%0.6f" % theGO["TxStart"],
+ HT.Href(geneLengthURL, "%0.3f" % (geneLength*1000.0)).__str__(),
avgExprVal,
mouseChr,
mouseTxStart,
diff --git a/wqflask/wqflask/marker_regression/gemma_mapping.py b/wqflask/wqflask/marker_regression/gemma_mapping.py
index 0f37e711..5b34e837 100644
--- a/wqflask/wqflask/marker_regression/gemma_mapping.py
+++ b/wqflask/wqflask/marker_regression/gemma_mapping.py
@@ -12,7 +12,7 @@ GEMMAOPTS = "-debug"
if WEBSERVER_MODE == 'PROD':
GEMMAOPTS = "-no-check"
-def run_gemma(this_trait, this_dataset, samples, vals, covariates, use_loco, maf=0.01, first_run=True, gwa_output_filename=None):
+def run_gemma(this_trait, this_dataset, samples, vals, covariates, use_loco, maf=0.01, first_run=True, output_files=None):
"""Generates p-values for each marker using GEMMA"""
if this_dataset.group.genofile != None:
@@ -73,61 +73,43 @@ def run_gemma(this_trait, this_dataset, samples, vals, covariates, use_loco, maf
gwa_output_filename)
else:
- generate_k_command = GEMMA_COMMAND + ' ' + GEMMAOPTS + ' -g %s/%s_geno.txt -p %s/gn2/%s.txt -a %s/%s_snps.txt -gk -outdir %s/gn2/ -o %s' % (flat_files('genotype/bimbam'),
- genofile_name,
- TEMPDIR,
- trait_filename,
- flat_files('genotype/bimbam'),
- genofile_name,
- TEMPDIR,
- k_output_filename)
- #generate_k_command = GEMMA_WRAPPER_COMMAND + ' --json -- ' + GEMMAOPTS + ' -g %s/%s_geno.txt -p %s/%s.txt -a %s/%s_snps.txt -gk > %s/gn2/%s.json' % (flat_files('genotype/bimbam'),
- # genofile_name,
- # flat_files('genotype/bimbam'),
- # trait_filename,
- # flat_files('genotype/bimbam'),
- # genofile_name,
- # TEMPDIR,
- # k_output_filename)
+ generate_k_command = GEMMA_WRAPPER_COMMAND + ' --json -- ' + GEMMAOPTS + ' -g %s/%s_geno.txt -p %s/gn2/%s.txt -a %s/%s_snps.txt -gk > %s/gn2/%s.json' % (flat_files('genotype/bimbam'),
+ genofile_name,
+ TEMPDIR,
+ trait_filename,
+ flat_files('genotype/bimbam'),
+ genofile_name,
+ TEMPDIR,
+ k_output_filename)
logger.debug("k_command:" + generate_k_command)
os.system(generate_k_command)
- gemma_command = GEMMA_COMMAND + ' ' + GEMMAOPTS + ' -g %s/%s_geno.txt -p %s/gn2/%s.txt -a %s/%s_snps.txt -k %s/gn2/%s.cXX.txt -lmm 2 -maf %s' % (flat_files('genotype/bimbam'),
- genofile_name,
- TEMPDIR,
- trait_filename,
- flat_files('genotype/bimbam'),
- genofile_name,
- TEMPDIR,
- k_output_filename,
- maf)
-
- #gemma_command = GEMMA_WRAPPER_COMMAND + ' --json --input %s/gn2/%s.json -- ' % (TEMPDIR, k_output_filename) + GEMMAOPTS + ' -g %s/%s_geno.txt -p %s/%s_pheno.txt' % (flat_files('genotype/bimbam'),
- # genofile_name,
- # flat_files('genotype/bimbam'),
- # genofile_name)
+ gemma_command = GEMMA_WRAPPER_COMMAND + ' --json --input %s/gn2/%s.json -- ' % (TEMPDIR, k_output_filename) + GEMMAOPTS + ' -a %s/%s_snps.txt -lmm 2 -g %s/%s_geno.txt -p %s/gn2/%s.txt' % (flat_files('genotype/bimbam'),
+ genofile_name,
+ flat_files('genotype/bimbam'),
+ genofile_name,
+ TEMPDIR,
+ trait_filename)
if covariates != "":
- gemma_command += ' -c %s/%s_covariates.txt -outdir %s -o %s_output' % (flat_files('mapping'),
- this_dataset.group.name,
- webqtlConfig.GENERATED_IMAGE_DIR,
- genofile_name)
+ gemma_command += ' -c %s/%s_covariates.txt > %s/gn2/%s.json' % (flat_files('mapping'), this_dataset.group.name, TEMPDIR, gwa_output_filename)
else:
- gemma_command += ' -outdir %s -o %s_output' % (webqtlConfig.GENERATED_IMAGE_DIR,
- genofile_name)
+ gemma_command += ' > %s/gn2/%s.json' % (TEMPDIR, gwa_output_filename)
logger.debug("gemma_command:" + gemma_command)
os.system(gemma_command)
+ else:
+ gwa_output_filename = output_files
if use_loco == "True":
marker_obs = parse_loco_output(this_dataset, gwa_output_filename)
return marker_obs, gwa_output_filename
else:
- marker_obs = parse_gemma_output(genofile_name)
- return marker_obs
+ marker_obs = parse_loco_output(this_dataset, gwa_output_filename)
+ return marker_obs, gwa_output_filename
def gen_pheno_txt_file(this_dataset, genofile_name, vals, trait_filename):
"""Generates phenotype file for GEMMA"""
@@ -220,7 +202,11 @@ def parse_loco_output(this_dataset, gwa_output_filename):
marker_obs = []
previous_chr = 0
+ no_results = False
for this_file in output_filelist:
+ if not os.path.isfile(this_file):
+ no_results = True
+ break
with open(this_file) as output_file:
for line in output_file:
if line.startswith("chr\t"):
diff --git a/wqflask/wqflask/marker_regression/qtlreaper_mapping.py b/wqflask/wqflask/marker_regression/qtlreaper_mapping.py
index 35bed8d8..bbc8b513 100644
--- a/wqflask/wqflask/marker_regression/qtlreaper_mapping.py
+++ b/wqflask/wqflask/marker_regression/qtlreaper_mapping.py
@@ -1,8 +1,126 @@
+import os, math, string, random, json
+
+from base import webqtlConfig
+from base.trait import GeneralTrait
+from base.data_set import create_dataset
+from utility.tools import flat_files, REAPER_COMMAND, TEMPDIR
+
import utility.logger
logger = utility.logger.getLogger(__name__ )
-def gen_reaper_results(this_trait, dataset, samples_before, trait_vals, json_data, num_perm, bootCheck, num_bootstrap, do_control, control_marker, manhattan_plot):
- genotype = dataset.group.read_genotype_file()
+def run_reaper(this_trait, this_dataset, samples, vals, json_data, num_perm, boot_check, num_bootstrap, do_control, control_marker, manhattan_plot, first_run=True, output_files=None):
+ """Generates p-values for each marker using qtlreaper"""
+
+ if first_run:
+ if this_dataset.group.genofile != None:
+ genofile_name = this_dataset.group.genofile[:-5]
+ else:
+ genofile_name = this_dataset.group.name
+
+ trait_filename = str(this_trait.name) + "_" + str(this_dataset.name) + "_pheno"
+ gen_pheno_txt_file(this_dataset, genofile_name, samples, vals, trait_filename)
+
+ output_filename = this_dataset.group.name + "_GWA_" + ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(6))
+ bootstrap_filename = None
+ permu_filename = None
+
+ opt_list = []
+ if boot_check and num_bootstrap > 0:
+ bootstrap_filename = this_dataset.group.name + "_BOOTSTRAP_" + ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(6))
+
+ opt_list.append("-b")
+ opt_list.append("--n_bootstrap " + str(num_bootstrap))
+ opt_list.append("--bootstrap_output " + webqtlConfig.GENERATED_IMAGE_DIR + bootstrap_filename + ".txt")
+ if num_perm > 0:
+ permu_filename = this_dataset.group.name + "_PERM_" + ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(6))
+ opt_list.append("-n " + str(num_perm))
+ opt_list.append("--permu_output " + webqtlConfig.GENERATED_IMAGE_DIR + permu_filename + ".txt")
+ if control_marker != "" and do_control == "true":
+ opt_list.append("-c " + control_marker)
+
+ reaper_command = REAPER_COMMAND + ' --geno {0}/{1}.geno --traits {2}/gn2/{3}.txt {4} -o {5}{6}.txt'.format(flat_files('genotype'),
+ genofile_name,
+ TEMPDIR,
+ trait_filename,
+ " ".join(opt_list),
+ webqtlConfig.GENERATED_IMAGE_DIR,
+ output_filename)
+
+ logger.debug("reaper_command:" + reaper_command)
+ os.system(reaper_command)
+ else:
+ output_filename, permu_filename, bootstrap_filename = output_files
+
+ marker_obs, permu_vals, bootstrap_vals = parse_reaper_output(output_filename, permu_filename, bootstrap_filename)
+
+ suggestive = 0
+ significant = 0
+ if len(permu_vals) > 0:
+ suggestive = permu_vals[int(num_perm*0.37-1)]
+ significant = permu_vals[int(num_perm*0.95-1)]
+
+ return marker_obs, permu_vals, suggestive, significant, bootstrap_vals, [output_filename, permu_filename, bootstrap_filename]
+
+def gen_pheno_txt_file(this_dataset, genofile_name, samples, vals, trait_filename):
+ """Generates phenotype file for GEMMA"""
+
+ with open("{}/gn2/{}.txt".format(TEMPDIR, trait_filename), "w") as outfile:
+ outfile.write("Trait\t")
+
+ filtered_sample_list = []
+ filtered_vals_list = []
+ for i, sample in enumerate(samples):
+ if vals[i] != "x":
+ filtered_sample_list.append(sample)
+ filtered_vals_list.append(vals[i])
+
+ samples_string = "\t".join(filtered_sample_list)
+ outfile.write(samples_string + "\n")
+ outfile.write("T1\t")
+ values_string = "\t".join(filtered_vals_list)
+ outfile.write(values_string)
+
+def parse_reaper_output(gwa_filename, permu_filename, bootstrap_filename):
+ included_markers = []
+ p_values = []
+ marker_obs = []
+
+ with open("{}{}.txt".format(webqtlConfig.GENERATED_IMAGE_DIR, gwa_filename)) as output_file:
+ for line in output_file:
+ if line.startswith("ID\t"):
+ continue
+ else:
+ marker = {}
+ marker['name'] = line.split("\t")[1]
+ try:
+ marker['chr'] = int(line.split("\t")[2])
+ except:
+ marker['chr'] = line.split("\t")[2]
+ marker['cM'] = float(line.split("\t")[3])
+ marker['Mb'] = float(line.split("\t")[4])
+ if float(line.split("\t")[7]) != 1:
+ marker['p_value'] = float(line.split("\t")[7])
+ marker['lrs_value'] = float(line.split("\t")[5])
+ marker['lod_score'] = marker['lrs_value'] / 4.61
+ marker['additive'] = float(line.split("\t")[6])
+ marker_obs.append(marker)
+
+ permu_vals = []
+ if permu_filename:
+ with open("{}{}.txt".format(webqtlConfig.GENERATED_IMAGE_DIR, permu_filename)) as permu_file:
+ for line in permu_file:
+ permu_vals.append(float(line))
+
+ bootstrap_vals = []
+ if bootstrap_filename:
+ with open("{}{}.txt".format(webqtlConfig.GENERATED_IMAGE_DIR, bootstrap_filename)) as bootstrap_file:
+ for line in bootstrap_file:
+ bootstrap_vals.append(int(line))
+
+ return marker_obs, permu_vals, bootstrap_vals
+
+def run_original_reaper(this_trait, dataset, samples_before, trait_vals, json_data, num_perm, bootCheck, num_bootstrap, do_control, control_marker, manhattan_plot):
+ genotype = dataset.group.read_genotype_file(use_reaper=True)
if manhattan_plot != True:
genotype = genotype.addinterval()
diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py
index 2bde2b53..56d901fc 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
@@ -85,14 +86,11 @@ class RunMapping(object):
self.samples.append(sample)
self.vals.append(value)
+ self.num_vals = start_vars['num_vals']
+
#ZS: Check if genotypes exist in the DB in order to create links for markers
- if "geno_db_exists" in start_vars:
- self.geno_db_exists = start_vars['geno_db_exists']
- else:
- try:
- self.geno_db_exists = "True"
- except:
- self.geno_db_exists = "False"
+
+ self.geno_db_exists = geno_db_exists(self.dataset)
self.mapping_method = start_vars['method']
if "results_path" in start_vars:
@@ -183,18 +181,18 @@ class RunMapping(object):
self.dataset.group.get_markers()
if self.mapping_method == "gemma":
self.first_run = True
- self.gwa_filename = None
+ self.output_files = None
+ if 'output_files' in start_vars:
+ self.output_files = start_vars['output_files']
if 'first_run' in start_vars: #ZS: check if first run so existing result files can be used if it isn't (for example zooming on a chromosome, etc)
self.first_run = False
- if 'gwa_filename' in start_vars:
- self.gwa_filename = start_vars['gwa_filename']
self.score_type = "-log(p)"
self.manhattan_plot = True
with Bench("Running GEMMA"):
if self.use_loco == "True":
- marker_obs, self.gwa_filename = gemma_mapping.run_gemma(self.this_trait, self.dataset, self.samples, self.vals, self.covariates, self.use_loco, self.maf, self.first_run, self.gwa_filename)
+ marker_obs, self.output_files = gemma_mapping.run_gemma(self.this_trait, self.dataset, self.samples, self.vals, self.covariates, self.use_loco, self.maf, self.first_run, self.output_files)
else:
- marker_obs = gemma_mapping.run_gemma(self.this_trait, self.dataset, self.samples, self.vals, self.covariates, self.use_loco, self.maf, self.first_run)
+ marker_obs, self.output_files = gemma_mapping.run_gemma(self.this_trait, self.dataset, self.samples, self.vals, self.covariates, self.use_loco, self.maf, self.first_run, self.output_files)
results = marker_obs
elif self.mapping_method == "rqtl_plink":
results = self.run_rqtl_plink()
@@ -239,20 +237,45 @@ class RunMapping(object):
self.bootCheck = False
self.num_bootstrap = 0
+ self.reaper_version = start_vars['reaper_version']
+
self.control_marker = start_vars['control_marker']
self.do_control = start_vars['do_control']
logger.info("Running qtlreaper")
- results, self.json_data, self.perm_output, self.suggestive, self.significant, self.bootstrap_results = qtlreaper_mapping.gen_reaper_results(self.this_trait,
- self.dataset,
- self.samples,
- self.vals,
- self.json_data,
- self.num_perm,
- self.bootCheck,
- self.num_bootstrap,
- self.do_control,
- self.control_marker,
- self.manhattan_plot)
+
+ if self.reaper_version == "new":
+ self.first_run = True
+ self.output_files = None
+ if 'first_run' in start_vars: #ZS: check if first run so existing result files can be used if it isn't (for example zooming on a chromosome, etc)
+ self.first_run = False
+ if 'output_files' in start_vars:
+ self.output_files = start_vars['output_files'].split(",")
+
+ results, self.perm_output, self.suggestive, self.significant, self.bootstrap_results, self.output_files = qtlreaper_mapping.run_reaper(self.this_trait,
+ self.dataset,
+ self.samples,
+ self.vals,
+ self.json_data,
+ self.num_perm,
+ self.bootCheck,
+ self.num_bootstrap,
+ self.do_control,
+ self.control_marker,
+ self.manhattan_plot,
+ self.first_run,
+ self.output_files)
+ else:
+ results, self.json_data, self.perm_output, self.suggestive, self.significant, self.bootstrap_results = qtlreaper_mapping.run_original_reaper(self.this_trait,
+ self.dataset,
+ self.samples,
+ self.vals,
+ self.json_data,
+ self.num_perm,
+ self.bootCheck,
+ self.num_bootstrap,
+ self.do_control,
+ self.control_marker,
+ self.manhattan_plot)
elif self.mapping_method == "plink":
self.score_type = "-log(p)"
self.manhattan_plot = True
@@ -295,14 +318,52 @@ 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,
+ url = "/show_trait?trait_id=" + marker['name'] + "&dataset=" + self.dataset.group.name + "Geno"
+ )
+
+ if self.geno_db_exists == "True":
+ 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"
+ )
+ else:
+ annot_marker = dict(
+ name = str(marker['name']),
+ chr = str(marker['chr']),
+ rs = marker['name'],
+ pos = marker['Mb']*1000000
+ )
+ #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:
+ 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, 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)
@@ -313,51 +374,55 @@ class RunMapping(object):
with Bench("Trimming Markers for Table"):
self.trimmed_markers = trim_markers_for_table(results)
+ chr_lengths = get_chr_lengths(self.mapping_scale, self.dataset, self.qtl_results_for_browser)
+
+ #ZS: For zooming into genome browser, need to pass chromosome name instead of number
+ if self.dataset.group.species == "mouse":
+ if self.selected_chr == 20:
+ this_chr = "X"
+ else:
+ this_chr = str(self.selected_chr)
+ elif self.dataset.group.species == "rat":
+ if self.selected_chr == 21:
+ this_chr = "X"
+ else:
+ this_chr = str(self.selected_chr)
+ else:
+ if self.selected_chr == 22:
+ this_chr = "X"
+ elif self.selected_chr == 23:
+ this_chr = "Y"
+ else:
+ this_chr = str(self.selected_chr)
+
if self.mapping_method != "gemma":
- self.json_data['chr'] = []
- self.json_data['pos'] = []
- self.json_data['lod.hk'] = []
- self.json_data['markernames'] = []
-
- self.json_data['suggestive'] = self.suggestive
- self.json_data['significant'] = self.significant
-
- #Need to convert the QTL objects that qtl reaper returns into a json serializable dictionary
- for index, qtl in enumerate(self.qtl_results):
- #if index<40:
- # logger.debug("lod score is:", qtl['lod_score'])
- if qtl['chr'] == highest_chr and highest_chr != "X" and highest_chr != "X/Y":
- #logger.debug("changing to X")
- self.json_data['chr'].append("X")
- else:
- self.json_data['chr'].append(str(qtl['chr']))
- self.json_data['pos'].append(qtl['Mb'])
- if 'lrs_value' in qtl.keys():
- self.json_data['lod.hk'].append(str(qtl['lrs_value']))
- else:
- self.json_data['lod.hk'].append(str(qtl['lod_score']))
- self.json_data['markernames'].append(qtl['name'])
-
- #Get chromosome lengths for drawing the interval map plot
- chromosome_mb_lengths = {}
- self.json_data['chrnames'] = []
- for key in self.species.chromosomes.chromosomes.keys():
- self.json_data['chrnames'].append([self.species.chromosomes.chromosomes[key].name, self.species.chromosomes.chromosomes[key].mb_length])
- chromosome_mb_lengths[key] = self.species.chromosomes.chromosomes[key].mb_length
+ if self.score_type == "LRS":
+ significant_for_browser = self.significant / 4.61
+ else:
+ significant_for_browser = self.significant
self.js_data = dict(
- result_score_type = self.score_type,
- json_data = self.json_data,
- this_trait = self.this_trait.name,
- data_set = self.dataset.name,
- maf = self.maf,
- manhattan_plot = self.manhattan_plot,
- mapping_scale = self.mapping_scale,
- chromosomes = chromosome_mb_lengths,
- qtl_results = self.qtl_results,
+ #result_score_type = self.score_type,
+ #this_trait = self.this_trait.name,
+ #data_set = self.dataset.name,
+ #maf = self.maf,
+ #manhattan_plot = self.manhattan_plot,
+ #mapping_scale = self.mapping_scale,
+ #chromosomes = chromosome_mb_lengths,
+ #qtl_results = self.qtl_results,
+ chr_lengths = chr_lengths,
num_perm = self.num_perm,
perm_results = self.perm_output,
+ browser_files = browser_files,
+ significant = significant_for_browser,
+ selected_chr = this_chr
)
+ else:
+ self.js_data = dict(
+ chr_lengths = chr_lengths,
+ browser_files = browser_files,
+ selected_chr = this_chr
+ )
def run_rqtl_plink(self):
# os.chdir("") never do this inside a webserver!!
@@ -397,6 +462,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":
@@ -404,6 +470,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:
@@ -453,15 +521,15 @@ def trim_markers_for_figure(markers):
else:
filtered_markers.append(marker)
else:
- if marker[score_type] < 4.16:
+ if marker[score_type] < 4.61:
if low_counter % 20 == 0:
filtered_markers.append(marker)
low_counter += 1
- elif 4.16 <= marker[score_type] < (2*4.16):
+ elif 4.61 <= marker[score_type] < (2*4.61):
if med_counter % 10 == 0:
filtered_markers.append(marker)
med_counter += 1
- elif (2*4.16) <= marker[score_type] <= (3*4.16):
+ elif (2*4.61) <= marker[score_type] <= (3*4.61):
if high_counter % 2 == 0:
filtered_markers.append(marker)
high_counter += 1
@@ -481,3 +549,47 @@ def trim_markers_for_table(markers):
return trimmed_sorted_markers
else:
return sorted_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"
+ gwas_path = "{}/gn2/".format(TEMPDIR) + gwas_filename
+ 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(gwas_results))
+ annot_file.write(json.dumps(annotations))
+
+ return [gwas_filename, annot_filename]
+
+def geno_db_exists(this_dataset):
+ geno_db_name = this_dataset.group.name + "Geno"
+ try:
+ geno_db = data_set.create_dataset(dataset_name=geno_db_name, get_samplelist=False)
+ return "True"
+ except:
+ return "False"
+
+def get_chr_lengths(mapping_scale, dataset, qtl_results):
+ chr_lengths = []
+ if mapping_scale == "physic":
+ for i, the_chr in enumerate(dataset.species.chromosomes.chromosomes):
+ this_chr = {
+ "chr": dataset.species.chromosomes.chromosomes[the_chr].name,
+ "size": str(dataset.species.chromosomes.chromosomes[the_chr].length)
+ }
+ chr_lengths.append(this_chr)
+ else:
+ this_chr = 1
+ highest_pos = 0
+ for i, result in enumerate(qtl_results):
+ if int(result['chr']) > this_chr or i == (len(qtl_results) - 1):
+ chr_lengths.append({ "chr": str(this_chr), "size": str(highest_pos)})
+ this_chr = int(result['chr'])
+ highest_pos = 0
+ else:
+ if float(result['ps']) > highest_pos:
+ highest_pos = float(result['ps'])
+
+ return chr_lengths \ No newline at end of file
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index 12a69bc3..33515e25 100644
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -25,7 +25,7 @@ from db import webqtlDatabaseFunction
from wqflask import user_manager
-from flask import render_template
+from flask import render_template, Flask, g
from utility import formatting
from utility.type_checking import is_float, is_int, is_str, get_float, get_int, get_string
@@ -47,6 +47,7 @@ views.py).
###########################################
self.uc_id = uuid.uuid4()
+ self.go_term = None
logger.debug("uc_id:", self.uc_id) # contains a unique id
logger.debug("kw is:", kw) # dict containing search terms
@@ -112,7 +113,7 @@ views.py).
trait_dict['hmac'] = user_manager.data_hmac('{}:{}'.format(this_trait.name, this_trait.dataset.name))
if this_trait.dataset.type == "ProbeSet":
trait_dict['symbol'] = this_trait.symbol
- trait_dict['description'] = insert_newlines(this_trait.description_display)
+ trait_dict['description'] = this_trait.description_display.decode('utf-8', 'replace')
trait_dict['location'] = this_trait.location_repr
trait_dict['mean'] = "N/A"
trait_dict['additive'] = "N/A"
@@ -157,29 +158,34 @@ views.py).
combined_where_clause = ""
previous_from_clauses = [] #The same table can't be referenced twice in the from clause
for i, a_search in enumerate(self.search_terms):
- the_search = self.get_search_ob(a_search)
- if the_search != None:
- get_from_clause = getattr(the_search, "get_from_clause", None)
- if callable(get_from_clause):
- from_clause = the_search.get_from_clause()
- if from_clause in previous_from_clauses:
- pass
- else:
- previous_from_clauses.append(from_clause)
- combined_from_clause += from_clause
- where_clause = the_search.get_where_clause()
- combined_where_clause += "(" + where_clause + ")"
- if (i+1) < len(self.search_terms):
- if self.and_or == "and":
- combined_where_clause += "AND"
- else:
- combined_where_clause += "OR"
+ if a_search['key'] == "GO":
+ self.go_term = a_search['search_term'][0]
+ gene_list = get_GO_symbols(a_search)
+ self.search_terms += gene_list
+ continue
else:
- self.search_term_exists = False
+ the_search = self.get_search_ob(a_search)
+ if the_search != None:
+ get_from_clause = getattr(the_search, "get_from_clause", None)
+ if callable(get_from_clause):
+ from_clause = the_search.get_from_clause()
+ if from_clause in previous_from_clauses:
+ pass
+ else:
+ previous_from_clauses.append(from_clause)
+ combined_from_clause += from_clause
+ where_clause = the_search.get_where_clause()
+ combined_where_clause += "(" + where_clause + ")"
+ if (i+1) < len(self.search_terms):
+ if self.and_or == "and":
+ combined_where_clause += "AND"
+ else:
+ combined_where_clause += "OR"
+ else:
+ self.search_term_exists = False
if self.search_term_exists:
combined_where_clause = "(" + combined_where_clause + ")"
final_query = the_search.compile_final_query(combined_from_clause, combined_where_clause)
- # logger.debug("final_query",final_query)
results = the_search.execute(final_query)
self.results.extend(results)
else:
@@ -187,11 +193,19 @@ views.py).
self.search_term_exists = False
else:
for a_search in self.search_terms:
- the_search = self.get_search_ob(a_search)
- if the_search != None:
- self.results.extend(the_search.run())
+ logger.debug("TERMS:", self.search_terms)
+ if a_search['key'] == "GO":
+ self.go_term = a_search['search_term'][0]
+ gene_list = get_GO_symbols(a_search)
+ self.search_terms += gene_list
+ self.search_terms.pop(0)
+ continue
else:
- self.search_term_exists = False
+ the_search = self.get_search_ob(a_search)
+ if the_search != None:
+ self.results.extend(the_search.run())
+ else:
+ self.search_term_exists = False
if self.search_term_exists:
if the_search != None:
@@ -205,6 +219,8 @@ views.py).
search_type['dataset_type'] = self.dataset.type
if a_search['key']:
search_type['key'] = a_search['key'].upper()
+ else:
+ search_type['key'] = None
logger.debug("search_type is:", pf(search_type))
search_ob = do_search.DoSearch.get_search(search_type)
@@ -214,14 +230,33 @@ views.py).
the_search = search_class(search_term,
search_operator,
self.dataset,
+ search_type['key']
)
return the_search
else:
return None
+def get_GO_symbols(a_search):
+ query = """SELECT genes
+ FROM GORef
+ WHERE goterm='{0}:{1}'""".format(a_search['key'], a_search['search_term'][0])
+
+ gene_list = g.db.execute(query).fetchone()[0].strip().split()
+
+ new_terms = []
+ for gene in gene_list:
+ this_term = dict(key=None,
+ separator=None,
+ search_term=[gene])
+
+ new_terms.append(this_term)
+
+ return new_terms
+
def insert_newlines(string, every=64):
""" This is because it is seemingly impossible to change the width of the description column, so I'm just manually adding line breaks """
lines = []
for i in xrange(0, len(string), every):
lines.append(string[i:i+every])
return '\n'.join(lines)
+
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index 66d3a448..3b057427 100644
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -107,7 +107,7 @@ class ShowTrait(object):
blatsequence += '%3EProbe_' + string.strip(seqt[1]) + '%0A' + string.strip(seqt[0]) + '%0A'
if self.dataset.group.species == "rat":
- self.UCSC_BLAT_URL = webqtlConfig.UCSC_BLAT % ('rat', 'rn3', blatsequence)
+ self.UCSC_BLAT_URL = webqtlConfig.UCSC_BLAT % ('rat', 'rn6', blatsequence)
self.UTHSC_BLAT_URL = ""
elif self.dataset.group.species == "mouse":
self.UCSC_BLAT_URL = webqtlConfig.UCSC_BLAT % ('mouse', 'mm10', blatsequence)
@@ -142,40 +142,6 @@ class ShowTrait(object):
self.qnorm_vals = quantile_normalize_vals(self.sample_groups)
self.z_scores = get_z_scores(self.sample_groups)
- # Todo: Add back in the ones we actually need from below, as we discover we need them
- hddn = OrderedDict()
-
- if self.dataset.group.allsamples:
- hddn['allsamples'] = string.join(self.dataset.group.allsamples, ' ')
-
- hddn['trait_id'] = self.trait_id
- hddn['dataset'] = self.dataset.name
- hddn['temp_trait'] = False
- if self.temp_trait:
- hddn['temp_trait'] = True
- hddn['group'] = self.temp_group
- hddn['species'] = self.temp_species
- hddn['use_outliers'] = False
- hddn['method'] = "gemma"
- hddn['selected_chr'] = -1
- hddn['mapping_display_all'] = True
- hddn['suggestive'] = 0
- hddn['num_perm'] = 0
- hddn['manhattan_plot'] = ""
- hddn['control_marker'] = ""
- if not self.temp_trait:
- if hasattr(self.this_trait, 'locus_chr') and self.this_trait.locus_chr != "" and self.dataset.type != "Geno" and self.dataset.type != "Publish":
- hddn['control_marker'] = self.nearest_marker
- #hddn['control_marker'] = self.nearest_marker1+","+self.nearest_marker2
- hddn['do_control'] = False
- hddn['maf'] = 0.01
- hddn['compare_traits'] = []
- hddn['export_data'] = ""
- hddn['export_format'] = "excel"
-
- # We'll need access to this_trait and hddn in the Jinja2 Template, so we put it inside self
- self.hddn = hddn
-
self.temp_uuid = uuid.uuid4()
self.sample_group_types = OrderedDict()
@@ -216,18 +182,61 @@ class ShowTrait(object):
sample_column_width = max_samplename_width * 8
- if self.num_values >= 500:
+ if self.num_values >= 5000:
self.maf = 0.01
else:
self.maf = 0.05
trait_symbol = None
+ short_description = None
if not self.temp_trait:
if self.this_trait.symbol:
trait_symbol = self.this_trait.symbol
+ short_description = trait_symbol
+
+ elif hasattr(self.this_trait, 'post_publication_abbreviation'):
+ short_description = self.this_trait.post_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
+ hddn = OrderedDict()
+
+ if self.dataset.group.allsamples:
+ hddn['allsamples'] = string.join(self.dataset.group.allsamples, ' ')
+ hddn['primary_samples'] = string.join(self.primary_sample_names, ',')
+ hddn['trait_id'] = self.trait_id
+ hddn['dataset'] = self.dataset.name
+ hddn['temp_trait'] = False
+ if self.temp_trait:
+ hddn['temp_trait'] = True
+ hddn['group'] = self.temp_group
+ hddn['species'] = self.temp_species
+ hddn['use_outliers'] = False
+ hddn['method'] = "gemma"
+ hddn['selected_chr'] = -1
+ hddn['mapping_display_all'] = True
+ hddn['suggestive'] = 0
+ hddn['num_perm'] = 0
+ hddn['manhattan_plot'] = ""
+ hddn['control_marker'] = ""
+ if not self.temp_trait:
+ if hasattr(self.this_trait, 'locus_chr') and self.this_trait.locus_chr != "" and self.dataset.type != "Geno" and self.dataset.type != "Publish":
+ hddn['control_marker'] = self.nearest_marker
+ #hddn['control_marker'] = self.nearest_marker1+","+self.nearest_marker2
+ hddn['do_control'] = False
+ hddn['maf'] = 0.05
+ hddn['compare_traits'] = []
+ hddn['export_data'] = ""
+ hddn['export_format'] = "excel"
+
+ # We'll need access to this_trait and hddn in the Jinja2 Template, so we put it inside self
+ self.hddn = hddn
js_data = dict(trait_id = self.trait_id,
trait_symbol = trait_symbol,
+ short_description = short_description,
unit_type = trait_units,
dataset_type = self.dataset.type,
data_scale = self.dataset.data_scale,
@@ -246,7 +255,6 @@ class ShowTrait(object):
self.pubmed_link = webqtlConfig.PUBMEDLINK_URL % self.this_trait.pubmed_id if check_if_attr_exists(self.this_trait, 'pubmed_id') else None
self.ncbi_gene_link = webqtlConfig.NCBI_LOCUSID % self.this_trait.geneid if check_if_attr_exists(self.this_trait, 'geneid') else None
self.omim_link = webqtlConfig.OMIM_ID % self.this_trait.omim if check_if_attr_exists(self.this_trait, 'omim') else None
- self.unigene_link = webqtlConfig.UNIGEN_ID % tuple(string.split(self.this_trait.unigeneid, '.')[:2]) if check_if_attr_exists(self.this_trait, 'unigeneid') else None
self.homologene_link = webqtlConfig.HOMOLOGENE_ID % self.this_trait.homologeneid if check_if_attr_exists(self.this_trait, 'homologeneid') else None
self.genbank_link = None
@@ -256,17 +264,22 @@ class ShowTrait(object):
genbank_id = genbank_id[0:-1]
self.genbank_link = webqtlConfig.GENBANK_ID % genbank_id
- self.genotation_link = self.gtex_link = self.genebridge_link = self.ucsc_blat_link = self.biogps_link = None
- self.string_link = self.panther_link = self.aba_link = self.ebi_gwas_link = self.wiki_pi_link = None
+ self.genotation_link = self.gtex_link = self.genebridge_link = self.ucsc_blat_link = self.biogps_link = self.protein_atlas_link = None
+ self.string_link = self.panther_link = self.aba_link = self.ebi_gwas_link = self.wiki_pi_link = self.genemania_link = self.ensembl_link = None
if self.this_trait.symbol:
self.genotation_link = webqtlConfig.GENOTATION_URL % self.this_trait.symbol
self.gtex_link = webqtlConfig.GTEX_URL % self.this_trait.symbol
self.string_link = webqtlConfig.STRING_URL % self.this_trait.symbol
self.panther_link = webqtlConfig.PANTHER_URL % self.this_trait.symbol
self.ebi_gwas_link = webqtlConfig.EBIGWAS_URL % self.this_trait.symbol
+ self.protein_atlas_link = webqtlConfig.PROTEIN_ATLAS_URL % self.this_trait.symbol
+ #self.open_targets_link = webqtlConfig.OPEN_TARGETS_URL % self.this_trait.symbol
if self.dataset.group.species == "mouse" or self.dataset.group.species == "human":
- self.genebridge_link = webqtlConfig.GENEBRIDGE_URL % (self.this_trait.symbol, self.dataset.group.species)
+ if self.dataset.group.species == "mouse":
+ self.genemania_link = webqtlConfig.GENEMANIA_URL % ("mus-musculus", self.this_trait.symbol)
+ else:
+ self.genemania_link = webqtlConfig.GENEMANIA_URL % ("homo-sapiens", self.this_trait.symbol)
if self.dataset.group.species == "mouse":
self.aba_link = webqtlConfig.ABA_URL % self.this_trait.symbol
@@ -275,22 +288,34 @@ class ShowTrait(object):
FROM GeneList
WHERE geneSymbol = '{}'""".format(self.this_trait.symbol)
- chr, transcript_start, transcript_end = g.db.execute(query).fetchall()[0] if len(g.db.execute(query).fetchall()) > 0 else None
+ results = g.db.execute(query).fetchone()
+ if results:
+ chr, transcript_start, transcript_end = results
+ else:
+ chr = transcript_start = transcript_end = None
+
if chr and transcript_start and transcript_end and self.this_trait.refseq_transcriptid:
transcript_start = int(transcript_start*1000000)
transcript_end = int(transcript_end*1000000)
self.ucsc_blat_link = webqtlConfig.UCSC_REFSEQ % ('mm10', self.this_trait.refseq_transcriptid, chr, transcript_start, transcript_end)
if self.dataset.group.species == "rat":
+ self.genemania_link = webqtlConfig.GENEMANIA_URL % ("rattus-norvegicus", self.this_trait.symbol)
+
query = """SELECT kgID, chromosome, txStart, txEnd
- FROM GeneLink_rn33
+ FROM GeneList_rn33
WHERE geneSymbol = '{}'""".format(self.this_trait.symbol)
- kgId, chr, transcript_start, transcript_end = g.db.execute(query).fetchall()[0] if len(g.db.execute(query).fetchall()) > 0 else None
+ results = g.db.execute(query).fetchone()
+ if results:
+ kgId, chr, transcript_start, transcript_end = results
+ else:
+ kgId = chr = transcript_start = transcript_end = None
+
if chr and transcript_start and transcript_end and kgId:
transcript_start = int(transcript_start*1000000) # Convert to bases from megabases
transcript_end = int(transcript_end*1000000)
- self.ucsc_blat_link = webqtlConfig.UCSC_REFSEQ % ('rn3', kgId, chr, transcript_start, transcript_end)
+ self.ucsc_blat_link = webqtlConfig.UCSC_REFSEQ % ('rn6', kgId, chr, transcript_start, transcript_end)
if self.this_trait.geneid and (self.dataset.group.species == "mouse" or self.dataset.group.species == "rat" or self.dataset.group.species == "human"):
self.biogps_link = webqtlConfig.BIOGPS_URL % (self.dataset.group.species, self.this_trait.geneid)
@@ -381,6 +406,8 @@ class ShowTrait(object):
sample_group_type='primary',
header="%s Only" % (self.dataset.group.name))
self.sample_groups = (primary_samples,)
+
+ self.primary_sample_names = primary_sample_names
self.dataset.group.allsamples = all_samples_ordered
def quantile_normalize_vals(sample_groups):
@@ -478,7 +505,7 @@ def get_genofiles(this_dataset):
return jsondata['genofile']
def get_table_widths(sample_groups, has_num_cases=False):
- stats_table_width = 200
+ stats_table_width = 250
if len(sample_groups) > 1:
stats_table_width = 450
diff --git a/wqflask/wqflask/snp_browser/snp_browser.py b/wqflask/wqflask/snp_browser/snp_browser.py
index 9a980cb1..7f0a0a31 100644
--- a/wqflask/wqflask/snp_browser/snp_browser.py
+++ b/wqflask/wqflask/snp_browser/snp_browser.py
@@ -477,8 +477,8 @@ class SnpBrowser(object):
the_bases = []
for j, item in enumerate(allele_value_list):
- if item and isinstance(item, str):
- this_base = [item, base_color_dict[item]]
+ if item and isinstance(item, basestring):
+ this_base = [str(item), base_color_dict[item]]
else:
this_base = ""
@@ -486,24 +486,24 @@ class SnpBrowser(object):
this_row = {
"index": i + 1,
- "rs": rs,
- "snp_url": snp_url,
- "snp_name": snp_name,
- "chr": chr,
+ "rs": str(rs),
+ "snp_url": str(snp_url),
+ "snp_name": str(snp_name),
+ "chr": str(chr),
"mb_formatted": mb_formatted,
- "alleles": alleles,
- "snp_source": snp_source,
+ "alleles": str(alleles),
+ "snp_source": str(snp_source),
"source_urls": source_urls,
- "conservation_score": conservation_score,
- "gene_name": gene_name,
- "gene_link": gene_link,
- "transcript": transcript,
- "transcript_link": transcript_link,
- "exon": exon,
- "domain_1": domain_1,
- "domain_2": domain_2,
- "function": function,
- "function_details": function_details,
+ "conservation_score": str(conservation_score),
+ "gene_name": str(gene_name),
+ "gene_link": str(gene_link),
+ "transcript": str(transcript),
+ "transcript_link": str(transcript_link),
+ "exon": str(exon),
+ "domain_1": str(domain_1),
+ "domain_2": str(domain_2),
+ "function": str(function),
+ "function_details": str(function_details),
"allele_value_list": the_bases
}
@@ -511,15 +511,15 @@ class SnpBrowser(object):
indel_name, indel_chr, indel_mb_s, indel_mb_e, indel_strand, indel_type, indel_size, indel_sequence, source_name = result
this_row = {
"index": i,
- "indel_name": indel_name,
- "indel_chr": indel_chr,
- "indel_mb_s": indel_mb_s,
- "indel_mb_e": indel_mb_e,
- "indel_strand": indel_strand,
- "indel_type": indel_type,
- "indel_size": indel_size,
- "indel_sequence": indel_sequence,
- "source_name": source_name
+ "indel_name": str(indel_name),
+ "indel_chr": str(indel_chr),
+ "indel_mb_s": str(indel_mb_s),
+ "indel_mb_e": str(indel_mb_e),
+ "indel_strand": str(indel_strand),
+ "indel_type": str(indel_type),
+ "indel_size": str(indel_size),
+ "indel_sequence": str(indel_sequence),
+ "source_name": str(source_name)
}
#this_row = [indel_name, indel_chr, indel_mb_s, indel_mb_e, indel_strand, indel_type, indel_size, indel_sequence, source_name]
else:
@@ -612,7 +612,7 @@ class SnpBrowser(object):
this_allele_list = []
for item in self.allele_list:
- if item and isinstance(item, str) and (item.lower() not in this_allele_list) and (item != "-"):
+ if item and isinstance(item, basestring) and (item.lower() not in this_allele_list) and (item != "-"):
this_allele_list.append(item.lower())
total_allele_count = len(this_allele_list)
diff --git a/wqflask/wqflask/static/gif/89.gif b/wqflask/wqflask/static/gif/89.gif
new file mode 100644
index 00000000..e9b3279d
--- /dev/null
+++ b/wqflask/wqflask/static/gif/89.gif
Binary files differ
diff --git a/wqflask/wqflask/static/new/javascript/create_corr_matrix.js b/wqflask/wqflask/static/new/javascript/create_corr_matrix.js
index fe89a672..c0c39fbc 100644
--- a/wqflask/wqflask/static/new/javascript/create_corr_matrix.js
+++ b/wqflask/wqflask/static/new/javascript/create_corr_matrix.js
@@ -1,5 +1,5 @@
-var neg_color_scale = chroma.scale(['#FF0000', '#FFFFFF']).domain([-1, -0.4]);
-var pos_color_scale = chroma.scale(['#FFFFFF', '#00FFFF']).domain([0.4, 1])
+var neg_color_scale = chroma.scale(['#91bfdb', '#ffffff']).domain([-1, -0.4]);
+var pos_color_scale = chroma.scale(['#ffffff', '#fc8d59']).domain([0.4, 1])
$('.corr_cell').each( function () {
corr_value = parseFloat($(this).find('span.corr_value').text())
if (corr_value >= 0.5){
@@ -14,6 +14,11 @@ $('.corr_cell').each( function () {
});
$('#short_labels').click( function (){
+ if ($('.short_check').css("display") == "none"){
+ $('.short_check').css("display", "inline-block")
+ } else {
+ $('.short_check').css("display", "none")
+ }
$('.shortName').each( function() {
if ($(this).css("display") == "none"){
$(this).css("display", "block");
@@ -25,6 +30,11 @@ $('#short_labels').click( function (){
});
$('#long_labels').click( function (){
+ if ($('.long_check').css("display") == "none"){
+ $('.long_check').css("display", "inline-block")
+ } else {
+ $('.long_check').css("display", "none")
+ }
$('.verboseName').each( function() {
if ($(this).css("display") == "none"){
$(this).css("display", "block");
diff --git a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
index b2354f70..6531f5a0 100644
--- a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
+++ b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
@@ -1335,7 +1335,7 @@
[
"None",
"HCPPublish",
- "HCP Phenotypes"
+ "HCP Private Phenotypes"
]
]
},
@@ -1347,14 +1347,14 @@
"GSE9588 Human Liver Normal (Mar11) Both Sexes"
],
[
- "383",
- "HLCM_0311",
- "GSE9588 Human Liver Normal (Mar11) Males"
- ],
- [
"384",
"HLCF_0311",
"GSE9588 Human Liver Normal (Mar11) Females"
+ ],
+ [
+ "383",
+ "HLCM_0311",
+ "GSE9588 Human Liver Normal (Mar11) Males"
]
],
"Phenotypes": [
@@ -1440,7 +1440,7 @@
[
"None",
"HSBPublish",
- "HSB Phenotypes"
+ "HSB Published Phenotypes"
]
],
"Posterior Inferior Parietal Cortex mRNA": [
@@ -1530,6 +1530,11 @@
"AIL": {
"Hippocampus mRNA": [
[
+ "874",
+ "UCSD_AIL_HIP_RNA-Seq_log2_0418",
+ "UCSD AIL Hippocampus (Apr18) RNA-Seq Log2"
+ ],
+ [
"844",
"UCSD_AIL_HIP_RNA-Seq_0418",
"UCSD AIL Hippocampus (Apr18) RNA-Seq"
@@ -1544,6 +1549,11 @@
],
"Prefrontal Cortex mRNA": [
[
+ "876",
+ "UCSD_AIL_PFC_RNA-Seq_log2_0418",
+ "UCSD AIL Prefrontal Cortex (Apr18) RNA-Seq Log2"
+ ],
+ [
"846",
"UCSD_AIL_PFC_RNA-Seq_0418",
"UCSD AIL Prefrontal Cortex (Apr18) RNA-Seq"
@@ -1551,6 +1561,11 @@
],
"Striatum mRNA": [
[
+ "875",
+ "UCSD_AIL_STR_RNA-Seq_log2_0418",
+ "UCSD AIL Striatum (Apr18) RNA-Seq Log2"
+ ],
+ [
"845",
"UCSD_AIL_STR_RNA-Seq_0418",
"UCSD AIL Striatum (Apr18) RNA-Seq"
@@ -1706,7 +1721,7 @@
[
"None",
"B6D2Publish",
- "B6D2 Phenotypes"
+ "UTHSC-Glaucoma-Aged-Retina Phenotypes"
]
]
},
@@ -1819,6 +1834,11 @@
],
"Striatum mRNA": [
[
+ "85",
+ "SA_M2_0905_P",
+ "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) PDNN"
+ ],
+ [
"84",
"SA_M2_0905_R",
"OHSU/VA B6D2F2 Striatum M430v2 (Sep05) RMA"
@@ -1827,27 +1847,22 @@
"83",
"SA_M2_0905_M",
"OHSU/VA B6D2F2 Striatum M430v2 (Sep05) MAS5"
- ],
- [
- "85",
- "SA_M2_0905_P",
- "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) PDNN"
]
]
},
"BHF2": {
"Adipose mRNA": [
[
- "196",
- "UCLA_BHF2_ADIPOSE_MALE",
- "UCLA BHF2 Adipose Male mlratio"
- ],
- [
"197",
"UCLA_BHF2_ADIPOSE_FEMALE",
"UCLA BHF2 Adipose Female mlratio"
],
[
+ "196",
+ "UCLA_BHF2_ADIPOSE_MALE",
+ "UCLA BHF2 Adipose Male mlratio"
+ ],
+ [
"165",
"UCLA_BHF2_ADIPOSE_0605",
"UCLA BHF2 Adipose (June05) mlratio"
@@ -1855,16 +1870,16 @@
],
"Brain mRNA": [
[
- "198",
- "UCLA_BHF2_BRAIN_MALE",
- "UCLA BHF2 Brain Male mlratio"
- ],
- [
"199",
"UCLA_BHF2_BRAIN_FEMALE",
"UCLA BHF2 Brain Female mlratio"
],
[
+ "198",
+ "UCLA_BHF2_BRAIN_MALE",
+ "UCLA BHF2 Brain Male mlratio"
+ ],
+ [
"166",
"UCLA_BHF2_BRAIN_0605",
"UCLA BHF2 Brain (June05) mlratio"
@@ -1879,16 +1894,16 @@
],
"Liver mRNA": [
[
- "200",
- "UCLA_BHF2_LIVER_MALE",
- "UCLA BHF2 Liver Male mlratio"
- ],
- [
"201",
"UCLA_BHF2_LIVER_FEMALE",
"UCLA BHF2 Liver Female mlratio"
],
[
+ "200",
+ "UCLA_BHF2_LIVER_MALE",
+ "UCLA BHF2 Liver Male mlratio"
+ ],
+ [
"167",
"UCLA_BHF2_LIVER_0605",
"UCLA BHF2 Liver (June05) mlratio"
@@ -2122,6 +2137,11 @@
"UTHSC Brain mRNA U74Av2 (Nov05) PDNN"
],
[
+ "81",
+ "BR_U_0805_P",
+ "UTHSC Brain mRNA U74Av2 (Aug05) PDNN"
+ ],
+ [
"80",
"BR_U_0805_M",
"UTHSC Brain mRNA U74Av2 (Aug05) MAS5"
@@ -2132,11 +2152,6 @@
"UTHSC Brain mRNA U74Av2 (Aug05) RMA"
],
[
- "81",
- "BR_U_0805_P",
- "UTHSC Brain mRNA U74Av2 (Aug05) PDNN"
- ],
- [
"42",
"CB_M_0204_P",
"INIA Brain mRNA M430 (Feb04) PDNN"
@@ -2233,6 +2248,11 @@
"Eye M430v2 WT Gpnmb (Sep08) RMA"
],
[
+ "382",
+ "Eye_M2_0908_WTWT",
+ "Eye M430v2 WT WT (Sep08) RMA"
+ ],
+ [
"279",
"Eye_M2_0908_R_WT",
"Eye M430v2 WT Tyrp1 (Sep08) RMA"
@@ -2243,11 +2263,6 @@
"Eye M430v2 Mutant Tyrp1 (Sep08) RMA"
],
[
- "382",
- "Eye_M2_0908_WTWT",
- "Eye M430v2 WT WT (Sep08) RMA"
- ],
- [
"400",
"DBA2J-ONH-1212",
"Howell et al. 2011, DBA/2J Glaucoma Optic Nerve Head M430 2.0 (Dec12) RMA"
@@ -2485,6 +2500,11 @@
"245",
"UT_ILM_BXD_hipp_RSE_0909",
"UTHSC Hippocampus Illumina v6.1 RSE (Sep09) RankInv"
+ ],
+ [
+ "711",
+ "UTHSC_BXD_AgeHipp0515",
+ "UTHSC BXD Aged Hippocampus Affy MoGene1.0 ST (May15) RMA Gene Level"
]
],
"Hypothalamus mRNA": [
@@ -2682,6 +2702,11 @@
"EPFL/LISP BXD HFD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA"
],
[
+ "848",
+ "EPFLMouseLiverHFCEx0413",
+ "EPFL/LISP BXD HFC Liver Affy Mouse Gene 1.0 ST (Apr13) RMA Exon Level"
+ ],
+ [
"432",
"EPFLMouseLiverCDRMA0413",
"EPFL/LISP BXD CD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA"
@@ -2692,11 +2717,6 @@
"EPFL/LISP BXD CD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA Exon Level"
],
[
- "848",
- "EPFLMouseLiverHFCEx0413",
- "EPFL/LISP BXD HFC Liver Affy Mouse Gene 1.0 ST (Apr13) RMA Exon Level"
- ],
- [
"433",
"EPFLMouseLiverBothExRMA0413",
"EPFL/LISP BXD CD+HFD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA Exon Level"
@@ -2850,14 +2870,14 @@
"HQF BXD Neocortex ILM6v1.1 (Feb08) RankInv"
],
[
- "274",
- "DevNeocortex_ILM6.2P3RInv_1110",
- "BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov10) RankInv"
- ],
- [
"275",
"DevNeocortex_ILM6.2P14RInv_1110",
"BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov10) RankInv"
+ ],
+ [
+ "274",
+ "DevNeocortex_ILM6.2P3RInv_1110",
+ "BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov10) RankInv"
]
],
"Nucleus Accumbens mRNA": [
@@ -3014,16 +3034,6 @@
],
"Striatum mRNA": [
[
- "376",
- "DevStriatum_ILM6.2P3RInv_1111",
- "BIDMC/UTHSC Dev Striatum P3 ILMv6.2 (Nov11) RankInv"
- ],
- [
- "377",
- "DevStriatum_ILM6.2P14RInv_1111",
- "BIDMC/UTHSC Dev Striatum P14 ILMv6.2 (Nov11) RankInv"
- ],
- [
"399",
"Striatum_Exon_1212",
"HQF Striatum Affy Mouse Exon 1.0ST Gene Level (Dec09) RMA"
@@ -3034,6 +3044,16 @@
"HQF Striatum Affy Mouse Exon 1.0ST Exon Level (Dec09) RMA"
],
[
+ "376",
+ "DevStriatum_ILM6.2P3RInv_1111",
+ "BIDMC/UTHSC Dev Striatum P3 ILMv6.2 (Nov11) RankInv"
+ ],
+ [
+ "377",
+ "DevStriatum_ILM6.2P14RInv_1111",
+ "BIDMC/UTHSC Dev Striatum P14 ILMv6.2 (Nov11) RankInv"
+ ],
+ [
"285",
"UTHSC_Striatum_RankInv_1210",
"HQF BXD Striatum ILM6.1 (Dec10v2) RankInv"
@@ -3090,6 +3110,11 @@
],
"Ventral Tegmental Area mRNA": [
[
+ "230",
+ "VCUEtvsSal_0609_R",
+ "VCU BXD VTA Et vs Sal M430 2.0 (Jun09) RMA"
+ ],
+ [
"229",
"VCUEtOH_0609_R",
"VCU BXD VTA EtOH M430 2.0 (Jun09) RMA"
@@ -3098,11 +3123,6 @@
"228",
"VCUSal_0609_R",
"VCU BXD VTA Sal M430 2.0 (Jun09) RMA"
- ],
- [
- "230",
- "VCUEtvsSal_0609_R",
- "VCU BXD VTA Et vs Sal M430 2.0 (Jun09) RMA"
]
]
},
@@ -3134,7 +3154,7 @@
[
"None",
"BXD-HarvestedPublish",
- "BXD-Harvested Phenotypes"
+ "BXD-NIA-Longevity Phenotypes"
]
]
},
@@ -3540,6 +3560,11 @@
],
"Hippocampus mRNA": [
[
+ "211",
+ "Illum_LXS_Hipp_RSS_1008",
+ "Hippocampus Illumina RSS (Oct08) RankInv beta"
+ ],
+ [
"213",
"Illum_LXS_Hipp_NOS_1008",
"Hippocampus Illumina NOS (Oct08) RankInv beta"
@@ -3560,11 +3585,6 @@
"Hippocampus Illumina NOE (Oct08) RankInv beta"
],
[
- "211",
- "Illum_LXS_Hipp_RSS_1008",
- "Hippocampus Illumina RSS (Oct08) RankInv beta"
- ],
- [
"143",
"Illum_LXS_Hipp_loess0807",
"Hippocampus Illumina (Aug07) LOESS"
@@ -3820,7 +3840,7 @@
[
"None",
"HSNIH-RGSMCPublish",
- "HSNIH-RGSMC Phenotypes"
+ "HSNIH Published Phenotypes"
]
]
},
diff --git a/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js b/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js
index 9bca1517..b80539bd 100644
--- a/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js
+++ b/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js
@@ -6,10 +6,11 @@ process_json = function(data) {
return apply_default();
}
};
-$.ajax('/static/new/javascript/dataset_menu_structure.json', {
+$.ajax('/api/v_pre1/gen_dropdown', {
dataType: 'json',
success: process_json
});
+
populate_species = function() {
var species_list;
species_list = this.jdata.species;
diff --git a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js
index a74c99d3..8fdbad35 100644
--- a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js
+++ b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js
@@ -1,30 +1,120 @@
var chart;
var srchart;
+x_val_range = js_data.x_range[1] - js_data.x_range[0]
+y_val_range = js_data.y_range[1] - js_data.y_range[0]
+
+if (x_val_range >= 2 && x_val_range < 9){
+ x_tick_digits = '.1f'
+} else if (x_val_range >= 0.8 && x_val_range < 2) {
+ x_tick_digits = '.2f'
+} else if (x_val_range < 0.8) {
+ x_tick_digits = '.3f'
+} else {
+ x_tick_digits = 'f'
+}
+
+if (y_val_range >= 2 && y_val_range < 8){
+ y_tick_digits = '.1f'
+} else if (y_val_range >= 0.8 && y_val_range < 2) {
+ y_tick_digits = '.2f'
+} else if (y_val_range < 0.8) {
+ y_tick_digits = '.3f'
+} else {
+ y_tick_digits = 'f'
+}
+
+console.log("y_digits:", y_tick_digits)
+
var layout = {
height: 700,
width: 800,
margin: {
- l: 60,
+ l: 70,
r: 30,
- t: 80,
+ t: 90,
b: 50
},
xaxis: {
+ range: [js_data.x_range[0], js_data.x_range[1]],
title: js_data.trait_1,
zeroline: false,
visible: true,
linecolor: 'black',
linewidth: 1,
+ ticklen: 4,
+ tickformat: x_tick_digits
},
yaxis: {
+ range: [js_data.y_range[0], js_data.y_range[1]],
title: js_data.trait_2,
zeroline: false,
visible: true,
linecolor: 'black',
linewidth: 1,
+ ticklen: 4,
+ tickformat: y_tick_digits,
+ automargin: true
},
- hovermode: "closest"
+ hovermode: "closest",
+ showlegend: false,
+ annotations:[{
+ xref: 'paper',
+ yref: 'paper',
+ x: 1,
+ xanchor: 'right',
+ y: 1.05,
+ yanchor: 'top',
+ text: '<i>r</i> = ' + js_data.r_value.toFixed(3) + ', <i>p</i> = ' + js_data.p_value.toExponential(3) + ', <i>n</i> = ' + js_data.num_overlap,
+ showarrow: false,
+ font: {
+ size: 14
+ },
+ }
+ ]
+}
+
+var sr_layout = {
+ height: 700,
+ width: 800,
+ margin: {
+ l: 60,
+ r: 30,
+ t: 80,
+ b: 50
+ },
+ xaxis: {
+ range: [js_data.sr_range[0], js_data.sr_range[1]],
+ title: js_data.trait_1,
+ zeroline: false,
+ visible: true,
+ linecolor: 'black',
+ linewidth: 1,
+ },
+ yaxis: {
+ range: [js_data.sr_range[0], js_data.sr_range[1]],
+ title: js_data.trait_2,
+ zeroline: false,
+ visible: true,
+ linecolor: 'black',
+ linewidth: 1,
+ },
+ hovermode: "closest",
+ showlegend: false,
+ annotations:[{
+ xref: 'paper',
+ yref: 'paper',
+ x: 1,
+ xanchor: 'right',
+ y: 1.05,
+ yanchor: 'top',
+ text: '<i>r</i> = ' + js_data.srr_value.toFixed(3) + ', <i>P</i> = ' + js_data.srp_value.toExponential(3) + ', <i>n</i> = ' + js_data.num_overlap,
+ showarrow: false,
+ font: {
+ size: 14
+ },
+ }
+]
}
cofactor1_dict = {}
@@ -48,14 +138,23 @@ function drawg() {
sample_names.push(js_data.indIDs[j])
}
- var trace = {
+ var trace1 = {
x: x_values,
y: y_values,
mode: 'markers',
text: sample_names
}
- Plotly.newPlot('scatterplot2', [trace], layout)
+ var trace2 = {
+ x: [js_data.intercept_coords[0][0], js_data.intercept_coords[1][0]],
+ y: [js_data.intercept_coords[0][1], js_data.intercept_coords[1][1]],
+ mode: 'lines',
+ line: {
+ color: 'rgb(250, 60, 73)'
+ }
+ }
+
+ Plotly.newPlot('scatterplot2', [trace2, trace1], layout)
}
@@ -69,14 +168,14 @@ function srdrawg() {
sample_names.push(js_data.indIDs[j])
}
- var trace = {
+ var trace1 = {
x: x_values,
y: y_values,
mode: 'markers',
text: sample_names
}
- Plotly.newPlot('srscatterplot2', [trace], layout)
+ Plotly.newPlot('srscatterplot2', [trace1], sr_layout)
}
function getdata() {
@@ -256,32 +355,41 @@ function getdata() {
point_text.push(this_text)
}
- console.log("symbol list:", symbol_list)
-
if (symbol_list.length > 0) {
- var trace = {
+ var trace1 = {
x: x_values,
y: y_values,
mode: 'markers',
text: point_text,
marker: {
+ color: 'rgb(66, 66, 245)',
symbol: symbol_list,
size: sizes
}
}
} else {
- var trace = {
+ var trace1 = {
x: x_values,
y: y_values,
mode: 'markers',
text: point_text,
marker: {
+ color: 'rgb(66, 66, 245)',
size: sizes
}
}
}
- return [trace];
+ var trace2 = {
+ x: [js_data.intercept_coords[0][0], js_data.intercept_coords[1][0]],
+ y: [js_data.intercept_coords[0][1], js_data.intercept_coords[1][1]],
+ mode: 'lines',
+ line: {
+ color: 'rgb(250, 60, 73)'
+ }
+ }
+
+ return [trace2, trace1];
}
function map1to2 (min1, max1, min2, max2, v1) {
@@ -465,18 +573,28 @@ function srgetdata() {
point_text.push(this_text)
}
- var trace = {
+ var trace1 = {
x: x_values,
y: y_values,
mode: 'markers',
text: point_text,
marker: {
+ color: 'rgb(66, 66, 245)',
symbol: symbol_list,
size: sizes
}
}
- return [trace];
+ var trace2 = {
+ x: [js_data.sr_intercept_coords[0][0], js_data.sr_intercept_coords[1][0]],
+ y: [js_data.sr_intercept_coords[0][1], js_data.sr_intercept_coords[1][1]],
+ mode: 'lines',
+ line: {
+ color: 'rgb(250, 60, 73)'
+ }
+ }
+
+ return [trace2, trace1];
}
function chartupdatewh() {
@@ -490,7 +608,8 @@ function chartupdatewh() {
Plotly.newPlot('scatterplot2', getdata(), layout)
Plotly.relayout('scatterplot2', width_height_update)
- Plotly.newPlot('srscatterplot2', srgetdata(), layout)
+
+ Plotly.newPlot('srscatterplot2', srgetdata(), sr_layout)
Plotly.relayout('srscatterplot2', width_height_update)
}
@@ -567,7 +686,7 @@ function chartupdatedata() {
Plotly.newPlot('scatterplot2', getdata(), layout)
Plotly.relayout('scatterplot2', pearson_title_update)
- Plotly.newPlot('srscatterplot2', srgetdata(), layout)
+ Plotly.newPlot('srscatterplot2', srgetdata(), sr_layout)
Plotly.relayout('srscatterplot2', spearman_title_update)
if ($('#cofactor1_type option:selected').val() == "color"){
diff --git a/wqflask/wqflask/static/new/javascript/init_genome_browser.js b/wqflask/wqflask/static/new/javascript/init_genome_browser.js
new file mode 100644
index 00000000..2552fb04
--- /dev/null
+++ b/wqflask/wqflask/static/new/javascript/init_genome_browser.js
@@ -0,0 +1,84 @@
+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 = js_data.chr_lengths
+
+var vscaleWidth = 90.0;
+var legendWidth = 150.0;
+
+if ('significant' in js_data) {
+ var significant_score = parseFloat(js_data.significant)
+} else {
+ var significant_score = js_data.max_score * 0.75
+}
+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 = 500.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.1,
+ 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,
+};
+
+if (js_data.selected_chr != -1) {
+ config['initialChrs'] = {left: js_data.selected_chr, right: js_data.selected_chr}
+}
+
+$('#browser_tab').click(function() {
+ if ($('#gwas').length == 0){
+ 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 d52cb100..e8b7ab83 100644
--- a/wqflask/wqflask/static/new/javascript/plotly_probability_plot.js
+++ b/wqflask/wqflask/static/new/javascript/plotly_probability_plot.js
@@ -161,29 +161,33 @@
intercept_line['samples_all'] = [[first_x, last_x], [first_value, last_value]]
}
- if (Math.max(y_values['samples_all']) - Math.min(y_values['samples_all']) < 6){
+ val_range = Math.max(...y_values['samples_all']) - Math.min(...y_values['samples_all'])
+ if (val_range < 4){
tick_digits = '.1f'
+ } else if (val_range < 0.4) {
+ tick_digits = '.2f'
} else {
tick_digits = 'f'
}
var layout = {
- title: js_data.trait_id,
+ title: "<b>Trait " + js_data.trait_id + ": " + js_data.short_description + "</b>",
margin: {
- l: 65,
+ l: 100,
r: 30,
t: 80,
- b: 80
+ b: 60
},
xaxis: {
- title: "Normal Theoretical Quantiles",
+ title: "<b>Normal Theoretical Quantiles</b>",
range: [first_x, last_x],
zeroline: false,
visible: true,
linecolor: 'black',
linewidth: 1,
titlefont: {
- size: 16
+ family: "arial",
+ size: 20
},
ticklen: 4,
tickfont: {
@@ -191,19 +195,20 @@
}
},
yaxis: {
- title: "Data Quantiles",
zeroline: false,
visible: true,
linecolor: 'black',
linewidth: 1,
titlefont: {
- size: 16
+ family: "arial",
+ size: 20
},
ticklen: 4,
tickfont: {
size: 16
},
- tickformat: tick_digits
+ tickformat: tick_digits,
+ automargin: true
},
hovermode: "closest"
}
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js
index 50765eda..830dbf7f 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait.js
@@ -30,11 +30,11 @@ Stat_Table_Rows = [
}, {
vn: "min",
pretty: "Minimum",
- digits: 2
+ digits: 3
}, {
vn: "max",
pretty: "Maximum",
- digits: 2
+ digits: 3
}
]
@@ -67,7 +67,7 @@ Stat_Table_Rows.push(
digits: 3
}, {
vn: "interquartile",
- pretty: "<font color='blue'>Interquartile Range</font>",
+ pretty: "<font color='black'>Interquartile Range</font>",
url: "http://www.genenetwork.org/glossary.html#Interquartile",
digits: 3
}, {
@@ -334,9 +334,9 @@ update_prob_plot = function() {
make_table = function() {
var header, key, row, row_line, table, the_id, the_rows, value, _i, _len, _ref, _ref1;
if (js_data.trait_symbol != null) {
- header = "<thead><tr><th style=\"text-align: center;\" colspan=\"100%\">Trait: " + js_data.trait_id + " - " + js_data.trait_symbol + "</th></tr><tr><th style=\"text-align: right; padding-left: 5px;\">Statistic</th>";
+ header = "<thead><tr><th style=\"color: white; background-color: #369; text-align: center;\" colspan=\"100%\">Trait " + js_data.trait_id + " - " + js_data.trait_symbol + "</th></tr><tr><th style=\"text-align: right; padding-left: 5px;\">Statistic</th>";
} else {
- header = "<thead><tr><th style=\"text-align: center;\" colspan=\"100%\">Trait: " + js_data.trait_id + "</th></tr><tr><th style=\"text-align: right; padding-left: 5px;\">Statistic</th>";
+ header = "<thead><tr><th style=\"color: white; background-color: #369; text-align: center;\" colspan=\"100%\">Trait " + js_data.trait_id + ": " + js_data.short_description + "</th></tr><tr><th style=\"text-align: right; padding-left: 5px;\">Statistic</th>";
}
_ref = js_data.sample_group_types;
for (key in _ref) {
@@ -921,8 +921,12 @@ get_bar_range = function(sample_list){
}
root.chart_range = get_bar_range(sample_lists[0])
-if (root.chart_range[1] - root.chart_range[0] < 4){
+val_range = root.chart_range[1] - root.chart_range[0]
+
+if (val_range < 4){
tick_digits = '.1f'
+} else if (val_range < 0.4) {
+ tick_digits = '.2f'
} else {
tick_digits = 'f'
}
@@ -934,8 +938,9 @@ if (js_data.num_values < 256) {
bottom_margin = get_bar_bottom_margin(sample_lists[0])
root.bar_layout = {
- title: js_data.trait_id,
+ title: "<b>Trait " + js_data.trait_id + ": " + js_data.short_description + "</b>",
xaxis: {
+ type: 'category',
titlefont: {
size: 16
},
@@ -943,7 +948,7 @@ if (js_data.num_values < 256) {
ticklen: 4,
tickfont: {
size: 16
- }
+ },
},
yaxis: {
title: js_data.unit_type,
@@ -986,12 +991,13 @@ var hist_trace = {
root.histogram_data = [hist_trace];
root.histogram_layout = {
bargap: 0.05,
- title: js_data.trait_id,
+ title: "<b>Trait " + js_data.trait_id + ": " + js_data.short_description + "</b>",
xaxis: {
autorange: true,
- title: "Value",
+ title: "<b>Value</b>",
titlefont: {
- size: 16
+ family: "arial",
+ size: 20
},
ticklen: 4,
tickfont: {
@@ -1000,23 +1006,25 @@ root.histogram_layout = {
},
yaxis: {
autorange: true,
- title: "Count",
+ title: "<b>Count</b>",
titlefont: {
- size: 16
+ family: "arial",
+ size: 20
},
showline: true,
ticklen: 4,
tickfont: {
size: 16
- }
+ },
+ automargin: true
},
width: 500,
height: 600,
margin: {
- l: 50,
+ l: 70,
r: 30,
t: 100,
- b: 60
+ b: 50
}
};
@@ -1032,25 +1040,34 @@ $('.histogram_samples_group').change(function() {
});
root.box_layout = {
- title: js_data.trait_id,
xaxis: {
showline: true,
+ titlefont: {
+ family: "arial",
+ size: 20
+ },
tickfont: {
size: 16
},
},
yaxis: {
- title: js_data.unit_type,
+ title: "<b>" + js_data.unit_type +"</b>",
autorange: true,
showline: true,
+ titlefont: {
+ family: "arial",
+ size: 20
+ },
ticklen: 4,
tickfont: {
size: 16
},
- tickformat: tick_digits
+ tickformat: tick_digits,
+ zeroline: false,
+ automargin: true
},
margin: {
- l: 50,
+ l: 90,
r: 30,
t: 30,
b: 80
@@ -1118,7 +1135,7 @@ if (full_sample_lists.length > 1) {
{
type: 'box',
y: get_sample_vals(full_sample_lists[0]),
- name: sample_group_list[0],
+ name: "<b>Trait " + js_data.trait_id + "</b>",
boxpoints: 'Outliers',
jitter: 0.5,
whiskerwidth: 0.2,
@@ -1146,28 +1163,36 @@ $('.box_plot_tab').click(function() {
// Violin Plot
root.violin_layout = {
- title: js_data.trait_id,
xaxis: {
showline: true,
+ titlefont: {
+ family: "arial",
+ size: 20
+ },
tickfont: {
size: 16
}
},
yaxis: {
- title: js_data.unit_type,
+ title: "<b>"+js_data.unit_type+"</b>",
autorange: true,
showline: true,
+ titlefont: {
+ family: "arial",
+ size: 20
+ },
ticklen: 4,
tickfont: {
size: 16
},
tickformat: tick_digits,
- zeroline: false
+ zeroline: false,
+ automargin: true
},
margin: {
- l: 50,
+ l: 90,
r: 30,
- t: 80,
+ t: 30,
b: 80
}
};
@@ -1235,14 +1260,11 @@ if (full_sample_lists.length > 1) {
box: {
visible: true
},
- line: {
- color: 'green',
- },
meanline: {
visible: true
},
- name: sample_group_list[0],
- x0: sample_group_list[0]
+ name: "<b>Trait " + js_data.trait_id + "</b>",
+ x0: "<b>Trait " + js_data.trait_id + "</b>"
}
]
}
diff --git a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js
index 95d3a537..8db9522c 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js
@@ -156,7 +156,7 @@
'score_type', 'suggestive', 'significant', 'num_perm', 'permCheck', 'perm_output', 'num_bootstrap', 'bootCheck', 'bootstrap_results',
'LRSCheck', 'covariates', 'maf', 'use_loco', 'manhattan_plot', 'control_marker', 'control_marker_db', 'do_control', 'genofile',
'pair_scan', 'startMb', 'endMb', 'graphWidth', 'lrsMax', 'additiveCheck', 'showSNP', 'showGenes', 'viewLegend', 'haplotypeAnalystCheck',
- 'mapmethod_rqtl_geno', 'mapmodel_rqtl_geno', 'temp_trait', 'group', 'species']
+ 'mapmethod_rqtl_geno', 'mapmodel_rqtl_geno', 'temp_trait', 'group', 'species', 'reaper_version', 'primary_samples']
$("#rqtl_geno_compute").on("click", (function(_this) {
return function() {
diff --git a/wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css b/wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css
index d352390f..36affd72 100644
--- a/wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css
+++ b/wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css
@@ -6,7 +6,7 @@
/* Account for fixed navbar */
body {
- min-width: 1200px;
+ //min-width: 1200px;
padding-top: 70px;
padding-bottom: 30px;
}
@@ -28,7 +28,7 @@ body {
/* Reset the container */
.container {
- width: 1400px;
+ width: 100%;
max-width: none !important;
}
diff --git a/wqflask/wqflask/static/packages/purescript_genome_browser/css/purescript-genetics-browser.css b/wqflask/wqflask/static/packages/purescript_genome_browser/css/purescript-genetics-browser.css
new file mode 100644
index 00000000..135292ac
--- /dev/null
+++ b/wqflask/wqflask/static/packages/purescript_genome_browser/css/purescript-genetics-browser.css
@@ -0,0 +1 @@
+body,html{max-width:100%;overflow-x:hidden}#browser{position:absolute;margin:0}#info-line{border:1px solid #aaa;padding:2px;position:absolute;right:0;top:1px;min-width:14%;font-size:9pt}#controls{visibility:hidden;position:absolute;top:4px;left:100px;z-index:1000}#controls>button{border:1px solid #aaa;border-radius:2px;padding-left:6px;padding-right:6px;height:23px;min-width:20px}button#scrollRight,button#zoomIn{margin-left:-2px;margin-right:4px}#infoBox{position:absolute;display:inline-block;z-index:10000;visibility:hidden;padding:5px;border:2px solid grey;border-radius:5%;background-color:#fff;min-height:100px;min-width:10px;max-width:80%;margin-top:9.7em;font-family:sans-serif}#infoBox>div{float:left;margin:1em 1.2em}#infoBox>div>p{margin:.1em} \ No newline at end of file
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..26fd2d99
--- /dev/null
+++ b/wqflask/wqflask/static/packages/purescript_genome_browser/js/purescript-genetics-browser.js
@@ -0,0 +1,659 @@
+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"}],"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"}],"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"}],"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"}],"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"}],"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};
+},{}],"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}}};
+},{}],"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"}],"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"}],"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"}],"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"}],"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"}],"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"}],"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"}],"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"}],"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"}],"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"}],"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"}],"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"}],"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"}],"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"}],"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"}],"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"}],"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]}};
+},{}],"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"}],"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"}],"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"}],"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]};
+},{}],"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"}],"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)};
+},{}],"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"}],"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"}],"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"}],"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"}],"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("../Control.Applicative/index.js"),e=require("../Control.Bind/index.js"),r=require("../Control.Monad.Except.Trans/index.js"),i=require("../Data.Array/index.js"),t=require("../Data.BigInt/index.js"),u=require("../Data.Boolean/index.js"),a=require("../Data.Either/index.js"),o=require("../Data.Eq/index.js"),d=require("../Data.EuclideanRing/index.js"),c=require("../Data.Foldable/index.js"),l=require("../Data.Functor/index.js"),s=require("../Data.Generic.Rep/index.js"),f=require("../Data.Identity/index.js"),p=require("../Data.Lens.Getter/index.js"),m=require("../Data.Lens.Internal.Forget/index.js"),g=require("../Data.Lens.Iso.Newtype/index.js"),v=require("../Data.List.Types/index.js"),x=require("../Data.Map.Internal/index.js"),w=require("../Data.Maybe/index.js"),b=require("../Data.Monoid.Additive/index.js"),y=require("../Data.Newtype/index.js"),I=require("../Data.Ord/index.js"),q=require("../Data.Pair/index.js"),h=require("../Data.Ring/index.js"),j=require("../Data.Semiring/index.js"),B=require("../Data.Traversable/index.js"),T=require("../Data.Tuple/index.js"),S=require("../Foreign/index.js"),P=require("../Foreign.Index/index.js"),D=require("../Genetics.Browser.Types/index.js"),F=require("../Global.Unsafe/index.js"),E=function(n){return n},N=function(n){return n},z=function(n){return n},C=function(n){return n},A=function(n){return t.toNumber(n.coordWidth)/n.pixelWidth},W=F.unsafeStringify,M=function(n){return function(e){return t.toNumber(e)*(n.pixelWidth/t.toNumber(n.coordWidth))}},R=function(n){return function(e){return function(r){var i=new q.Pair(I.min(n)(e.value0)(r.value0),I.min(n)(e.value1)(r.value1)),t=new q.Pair(I.max(n)(e.value0)(r.value0),I.max(n)(e.value1)(r.value1));return I.greaterThanOrEq(n)(i.value1)(t.value0)}}},G=function(n){return function(e){return h.sub(n)(e.value1)(e.value0)}},O=function(n){return function(e){var r=I.max(I.ordNumber)(0)(e),i=l.map(q.functorPair)(t.toNumber)(n),u=(G(h.ringNumber)(i)*r-G(h.ringNumber)(i))/2,a=l.map(q.functorPair)(t.fromNumber)(new q.Pair(i.value0-u,i.value1+u));return l.map(q.functorPair)(w.fromJust())(a)}},L=function(n){return function(e){var r=G(t.ringBigInt)(e),i=d.div(t.euclideanRingBigInt)(h.sub(t.ringBigInt)(n)(r))(t.fromInt(2));return new q.Pair(h.sub(t.ringBigInt)(e.value0)(i),j.add(t.semiringBigInt)(e.value1)(i))}},V=function(n){return function(e){var r=l.map(l.functorFn)(w.fromJust())(t.fromNumber)(e*t.toNumber(G(t.ringBigInt)(n)));return l.map(q.functorPair)(function(n){return j.add(t.semiringBigInt)(n)(r)})(n)}},_=function(n){return function(e){var r=G(t.ringBigInt)(e);return{pixelWidth:n.width,coordWidth:r}}},J=function(n){return function(e){return function(r){return function(i){return d.div(n)(h.sub(n.CommutativeRing0().Ring0())(i)(e))(h.sub(n.CommutativeRing0().Ring0())(r)(e))}}}},U=new y.Newtype(function(n){return n},N),k=new y.Newtype(function(n){return n},C),H=function(n){return function(e){return function(r){return function(i){return j.add(n.Semiring0())(j.mul(n.Semiring0())(h.sub(n)(j.one(n.Semiring0()))(i))(e))(j.mul(n.Semiring0())(i)(r))}}}},K=new s.Generic(function(n){return n},function(n){return n}),Q=new l.Functor(function(n){return function(e){return C(l.map(x.functorMap)(l.map(q.functorPair)(n))(e))}}),X=new o.Eq(function(n){return function(e){return o.eq(t.eqBigInt)(n.coordWidth)(e.coordWidth)&&n.pixelWidth===e.pixelWidth}}),Y=new y.Newtype(function(n){return n},z),Z=function(n){return function(e){return function(r){var t,u,a=i.unzip(r);return C(x.fromFoldable(n)(c.foldableArray)(i.zip(a.value0)((t=a.value1,u=B.scanl(B.traversableArray)(function(n){return function(r){return j.add(e)(n)(r)}})(j.zero(e))(t),i.zipWith(q.Pair.create)(i.cons(j.zero(e))(u))(u)))))}}},$=function(i){return e.bind(r.bindExceptT(f.monadIdentity))(S.readArray(i))(function(i){return e.bind(r.bindExceptT(f.monadIdentity))(B.traverse(B.traversableArray)(r.applicativeExceptT(f.monadIdentity))(function(i){return e.bind(r.bindExceptT(f.monadIdentity))(l.map(r.functorExceptT(f.functorIdentity))(y.wrap(D.newtypeChrId))(e.bindFlipped(r.bindExceptT(f.monadIdentity))(S.readString)(P.ix(P.indexableForeign)(P.indexString)(i)("chr"))))(function(u){return e.bind(r.bindExceptT(f.monadIdentity))(e.bindFlipped(r.bindExceptT(f.monadIdentity))((o=r.except(f.applicativeIdentity),d=a.note(n.pure(v.applicativeNonEmptyList)(new S.ForeignError("error parsing size for chr"))),function(n){return o(d(t.fromString(n)))}))(e.bindFlipped(r.bindExceptT(f.monadIdentity))(S.readString)(P.ix(P.indexableForeign)(P.indexString)(i)("size"))))(function(e){return n.pure(r.applicativeExceptT(f.monadIdentity))(new T.Tuple(u,e))});var o,d})})(i))(function(e){return n.pure(r.applicativeExceptT(f.monadIdentity))(Z(D.ordChrId)(t.semiringBigInt)(e))})})},nn=function(n){return function(e){return function(r){return new q.Pair(h.sub(n)(r.value0)(e),j.add(n.Semiring0())(r.value1)(e))}}},en=function(n){return g._Newtype(k)(k)(n.Profunctor0())},rn=function(n){var e=en(m.strongForget),r=p.to(y.alaF(l.functorFn)(l.functorFn)(y.newtypeAdditive)(y.newtypeAdditive)(b.Additive)(c.foldMap(x.foldableMap)(b.monoidAdditive(n.Semiring0())))(G(n)));return function(n){return e(r(n))}},tn=function(n){return function(e){return function(r){var i=p.viewOn(n)(rn(t.ringBigInt)),u=y.unwrap(Y)(r),a=h.sub(t.ringBigInt)(u.value1)(u.value0),o=function(){var n=I.greaterThan(t.ordBigInt)(u.value1)(i),e=I.lessThan(t.ordBigInt)(u.value0)(j.zero(t.semiringBigInt));if(e&&!n)return new q.Pair(j.zero(t.semiringBigInt),a);if(!e&&n)return new q.Pair(h.sub(t.ringBigInt)(i)(a),i);if(e&&n)return new q.Pair(j.zero(t.semiringBigInt),i);if(!e&&!n)return new q.Pair(u.value0,u.value1);throw new Error("Failed pattern match at Genetics.Browser.Coordinates (line 207, column 22 - line 211, column 39): "+[e.constructor.name,n.constructor.name])}();return L(I.min(t.ordBigInt)(i)(I.max(t.ordBigInt)(a)(e)))(new q.Pair(o.value0,o.value1))}}},un=function(n){return function(e){return l.map(x.functorMap)(l.map(q.functorPair)(M(e)))(p.viewOn(n)(en(m.strongForget)))}},an=function(n){return function(e){return function(r){return function(i){return x.filter(n)(function(n){if(I.lessThan(e)(n.value0)(i.value0)&&I.greaterThan(e)(n.value1)(i.value1))return!0;if(I.lessThan(e)(n.value0)(i.value0)&&I.lessThan(e)(n.value1)(i.value0))return!1;if(I.greaterThan(e)(n.value0)(i.value1)&&I.greaterThan(e)(n.value1)(i.value1))return!1;if(u.otherwise)return!0;throw new Error("Failed pattern match at Genetics.Browser.Coordinates (line 167, column 9 - line 171, column 29): "+[n.constructor.name])})(p.viewOn(r)(en(m.strongForget)))}}}},on=function(n){return function(e){return function(r){return function(i){return l.map(x.functorMap)(l.map(q.functorPair)(M(i)))(an(n)(t.ordBigInt)(e)(y.unwrap(Y)(r)))}}}};module.exports={CoordSysView:z,pairSize:G,_TotalSize:rn,normalizeView:tn,aroundPair:nn,normalize:J,scalePairBy:O,scaledSegments:un,"scaledSegments'":on,translatePairBy:V,viewScale:_,xPerPixel:A,_Segments:en,pairsOverlap:R,coordSys:Z,parseCoordSys:$,scaleToScreen:M,newtypeNormalized:U,functorCoordSys:Q,newtypeCoordSys:k,genericCoordSys:K,eqViewScale:X,coordsysviewNewtype:Y};
+},{"../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=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"),h=require("../Data.Identity/index.js"),v=require("../Data.Int/index.js"),w=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"),_=require("../Genetics.Browser.Layer/index.js"),R=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("../Simple.JSON/index.js"),J=function(e){return e},K=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)))}}}},X=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)))}}}}},Q=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)))}}}},Y=function(e){return function(n){var r=Q(e)(e.coordinateSystem),t=m.map(_.functorComponent)(function(e){return function(n){return e(r(n.value1)(n.value0))(n.value1)}})(n);return new _.Layer(_.Scrolling.value,new _.Masked(5),t)}},Z=t.composeKleisliFlipped(i.bindExceptT(h.monadIdentity))(function(n){return i.except(h.applicativeIdentity)(s.note(r.pure(S.applicativeNonEmptyList)(new z.ForeignError("Could not parse color: expected hex string")))(e.fromHexString(n)))})(z.readString),$=new D.Newtype(function(e){return e},J),ee=new V.ReadForeign(m.map(m.functorFn)(m.map(i.functorExceptT(h.functorIdentity))(D.wrap($)))(Z)),ne=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 = "+w.viewOn(U.pow(10)(-e.value0.threshold.sig))(R._exp(1)),t=F.append(W.semigroupOutlineStyle)(W.outlineColor(D.unwrap($)(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($)(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)])}},re=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)))}}}}},te=function(e){return _.Layer.create(_.Fixed.value)(_.NoMask.value)(m.map(_.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))},ie=function(e){return D.wrap(E.newtypeNormalized)(D.unwrap(R.newtypeBp)(c.div(R.euclideanRingBp)(e.position.value0)(e.frameSize)))},ae=function(n){return function(r){var t=m.map(m.functorArray)(function(e){return v.toNumber(e)/v.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($)(n.color)))(W.lineWidth(2));return F.append(W.semigroupDrawing)(W.outlined(c)(s))(F.append(W.semigroupDrawing)(a)(o))}},oe=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)},ue=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*v.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)}},de={color:D.wrap($)(e.black),hPad:.125,numSteps:3,fonts:{labelSize:18,scaleSize:14}},le={hPad:.2,vPad:.2,fontSize:12},se=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*v.toNumber(r.fontSize*T.length(M.show(R.showChrId)(a))|0)))(.7*n.height)(W.fillColor(e.black))(M.show(R.showChrId)(i.value0));var a}}};return _.Layer.create(_.Scrolling.value)(new _.Masked(5))(new _.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),function(e){return r(i(e))}))(b.toUnfoldable(S.unfoldableList)(Q(n)(n.coordinateSystem)(e.value1)(e.value0)))};var r,i}))}},ce=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(h.monadIdentity))(function(n){return t.bind(u.bindStateT(h.monadIdentity))(o.get(u.monadStateStateT(h.monadIdentity)))(function(a){return t.discard(t.discardUnit)(u.bindStateT(h.monadIdentity))(o.modify_(u.monadStateStateT(h.monadIdentity))(x.not(x.heytingAlgebraBoolean)))(function(){return r.pure(u.applicativeStateT(h.monadIdentity))(new k.Tuple(D.unwrap($)(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:ie,groupToMap:re,pixelSegments:Q,pixelSegmentsOpt:X,trackLikeLayer:Y,fixedUILayer:te,thresholdRuler:ne,chrLabelsLayer:se,chrBackgroundLayer:ce,HexColor:J,parseColor:Z,defaultVScaleConfig:de,drawVScaleInSlot:ae,drawLegendItem:oe,defaultLegendConfig:le,drawLegendInSlot:ue,trackLegend:K,newtypeHexColor:$,readforeignHexColor:ee};
+},{"../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) {
+
+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":"UG8G"}],"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":"UG8G"}],"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"),d=require("../Control.Monad.Except/index.js"),c=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"),b=require("../Data.Either/index.js"),y=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"),C=require("../Data.Identity/index.js"),I=require("../Data.Lens.Getter/index.js"),j=require("../Data.Lens.Internal.Forget/index.js"),q=require("../Data.Lens.Internal.Re/index.js"),E=require("../Data.Lens.Iso/index.js"),L=require("../Data.Lens.Lens.Tuple/index.js"),F=require("../Data.List/index.js"),B=require("../Data.List.Types/index.js"),D=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.Aff/index.js"),Y=require("../Effect.Aff.Class/index.js"),Q=require("../Effect.Class/index.js"),Z=require("../Effect.Class.Console/index.js"),$=require("../Effect.Exception/index.js"),ee=require("../Effect.Ref/index.js"),ne=require("../Foreign/index.js"),re=require("../Foreign.Index/index.js"),te=require("../Foreign.Keys/index.js"),ie=require("../Foreign.Object/index.js"),oe=require("../Genetics.Browser/index.js"),ae=require("../Genetics.Browser.Cacher/index.js"),ue=require("../Genetics.Browser.Canvas/index.js"),fe=require("../Genetics.Browser.Coordinates/index.js"),de=require("../Genetics.Browser.Layer/index.js"),ce=require("../Genetics.Browser.Types/index.js"),le=require("../Graphics.Drawing/index.js"),se=require("../Math/index.js"),pe=require("../Record/index.js"),me=require("../Record.Builder/index.js"),be=require("../Record.Extra/index.js"),ye=require("../Simple.JSON/index.js"),we=require("../Type.Equality/index.js"),ge=function(e){return oe.fixedUILayer(de.CLeft.create(oe.drawVScaleInSlot(e)))},he=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=fe.aroundPair(ce.ringBp)(e)(r.position),i=g.partition(g.filterableArray)(function(e){return fe.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))})}},ve=function(e){return function(n){var r=ie.lookup(n.field)(e);if(r instanceof M.Nothing)return n.field+": "+n.value;if(r instanceof M.Just)return"<a target='_blank' href='"+n.value+"'>"+r.value0+"</a>";throw new Error("Failed pattern match at Genetics.Browser.Demo (line 253, column 3 - line 258, column 26): "+[r.constructor.name])}},xe=function(e){return function(n){var r="Chr: "+z.show(ce.showChrId)(n.feature.chr),t=M.fromMaybe("SNP: "+n.feature.name)(A.map(M.functorMaybe)(function(e){return"Gene: "+e})(n.feature.gene)),i="Pos: "+z.show(ce.showBp)(n.feature.pos);return O.append(B.semigroupList)(F.fromFoldable(h.foldableArray)([t,r,i]))(A.map(B.functorList)(ve(e))(n.feature.rest))}},Ae=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=fe.aroundPair(ce.ringBp)(e)(r.position),i=g.partition(g.filterableArray)(function(e){return fe.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))})}},Se=function(e){return function(n){return H.unfoldr(H.unfoldableArray)(Ae(e))(n)}},Ce=function(e){return function(n){return a.bind(c.bindExceptT(C.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(c.bindExceptT(C.monadIdentity))(function(){var n=D.lookup(ce.ordChrId)(i.chrId)(I.view(fe._Segments(j.strongForget))(e));if(n instanceof M.Nothing)return f.throwError(c.monadThrowExceptT(C.monadIdentity))(o.pure(B.applicativeNonEmptyList)(new ne.ForeignError("Annotation chr not found in coordinate system!")));if(n instanceof M.Just)return o.pure(c.applicativeExceptT(C.monadIdentity))(ce.Bp(p.toNumber(fe.pairSize(p.ringBigInt)(n.value0))));throw new Error("Failed pattern match at Genetics.Browser.Demo (line 173, column 16 - line 179, column 49): "+[n.constructor.name])}())(function(e){return o.pure(c.applicativeExceptT(C.monadIdentity))({position:t,frameSize:e,feature:i})})})}},Ie=function(e){var n=fe.normalize(w.euclideanRingNumber)(e.min)(e.max),r=T.unwrap(ce.newtypeNegLog10),t=I.view(ce._NegLog10(j.profunctorForget));return function(e){return n(r(t(e)))}},je=function(r){return function(t){return a.bind(V.bindAff)(e.get(n.json)(t))(function(e){return a.discard(a.discardUnit)(V.bindAff)(Q.liftEffect(V.monadEffectAff)(Z.log(Q.monadEffectEffect)(e.body)))(function(){return a.bind(V.bindAff)(b.either((t=f.throwError(V.monadThrowAff),function(e){return t($.error(n.printResponseFormatError(e)))}))(o.pure(V.applicativeAff))(e.body))(function(e){return a.bind(V.bindAff)(function(){var n=d.runExcept(ne.readArray(e));if(n instanceof b.Left)return f.throwError(V.monadThrowAff)($.error("SNP data is not an array"));if(n instanceof b.Right)return o.pure(V.applicativeAff)(n.value0);throw new Error("Failed pattern match at Genetics.Browser.Demo (line 287, column 5 - line 291, column 31): "+[n.constructor.name])}())(function(e){var n,t=g.partitionMap(g.filterableArray)((n=Ce(r),function(e){return d.runExcept(n(e))}))(e);return o.pure(V.applicativeAff)(oe.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})})}},qe=function(e){return A.map(D.functorMap)(g.filter(g.filterableArray)(function(n){return n.feature.score<=I.viewOn(e.sig)(E.re(ce._NegLog10(q.profunctorRe(j.profunctorForget))))}))},Ee=function(e){return function(n){return function(t){var a=fe.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)),d=function(e){var n=A.map(P.functorPair)(u)(e);return le.rectangle(n.value0)(0)(n.value1)(30)},c=function(e){var n=h.foldMap(h.foldableArray)(le.monoidShape)(d)(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(le.semigroupDrawing)(le.outlined(O.append(le.semigroupOutlineStyle)(le.outlineColor(i.darkgrey))(le.lineWidth(1)))(n))(le.filled(le.fillColor(i.lightgrey))(n))};if(f<1)return M.Nothing.value;var l={x:n.value0+fe.pairSize(R.ringNumber)(n)*T.unwrap(fe.newtypeNormalized)(oe.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(le.semigroupDrawing)((J.unit,n=le.rectangle(1.5)(14)(f-1.5)(2),O.append(le.semigroupDrawing)(le.outlined(O.append(le.semigroupOutlineStyle)(le.outlineColor(r.black))(le.lineWidth(3)))(n))(le.filled(le.fillColor(r.black))(n))))(c(J.unit));var n},topLeft:l,bottomRight:s},label:{text:t.feature.geneName,point:l,gravity:ue.LCenter.value}})}}},Le=function(e){return function(n){return function(n){return function(r){var t,i=D.toUnfoldable(B.unfoldableList)(A.map(D.functorMap)(F.fromFoldable(h.foldableArray))(e)),u=F.concatMap(function(e){return M.fromMaybe(N.mempty(B.monoidList))(a.bind(M.bindMaybe)(D.lookup(ce.ordChrId)(e.value0)(n))(function(n){return o.pure(M.applicativeMaybe)(g.filterMap(g.filterableList)(Ee(r)(n))(e.value1))}))})(i),f=X.inj()(new U.IsSymbol(function(){return"labels"}))(ue._labels)(A.map(B.functorList)(function(e){return e.label})(u)),d=A.map(B.functorList)((t=X.inj()(new U.IsSymbol(function(){return"bigDrawing"}))(ue._bigDrawing),function(e){return t(e.bigDrawing)}))(u);return{renderables:new B.Cons(f,d)}}}}},Fe=function(e){return function(n){var r=e.y-n.y,t=e.x-n.x;return se.sqrt(se.pow(t)(2)+se.pow(r)(2))}},Be=function(e){return function(n){var r,t,i,a=A.map(D.functorMap)(F.fromFoldable(h.foldableArray))(e),f=function(e){return v.foldMapWithIndex(D.foldableWithIndexMap)(B.monoidList)(function(r){return function(t){return h.foldMap(h.foldableMaybe)(B.monoidList)(A.map(B.functorList)(G.fanout(u.categoryFn)(G.strongFn)(u.identity(u.categoryFn))((i=t,function(r){return{x:i.value0+fe.pairSize(R.ringNumber)(i)*T.unwrap(fe.newtypeNormalized)(oe.featureNormX(r)),y:e.height*(1-Ie(n.threshold)(r.feature.score))}}))))(D.lookup(ce.ordChrId)(r)(a));var i}})},d=function(e){return function(r){return function(t){return s.fromFoldable(B.foldableList)(g.filterMap(g.filterableList)(function(e){if(Fe(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 546, column 15 - line 546, column 63): "+[e.constructor.name])})(e))}}},c=(r=le.circle(n.render.pixelOffset.x)(n.render.pixelOffset.y)(n.render.radius),t=le.filled(le.fillColor(T.unwrap(oe.newtypeHexColor)(n.render.color.fill)))(r),i=le.outlined(O.append(le.semigroupOutlineStyle)(le.outlineColor(T.unwrap(oe.newtypeHexColor)(n.render.color.outline)))(le.lineWidth(n.render.lineWidth)))(r),O.append(le.semigroupDrawing)(i)(t)),l=function(e){return o.pure(o.applicativeArray)({drawing:c,points:A.map(A.functorArray)(I.view(L._2(j.strongForget)))(s.fromFoldable(B.foldableList)(e))})};return function(e){return function(n){var r=f(n)(e);return{renderables:o.pure(B.applicativeList)(X.inj()(new U.IsSymbol(function(){return"drawingBatch"}))(ue._drawingBatch)(l(r))),hotspots:d(r)}}}}},De=function(e){return Be(e.trackConfig.snps)({threshold:e.browserConfig.threshold,render:e.layerConfig})},Me={radius:3.75,lineWidth:1,color:{outline:T.wrap(oe.newtypeHexColor)(i.darkblue),fill:T.wrap(oe.newtypeHexColor)(i.darkblue)},pixelOffset:{x:0,y:0}},Ne={radius:5.5,outline:T.wrap(oe.newtypeHexColor)(r.black),snpColor:T.wrap(oe.newtypeHexColor)(t.blue),geneColor:T.wrap(oe.newtypeHexColor)(t.red),urls:ie.empty},Te=function(e){return oe.fixedUILayer(de.CRight.create(oe.drawLegendInSlot(e)))},ke=function(e){return function(e){return function(n){return S.mapWithIndex(D.functorWithIndexMap)(function(r){return function(t){return M.fromMaybe([])(a.bind(M.bindMaybe)(D.lookup(ce.ordChrId)(r)(e))(function(e){return a.bind(M.bindMaybe)(D.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)(fe.pairSize(R.ringNumber)(t)));return o.pure(M.applicativeMaybe)(A.map(A.functorArray)(function(e){return{elements:g.filter(g.filterableArray)((r=fe.pairsOverlap(ce.ordBp)(e.covers),function(e){return r(e.position)}))(n),covers:e.covers,y:e.y};var r})(Se(i)(e)))})})}))}})}}},Pe=function(e){return function(n){var r=function(n){return O.append(O.semigroupFn(le.semigroupDrawing))(le.outlined(O.append(le.semigroupOutlineStyle)(le.outlineColor(T.unwrap(oe.newtypeHexColor)(e.outline)))(le.lineWidth(2))))(le.filled(le.fillColor(T.unwrap(oe.newtypeHexColor)(n))))(le.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 409, column 6 - line 411, column 69): "+[n.feature.gene.constructor.name])}},Ge=function(e){return function(n){return function(n){return function(r){var t=s.concat(s.fromFoldable(B.foldableList)(A.map(B.functorList)(s.fromFoldable(e))(D.values(r))));return oe.trackLegend(h.foldableArray)(A.functorArray)(Pe(n))(t)}}}},Re=function(e){return function(n){return function(t){return function(i){return function(u){var f=.06*u.height,d=function(e){var n=e.covers.value0+.5*(e.covers.value1-e.covers.value0),i=s.null(e.elements)?N.mempty(le.monoidDrawing):le.outlined(O.append(le.semigroupOutlineStyle)(le.lineWidth(1.3))(le.outlineColor(r.black)))(le.path(h.foldableArray)([{x:0,y:0},{x:0,y:-f}])),o=le.translate(0)(-f)(h.foldr(h.foldableArray)(function(e){return function(n){return le.translate(0)(-6.5)(O.append(le.semigroupDrawing)(Pe(t)(e).icon)(n))}})(N.mempty(le.monoidDrawing))(e.elements)),a=14*h.length(h.foldableArray)(_.semiringNumber)(e.elements),u={drawing:O.append(le.semigroupDrawing)(i)(o),points:[{x:n,y:e.y}]},d=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),c=d.y>a?{g:ue.LCenter.value,y0:d.y}:{g:ue.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 B.Cons({text:M.fromMaybe(e.feature.name)(e.feature.gene),point:{x:n,y:r.value0},gravity:c.g},r.value1))}})(new K.Tuple(c.y0,N.mempty(B.monoidList)))(e.elements));return new K.Tuple([u],l)};return function(r){var t,f=(t=function(r){return S.mapWithIndex(D.functorWithIndexMap)(function(t){return function(i){return M.fromMaybe([])(a.bind(M.bindMaybe)(A.map(M.functorMaybe)((f=T.wrap(ce.newtypeBp),d=fe.pairSize(p.ringBigInt),function(e){return f(p.toNumber(d(e)))}))(D.lookup(ce.ordChrId)(t)(I.viewOn(e)(fe._Segments(j.strongForget)))))(function(e){return a.bind(M.bindMaybe)(D.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+fe.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,d}})(i)}(r),h.foldMap(D.foldableMap)(K.monoidTuple(N.monoidArray)(B.monoidList))(h.foldMap(h.foldableArray)(K.monoidTuple(N.monoidArray)(B.monoidList))(d))(t));return{drawingBatch:f.value0,labels:f.value1}}}}}}},Oe=function(e){return function(n){return function(r){return function(t){var i=ke(e)(n)(r);return function(n){return function(r){var o=Re(e)(t.threshold)(t.render)(i(n))(r)(n);return{renderables:F.fromFoldable(h.foldableArray)([X.inj()(new U.IsSymbol(function(){return"drawingBatch"}))(ue._drawingBatch)(o.drawingBatch),X.inj()(new U.IsSymbol(function(){return"labels"}))(ue._labels)(o.labels)])}}}}}}},_e=function(e){return function(e){return be.keys()(be.consKeys(new U.IsSymbol(function(){return"chr"}))(be.consKeys(new U.IsSymbol(function(){return"gene"}))(be.consKeys(new U.IsSymbol(function(){return"name"}))(be.consKeys(new U.IsSymbol(function(){return"pos"}))(be.consKeys(new U.IsSymbol(function(){return"url"}))(be.nilKeys))))))(J.unit)}},ze=function(e){return a.bind(c.bindExceptT(C.monadIdentity))(A.map(c.functorExceptT(C.functorIdentity))(F.fromFoldable(h.foldableArray))(te.keys(e)))(function(n){var r=F.difference(y.eqString)(n)(_e(be.consKeys(new U.IsSymbol(function(){return"chr"}))(be.consKeys(new U.IsSymbol(function(){return"gene"}))(be.consKeys(new U.IsSymbol(function(){return"name"}))(be.consKeys(new U.IsSymbol(function(){return"pos"}))(be.consKeys(new U.IsSymbol(function(){return"url"}))(be.nilKeys))))))());return W.for(c.applicativeExceptT(C.monadIdentity))(B.traversableList)(r)(function(n){return A.map(c.functorExceptT(C.functorIdentity))(function(e){return{field:n,value:e}})(re.readProp(n)(e))})})},Ue=function(e){return function(n){return a.bind(c.bindExceptT(C.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(c.bindExceptT(C.monadIdentity))(ze(n))(function(n){var t,i=me.build(l.composeFlipped(me.semigroupoidBuilder)(me.insert()()(new U.IsSymbol(function(){return"rest"}))(U.SProxy.value)(n))(l.composeFlipped(me.semigroupoidBuilder)(me.modify()()(new U.IsSymbol(function(){return"chr"}))(U.SProxy.value)(ce.ChrId))(me.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(c.bindExceptT(C.monadIdentity))(function(){var n=D.lookup(ce.ordChrId)(i.chr)(I.view(fe._Segments(j.strongForget))(e));if(n instanceof M.Nothing)return f.throwError(c.monadThrowExceptT(C.monadIdentity))(o.pure(B.applicativeNonEmptyList)(new ne.ForeignError("Annotation chr not found in coordinate system!")));if(n instanceof M.Just)return o.pure(c.applicativeExceptT(C.monadIdentity))(ce.Bp(p.toNumber(fe.pairSize(p.ringBigInt)(n.value0))));throw new Error("Failed pattern match at Genetics.Browser.Demo (line 224, column 16 - line 231, column 49): "+[n.constructor.name])}())(function(e){return o.pure(c.applicativeExceptT(C.monadIdentity))({position:u,frameSize:e,feature:i})})})})}},We=function(r){return function(t){return a.bind(V.bindAff)(e.get(n.json)(t))(function(e){return a.bind(V.bindAff)(b.either((t=f.throwError(V.monadThrowAff),function(e){return t($.error(n.printResponseFormatError(e)))}))(o.pure(V.applicativeAff))(e.body))(function(e){return a.bind(V.bindAff)(function(){var n=d.runExcept(ne.readArray(e));if(n instanceof b.Left)return f.throwError(V.monadThrowAff)($.error("Annotations data is not an array"));if(n instanceof b.Right)return o.pure(V.applicativeAff)(n.value0);throw new Error("Failed pattern match at Genetics.Browser.Demo (line 313, column 16 - line 317, column 37): "+[n.constructor.name])}())(function(e){var n,t=g.partitionMap(g.filterableArray)((n=Ue(r),function(e){return d.runExcept(n(e))}))(e);return a.discard(a.discardUnit)(V.bindAff)(Q.liftEffect(V.monadEffectAff)(function(){return Z.log(Q.monadEffectEffect)("Raw annotations array length: "+z.show(z.showInt)(s.length(e)))(),Z.log(Q.monadEffectEffect)("Could not parse "+z.show(z.showInt)(h.length(h.foldableArray)(_.semiringInt)(t.left))+" annotations.")(),Z.log(Q.monadEffectEffect)("Successfully parsed "+z.show(z.showInt)(h.length(h.foldableArray)(_.semiringInt)(t.right))+" annotations.")(),Z.log(Q.monadEffectEffect)(t.right)()}))(function(){return o.pure(V.applicativeAff)(oe.groupToMap(N.monoidArray)(ce.ordChrId)(h.foldableArray)(o.applicativeArray)(function(e){return e.feature.chr})(t.right))})})});var t})}},Ke=function(e){return function(n){return function(n){return function(r){var t={segmentPadding:12,coordinateSystem:e},i=oe.trackLikeLayer(t)(de.Center.create(Le(n.genes)({genes:{}})));return a.bind(V.bindAff)(ue.newLayer(Y.monadAffAff)()(ae.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(ae.cacherAffNil(we.refl)))(r)("genes")(i))(function(e){return o.pure(V.applicativeAff)({genes:function(n){return function(r){return a.discard(a.discardUnit)(V.bindAff)(e.run(r))(function(){return a.bind(V.bindAff)(e.last.renderables)(e.drawOnCanvas(n))})}}})})}}}},He=function(e){return function(n){return function(r){var i=me.build(me.merge()()(n.vscale))(n.score),u=qe(n.score)(r.snps),f=pe.insert(new U.IsSymbol(function(){return"entries"}))()()(U.SProxy.value)(Ge(h.foldableArray)(A.functorArray)(n.annotations)(r.annotations))(n.legend),d={segmentPadding:12,coordinateSystem:e},c=oe.trackLikeLayer(d)(de.Center.create(Be(r.snps)({threshold:n.score,render:n.snps}))),l=oe.trackLikeLayer(d)(de.Center.create(Oe(e)(u)(r.annotations)({threshold:n.score,render:n.annotations})));return function(e){return a.bind(V.bindAff)(ue.newLayer(Y.monadAffAff)()(ae.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(ae.cacherAffNil(we.refl)))(e)("ruler")(new de.Layer(de.Fixed.value,de.NoMask.value,new de.Center(oe.thresholdRuler))))(function(r){return a.bind(V.bindAff)(ue.newLayer(Y.monadAffAff)()(ae.cacherAffCons(new U.IsSymbol(function(){return"hotspots"}))()()()()(ae.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(ae.cacherAffNil(we.refl))))(e)("snps")(c))(function(u){return a.bind(V.bindAff)(ue.newLayer(Y.monadAffAff)()(ae.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(ae.cacherAffNil(we.refl)))(e)("annotations")(l))(function(d){return a.bind(V.bindAff)(ue.newLayer(Y.monadAffAff)()(ae.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(ae.cacherAffNil(we.refl)))(e)("vscale")(ge(i)))(function(i){return a.bind(V.bindAff)(ue.newLayer(Y.monadAffAff)()(ae.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(ae.cacherAffNil(we.refl)))(e)("legend")(Te(f)))(function(e){return a.bind(V.bindAff)(Q.liftEffect(V.monadEffectAff)(ee.new(0)))(function(f){var c,l=a.bind(V.bindAff)(Q.liftEffect(V.monadEffectAff)(ee.read(f)))(function(e){return a.bind(V.bindAff)(u.last.hotspots)(function(n){return o.pure(V.applicativeAff)(function(r){return function(t){return n(r)({x:t.x+e,y:t.y})}})})}),s=(c={rulerColor:T.wrap(oe.newtypeHexColor)(t.red),threshold:n.score},h.traverse_(V.applicativeAff)(h.foldableArray)(function(e){return a.discard(a.discardUnit)(V.bindAff)(e.run(c))(function(){return a.bind(V.bindAff)(e.last.renderables)(e.drawOnCanvas(new P.Pair(0,0)))})})([e,i,r]));return o.pure(V.applicativeAff)({snps:function(e){return function(n){return a.discard(a.discardUnit)(V.bindAff)(Q.liftEffect(V.monadEffectAff)(ee.write(e.value0)(f)))(function(){return a.discard(a.discardUnit)(V.bindAff)(u.run(n))(function(){return a.bind(V.bindAff)(u.last.renderables)(u.drawOnCanvas(e))})})}},annotations:function(e){return function(n){return a.discard(a.discardUnit)(V.bindAff)(d.run(n))(function(){return a.bind(V.bindAff)(d.last.renderables)(d.drawOnCanvas(e))})}},hotspots:l,fixedUI:s})})})})})})})}}}},Je=function(e){return function(n){return function(r){return a.bind(V.bindAff)(ue.newLayer(Y.monadAffAff)()(ae.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(ae.cacherAffNil(we.refl)))(r)("chrBackground")(oe.trackLikeLayer(e)(de.Center.create(oe.chrBackgroundLayer({chrBG1:n.chrBG1,chrBG2:n.chrBG2,segmentPadding:e.segmentPadding})))))(function(t){return a.bind(V.bindAff)(ue.newLayer(Y.monadAffAff)()(ae.cacherAffCons(new U.IsSymbol(function(){return"renderables"}))()()()()(ae.cacherAffNil(we.refl)))(r)("chrLabels")(oe.chrLabelsLayer(e)({fontSize:n.chrLabels.fontSize})))(function(e){return o.pure(V.applicativeAff)(function(n){return function(r){return h.traverse_(V.applicativeAff)(h.foldableArray)(function(e){return a.discard(a.discardUnit)(V.bindAff)(e.run(r))(function(){return a.bind(V.bindAff)(e.last.renderables)(e.drawOnCanvas(n))})})([t,e])}})})})}}},Xe=U.SProxy.value,Ve=U.SProxy.value;module.exports={renderGenes:Le,drawGene:Ee,parseSNP:Ce,annotationFields:_e,parseAnnotation:Ue,parseAnnotationRest:ze,showAnnotationField:ve,showAnnotation:xe,getSNPs:je,getAnnotations:We,snpPeak:he,peak1:Ae,peaks:Se,defaultAnnotationsConfig:Ne,annotationLegendEntry:Pe,annotationLegendTest:Ge,normYLogScore:Ie,dist:Fe,filterSig:qe,snpsUI:ge,annotationsUI:Te,defaultSNPConfig:Me,snpLayer:De,renderSNPs:Be,annotationsForScale:ke,renderAnnotationPeaks:Re,renderAnnotations:Oe,_snps:Xe,_annotations:Ve,addChrLayers:Je,addGWASLayers:He,addGeneLayers:Ke};
+},{"../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) {
+"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("../Control.Monad.Except/index.js"),o=require("../Data.Array/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"),c=require("../Data.Function/index.js"),d=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"),S=require("../Data.Lens.Iso.Newtype/index.js"),I=require("../Data.List.Types/index.js"),y=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"),E=require("../Data.Semigroup/index.js"),A=require("../Data.Semiring/index.js"),F=require("../Data.Show/index.js"),x=require("../Data.Symbol/index.js"),N=require("../Data.Time.Duration/index.js"),M=require("../Data.Unit/index.js"),j=require("../Data.Variant/index.js"),q=require("../Data.Variant.Internal/index.js"),k=require("../Effect/index.js"),D=require("../Effect.Aff/index.js"),B=require("../Effect.Aff.AVar/index.js"),R=require("../Effect.Class/index.js"),G=require("../Effect.Class.Console/index.js"),U=require("../Effect.Exception/index.js"),L=require("../Effect.Ref/index.js"),z=require("../Foreign/index.js"),H=require("../Genetics.Browser/index.js"),T=require("../Genetics.Browser.Bed/index.js"),V=require("../Genetics.Browser.Canvas/index.js"),P=require("../Genetics.Browser.Coordinates/index.js"),_=require("../Genetics.Browser.Demo/index.js"),J=require("../Genetics.Browser.Layer/index.js"),O=require("../Genetics.Browser.Track/index.js"),W=require("../Genetics.Browser.Types/index.js"),Z=require("../Genetics.Browser.UI.View/index.js"),Q=require("../Math/index.js"),X=require("../Record/index.js"),Y=require("../Simple.JSON/index.js"),K=require("../Type.Equality/index.js"),$=require("../Web.DOM.Document/index.js"),ee=require("../Web.DOM.ParentNode/index.js"),ne=require("../Web.HTML/index.js"),re=require("../Web.HTML.HTMLDocument/index.js"),te=require("../Web.HTML.Window/index.js"),ie=require("../Web.UIEvent.KeyboardEvent/index.js"),oe=function(){function e(){}return e.value=new e,e}(),ae=function(){function e(){}return e.value=new e,e}(),ue=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),fe=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),se=function(){function e(e){this.value0=e}return e.create=function(n){return new e(n)},e}(),ce=function(e){return function(n){return"<"+e+">"+n+"</"+e+">"}},de=function(n){return function(r){if(r instanceof oe)return V.setElementStyle(n)("visibility")("visible");if(r instanceof ae)return V.setElementStyle(n)("visibility")("hidden");if(r instanceof fe)return V.setElementStyle(n)("left")(F.show(F.showInt)(r.value0)+"px");if(r instanceof ue)return V.setElementStyle(n)("top")(F.show(F.showInt)(r.value0)+"px");if(r instanceof se)return e.setElementContents(n)(r.value0);throw new Error("Failed pattern match at Genetics.Browser.UI (line 321, column 3 - line 331, column 33): "+[r.constructor.name])}},le=function(e){var n,r,t,i=s.foldMap(s.foldableArray)(v.monoidString)(ce("p"))(["SNP: "+e.feature.name,"Chr: "+F.show(W.showChrId)(e.feature.chrId),"Pos: "+F.show(W.showBp)(C.fst(e.position)),"-log10: "+b.viewOn(e.feature.score)((n=W._NegLog10(p.profunctorForget),r=S._Newtype(W.newtypeNegLog10)(W.newtypeNegLog10)(p.profunctorForget),t=W._prec(4),function(e){return n(r(t(e)))}))]);return ce("div")(i)},we=function(e){var n=s.length(s.foldableArray)(A.semiringInt)(e);return function(){return G.log(R.monadEffectEffect)("showing "+F.show(F.showInt)(5)+" out of "+F.show(F.showInt)(n)+" clicked glyphs")(),s.for_(k.applicativeEffect)(s.foldableArray)(o.take(5)(e))((r=G.log(R.monadEffectEffect),function(e){return r(e)}))();var r}},me=function(e){return function(n){var r=o.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 ce("div")(ce("p")(F.show(F.showInt)(s.length(s.foldableArray)(A.semiringInt)(r.value0.tail)+1|0)+" annotations"));throw new Error("Failed pattern match at Genetics.Browser.UI (line 241, column 3 - line 246, column 51): "+[r.constructor.name])}},be=function(r){return function(t){return function(i){return e.keydownEvent(r)(function(e){var r=ie.key(e);return"ArrowLeft"===r?i(new Z.ScrollView(-t.scrollMod)):"ArrowRight"===r?i(new Z.ScrollView(t.scrollMod)):n.pure(k.applicativeEffect)(M.unit)})}}},pe="#infoBox",Se=function(){var e=function(){var e=d.map(k.functorEffect)(re.toDocument)(t.bindFlipped(k.bindEffect)(te.document)(ne.window))();return ee.querySelector(h.wrap(ee.newtypeQuerySelector)(pe))($.toParentNode(e))()}();if(e instanceof g.Nothing)return U.throw("Could not find element '#infoBox'")();if(e instanceof g.Just)return de(e.value0);throw new Error("Failed pattern match at Genetics.Browser.UI (line 344, column 3 - line 346, column 41): "+[e.constructor.name])},Ie=new l.Generic(function(e){if(e instanceof oe)return new l.Inl(l.NoArguments.value);if(e instanceof ae)return new l.Inr(new l.Inl(l.NoArguments.value));if(e instanceof ue)return new l.Inr(new l.Inr(new l.Inl(e.value0)));if(e instanceof fe)return new l.Inr(new l.Inr(new l.Inr(new l.Inl(e.value0))));if(e instanceof se)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 314, column 1 - line 314, column 54): "+[e.constructor.name])},function(e){if(e instanceof l.Inl)return oe.value;if(e instanceof l.Inr&&e.value0 instanceof l.Inl)return ae.value;if(e instanceof l.Inr&&e.value0 instanceof l.Inr&&e.value0.value0 instanceof l.Inl)return new ue(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 fe(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 se(e.value0.value0.value0.value0);throw new Error("Failed pattern match at Genetics.Browser.UI (line 314, column 1 - line 314, column 54): "+[e.constructor.name])}),ye=new F.Show(w.genericShow(Ie)(w.genericShowSum(w.genericShowConstructor(w.genericShowArgsNoArguments)(new x.IsSymbol(function(){return"IBoxShow"})))(w.genericShowSum(w.genericShowConstructor(w.genericShowArgsNoArguments)(new x.IsSymbol(function(){return"IBoxHide"})))(w.genericShowSum(w.genericShowConstructor(w.genericShowArgsArgument(F.showInt))(new x.IsSymbol(function(){return"IBoxSetY"})))(w.genericShowSum(w.genericShowConstructor(w.genericShowArgsArgument(F.showInt))(new x.IsSymbol(function(){return"IBoxSetX"})))(w.genericShowConstructor(w.genericShowArgsArgument(F.showString))(new x.IsSymbol(function(){return"IBoxSetContents"})))))))),ge=function(n){return function(r){return function(){return e.buttonEvent("scrollLeft")(r(new Z.ScrollView(-n.scrollMod)))(),e.buttonEvent("scrollRight")(r(new Z.ScrollView(n.scrollMod)))(),e.buttonEvent("zoomOut")(r(Z.ZoomView.create(1+n.zoomMod)))(),e.buttonEvent("zoomIn")(r(Z.ZoomView.create(1-n.zoomMod)))()}}},ve=ge({scrollMod:.5,zoomMod:1}),he=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 294, column 18 - line 296, column 84): "+[e.feature.url.constructor.name])}();return ce("p")(r)},Ce=function(e){return function(n){var r=g.fromMaybe("Annotated SNP: "+n.feature.name)(d.map(g.functorMaybe)(function(e){return"Gene: "+e})(n.feature.gene)),t=function(){if(n.feature.url instanceof g.Nothing)return r;if(n.feature.url instanceof g.Just)return"<a target='_blank' href='"+n.feature.url.value0+"'>"+r+"</a>";throw new Error("Failed pattern match at Genetics.Browser.UI (line 272, column 18 - line 276, column 40): "+[n.feature.url.constructor.name])}(),i=s.foldMap(s.foldableArray)(v.monoidString)(ce("p"))(E.append(E.semigroupArray)([t])(f.filterMap(f.filterableArray)(e)(o.fromFoldable(I.foldableList)(n.feature.rest))));return ce("div")(i)}},Ee=function(e){return Ce((r=n.pure(g.applicativeMaybe),t=_.showAnnotationField(e),function(e){return r(t(e))}));var r,t},Ae=function(e){return function(n){var r=o.uncons(n.elements);if(r instanceof g.Nothing)return"";if(r instanceof g.Just&&0===r.value0.tail.length)return Ee(e)(r.value0.head);if(r instanceof g.Just)return ce("div")(ce("p")("Annotations:")+s.foldMap(s.foldableArray)(v.monoidString)(he)(n.elements));throw new Error("Failed pattern match at Genetics.Browser.UI (line 254, column 3 - line 259, column 75): "+[r.constructor.name])}},Fe=x.SProxy.value,xe=function(e){return function(r){return function(i){return function(i){return function(o){return function(a){return t.bind(D.bindAff)(B.empty)(function(u){return t.bind(D.bindAff)(B.empty)(function(f){return t.bind(D.bindAff)(O.makeTrack(e)(r)(i)(a))(function(e){var r=c.flip(B.put)(f),i=t.bind(D.bindAff)(B.take(f))(function(f){return t.discard(t.discardUnit)(D.bindAff)(j.match()(q.variantMatchCons(q.variantMatchCons(q.variantMatchNil)()(K.refl))()(K.refl))()({render:function(e){return n.pure(D.applicativeAff)(M.unit)},docResize:function(e){return t.bind(D.bindAff)(d.map(D.functorAff)(function(e){return e.size})(V.getDimensions(D.monadEffectAff)(a)))(function(n){return t.discard(t.discardUnit)(D.bindAff)(V.setTrackContainerSize(D.monadEffectAff)({width:e.width,height:n.height})(a))(function(){return t.discard(t.discardUnit)(D.bindAff)(r(j.inj()(new x.IsSymbol(function(){return"render"}))(Fe)(M.unit)))(function(){return i})})})}})(f))(function(){return t.discard(t.discardUnit)(D.bindAff)(t.bindFlipped(D.bindAff)(s.traverse_(D.applicativeAff)(s.foldableMaybe)(D.killFiber(U.error("Resetting renderer"))))(B.tryTake(u)))(function(){return t.bind(D.bindAff)(R.liftEffect(D.monadEffectAff)(o))(function(n){return t.bind(D.bindAff)(V.getDimensions(D.monadEffectAff)(a))(function(r){var o=J.trackSlots(r).center,a=P.viewScale(o.size)(n),f=d.map(C.functorPair)(P.scaleToScreen(a))(h.unwrap(P.coordsysviewNewtype)(n));return t.bind(D.bindAff)(D.forkAff(e.render(f)(n)))(function(e){return t.discard(t.discardUnit)(D.bindAff)(B.put(e)(u))(function(){return i})})})})})})});return t.bind(D.bindAff)(D.forkAff(i))(function(i){return t.discard(t.discardUnit)(D.bindAff)(r(j.inj()(new x.IsSymbol(function(){return"render"}))(Fe)(M.unit)))(function(){return n.pure(D.applicativeAff)({lastHotspots:e.hotspots,queueCommand:r})})})})})})}}}}}},Ne=x.SProxy.value,Me=function(r){return function(t){return function(i){return R.liftEffect(D.monadEffectAff)(function(){return e.resizeEvent(function(e){return D.launchAff_(i.queueCommand(j.inj()(new x.IsSymbol(function(){return"docResize"}))(Ne)(e)))})(),V.dragScrollTrack(t)(function(e){return n.when(k.applicativeEffect)(Q.abs(e.x)>=1)(function(){var n=d.map(k.functorEffect)(function(e){return J.trackSlots(e).center})(V.getDimensions(R.monadEffectEffect)(t))(),i=Z.ScrollView.create(e.x/n.size.width);return r.updateView(i)()})})()})}}},je=function(e){return function(r){return t.bind(D.bindAff)(R.liftEffect(D.monadEffectAff)(L.read(e)))(function(e){return t.bind(D.bindAff)(V.getTrack("gene")(e.container))(function(i){return t.bind(D.bindAff)(O.fetchData()()(O.trackDataCons(new x.IsSymbol(function(){return"genes"}))()()(y.monoidMap(W.ordChrId))()()()(O.trackDataNil(K.refl)))(i)({genes:T.getGenes(e.coordSys)})(r.urls))(function(o){return t.bind(D.bindAff)(t.bind(D.bindAff)(_.addChrLayers({coordinateSystem:e.coordSys,segmentPadding:12})(r.chrs)(i))(function(a){return t.bind(D.bindAff)(_.addGeneLayers(e.coordSys)(r.tracks.gene)(o)(i))(function(e){return n.pure(D.applicativeAff)(X.merge()()({chrs:a})(e))})}))(function(n){return t.bind(D.bindAff)(xe()(O.trackRecordRender(new x.IsSymbol(function(){return"chrs"}))()()(O.trackRecordRender(new x.IsSymbol(function(){return"genes"}))()()(O.trackRecordNil(K.refl))))(e.coordSys)(n)(e.viewManager.browserView)(i))(function(n){return t.discard(t.discardUnit)(D.bindAff)(Me(e.viewManager)(i)(n))(function(){return R.liftEffect(D.monadEffectAff)(e.viewManager.addCallback(function(e){return D.launchAff_(n.queueCommand(j.inj()(new x.IsSymbol(function(){return"render"}))(Fe)(M.unit)))}))})})})})})})}},qe=function(e){return function(r){return t.bind(D.bindAff)(R.liftEffect(D.monadEffectAff)(L.read(e)))(function(e){return t.bind(D.bindAff)(V.getTrack("gwas")(e.container))(function(i){return t.bind(D.bindAff)(O.fetchData()()(O.trackDataCons(new x.IsSymbol(function(){return"annotations"}))()()(y.monoidMap(W.ordChrId))()()()(O.trackDataCons(new x.IsSymbol(function(){return"snps"}))()()(y.monoidMap(W.ordChrId))()()()(O.trackDataNil(K.refl))))(i)({snps:_.getSNPs(e.coordSys),annotations:_.getAnnotations(e.coordSys)})(r.urls))(function(a){return t.bind(D.bindAff)(t.bind(D.bindAff)(_.addChrLayers({coordinateSystem:e.coordSys,segmentPadding:12})(r.chrs)(i))(function(o){return t.bind(D.bindAff)(_.addGWASLayers(e.coordSys)(r.tracks.gwas)(a)(i))(function(e){return n.pure(D.applicativeAff)(X.merge()()({chrs:o})(e))})}))(function(n){return t.bind(D.bindAff)(xe()(O.trackRecordRender(new x.IsSymbol(function(){return"annotations"}))()()(O.trackRecordRender(new x.IsSymbol(function(){return"chrs"}))()()(O.trackRecordUI(new x.IsSymbol(function(){return"fixedUI"}))()()(O.trackRecordHotspots(new x.IsSymbol(function(){return"hotspots"}))()()(K.refl)(O.trackRecordRender(new x.IsSymbol(function(){return"snps"}))()()(O.trackRecordNil(K.refl)))))))(e.coordSys)(n)(e.viewManager.browserView)(i))(function(n){return t.discard(t.discardUnit)(D.bindAff)(Me(e.viewManager)(i)(n))(function(){return t.discard(t.discardUnit)(D.bindAff)(R.liftEffect(D.monadEffectAff)(e.viewManager.addCallback(function(e){return D.launchAff_(n.queueCommand(j.inj()(new x.IsSymbol(function(){return"render"}))(Fe)(M.unit)))})))(function(){return R.liftEffect(D.monadEffectAff)((u=_.filterSig(r.score)(a.snps),V.trackClickHandler(R.monadEffectEffect)(i)(new J.Center(function(f){return D.launchAff_(t.bind(D.bindAff)(R.liftEffect(D.monadEffectAff)(e.viewManager.browserView))(function(c){return t.bind(D.bindAff)(d.map(D.functorAff)(function(e){return J.trackSlots(e).center})(V.getDimensions(D.monadEffectAff)(i)))(function(i){var d=H.pixelSegments({segmentPadding:12})(e.coordSys)(i.size)(c),l=_.annotationsForScale(e.coordSys)(u)(a.annotations)(d);return t.bind(D.bindAff)(n.lastHotspots)(function(n){var i=n(1)(f);return R.liftEffect(D.monadEffectAff)(function(){var n=o.head(i);if(n instanceof g.Nothing)return e.cmdInfoBox(ae.value);if(n instanceof g.Just)return function(){return e.cmdInfoBox(oe.value)(),e.cmdInfoBox(fe.create(m.round(f.x)))(),e.cmdInfoBox(ue.create(m.round(f.y)))(),e.cmdInfoBox(se.create(le(n.value0)+s.foldMap(s.foldableMaybe)(v.monoidString)(Ae(r.tracks.gwas.annotations.urls))((i=l,function(e){return t.bindFlipped(g.bindMaybe)(s.find(s.foldableArray)(function(n){return P.pairsOverlap(W.ordBp)(n.covers)(e.position)}))(y.lookup(W.ordChrId)(e.feature.chrId)(i))})(n.value0))))();var i};throw new Error("Failed pattern match at Genetics.Browser.UI (line 427, column 15 - line 436, column 57): "+[n.constructor.name])}())})})}))}))));var u})})})})})})})}},ke=function(o){return function(f){return D.launchAff(t.bind(D.bindAff)(R.liftEffect(D.monadEffectAff)(function(){var e=i.runExcept(P.parseCoordSys(o.coordinateSystem));if(e instanceof u.Left)return U.throw(s.foldMap(I.foldableNonEmptyList)(v.monoidString)(function(e){return z.renderForeignError(e)+" "})(e.value0));if(e instanceof u.Right)return n.pure(k.applicativeEffect)(e.value0);throw new Error("Failed pattern match at Genetics.Browser.UI (line 479, column 11 - line 481, column 24): "+[e.constructor.name])}()))(function(i){var u=g.fromMaybe(h.wrap(P.coordsysviewNewtype)(new C.Pair(A.zero(a.semiringBigInt),b.viewOn(i)(P._TotalSize(a.ringBigInt)))))(t.bind(g.bindMaybe)(o.initialChrs)(function(e){return t.bind(g.bindMaybe)(y.lookup(W.ordChrId)(h.wrap(W.newtypeChrId)(e.left))(b.viewOn(i)(P._Segments(p.strongForget))))(function(r){return t.bind(g.bindMaybe)(y.lookup(W.ordChrId)(h.wrap(W.newtypeChrId)(e.right))(b.viewOn(i)(P._Segments(p.strongForget))))(function(e){return n.pure(g.applicativeMaybe)(h.wrap(P.coordsysviewNewtype)(new C.Pair(r.value0,e.value1)))})})}));return t.discard(t.discardUnit)(D.bindAff)(R.liftEffect(D.monadEffectAff)(e.initDebugDiv(1)))(function(){return t.bind(D.bindAff)(R.liftEffect(D.monadEffectAff)(Se))(function(a){return t.bind(D.bindAff)(R.liftEffect(D.monadEffectAff)(Z.browserViewManager(i)(h.wrap(N.newtypeMilliseconds)(200))({initialView:u})(f)))(function(s){return t.bind(D.bindAff)(R.liftEffect(D.monadEffectAff)(L.new({viewManager:s,cmdInfoBox:a,container:f,coordSys:i})))(function(i){return t.discard(t.discardUnit)(D.bindAff)(R.liftEffect(D.monadEffectAff)((a={scrollMod:.1,zoomMod:.15},function(){var n;return ge(a)(function(e){return s.updateView(e)})(),e.buttonEvent("reset")((n=new Z.ModView(c.const(h.unwrap(P.coordsysviewNewtype)(u))),s.updateView(n)))(),be(b.viewOn(f)(V._Container(V.newtypeBrowserContainer)(p.strongForget)))({scrollMod:.075})(function(e){return s.updateView(e)})(),V.wheelZoom(V.newtypeBrowserContainer)(f)(function(e){var n=Z.ZoomView.create(1+.06*e);return s.updateView(n)})()})))(function(){if(o.urls.snps instanceof g.Just)return r.applySecond(D.applyAff)(qe(i)(o))(n.pure(D.applicativeAff)(M.unit));if(o.urls.snps instanceof g.Nothing)return n.pure(D.applicativeAff)(M.unit);throw new Error("Failed pattern match at Genetics.Browser.UI (line 523, column 3 - line 525, column 25): "+[o.urls.snps.constructor.name])});var a})})})})}))}},De=function(i){return function(){var o,a=function(){var e=d.map(k.functorEffect)(re.toDocument)(t.bindFlipped(k.bindEffect)(te.document)(ne.window))();return ee.querySelector(h.wrap(ee.newtypeQuerySelector)("#browser"))($.toParentNode(e))()}();if(a instanceof g.Nothing)return G.log(R.monadEffectEffect)("Could not find element '#browser'")();if(a instanceof g.Just){var f=Y.read(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"chrs"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"chrBG1"}))(H.readforeignHexColor)(Y.readFieldsCons(new x.IsSymbol(function(){return"chrBG2"}))(H.readforeignHexColor)(Y.readFieldsCons(new x.IsSymbol(function(){return"chrLabels"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"fontSize"}))(Y.readInt)(Y.readFieldsNil)()()))(Y.readFieldsNil)()())()())()()))(Y.readFieldsCons(new x.IsSymbol(function(){return"coordinateSystem"}))(Y.readForeign)(Y.readFieldsCons(new x.IsSymbol(function(){return"initialChrs"}))(Y.readMaybe(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"left"}))(Y.readString)(Y.readFieldsCons(new x.IsSymbol(function(){return"right"}))(Y.readString)(Y.readFieldsNil)()())()())))(Y.readFieldsCons(new x.IsSymbol(function(){return"score"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"max"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"min"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"sig"}))(Y.readNumber)(Y.readFieldsNil)()())()())()()))(Y.readFieldsCons(new x.IsSymbol(function(){return"tracks"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"gwas"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"annotations"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"geneColor"}))(H.readforeignHexColor)(Y.readFieldsCons(new x.IsSymbol(function(){return"outline"}))(H.readforeignHexColor)(Y.readFieldsCons(new x.IsSymbol(function(){return"radius"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"snpColor"}))(H.readforeignHexColor)(Y.readFieldsCons(new x.IsSymbol(function(){return"urls"}))(Y.readObject(Y.readString))(Y.readFieldsNil)()())()())()())()())()()))(Y.readFieldsCons(new x.IsSymbol(function(){return"legend"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"fontSize"}))(Y.readInt)(Y.readFieldsCons(new x.IsSymbol(function(){return"hPad"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"vPad"}))(Y.readNumber)(Y.readFieldsNil)()())()())()()))(Y.readFieldsCons(new x.IsSymbol(function(){return"padding"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"bottom"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"left"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"right"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"top"}))(Y.readNumber)(Y.readFieldsNil)()())()())()())()()))(Y.readFieldsCons(new x.IsSymbol(function(){return"score"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"max"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"min"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"sig"}))(Y.readNumber)(Y.readFieldsNil)()())()())()()))(Y.readFieldsCons(new x.IsSymbol(function(){return"snps"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"color"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"fill"}))(H.readforeignHexColor)(Y.readFieldsCons(new x.IsSymbol(function(){return"outline"}))(H.readforeignHexColor)(Y.readFieldsNil)()())()()))(Y.readFieldsCons(new x.IsSymbol(function(){return"lineWidth"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"pixelOffset"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"x"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"y"}))(Y.readNumber)(Y.readFieldsNil)()())()()))(Y.readFieldsCons(new x.IsSymbol(function(){return"radius"}))(Y.readNumber)(Y.readFieldsNil)()())()())()())()()))(Y.readFieldsCons(new x.IsSymbol(function(){return"trackHeight"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"vscale"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"color"}))(H.readforeignHexColor)(Y.readFieldsCons(new x.IsSymbol(function(){return"fonts"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"labelSize"}))(Y.readInt)(Y.readFieldsCons(new x.IsSymbol(function(){return"scaleSize"}))(Y.readInt)(Y.readFieldsNil)()())()()))(Y.readFieldsCons(new x.IsSymbol(function(){return"hPad"}))(Y.readNumber)(Y.readFieldsCons(new x.IsSymbol(function(){return"numSteps"}))(Y.readInt)(Y.readFieldsNil)()())()())()())()()))(Y.readFieldsNil)()())()())()())()())()())()())()()))(Y.readFieldsNil)()()))(Y.readFieldsCons(new x.IsSymbol(function(){return"urls"}))(Y.readRecord()(Y.readFieldsCons(new x.IsSymbol(function(){return"annotations"}))(Y.readMaybe(Y.readString))(Y.readFieldsCons(new x.IsSymbol(function(){return"genes"}))(Y.readMaybe(Y.readString))(Y.readFieldsCons(new x.IsSymbol(function(){return"snps"}))(Y.readMaybe(Y.readString))(Y.readFieldsNil)()())()())()()))(Y.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=ce("p"),function(e){return o(z.renderForeignError(e))}))(f.value0))();if(f instanceof u.Right){var c=e.windowInnerSize(),l=O.makeContainers()(O.trackConfigCons(new x.IsSymbol(function(){return"gwas"}))(O.trackConfigNil(K.refl))()()()()(K.refl))(c.width)(f.value0.tracks)(),w=V.browserContainer(R.monadEffectEffect)(a.value0)();return function(){if(f.value0.urls.snps instanceof g.Just)return r.applySecond(k.applyEffect)(V.addTrack(R.monadEffectEffect)(w)("gwas")(l.gwas))(n.pure(k.applicativeEffect)(M.unit))();if(f.value0.urls.snps instanceof g.Nothing)return M.unit;throw new Error("Failed pattern match at Genetics.Browser.UI (line 600, column 11 - line 602, column 33): "+[f.value0.urls.snps.constructor.name])}(),G.log(R.monadEffectEffect)(f.value0)(),d.void(k.functorEffect)(ke(f.value0)(w))()}throw new Error("Failed pattern match at Genetics.Browser.UI (line 586, column 7 - line 610, column 33): "+[f.constructor.name])}throw new Error("Failed pattern match at Genetics.Browser.UI (line 582, column 3 - line 610, column 33): "+[a.constructor.name])}};module.exports={_render:Fe,_docResize:Ne,initializeTrack:xe,btnUI:ge,btnUIFixed:ve,keyUI:be,printSNPInfo:we,wrapWith:ce,snpHTML:le,peakHTML:me,annoPeakHTML:Ae,annotationHTML:Ce,annotationHTMLAll:Ee,annotationHTMLShort:he,IBoxShow:oe,IBoxHide:ae,IBoxSetY:ue,IBoxSetX:fe,IBoxSetContents:se,updateInfoBox:de,infoBoxId:pe,initInfoBox:Se,setHandlers:Me,mkGwas:qe,mkGene:je,runBrowser:ke,main:De,genericInfoBoxF:Ie,showInfoBoxF:ye,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","../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.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/base.html b/wqflask/wqflask/templates/base.html
index 2c1f67d4..42e57523 100644
--- a/wqflask/wqflask/templates/base.html
+++ b/wqflask/wqflask/templates/base.html
@@ -21,10 +21,10 @@
</head>
-<body style="width: 100% !important;">
+<body style="width: 100%">
<!-- Navbar ================================================== -->
- <div class="navbar navbar-inverse navbar-static-top pull-left" role="navigation" style="width: 100%; white-space: nowrap;">
+ <div class="navbar navbar-inverse navbar-static-top pull-left" role="navigation" style="width: 100%; min-width: 770px; white-space: nowrap;">
<!--<div class="navbar navbar-default" style="width: 100%; white-space: nowrap;">-->
<div class="container-fluid" style="width: 100%;">
<!-- Brand and toggle get grouped for better mobile display -->
@@ -41,13 +41,33 @@
<a href="/" style="font-weight: bold;">GeneNetwork</a>
</li>
<li class="">
- <a href="/intro">Intro</a>
+ <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Intro <span class="caret"></a>
+ <ul class="dropdown-menu">
+ <li><a href="/intro">Intro</a></li>
+ <li><a href="/submit_trait">Submit Trait</a></li>
+ <li><a href="http://genenetwork.org/webqtl/main.py?FormID=batSubmit">Batch Submission</a></li>
+ </ul>
</li>
<li class="">
- <a href="/">Search</a>
+ <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Help <span class="caret"></a>
+ <ul class="dropdown-menu">
+ <li><a href="/references">References</a></li>
+ <li><a href="http://genenetwork.org/glossary.html">Glossary of Term</a></li>
+ <li><a href="http://genenetwork.org/faq.html">FAQ</a></li>
+ <li><a href="/policies">Policies</a></li>
+ <li><a href="/links">Links</a></li>
+ <li><a href="/environments">Environments</a></li>
+ <li><a href="/news">GN1 News</a></li>
+ </ul>
</li>
<li class="">
- <a href="/submit_trait">Submit Trait</a>
+ <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Tools <span class="caret"></a>
+ <ul class="dropdown-menu">
+ <li><a href="/snp_browser">Variant Browser</a></li>
+ <li><a href="http://bnw.genenetwork.org/BNW/sourcecodes/home.php">Bayesian Network Webserver</a></li>
+ <li><a href="https://systems-genetics.org/">Systems Genetics PheWAS</a></li>
+ <li><a href="http://ucscbrowser.genenetwork.org/">Genome Browser</a></li>
+ </ul>
</li>
<li class="">
<a href="/collections/list">Collections
@@ -59,46 +79,32 @@
</a>
</li>
<li class="">
- <a href="/snp_browser">SNP Browser</a>
- </li>
- <li class="">
- <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Help <span class="caret"></a>
- <ul class="dropdown-menu">
- <li><a href="/news">News</a></li>
- <li><a href="/references">References</a></li>
- <li><a href="/policies">Policies</a></li>
- <li><a href="/links">Links</a></li>
- <li><a href="/environments">Environments</a></li>
- </ul>
- </li>
- <li class="">
{% if g.user_session.logged_in %}
<a id="login_out" title="Signed in as {{ g.user_session.user_name }}" href="/n/logout">Sign out</a>
{% else %}
<a id="login_in" href="/n/login">Sign in</a>
{% endif %}
</li>
+ <!--
<li style="margin-left: 20px;">
<a href="http://gn2-staging.genenetwork.org" style="font-weight: bold;" >Use Staging Branch</a>
</li>
- <li style="margin-left: 20px;">
- <a href="http://www.genenetwork.org" style="font-weight: bold;" >Use GeneNetwork 1</a>
- </li>
+ -->
</ul>
</div>
</div>
</div>
- <div class="container-fluid" style="position: relative; background-color: #d5d5d5; height: 95px;">
+ <div class="container-fluid" style="width: 100%; min-width: 650px; position: relative; background-color: #d5d5d5; height: 84px;">
<form method="get" action="/gsearch">
- <div class="row" style="position: absolute; bottom: 0; top: 30px;">
- <select class="form-control col-xs-2" style="width: 170px; margin-top: 15px; margin-left: 10px;" name="type">
+ <div class="row" style="width: 100%; position: absolute; bottom: 0; top: 30px;">
+ <select style="width: 150px; margin-top: 15px; margin-left: 20px;" name="type">
<option value="gene">Genes / Molecules</option>
<option value="phenotype" {% if type=="phenotype" %}selected{% endif %}>Phenotypes</option>
</select>
- <input class="btn btn-primary form-control col-xs-2" style="width: 100px; margin-top: 15px; margin-left: 10px;" type="submit" value="Search All">
- <input class="form-control col-xs-6" style="width: 600px; margin-top: 15px; margin-left: 10px;" type="text" name="terms" required>
+ <input class="btn btn-primary" style="width: 100px; margin-left: 10px;" type="submit" value="Search All">
+ <input style="width: 50%; margin-top: 15px; margin-left: 10px;" type="text" name="terms" required>
</div>
</form>
</div>
@@ -125,27 +131,35 @@
<a href="http://joss.theoj.org/papers/10.21105/joss.00025"><img src="https://camo.githubusercontent.com/846b750f582ae8f1d0b4f7e8fee78bed705c88ba/687474703a2f2f6a6f73732e7468656f6a2e6f72672f7061706572732f31302e32313130352f6a6f73732e30303032352f7374617475732e737667" alt="JOSS" data-canonical-src="http://joss.theoj.org/papers/10.21105/joss.00025/status.svg" style="max-width:100%;"></a>
</p>
<br />
- <p>GeneNetwork is supported by:</p>
- <UL>
- <LI>
- <a href="http://citg.uthsc.edu">
+ <p>GeneNetwork support from:</p>
+ <ul>
+ <li>
+ <a href="http://citg.uthsc.edu">
The UT Center for Integrative and Translational Genomics
- </A>
+ </a>
+ </li>
+ <li>
+ <a href="https://www.nigms.nih.gov/">NIGMS</a>
+ Systems Genetics and Precision Medicine Project (R01 GM123489, 2017-2021)
+ </li>
+ <li>
+ <a href="https://www.drugabuse.gov/">NIDA</a>
+ NIDA Core Center of Excellence in Transcriptomics, Systems Genetics, and the Addictome (P30 DA044223, 2017-2022)
+ </li>
+ <li>
+ <a href="http://www.nia.nih.gov/">NIA</a>
+ Translational Systems Genetics of Mitochondria, Metabolism, and Aging (R01AG043930, 2013-2018)
</li>
- <LI><a href="http://www.iniastress.org">NIAAA</A>
- Integrative Neuroscience Initiative on Alcoholism
- (U01 AA016662, U01 AA013499, U24 AA013513, U01 AA014425)
+ <li>
+ <a href="http://www.iniastress.org/">NIAAA</a>
+ Integrative Neuroscience Initiative on Alcoholism (U01 AA016662, U01 AA013499, U24 AA013513, U01 AA014425, 2006-2017)
</li>
- <LI>
- <a
- href="https://www.drugabuse.gov/">NIDA</A>, <a class="smallsize" href="http://www.nimh.nih.gov/">NIMH</A>
- , and <a class="smallsize" href="http://www.niaaa.nih.gov/">
- NIAAA</A> (P20-DA 21131)
+ <li>
+ <a href="http://www.drugabuse.gov/">NIDA</a>, <a href="http://www.nimh.nih.gov/">NIMH</a>, and <a href="http://www.niaaa.nih.gov/">NIAAA</a>
+ (P20-DA 21131, 2001-2012)
</li>
- <LI>NCI <a href="http://emice.nci.nih.gov/">MMHCC</A> (U01CA105417) and
- <a href="https://en.wikipedia.org/wiki/National_Center_for_Research_Resources">NCRR</a>
- <a href="https://en.wikipedia.org/wiki/Biomedical_Informatics_Research_Network">BIRN</a>
- (U24 RR021760)
+ <li>
+ NCI <a href="http://emice.nci.nih.gov/">MMHCC</a> (U01CA105417), NCRR, <a href="http://www.birncommunity.org/">BIRN</a>, (U24 RR021760)
</li>
</UL>
<!--</p>-->
diff --git a/wqflask/wqflask/templates/collections/list.html b/wqflask/wqflask/templates/collections/list.html
index 5372fa46..e6e09449 100644
--- a/wqflask/wqflask/templates/collections/list.html
+++ b/wqflask/wqflask/templates/collections/list.html
@@ -92,8 +92,6 @@
<script language="javascript" type="text/javascript" src="https://cdn.datatables.net/buttons/1.0.0/js/buttons.bootstrap.min.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/js_external/jszip.min.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/new/packages/DataTables/extensions/dataTables.colResize.js"></script>
- <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/extensions/dataTables.colReorder.js"></script>
<script>
$('#trait_table').dataTable( {
"drawCallback": function( settings ) {
@@ -116,12 +114,11 @@
"orderable": false
} ],
"order": [[1, "asc" ]],
- "sDom": "RZtr",
+ "sDom": "Ztr",
"iDisplayLength": -1,
- "autoWidth": true,
+ "autoWidth": false,
"bDeferRender": true,
"bSortClasses": false,
- "scrollY": "600px",
"scrollCollapse": true,
"paging": false,
"orderClasses": true
diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html
index 8d22b2a8..a23f3f70 100644
--- a/wqflask/wqflask/templates/collections/view.html
+++ b/wqflask/wqflask/templates/collections/view.html
@@ -8,7 +8,7 @@
{% block content %}
<!-- Start of body -->
- <div class="container">
+ <div class="container" style="min-width: 1250px;">
{% if uc %}
<h1>{{ uc.name }}</h1>
{% else %}
@@ -84,8 +84,8 @@
<button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button>
<button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect All</button>
<button class="btn btn-default" id="invert"><span class="glyphicon glyphicon-resize-vertical"></span> Invert</button>
- <button class="btn btn-danger" id="remove" disabled="disabled"><i class="icon-minus-sign"></i> Delete From Collection</button>
- <button class="btn" id="add" disabled="disabled"><i class="icon-plus-sign"></i> Copy Record to Other Collection</button>
+ <button class="btn btn-danger" id="remove" disabled="disabled"><i class="icon-minus-sign"></i> Delete Rows</button>
+ <button class="btn" id="add" disabled="disabled"><i class="icon-plus-sign"></i> Copy to Other Collection</button>
<br />
<br />
<form id="export_form" method="POST" action="/export_traits_csv">
@@ -182,6 +182,7 @@
{ "type": "natural", "width": 50 },
{ "type": "natural" },
{ "type": "natural", "width": 120 },
+ { "type": "natural", "width": 120 },
{ "type": "natural" },
{ "type": "natural", "width": 130 },
{ "type": "natural", "width": 35 },
diff --git a/wqflask/wqflask/templates/correlation_matrix.html b/wqflask/wqflask/templates/correlation_matrix.html
index bcdc499f..34a15c6a 100644
--- a/wqflask/wqflask/templates/correlation_matrix.html
+++ b/wqflask/wqflask/templates/correlation_matrix.html
@@ -2,52 +2,56 @@
{% block css %}
<link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/css/jquery.dataTables.css" />
<link rel="stylesheet" type="text/css" href="/static/new/css/corr_matrix.css" />
+ <link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" />
<link rel="stylesheet" type="text/css" href="/static/new/css/panelutil.css" />
<link rel="stylesheet" type="text/css" href="/static/new/css/d3-tip.min.css" />
{% endblock %}
{% block content %}
-<div class="container">
+<div class="container" width="100%">
<h1>Correlation Matrix</h1>
+<div style="width: 100%; max-width: 850px;">Lower left cells list Pearson product-moment correlations; upper right cells list Spearman rank order correlations. Each cell also contains the n of cases. Values ranging from 0.4 to 1.0 range from orange to white, while values ranging from -0.4 to -1.0 range from dark blue to white. Select any cell to generate a scatter plot. Select trait labels for more information.</div>
<hr style="height: 1px; background-color: #A9A9A9;">
{% if lowest_overlap < 8 %}
-<div style="margin: 20px;" >Caution: This matrix of correlations contains some cells with small sample sizes of fewer than 8.</div>
+<div style="margin-bottom: 10px;"><i><font style="color: red;">Caution</font>: This matrix of correlations contains some cells with small sample sizes of fewer than 8.</i></div>
{% endif %}
-<table class="matrix" border="1" cellpadding="5" cellspacing="1" width="80%">
+<table class="matrix" border="1" cellpadding="5" cellspacing="1" width="100%">
<tbody>
<tr>
- <td style="background-color: royalblue;" ></td>
- <td align="center" colspan="{{traits|length + 1 }}" style="font-weight: Bold; border: 1px solid #999999; padding: 3px; color: #fff; background-color: royalblue;">Spearman Rank Correlation (rho)</td>
+ <td style="background-color: #369;" ></td>
+ <td align="center" colspan="{{traits|length + 2 }}" style="font-weight: Bold; border: 1px solid #000000; padding: 3px; color: #fff; background-color: #369;">Spearman Rank Correlation (rho)</td>
</tr>
<tr>
- <td align="center" rowspan="{{traits|length + 1 }}" width="10" style="font-weight: Bold; border: 1px solid #999999; padding: 3px; color: #fff; background-color: royalblue;">P e a r s o n &nbsp;&nbsp;&nbsp; r</td>
- <td width="300"></td>
+ <td align="center" rowspan="{{traits|length + 2 }}" width="10" style="font-weight: Bold; border: 1px solid #000000; padding: 3px; color: #fff; background-color: #369;">P e a r s o n &nbsp;&nbsp;&nbsp; r</td>
+ <td></td>
+ <td width="300" align="center" style="white-space: nowrap"><div style="display: inline-block; margin: 4px;"><button class="btn btn-default" id="short_labels" style="display: inline-block"><span style="display: none;" class="short_check glyphicon glyphicon-ok"></span>&nbsp;Short Labels</button>&nbsp;&nbsp;<button class="btn btn-default" id="long_labels" style="display: inline-block;"><span style="display: none;" class="long_check glyphicon glyphicon-ok"></span>&nbsp;Long Labels</button></div></td>
{% for trait in traits %}
- <td align="center">
- <a href="/show_trait?trait_id={{ trait.name }}&dataset={{ trait.dataset.name }}" style="font-weight: Bold;">Trait{{ loop.index }}</a>
+ <td align="center" style="padding: 5px;">
+ <a href="/show_trait?trait_id={{ trait.name }}&dataset={{ trait.dataset.name }}"><font style="font-size: 14px;"><b>{{ loop.index }}</b></font></a>
</td>
{% endfor %}
</tr>
{% for trait in traits %}
<tr>
- <td>
- <a href="/show_trait?trait_id={{ trait.name }}&dataset={{ trait.dataset.name }}" style="font-weight: Bold;">Trait {{ loop.index }}: {{ trait.dataset.name }}::{{ trait.name }}</a>
- <div class="shortName" style="display:none">{% if trait.dataset.type == "ProbeSet" %}Symbol: {{ trait.symbol }}{% elif trait.dataset.type == "Publish" %}Phenotype: {{ trait.post_publication_abbreviation }}{% else %}Genotype{% endif %} </div>
+ <td align="center"><input type="checkbox" class="checkbox" style="margin-left: 3px; margin-right: 1px;"></td>
+ <td align="right" style="padding-right: 4px;" >
+ <a href="/show_trait?trait_id={{ trait.name }}&dataset={{ trait.dataset.name }}"><font style="font-size: 14px; font-style: Bold;"><b>Trait {{ loop.index }}: {{ trait.dataset.name }}&nbsp;&nbsp;{{ trait.name }}</b></font></a>
+ <div class="shortName" style="display:none">{% if trait.dataset.type == "ProbeSet" %}Gene Symbol: {{ trait.symbol }}{% elif trait.dataset.type == "Publish" %}Trait Symbol: {{ trait.post_publication_abbreviation }}{% elif trait.dataset.type == "Geno" %}Genotype{% endif %} </div>
<div class="verboseName" style="display: none;">
{% if trait.dataset.type == "ProbeSet" %}
<div>{{ trait.symbol }} on Chr {{ trait.chr }} @ {{ trait.mb }} Mb</div><div>{{ trait.description }}</div><div>{{ trait.probe_target_description }}</div>
{% elif trait.dataset.type == "Publish" %}
- <div>PubMed {{ trait.pubmed_id }}: RecordID/{{ trait.name }}</div><div>Phenotype: {{ trait.description_display }}</div>
- {% else %}
+ <div>PMID: <a href="http://www.ncbi.nlm.nih.gov/pubmed/?term={{ trait.pubmed_id }}">{{ trait.pubmed_id }}</a>, Record ID {{ trait.name }}</div><div>Phenotype: {{ trait.description_display }}</div>
+ {% elif trait.dataset.type == "Geno" %}
<div>Locus {{ trait.name }}</div><div>Chr {{ trait.chr }} @ {{ trait.mb }} Mb</div>
{% endif %}
</div>
</td>
{% for result in corr_results[loop.index-1] %}
{% if result[0].name == trait.name %}
- <td nowrap="ON" align="center" bgcolor="#cccccc" style="line-height: 1.1;"><a href="/show_trait?trait_id={{ trait.name }}&dataset={{ trait.dataset.name }}"><font style="font-size: 12px; color: #000000;" ><em>n</em><br>{{ result[2] }}</font></a></td>
+ <td nowrap="ON" align="center" bgcolor="#cccccc" style="padding: 3px; line-height: 1.1;"><a href="/show_trait?trait_id={{ trait.name }}&dataset={{ trait.dataset.name }}"><font style="font-size: 12px; color: #3071a9; font-weight: bold;" ><em>n</em><br>{{ result[2] }}</font></a></td>
{% else %}
- <td nowrap="ON" align="middle" class="corr_cell" style="line-height: 1.1;"><a href="/corr_scatter_plot?dataset_1={{ trait.dataset.name }}&dataset_2={{ result[0].dataset.name }}&trait_1={{ trait.name }}&trait_2={{ result[0].name }}"><font style="font-size: 12px; color: #000000;" ><span class="corr_value">{{ '%0.3f' % result[1] }}</span><br>{{ result[2] }}</font></a></td>
+ <td nowrap="ON" align="middle" class="corr_cell" style="padding: 3px; line-height: 1.1;"><a href="/corr_scatter_plot?dataset_1={{ trait.dataset.name }}&dataset_2={{ result[0].dataset.name }}&trait_1={{ trait.name }}&trait_2={{ result[0].name }}"><font style="font-size: 12px; color: #3071a9; font-weight: bold;" ><span class="corr_value">{{ '%0.2f' % result[1] }}</span><br>{{ result[2] }}</font></a></td>
{% endif %}
{% endfor %}
</tr>
@@ -55,28 +59,40 @@
</tbody>
</table>
<br>
-<button class="btn btn-default" id="short_labels">Short Labels</button>
-<button class="btn btn-default" id="long_labels">Long Labels</button>
{% if pca_works == "True" %}
-<br>
-<br>
<h2>PCA Traits</h2>
-<ul>
+<div style="margin-bottom: 20px; overflow:hidden;">
+<table id="pca_table" class="table-hover table-striped cell-border" id='trait_table' style="float: left;">
+ <thead>
+ <tr>
+ <th></th>
+ <th>Index</th>
+ <th>PCA Trait</th>
+ </tr>
+ </tr>
+ </thead>
+ <tbody>
{% for this_trait_id in pca_trait_ids %}
- <li>{{ loop.index }}. <input type="checkbox" class="trait_checkbox" name="pca_trait" value="{{ data_hmac('{}:{}'.format(pca_trait_ids[loop.index - 1], "Temp")) }}">&nbsp;&nbsp;<a href="{{ url_for('show_trait_page', trait_id = pca_trait_ids[loop.index - 1], dataset = "Temp") }}">{{ pca_trait_ids[loop.index - 1] }}</a></li>
+ <tr>
+ <td align="center" style="padding: 0px;"><input type="checkbox" class="trait_checkbox" name="pca_trait" value="{{ data_hmac('{}:{}'.format(pca_trait_ids[loop.index - 1], "Temp")) }}"></td>
+ <td align="right">{{ loop.index }}</td>
+ <td><a href="{{ url_for('show_trait_page', trait_id = pca_trait_ids[loop.index - 1], dataset = "Temp") }}">{{ pca_trait_ids[loop.index - 1] }}</a></td>
+ </tr>
{% endfor %}
-</ul>
+ </tbody>
+</table>
+<br>
<button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button>
<button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect All</button>
<button class="btn btn-default" id="add" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button>
-<br>
+</div>
<h2>Factor Loadings Plot</h2>
<div id="loadings_plot" style="margin-top: 20px; margin-bottom: 20px; width: 980px; border-style: solid; border-width: 1px;"></div>
<h2>Factor Loadings Table</h2>
-<table class="table table-hover table-striped" border="1" style="margin-top: 20px; margin-bottom: 20px;" width="30%">
+<table id="loadings_table" class="table-hover table-striped cell-border" id='trait_table' style="float: left;">
<thead>
<tr>
- <th></th>
+ <th>Trait</th>
<th style="text-align: right;" >Factor 1</th>
<th style="text-align: right;" >Factor 2</th>
{% if trait_list|length > 2 %}<th style="text-align: right;">Factor 3</th>{% endif %}
@@ -87,7 +103,7 @@
{% set row_counter = loop.index-1 %}
<tr>
<td>
- <a href="{{ url_for('show_trait_page', trait_id = traits[loop.index-1].name, dataset = traits[loop.index-1].dataset.name) }}">
+ <a title="{% if traits[loop.index-1].dataset.type == "ProbeSet" %}{{ traits[loop.index-1].symbol }}{% elif traits[loop.index-1].dataset.type == "Publish" %}{{ traits[loop.index-1].post_publication_abbreviation }}{% endif %}" href="{{ url_for('show_trait_page', trait_id = traits[loop.index-1].name, dataset = traits[loop.index-1].dataset.name) }}">
{{ traits[loop.index-1].name }}
</a>
</td>
@@ -119,5 +135,39 @@
<script language="javascript" type="text/javascript" src="/static/new/js_external/chroma.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/javascript/loadings_plot.js"></script>
<script type="text/javascript" src="/static/new/javascript/create_corr_matrix.js"></script>
+ <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.dataTables.min.js"></script>
+ <script type="text/javascript" src="/static/new/javascript/search_results.js"></script>
+
+ <script>
+ $('#pca_table').dataTable( {
+ "columnDefs": [ {
+ "targets": 0,
+ "orderable": false
+ } ],
+ "order": [[1, "asc" ]],
+ "sDom": "t",
+ "iDisplayLength": -1,
+ "autoWidth": true,
+ "bDeferRender": true,
+ "bSortClasses": false,
+ "paging": false,
+ "orderClasses": true
+ } );
+
+ $('#loadings_table').dataTable( {
+ "columnDefs": [ {
+ "targets": 0,
+ "orderable": false
+ } ],
+ "order": [[1, "asc" ]],
+ "sDom": "t",
+ "iDisplayLength": -1,
+ "autoWidth": true,
+ "bDeferRender": true,
+ "bSortClasses": false,
+ "paging": false,
+ "orderClasses": true
+ } );
+ </script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html
index 7cc998bb..8b94784f 100644
--- a/wqflask/wqflask/templates/correlation_page.html
+++ b/wqflask/wqflask/templates/correlation_page.html
@@ -2,9 +2,10 @@
{% block css %}
<link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/css/jquery.dataTables.css" />
<link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/extensions/buttons.bootstrap.css" />
+ <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/extensions/buttons.dataTables.css">
{% endblock %}
{% block content %}
- <div class="container">
+ <div class="container" style="min-width: 1250px;">
<div class="page-header">
<h1>Correlation Table</h1>
<h2>Trait: {{ this_trait.name }}
@@ -12,8 +13,8 @@
<hr style="height: 1px; background-color: #A9A9A9;">
</div>
- <p>Values of record {{ this_trait.name }} in the <a href="http://genenetwork.org/webqtl/main.py?FormID=sharinginfo&GN_AccessionId={{ dataset.group.accession_id }}">{{ dataset.fullname }}</a>
- dataset were compared to all records in the <a href="http://genenetwork.org/webqtl/main.py?FormID=sharinginfo&GN_AccessionId={{ target_dataset.group.accession_id }}">{{ target_dataset.fullname }}</a>
+ <p>Values of record {{ this_trait.name }} in the <a href="http://genenetwork.org/webqtl/main.py?FormID=sharinginfo&{% if dataset.accession_id != 'None' %}GN_AccessionId={{ dataset.accession_id }}{% else %}InfoPageName={{ dataset.name }}{% endif %}">{{ dataset.fullname }}</a>
+ dataset were compared to all records in the <a href="http://genenetwork.org/webqtl/main.py?FormID=sharinginfo&{% if target_dataset.accession_id != 'None' %}GN_AccessionId={{ target_dataset.accession_id }}{% else %}InfoPageName={{ target_dataset.name }}{% endif %}">{{ target_dataset.fullname }}</a>
dataset. The top {{ return_number }} correlations ranked by the {{ formatted_corr_type }} are displayed.
You can resort this list by clicking the headers. Select the Record ID to open the trait data
and analysis page.
@@ -70,82 +71,50 @@
</button>
</form>
</div>
- <div>
- <br />
- <button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button>
- <button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect All</button>
- <button class="btn btn-default" id="invert"><span class="glyphicon glyphicon-resize-vertical"></span> Invert</button>
- <button class="btn btn-default" id="add" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button>
- <button id="redraw" class="btn btn-default">Reset Columns</button>
- <input type="text" id="searchbox" class="form-control" style="width: 200px; display: inline;" placeholder="Search This Table For ...">
- <input type="text" id="select_top" class="form-control" style="width: 200px; display: inline;" placeholder="Select Top ...">
- <br />
<br />
+ <div>
+ <button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button>
+ <button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect All</button>
+ <button class="btn btn-default" id="invert"><span class="glyphicon glyphicon-resize-vertical"></span> Invert</button>
+ <button class="btn btn-default" id="add" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button>
+ <button id="redraw" class="btn btn-default">Reset Columns</button>
+ <input type="text" id="searchbox" class="form-control" style="width: 200px; display: inline;" placeholder="Search This Table For ...">
+ <input type="text" id="select_top" class="form-control" style="width: 200px; display: inline;" placeholder="Select Top ...">
+ <br />
+ <br />
+ <button id="more_options" class="btn btn-primary">More Options...</button>
+ <br />
+ <br />
+ <div id="filter_options" style="display: none;">
+ <span style="border: 1px dashed #999999; padding: 8px; background-color: #ddf; font-size: 12px;">
+ <button id="select_traits" class="btn btn-primary" style="font-size: 12px; padding: 2px 3px;">Select Traits</button> with r >
+ <input type="text" name="r_greater_select" value="-1.0" size="6" maxlength="10">
+ <select id="r_and_or" size="1">
+ <option value="and" selected>AND</option>
+ <option value="or">OR</option>
+ </select>
+ r <
+ <input type="text" name="r_less_select" value="1.0" size="6" maxlength="10">, with mean >
+ <input type="text" name="mean_greater_select" value="0" size="6" maxlength="10">
+ <select id="mean_and_or" size="1">
+ <option value="and" selected>AND</option>
+ <option value="or">OR</option>
+ </select>
+ mean <
+ <input type="text" name="mean_less_select" value="100" size="6" maxlength="10">
+ </span>
+ <br />
+ <br />
+ </div>
</div>
-
<div style="width: {% if target_dataset.type == "ProbeSet" %}1600px{% elif target_dataset.type == "Publish" %}1400px{% else %}800px{% endif %};">
<table id="trait_table" class="display dataTable nowrap" style="font-size: 12px; float: left;">
<thead>
<tr>
<th></th>
- {% for header in target_dataset.header_fields %}
- {% if header == 'Year' %}
- <th>{{header}}</th>
- {% elif header == 'Max LRS' %}
- <th>Max LRS</th>
- {% elif header == 'Max LRS Location' %}
- <th>{{header}}</th>
- {% elif header == 'Location' %}
- <th>{{header}}</th>
- {% elif header == 'Mean' %}
- <th>{{header}}</th>
- {% elif header == 'Additive Effect' %}
- <th>Additive Effect</th>
- {% elif header == 'Index' %}
+ {% for header in header_fields %}
<th>{{header}}</th>
- {% elif header == 'N' %}
- <th>{{header}}</th>
- {% else %}
- <th>{{header}}</th>
- {% endif %}
{% endfor %}
- {% if target_dataset.type == "ProbeSet" %}
- {% if corr_method == 'pearson' %}
- <th>Sample r</th>
- <th>N</th>
- <th>Sample p(r)</th>
- <th>Lit r</th>
- <th>Tissue r</th>
- <th>Tissue p(r)</th>
- {% else %}
- <th>Sample rho</th>
- <th>N</th>
- <th>Sample p(rho)</th>
- <th>Lit r</th>
- <th>Tissue rho</th>
- <th>Tissue p(rho)</th>
- {% endif %}
- {% elif target_dataset.type == "Publish" %}
- {% if corr_method == 'pearson' %}
- <th>Sample r</th>
- <th>&nbsp;&nbsp;N</th>
- <th>Sample p(r)</th>
- {% else %}
- <th>Sample rho</th>
- <th>&nbsp;&nbsp;N</th>
- <th>Sample p(rho)</th>
- {% endif %}
- {% elif target_dataset.type == "Geno" %}
- {% if corr_method == 'pearson' %}
- <th>Sample r</th>
- <th>N</th>
- <th>Sample p(r)</th>
- {% else %}
- <th>Sample rho</th>
- <th>N</th>
- <th>Sample p(rho)</th>
- {% endif %}
- {% endif %}
</tr>
</thead>
@@ -167,9 +136,6 @@
<td>{{ trait.description_display }}</TD>
<td style="white-space: nowrap;">{{ trait.location_repr }}</td>
<td align="right">{{ '%0.3f' % trait.mean|float }}</td>
- <td align="right">{% if trait.LRS_score_repr != "N/A" %}{{ '%0.1f' % trait.LRS_score_repr|float }}{% else %}N/A{% endif %}</td>
- <td align="right">{{ trait.LRS_location_repr }}</td>
- <td align="right">{% if trait.additive != "" %}{{ '%0.3f' % trait.additive|float }}{% else %}N/A{% endif %}</td>
<td align="right"><a target="_blank" href="corr_scatter_plot?dataset_1={{dataset.name}}&dataset_2={{trait.dataset.name}}&trait_1={{this_trait.name}}&trait_2={{trait.name}}">{{'%0.3f'|format(trait.sample_r)}}</a></td>
<td align="right">{{ trait.num_overlap }}</td>
<td align="right">{{'%0.3e'|format(trait.sample_p)}}</td>
@@ -185,6 +151,9 @@
<td align="right">{{'%0.3f'|format(trait.tissue_corr)}}</td>
<td align="right">{{'%0.3e'|format(trait.tissue_pvalue)}}</td>
{% endif %}
+ <td align="right">{% if trait.LRS_score_repr != "N/A" %}{{ '%0.1f' % trait.LRS_score_repr|float }}{% else %}N/A{% endif %}</td>
+ <td align="right">{{ trait.LRS_location_repr }}</td>
+ <td align="right">{% if trait.additive != "" %}{{ '%0.3f' % trait.additive|float }}{% else %}N/A{% endif %}</td>
{% elif target_dataset.type == "Publish" %}
<td>{{ trait.description_display }}</td>
<td>{{ trait.authors }}</td>
@@ -193,12 +162,12 @@
{{ trait.pubmed_text }}
</a>
</td>
- <td align="right">{{ trait.LRS_score_repr }}</td>
- <td align="right">{{ trait.LRS_location_repr }}</td>
- <td align="right">{% if trait.additive != "" %}{{ '%0.3f' % trait.additive|float }}{% else %}N/A{% endif %}</td>
<td align="right"><a target="_blank" href="corr_scatter_plot?dataset_1={{dataset.name}}&dataset_2={{trait.dataset.name}}&trait_1={{this_trait.name}}&trait_2={{trait.name}}">{{'%0.3f'|format(trait.sample_r)}}</a></td>
<td align="right">{{ trait.num_overlap }}</td>
<td align="right">{{'%0.3e'|format(trait.sample_p)}}</td>
+ <td align="right">{{ trait.LRS_score_repr }}</td>
+ <td align="right">{{ trait.LRS_location_repr }}</td>
+ <td align="right">{% if trait.additive != "" %}{{ '%0.3f' % trait.additive|float }}{% else %}N/A{% endif %}</td>
{% elif target_dataset.type == "Geno" %}
<td align="right">{{ trait.location_repr }}</TD>
<td align="right"><a target="_blank" href="corr_scatter_plot?dataset_1={{dataset.name}}&dataset_2={{trait.dataset.name}}&trait_1={{this_trait.name}}&trait_2={{trait.name}}">{{'%0.3f'|format(trait.sample_r)}}</a></td>
@@ -220,10 +189,9 @@
<script language="javascript" type="text/javascript" src="/static/new/js_external/jszip.min.js"></script>
<script language="javascript" type="text/javascript" src="/static/packages/underscore/underscore-min.js"></script>
- <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.dataTables.js"></script>
- <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="https://cdn.datatables.net/buttons/1.0.0/js/buttons.html5.min.js"></script>
- <script language="javascript" type="text/javascript" src="https://cdn.datatables.net/buttons/1.0.0/js/buttons.bootstrap.min.js"></script>
+ <script language="javascript" type="text/javascript" src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
+ <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/extensions/dataTables.buttons.min.js"></script>
+ <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/extensions/buttons.colVis.min.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/dataTables.naturalSort.js"></script>
<script type="text/javascript" charset="utf-8">
@@ -262,6 +230,47 @@
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
};
+ //$.fn.dataTableExt.afnFiltering.push(
+
+ $.fn.dataTable.ext.search.push( function( settings, data, dataIndex ) {
+ var r_column = {{ filter_cols[0] }};
+ var r_greater = parseFloat($('input[name=r_greater_select]').val())
+ var r_less = parseFloat($('input[name=r_less_select]').val());
+ var r_and_or = $('#r_and_or').val();
+
+ var mean_column = {{ filter_cols[1] }};
+ var mean_greater = parseFloat($('input[name=mean_greater_select]').val());
+ var mean_less = parseFloat($('input[name=mean_less_select]').val());
+ var mean_and_or = $('#mean_and_or').val();
+
+ if (r_and_or == "and" && mean_and_or == "and"){
+ if ( (data[r_column] >= r_greater && data[r_column] <= r_less) && {% if filter_cols[1] != 0 %}(data[mean_column] > mean_greater && data[mean_column] < mean_less){% else %} true{% endif %} ){
+ return true
+ }
+ else {
+ return false
+ }
+ } else if (r_and_or == "and" && mean_and_or == "or"){
+ if ( (data[r_column] >= r_greater && data[r_column] <= r_less) && {% if filter_cols[1] != 0 %}(data[mean_column] >= mean_greater || data[mean_column] <= mean_less){% else %} true{% endif %} ){
+ return true
+ } else {
+ return false
+ }
+ } else if (r_and_or == "or" && mean_and_or == "and") {
+ if ( (data[r_column] >= r_greater || data[r_column] <= r_less) && {% if filter_cols[1] != 0 %}(data[mean_column] >= mean_greater && data[mean_column] <= mean_less){% else %} true{% endif %} ){
+ return true
+ } else {
+ return false
+ }
+ } else {
+ if ( (data[r_column] >= r_greater || data[r_column] <= r_less) && {% if filter_cols[1] != 0 %}(data[mean_column] >= mean_greater || data[mean_column] <= mean_less){% else %} true{% endif %} ){
+ return true
+ } else {
+ return false
+ }
+ }
+ return true
+ });
$(document).ready( function () {
@@ -301,7 +310,7 @@
console.time("Creating table");
{% if target_dataset.type == "ProbeSet" %}
- $('#trait_table').dataTable( {
+ table_conf = {
"drawCallback": function( settings ) {
$('#trait_table tr').click(function(event) {
if (event.target.type !== 'checkbox') {
@@ -310,15 +319,17 @@
});
$('.trait_checkbox:checkbox').on("change", change_buttons);
},
- "buttons": [
+ buttons: [
{
- extend: 'csvHtml5',
- text: 'Download CSV',
- title: 'correlation_results',
- fieldBoundary: '"',
- exportOptions: {
- columns: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
- }
+ extend: 'columnsToggle',
+ columns: function( idx, data, node ) {
+ if (idx != 0) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+ postfixButtons: [ 'colvisRestore' ]
}
],
"columnDefs": [ {
@@ -333,15 +344,15 @@
{ "type": "natural", "width": "15%" },
{ "type": "natural" },
{ "type": "natural" },
- { "type": "natural" },
- { "type": "natural" },
- { "type": "natural" },
{ "orderDataType": "dom-innertext", 'orderSequence': [ "desc", "asc"] },
{ "type": "natural" },
{ "type": "scientific" },
{ "type": "numeric-html", 'orderSequence': [ "desc", "asc"] },
{ "type": "numeric-html", 'orderSequence': [ "desc", "asc"] },
- { "type": "scientific" }
+ { "type": "scientific" },
+ { "type": "natural" },
+ { "type": "natural" },
+ { "type": "natural" }
],
"createdRow": function ( row, data, index ) {
$('td', row).eq(4).attr('title', $('td', row).eq(4).text());
@@ -350,33 +361,30 @@
$('td', row).eq(4).text($('td', row).eq(4).text() + '...')
}
},
- "order": [[12, "asc" ]],
- "sDom": "BRZtir",
+ "order": [[9, "asc" ]],
+ "sDom": "Btir",
"iDisplayLength": -1,
"autoWidth": false,
"deferRender": true,
"bSortClasses": false,
- "scrollY": "800px",
- "scrollCollapse": false,
- "scroller": true,
"paging": false,
"orderClasses": true
- } );
-
- var table = $('#trait_table').DataTable();
+ }
{% elif target_dataset.type == "Publish" %}
- $('#trait_table').dataTable( {
+ table_conf = {
"paging": false,
- "buttons": [
+ buttons: [
{
- extend: 'csvHtml5',
- text: 'Download CSV',
- title: 'correlation_results',
- fieldBoundary: '"',
- exportOptions: {
- columns: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
- }
+ extend: 'columnsToggle',
+ columns: function( idx, data, node ) {
+ if (idx != 0) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+ postfixButtons: [ 'colvisRestore' ]
}
],
"columnDefs": [
@@ -390,11 +398,11 @@
{ "type": "natural", "width": "12%" },
{ "type": "natural" },
{ "type": "natural" },
- { "type": "natural" },
- { "type": "natural" },
{ "orderDataType": "dom-innertext", 'orderSequence': [ "desc", "asc"] },
+ { "type": "scientific" },
{ "type": "natural" },
- { "type": "scientific" }
+ { "type": "natural" },
+ { "type": "natural" }
],
"createdRow": function ( row, data, index ) {
$('td', row).eq(3).attr('title', $('td', row).eq(3).text());
@@ -408,25 +416,25 @@
$('td', row).eq(4).text($('td', row).eq(4).text() + '...')
}
},
- "order": [[11, "asc" ]],
+ "order": [[8, "asc" ]],
"sDom": "Btir",
"autoWidth": false,
- "bDeferRender": true,
- "scrollY": "800px",
- "scrollCollapse": false
- } );
+ "bDeferRender": true
+ }
{% elif target_dataset.type == "Geno" %}
- $('#trait_table').dataTable( {
+ table_conf = {
"paging": false,
- "buttons": [
+ buttons: [
{
- extend: 'csvHtml5',
- text: 'Download CSV',
- title: 'correlation_results',
- fieldBoundary: '"',
- exportOptions: {
- columns: [1, 2, 3, 4, 5, 6]
- }
+ extend: 'columnsToggle',
+ columns: function( idx, data, node ) {
+ if (idx != 0) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+ postfixButtons: [ 'colvisRestore' ]
}
],
"columnDefs": [
@@ -447,8 +455,11 @@
"bDeferRender": true,
"scrollY": "800px",
"scrollCollapse": false
- } );
+ }
{% endif %}
+
+ var the_table = $('#trait_table').DataTable(table_conf);
+
console.timeEnd("Creating table");
submit_special = function(url) {
@@ -460,6 +471,15 @@
url = $(this).data("url")
return submit_special(url)
});
+
+ $("#more_options").click(function() {
+ $("div#filter_options").toggle();
+ });
+
+ $("#select_traits").click(function() {
+ console.log("redrawing")
+ the_table.draw();
+ });
});
</script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/docs.html b/wqflask/wqflask/templates/docs.html
index c485f757..1a241ce7 100644
--- a/wqflask/wqflask/templates/docs.html
+++ b/wqflask/wqflask/templates/docs.html
@@ -6,9 +6,9 @@
<div class="container">
<h3>{{title}}</h3>
<div style="text-align: right;">
- <a href="docedit?entry={{entry}}">
+ <!--<a href="docedit?entry={{entry}}">-->
<img style="width: 16px;" src="/static/new/images/edit.gif">
- </a>
+ <!--</a>-->
</div>
{{content|safe}}
</div>
diff --git a/wqflask/wqflask/templates/gsearch_gene.html b/wqflask/wqflask/templates/gsearch_gene.html
index 4672f161..1a4ff752 100644
--- a/wqflask/wqflask/templates/gsearch_gene.html
+++ b/wqflask/wqflask/templates/gsearch_gene.html
@@ -9,7 +9,8 @@
<div class="container" style="width: 2000px;">
- <p>You searched for {{ terms }}.</p>
+ <h3>GN searched 754 datasets and 39,765,944 traits across 10 species, and found {{ trait_count }} results that match your query.
+ You can filter these results by adding key words in the fields below and you can also sort results on most columns.</h3>
<p>To study a record, click on its Record ID below.<br />Check records below and click Add button to add to selection.</p>
<div>
@@ -20,14 +21,13 @@
<button class="btn btn-default" id="add" disabled ><span class="glyphicon glyphicon-plus-sign"></span> Add</button>
<input type="text" id="searchbox" class="form-control" style="width: 180px; display: inline;" placeholder="Search This Table For ...">
<input type="text" id="select_top" class="form-control" style="width: 120px; display: inline;" placeholder="Select Top ...">
- <br />
- <br />
- <form id="export_form" method="POST" action="/export_traits_csv">
+ <form id="export_form" method="POST" action="/export_traits_csv" style="display: inline;">
<input type="hidden" name="database_name" id="database_name" value="None">
<input type="hidden" name="export_data" id="export_data" value="">
- <button class="btn btn-default" id="export_traits">Download CSV</button>
+ <button class="btn btn-default" id="export_traits">Download</button>
</form>
<br />
+ <br />
<div style="width: 100%;">
<table id="trait_table" class="table-hover table-striped cell-border" style="float: left;">
<tbody>
@@ -78,8 +78,43 @@
}
});
+ function change_buttons() {
+ buttons = ["#add", "#remove"];
+ num_checked = $('.trait_checkbox:checked').length;
+ if (num_checked === 0) {
+ for (_i = 0, _len = buttons.length; _i < _len; _i++) {
+ button = buttons[_i];
+ $(button).prop("disabled", true);
+ }
+ } else {
+ for (_j = 0, _len2 = buttons.length; _j < _len2; _j++) {
+ button = buttons[_j];
+ $(button).prop("disabled", false);
+ }
+ }
+ //});
+ if ($(this).is(":checked")) {
+ if (!$(this).closest('tr').hasClass('selected')) {
+ $(this).closest('tr').addClass('selected')
+ }
+ }
+ else {
+ if ($(this).closest('tr').hasClass('selected')) {
+ $(this).closest('tr').removeClass('selected')
+ }
+ }
+ }
+
console.time("Creating table");
$('#trait_table').DataTable( {
+ 'drawCallback': function( settings ) {
+ $('#trait_table tr').click(function(event) {
+ if (event.target.type !== 'checkbox' && event.target.tagName.toLowerCase() !== 'a') {
+ $(':checkbox', this).trigger('click');
+ }
+ });
+ $('.trait_checkbox:checkbox').on("change", change_buttons);
+ },
'createdRow': function ( row, data, index ) {
$('td', row).eq(0).attr("style", "text-align: center; padding: 4px 10px 2px 10px;");
$('td', row).eq(1).attr("align", "right");
@@ -158,12 +193,17 @@
'type': "natural",
'data': null,
'render': function(data, type, row, meta) {
- return decodeURIComponent(escape(data.description))
+ try {
+ return decodeURIComponent(escape(data.description))
+ } catch(err) {
+ return escape(data.description)
+ }
}
},
{
'title': "Location",
- 'type': "natural",
+ 'type': "natural",
+ 'width': "100px",
'data': "location_repr"
},
{
@@ -173,19 +213,21 @@
'orderSequence': [ "desc", "asc"]
},
{
- 'title': "Max LRS<a href=\"http://genenetwork.org//glossary.html#LRS\" target=\"_blank\" style=\"color: white;\"><sup>?</sup></a>",
+ 'title': "Max<br>LRS<a href=\"http://genenetwork.org//glossary.html#LRS\" target=\"_blank\" style=\"color: white;\"><sup>?</sup></a>",
'type': "natural",
'data': "LRS_score_repr",
'orderSequence': [ "desc", "asc"]
},
{
- 'title': "Max LRS Location",
- 'type': "natural",
+ 'title': "Max LRS<br>Location",
+ 'type': "natural",
+ 'width': "100px",
'data': "max_lrs_text"
},
{
- 'title': "Additive Effect<a href=\"http://genenetwork.org//glossary.html#A\" target=\"_blank\" style=\"color: white;\"><sup>?</sup></a>",
- 'type': "natural",
+ 'title': "Additive<br>Effect<a href=\"http://genenetwork.org//glossary.html#A\" target=\"_blank\" style=\"color: white;\"><sup>?</sup></a>",
+ 'type': "natural",
+ 'width': "50px",
'data': "additive",
'orderSequence': [ "desc", "asc"]
}
diff --git a/wqflask/wqflask/templates/gsearch_pheno.html b/wqflask/wqflask/templates/gsearch_pheno.html
index 7dc22a88..4e142846 100644
--- a/wqflask/wqflask/templates/gsearch_pheno.html
+++ b/wqflask/wqflask/templates/gsearch_pheno.html
@@ -9,7 +9,8 @@
<div class="container">
- <p>You searched for {{ terms }}.</p>
+ <h3>GN searched 51 datasets and 13763 traits across 10 species, and found {{ trait_count }} results that match your query.
+ You can filter these results by adding key words in the fields below and you can also sort results on most columns.</h3>
<p>To study a record, click on its ID below.<br />Check records below and click Add button to add to selection.</p>
<div>
@@ -20,16 +21,15 @@
<button class="btn btn-default" id="add" disabled ><span class="glyphicon glyphicon-plus-sign"></span> Add</button>
<input type="text" id="searchbox" class="form-control" style="width: 200px; display: inline;" placeholder="Search This Table For ...">
<input type="text" id="select_top" class="form-control" style="width: 200px; display: inline;" placeholder="Select Top ...">
- <br />
- <br />
- <form id="export_form" method="POST" action="/export_traits_csv">
+ <form id="export_form" method="POST" action="/export_traits_csv" style="display: inline;">
<input type="hidden" name="database_name" id="database_name" value="None">
<input type="hidden" name="export_data" id="export_data" value="">
<button class="btn btn-default" id="export_traits">Download CSV</button>
</form>
<br />
- <div>
- <table id="trait_table" width="100%" class="table-hover table-striped cell-border" style="float: left;">
+ <br />
+ <div style="width: 100%;">
+ <table id="trait_table" class="table-hover table-striped cell-border" style="float: left;">
<tbody>
<td colspan="100%" align="center"><br><b><font size="15">Loading...</font></b><br></td>
</tbody>
@@ -78,8 +78,43 @@
}
});
+ function change_buttons() {
+ buttons = ["#add", "#remove"];
+ num_checked = $('.trait_checkbox:checked').length;
+ if (num_checked === 0) {
+ for (_i = 0, _len = buttons.length; _i < _len; _i++) {
+ button = buttons[_i];
+ $(button).prop("disabled", true);
+ }
+ } else {
+ for (_j = 0, _len2 = buttons.length; _j < _len2; _j++) {
+ button = buttons[_j];
+ $(button).prop("disabled", false);
+ }
+ }
+ //});
+ if ($(this).is(":checked")) {
+ if (!$(this).closest('tr').hasClass('selected')) {
+ $(this).closest('tr').addClass('selected')
+ }
+ }
+ else {
+ if ($(this).closest('tr').hasClass('selected')) {
+ $(this).closest('tr').removeClass('selected')
+ }
+ }
+ }
+
console.time("Creating table");
$('#trait_table').DataTable( {
+ 'drawCallback': function( settings ) {
+ $('#trait_table tr').click(function(event) {
+ if (event.target.type !== 'checkbox' && event.target.tagName.toLowerCase() !== 'a') {
+ $(':checkbox', this).trigger('click');
+ }
+ });
+ $('.trait_checkbox:checkbox').on("change", change_buttons);
+ },
"createdRow": function ( row, data, index ) {
$('td', row).eq(0).attr("style", "text-align: center; padding: 4px 10px 2px 10px;");
$('td', row).eq(1).attr("align", "right");
@@ -134,14 +169,26 @@
'width': "25%",
'data': null,
'render': function(data, type, row, meta) {
- return decodeURIComponent(escape(data.description))
+ try {
+ return decodeURIComponent(escape(data.description))
+ } catch(err) {
+ return data.description
+ }
}
},
{
'title': "Authors",
'type': "natural",
'width': "25%",
- 'data': "authors"
+ 'data': null,
+ 'render': function(data, type, row, meta) {
+ author_list = data.authors.split(",")
+ if (author_list.length >= 6) {
+ return author_list.slice(0, 6).join(",") + ", et al."
+ } else{
+ return data.authors
+ }
+ }
},
{
'title': "Year",
diff --git a/wqflask/wqflask/templates/index_page_orig.html b/wqflask/wqflask/templates/index_page_orig.html
index 4b95e7f9..48ed0ec5 100755
--- a/wqflask/wqflask/templates/index_page_orig.html
+++ b/wqflask/wqflask/templates/index_page_orig.html
@@ -17,7 +17,7 @@
</header>
-->
- <div class="container-fluid">
+ <div class="container-fluid" style="min-width: 1200px;">
{{ flash_me() }}
@@ -28,7 +28,7 @@
<div class="page-header">
<h1>Select and search</h1>
</div>
- <form method="get" action="/search" name="SEARCHFORM">
+ <form method="get" action="/search" target="_blank" name="SEARCHFORM">
<fieldset>
<div style="padding: 20px" class="form-horizontal">
@@ -36,7 +36,7 @@
<label for="species" class="col-xs-1 control-label" style="width: 65px !important;">Species:</label>
<div class="col-xs-10 controls input-append" style="display: flex; padding-left: 20px;">
<div class="col-8">
- <select name="species" id="species" class="form-control" style="width: 280px !important;"></select>
+ <select name="species" id="species" class="form-control" style="width: 280px !important;"><option>Loading...</option></select>
</div>
<div class="col-4" style="margin-left: 10px;">
<button type="button" id="make_default" class="btn btn-primary form-control">Make Default</button>
@@ -48,7 +48,7 @@
<label for="group" class="col-xs-1 control-label" style="width: 65px !important;">Group:</label>
<div class="col-xs-10 controls input-append" style="padding-left: 20px;">
<div class="col-8">
- <select name="group" id="group" class="form-control" style="width: 280px !important;"></select>
+ <select name="group" id="group" class="form-control" style="width: 280px !important;"><option>Loading...</option></select>
<i class="icon-question-sign"></i>
</div>
</div>
@@ -58,7 +58,7 @@
<label for="tissue" class="col-xs-1 control-label" style="width: 65px !important;">Type:</label>
<div class="col-xs-10 controls" style="padding-left: 20px;">
<div class="col-8">
- <select name="type" id="type" class="form-control" style="width: 280px !important;"></select>
+ <select name="type" id="type" class="form-control" style="width: 280px !important;"><option>Loading...</option></select>
</div>
</div>
</div>
@@ -67,7 +67,7 @@
<label for="dataset" class="col-xs-1 control-label" style="width: 65px !important;">Dataset:</label>
<div class="col-xs-10 controls input-append" style="display: flex; padding-left: 20px;">
<div class="col-9">
- <select name="dataset" id="dataset" class="form-control" style="width: 340px !important;"></select>
+ <select name="dataset" id="dataset" class="form-control" style="width: 340px !important;"><option>Loading...</option></select>
<i class="icon-question-sign"></i>
</div>
<div class="col-3" style="margin-left: 10px;">
@@ -138,19 +138,32 @@
<h2>Advanced commands</h2>
</div>
- <p>You can also use advanced commands. Copy these simple examples into the Get Any or Combined search fields:</p>
+ <p>You can also use advanced commands. Copy these simple examples into the Get Any field for single term searches and Combined for searches with multiple terms:</p>
<ul>
<li><b>POSITION=(chr1 25 30)</b> finds genes, markers, or transcripts on
chromosome 1 between 25 and 30 Mb.</li>
- <li><b>MEAN=(15 16) LRS=(23 46)</b> in the <b>Combined</b> field finds
- highly expressed genes (15 to 16 log2 units) AND with peak <a href="http://www.genenetwork.org/glossary.html#L">LRS</a>
- linkage between 23 and 46.</li>
+ <li><b>MEAN=(15 16)</b> in the <b>Combined</b> field finds
+ highly expressed genes (15 to 16 log2 units)</li>
<li><b>RANGE=(1.5 2.5)</b> in the <b>Any</b> field finds traits with values with a specified fold-range (minimum = 1).
Useful for finding "housekeeping genes" <b>(1.0 1.2)</b> or highly variable molecular assays <b>(10 100)</b>.</li>
+ <li><b>LRS=(15 1000)</b> or <b>LOD=(2 8)</b> finds all traits with peak LRS or LOD scores between lower and upper limits.</li>
+
+ <li><b>LRS=(9 999 Chr4 122 155)</b> finds all traits on Chr 4 from 122 and 155 Mb with LRS scores between 9 and 999.</li>
+
+ <li><b>cisLRS=(15 1000 5)</b> or <b>cisLOD=(2 8 5)</b> finds all cis eQTLs with peak LRS or LOD scores between lower and upper limits,
+ with an <b>inclusion</b> zone of 5 Mb around the parent gene.</li>
+
+ <li><b>transLRS=(15 1000 5)</b> or <b>transLOD=(2 8 5)</b> finds all trans eQTLs with peak LRS or LOD scores between lower and upper limits,
+ with an <b>exclusion</b> zone of 5 Mb around the parent gene.</li>
+
+ <li><b>POSITION=(Chr4 122 130) cisLRS=(9 999 10)</b>
+ finds all traits on Chr 4 from 122 and 155 Mb with cisLRS scores
+ between 9 and 999 and an inclusion zone of 10 Mb.</li>
+
<li><b>RIF=mitochondrial</b> searches RNA databases for <a href="https://en.wikipedia.org/wiki/GeneRIF">
GeneRIF</a> links.</li>
@@ -162,11 +175,6 @@
<a href="http://amigo.geneontology.org/amigo/medial_search?q=GO%3A0045202">
Gene Ontology</a>.</li>
- <li><b>GO:0045202 LRS=(9 99 Chr4 122 155) cisLRS=(9 999 10)</b>
- finds synapse-associated genes with <a href="http://www.genenetwork.org/glossary.html#E">
- cis eQTL</a> on Chr 4 from 122 and 155 Mb with LRS scores
- between 9 and 999.</li>
-
<li><b>RIF=diabetes LRS=(9 999 Chr2 100 105) transLRS=(9 999 10)</b>
finds diabetes-associated transcripts with peak <a href="http://www.genenetwork.org/glossary.html#E">
trans eQTLs</a> on Chr 2 between 100 and 105 Mb with LRS
@@ -181,8 +189,9 @@
<h1>Affiliates</h1>
<ul>
<li><a href="http://ucscbrowser.genenetwork.org/">Genome browser</a> at UTHSC</li>
- <li><a href="http://galaxy.genenetwork.org/">Galaxy</a> at UTHSC</li>
<li><a href="https://systems-genetics.org/">Systems Genetics</a> @ EPFL</li>
+ <li>UTHSC <a href="http://bnw.genenetwork.org/">Bayesian Network Web Server</a></li>
+ <li><a href="http://genenetwork.org">GeneNetwork 1</a></li>
</ul>
</div>
</section>
@@ -199,9 +208,9 @@
<h1>Github</h1>
<ul>
<li><a href="https://github.com/genenetwork/genenetwork2">GN2 Source Code</a></li>
- <li><a href="https://github.com/genenetwork/gn-docs/wiki">GN2 Document Wiki</a></li>
- <li><a href="https://github.com/genenetwork/sysmaintenance">System Maintenance Code</a></li>
<li><a href="https://github.com/genenetwork/genenetwork">GN1 Source Code</a></li>
+ <!--<li><a href="https://github.com/genenetwork/gn-docs/wiki">GN2 Document Wiki</a></li>-->
+ <li><a href="https://github.com/genenetwork/sysmaintenance">System Maintenance Code</a></li>
</ul>
</div>
</section>
@@ -241,13 +250,12 @@
<h3>GeneNetwork v2:</h3>
<ul>
<li><a href="http://gn2.genenetwork.org/">Main website</a> at UTHSC</li>
- <li><a href="http://test-gn2.genenetwork.org/">Testing website</a> at UTHSC</li>
+ <!--<li><a href="http://test-gn2.genenetwork.org/">Testing website</a> at UTHSC</li>-->
</ul>
<h3>GeneNetwork v1:</h3>
<ul>
<li><a href="http://www.genenetwork.org/">Main website</a> at UTHSC</li>
- <li><a href="http://genenetwork.helmholtz-hzi.de/">Website</a> at the HZI (Germany)</li>
- <li><a href="http://ec2.genenetwork.org/">Amazon
+ <li><a href="http://artemis.uthsc.edu/">Time Machine</a>: Full GN versions from 2009 to 2016 (mm9)</li>
Cloud (EC2)</a></li>
</ul>
</section>
diff --git a/wqflask/wqflask/templates/loading.html b/wqflask/wqflask/templates/loading.html
index 25560249..4c30664b 100644
--- a/wqflask/wqflask/templates/loading.html
+++ b/wqflask/wqflask/templates/loading.html
@@ -6,13 +6,34 @@
{% endfor %}
<div class="container">
<div>
- <div style="min-height: 80vh; display: flex; align-items: center;">
- <div style="margin-bottom: 10px; left: 50%; margin-right: -50%; transform: translate(-50%, -50%); position: absolute;">
+ <div style="min-height: 80vh; display: flex; align-items: center; text-align: center;">
+ <div style="margin-bottom: 5px; left: 50%; margin-right: -50%; margin-top: 10%; transform: translate(-50%, -50%); position: absolute;">
+ {% if start_vars.tool_used == "Mapping" %}
+ <h1>Computing the Map</h1>
+ <br>
+ <i>n</i> = {{ start_vars.num_vals }}
+ <br>
+ Method = {{ start_vars.method }}
+ <br>
+ {% if start_vars.transform != "" %}
+ transform = {{ start_vars.transform }}
+ <br>
+ {% endif %}
+ MAF = {{ start_vars.maf }}
+ {% else %}
<h1>Loading&nbsp;{{ start_vars.tool_used }}&nbsp;Results...</h1>
+ {% endif %}
+ <br><br>
+ <img align="center" src="/static/gif/89.gif">
</div>
- <div class="progress center-block" style="margin-top: 5px; margin-left: 25%; margin-right: 25%; position: absolute; height:50px; width:50%; top:50%;">
+ <!--<div style="margin-left: auto; margin-right: auto; display: block; width: 50%; top:50%;">
+ <img align="center" src="/static/gif/89.gif">
+ </div>-->
+ <!--
+ <div class="progress center-block" style="margin-left: 25%; margin-right: 25%; position: absolute; height:50px; width:50%; top:50%;">
<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width:100%;"></div>
</div>
+ -->
</div>
</div>
</div>
@@ -22,5 +43,5 @@
<script type="text/javascript">
$("#loading_form").attr("action", "{{ start_vars.form_url }}");
-$("#loading_form").submit();
+setTimeout(function(){ $("#loading_form").submit()}, 350);
</script> \ No newline at end of file
diff --git a/wqflask/wqflask/templates/mapping_error.html b/wqflask/wqflask/templates/mapping_error.html
index b73a2c31..884d4df8 100644
--- a/wqflask/wqflask/templates/mapping_error.html
+++ b/wqflask/wqflask/templates/mapping_error.html
@@ -5,7 +5,13 @@
{{ header("An error occurred during mapping") }}
<div class="container">
+ <h3>
<p>There is likely an issue with the genotype file associated with this group/RISet. Please contact Zach Sloan (zachary.a.sloan@gmail.com) or Arthur Centeno (acenteno@gmail.com) about the data set in question.</p>
+ </h3>
+ <br>
+ <h3>
+ <p>Try mapping using interval mapping instead; some genotype files with many columns of NAs have issues with GEMMA or R/qtl.</p>
+ </h3>
</div>
diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html
index ba4d4d7c..baf2b1ec 100644
--- a/wqflask/wqflask/templates/mapping_results.html
+++ b/wqflask/wqflask/templates/mapping_results.html
@@ -3,13 +3,15 @@
{% block css %}
<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.css" />
<link rel="stylesheet" type="text/css" href="/static/new/css/marker_regression.css" />
- <link rel="stylesheet" type="text/css" href="/static/new/css/panelutil.css" />
+
{% endblock %}
{% from "base_macro.html" import header %}
{% block content %}
- <div class="container">
+ <div class="container" style="min-width: 900px;">
<form method="post" target="_blank" action="/run_mapping" name="marker_regression" id="marker_regression_form">
<input type="hidden" name="temp_uuid" value="{{ temp_uuid }}">
<input type="hidden" name="trait_id" value="{{ this_trait.name }}">
@@ -17,8 +19,11 @@
<input type="hidden" name="genofile" value="{{ genofile_string }}">
<input type="hidden" name="geno_db_exists" value="{{ geno_db_exists }}">
<input type="hidden" name="first_run" value="{{ first_run }}">
- {% if gwa_filename is defined %}
- <input type="hidden" name="gwa_filename" value="{{ gwa_filename }}">
+ {% if output_files is defined %}
+ <input type="hidden" name="output_files" value="{{ output_files }}">
+ {% endif %}
+ {% if reaper_version is defined %}
+ <input type="hidden" name="reaper_version" value="{{ reaper_version }}">
{% endif %}
<input type="hidden" name="results_path" value="{{ mapping_results_path }}">
<input type="hidden" name="method" value="{{ mapping_method }}">
@@ -26,6 +31,7 @@
{% for sample in samples %}
<input type="hidden" name="value:{{ sample }}" value="{{ vals[loop.index - 1] }}">
{% endfor %}
+ <input type="hidden" name="num_vals" value="{{ n_samples }}">
<input type="hidden" name="maf">
<input type="hidden" name="use_loco" value="{{ use_loco }}">
<input type="hidden" name="selected_chr" value="{{ selectedChr }}">
@@ -150,13 +156,11 @@
<li id="gn1_map_tab">
<a href="#gn1_map" data-toggle="tab" aria-expanded="true">GN1 Map</a>
</li>
- {% if mapping_method != "gemma" and mapping_method != "plink" %}
- <li id="vector_map_tab">
- <a href="#vector_map" data-toggle="tab" {% if mapping_method != "gemma" and mapping_method != "plink" %}aria-expanded="false"{% else %}aria-expanded="true"{% endif %}>Vector Map</a>
+ <li id="browser_tab">
+ <a href="#browser_holder" data-toggle="tab" aria-expanded="true">Genome Browser</a>
</li>
- {% endif %}
</ul>
- <div class="tab-content">
+ <div class="tab-content" style="overflow-x: auto;">
<div class="tab-pane active" id="gn1_map">
<div class="qtlcharts">
{{ gifmap|safe }}
@@ -165,28 +169,43 @@
<br>
<span style="white-space: nowrap;">A positive additive coefficient (green line) indicates that {{ dataset.group.parlist[1] }} alleles increase trait values. In contrast, a negative additive coefficient (orange line) indicates that {{ dataset.group.parlist[0] }} alleles increase trait values.</span>
{% endif %}
- {% if nperm > 0 and permChecked == "ON" %}
- <br><br>
- <img src="/generated/{{ perm_filename }}.gif">
- <br><br>
- Total of {{ nperm }} permutations&nbsp;&nbsp;<a href="javascript:export_perm_data();" target="_blank" >Download Permutation Results</a>
- <br>
- {% endif %}
</div>
</div>
- {% if mapping_method != "gemma" and mapping_method != "plink" %}
- <div class="tab-pane {% if mapping_method == "gemma" %}active{% endif %}" id="vector_map">
- <div id="chart_container">
- <div class="qtlcharts" id="topchart"></div>
- </div>
+ <div class="tab-pane" id="browser_holder" style="height: 600px;">
+ <div id="browser" style="margin-right: 20px; width: 90%;">
+ <div id="controls">
+ <button id="scrollLeft" type="button" >
+ <i class="fas fa-arrow-left"></i>
+ </button>
+ <button id="scrollRight" type="button" >
+ <i class="fas fa-arrow-right"></i>
+ </button>
+ <button id="zoomOut" type="button" >
+ <i class="fas fa-search-minus"></i>
+ </button>
+ <button id="zoomIn" type="button" >
+ <i class="fas fa-search-plus"></i>
+ </button>
+ <button id="reset" type="button" >Reset</button>
+ </div>
+ <div id="infoBox"></div>
+ </div>
</div>
- {% endif %}
</div>
</div>
+ <div>
+ {% if nperm > 0 and permChecked == "ON" %}
+ <br><br>
+ <img src="/generated/{{ perm_filename }}.gif">
+ <br><br>
+ Total of {{ nperm }} permutations&nbsp;&nbsp;<a href="javascript:export_perm_data();" target="_blank" >Download Permutation Results</a>
+ <br>
+ {% endif %}
+ </div>
</form>
{% if selectedChr == -1 %}
- <div class="container" style="padding-left: 30px;">
+ <div class="container" style="padding-left: 30px; margin-top: 50px; position: relative;">
<h2>Mapping Statistics</h2>
<br />
<button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button>
@@ -195,7 +214,7 @@
<button class="btn btn-default" id="add" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button>
<br />
<br />
- <div id="table_container" style="width:{% if 'additive' in trimmed_markers[0] %}480{% else %}450{% endif %}px;">
+ <div id="table_container" style="width:{% if 'additive' in trimmed_markers[0] %}500{% else %}470{% endif %}px;">
<table id="trait_table" class="table-hover table-striped cell-border dataTable no-footer">
<thead>
<tr>
@@ -231,11 +250,11 @@
{% if 'lod_score' in marker %}
<td align="right">{{ '%0.2f' | format(marker.lod_score|float) }}</td>
{% else %}
- <td align="right">{{ '%0.2f' | format(marker.lrs_value|float / 4.16) }}</td>
+ <td align="right">{{ '%0.2f' | format(marker.lrs_value|float / 4.61) }}</td>
{% endif %}
{% else %}
{% if 'lod_score' in marker %}
- <td align="right">{{ '%0.2f' | format(marker.lod_score|float * 4.16) }}</td>
+ <td align="right">{{ '%0.2f' | format(marker.lod_score|float * 4.61) }}</td>
{% else %}
<td align="right">{{ '%0.2f' | format(marker.lrs_value|float) }}</td>
{% endif %}
@@ -262,7 +281,7 @@
<div style="width: 100%;">
<h2>Interval Analyst</h2>
<div id="table_container">
- <table id="interval_analyst" class="table-hover table-striped cell-border dataTable" style="float: left; width:100%;">
+ <table id="trait_table" class="table-hover table-striped cell-border dataTable" style="float: left; width:100%;">
<thead>
<tr>
{% for header in gene_table_header %}
@@ -304,33 +323,28 @@
<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.js"></script>
- {% if mapping_method != "gemma" and mapping_method != "plink" %}
<script>
js_data = {{ js_data | safe }}
</script>
- {% endif %}
<script language="javascript" type="text/javascript" src="/static/new/javascript/search_results.js"></script>
- {% if mapping_method != "gemma" and mapping_method != "plink" %}
- <script language="javascript" type="text/javascript" src="/static/new/javascript/panelutil.js"></script>
- <script language="javascript" type="text/javascript" src="/static/new/javascript/chr_lod_chart.js"></script>
- <script language="javascript" type="text/javascript" src="/static/new/javascript/lod_chart.js"></script>
- <script language="javascript" type="text/javascript" src="/static/new/javascript/create_lodchart.js"></script>
- {% endif %}
+ <script language="javascript" type="text/javascript" src="/static/new/javascript/init_genome_browser.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready( function () {
console.time("Creating table");
+ {% if selectedChr == -1 %}
$('#trait_table').DataTable( {
"columns": [
{ "type": "natural", "width": "5%" },
{ "type": "natural", "width": "8%" },
{ "type": "natural", "width": "25%" },
{ "type": "natural" },
- { "type": "natural", "width": "8%" },
- { "type": "natural" }{% if 'additive' in marker %},
- { "type": "natural" }{% endif %}{% if 'dominance' in marker and dataset.group.genetic_type != "riset" %},
+ { "type": "natural" },
+ { "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": [ {
@@ -346,8 +360,8 @@
"scrollCollapse": false,
"paging": false
} );
-
- $('#interval_analyst').dataTable( {
+ {% elif selectedChr != -1 and plotScale =="physic" and (dataset.group.species == 'mouse' or dataset.group.species == 'rat') %}
+ $('#trait_table').dataTable( {
"createdRow": function ( row, data, index ) {
$('td', row).eq(1).attr("align", "right");
$('td', row).eq(3).attr("align", "right");
@@ -384,6 +398,7 @@
"scrollCollapse": false,
"paging": false
} );
+ {% endif %}
$('#vector_map_tab').click(function(){
$('div#gn1_map_options').hide();
@@ -433,6 +448,12 @@
return $('#marker_regression_form').submit();
}
+ $('#browser_tab').click(function() {
+ $('#gn1_map_options').css("display", "none")
+ })
+ $('#gn1_map_tab').click(function() {
+ $('#gn1_map_options').css("display", "block")
+ })
</script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/new_security/login_user.html b/wqflask/wqflask/templates/new_security/login_user.html
index 27b20ebf..c9aaf028 100644
--- a/wqflask/wqflask/templates/new_security/login_user.html
+++ b/wqflask/wqflask/templates/new_security/login_user.html
@@ -2,53 +2,11 @@
{% block title %}Register{% endblock %}
{% block content %}
- <div class="container">
+ <div class="container" style="min-width: 1250px;">
{{ flash_me() }}
- <div class="page-header">
- <h1>&nbsp;&nbsp;&nbsp;&nbsp;Login</h1>
- </div>
-
-
- <div class="security_box">
-
- <h4>Don't have an account?</h4>
-
- {% if es_server: %}
- <a href="/n/register" class="btn btn-primary modalize">Create a new account</a>
- {% else: %}
- <div class="alert alert-warning">
- <p>You cannot create an account at this moment.<br />
- Please try again later.</p>
- </div>
- {% endif %}
-
- <hr />
- <h4>Login with external services</h4>
-
- {% if external_login: %}
- <div>
- {% if external_login["github"]: %}
- <a href="{{external_login['github']}}" title="Login with GitHub" class="btn btn-info btn-group">Login with Github</a>
- {% else %}
- <p>Github login is not available right now</p>
- {% endif %}
-
- {% if external_login["orcid"]: %}
- <a href="{{external_login['orcid']}}" title="Login with ORCID" class="btn btn-info btn-group">Login with ORCID</a>
- {% else %}
- <p>ORCID login is not available right now</p>
- {% endif %}
- </div>
- {% else: %}
- <div class="alert alert-warning">
- <p>Sorry, you cannot login with Github or ORCID at this time.</p>
- </div>
- {% endif %}
- <hr />
-
- <h4>Already have an account? Sign in here.</h4>
+ <h4>Already have an account? Sign in here.</h4>
{% if es_server: %}
<form class="form-horizontal" action="/n/login" method="POST" name="login_user_form" id="loginUserForm">
@@ -69,7 +27,6 @@
</div>
</div>
-
<div class="form-group">
<label class="col-xs-1 control-label" for="remember"></label>
<div style="margin-left:20px;" class="col-xs-4 controls">
@@ -87,6 +44,42 @@
</div>
</fieldset>
+ <div class="security_box">
+
+ <h4>Don't have an account?</h4>
+
+ {% if es_server: %}
+ <a href="/n/register" class="btn btn-primary modalize">Create a new account</a>
+ {% else: %}
+ <div class="alert alert-warning">
+ <p>You cannot create an account at this moment.<br />
+ Please try again later.</p>
+ </div>
+ {% endif %}
+
+ <hr />
+ <h4>Login with external services</h4>
+
+ {% if external_login: %}
+ <div>
+ {% if external_login["github"]: %}
+ <a href="{{external_login['github']}}" title="Login with GitHub" class="btn btn-info btn-group">Login with Github</a>
+ {% else %}
+ <p>Github login is not available right now</p>
+ {% endif %}
+
+ {% if external_login["orcid"]: %}
+ <a href="{{external_login['orcid']}}" title="Login with ORCID" class="btn btn-info btn-group">Login with ORCID</a>
+ {% else %}
+ <p>ORCID login is not available right now</p>
+ {% endif %}
+ </div>
+ {% else: %}
+ <div class="alert alert-warning">
+ <p>Sorry, you cannot login with Github or ORCID at this time.</p>
+ </div>
+ {% endif %}
+
</form>
{% else: %}
<div class="alert alert-warning">
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index e20ea2d3..2c67f6c3 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -8,13 +8,16 @@
{% endblock %}
{% block content %}
<!-- Start of body -->
- <div style="padding-left: 10px;">
+ <div style="padding-left: 10px; min-width: 1200px;">
<input type="hidden" name="uc_id" id="uc_id" value="{{ uc_id }}">
<div style="padding-top: 10px; padding-bottom: 10px; font-size: 16px;">
<!-- Need to customize text more for other types of searches -->
- <p>We searched <a href="http://genenetwork.org/webqtl/main.py?FormID=sharinginfo&GN_AccessionId={{dataset.id}}">{{ dataset.fullname }}</a>
+ <p><b>Search Results:</b> We searched <a href="http://genenetwork.org/webqtl/main.py?FormID=sharinginfo&{% if dataset.accession_id != 'None' %}GN_AccessionId={{ dataset.accession_id }}{% else %}InfoPageName={{ dataset.name }}{% endif %}">{{ dataset.fullname }}</a>
to find all records
+ {% if go_term is not none %}
+ with <u>Gene Ontology ID</u> <strong>GO:{{ go_term }}</strong>.
+ {% else %}
{% for word in search_terms %}
{% if word.key|lower == "rif" %}
with <u>GeneRIF</u> containing <strong>{{ word.search_term[0] }}</strong>{% if loop.last %}.{% else %} and {% endif %}
@@ -24,28 +27,33 @@
with <u>GeneWiki</u> containing <strong>{{ word.search_term[0] }}</strong>{% if loop.last %}.{% else %} and {% endif %}
{% elif word.key|lower == "mean" %}
with <u>MEAN</u> between <strong>{{ word.search_term[0] }}</strong> and <strong>{{ word.search_term[1] }}</strong>{% if loop.last %}.{% else %} and {% endif %}
- {% elif word.key|lower == "lrs" or word.key|lower == "translrs" or word.key|lower == "cislrs" %}
+ {% elif word.key|lower == "lrs" or word.key|lower == "lod" or word.key|lower == "translrs" or word.key|lower == "cislrs" or word.key|lower == "translod" or word.key|lower == "cislod" %}
{% if word.search_term|length == 1 %}
with {% if word.key|lower == "translrs" %}trans{% elif word.key|lower == "cislrs" %}cis{% endif %}LRS {% if word.separator == ">" %} greater than {% elif word.separator == "<" %} less than {% elif word.separator == ">=" %} greater than or equal to {% elif word.separator == "<=" %} less than or equal to {% endif %} <strong>{{ word.search_term[0] }}</strong>{% if loop.last %}.{% else %} and {% endif %}
{% elif word.search_term|length == 2 %}
- with <u>LRS</u> between <strong>{{ word.search_term[0] }}</strong> and <strong>{{ word.search_term[1] }}</strong>{% if loop.last %}.{% else %} and {% endif %}
+ with <u>{{ word.key|upper }}</u> between <strong>{{ word.search_term[0] }}</strong> and <strong>{{ word.search_term[1] }}</strong>{% if loop.last %}.{% else %} and {% endif %}
{% elif word.search_term|length == 3 %}
- with <u>LRS</u> between <strong>{{ word.search_term[0] }}</strong> and <strong>{{ word.search_term[1] }}</strong> on chromosome <strong>{{ word.search_term[2] }}</strong>{% if loop.last %}.{% else %} and {% endif %}
+ with <u>{{ word.key|upper }}</u> between <strong>{{ word.search_term[0] }}</strong> and <strong>{{ word.search_term[1] }}</strong> on chromosome <strong>{{ word.search_term[2] }}</strong>{% if loop.last %}.{% else %} and {% endif %}
{% elif word.search_term|length == 5 %}
- with <u>LRS</u> between <strong>{{ word.search_term[0] }}</strong> and <strong>{{ word.search_term[1] }}</strong> on chromosome <strong>{{ word.search_term[2] }}</strong> between <strong>{{ word.search_term[3] }}</strong> and <strong>{{ word.search_term[4] }}</strong> Mb{% if loop.last %}.{% else %} and {% endif %}
+ with <u>{{ word.key|upper }}</u> between <strong>{{ word.search_term[0] }}</strong> and <strong>{{ word.search_term[1] }}</strong> on chromosome <strong>{{ word.search_term[2] }}</strong> between <strong>{{ word.search_term[3] }}</strong> and <strong>{{ word.search_term[4] }}</strong> Mb{% if loop.last %}.{% else %} and {% endif %}
{% endif %}
{% elif word.key|lower == "position" %}
with <u>target genes</u> on chromosome <strong>{% if word.search_term[0].split('chr')|length > 1 %}{{ word.search_term[0].split('chr')[1] }}{% elif word.search_term[0].split('CHR')|length > 1 %}{{ word.search_term[0].split('CHR')[1] }}{% else %}{{ word.search_term[0] }}{% endif %}</strong> between <strong>{{ word.search_term[1] }}</strong> and <strong>{{ word.search_term[2] }}</strong> Mb{% if loop.last %}.{% else %} and {% endif %}
{% else %}
- that match the <u>TERM</u> <b>{{ word.search_term[0] }}</b>{% if loop.last %},{% else %} and {% endif %}
+ {% if word.search_term[0] == "*" %} in the dataset.{% else %}{% if loop.first %}that match:<br>{% endif %}<b>"{{ word.search_term[0] }}"</b>{% if loop.last %}{% else %} and {% endif %}{% endif %}
{% endif %}
{% endfor %}
- and found {{ results|count }} records.
+ {% endif %}
+ <br>
+ {{ results|count }} records are shown below.
</p>
+ {% if go_term is not none %}
+ <p><b>The associated genes include:</b><br><br>{% for word in search_terms %}{{ word.search_term[0] }}{% endfor %}</p>
+ {% endif %}
- <p>To study a record click on its ID below, and to view the whole description {% if dataset.type == "Publish" %}or list of authors {% endif %} hover over the table cell. Check records below and click Add button to add to selection.</p>
+ <!--<p>To study a record click on its ID below, and to view the whole description {% if dataset.type == "Publish" %}or list of authors {% endif %} hover over the table cell. Check records below and click Add button to add to selection.</p>-->
- <hr style="height: 1px; background-color: #A9A9A9;">
+ <!--<hr style="height: 1px; background-color: #A9A9A9;">-->
</div>
@@ -104,22 +112,20 @@
<div>
<br />
- <button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button>
- <button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect All</button>
+ <button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select</button>
+ <button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect</button>
<button class="btn btn-default" id="invert"><span class="glyphicon glyphicon-resize-vertical"></span> Invert</button>
<button class="btn btn-default" id="add" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button>
<input type="text" id="searchbox" class="form-control" style="width: 200px; display: inline;" placeholder="Search This Table For ...">
<input type="text" id="select_top" class="form-control" style="width: 200px; display: inline;" placeholder="Select Top ...">
- <br />
- <br />
- <form id="export_form" method="POST" action="/export_traits_csv">
+ <form id="export_form" method="POST" action="/export_traits_csv" style="display: inline;">
<input type="hidden" name="database_name" id="database_name" value="{{ dataset.fullname }}">
<input type="hidden" name="export_data" id="export_data" value="">
- <button class="btn btn-default" id="export_traits">Download CSV</button>
+ <button class="btn btn-default" id="export_traits">Download</button>
</form>
<br />
-
- <div id="table_container" style="width: 1200px;">
+ <br />
+ <div id="table_container">
<table class="table-hover table-striped cell-border" id='trait_table' style="float: left;">
<tbody>
<td colspan="100%" align="center"><br><b><font size="15">Loading...</font></b><br></td>
@@ -206,7 +212,7 @@
$('#trait_table').DataTable( {
'drawCallback': function( settings ) {
$('#trait_table tr').click(function(event) {
- if (event.target.type !== 'checkbox') {
+ if (event.target.type !== 'checkbox' && event.target.tagName.toLowerCase() !== 'a') {
$(':checkbox', this).trigger('click');
}
});
@@ -250,6 +256,7 @@
'columns': [
{
'data': null,
+ 'width': "30px",
'orderDataType': "dom-checkbox",
'orderSequence': [ "desc", "asc"],
'render': function(data, type, row, meta) {
@@ -259,12 +266,14 @@
{
'title': "Index",
'type': "natural",
+ 'width': "30px",
'data': "index"
},
{
'title': "Record",
'type': "natural",
'data': null,
+ 'width': "60px",
'orderDataType': "dom-inner-text",
'render': function(data, type, row, meta) {
return '<a href="/show_trait?trait_id=' + data.name + '&dataset=' + data.dataset + '">' + data.name + '</a>'
@@ -278,12 +287,11 @@
{
'title': "Description",
'type': "natural",
- 'width': "300px",
'data': null,
'render': function(data, type, row, meta) {
try {
return decodeURIComponent(escape(data.description))
- } catch {
+ } catch(err){
return escape(data.description)
}
}
@@ -291,12 +299,13 @@
{
'title': "Location",
'type': "natural",
- 'width': "140px",
+ 'width': "120px",
'data': "location"
},
{
'title': "Mean",
'type': "natural",
+ 'width': "40px",
'data': "mean",
'orderSequence': [ "desc", "asc"]
},
@@ -309,7 +318,7 @@
{
'title': "Max LRS Location",
'type': "natural",
- 'width': "140px",
+ 'width': "120px",
'data': "lrs_location"
},
{
@@ -321,17 +330,29 @@
{
'title': "Description",
'type': "natural",
- 'width': "500px",
+ 'width': "25%",
'data': null,
'render': function(data, type, row, meta) {
- return decodeURIComponent(escape(data.description))
+ try {
+ return decodeURIComponent(escape(data.description))
+ } catch(err){
+ return data.description
+ }
}
},
{
'title': "Authors",
'type': "natural",
- 'width': "300px",
- 'data': "authors"
+ 'width': "25%",
+ 'data': null,
+ 'render': function(data, type, row, meta) {
+ author_list = data.authors.split(",")
+ if (author_list.length >= 6) {
+ return author_list.slice(0, 6).join(",") + ", et al."
+ } else{
+ return data.authors
+ }
+ }
},
{
'title': "Year",
@@ -387,7 +408,7 @@
postfixButtons: [ 'colvisRestore' ]
}
],
- 'sDom': "Btir",
+ 'sDom': "Bitir",
'autoWidth': false,
'deferRender': true,
'paging': false,
@@ -399,25 +420,6 @@
}
} );
- if (trait_list.length > 20) {
- $('#trait_table').append(
- '<tfoot>' +
- '<tr>' +
- '<th></th>' +
- '<th>Index</th>' +
- '<th>Record</th>' +
- '<th>Symbol</th> ' +
- '<th>Description</th>' +
- '<th>Location</th>' +
- '<th>Mean</th>' +
- '<th>Max LRS <a href="http://genenetwork.org//glossary.html#LRS" target="_blank" style="color: white;"><sup>?</sup></a></th>' +
- '<th>Max LRS Location</th>' +
- '<th>Additive Effect <a href="http://genenetwork.org//glossary.html#A" target="_blank" style="color: white;"><sup>?</sup></a></th>' +
- '</tr>' +
- '</tfoot>'
- );
- }
-
console.timeEnd("Creating table");
$('#redraw').click(function() {
diff --git a/wqflask/wqflask/templates/show_trait.html b/wqflask/wqflask/templates/show_trait.html
index 378f91b1..ff000ced 100644
--- a/wqflask/wqflask/templates/show_trait.html
+++ b/wqflask/wqflask/templates/show_trait.html
@@ -18,7 +18,7 @@
<div class="container">
<h2>Trait Data and Analysis for <b>{{ this_trait.name }}</b></h2>
{% if this_trait.dataset.type != 'Publish' %}
- <h3>{{ this_trait.description_fmt }}</h3>
+ <h3>{{ this_trait.description_fmt[0]|upper }}{{ this_trait.description_fmt[1:] }}</h3>
{% endif %}
</div>
@@ -39,7 +39,7 @@
<input type="hidden" name="covariates" value="">
<input type="hidden" name="transform" value="">
- <div class="container">
+ <div class="container" style="min-width: 1450px;">
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading" data-toggle="collapse" data-parent="#accordion" data-target="#collapseOne" aria-expanded="true">
@@ -183,10 +183,10 @@
var x = getValue(a);
var y = getValue(b);
- if (x == 'x' || x == '') {
+ if (x == 'x' || x === '') {
return 1;
}
- else if (y == 'x' || y == '') {
+ else if (y == 'x' || y === '') {
return -1;
}
else {
@@ -296,7 +296,7 @@
if (data.value == null) {
return '<input type="text" data-value="x" data-qnorm="x" data-zscore="x" name="value:' + data.name + '" style="text-align: right;" class="trait_value_input edit_sample_value" value="x" size=6 maxlength=6>'
} else {
- return '<input type="text" data-value="' + data.value.toFixed(3) + '" data-qnorm="' + js_data['qnorm_values'][0][parseInt(data.this_id)] + '" data-zscore="' + js_data['zscore_values'][0][parseInt(data.this_id)] + '" name="value:' + data.name + '" style="text-align: right;" class="trait_value_input edit_sample_value" value="' + data.value.toFixed(3) + '" size=6 maxlength=6>'
+ return '<input type="text" data-value="' + data.value.toFixed(3) + '" data-qnorm="' + js_data['qnorm_values'][0][parseInt(data.this_id) - 1] + '" data-zscore="' + js_data['zscore_values'][0][parseInt(data.this_id) - 1] + '" name="value:' + data.name + '" style="text-align: right;" class="trait_value_input edit_sample_value" value="' + data.value.toFixed(3) + '" size=6 maxlength=6>'
}
}
}{% if sample_groups[0].se_exists() %},
diff --git a/wqflask/wqflask/templates/show_trait_details.html b/wqflask/wqflask/templates/show_trait_details.html
index 09f36021..63a87825 100644
--- a/wqflask/wqflask/templates/show_trait_details.html
+++ b/wqflask/wqflask/templates/show_trait_details.html
@@ -1,62 +1,68 @@
<table class="table">
<tr>
- <td>Species and Group</td>
+ <td width="150px"><b>Species and Group</b></td>
<td>{{ this_trait.dataset.group.species }}, {{ this_trait.dataset.group.name }}</td>
</tr>
{% if this_trait.dataset.type == 'Publish' %}
<tr>
- <td>Phenotype</td>
+ <td><b>Phenotype</b></td>
<td><div style="width:40%;">{{ this_trait.description_fmt }}</div></td>
</tr>
<tr>
- <td>Authors</td>
+ <td><b>Authors</b></td>
<td><div style="width:40%;">{{ this_trait.authors }}</div></td>
</tr>
<tr>
- <td>Title</td>
+ <td><b>Title</b></td>
<td><div style="width:40%;">{{ this_trait.title }}</div></td>
</tr>
<tr>
- <td>Journal</td>
- <td>{{ this_trait.journal }} (<a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids={{ this_trait.pubmed_id }}&dop=Abstract" title="PubMed">{{ this_trait.year }}</a>)</td>
+ <td><b>Journal</b></td>
+ <td>{{ this_trait.journal }} ({% if this_trait.pubmed_id %}<a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids={{ this_trait.pubmed_id }}&dop=Abstract" target="_blank" title="PubMed">{{ this_trait.year }}</a>{% else %}{{ this_trait.year }}{% endif %})</td>
</tr>
{% else %}
<tr>
- <td>Tissue</td>
+ <td><b>Tissue</b></td>
<td>{{ this_trait.dataset.tissue }}</td>
</tr>
{% endif %}
{% if this_trait.dataset.type == 'ProbeSet' %}
{% if this_trait.symbol != None %}
<tr>
- <td>Gene Symbol</td>
+ <td><b>Gene Symbol</b></td>
<td>{{ this_trait.symbol }}</td>
</tr>
{% endif %}
<tr>
- <td>Aliases</td>
- <td>{{ this_trait.alias_fmt|replace(",",";") }}</td>
+ <td><b>Aliases</b></td>
+ <td>Wikidata: {{ this_trait.wikidata_alias_fmt|replace(",",";") }}</td>
+ </tr>
+ {% if this_trait.alias_fmt != "Not Available" %}
+ <tr>
+ <td></td>
+ <td>GeneNetwork: {{ this_trait.alias_fmt|replace(",",";") }}</td>
</tr>
{% endif %}
+ {% endif %}
{% if this_trait.dataset.type != 'Publish' %}
<tr>
- <td>Location</td>
+ <td><b>Location</b></td>
<td>{{ this_trait.location_fmt }}</td>
</tr>
{% endif %}
<tr>
- <td>Database</td>
+ <td><b>Database</b></td>
<td>
- <a href="http://genenetwork.org/webqtl/main.py?FormID=sharinginfo&InfoPageName={{ dataset.name }}">
+ <a href="http://genenetwork.org/webqtl/main.py?FormID=sharinginfo&InfoPageName={{ dataset.name }}" target="_blank">
{{ dataset.fullname }}
</a>
</td>
</tr>
{% if this_trait.probe_set_specificity %}
<tr>
- <td>Target Score</td>
+ <td><b>Target Score</b></td>
<td>
- <a href="http://genenetwork.org/blatInfo.html" title="Values higher than 2 for the specificity are good">
+ <a href="http://genenetwork.org/blatInfo.html" target="_blank" title="Values higher than 2 for the specificity are good">
BLAT Specificity
</a>:
{{ "%0.3f" | format(this_trait.probe_set_specificity|float) }}
@@ -69,103 +75,109 @@
{% endif %}
{% if this_trait.pubmed_id or this_trait.geneid or this_trait.omim or this_trait.symbol %}
<tr>
- <td>Resource Links</td>
+ <td><b>Resource Links</b></td>
<td>
{% if pubmed_link %}
- <a href="{{ pubmed_link }}" title="PubMed">
+ <a href="{{ pubmed_link }}" target="_blank" title="PubMed">
PubMed
</a>
{% endif %}
{% if ncbi_gene_link %}
- <a href="{{ ncbi_gene_link }}" title="Info from NCBI Entrez Gene">
+ <a href="{{ ncbi_gene_link }}" target="_blank" title="Info from NCBI Entrez Gene">
Gene
</a>
&nbsp;&nbsp;
{% endif %}
{% if omim_link %}
- <a href="{{ omim_link }}" title="Summary from On Mendelion Inheritance in Man">
+ <a href="{{ omim_link }}" target="_blank" title="Summary from On Mendelion Inheritance in Man">
OMIM
</a>
&nbsp;&nbsp;
{% endif %}
- {% if unigene_link %}
- <a href="{{ unigene_link }}" title="NCBI UniGene">
- UniGene
+ {% if genemania_link %}
+ <a href="{{ genemania_link }}" target="_blank" title="GeneMANIA">
+ GeneMANIA
</a>
&nbsp;&nbsp;
{% endif %}
- {% if genbank_link %}
- <a href="{{ genbank_link }}" title="Find the original GenBank sequence used to design the probes">
- GenBank
+ {% if protein_atlas_link %}
+ <a href="{{ protein_atlas_link }}" target="_blank" title="Human Protein Atlas">
+ Protein Atlas
+ </a>
+ &nbsp;&nbsp;
+ {% endif %}
+ {% if open_targets_link %}
+ <a href="{{ open_targets_link }}" target="_blank" title="Open Targets">
+ Open Targets
</a>
&nbsp;&nbsp;
{% endif %}
{% if homologene_link %}
- <a href="{{ homologene_link }}" title="Find similar genes in other species">
+ <a href="{{ homologene_link }}" target="_blank" title="Find similar genes in other species">
HomoloGene
</a>
&nbsp;&nbsp;
{% endif %}
{% if this_trait.symbol %}
- <a href="{{ genotation_link }}" title="Related descriptive, genomic, clinical, functional and drug-therapy information">
+ <a href="{{ genotation_link }}" target="_blank" title="Related descriptive, genomic, clinical, functional and drug-therapy information">
Genotation
</a>
&nbsp;&nbsp;
- <a href="{{ gtex_link }}" title="GTEx Portal">
+ <a href="{{ gtex_link }}" target="_blank" title="GTEx Portal">
GTEx Portal
</a>
&nbsp;&nbsp;
{% if genebridge_link %}
- <a href="{{ genebridge_link }}">
+ <a href="{{ genebridge_link }}" target="_blank">
GeneBridge
</a>
{% endif %}
{% endif %}
<br>
{% if ucsc_blat_link %}
- <a href="{{ ucsc_blat_link }}" title="Info from UCSC Genome Browser">
+ <a href="{{ ucsc_blat_link }}" target="_blank" title="Info from UCSC Genome Browser">
UCSC
</a>
&nbsp;&nbsp;
{% endif %}
{% if biogps_link %}
- <a href="{{ biogps_link }}" title="Expression across many tissues and cell types">
+ <a href="{{ biogps_link }}" target="_blank" title="Expression across many tissues and cell types">
BioGPS
</a>
&nbsp;&nbsp;
{% endif %}
{% if string_link %}
- <a href="{{ string_link }}" title="Protein interactions: known and inferred">
+ <a href="{{ string_link }}" target="_blank" title="Protein interactions: known and inferred">
STRING
</a>
&nbsp;&nbsp;
{% endif %}
{% if panther_link %}
- <a href="{{ panther_link }}" title="Gene and protein data resources from Celera-ABI">
+ <a href="{{ panther_link }}" target="_blank" title="Gene and protein data resources from Celera-ABI">
PANTHER
</a>
&nbsp;&nbsp;
{% endif %}
{% if gemma_link %}
- <a href="{{ gemma_link }}" title="Meta-analysis of gene expression data">
+ <a href="{{ gemma_link }}" target="_blank" title="Meta-analysis of gene expression data">
Gemma
</a>
&nbsp;&nbsp;
{% endif %}
{% if aba_link %}
- <a href="{{ aba_link }}" title="Allen Brain Atlas">
+ <a href="{{ aba_link }}" target="_blank" title="Allen Brain Atlas">
ABA
</a>
&nbsp;&nbsp;
{% endif %}
{% if ebi_gwas_link %}
- <a href="{{ ebi_gwas_link }}" title="EBI GWAS">
+ <a href="{{ ebi_gwas_link }}" target="_blank" title="EBI GWAS">
EBI GWAS
</a>
&nbsp;&nbsp;
{% endif %}
{% if wiki_pi_link %}
- <a href="{{ wiki_pi_link }}" title="Wiki-Pi">
+ <a href="{{ wiki_pi_link }}" target="_blank" title="Wiki-Pi">
Wiki-Pi
</a>
&nbsp;&nbsp;
@@ -207,6 +219,9 @@
</a>
{% endif %}
{% endif %}
+ <a target="_blank" href="http://www.genenetwork.org/webqtl/main.py?cmd=show&db={{ this_trait.dataset.name }}&probeset={{ this_trait.name }}">
+ <button type="button" id="view_in_gn1" class="btn btn-primary" title="View Trait in GN1">View in GN1</button>
+ </a>
</div>
</div>
diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html
index b5c37b8b..1a67dce8 100644
--- a/wqflask/wqflask/templates/show_trait_mapping_tools.html
+++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html
@@ -1,6 +1,6 @@
<div>
{% if dataset.group.mapping_names|length > 0 %}
- <div class="col-xs-5">
+ <div class="col-xs-4" style="min-width: 600px;">
<div class="tabbable"> <!-- Only required for left/right tabs -->
<ul class="nav nav-pills">
@@ -9,7 +9,7 @@
<a href="#gemma" data-toggle="tab">GEMMA</a>
</li>
<li class="mapping_tab">
- <a href="#interval_mapping" data-toggle="tab">Interval Mapping</a>
+ <a href="#interval_mapping" data-toggle="tab">Haley-Knott Regression</a>
</li>
<li class="mapping_tab rqtl">
<a href="#rqtl_geno" data-toggle="tab">R/qtl</a>
@@ -116,6 +116,15 @@
<div class="tab-pane" id="interval_mapping">
<div style="margin-top: 20px" class="form-horizontal">
<div class="mapping_method_fields form-group">
+ <label for="reaper_version" style="text-align: right;" class="col-xs-3 control-label">Version<sup><a title="'New' is the new qtlreaper implementation written in RUST by Christian Fischer. 'Original' corresponds to the original version written in C.">?</a></sup></label>
+ <div style="margin-left:20px;" class="col-xs-3 controls">
+ <select name="reaper_version" class="form-control">
+ <option value="new">New</option>
+ <option value="original">Original</option>
+ </select>
+ </div>
+ </div>
+ <div class="mapping_method_fields form-group">
<label for="chr_select" style="text-align: right;" class="col-xs-3 control-label">Chromosome</label>
<div style="margin-left:20px;" class="col-xs-2 controls">
<select id="chr_reaper" class="form-control">
@@ -150,13 +159,15 @@
</div>
</div>
<div class="mapping_method_fields form-group">
- <label style="text-align: right;" for="control_for" class="col-xs-3 control-label">Control&nbsp;for</label>
+ <label style="text-align: right;" for="control_for" class="col-xs-3 control-label">Control&nbsp;for<br>Cofactors</label>
<div style="margin-left:20px;" class="col-xs-6 controls">
{% if dataset.type == 'ProbeSet' and this_trait.locus_chr != "" %}
- <input name="control_reaper" value="{{ nearest_marker }}" type="text" style="width: 160px;" class="form-control" />
+ <input name="control_reaper" value="{{ nearest_marker }}" type="text" style="width: 160px; display: inline-block;" class="form-control" />
{% else %}
- <input name="control_reaper" value="" type="text" class="form-control" />
+ <input name="control_reaper" value="" type="text" style="display: inline-block; padding-right: 10px;" class="form-control" />
{% endif %}
+ <input type="radio" name="do_control_reaper" value="true"> Yes&nbsp;&nbsp;<input type="radio" name="do_control_reaper" value="false" checked="" style="margin-left: 10px;"> No</span>
+ <!--
<label class="radio-inline">
<input type="radio" name="do_control_reaper" value="true">
Yes
@@ -165,6 +176,7 @@
<input type="radio" name="do_control_reaper" value="false" checked="">
No
</label>
+ -->
</div>
</div>
@@ -193,14 +205,14 @@
</div>
-->
<div class="mapping_method_fields form-group">
- <label style="text-align: right;" class="col-xs-3 control-label">Marker<br>Regression</label>
+ <label style="text-align: right;" class="col-xs-3 control-label">Interval Map</label>
<div style="margin-left:20px;" class="col-xs-6 controls">
<label class="radio-inline">
- <input type="radio" name="manhattan_plot_reaper" value="True">
+ <input type="radio" name="manhattan_plot_reaper" value="False" checked="">
Yes
</label>
<label class="radio-inline">
- <input type="radio" name="manhattan_plot_reaper" value="False" checked="">
+ <input type="radio" name="manhattan_plot_reaper" value="True">
No
</label>
</div>
@@ -342,14 +354,15 @@
</div>
</div>
</div>
- <div class="col-xs-5">
+ <div class="col-xs-6">
<dl>
<dt>GEMMA</dt>
<dd>GEMMA is software implementing the Genome-wide Efficient Mixed Model Association algorithm for a standard linear mixed model for genome-wide association studies (GWAS).</dd>
{% if dataset.group.mapping_id == "1" %}
- <dt>Interval Mapping</dt>
- <dd>Interval mapping is a process in which the statistical significance of a hypothetical QTL is evaluated at regular points across a chromosome, even in the absence of explicit genotype data at those points.</dd>
- <dt>R/qtl</dt>
+ <dt style="margin-top: 20px;">Haley-Knott Regression</dt>
+ <dd>This method is implementing using the tool QTLReaper. Interval mapping (the last option) is a process in which the statistical significance of a hypothetical QTL is evaluated at regular points across a chromosome, even in the absence of explicit genotype data at those points.<br><br>
+ The default option is a version of QTLReaper rewritten in RUST that should fix some of the issues the original had. You can still use the original with the Version option.</dd>
+ <dt style="margin-top: 20px;">R/qtl</dt>
<dd>R/qtl is an extensible, interactive environment for mapping quantitative trait loci (QTL) in experimental crosses.</dd>
{% endif %}
</dl>
diff --git a/wqflask/wqflask/templates/snp_browser.html b/wqflask/wqflask/templates/snp_browser.html
index 9d85f767..4422ba73 100644
--- a/wqflask/wqflask/templates/snp_browser.html
+++ b/wqflask/wqflask/templates/snp_browser.html
@@ -383,6 +383,8 @@
return '<input type="checkbox" name="trait_check">'
}
}, {
+ 'data': 'index'
+ }, {
'data': 'indel_name'
}, {
'data': 'indel_type'
@@ -393,11 +395,11 @@
}, {
'data': 'indel_mb_e'
}, {
- 'data': 'strand'
+ 'data': 'indel_strand'
}, {
- 'data': 'size'
+ 'data': 'indel_size'
}, {
- 'data': 'sequence'
+ 'data': 'indel_sequence'
}, {
'data': 'source_name'
}
diff --git a/wqflask/wqflask/templates/submit_trait.html b/wqflask/wqflask/templates/submit_trait.html
index c9f716bf..0dd38fe5 100644
--- a/wqflask/wqflask/templates/submit_trait.html
+++ b/wqflask/wqflask/templates/submit_trait.html
@@ -8,7 +8,7 @@
{{ flash_me() }}
<div class="row" style="width: 1400px !important;">
- <div class="col-xs-5">
+ <div class="col-xs-3">
<section id="description">
<div>
<h2 style="color: #5a5a5a;">Introduction</h2>
@@ -33,7 +33,7 @@
<h2 style="color: #5a5a5a;">Trait Submission Form</h2>
<hr>
<div style="padding-bottom: 50px;" class="form-horizontal">
- <h3>1. Choose cross or RI set:</h3>
+ <h3>1. Choose Species and Group:</h3>
<br>
<div class="col-xs-2" style="min-height: 15vh; display: flex; align-items: center;">
<img src="/static/new/images/step1.gif">
@@ -52,7 +52,6 @@
</div>
</div>
</div>
- <div class="form-horizontal"><img src="/static/new/images/arrowdown.gif" style="display:block; margin-left: 50%; margin-right: 50%;"></div>
</div>
<div style="padding-bottom: 50px;" class="form-horizontal">
<h3>2. Enter Trait Data:</h3>
@@ -66,9 +65,9 @@
<div class="form-group" style="padding-left: 15px;">
<p>
<b>From a File:</b> You can enter data by entering a file name here. The file should contain a series of numbers representing trait values.
- The values can be on one line separated by spaces or tabs, or they can be on separate lines. Include one value for each progeny individual
- or recombinant inbred line. Represent missing values with a non-numeric character such as "x". If you have chosen a recombinant inbred set,
- when you submit your data will be displayed in a form where you can confirm and/or edit them. If you enter a file name here, any data that
+ The values can be on one line separated by spaces or tabs, or they can be on separate lines. Include one value for each progeny individual
+ or recombinant inbred line. Represent missing values with a non-numeric character such as "x". If you have chosen a recombinant inbred set,
+ when you submit your data will be displayed in a form where you can confirm and/or edit them. If you enter a file name here, any data that
you paste into the next section will be ignored.
</p>
<input type="file" name="trait_file" style="border-width: 1px; border-style: solid; border-color: #999999;">
@@ -77,10 +76,10 @@
<div class="form-group" style="padding-left: 15px;">
<p>
<b>Paste or Type Multiple Values:</b> You can enter data by pasting a series of numbers representing trait values into this area.
- The values can be on one line separated by spaces or tabs, or they can be on separate lines. Include one value for each progeny individual
- or recombinant inbredline. Represent missing values with a non-numeric character such as "x". If you have chosen a recombinant inbred set,
- when you submit your data will be displayed in a form where you can confirm and/or edit them. If you enter a file name in the previous section,
- any data that you paste here will be ignored. Check sample data for the correct format.
+ The values can be on one line separated by spaces or tabs, or they can be on separate lines. Include one value for each individual
+ or line. Use an "x" for missing values. If you have chosen a set of inbred strains, then your data will be displayed in a form in
+ which you can confirm and/or edit. If you enter a file name in the previous section,
+ any data that you paste here will be ignored. Check <a href="http://genenetwork.org/RIsample.html">sample data</a> for the correct format.
</p>
<textarea name="trait_paste" rows="6" cols="70"></textarea>
</div>
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 109e30cc..cef5f8ec 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -80,7 +80,7 @@ def connect_db():
db = getattr(g, '_database', None)
if db is None:
logger.debug("Get new database connector")
- g.db = g._database = sqlalchemy.create_engine(SQL_URI)
+ g.db = g._database = sqlalchemy.create_engine(SQL_URI, encoding="latin1")
logger.debug(g.db)
@app.teardown_appcontext
@@ -560,6 +560,7 @@ def loading_page():
logger.info(request.url)
initial_start_vars = request.form
start_vars_container = {}
+ num_vals = 0 #ZS: So it can be displayed on loading page
if 'wanted_inputs' in initial_start_vars:
wanted = initial_start_vars['wanted_inputs'].split(",")
start_vars = {}
@@ -567,6 +568,15 @@ def loading_page():
if key in wanted or key.startswith(('value:')):
start_vars[key] = value
+ if 'primary_samples' in start_vars:
+ samples = start_vars['primary_samples'].split(",")
+ for sample in samples:
+ value = start_vars.get('value:' + sample)
+ if value != "x":
+ num_vals += 1
+
+ start_vars['num_vals'] = num_vals
+
start_vars_container['start_vars'] = start_vars
else:
start_vars_container['start_vars'] = initial_start_vars
@@ -588,7 +598,7 @@ def mapping_results_page():
'samples',
'vals',
'first_run',
- 'gwa_filename',
+ 'output_files',
'geno_db_exists',
'method',
'mapping_results_path',
@@ -628,7 +638,9 @@ def mapping_results_page():
'haplotypeAnalystCheck',
'mapmethod_rqtl_geno',
'mapmodel_rqtl_geno',
- 'temp_trait'
+ 'temp_trait',
+ 'reaper_version',
+ 'num_vals'
)
start_vars = {}
for key, value in initial_start_vars.iteritems():
@@ -659,36 +671,36 @@ def mapping_results_page():
if template_vars.no_results:
rendered_template = render_template("mapping_error.html")
else:
- if template_vars.mapping_method != "gemma" and template_vars.mapping_method != "plink":
- template_vars.js_data = json.dumps(template_vars.js_data,
- default=json_default_handler,
- indent=" ")
-
- result = template_vars.__dict__
-
- if result['pair_scan']:
- with Bench("Rendering template"):
- img_path = result['pair_scan_filename']
- logger.info("img_path:", img_path)
- initial_start_vars = request.form
- logger.info("initial_start_vars:", initial_start_vars)
- imgfile = open(TEMPDIR + img_path, 'rb')
- imgdata = imgfile.read()
- imgB64 = imgdata.encode("base64")
- bytesarray = array.array('B', imgB64)
- result['pair_scan_array'] = bytesarray
- rendered_template = render_template("pair_scan_results.html", **result)
- else:
- gn1_template_vars = display_mapping_results.DisplayMappingResults(result).__dict__
- #pickled_result = pickle.dumps(result, pickle.HIGHEST_PROTOCOL)
- #logger.info("pickled result length:", len(pickled_result))
- #Redis.set(key, pickled_result)
- #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)
- rendered_template = render_template("mapping_results.html", **gn1_template_vars)
+ #if template_vars.mapping_method != "gemma" and template_vars.mapping_method != "plink":
+ template_vars.js_data = json.dumps(template_vars.js_data,
+ default=json_default_handler,
+ indent=" ")
+
+ result = template_vars.__dict__
+
+ if result['pair_scan']:
+ with Bench("Rendering template"):
+ img_path = result['pair_scan_filename']
+ logger.info("img_path:", img_path)
+ initial_start_vars = request.form
+ logger.info("initial_start_vars:", initial_start_vars)
+ imgfile = open(TEMPDIR + img_path, 'rb')
+ imgdata = imgfile.read()
+ imgB64 = imgdata.encode("base64")
+ bytesarray = array.array('B', imgB64)
+ result['pair_scan_array'] = bytesarray
+ rendered_template = render_template("pair_scan_results.html", **result)
+ else:
+ gn1_template_vars = display_mapping_results.DisplayMappingResults(result).__dict__
+ #pickled_result = pickle.dumps(result, pickle.HIGHEST_PROTOCOL)
+ #logger.info("pickled result length:", len(pickled_result))
+ #Redis.set(key, pickled_result)
+ #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)
+ rendered_template = render_template("mapping_results.html", **gn1_template_vars)
return rendered_template
@@ -797,6 +809,17 @@ def get_temp_data():
temp_uuid = request.args['key']
return flask.jsonify(temp_data.TempData(temp_uuid).get_all())
+@app.route("/browser_input", methods=('GET',))
+def browser_inputs():
+ """ Returns JSON from tmp directory for the purescript genome browser"""
+
+ filename = request.args['filename']
+
+ with open("{}/gn2/".format(TEMPDIR) + filename + ".json", "r") as the_file:
+ file_contents = json.load(the_file)
+
+ return flask.jsonify(file_contents)
+
##########################################################################
def json_default_handler(obj):