diff --git a/fs-check.js b/fs-check.js
index a743ce9..95cba40 100644
--- a/fs-check.js
+++ b/fs-check.js
@@ -63,7 +63,6 @@ module.exports = {
* was born before the marriage.
*/
var utils = _dereq_('../util'),
- help = _dereq_('../help'),
GedcomXDate = _dereq_('gedcomx-date');
module.exports = {
@@ -120,7 +119,8 @@ module.exports = {
}
// For each child in this marriage, check to see if they
- // have a birth date and if it's before the marriage date
+ // have a birth date, if the relationships are biologica,
+ // and if the birth date is before the marriage date
for(var j = 0; j < children.length; j++){
var rel = children[j],
@@ -132,6 +132,11 @@ module.exports = {
continue;
}
+ // Short-circuit if the relationships are not biological
+ if(!utils.isBiologicalChildAndParents(rel)){
+ continue;
+ }
+
var birth = child.$getBirth();
// Short-circuit if the child has no birth fact
@@ -186,7 +191,7 @@ module.exports = {
}
}
};
-},{"../help":39,"../util":41,"gedcomx-date":48}],3:[function(_dereq_,module,exports){
+},{"../util":41,"gedcomx-date":48}],3:[function(_dereq_,module,exports){
/**
* Returns an opportunity if two children are born less than 9 months apart
*/
@@ -1420,47 +1425,37 @@ module.exports = {
return;
}
- var biologicalFathers = 0,
- biologicalMothers = 0;
+ var biologicalParentIds = {};
- // For each parent, begin by assuming they are biological.
- // We do this because a large percentage of parent relationships
- // do not have type specified.
for(var i = 0; i < parentRelationships.length; i++){
var relationship = parentRelationships[i],
+ fatherId = relationship.$getFatherId(),
+ motherId = relationship.$getMotherId(),
fatherFacts = relationship.$getFatherFacts(),
- motherFacts = relationship.$getMotherFacts(),
- biologicalFather = true,
- biologicalMother = true;
- for(var j = 0; biologicalFather && j < fatherFacts.length; j++){
- if(fatherFacts[j].type !== 'http://gedcomx.org/BiologicalParent'){
- biologicalFather = false;
+ motherFacts = relationship.$getMotherFacts();
+ if(fatherId && fatherFacts){
+ for(var j = 0; j < fatherFacts.length; j++){
+ if(fatherFacts[j].type === 'http://gedcomx.org/BiologicalParent'){
+ biologicalParentIds[fatherId] = true;
+ }
}
}
- for(var j = 0; biologicalMother && j < motherFacts.length; j++){
- if(motherFacts[j].type !== 'http://gedcomx.org/BiologicalParent'){
- biologicalMother = false;
+ if(motherId && motherFacts){
+ for(var j = 0; j < motherFacts.length; j++){
+ if(motherFacts[j].type === 'http://gedcomx.org/BiologicalParent'){
+ biologicalParentIds[motherId] = true;
+ }
}
}
- if(biologicalFather){
- biologicalFathers++;
- }
- if(biologicalMother){
- biologicalMothers++;
- }
}
- if(biologicalFathers < 2 && biologicalMothers < 2){
- return;
+ if(Object.keys(biologicalParentIds).length > 2){
+ var template = {
+ name: person.$getDisplayName(),
+ pid: person.id
+ };
+ return utils.createOpportunity(this, person, template);
}
-
- var template = {
- name: person.$getDisplayName(),
- pid: person.id
- };
-
- return utils.createOpportunity(this, person, template);
-
}
};
},{"../help":39,"../util":41}],29:[function(_dereq_,module,exports){
@@ -2405,6 +2400,45 @@ utils.ensureFullDate = function(date, newMonth, newDay){
}
}
+
+
+/**
+ * Returns true if both parents are biological
+ * or true if only one parents exists and that parent is biological.
+ * Returns false if any non-biological parent relationships exist.
+ */
+utils.isBiologicalChildAndParents = function(childAndParents){
+ var fatherFacts = childAndParents.$getFatherFacts(),
+ motherFacts = childAndParents.$getMotherFacts();
+
+ if(childAndParents.$getFatherId()){
+ if(!fatherFacts || !containsBiologicalParentFact(fatherFacts)){
+ return false;
+ }
+ }
+
+ if(childAndParents.$getMotherId()){
+ if(!motherFacts || !containsBiologicalParentFact(motherFacts)){
+ return false;
+ }
+ }
+
+ return true;
+};
+
+/**
+ * Helper function used by isBiologicalChildAndParents.
+ * Returns true if the array of facts contains a BiologicalParent fact.
+ */
+function containsBiologicalParentFact(facts){
+ for(var i = 0; i < facts.length; i++){
+ if(facts[i].type === 'http://gedcomx.org/BiologicalParent'){
+ return true;
+ }
+ }
+ return false;
+};
+
/**
* Polyfill. Returns true or false;
*/
diff --git a/fs-check.min.js b/fs-check.min.js
index b455f09..f088f62 100644
--- a/fs-check.min.js
+++ b/fs-check.min.js
@@ -1,7 +1,8 @@
-!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.FSCheck=e()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o0){var template={pid:person.id,personName:person.$getDisplayName(),personBirth:person.$getDisplayBirthDate(),parents:birthBeforeParentBirth};return utils.createOpportunity(this,person,template)}}}},{"../help":39,"../util":41}],2:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help"),GedcomXDate=_dereq_("gedcomx-date");module.exports={id:"childBeforeMarriage",type:"problem",signature:"relationships",help:["addingAndCorrecting"],check:function(person,relationships,persons){var marriages=relationships.getSpouseRelationships(),childrenBeforeMarriage=[];if(marriages.length===0){return}for(var i=0;i0){var children=[];for(var i=0;i1){duplicates.push(simplified[s])}}if(duplicates.length>0){var template={pid:person.id,name:person.$getDisplayName(),duplicates:duplicates};return utils.createOpportunity(this,person,template)}}}},{"../help":39,"../util":41}],6:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"manyAlternateNames",type:"cleanup",signature:"person",help:["addingAndCorrecting","customEvents"],check:function(person){var names=person.$getNames();if(names&&names.length>=6){var alternates=[];for(var i=0;i0){var spouses=[];for(var i=0;i0){var spouses=[];for(var i=0;i1,spouse:spouses[0],spouses:spouses};return utils.createOpportunity(this,person,template)}}}},{"../util.js":41}],9:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingBirth",type:"person",signature:"person",help:[],check:function(person){var birth=person.$getBirth();if(birth){if(utils.getFactPlace(birth)!==undefined||utils.getFactYear(birth)!==undefined){return}}var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}},{"../util.js":41}],10:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingBirthDate",type:"person",signature:"person",help:[],check:function(person){var birth=person.$getBirth();if(!birth){return}if(utils.getFactYear(birth)!==undefined){return}var place=utils.getFactPlace(birth);if(place===undefined){return}var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}},{"../util.js":41}],11:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingBirthPlace",type:"person",signature:"person",help:[],check:function(person){var birth=person.$getBirth();if(!birth){return}if(utils.getFactPlace(birth)!==undefined){return}var year=utils.getFactYear(birth);if(year===undefined){return}var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}},{"../util.js":41}],12:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingBirthSource",type:"source",signature:"personSource",help:[],check:function(person,sourceRefs){var birth=person.$getBirth();if(!birth){return}var year=utils.getFactYear(birth),place=utils.getFactPlace(birth);if(year===undefined||place===undefined){return}var sourceArr=sourceRefs.getSourceRefs(),tagged=false;for(var x in sourceArr){if(sourceArr[x].$getTags().indexOf("http://gedcomx.org/Birth")!==-1){tagged=true}}if(!tagged){var findarecord={tags:["birth"],from:year?year-3:undefined,to:year?year+3:undefined,place:place};var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}}},{"../util.js":41}],13:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingDeath",type:"person",signature:"person",help:[],check:function(person){var death=person.$getDeath();if(death){if(utils.getFactPlace(death)!==undefined||utils.getFactYear(death)!==undefined){return}}var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}},{"../util.js":41}],14:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingDeathDate",type:"person",signature:"person",help:[],check:function(person){var death=person.$getDeath();if(!death){return}if(utils.getFactYear(death)!==undefined){return}var place=utils.getFactPlace(death);if(place===undefined){return}var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}},{"../util.js":41}],15:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingDeathPlace",type:"person",signature:"person",help:[],check:function(person){var death=person.$getDeath();if(!death){return}if(utils.getFactPlace(death)!==undefined){return}var year=utils.getFactYear(death);if(year===undefined){return}var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}},{"../util.js":41}],16:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingDeathSource",type:"source",signature:"personSource",help:[],check:function(person,sourceRefs){var death=person.$getDeath();if(!death){return}var year=utils.getFactYear(death),place=utils.getFactPlace(death);if(year===undefined||place==undefined){return}var sourceArr=sourceRefs.getSourceRefs(),tagged=false;for(var x in sourceArr){if(sourceArr[x].$getTags().indexOf("http://gedcomx.org/Death")!==-1){tagged=true}}if(!tagged){var findarecord={tags:["death"],from:year?year-3:undefined,to:year?year+3:undefined,place:place};var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}}},{"../util.js":41}],17:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingFather",type:"family",signature:"child",help:[],check:function(child,mother,father,childRelationship){if(!father){var birth=child.$getBirth(),birthYear,birthPlace;if(birth){birthYear=utils.getFactYear(birth);birthPlace=utils.getFactPlace(birth)}var template={mothername:mother.$getDisplayName(),mid:mother.id,name:child.$getDisplayName(),pid:child.id};var gensearch={givenName:child.$getGivenName(),familyName:child.$getSurname(),birthPlace:birthPlace,birthDate:birthYear+"",motherGivenName:mother.$getGivenName(),motherFamilyName:mother.$getSurname()};return utils.createOpportunity(this,child,template,gensearch)}}}},{"../util.js":41}],18:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"missingGivenName",type:"person",signature:"person",help:["addingAndCorrecting","customEvents"],check:function(person){var givenName=person.$getGivenName(),surname=person.$getSurname();if(surname&&(givenName===undefined||givenName==="")){return utils.createOpportunity(this,person,{},utils.gensearchPerson(person))}}}},{"../help":39,"../util":41}],19:[function(_dereq_,module,exports){var utils=_dereq_("../util");module.exports={id:"missingMarriageDate",type:"family",signature:"marriage",help:[],check:function(wife,husband,marriage){if(!wife||!husband){return}var facts=marriage.$getFacts(),count=0;for(var x in facts){if(facts[x].type=="http://gedcomx.org/Marriage"){count++}}if(count!=1){return}var marriageFact=marriage.$getMarriageFact();if(utils.getFactYear(marriageFact)!==undefined){return}var place=utils.getFactPlace(marriageFact);if(place===undefined){return}var template={crid:marriage.id,wid:wife.id,hid:husband.id,wifeName:wife.$getDisplayName(),husbandName:husband.$getDisplayName()};var gensearch=utils.gensearchPerson(wife);gensearch.marriagePlace=place;gensearch.spouseGivenName=husband.$getGivenName();gensearch.spouseFamilyName=husband.$getSurname();return utils.createOpportunity(this,wife,template,gensearch)}}},{"../util":41}],20:[function(_dereq_,module,exports){var utils=_dereq_("../util");module.exports={id:"missingMarriageFact",type:"family",signature:"marriage",help:[],check:function(wife,husband,marriage){if(!wife||!husband){return}var facts=marriage.$getFacts(),count=0;for(var x in facts){if(facts[x].type=="http://gedcomx.org/Marriage"){count++}}if(count>1){return}var marriageFact=marriage.$getMarriageFact();if(marriageFact&&(utils.getFactYear(marriageFact)!==undefined||utils.getFactPlace(marriageFact)!==undefined)){return}var template={crid:marriage.id,wid:wife.id,hid:husband.id,wifeName:wife.$getDisplayName(),husbandName:husband.$getDisplayName()};var gensearch=utils.gensearchPerson(wife);gensearch.spouseGivenName=husband.$getGivenName();gensearch.spouseFamilyName=husband.$getSurname();return utils.createOpportunity(this,wife,template,gensearch)}}},{"../util":41}],21:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingMarriagePlace",type:"family",signature:"marriage",help:[],check:function(wife,husband,marriage){if(!wife||!husband){return}var facts=marriage.$getFacts(),count=0;for(var x in facts){if(facts[x].type=="http://gedcomx.org/Marriage"){count++}}if(count!=1){return}var marriageFact=marriage.$getMarriageFact();if(utils.getFactPlace(marriageFact)!==undefined){return}var date=utils.getFactYear(marriageFact);if(date===undefined){return}var template={crid:marriage.id,wid:wife.id,hid:husband.id,wifeName:wife.$getDisplayName(),husbandName:husband.$getDisplayName()};var gensearch=utils.gensearchPerson(wife);gensearch.marriageDate=date+"";gensearch.spouseGivenName=husband.$getGivenName();gensearch.spouseFamilyName=husband.$getSurname();return utils.createOpportunity(this,wife,template,gensearch)}}},{"../util.js":41}],22:[function(_dereq_,module,exports){var utils=_dereq_("../util");module.exports={id:"missingMarriageSource",type:"source",signature:"marriageSource",help:[],check:function(wife,husband,marriage,sourceRefs){var marriageFact=marriage.$getMarriageFact();if(!marriageFact){return}var person=wife,spouse=husband;if(!person){return}var facts=marriage.$getFacts(),count=0;for(var x in facts){if(facts[x].type=="http://gedcomx.org/Marriage"){count++}}if(count!=1){return}var marriageYear=utils.getFactYear(marriageFact),marriagePlace=utils.getFactPlace(marriageFact);if(marriageYear==undefined||marriagePlace==undefined){return}if(sourceRefs.length>0){return}var template={cid:marriage.id,couple:wife.$getDisplayName()+" and "+husband.$getDisplayName(),wifeName:wife.$getDisplayName(),husbandName:husband.$getDisplayName(),wid:wife.id,hid:husband.id};var gensearch=utils.gensearchPerson(person);gensearch.marriageDate=marriageYear+"";gensearch.marriagePlace=marriagePlace;if(spouse!==undefined){gensearch.spouseGivenName=spouse.$getGivenName();gensearch.spouseFamilyName=spouse.$getSurname()}return utils.createOpportunity(this,person,template,gensearch)}}},{"../util":41}],23:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingMother",type:"family",signature:"child",help:[],check:function(child,mother,father,childRelationship){if(!mother){var birth=child.$getBirth(),birthYear,birthPlace;if(birth){birthYear=utils.getFactYear(birth);birthPlace=utils.getFactPlace(birth)}var template={fathername:father.$getDisplayName(),fid:father.id,name:child.$getDisplayName(),pid:child.id};var gensearch={givenName:child.$getGivenName(),familyName:child.$getSurname(),birthPlace:birthPlace,birthDate:birthYear+"",fatherGivenName:father.$getGivenName(),fatherFamilyName:father.$getSurname()};return utils.createOpportunity(this,child,template,gensearch)}}}},{"../util.js":41}],24:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"missingName",type:"person",signature:"person",help:["addingAndCorrecting","customEvents"],check:function(person){if(!person.names||person.names.length===0){return utils.createOpportunity(this,person,{},utils.gensearchPerson(person))}}}},{"../help":39,"../util":41}],25:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingParents",type:"family",signature:"parents",help:[],check:function(child,parents){if(!parents||parents.length===0){var birth=child.$getBirth(),birthYear,birthPlace;if(birth){birthYear=utils.getFactYear(birth);birthPlace=utils.getFactPlace(birth)}var template={name:child.$getDisplayName(),pid:child.id};return utils.createOpportunity(this,child,template,utils.gensearchPerson(child))}}}},{"../util.js":41}],26:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"missingSurname",type:"person",signature:"person",help:["addingAndCorrecting","customEvents"],check:function(person){var givenName=person.$getGivenName(),surname=person.$getSurname();if(givenName&&(surname===undefined||surname==="")){return utils.createOpportunity(this,person,{},utils.gensearchPerson(person))}}}},{"../help":39,"../util":41}],27:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"multipleMarriageFacts",type:"cleanup",signature:"marriage",help:["addingAndCorrecting"],check:function(wife,husband,marriage){if(!wife||!husband){return}var facts=marriage.$getFacts(),count=0;for(var x in facts){if(facts[x].type==="http://gedcomx.org/Marriage"){count++}}if(count<2){return}var template={crid:marriage.id,wifeName:wife.$getDisplayName(),husbandName:husband.$getDisplayName()};return utils.createOpportunity(this,wife,template,utils.gensearchPerson(wife))}}},{"../help":39,"../util":41}],28:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"multipleParents",type:"family",signature:"relationships",help:["addingAndCorrecting"],check:function(person,relationships,people){var parentRelationships=relationships.getParentRelationships();if(parentRelationships.length<2){return}var biologicalFathers=0,biologicalMothers=0;for(var i=0;i1){var names=person.$getNames(),badNames=[];for(var i=0;i0){template.badNames=badNames;template.preferred=false;return utils.createOpportunity(this,person,template)}}}}},{"../help":39,"../util":41}],30:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"possibleDuplicates",type:"problem",signature:"duplicates",help:["mergingDuplicates"],check:function(person,matches){var count=matches.getResultsCount();if(count===0){return}var goodMatches=0,results=matches.getSearchResults();for(var i=0;i=3){goodMatches++}}if(goodMatches===0){return}var template={pid:person.id,name:person.$getDisplayName(),count:goodMatches,singular:goodMatches===1};return utils.createOpportunity(this,person,template)}}},{"../help":39,"../util":41}],31:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"recordHints",type:"source",signature:"recordHints",help:["recordHints"],check:function(person,matches){var count=matches.getResultsCount();if(count===0){return}var results=matches.getSearchResults(),titles=[];for(var i=0;i\!\@\#\$\%\^\&\*\+\=\/\|\\\?\_]/g;module.exports={id:"unusualCharactersInName",type:"cleanup",signature:"person",help:["addingAndCorrecting","customEvents"],check:function(person){var name=person.$getPreferredName(),nameText=name&&name.$getFullText()?name.$getFullText():"",nameMatches=nameText.match(badChars),template;if(nameMatches){template={chars:"`"+nameMatches.join("`, `")+"`",pid:person.id,brackets:nameText.match(/(\([^\)]*\))|(\{[^\}]*\})|(\[[^\]]*\])|(\<[^\>]*\>)/)!==null,preferred:true}}else if(person.$getNames().length>1){var names=person.$getNames(),badNames=[];for(var i=0;i0){template={badNames:badNames,pid:person.id,preferred:false}}}if(template){return utils.createOpportunity(this,person,template)}}}},{"../help":39,"../util":41}],39:[function(_dereq_,module,exports){module.exports={addingAndCorrecting:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Adding-and-Correcting-Information-about-People-and-Relationships",customEvents:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Adding-a-Custom-Event-or-Fact-to-a-Person",deletingInformation:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Deleting-a-Person-from-the-System",mergingDuplicates:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Merging-Duplicate-Records-in-Family-Tree-1381814853391",nonexactDates:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Do-not-know-exact-birth-date-or-death-date",recordHints:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Record-Hints",standardizing:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Entering-Standardized-Dates-and-Places"}},{}],40:[function(_dereq_,module,exports){var utils=_dereq_("./util"),help=_dereq_("./help");var checks=[_dereq_("./checks/birthBeforeParentsBirth"),_dereq_("./checks/childBeforeMarriage"),_dereq_("./checks/childrenTooClose"),_dereq_("./checks/deathBeforeBirth"),_dereq_("./checks/duplicateNames"),_dereq_("./checks/manyAlternateNames"),_dereq_("./checks/marriageAfterDeath"),_dereq_("./checks/marriageWithNoChildren"),_dereq_("./checks/missingBirth"),_dereq_("./checks/missingBirthDate"),_dereq_("./checks/missingBirthPlace"),_dereq_("./checks/missingBirthSource"),_dereq_("./checks/missingDeath"),_dereq_("./checks/missingDeathDate"),_dereq_("./checks/missingDeathPlace"),_dereq_("./checks/missingDeathSource"),_dereq_("./checks/missingFather"),_dereq_("./checks/missingGivenName"),_dereq_("./checks/missingMarriageDate"),_dereq_("./checks/missingMarriageFact"),_dereq_("./checks/missingMarriagePlace"),_dereq_("./checks/missingMarriageSource"),_dereq_("./checks/missingMother"),_dereq_("./checks/missingName"),_dereq_("./checks/missingParents"),_dereq_("./checks/missingSurname"),_dereq_("./checks/multipleMarriageFacts"),_dereq_("./checks/multipleParents"),_dereq_("./checks/orInName"),_dereq_("./checks/possibleDuplicates"),_dereq_("./checks/recordHints"),_dereq_("./checks/standardizeBirthDate"),_dereq_("./checks/standardizeBirthPlace"),_dereq_("./checks/standardizeDeathDate"),_dereq_("./checks/standardizeDeathPlace"),_dereq_("./checks/standardizeMarriageDate"),_dereq_("./checks/standardizeMarriagePlace"),_dereq_("./checks/unusualCharactersInName")];
+!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.FSCheck=e()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o0){var template={pid:person.id,personName:person.$getDisplayName(),personBirth:person.$getDisplayBirthDate(),parents:birthBeforeParentBirth};return utils.createOpportunity(this,person,template)}}}},{"../help":39,"../util":41}],2:[function(_dereq_,module,exports){var utils=_dereq_("../util"),GedcomXDate=_dereq_("gedcomx-date");module.exports={id:"childBeforeMarriage",type:"problem",signature:"relationships",help:["addingAndCorrecting"],check:function(person,relationships,persons){var marriages=relationships.getSpouseRelationships(),childrenBeforeMarriage=[];if(marriages.length===0){return}for(var i=0;i0){var children=[];for(var i=0;i1){duplicates.push(simplified[s])}}if(duplicates.length>0){var template={pid:person.id,name:person.$getDisplayName(),duplicates:duplicates};return utils.createOpportunity(this,person,template)}}}},{"../help":39,"../util":41}],6:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"manyAlternateNames",type:"cleanup",signature:"person",help:["addingAndCorrecting","customEvents"],check:function(person){var names=person.$getNames();if(names&&names.length>=6){var alternates=[];for(var i=0;i0){var spouses=[];for(var i=0;i0){var spouses=[];for(var i=0;i1,spouse:spouses[0],spouses:spouses};return utils.createOpportunity(this,person,template)}}}},{"../util.js":41}],9:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingBirth",type:"person",signature:"person",help:[],check:function(person){var birth=person.$getBirth();if(birth){if(utils.getFactPlace(birth)!==undefined||utils.getFactYear(birth)!==undefined){return}}var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}},{"../util.js":41}],10:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingBirthDate",type:"person",signature:"person",help:[],check:function(person){var birth=person.$getBirth();if(!birth){return}if(utils.getFactYear(birth)!==undefined){return}var place=utils.getFactPlace(birth);if(place===undefined){return}var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}},{"../util.js":41}],11:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingBirthPlace",type:"person",signature:"person",help:[],check:function(person){var birth=person.$getBirth();if(!birth){return}if(utils.getFactPlace(birth)!==undefined){return}var year=utils.getFactYear(birth);if(year===undefined){return}var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}},{"../util.js":41}],12:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingBirthSource",type:"source",signature:"personSource",help:[],check:function(person,sourceRefs){var birth=person.$getBirth();if(!birth){return}var year=utils.getFactYear(birth),place=utils.getFactPlace(birth);if(year===undefined||place===undefined){return}var sourceArr=sourceRefs.getSourceRefs(),tagged=false;for(var x in sourceArr){if(sourceArr[x].$getTags().indexOf("http://gedcomx.org/Birth")!==-1){tagged=true}}if(!tagged){var findarecord={tags:["birth"],from:year?year-3:undefined,to:year?year+3:undefined,place:place};var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}}},{"../util.js":41}],13:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingDeath",type:"person",signature:"person",help:[],check:function(person){var death=person.$getDeath();if(death){if(utils.getFactPlace(death)!==undefined||utils.getFactYear(death)!==undefined){return}}var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}},{"../util.js":41}],14:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingDeathDate",type:"person",signature:"person",help:[],check:function(person){var death=person.$getDeath();if(!death){return}if(utils.getFactYear(death)!==undefined){return}var place=utils.getFactPlace(death);if(place===undefined){return}var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}},{"../util.js":41}],15:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingDeathPlace",type:"person",signature:"person",help:[],check:function(person){var death=person.$getDeath();if(!death){return}if(utils.getFactPlace(death)!==undefined){return}var year=utils.getFactYear(death);if(year===undefined){return}var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}},{"../util.js":41}],16:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingDeathSource",type:"source",signature:"personSource",help:[],check:function(person,sourceRefs){var death=person.$getDeath();if(!death){return}var year=utils.getFactYear(death),place=utils.getFactPlace(death);if(year===undefined||place==undefined){return}var sourceArr=sourceRefs.getSourceRefs(),tagged=false;for(var x in sourceArr){if(sourceArr[x].$getTags().indexOf("http://gedcomx.org/Death")!==-1){tagged=true}}if(!tagged){var findarecord={tags:["death"],from:year?year-3:undefined,to:year?year+3:undefined,place:place};var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template,utils.gensearchPerson(person))}}}},{"../util.js":41}],17:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingFather",type:"family",signature:"child",help:[],check:function(child,mother,father,childRelationship){if(!father){var birth=child.$getBirth(),birthYear,birthPlace;if(birth){birthYear=utils.getFactYear(birth);birthPlace=utils.getFactPlace(birth)}var template={mothername:mother.$getDisplayName(),mid:mother.id,name:child.$getDisplayName(),pid:child.id};var gensearch={givenName:child.$getGivenName(),familyName:child.$getSurname(),birthPlace:birthPlace,birthDate:birthYear+"",motherGivenName:mother.$getGivenName(),motherFamilyName:mother.$getSurname()};return utils.createOpportunity(this,child,template,gensearch)}}}},{"../util.js":41}],18:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"missingGivenName",type:"person",signature:"person",help:["addingAndCorrecting","customEvents"],check:function(person){var givenName=person.$getGivenName(),surname=person.$getSurname();if(surname&&(givenName===undefined||givenName==="")){return utils.createOpportunity(this,person,{},utils.gensearchPerson(person))}}}},{"../help":39,"../util":41}],19:[function(_dereq_,module,exports){var utils=_dereq_("../util");module.exports={id:"missingMarriageDate",type:"family",signature:"marriage",help:[],check:function(wife,husband,marriage){if(!wife||!husband){return}var facts=marriage.$getFacts(),count=0;for(var x in facts){if(facts[x].type=="http://gedcomx.org/Marriage"){count++}}if(count!=1){return}var marriageFact=marriage.$getMarriageFact();if(utils.getFactYear(marriageFact)!==undefined){return}var place=utils.getFactPlace(marriageFact);if(place===undefined){return}var template={crid:marriage.id,wid:wife.id,hid:husband.id,wifeName:wife.$getDisplayName(),husbandName:husband.$getDisplayName()};var gensearch=utils.gensearchPerson(wife);gensearch.marriagePlace=place;gensearch.spouseGivenName=husband.$getGivenName();gensearch.spouseFamilyName=husband.$getSurname();return utils.createOpportunity(this,wife,template,gensearch)}}},{"../util":41}],20:[function(_dereq_,module,exports){var utils=_dereq_("../util");module.exports={id:"missingMarriageFact",type:"family",signature:"marriage",help:[],check:function(wife,husband,marriage){if(!wife||!husband){return}var facts=marriage.$getFacts(),count=0;for(var x in facts){if(facts[x].type=="http://gedcomx.org/Marriage"){count++}}if(count>1){return}var marriageFact=marriage.$getMarriageFact();if(marriageFact&&(utils.getFactYear(marriageFact)!==undefined||utils.getFactPlace(marriageFact)!==undefined)){return}var template={crid:marriage.id,wid:wife.id,hid:husband.id,wifeName:wife.$getDisplayName(),husbandName:husband.$getDisplayName()};var gensearch=utils.gensearchPerson(wife);gensearch.spouseGivenName=husband.$getGivenName();gensearch.spouseFamilyName=husband.$getSurname();return utils.createOpportunity(this,wife,template,gensearch)}}},{"../util":41}],21:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingMarriagePlace",type:"family",signature:"marriage",help:[],check:function(wife,husband,marriage){if(!wife||!husband){return}var facts=marriage.$getFacts(),count=0;for(var x in facts){if(facts[x].type=="http://gedcomx.org/Marriage"){count++}}if(count!=1){return}var marriageFact=marriage.$getMarriageFact();if(utils.getFactPlace(marriageFact)!==undefined){return}var date=utils.getFactYear(marriageFact);if(date===undefined){return}var template={crid:marriage.id,wid:wife.id,hid:husband.id,wifeName:wife.$getDisplayName(),husbandName:husband.$getDisplayName()};var gensearch=utils.gensearchPerson(wife);gensearch.marriageDate=date+"";gensearch.spouseGivenName=husband.$getGivenName();gensearch.spouseFamilyName=husband.$getSurname();return utils.createOpportunity(this,wife,template,gensearch)}}},{"../util.js":41}],22:[function(_dereq_,module,exports){var utils=_dereq_("../util");module.exports={id:"missingMarriageSource",type:"source",signature:"marriageSource",help:[],check:function(wife,husband,marriage,sourceRefs){var marriageFact=marriage.$getMarriageFact();if(!marriageFact){return}var person=wife,spouse=husband;if(!person){return}var facts=marriage.$getFacts(),count=0;for(var x in facts){if(facts[x].type=="http://gedcomx.org/Marriage"){count++}}if(count!=1){return}var marriageYear=utils.getFactYear(marriageFact),marriagePlace=utils.getFactPlace(marriageFact);if(marriageYear==undefined||marriagePlace==undefined){return}if(sourceRefs.length>0){return}var template={cid:marriage.id,couple:wife.$getDisplayName()+" and "+husband.$getDisplayName(),wifeName:wife.$getDisplayName(),husbandName:husband.$getDisplayName(),wid:wife.id,hid:husband.id};var gensearch=utils.gensearchPerson(person);gensearch.marriageDate=marriageYear+"";gensearch.marriagePlace=marriagePlace;if(spouse!==undefined){gensearch.spouseGivenName=spouse.$getGivenName();gensearch.spouseFamilyName=spouse.$getSurname()}return utils.createOpportunity(this,person,template,gensearch)}}},{"../util":41}],23:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingMother",type:"family",signature:"child",help:[],check:function(child,mother,father,childRelationship){if(!mother){var birth=child.$getBirth(),birthYear,birthPlace;if(birth){birthYear=utils.getFactYear(birth);birthPlace=utils.getFactPlace(birth)}var template={fathername:father.$getDisplayName(),fid:father.id,name:child.$getDisplayName(),pid:child.id};var gensearch={givenName:child.$getGivenName(),familyName:child.$getSurname(),birthPlace:birthPlace,birthDate:birthYear+"",fatherGivenName:father.$getGivenName(),fatherFamilyName:father.$getSurname()};return utils.createOpportunity(this,child,template,gensearch)}}}},{"../util.js":41}],24:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"missingName",type:"person",signature:"person",help:["addingAndCorrecting","customEvents"],check:function(person){if(!person.names||person.names.length===0){return utils.createOpportunity(this,person,{},utils.gensearchPerson(person))}}}},{"../help":39,"../util":41}],25:[function(_dereq_,module,exports){var utils=_dereq_("../util.js");module.exports={id:"missingParents",type:"family",signature:"parents",help:[],check:function(child,parents){if(!parents||parents.length===0){var birth=child.$getBirth(),birthYear,birthPlace;if(birth){birthYear=utils.getFactYear(birth);birthPlace=utils.getFactPlace(birth)}var template={name:child.$getDisplayName(),pid:child.id};return utils.createOpportunity(this,child,template,utils.gensearchPerson(child))}}}},{"../util.js":41}],26:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"missingSurname",type:"person",signature:"person",help:["addingAndCorrecting","customEvents"],check:function(person){var givenName=person.$getGivenName(),surname=person.$getSurname();if(givenName&&(surname===undefined||surname==="")){return utils.createOpportunity(this,person,{},utils.gensearchPerson(person))}}}},{"../help":39,"../util":41}],27:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"multipleMarriageFacts",type:"cleanup",signature:"marriage",help:["addingAndCorrecting"],check:function(wife,husband,marriage){if(!wife||!husband){return}var facts=marriage.$getFacts(),count=0;for(var x in facts){if(facts[x].type==="http://gedcomx.org/Marriage"){count++}}if(count<2){return}var template={crid:marriage.id,wifeName:wife.$getDisplayName(),husbandName:husband.$getDisplayName()};return utils.createOpportunity(this,wife,template,utils.gensearchPerson(wife))}}},{"../help":39,"../util":41}],28:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"multipleParents",type:"family",signature:"relationships",help:["addingAndCorrecting"],check:function(person,relationships,people){var parentRelationships=relationships.getParentRelationships();if(parentRelationships.length<2){return}var biologicalParentIds={};for(var i=0;i2){var template={name:person.$getDisplayName(),pid:person.id};return utils.createOpportunity(this,person,template)}}}},{"../help":39,"../util":41}],29:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help"),regex=/ or /;module.exports={id:"orInName",type:"cleanup",signature:"person",help:["addingAndCorrecting","customEvents"],check:function(person){var name=person.$getPreferredName(),nameText=name&&name.$getFullText()?name.$getFullText():"",nameMatches=nameText.match(regex),template={pid:person.id};if(nameMatches){template.preferred=true;return utils.createOpportunity(this,person,template)}else if(person.$getNames().length>1){var names=person.$getNames(),badNames=[];for(var i=0;i0){template.badNames=badNames;template.preferred=false;return utils.createOpportunity(this,person,template)}}}}},{"../help":39,"../util":41}],30:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"possibleDuplicates",type:"problem",signature:"duplicates",help:["mergingDuplicates"],check:function(person,matches){var count=matches.getResultsCount();if(count===0){return}var goodMatches=0,results=matches.getSearchResults();for(var i=0;i=3){goodMatches++}}if(goodMatches===0){return}var template={pid:person.id,name:person.$getDisplayName(),count:goodMatches,singular:goodMatches===1};return utils.createOpportunity(this,person,template)}}},{"../help":39,"../util":41}],31:[function(_dereq_,module,exports){var utils=_dereq_("../util"),help=_dereq_("../help");module.exports={id:"recordHints",type:"source",signature:"recordHints",help:["recordHints"],check:function(person,matches){var count=matches.getResultsCount();if(count===0){return}var results=matches.getSearchResults(),titles=[];for(var i=0;i\!\@\#\$\%\^\&\*\+\=\/\|\\\?\_]/g;module.exports={id:"unusualCharactersInName",type:"cleanup",signature:"person",help:["addingAndCorrecting","customEvents"],check:function(person){var name=person.$getPreferredName(),nameText=name&&name.$getFullText()?name.$getFullText():"",nameMatches=nameText.match(badChars),template;if(nameMatches){template={chars:"`"+nameMatches.join("`, `")+"`",pid:person.id,brackets:nameText.match(/(\([^\)]*\))|(\{[^\}]*\})|(\[[^\]]*\])|(\<[^\>]*\>)/)!==null,preferred:true}}else if(person.$getNames().length>1){var names=person.$getNames(),badNames=[];for(var i=0;i0){template={badNames:badNames,pid:person.id,preferred:false}}}if(template){return utils.createOpportunity(this,person,template)}}}},{"../help":39,"../util":41}],39:[function(_dereq_,module,exports){module.exports={addingAndCorrecting:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Adding-and-Correcting-Information-about-People-and-Relationships",customEvents:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Adding-a-Custom-Event-or-Fact-to-a-Person",deletingInformation:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Deleting-a-Person-from-the-System",mergingDuplicates:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Merging-Duplicate-Records-in-Family-Tree-1381814853391",nonexactDates:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Do-not-know-exact-birth-date-or-death-date",recordHints:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Record-Hints",standardizing:"https://familysearch.org/ask/salesforce/viewArticle?urlname=Entering-Standardized-Dates-and-Places"}},{}],40:[function(_dereq_,module,exports){var utils=_dereq_("./util"),help=_dereq_("./help");var checks=[_dereq_("./checks/birthBeforeParentsBirth"),_dereq_("./checks/childBeforeMarriage"),_dereq_("./checks/childrenTooClose"),_dereq_("./checks/deathBeforeBirth"),_dereq_("./checks/duplicateNames"),_dereq_("./checks/manyAlternateNames"),_dereq_("./checks/marriageAfterDeath"),_dereq_("./checks/marriageWithNoChildren"),_dereq_("./checks/missingBirth"),_dereq_("./checks/missingBirthDate"),_dereq_("./checks/missingBirthPlace"),_dereq_("./checks/missingBirthSource"),_dereq_("./checks/missingDeath"),_dereq_("./checks/missingDeathDate"),_dereq_("./checks/missingDeathPlace"),_dereq_("./checks/missingDeathSource"),_dereq_("./checks/missingFather"),_dereq_("./checks/missingGivenName"),_dereq_("./checks/missingMarriageDate"),_dereq_("./checks/missingMarriageFact"),_dereq_("./checks/missingMarriagePlace"),_dereq_("./checks/missingMarriageSource"),_dereq_("./checks/missingMother"),_dereq_("./checks/missingName"),_dereq_("./checks/missingParents"),_dereq_("./checks/missingSurname"),_dereq_("./checks/multipleMarriageFacts"),_dereq_("./checks/multipleParents"),_dereq_("./checks/orInName"),_dereq_("./checks/possibleDuplicates"),_dereq_("./checks/recordHints"),_dereq_("./checks/standardizeBirthDate"),_dereq_("./checks/standardizeBirthPlace"),_dereq_("./checks/standardizeDeathDate"),_dereq_("./checks/standardizeDeathPlace"),_dereq_("./checks/standardizeMarriageDate"),_dereq_("./checks/standardizeMarriagePlace"),_dereq_("./checks/unusualCharactersInName")];
-var ids={};for(var i=0;i"+text+"\n"};utils.getFactYear=function(fact){if(fact.$getFormalDate()){var simple=utils.getSimpleFormalDate(fact.$getFormalDate());if(simple){return simple.getYear()}}else if(fact.$getDate()){return utils.extractYearFromDateString(fact.$getDate())}};utils.getFactPlace=function(fact){if(fact.$getNormalizedPlace()){return fact.$getNormalizedPlace()}else if(fact.$getPlace()){return fact.$getPlace()}};utils.getFormalDate=function(fact){if(fact.$getFormalDate()){var date=utils.getSimpleFormalDate(fact.$getFormalDate());if(date){return date.toFormalString()}}else if(fact.$getDate()){if(/^\d{4}$/.test(fact.$getDate())){return"+"+fact.$getDate()}else{var date=new Date(fact.$getDate());if(isNaN(date.getTime())){return}else{return GedcomXDate.fromJSDate(date).toFormalString().substring(0,11)}}}};utils.getSimpleFormalDate=function(formalDateString){try{var date=new GedcomXDate(formalDateString);if(date.getType()!="single"){if(date.getStart()&&!date.getEnd()){date=date.getStart()}else if(!date.getStart()&&date.getEnd()){date=date.getEnd()}else{var start=date.getStart(),duration=date.getDuration(),halfDuration=GedcomXDate.multiplyDuration(duration,.5);date=GedcomXDate.addDuration(start,halfDuration)}}return date}catch(error){if(console.error){console.error("Error parsing "+formalDateString);console.error(error)}}};utils.extractYearFromDateString=function(date){if(/^\d{4}$/.test(date)){return date}else{var year=new Date(date).getFullYear();if(parseInt(year)==year){return year}}};utils.markdown=function(text,data,partials){return marked(mustache.render(text,data,partials),{renderer:renderer})};utils.gensearchPerson=function(person){var gensearch={};var givenName=person.$getGivenName();if(givenName){gensearch.givenName=givenName}var familyName=person.$getSurname();if(familyName){gensearch.familyName=familyName}var birth=person.$getBirth();if(birth!==undefined){var birthPlace=utils.getFactPlace(birth);if(birthPlace){gensearch.birthPlace=birthPlace}var birthDate=utils.getFactYear(birth);if(birthDate){gensearch.birthDate=birthDate+""}}var death=person.$getDeath();if(death!==undefined){var deathPlace=utils.getFactPlace(death);if(deathPlace){gensearch.deathPlace=deathPlace}var deathDate=utils.getFactYear(death);if(deathDate){gensearch.deathDate=deathDate+""}}return gensearch};utils.compareFormalDates=function(date1,date2){return GedcomXDate.compare(date1,date2)};utils.createOpportunity=function(check,person,template,gensearch){return{id:check.id+":"+person.id,type:check.type,checkId:check.id,personId:person.id,person:person,gensearch:gensearch,template:template}};utils.isFullDate=function(date){if(isString(date)){return date.length>=11}else{try{if(isUndefined(date.getYear())||isUndefined(date.getMonth())||isUndefined(date.getDay())){return false}else{return true}}catch(e){throw new Error("Expected either a formal date string or a GedcomXDate simple object.")}}};utils.ensureFullDate=function(date,newMonth,newDay){try{if(!newMonth){newMonth=1}if(newMonth>12){newMonth=12}if(!newDay){newDay=1}if(isUndefined(date.getMonth())){date._month=newMonth}if(isUndefined(date.getDay())){var validDayMax=GedcomXDate.daysInMonth(date.getMonth(),date.getYear());if(newDay>validDayMax){newDay=validDayMax}date._day=newDay}}catch(e){throw new Error("Expected date to be a GedcomXDate object.")}};if(!Array.isArray){Array.isArray=function(arg){return Object.prototype.toString.call(arg)==="[object Array]"}}function isString(obj){return typeof obj==="string"||obj instanceof String}function isUndefined(obj){return typeof obj==="undefined"}},{"gedcomx-date":48,marked:54,mustache:55}],42:[function(_dereq_,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],43:[function(_dereq_,module,exports){var process=module.exports={};process.nextTick=function(){var canSetImmediate=typeof window!=="undefined"&&window.setImmediate;var canPost=typeof window!=="undefined"&&window.postMessage&&window.addEventListener;if(canSetImmediate){return function(f){return window.setImmediate(f)}}if(canPost){var queue=[];window.addEventListener("message",function(ev){var source=ev.source;if((source===window||source===null)&&ev.data==="process-tick"){ev.stopPropagation();if(queue.length>0){var fn=queue.shift();fn()}}},true);return function nextTick(fn){queue.push(fn);window.postMessage("process-tick","*")}}return function nextTick(fn){setTimeout(fn,0)}}();process.title="browser";process.browser=true;process.env={};process.argv=[];function noop(){}process.on=noop;process.once=noop;process.off=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")}},{}],44:[function(_dereq_,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],45:[function(_dereq_,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i-1){if(array){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=_dereq_("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=_dereq_("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}).call(this,_dereq_("/home/ubuntu/workspace/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":44,"/home/ubuntu/workspace/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":43,inherits:42}],46:[function(_dereq_,module,exports){var util=_dereq_("util"),Simple=_dereq_("./simple.js");function Approximate(){if(arguments.length>0){if(arguments[0].length<1||arguments[0].charAt(0)!="A"){throw new Error("Invalid Approximate Date")}try{Simple.call(this,arguments[0].substr(1))}catch(e){throw new Error(e.message+" in Approximate Date")}}else{Simple.call(this)}}util.inherits(Approximate,Simple);Approximate.prototype.isApproximate=function(){return true};Approximate.prototype.toFormalString=function(){return"A"+Approximate.super_.prototype.toFormalString.call(this)};module.exports=Approximate},{"./simple.js":51,util:45}],47:[function(_dereq_,module,exports){function Duration(str){if(str.length<1||str.charAt(0)!="P"){throw new Error("Invalid Duration")}var duration=str.substr(1);if(duration.length<1){throw new Error("Invalid Duration")}if(/\s/.test(duration)){throw new Error("Non normalized durations not implemented")}else{this._parseNormalized(duration)}}Duration.prototype._parseNormalized=function(str){var duration=str.split(""),currentNum="",inTime=false,seen=[],valid=["Y","Mo","D","T","H","Mi","S"];for(var x in duration){var character=duration[x];if(/[0-9]/.test(character)){currentNum+=character+"";continue}switch(character){case"Y":if(currentNum.length<1){throw new Error("Invalid Duration: invalid years")}if(seen.indexOf("Y")!=-1){throw new Error("Invalid Duration: duplicate years")}if(valid.indexOf("Y")==-1){throw new Error("Invalid Duration: years out of order")}this._years=parseInt(currentNum,10);seen.push("Y");valid=valid.slice(valid.indexOf("Y")+1);currentNum="";break;case"M":if(inTime){if(currentNum.length<1){throw new Error("Invalid Duration: invalid minutes")}if(seen.indexOf("Mi")!=-1){throw new Error("Invalid Duration: duplicate minutes")}if(valid.indexOf("Mi")==-1){throw new Error("Invalid Duration: minutes out of order")}this._minutes=parseInt(currentNum,10);seen.push("Mi");valid=valid.slice(valid.indexOf("Mi")+1);currentNum=""}else{if(currentNum.length<1){throw new Error("Invalid Duration: invalid months")}if(seen.indexOf("Mo")!=-1){throw new Error("Invalid Duration: duplicate months")}if(valid.indexOf("Mo")==-1){throw new Error("Invalid Duration: months out of order")}this._months=parseInt(currentNum,10);valid=valid.slice(valid.indexOf("Mo")+1);seen.push("Mo");currentNum=""}break;case"D":if(currentNum.length<1){throw new Error("Invalid Duration: invalid days")}if(seen.indexOf("D")!=-1){throw new Error("Invalid Duration: duplicate days")}if(valid.indexOf("D")==-1){throw new Error("Invalid Duration: days out of order")}this._days=parseInt(currentNum,10);seen.push("D");valid=valid.slice(valid.indexOf("D")+1);currentNum="";break;case"H":if(!inTime){throw new Error("Invalid Duration: Missing T before hours")}if(currentNum.length<1){throw new Error("Invalid Duration: invalid hours")}if(seen.indexOf("H")!=-1){throw new Error("Invalid Duration: duplicate hours")}if(valid.indexOf("H")==-1){throw new Error("Invalid Duration: hours out of order")}this._hours=parseInt(currentNum,10);seen.push("H");valid=valid.slice(valid.indexOf("H")+1);currentNum="";break;case"S":if(!inTime){throw new Error("Invalid Duration: Missing T before seconds")}if(currentNum.length<1){throw new Error("Invalid Duration: invalid seconds")}if(seen.indexOf("S")!=-1){throw new Error("Invalid Duration: duplicate seconds")}this._seconds=parseInt(currentNum,10);seen.push("S");valid=[];currentNum="";break;case"T":if(seen.indexOf("T")!=-1){throw new Error("Invalid Duration: duplicate T")}inTime=true;seen.push("T");valid=valid.slice(valid.indexOf("T")+1);break;default:throw new Error("Invalid Duration: Unknown Letter "+character)}}if(currentNum!=""){throw new Error("Invalid Duration: No letter after "+currentNum)}};Duration.prototype.getType=function(){return"duration"};Duration.prototype.isApproximate=function(){return false};Duration.prototype.getYears=function(){return this._years};Duration.prototype.getMonths=function(){return this._months};Duration.prototype.getDays=function(){return this._days};Duration.prototype.getHours=function(){return this._hours};Duration.prototype.getMinutes=function(){return this._minutes};Duration.prototype.getSeconds=function(){return this._seconds};Duration.prototype.toFormalString=function(){var duration="P";if(this._years){duration+=this._years+"Y"}if(this._months){duration+=this._months+"M"}if(this._days){duration+=this._days+"D"}if(this._hours||this._minutes||this._seconds){duration+="T";if(this._hours){duration+=this._hours+"H"}if(this._minutes){duration+=this._minutes+"M"}if(this._seconds){duration+=this._seconds+"S"}}return duration};module.exports=Duration},{}],48:[function(_dereq_,module,exports){var GedUtil=_dereq_("./util.js"),Simple=_dereq_("./simple.js"),Approximate=_dereq_("./approximate.js"),Recurring=_dereq_("./recurring.js"),Range=_dereq_("./range.js");function GedcomXDate(str){if(str==""){throw new Error("Invalid Date")}if(str.charAt(0)=="R"){return new Recurring(str)}else if(/\//.test(str)){return new Range(str)}else if(str.charAt(0)=="A"){return new Approximate(str)}else{return new Simple(str)}}GedcomXDate.version="0.3.2";GedcomXDate.addDuration=GedUtil.addDuration;GedcomXDate.multiplyDuration=GedUtil.multiplyDuration;GedcomXDate.getDuration=GedUtil.getDuration;GedcomXDate.daysInMonth=GedUtil.daysInMonth;GedcomXDate.now=GedUtil.now;GedcomXDate.fromJSDate=GedUtil.fromJSDate;GedcomXDate.compare=GedUtil.compare;module.exports=GedcomXDate},{"./approximate.js":46,"./range.js":49,"./recurring.js":50,"./simple.js":51,"./util.js":53}],49:[function(_dereq_,module,exports){var GedUtil=_dereq_("./util.js"),Simple=_dereq_("./simple.js"),Duration=_dereq_("./duration.js"),Approximate=_dereq_("./approximate.js");function Range(str){var range=str;if(range.charAt(0)=="A"){this._approximate=true;range=str.substr(1)}var parts=range.split("/");if(parts.length!=2||!parts[0]&&!parts[1]){throw new Error("Invalid Date Range")}if(parts[0]){try{this.start=new Simple(parts[0])}catch(e){throw new Error(e.message+" in Range Start Date")}}if(parts[1]){if(parts[1].charAt(0)=="P"){if(!this.start){throw new Error("A Range may not end with a duration if missing a start date")}try{this.duration=new Duration(parts[1])}catch(e){throw new Error(e.message+" in Range End Date")}this.end=GedUtil.addDuration(this.start,this.duration)}else{try{this.end=new Simple(parts[1])}catch(e){throw new Error(e.message+" in Range End Date")}if(this.start){this.duration=GedUtil.getDuration(this.start,this.end)}}}}Range.prototype.getType=function(){return"range"};Range.prototype.isApproximate=function(){if(this._approximate){return true}else{return false}};Range.prototype.getStart=function(){return this.start};Range.prototype.getDuration=function(){return this.duration};Range.prototype.getEnd=function(){return this.end};Range.prototype.toFormalString=function(){var range="";if(this._approximate){range+="A"}if(this.start){range+=this.start.toFormalString()}range+="/";if(this.duration){range+=this.duration.toFormalString()}else if(this.end){range+=this.end.toFormalString()}return range};module.exports=Range},{"./approximate.js":46,"./duration.js":47,"./simple.js":51,"./util.js":53}],50:[function(_dereq_,module,exports){var util=_dereq_("util"),GedUtil=_dereq_("./util.js"),Range=_dereq_("./range.js");function Recurring(str){var parts=str.split("/");if(str.charAt(0)!="R"||parts.length!=3){throw new Error("Invalid Recurring Date")}if(!parts[1]||!parts[2]){throw new Error("Recurring must have a start and end")}var countNum=parts[0].substr(1);if(countNum){if(!/^[0-9]+$/.test(countNum)){throw new Error("Invalid recurrence count: not a number")}this.count=parseInt(countNum,10);if(this.count<0)throw new Error("Invalid recurrence count")}Range.call(this,parts[1]+"/"+parts[2]);delete this.end;if(this.count){this.end=this.getNth(this.count)}}util.inherits(Recurring,Range);Recurring.prototype.getType=function(){return"recurring"};Recurring.prototype.getCount=function(){if(this.count==undefined){return Infinity}else{return this.count}};Recurring.prototype.getNth=function(multiplier){var duration=GedUtil.multiplyDuration(this.duration,multiplier);return GedUtil.addDuration(this.start,duration)};Recurring.prototype.toFormalString=function(){var range=Recurring.super_.prototype.toFormalString.call(this);if(this.count){return"R"+this.count+"/"+range}else{return"R/"+range}};module.exports=Recurring},{"./range.js":49,"./util.js":53,util:45}],51:[function(_dereq_,module,exports){var GlobalUtil=_dereq_("./util-global.js");function Simple(){if(arguments.length>0){this._parse(arguments[0])}else{var date=new Date;this._year=date.getUTCFullYear();this._month=date.getUTCMonth();this._day=date.getUTCDay();this._hours=date.getUTCHours();this._minutes=date.getUTCMinutes();this._seconds=date.getUTCSeconds();this._tzHours=0;this._tzMinutes=0}}Simple.prototype._parse=function(str){var end=str.length,offset=0;if(str.length<5)throw new Error("Invalid Date");var year=str.substr(offset,5);if(year.match(/^[+-][0-9]{4}$/)===null){throw new Error("Invalid Date: Malformed year")}this._year=parseInt(year,10);offset+=5;if(offset==end){return}if(str.charAt(offset)=="T"){return this._parseTime(str.substr(offset+1))}if(str.charAt(offset)!="-"){throw new Error("Invalid Date: Malformed year-month separator")}if(end-offset<3){throw new Error("Invalid Date: Malformed month")}var month=str.substr(offset+1,2);if(month.match(/^(0[1-9]|1[0-2])$/)===null){throw new Error("Invalid Date: Malformed month")}this._month=parseInt(month,10);offset+=3;if(offset==end){return}if(str.charAt(offset)=="T"){return this._parseTime(str.substr(offset+1))}if(str.charAt(offset)!="-"){throw new Error("Invalid Date: Malformed month-day separator")}if(end-offset<3){throw new Error("Invalid Date: Malformed day")}var day=str.substr(offset+1,2);var daysInMonth=GlobalUtil.daysInMonth(this._month,this._year);switch(daysInMonth){case 31:if(day.match(/^(0[1-9]|[1-2][0-9]|3[0-1])$/)===null){throw new Error("Invalid Date: Malformed day (31 in month "+this._month+")")}break;case 30:if(day.match(/^(0[1-9]|[1-2][0-9]|30)$/)===null){throw new Error("Invalid Date: Malformed day (30 in month "+this._month+")")}break;case 29:if(day.match(/^(0[1-9]|1[0-9]|2[0-9])$/)===null){throw new Error("Invalid Date: Malformed day (29 in month "+this._month+" - leapyear)")}break;case 28:if(day.match(/^(0[1-9]|1[0-9]|2[0-8])$/)===null){throw new Error("Invalid Date: Malformed day (28 in month "+this._month+")")}break}this._day=parseInt(day,10);offset+=3;if(offset==end)return;if(str.charAt(offset)=="T"){return this._parseTime(str.substr(offset+1))}else{throw new Error("Invalid Date")}};Simple.prototype._parseTime=function(str){var offset=0,end=str.length,flag24=false;var tempDate=new Date,tempOffset=tempDate.getTimezoneOffset();this._tzHours=tempOffset/60;this._tzMinutes=tempOffset%60;if(str.length<2)throw new Error("Invalid Date: Malformed hours");var hours=str.substr(offset,2);if(hours.match(/^([0-1][0-9]|2[0-3])$/)===null){if(hours=="24"){flag24=true}else{throw new Error("Invalid Date: Malformed hours")}}this._hours=parseInt(hours,10);offset+=2;if(offset==end){return}if(str.charAt(offset)=="+"||str.charAt(offset)=="-"||str.charAt(offset)=="Z"){return this._parseTimezone(str.substr(offset))}if(str.charAt(offset)!=":"){throw new Error("Invalid Date: Malformed hour-minute separator")}if(end-offset<3){throw new Error("Invalid Date: Malformed minutes")}var minutes=str.substr(offset+1,2);if(minutes.match(/^[0-5][0-9]$/)===null){throw new Error("Invalid Date: Malformed minutes")}if(flag24&&minutes!="00"){throw new Error("Invalid Date: Hour of 24 requires 00 minutes")}this._minutes=parseInt(minutes,10);offset+=3;if(offset==end){return}if(str.charAt(offset)=="+"||str.charAt(offset)=="-"||str.charAt(offset)=="Z"){return this._parseTimezone(str.substr(offset))}if(str.charAt(offset)!=":"){throw new Error("Invalid Date: Malformed minute-second separator")}if(end-offset<3){throw new Error("Invalid Date: Malformed seconds")}var seconds=str.substr(offset+1,2);if(seconds.match(/^[0-5][0-9]$/)===null){throw new Error("Invalid Date: Malformed seconds")}if(flag24&&seconds!="00"){throw new Error("Invalid Date: Hour of 24 requires 00 seconds")}this._seconds=parseInt(seconds,10);offset+=3;if(offset==end){return}if(str.charAt(offset)=="+"||str.charAt(offset)=="-"||str.charAt(offset)=="Z"){return this._parseTimezone(str.substr(offset))}else{throw new Error("Invalid Date: Malformed Time")}};Simple.prototype._parseTimezone=function(str){var offset=0,end=str.length;if(str.charAt(0)=="Z"){if(str.length==1){this._tzHours=0;this._tzMinutes=0;return}else{throw new Error("Invalid Date: malformed timezone")}}if(end-offset<3){throw new Error("Invalid Date: Malformed timezone")}var tzHours=str.substr(offset,3);if(tzHours.match(/^[+-]([0-1][0-9]|2[0-3])$/)===null){throw new Error("Invalid Date: Malformed timezone hours")}this._tzHours=parseInt(tzHours,10);this._tzMinutes=0;offset+=3;if(offset==end){return}if(str.charAt(offset)!=":"){throw new Error("Invalid Date: Malformed timezone hour-minute separator")}if(end-offset<3){throw new Error("Invalid Date: Malformed timezone minutes")}var tzMinutes=str.substr(offset+1,2);if(tzMinutes.match(/^[0-5][0-9]$/)===null){throw new Error("Invalid Date: Malformed timezone minutes")}this._tzMinutes=parseInt(tzMinutes,10);offset+=3;if(offset==end){return}else{throw new Error("Invalid Date: Malformed timezone")}};Simple.prototype.getType=function(){return"single"};Simple.prototype.isApproximate=function(){return false};Simple.prototype.getYear=function(){return this._year};
-Simple.prototype.getMonth=function(){return this._month};Simple.prototype.getDay=function(){return this._day};Simple.prototype.getHours=function(){return this._hours};Simple.prototype.getMinutes=function(){return this._minutes};Simple.prototype.getSeconds=function(){return this._seconds};Simple.prototype.getTZHours=function(){return this._tzHours};Simple.prototype.getTZMinutes=function(){return this._tzMinutes};Simple.prototype.toFormalString=function(){var simple="";if(this._year>=0){simple+="+"+("0000"+this._year).substr(-4,4)}else{simple+="-"+("0000"+Math.abs(this._year)).substr(-4,4)}if(this._month){simple+="-"+("00"+this._month).substr(-2,2)}if(this._day){simple+="-"+("00"+this._day).substr(-2,2)}if(this._hours!=undefined||this._minutes!=undefined||this._seconds!=undefined){simple+="T"}if(this._hours!=undefined){simple+=("00"+this._hours).substr(-2,2)}if(this._minutes!=undefined){simple+=":"+("00"+this._minutes).substr(-2,2)}if(this._seconds!=undefined){simple+=":"+("00"+this._seconds).substr(-2,2)}if(this._hours!=undefined||this._minutes!=undefined||this._seconds!=undefined){if(this._tzHours===0||this._tzMinutes===0){simple+="Z"}else{if(this._tzHours!=undefined){if(this._tzHours>=0){simple+="+"}else{simple+="-"}simple+=("00"+Math.abs(this._tzHours)).substr(-2,2)}if(this._tzMinutes!=undefined){simple+=":"+("00"+this._tzMinutes).substr(-2,2)}}}return simple};module.exports=Simple},{"./util-global.js":52}],52:[function(_dereq_,module,exports){module.exports={daysInMonth:daysInMonth};function daysInMonth(month,year){switch(month){case 1:case 3:case 5:case 7:case 8:case 10:case 12:return 31;case 4:case 6:case 9:case 11:return 30;case 2:var leapyear;if(year%4!=0){leapyear=false}else if(year%100!=0){leapyear=true}else if(year%400!=0){leapyear=false}else{leapyear=true}if(leapyear){return 29}else{return 28}default:throw new Error("Unknown Month")}}},{}],53:[function(_dereq_,module,exports){var GlobalUtil=_dereq_("./util-global.js"),Duration=_dereq_("./duration.js"),Simple=_dereq_("./simple.js"),Approximate=_dereq_("./approximate.js");module.exports={getDuration:getDuration,daysInMonth:GlobalUtil.daysInMonth,addDuration:addDuration,multiplyDuration:multiplyDuration,now:now,fromJSDate:fromJSDate,compare:compare};function multiplyDuration(startDuration,multiplier){if(!isFinite(multiplier)||multiplier<=0){throw new Error("Invalid Multiplier")}var newDuration={},hasTime=false,duration="";if(startDuration.getSeconds()){newDuration.seconds=Math.round(startDuration.getSeconds()*multiplier)}if(startDuration.getMinutes()){newDuration.minutes=Math.round(startDuration.getMinutes()*multiplier)}if(startDuration.getHours()){newDuration.hours=Math.round(startDuration.getHours()*multiplier)}if(startDuration.getDays()){newDuration.days=Math.round(startDuration.getDays()*multiplier)}if(startDuration.getMonths()){newDuration.months=Math.round(startDuration.getMonths()*multiplier)}if(startDuration.getYears()){newDuration.years=Math.round(startDuration.getYears()*multiplier)}if(newDuration.seconds){hasTime=true;duration=newDuration.seconds+"S"+duration}if(newDuration.minutes){hasTime=true;duration=newDuration.minutes+"M"+duration}if(newDuration.hours){hasTime=true;duration=newDuration.hours+"H"+duration}if(hasTime){duration="T"+duration}if(newDuration.days){duration=newDuration.days+"D"+duration}if(newDuration.months){duration=newDuration.months+"M"+duration}if(newDuration.years){duration=newDuration.years+"Y"+duration}if(!duration){throw new Error("Invalid Duration Multiplier")}return new Duration("P"+duration)}function addDuration(startDate,duration){var end=getObjFromDate(startDate,false),endString="";zipDuration(end,duration);if(startDate.getTZHours()!=undefined){if(startDate.getTZHours()<0){endString+="-"}else{endString+="+"}endString+=("00"+Math.abs(startDate.getTZHours())).substr(-2,2);endString+=":"+("00"+Math.abs(startDate.getTZMinutes())).substr(-2,2)}if(duration.getSeconds()){end.seconds+=duration.getSeconds()}while(end.seconds&&end.seconds>=60){end.seconds-=60;end.minutes+=1}if(end.seconds!=undefined){endString=":"+("00"+end.seconds).substr(-2,2)+endString}if(duration.getMinutes()){end.minutes+=duration.getMinutes()}while(end.minutes&&end.minutes>=60){end.minutes-=60;end.hours+=1}if(end.minutes!=undefined){endString=":"+("00"+end.minutes).substr(-2,2)+endString}if(duration.getHours()){end.hours+=duration.getHours()}while(end.hours&&end.hours>=24){end.hours-=24;end.day+=1}if(end.hours!=undefined){endString="T"+("00"+end.hours).substr(-2,2)+endString}if(duration.getDays()){end.day+=duration.getDays()}while(end.day&&end.day>GlobalUtil.daysInMonth(end.month,end.year)){end.day-=GlobalUtil.daysInMonth(end.month,end.year);end.month+=1;if(end.month>12){end.month-=12;end.year+=1}}if(duration.getMonths()){end.month+=duration.getMonths()}while(end.month&&end.month>12){end.month-=12;end.year+=1}if(end.day&&end.day>GlobalUtil.daysInMonth(end.month,end.year)){end.day=end.day-GlobalUtil.daysInMonth(end.month,end.year);end.month+=1;if(end.month>12){end.month-=12;end.year+=1}}if(end.day!=undefined){endString="-"+("00"+end.day).substr(-2,2)+endString}if(end.month!=undefined){endString="-"+("00"+end.month).substr(-2,2)+endString}if(duration.getYears()){end.year+=duration.getYears()}if(end.year!=undefined){endString=("0000"+Math.abs(end.year)).substr(-4,4)+endString;if(end.year<0){endString="-"+endString}else{endString="+"+endString}}if(end.year>9999){throw new Error("New date out of range")}if(startDate.isApproximate()){endString="A"+endString;return new Approximate(endString)}else{return new Simple(endString)}}function getDuration(startDate,endDate){if(!(startDate instanceof Simple&&endDate instanceof Simple)){throw new Error("Start and end dates must be simple dates")}var start=getObjFromDate(startDate,true),end=getObjFromDate(endDate,true),hasTime=false,duration="";zipDates(start,end);if(end.seconds!=undefined){while(end.seconds-start.seconds<0){end.minutes-=1;end.seconds+=60}if(end.seconds-start.seconds>0){hasTime=true;duration=("00"+(end.seconds-start.seconds)).substr(-2,2)+"S"+duration}}if(end.minutes!=undefined){while(end.minutes-start.minutes<0){end.hours-=1;end.minutes+=60}if(end.minutes-start.minutes>0){hasTime=true;duration=("00"+(end.minutes-start.minutes)).substr(-2,2)+"M"+duration}}if(end.hours!=undefined){while(end.hours-start.hours<0){end.day-=1;end.hours+=24}if(end.hours-start.hours>0){hasTime=true;duration=("00"+(end.hours-start.hours)).substr(-2,2)+"H"+duration}}if(hasTime){duration="T"+duration}if(end.day!=undefined){while(end.day-start.day<0){end.month-=1;if(end.month<1){end.year-=1;end.month+=12}end.day+=GlobalUtil.daysInMonth(end.month,end.year)}if(end.day-start.day>0){duration=("00"+(end.day-start.day)).substr(-2,2)+"D"+duration}}if(end.month!=undefined){while(end.month-start.month<0){end.year-=1;end.month+=12}if(end.month-start.month>0){duration=("00"+(end.month-start.month)).substr(-2,2)+"M"+duration}}if(end.year-start.year>0){duration=("0000"+(end.year-start.year)).substr(-4,4)+"Y"+duration}if(end.year-start.year<0||duration==""){throw new Error("Start Date must be less than End Date")}return new Duration("P"+duration)}function zipDates(start,end){if(start.month!=undefined&&end.month==undefined){end.month=1}if(start.month==undefined&&end.month!=undefined){start.month=1}if(start.day!=undefined&&end.day==undefined){end.day=1}if(start.day==undefined&&end.day!=undefined){start.day=1}if(start.hours!=undefined&&end.hours==undefined){end.hours=0}if(start.hours==undefined&&end.hours!=undefined){start.hours=0}if(start.minutes!=undefined&&end.minutes==undefined){end.minutes=0}if(start.minutes==undefined&&end.minutes!=undefined){start.minutes=0}if(start.seconds!=undefined&&end.seconds==undefined){end.seconds=0}if(start.seconds==undefined&&end.seconds!=undefined){start.seconds=0}}function zipDuration(date,duration){var toSet={};if(duration.getSeconds()){toSet={seconds:true,minutes:true,hours:true,days:true,months:true}}else if(duration.getMinutes()){toSet={minutes:true,hours:true,days:true,months:true}}else if(duration.getHours()){toSet={hours:true,days:true,months:true}}else if(duration.getDays()){toSet={days:true,months:true}}else if(duration.getMonths()){toSet={months:true}}else{return}if(toSet.seconds&&date.seconds==undefined){date.seconds=0}if(toSet.minutes&&date.minutes==undefined){date.minutes=0}if(toSet.hours&&date.hours==undefined){date.hours=0}if(toSet.days&&date.day==undefined){date.day=1}if(toSet.months&&date.month==undefined){date.month=1}}function getObjFromDate(date,adjustTimezone){var obj={year:date.getYear(),month:date.getMonth(),day:date.getDay(),hours:date.getHours(),minutes:date.getMinutes(),seconds:date.getSeconds()};if(adjustTimezone){if(obj.minutes!=undefined&&date.getTZMinutes()!=undefined){obj.minutes+=date.getTZMinutes()}if(obj.hours!=undefined&&date.getTZHours()!=undefined){obj.hours+=date.getTZHours()}}return obj}function now(){return fromJSDate(new Date)}function fromJSDate(date){return new Simple("+"+date.toISOString().replace(/\.\d{3}/,""))}function compare(date1,date2){if(isString(date1)){try{if(date1[0]==="A"){date1=new Approximate(date1)}else{date1=new Simple(date1)}}catch(e){throw new Error(date1+" is not a simple date. Can only compare simple dates.")}}if(isString(date2)){try{if(date2[0]==="A"){date2=new Approximate(date2)}else{date2=new Simple(date2)}}catch(e){throw new Error(date2+" is not a simple date. Can only compare simple dates.")}}if(!(date1 instanceof Simple)||!(date2 instanceof Simple)){throw new Error("Bad input. Can only compare simple dates.")}var parts=["_year","_month","_day","_hours","_minutes","_seconds"];for(var i=0;idate2[part]){return 1}else{return-1}}return 0}function isString(obj){return typeof obj==="string"||obj instanceof String}},{"./approximate.js":46,"./duration.js":47,"./simple.js":51,"./util-global.js":52}],54:[function(_dereq_,module,exports){(function(global){(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:cap[1]==="pre"||cap[1]==="script"||cap[1]==="style",text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=escape(this.smartypants(cap[0]));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/--/g,"—").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+=""+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return""+(escaped?code:escape(code,true))+"\n
"}return''+(escaped?code:escape(code,true))+"\n
\n"};Renderer.prototype.blockquote=function(quote){return"\n"+quote+"
\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+""+type+">\n"};Renderer.prototype.listitem=function(text){return""+text+"\n"};Renderer.prototype.paragraph=function(text){return""+text+"
\n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
\n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"
\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+""+type+">\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+"
"};Renderer.prototype.br=function(){return this.options.xhtml?"
":"
"};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='"+text+"";return out};Renderer.prototype.image=function(href,title,text){var out='":">";return out};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occured:
"+escape(e.message+"",true)+"
"}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}())}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],55:[function(_dereq_,module,exports){(function(global,factory){if(typeof exports==="object"&&exports){factory(exports)}else if(typeof define==="function"&&define.amd){define(["exports"],factory)}else{factory(global.Mustache={})}})(this,function(mustache){var Object_toString=Object.prototype.toString;var isArray=Array.isArray||function(object){return Object_toString.call(object)==="[object Array]"};function isFunction(object){return typeof object==="function"}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var RegExp_test=RegExp.prototype.test;function testRegExp(re,string){return RegExp_test.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function escapeHtml(string){return String(string).replace(/[&<>"'\/]/g,function(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tags){if(typeof tags==="string")tags=tags.split(spaceRe,2);if(!isArray(tags)||tags.length!==2)throw new Error("Invalid tags: "+tags);openingTagRe=new RegExp(escapeRegExp(tags[0])+"\\s*");closingTagRe=new RegExp("\\s*"+escapeRegExp(tags[1]));closingCurlyRe=new RegExp("\\s*"+escapeRegExp("}"+tags[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i"+text+"\n"};utils.getFactYear=function(fact){if(fact.$getFormalDate()){var simple=utils.getSimpleFormalDate(fact.$getFormalDate());if(simple){return simple.getYear()}}else if(fact.$getDate()){return utils.extractYearFromDateString(fact.$getDate())}};utils.getFactPlace=function(fact){if(fact.$getNormalizedPlace()){return fact.$getNormalizedPlace()}else if(fact.$getPlace()){return fact.$getPlace()}};utils.getFormalDate=function(fact){if(fact.$getFormalDate()){var date=utils.getSimpleFormalDate(fact.$getFormalDate());if(date){return date.toFormalString()}}else if(fact.$getDate()){if(/^\d{4}$/.test(fact.$getDate())){return"+"+fact.$getDate()}else{var date=new Date(fact.$getDate());if(isNaN(date.getTime())){return}else{return GedcomXDate.fromJSDate(date).toFormalString().substring(0,11)}}}};utils.getSimpleFormalDate=function(formalDateString){try{var date=new GedcomXDate(formalDateString);if(date.getType()!="single"){if(date.getStart()&&!date.getEnd()){date=date.getStart()}else if(!date.getStart()&&date.getEnd()){date=date.getEnd()}else{var start=date.getStart(),duration=date.getDuration(),halfDuration=GedcomXDate.multiplyDuration(duration,.5);date=GedcomXDate.addDuration(start,halfDuration)}}return date}catch(error){if(console.error){console.error("Error parsing "+formalDateString);console.error(error)}}};utils.extractYearFromDateString=function(date){if(/^\d{4}$/.test(date)){return date}else{var year=new Date(date).getFullYear();if(parseInt(year)==year){return year}}};utils.markdown=function(text,data,partials){return marked(mustache.render(text,data,partials),{renderer:renderer})};utils.gensearchPerson=function(person){var gensearch={};var givenName=person.$getGivenName();if(givenName){gensearch.givenName=givenName}var familyName=person.$getSurname();if(familyName){gensearch.familyName=familyName}var birth=person.$getBirth();if(birth!==undefined){var birthPlace=utils.getFactPlace(birth);if(birthPlace){gensearch.birthPlace=birthPlace}var birthDate=utils.getFactYear(birth);if(birthDate){gensearch.birthDate=birthDate+""}}var death=person.$getDeath();if(death!==undefined){var deathPlace=utils.getFactPlace(death);if(deathPlace){gensearch.deathPlace=deathPlace}var deathDate=utils.getFactYear(death);if(deathDate){gensearch.deathDate=deathDate+""}}return gensearch};utils.compareFormalDates=function(date1,date2){return GedcomXDate.compare(date1,date2)};utils.createOpportunity=function(check,person,template,gensearch){return{id:check.id+":"+person.id,type:check.type,checkId:check.id,personId:person.id,person:person,gensearch:gensearch,template:template}};utils.isFullDate=function(date){if(isString(date)){return date.length>=11}else{try{if(isUndefined(date.getYear())||isUndefined(date.getMonth())||isUndefined(date.getDay())){return false}else{return true}}catch(e){throw new Error("Expected either a formal date string or a GedcomXDate simple object.")}}};utils.ensureFullDate=function(date,newMonth,newDay){try{if(!newMonth){newMonth=1}if(newMonth>12){newMonth=12}if(!newDay){newDay=1}if(isUndefined(date.getMonth())){date._month=newMonth}if(isUndefined(date.getDay())){var validDayMax=GedcomXDate.daysInMonth(date.getMonth(),date.getYear());if(newDay>validDayMax){newDay=validDayMax}date._day=newDay}}catch(e){throw new Error("Expected date to be a GedcomXDate object.")}};utils.isBiologicalChildAndParents=function(childAndParents){var fatherFacts=childAndParents.$getFatherFacts(),motherFacts=childAndParents.$getMotherFacts();if(childAndParents.$getFatherId()){if(!fatherFacts||!containsBiologicalParentFact(fatherFacts)){return false}}if(childAndParents.$getMotherId()){if(!motherFacts||!containsBiologicalParentFact(motherFacts)){return false}}return true};function containsBiologicalParentFact(facts){for(var i=0;i0){var fn=queue.shift();fn()}}},true);return function nextTick(fn){queue.push(fn);window.postMessage("process-tick","*")}}return function nextTick(fn){setTimeout(fn,0)}}();process.title="browser";process.browser=true;process.env={};process.argv=[];function noop(){}process.on=noop;process.once=noop;process.off=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")}},{}],44:[function(_dereq_,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],45:[function(_dereq_,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i-1){if(array){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=_dereq_("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=_dereq_("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}).call(this,_dereq_("/home/ubuntu/workspace/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":44,"/home/ubuntu/workspace/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":43,inherits:42}],46:[function(_dereq_,module,exports){var util=_dereq_("util"),Simple=_dereq_("./simple.js");function Approximate(){if(arguments.length>0){if(arguments[0].length<1||arguments[0].charAt(0)!="A"){throw new Error("Invalid Approximate Date")}try{Simple.call(this,arguments[0].substr(1))}catch(e){throw new Error(e.message+" in Approximate Date")}}else{Simple.call(this)}}util.inherits(Approximate,Simple);Approximate.prototype.isApproximate=function(){return true};Approximate.prototype.toFormalString=function(){return"A"+Approximate.super_.prototype.toFormalString.call(this)};module.exports=Approximate},{"./simple.js":51,util:45}],47:[function(_dereq_,module,exports){function Duration(str){if(str.length<1||str.charAt(0)!="P"){throw new Error("Invalid Duration")}var duration=str.substr(1);if(duration.length<1){throw new Error("Invalid Duration")}if(/\s/.test(duration)){throw new Error("Non normalized durations not implemented")}else{this._parseNormalized(duration)}}Duration.prototype._parseNormalized=function(str){var duration=str.split(""),currentNum="",inTime=false,seen=[],valid=["Y","Mo","D","T","H","Mi","S"];for(var x in duration){var character=duration[x];if(/[0-9]/.test(character)){currentNum+=character+"";continue}switch(character){case"Y":if(currentNum.length<1){throw new Error("Invalid Duration: invalid years")}if(seen.indexOf("Y")!=-1){throw new Error("Invalid Duration: duplicate years")}if(valid.indexOf("Y")==-1){throw new Error("Invalid Duration: years out of order")}this._years=parseInt(currentNum,10);seen.push("Y");valid=valid.slice(valid.indexOf("Y")+1);currentNum="";break;case"M":if(inTime){if(currentNum.length<1){throw new Error("Invalid Duration: invalid minutes")}if(seen.indexOf("Mi")!=-1){throw new Error("Invalid Duration: duplicate minutes")}if(valid.indexOf("Mi")==-1){throw new Error("Invalid Duration: minutes out of order")}this._minutes=parseInt(currentNum,10);seen.push("Mi");valid=valid.slice(valid.indexOf("Mi")+1);currentNum=""}else{if(currentNum.length<1){throw new Error("Invalid Duration: invalid months")}if(seen.indexOf("Mo")!=-1){throw new Error("Invalid Duration: duplicate months")}if(valid.indexOf("Mo")==-1){throw new Error("Invalid Duration: months out of order")}this._months=parseInt(currentNum,10);valid=valid.slice(valid.indexOf("Mo")+1);seen.push("Mo");currentNum=""}break;case"D":if(currentNum.length<1){throw new Error("Invalid Duration: invalid days")}if(seen.indexOf("D")!=-1){throw new Error("Invalid Duration: duplicate days")}if(valid.indexOf("D")==-1){throw new Error("Invalid Duration: days out of order")}this._days=parseInt(currentNum,10);seen.push("D");valid=valid.slice(valid.indexOf("D")+1);currentNum="";break;case"H":if(!inTime){throw new Error("Invalid Duration: Missing T before hours")}if(currentNum.length<1){throw new Error("Invalid Duration: invalid hours")}if(seen.indexOf("H")!=-1){throw new Error("Invalid Duration: duplicate hours")}if(valid.indexOf("H")==-1){throw new Error("Invalid Duration: hours out of order")}this._hours=parseInt(currentNum,10);seen.push("H");valid=valid.slice(valid.indexOf("H")+1);currentNum="";break;case"S":if(!inTime){throw new Error("Invalid Duration: Missing T before seconds")}if(currentNum.length<1){throw new Error("Invalid Duration: invalid seconds")}if(seen.indexOf("S")!=-1){throw new Error("Invalid Duration: duplicate seconds")}this._seconds=parseInt(currentNum,10);seen.push("S");valid=[];currentNum="";break;case"T":if(seen.indexOf("T")!=-1){throw new Error("Invalid Duration: duplicate T")}inTime=true;seen.push("T");valid=valid.slice(valid.indexOf("T")+1);break;default:throw new Error("Invalid Duration: Unknown Letter "+character)}}if(currentNum!=""){throw new Error("Invalid Duration: No letter after "+currentNum)}};Duration.prototype.getType=function(){return"duration"};Duration.prototype.isApproximate=function(){return false};Duration.prototype.getYears=function(){return this._years};Duration.prototype.getMonths=function(){return this._months};Duration.prototype.getDays=function(){return this._days};Duration.prototype.getHours=function(){return this._hours};Duration.prototype.getMinutes=function(){return this._minutes};Duration.prototype.getSeconds=function(){return this._seconds};Duration.prototype.toFormalString=function(){var duration="P";if(this._years){duration+=this._years+"Y"}if(this._months){duration+=this._months+"M"}if(this._days){duration+=this._days+"D"}if(this._hours||this._minutes||this._seconds){duration+="T";if(this._hours){duration+=this._hours+"H"}if(this._minutes){duration+=this._minutes+"M"}if(this._seconds){duration+=this._seconds+"S"}}return duration};module.exports=Duration},{}],48:[function(_dereq_,module,exports){var GedUtil=_dereq_("./util.js"),Simple=_dereq_("./simple.js"),Approximate=_dereq_("./approximate.js"),Recurring=_dereq_("./recurring.js"),Range=_dereq_("./range.js");function GedcomXDate(str){if(str==""){throw new Error("Invalid Date")}if(str.charAt(0)=="R"){return new Recurring(str)}else if(/\//.test(str)){return new Range(str)}else if(str.charAt(0)=="A"){return new Approximate(str)}else{return new Simple(str)}}GedcomXDate.version="0.3.2";GedcomXDate.addDuration=GedUtil.addDuration;GedcomXDate.multiplyDuration=GedUtil.multiplyDuration;GedcomXDate.getDuration=GedUtil.getDuration;GedcomXDate.daysInMonth=GedUtil.daysInMonth;GedcomXDate.now=GedUtil.now;GedcomXDate.fromJSDate=GedUtil.fromJSDate;GedcomXDate.compare=GedUtil.compare;module.exports=GedcomXDate},{"./approximate.js":46,"./range.js":49,"./recurring.js":50,"./simple.js":51,"./util.js":53}],49:[function(_dereq_,module,exports){var GedUtil=_dereq_("./util.js"),Simple=_dereq_("./simple.js"),Duration=_dereq_("./duration.js"),Approximate=_dereq_("./approximate.js");function Range(str){var range=str;if(range.charAt(0)=="A"){this._approximate=true;range=str.substr(1)}var parts=range.split("/");if(parts.length!=2||!parts[0]&&!parts[1]){throw new Error("Invalid Date Range")}if(parts[0]){try{this.start=new Simple(parts[0])}catch(e){throw new Error(e.message+" in Range Start Date")}}if(parts[1]){if(parts[1].charAt(0)=="P"){if(!this.start){throw new Error("A Range may not end with a duration if missing a start date")}try{this.duration=new Duration(parts[1])}catch(e){throw new Error(e.message+" in Range End Date")}this.end=GedUtil.addDuration(this.start,this.duration)}else{try{this.end=new Simple(parts[1])}catch(e){throw new Error(e.message+" in Range End Date")}if(this.start){this.duration=GedUtil.getDuration(this.start,this.end)}}}}Range.prototype.getType=function(){return"range"};Range.prototype.isApproximate=function(){if(this._approximate){return true}else{return false}};Range.prototype.getStart=function(){return this.start};Range.prototype.getDuration=function(){return this.duration};Range.prototype.getEnd=function(){return this.end};Range.prototype.toFormalString=function(){var range="";if(this._approximate){range+="A"}if(this.start){range+=this.start.toFormalString()}range+="/";if(this.duration){range+=this.duration.toFormalString()}else if(this.end){range+=this.end.toFormalString()}return range};module.exports=Range},{"./approximate.js":46,"./duration.js":47,"./simple.js":51,"./util.js":53}],50:[function(_dereq_,module,exports){var util=_dereq_("util"),GedUtil=_dereq_("./util.js"),Range=_dereq_("./range.js");function Recurring(str){var parts=str.split("/");if(str.charAt(0)!="R"||parts.length!=3){throw new Error("Invalid Recurring Date")}if(!parts[1]||!parts[2]){throw new Error("Recurring must have a start and end")}var countNum=parts[0].substr(1);if(countNum){if(!/^[0-9]+$/.test(countNum)){throw new Error("Invalid recurrence count: not a number")}this.count=parseInt(countNum,10);if(this.count<0)throw new Error("Invalid recurrence count")}Range.call(this,parts[1]+"/"+parts[2]);delete this.end;if(this.count){this.end=this.getNth(this.count)}}util.inherits(Recurring,Range);Recurring.prototype.getType=function(){return"recurring"};Recurring.prototype.getCount=function(){if(this.count==undefined){return Infinity}else{return this.count}};Recurring.prototype.getNth=function(multiplier){var duration=GedUtil.multiplyDuration(this.duration,multiplier);return GedUtil.addDuration(this.start,duration)};Recurring.prototype.toFormalString=function(){var range=Recurring.super_.prototype.toFormalString.call(this);if(this.count){return"R"+this.count+"/"+range}else{return"R/"+range}};module.exports=Recurring},{"./range.js":49,"./util.js":53,util:45}],51:[function(_dereq_,module,exports){var GlobalUtil=_dereq_("./util-global.js");function Simple(){if(arguments.length>0){this._parse(arguments[0])}else{var date=new Date;this._year=date.getUTCFullYear();this._month=date.getUTCMonth();this._day=date.getUTCDay();this._hours=date.getUTCHours();this._minutes=date.getUTCMinutes();this._seconds=date.getUTCSeconds();this._tzHours=0;this._tzMinutes=0}}Simple.prototype._parse=function(str){var end=str.length,offset=0;if(str.length<5)throw new Error("Invalid Date");var year=str.substr(offset,5);if(year.match(/^[+-][0-9]{4}$/)===null){throw new Error("Invalid Date: Malformed year")}this._year=parseInt(year,10);offset+=5;if(offset==end){return}if(str.charAt(offset)=="T"){return this._parseTime(str.substr(offset+1))}if(str.charAt(offset)!="-"){throw new Error("Invalid Date: Malformed year-month separator")}if(end-offset<3){throw new Error("Invalid Date: Malformed month")}var month=str.substr(offset+1,2);if(month.match(/^(0[1-9]|1[0-2])$/)===null){throw new Error("Invalid Date: Malformed month")}this._month=parseInt(month,10);offset+=3;if(offset==end){return}if(str.charAt(offset)=="T"){return this._parseTime(str.substr(offset+1))}if(str.charAt(offset)!="-"){throw new Error("Invalid Date: Malformed month-day separator")}if(end-offset<3){throw new Error("Invalid Date: Malformed day")}var day=str.substr(offset+1,2);var daysInMonth=GlobalUtil.daysInMonth(this._month,this._year);switch(daysInMonth){case 31:if(day.match(/^(0[1-9]|[1-2][0-9]|3[0-1])$/)===null){throw new Error("Invalid Date: Malformed day (31 in month "+this._month+")")}break;case 30:if(day.match(/^(0[1-9]|[1-2][0-9]|30)$/)===null){throw new Error("Invalid Date: Malformed day (30 in month "+this._month+")")}break;case 29:if(day.match(/^(0[1-9]|1[0-9]|2[0-9])$/)===null){throw new Error("Invalid Date: Malformed day (29 in month "+this._month+" - leapyear)")}break;case 28:if(day.match(/^(0[1-9]|1[0-9]|2[0-8])$/)===null){throw new Error("Invalid Date: Malformed day (28 in month "+this._month+")")}break}this._day=parseInt(day,10);offset+=3;if(offset==end)return;if(str.charAt(offset)=="T"){return this._parseTime(str.substr(offset+1))}else{throw new Error("Invalid Date")}};Simple.prototype._parseTime=function(str){var offset=0,end=str.length,flag24=false;var tempDate=new Date,tempOffset=tempDate.getTimezoneOffset();this._tzHours=tempOffset/60;this._tzMinutes=tempOffset%60;if(str.length<2)throw new Error("Invalid Date: Malformed hours");var hours=str.substr(offset,2);if(hours.match(/^([0-1][0-9]|2[0-3])$/)===null){if(hours=="24"){flag24=true}else{throw new Error("Invalid Date: Malformed hours")}}this._hours=parseInt(hours,10);offset+=2;if(offset==end){return}if(str.charAt(offset)=="+"||str.charAt(offset)=="-"||str.charAt(offset)=="Z"){return this._parseTimezone(str.substr(offset))}if(str.charAt(offset)!=":"){throw new Error("Invalid Date: Malformed hour-minute separator")}if(end-offset<3){throw new Error("Invalid Date: Malformed minutes")}var minutes=str.substr(offset+1,2);if(minutes.match(/^[0-5][0-9]$/)===null){throw new Error("Invalid Date: Malformed minutes")}if(flag24&&minutes!="00"){throw new Error("Invalid Date: Hour of 24 requires 00 minutes")}this._minutes=parseInt(minutes,10);offset+=3;if(offset==end){return}if(str.charAt(offset)=="+"||str.charAt(offset)=="-"||str.charAt(offset)=="Z"){return this._parseTimezone(str.substr(offset))}if(str.charAt(offset)!=":"){throw new Error("Invalid Date: Malformed minute-second separator")}if(end-offset<3){throw new Error("Invalid Date: Malformed seconds")}var seconds=str.substr(offset+1,2);if(seconds.match(/^[0-5][0-9]$/)===null){throw new Error("Invalid Date: Malformed seconds")}if(flag24&&seconds!="00"){throw new Error("Invalid Date: Hour of 24 requires 00 seconds")}this._seconds=parseInt(seconds,10);offset+=3;if(offset==end){return}if(str.charAt(offset)=="+"||str.charAt(offset)=="-"||str.charAt(offset)=="Z"){return this._parseTimezone(str.substr(offset))}else{throw new Error("Invalid Date: Malformed Time")}};Simple.prototype._parseTimezone=function(str){var offset=0,end=str.length;if(str.charAt(0)=="Z"){if(str.length==1){this._tzHours=0;this._tzMinutes=0;return}else{throw new Error("Invalid Date: malformed timezone")}}if(end-offset<3){throw new Error("Invalid Date: Malformed timezone")}var tzHours=str.substr(offset,3);if(tzHours.match(/^[+-]([0-1][0-9]|2[0-3])$/)===null){throw new Error("Invalid Date: Malformed timezone hours")}this._tzHours=parseInt(tzHours,10);this._tzMinutes=0;offset+=3;if(offset==end){return}if(str.charAt(offset)!=":"){throw new Error("Invalid Date: Malformed timezone hour-minute separator");
-if(!openSection)throw new Error('Unopened section "'+value+'" at '+start);if(openSection[1]!==value)throw new Error('Unclosed section "'+openSection[1]+'" at '+start)}else if(type==="name"||type==="{"||type==="&"){nonSpace=true}else if(type==="="){compileTags(value)}}openSection=sections.pop();if(openSection)throw new Error('Unclosed section "'+openSection[1]+'" at '+scanner.pos);return nestTokens(squashTokens(tokens))}function squashTokens(tokens){var squashedTokens=[];var token,lastToken;for(var i=0,numTokens=tokens.length;i0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function(){return this.tail===""};Scanner.prototype.scan=function(re){var match=this.tail.match(re);if(!match||match.index!==0)return"";var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view==null?{}:view;this.cache={".":this.view};this.parent=parentContext}Context.prototype.push=function(view){return new Context(view,this)};Context.prototype.lookup=function(name){var cache=this.cache;var value;if(name in cache){value=cache[name]}else{var context=this,names,index;while(context){if(name.indexOf(".")>0){value=context.view;names=name.split(".");index=0;while(value!=null&&index")value=this._renderPartial(token,context,partials,originalTemplate);else if(symbol==="&")value=this._unescapedValue(token,context);else if(symbol==="name")value=this._escapedValue(token,context);else if(symbol==="text")value=this._rawValue(token);if(value!==undefined)buffer+=value}return buffer};Writer.prototype._renderSection=function(token,context,partials,originalTemplate){var self=this;var buffer="";var value=context.lookup(token[1]);function subRender(template){return self.render(template,context,partials)}if(!value)return;if(isArray(value)){for(var j=0,valueLength=value.length;j=0){simple+="+"+("0000"+this._year).substr(-4,4)}else{simple+="-"+("0000"+Math.abs(this._year)).substr(-4,4)}if(this._month){simple+="-"+("00"+this._month).substr(-2,2)}if(this._day){simple+="-"+("00"+this._day).substr(-2,2)}if(this._hours!=undefined||this._minutes!=undefined||this._seconds!=undefined){simple+="T"}if(this._hours!=undefined){simple+=("00"+this._hours).substr(-2,2)}if(this._minutes!=undefined){simple+=":"+("00"+this._minutes).substr(-2,2)}if(this._seconds!=undefined){simple+=":"+("00"+this._seconds).substr(-2,2)}if(this._hours!=undefined||this._minutes!=undefined||this._seconds!=undefined){if(this._tzHours===0||this._tzMinutes===0){simple+="Z"}else{if(this._tzHours!=undefined){if(this._tzHours>=0){simple+="+"}else{simple+="-"}simple+=("00"+Math.abs(this._tzHours)).substr(-2,2)}if(this._tzMinutes!=undefined){simple+=":"+("00"+this._tzMinutes).substr(-2,2)}}}return simple};module.exports=Simple},{"./util-global.js":52}],52:[function(_dereq_,module,exports){module.exports={daysInMonth:daysInMonth};function daysInMonth(month,year){switch(month){case 1:case 3:case 5:case 7:case 8:case 10:case 12:return 31;case 4:case 6:case 9:case 11:return 30;case 2:var leapyear;if(year%4!=0){leapyear=false}else if(year%100!=0){leapyear=true}else if(year%400!=0){leapyear=false}else{leapyear=true}if(leapyear){return 29}else{return 28}default:throw new Error("Unknown Month")}}},{}],53:[function(_dereq_,module,exports){var GlobalUtil=_dereq_("./util-global.js"),Duration=_dereq_("./duration.js"),Simple=_dereq_("./simple.js"),Approximate=_dereq_("./approximate.js");module.exports={getDuration:getDuration,daysInMonth:GlobalUtil.daysInMonth,addDuration:addDuration,multiplyDuration:multiplyDuration,now:now,fromJSDate:fromJSDate,compare:compare};function multiplyDuration(startDuration,multiplier){if(!isFinite(multiplier)||multiplier<=0){throw new Error("Invalid Multiplier")}var newDuration={},hasTime=false,duration="";if(startDuration.getSeconds()){newDuration.seconds=Math.round(startDuration.getSeconds()*multiplier)}if(startDuration.getMinutes()){newDuration.minutes=Math.round(startDuration.getMinutes()*multiplier)}if(startDuration.getHours()){newDuration.hours=Math.round(startDuration.getHours()*multiplier)}if(startDuration.getDays()){newDuration.days=Math.round(startDuration.getDays()*multiplier)}if(startDuration.getMonths()){newDuration.months=Math.round(startDuration.getMonths()*multiplier)}if(startDuration.getYears()){newDuration.years=Math.round(startDuration.getYears()*multiplier)}if(newDuration.seconds){hasTime=true;duration=newDuration.seconds+"S"+duration}if(newDuration.minutes){hasTime=true;duration=newDuration.minutes+"M"+duration}if(newDuration.hours){hasTime=true;duration=newDuration.hours+"H"+duration}if(hasTime){duration="T"+duration}if(newDuration.days){duration=newDuration.days+"D"+duration}if(newDuration.months){duration=newDuration.months+"M"+duration}if(newDuration.years){duration=newDuration.years+"Y"+duration}if(!duration){throw new Error("Invalid Duration Multiplier")}return new Duration("P"+duration)}function addDuration(startDate,duration){var end=getObjFromDate(startDate,false),endString="";zipDuration(end,duration);if(startDate.getTZHours()!=undefined){if(startDate.getTZHours()<0){endString+="-"}else{endString+="+"}endString+=("00"+Math.abs(startDate.getTZHours())).substr(-2,2);endString+=":"+("00"+Math.abs(startDate.getTZMinutes())).substr(-2,2)}if(duration.getSeconds()){end.seconds+=duration.getSeconds()}while(end.seconds&&end.seconds>=60){end.seconds-=60;end.minutes+=1}if(end.seconds!=undefined){endString=":"+("00"+end.seconds).substr(-2,2)+endString}if(duration.getMinutes()){end.minutes+=duration.getMinutes()}while(end.minutes&&end.minutes>=60){end.minutes-=60;end.hours+=1}if(end.minutes!=undefined){endString=":"+("00"+end.minutes).substr(-2,2)+endString}if(duration.getHours()){end.hours+=duration.getHours()}while(end.hours&&end.hours>=24){end.hours-=24;end.day+=1}if(end.hours!=undefined){endString="T"+("00"+end.hours).substr(-2,2)+endString}if(duration.getDays()){end.day+=duration.getDays()}while(end.day&&end.day>GlobalUtil.daysInMonth(end.month,end.year)){end.day-=GlobalUtil.daysInMonth(end.month,end.year);end.month+=1;if(end.month>12){end.month-=12;end.year+=1}}if(duration.getMonths()){end.month+=duration.getMonths()}while(end.month&&end.month>12){end.month-=12;end.year+=1}if(end.day&&end.day>GlobalUtil.daysInMonth(end.month,end.year)){end.day=end.day-GlobalUtil.daysInMonth(end.month,end.year);end.month+=1;if(end.month>12){end.month-=12;end.year+=1}}if(end.day!=undefined){endString="-"+("00"+end.day).substr(-2,2)+endString}if(end.month!=undefined){endString="-"+("00"+end.month).substr(-2,2)+endString}if(duration.getYears()){end.year+=duration.getYears()}if(end.year!=undefined){endString=("0000"+Math.abs(end.year)).substr(-4,4)+endString;if(end.year<0){endString="-"+endString}else{endString="+"+endString}}if(end.year>9999){throw new Error("New date out of range")}if(startDate.isApproximate()){endString="A"+endString;return new Approximate(endString)}else{return new Simple(endString)}}function getDuration(startDate,endDate){if(!(startDate instanceof Simple&&endDate instanceof Simple)){throw new Error("Start and end dates must be simple dates")}var start=getObjFromDate(startDate,true),end=getObjFromDate(endDate,true),hasTime=false,duration="";zipDates(start,end);if(end.seconds!=undefined){while(end.seconds-start.seconds<0){end.minutes-=1;end.seconds+=60}if(end.seconds-start.seconds>0){hasTime=true;duration=("00"+(end.seconds-start.seconds)).substr(-2,2)+"S"+duration}}if(end.minutes!=undefined){while(end.minutes-start.minutes<0){end.hours-=1;end.minutes+=60}if(end.minutes-start.minutes>0){hasTime=true;duration=("00"+(end.minutes-start.minutes)).substr(-2,2)+"M"+duration}}if(end.hours!=undefined){while(end.hours-start.hours<0){end.day-=1;end.hours+=24}if(end.hours-start.hours>0){hasTime=true;duration=("00"+(end.hours-start.hours)).substr(-2,2)+"H"+duration}}if(hasTime){duration="T"+duration}if(end.day!=undefined){while(end.day-start.day<0){end.month-=1;if(end.month<1){end.year-=1;end.month+=12}end.day+=GlobalUtil.daysInMonth(end.month,end.year)}if(end.day-start.day>0){duration=("00"+(end.day-start.day)).substr(-2,2)+"D"+duration}}if(end.month!=undefined){while(end.month-start.month<0){end.year-=1;end.month+=12}if(end.month-start.month>0){duration=("00"+(end.month-start.month)).substr(-2,2)+"M"+duration}}if(end.year-start.year>0){duration=("0000"+(end.year-start.year)).substr(-4,4)+"Y"+duration}if(end.year-start.year<0||duration==""){throw new Error("Start Date must be less than End Date")}return new Duration("P"+duration)}function zipDates(start,end){if(start.month!=undefined&&end.month==undefined){end.month=1}if(start.month==undefined&&end.month!=undefined){start.month=1}if(start.day!=undefined&&end.day==undefined){end.day=1}if(start.day==undefined&&end.day!=undefined){start.day=1}if(start.hours!=undefined&&end.hours==undefined){end.hours=0}if(start.hours==undefined&&end.hours!=undefined){start.hours=0}if(start.minutes!=undefined&&end.minutes==undefined){end.minutes=0}if(start.minutes==undefined&&end.minutes!=undefined){start.minutes=0}if(start.seconds!=undefined&&end.seconds==undefined){end.seconds=0}if(start.seconds==undefined&&end.seconds!=undefined){start.seconds=0}}function zipDuration(date,duration){var toSet={};if(duration.getSeconds()){toSet={seconds:true,minutes:true,hours:true,days:true,months:true}}else if(duration.getMinutes()){toSet={minutes:true,hours:true,days:true,months:true}}else if(duration.getHours()){toSet={hours:true,days:true,months:true}}else if(duration.getDays()){toSet={days:true,months:true}}else if(duration.getMonths()){toSet={months:true}}else{return}if(toSet.seconds&&date.seconds==undefined){date.seconds=0}if(toSet.minutes&&date.minutes==undefined){date.minutes=0}if(toSet.hours&&date.hours==undefined){date.hours=0}if(toSet.days&&date.day==undefined){date.day=1}if(toSet.months&&date.month==undefined){date.month=1}}function getObjFromDate(date,adjustTimezone){var obj={year:date.getYear(),month:date.getMonth(),day:date.getDay(),hours:date.getHours(),minutes:date.getMinutes(),seconds:date.getSeconds()};if(adjustTimezone){if(obj.minutes!=undefined&&date.getTZMinutes()!=undefined){obj.minutes+=date.getTZMinutes()}if(obj.hours!=undefined&&date.getTZHours()!=undefined){obj.hours+=date.getTZHours()}}return obj}function now(){return fromJSDate(new Date)}function fromJSDate(date){return new Simple("+"+date.toISOString().replace(/\.\d{3}/,""))}function compare(date1,date2){if(isString(date1)){try{if(date1[0]==="A"){date1=new Approximate(date1)}else{date1=new Simple(date1)}}catch(e){throw new Error(date1+" is not a simple date. Can only compare simple dates.")}}if(isString(date2)){try{if(date2[0]==="A"){date2=new Approximate(date2)}else{date2=new Simple(date2)}}catch(e){throw new Error(date2+" is not a simple date. Can only compare simple dates.")}}if(!(date1 instanceof Simple)||!(date2 instanceof Simple)){throw new Error("Bad input. Can only compare simple dates.")}var parts=["_year","_month","_day","_hours","_minutes","_seconds"];for(var i=0;idate2[part]){return 1}else{return-1}}return 0}function isString(obj){return typeof obj==="string"||obj instanceof String}},{"./approximate.js":46,"./duration.js":47,"./simple.js":51,"./util-global.js":52}],54:[function(_dereq_,module,exports){(function(global){(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:cap[1]==="pre"||cap[1]==="script"||cap[1]==="style",text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=escape(this.smartypants(cap[0]));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/--/g,"—").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+=""+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return""+(escaped?code:escape(code,true))+"\n
"}return''+(escaped?code:escape(code,true))+"\n
\n"};Renderer.prototype.blockquote=function(quote){return"\n"+quote+"
\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+""+type+">\n"};Renderer.prototype.listitem=function(text){return""+text+"\n"};Renderer.prototype.paragraph=function(text){return""+text+"
\n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
\n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"
\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+""+type+">\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+"
"};Renderer.prototype.br=function(){return this.options.xhtml?"
":"
"};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='"+text+"";return out};Renderer.prototype.image=function(href,title,text){var out='":">";return out};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occured:"+escape(e.message+"",true)+"
"}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}())}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],55:[function(_dereq_,module,exports){(function(global,factory){if(typeof exports==="object"&&exports){factory(exports)}else if(typeof define==="function"&&define.amd){define(["exports"],factory)}else{factory(global.Mustache={})}})(this,function(mustache){var Object_toString=Object.prototype.toString;var isArray=Array.isArray||function(object){return Object_toString.call(object)==="[object Array]"};function isFunction(object){return typeof object==="function"}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var RegExp_test=RegExp.prototype.test;function testRegExp(re,string){return RegExp_test.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function escapeHtml(string){return String(string).replace(/[&<>"'\/]/g,function(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tags){if(typeof tags==="string")tags=tags.split(spaceRe,2);if(!isArray(tags)||tags.length!==2)throw new Error("Invalid tags: "+tags);openingTagRe=new RegExp(escapeRegExp(tags[0])+"\\s*");closingTagRe=new RegExp("\\s*"+escapeRegExp(tags[1]));closingCurlyRe=new RegExp("\\s*"+escapeRegExp("}"+tags[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function(){return this.tail===""};Scanner.prototype.scan=function(re){var match=this.tail.match(re);if(!match||match.index!==0)return"";var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view==null?{}:view;this.cache={".":this.view};this.parent=parentContext}Context.prototype.push=function(view){return new Context(view,this)};Context.prototype.lookup=function(name){var cache=this.cache;var value;if(name in cache){value=cache[name]}else{var context=this,names,index;while(context){if(name.indexOf(".")>0){value=context.view;names=name.split(".");index=0;while(value!=null&&index")value=this._renderPartial(token,context,partials,originalTemplate);else if(symbol==="&")value=this._unescapedValue(token,context);else if(symbol==="name")value=this._escapedValue(token,context);else if(symbol==="text")value=this._rawValue(token);if(value!==undefined)buffer+=value}return buffer};Writer.prototype._renderSection=function(token,context,partials,originalTemplate){var self=this;var buffer="";var value=context.lookup(token[1]);function subRender(template){return self.render(template,context,partials)}if(!value)return;if(isArray(value)){for(var j=0,valueLength=value.length;j","\"","'","/","escapeHtml","whiteRe","spaceRe","equalsRe","curlyRe","tagRe","parseTemplate","sections","spaces","hasTag","nonSpace","stripSpace","openingTagRe","closingTagRe","closingCurlyRe","compileTags","scanner","Scanner","chr","openSection","eos","pos","scanUntil","valueLength","scan","nestTokens","squashTokens","squashedTokens","lastToken","numTokens","nestedTokens","collector","section","tail","index","search","Context","view","parentContext","cache",".","lookup","context","Writer","clearCache","renderTokens","originalTemplate","buffer","symbol","_renderSection","_renderInverted","_renderPartial","_unescapedValue","_escapedValue","_rawValue","subRender","defaultWriter","to_html","send","result"],"mappings":"CAAC,SAASA,GAAG,GAAG,gBAAiBC,SAAQC,OAAOD,QAAQD,QAAS,IAAG,kBAAmBG,SAAQA,OAAOC,IAAID,OAAOH,OAAO,CAAC,GAAIK,EAAE,oBAAoBC,QAAOD,EAAEC,OAAO,mBAAoBC,QAAOF,EAAEE,OAAO,mBAAoBC,QAAOH,EAAEG,MAAMH,EAAEI,QAAQT,MAAM,WAAW,GAAIG,QAAOD,OAAOD,OAAQ,OAAO,SAAUD,GAAEU,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,SAASC,UAAS,YAAYA,OAAQ,KAAIF,GAAGC,EAAE,MAAOA,GAAEF,GAAG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AQ0a,QAASrhB,SAAU2G,OAGnE2a,QAAOtb,UAAU+b,gBAAkB,SAASpJ,MAAO0I,SACjD,GAAI1a,OAAQ0a,QAAQD,OAAOzI,MAAM,GACjC,IAAIhS,OAAS,KACX,MAAOA,OAGX2a,QAAOtb,UAAUgc,cAAgB,SAASrJ,MAAO0I,SAC/C,GAAI1a,OAAQ0a,QAAQD,OAAOzI,MAAM,GACjC,IAAIhS,OAAS,KACX,MAAOvD,UAAS2W,OAAOpT,OAG3B2a,QAAOtb,UAAUic,UAAY,SAAStJ,OACpC,MAAOA,OAAM,GAGfvV,UAASjT,KAAO,aAChBiT,UAASuP,QAAU,OACnBvP,UAAS/K,MAAS,KAAM,KAGxB,IAAI8pB,eAAgB,GAAIb,OAKxBle,UAASme,WAAa,WACpB,MAAOY,eAAcZ,aAQvBne,UAASmZ,MAAQ,SAAU1rB,SAAUwH,MACnC,MAAO8pB,eAAc5F,MAAM1rB,SAAUwH,MAOvC+K,UAAS2B,OAAS,SAAUlU,SAAUmwB,KAAMhhB,UAC1C,MAAOmiB,eAAcpd,OAAOlU,SAAUmwB,KAAMhhB,UAI9CoD,UAASgf,QAAU,SAAUvxB,SAAUmwB,KAAMhhB,SAAUqiB,MACrD,GAAIC,QAASlf,SAAS2B,OAAOlU,SAAUmwB,KAAMhhB,SAE7C,IAAIyN,WAAW4U,MAAO,CACpBA,KAAKC,YACA,CACL,MAAOA,SAMXlf,UAAS2W,OAAS4E,UAGlBvb,UAASwc,QAAUA,OACnBxc,UAAS2d,QAAUA,OACnB3d,UAASke,OAASA,mBAIT,KACV","sourceRoot":"http://genealogysystems.github.io/fs-check/"}
\ No newline at end of file
+{"version":3,"file":"fs-check.min.js","sources":["fs-check.js"],"names":["e","exports","module","define","amd","f","window","global","self","FSCheck","t","n","r","s","o","u","a","require","i","Error","call","length",1,"_dereq_","utils","help","id","type","signature","check","person","parents","birthBeforeParentBirth","birth","$getBirth","addParent","parent","push","name","$getDisplayName","$getDisplayBirthDate","date","birthFormal","getFormalDate","isFullDate","parentBirth","parentBirthDate","compareFormalDates","template","pid","personName","personBirth","createOpportunity","this","../help","../util",2,"GedcomXDate","relationships","persons","marriages","getSpouseRelationships","childrenBeforeMarriage","marriage","marriageFacts","$getFacts","marriageDates","j","fact","ensureFullDate","sort","marriageDate","children","getChildRelationshipsOf","$getSpouseId","rel","childId","$getChildId","child","isBiologicalChildAndParents","birthDate","data","spouseId","spouse","spouseName","childName","gedcomx-date",3,"gender","compareList","newFormalDate","b","problemPairs","previous","current","previousGedcomXDate","currentGedcomXDate","birthDuration","getDuration","getYears","getMonths","firstName","id1","secondName","id2","pairs","formalDatesEqual","date1","date2","../util.js",4,"death","$getDeath","$getFormalDate","birthYear","getFactYear","deathYear","birthGedx","deathGedx",5,"names","$getNames","simplified","duplicates","fullText","$getFullText","simple","toLowerCase","replace",6,"alternates","preferred",7,"people","spouseIds","getSpouseIds","problemMarriages","formalDeathDate","formalDeathGedx","coupleRelationship","getSpouseRelationship","coupleFacts","problemMarriage","formalMarriageDate","formalMarriageGedx","coupleId","formalDate","spouses",8,"allSpouseIds","spouseIdsWithoutChildren","multipleSpouses",9,"getFactPlace","undefined","gensearchPerson",10,"place",11,"year",12,"sourceRefs","sourceArr","getSourceRefs","tagged","x","$getTags","indexOf","findarecord","tags","from","to",13,14,15,16,17,"mother","father","childRelationship","birthPlace","mothername","mid","gensearch","givenName","$getGivenName","familyName","$getSurname","motherGivenName","motherFamilyName",18,"surname",19,"wife","husband","facts","count","marriageFact","$getMarriageFact","crid","wid","hid","wifeName","husbandName","marriagePlace","spouseGivenName","spouseFamilyName",20,21,22,"marriageYear","cid","couple",23,"fathername","fid","fatherGivenName","fatherFamilyName",24,25,26,27,28,"parentRelationships","getParentRelationships","biologicalParentIds","relationship","fatherId","$getFatherId","motherId","$getMotherId","fatherFacts","$getFatherFacts","motherFacts","$getMotherFacts","Object","keys",29,"regex","$getPreferredName","nameText","nameMatches","match","badNames",30,"matches","getResultsCount","goodMatches","results","getSearchResults","confidence","singular",31,"titles","title",32,"$getDate","$getNormalizedDate",33,"$getPlace","$getNormalizedPlace",34,35,36,37,38,"badChars","chars","join","brackets",39,"addingAndCorrecting","customEvents","deletingInformation","mergingDuplicates","nonexactDates","recordHints","standardizing",40,"checks","ids","signatures","types","languages","all","checkId","list","language","code","translate","opportunity","lang","translation","description","markdown","partials","helpId","Array","isArray","links","_help","gedcomxDate","url","./checks/birthBeforeParentsBirth","./checks/childBeforeMarriage","./checks/childrenTooClose","./checks/deathBeforeBirth","./checks/duplicateNames","./checks/manyAlternateNames","./checks/marriageAfterDeath","./checks/marriageWithNoChildren","./checks/missingBirth","./checks/missingBirthDate","./checks/missingBirthPlace","./checks/missingBirthSource","./checks/missingDeath","./checks/missingDeathDate","./checks/missingDeathPlace","./checks/missingDeathSource","./checks/missingFather","./checks/missingGivenName","./checks/missingMarriageDate","./checks/missingMarriageFact","./checks/missingMarriagePlace","./checks/missingMarriageSource","./checks/missingMother","./checks/missingName","./checks/missingParents","./checks/missingSurname","./checks/multipleMarriageFacts","./checks/multipleParents","./checks/orInName","./checks/possibleDuplicates","./checks/recordHints","./checks/standardizeBirthDate","./checks/standardizeBirthPlace","./checks/standardizeDeathDate","./checks/standardizeDeathPlace","./checks/standardizeMarriageDate","./checks/standardizeMarriagePlace","./checks/unusualCharactersInName","./help","./util",41,"marked","renderer","Renderer","mustache","heading","text","level","getSimpleFormalDate","getYear","extractYearFromDateString","toFormalString","test","Date","isNaN","getTime","fromJSDate","substring","formalDateString","getType","getStart","getEnd","start","duration","halfDuration","multiplyDuration","addDuration","error","console","getFullYear","parseInt","render","deathPlace","deathDate","compare","personId","isString","isUndefined","getMonth","getDay","newMonth","newDay","_month","validDayMax","daysInMonth","_day","childAndParents","containsBiologicalParentFact","arg","prototype","toString","obj","String",42,"create","inherits","ctor","superCtor","super_","constructor","value","enumerable","writable","configurable","TempCtor",43,"process","nextTick","canSetImmediate","setImmediate","canPost","postMessage","addEventListener","queue","ev","source","stopPropagation","fn","shift","setTimeout","browser","env","argv","noop","on","once","off","emit","binding","cwd","chdir","dir",44,"isBuffer","copy","fill","readUInt8",45,"formatRegExp","format","objects","arguments","inspect","args","len","str","Number","JSON","stringify","_","isNull","isObject","deprecate","msg","apply","noDeprecation","warned","deprecated","throwDeprecation","traceDeprecation","trace","debugs","debugEnviron","debuglog","set","NODE_DEBUG","toUpperCase","RegExp","opts","ctx","seen","stylize","stylizeNoColor","depth","colors","isBoolean","showHidden","_extend","customInspect","stylizeWithColor","formatValue","bold","italic","underline","inverse","white","grey","black","blue","cyan","green","magenta","red","yellow","styles","special","number","boolean","null","string","regexp","styleType","style","arrayToHash","array","hash","forEach","val","idx","recurseTimes","isFunction","ret","primitive","formatPrimitive","visibleKeys","getOwnPropertyNames","isError","formatError","isRegExp","isDate","base","braces","toUTCString","output","formatArray","map","key","formatProperty","pop","reduceToSingleString","isNumber","l","hasOwnProperty","desc","getOwnPropertyDescriptor","get","split","line","substr","numLinesEst","reduce","prev","cur","ar","isNullOrUndefined","isSymbol","re","objectToString","d","isPrimitive","pad","months","timestamp","time","getHours","getMinutes","getSeconds","getDate","log","origin","add","prop","./support/isBuffer","/home/ubuntu/workspace/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js",46,"util","Simple","Approximate","charAt","message","isApproximate","./simple.js",47,"Duration","_parseNormalized","currentNum","inTime","valid","character","_years","slice","_minutes","_months","_days","_hours","_seconds","getDays",48,"GedUtil","Recurring","Range","version","now","./approximate.js","./range.js","./recurring.js","./util.js",49,"range","_approximate","parts","end","./duration.js",50,"countNum","getNth","getCount","Infinity","multiplier",51,"GlobalUtil","_parse","_year","getUTCFullYear","getUTCMonth","getUTCDay","getUTCHours","getUTCMinutes","getUTCSeconds","_tzHours","_tzMinutes","offset","_parseTime","month","day","flag24","tempDate","tempOffset","getTimezoneOffset","hours","_parseTimezone","minutes","seconds","tzHours","tzMinutes","getTZHours","getTZMinutes","Math","abs","./util-global.js",52,"leapyear",53,"startDuration","isFinite","newDuration","hasTime","round","days","years","startDate","getObjFromDate","endString","zipDuration","endDate","zipDates","toSet","adjustTimezone","toISOString","part",54,"block","newline","fences","hr","nptable","lheading","blockquote","html","def","table","paragraph","bullet","item","_tag","normal","merge","gfm","tables","Lexer","options","tokens","defaults","rules","lex","src","lexer","token","top","bq","next","loose","cap","bull","space","exec","pedantic","header","align","cells","ordered","smartLists","sanitize","pre","href","charCodeAt","inline","escape","autolink","tag","link","reflink","nolink","strong","em","br","del","_inside","_href","breaks","InlineLexer","out","mangle","inLink","outputLink","codespan","smartypants","image","ch","random","escaped","highlight","langPrefix","quote","raw","headerPrefix","xhtml","body","listitem","tablerow","content","tablecell","flags","prot","decodeURIComponent","unescape","Parser","parse","parser","reverse","tok","peek","parseText","row","cell","encode","fromCharCode","opt","target","callback","pending","done","err","silent","setOptions","inlineLexer",55,"factory","Mustache","Object_toString","object","escapeRegExp","RegExp_test","testRegExp","nonSpaceRe","isWhitespace","entityMap","&","<",">","\"","'","/","escapeHtml","whiteRe","spaceRe","equalsRe","curlyRe","tagRe","parseTemplate","sections","spaces","hasTag","nonSpace","stripSpace","openingTagRe","closingTagRe","closingCurlyRe","compileTags","scanner","Scanner","chr","openSection","eos","pos","scanUntil","valueLength","scan","nestTokens","squashTokens","squashedTokens","lastToken","numTokens","nestedTokens","collector","section","tail","index","search","Context","view","parentContext","cache",".","lookup","context","Writer","clearCache","renderTokens","originalTemplate","buffer","symbol","_renderSection","_renderInverted","_renderPartial","_unescapedValue","_escapedValue","_rawValue","subRender","defaultWriter","to_html","send","result"],"mappings":"CAAC,SAASA,GAAG,GAAG,gBAAiBC,SAAQC,OAAOD,QAAQD,QAAS,IAAG,kBAAmBG,SAAQA,OAAOC,IAAID,OAAOH,OAAO,CAAC,GAAIK,EAAE,oBAAoBC,QAAOD,EAAEC,OAAO,mBAAoBC,QAAOF,EAAEE,OAAO,mBAAoBC,QAAOH,EAAEG,MAAMH,EAAEI,QAAQT,MAAM,WAAW,GAAIG,QAAOD,OAAO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B,KAAMhhB,UAC1C,MAAOmiB,eAAcpd,OAAOtU,SAAUuwB,KAAMhhB,UAI9CoD,UAASgf,QAAU,SAAU3xB,SAAUuwB,KAAMhhB,SAAUqiB,MACrD,GAAIC,QAASlf,SAAS2B,OAAOtU,SAAUuwB,KAAMhhB,SAE7C,IAAI0N,WAAW2U,MAAO,CACpBA,KAAKC,YACA,CACL,MAAOA,SAMXlf,UAAS2W,OAAS4E,UAGlBvb,UAASwc,QAAUA,OACnBxc,UAAS2d,QAAUA,OACnB3d,UAASke,OAASA,mBAIT,KACV","sourceRoot":"http://genealogysystems.github.io/fs-check/"}
\ No newline at end of file
diff --git a/package.json b/package.json
index 3b41813..62febe1 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
"Family History"
],
"homepage": "https://github.com/genealogysystems/fs-check",
- "version": "2.2.2",
+ "version": "2.2.3",
"repository": {
"type": "git",
"url": "git@github.com:genealogysystems/fs-check.git"