-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathmicroformat-shiv.min.js
12 lines (9 loc) · 41.1 KB
/
microformat-shiv.min.js
1
2
3
4
5
6
7
8
9
10
11
12
/*
microformat-shiv - v2.0.2
Built: 2016-10-26 10:10 - http://microformat-shiv.com
Copyright (c) 2016 Glenn Jones
Licensed MIT
*/
var Microformats;!function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.Microformats=b()}(this,function(){function a(a,b){b&&b.maps&&(Array.isArray(b.maps)?a.add(b.maps):a.add([b.maps]))}var b={};b.version="2.0.2",b.livingStandard="2016-05-25T09:22:18Z",b.Parser=function(){this.rootPrefix="h-",this.propertyPrefixes=["p-","dt-","u-","e-"],this.excludeTags=["br","hr"]},b.maps=b.maps?b.maps:{},b.rels=b.rels?b.rels:{},b.Parser.prototype={init:function(){this.rootNode=null,this.document=null,this.options={baseUrl:"",filters:[],textFormat:"whitespacetrimmed",dateFormat:"auto",overlappingVersions:!1,impliedPropertiesByVersion:!0,parseLatLonGeo:!1,lang:!1},this.rootID=0,this.errors=[],this.noContentErr="No options.node or options.html was provided and no document object could be found."},get:function(a){var c,d=this.formatEmpty(),e=[];if(this.init(),a=a?a:{},this.mergeOptions(a),this.getDOMContext(a),this.rootNode&&this.document){if(this.hasMicroformats(this.rootNode,a)){if(this.prepareDOM(a),this.options.filters.length>0){var f=this.findFilterNodes(this.rootNode,this.options.filters);e=this.walkRoot(f)}else e=this.walkRoot(this.rootNode);d.items=e,b.domUtils.canCloneDocument(this.document)===!1&&this.clearUpDom(this.rootNode)}this.findRels&&(c=this.findRels(this.rootNode),d.rels=c.rels,d["rel-urls"]=c["rel-urls"])}else this.errors.push(this.noContentErr);return this.errors.length>0?this.formatError():d},getParent:function(a,b){return this.init(),b=b?b:{},a?this.getParentTreeWalk(a,b):(this.errors.push(this.noContentErr),this.formatError())},count:function(a){var c,d,e,f,g={};if(this.init(),a=a?a:{},this.getDOMContext(a),this.rootNode&&this.document){for(c=this.findRootNodes(this.rootNode,!0),f=c.length;f--;)for(d=b.domUtils.getAttributeList(c[f],"class"),e=d.length;e--;){b.utils.startWith(d[e],"h-")&&this.appendCount(d[e],1,g);for(var h in b.maps)b.maps[h].root===d[e]&&-1===d.indexOf(h)&&this.appendCount(h,1,g)}var i=this.countRels(this.rootNode);return i>0&&(g.rels=i),g}return{errors:[this.noContentErr]}},isMicroformat:function(a,c){var d,e;if(!a)return!1;if(a=b.domUtils.getTopMostNode(a),d=this.getUfClassNames(a),c&&c.filters&&b.utils.isArray(c.filters)){for(e=c.filters.length;e--;)if(d.root.indexOf(c.filters[e])>-1)return!0;return!1}return d.root.length>0},hasMicroformats:function(a,c){var d,e;if(!a)return!1;if(a=b.domUtils.getTopMostNode(a),d=this.findRootNodes(a,!0),c&&c.filters&&b.utils.isArray(c.filters)){for(e=d.length;e--;)if(this.isMicroformat(d[e],c))return!0;return!1}return d.length>0},add:function(a){a.forEach(function(a){a&&a.root&&a.name&&a.properties&&(b.maps[a.name]=JSON.parse(JSON.stringify(a)))})},getParentTreeWalk:function(a,b,c){return b=b?b:{},void 0===c?a.parentNode&&"HTML"!==a.nodeName?this.getParentTreeWalk(a.parentNode,b,!0):this.formatEmpty():null!==a&&void 0!==a&&a.parentNode?this.isMicroformat(a,b)?(b.node=a,this.get(b)):this.getParentTreeWalk(a.parentNode,b,!0):this.formatEmpty()},getDOMContext:function(a){var c=b.domUtils.getDOMContext(a);this.rootNode=c.rootNode,this.document=c.document},prepareDOM:function(a){var c,d;try{!a.baseUrl&&this.document&&this.document.location&&(this.options.baseUrl=this.document.location.href)}catch(e){}c=b.domUtils.querySelector(this.document,"base"),c&&(d=b.domUtils.getAttribute(c,"href"),d&&(this.options.baseUrl=d));var f,g,h;return f=b.domUtils.getNodePath(this.rootNode),g=b.domUtils.cloneDocument(this.document),h=b.domUtils.getNodeByPath(g,f),g&&h&&(this.document=g,this.rootNode=h),this.addIncludes&&this.addIncludes(this.document),this.rootNode&&this.document},formatError:function(){var a=this.formatEmpty();return a.errors=this.errors,a},formatEmpty:function(){return{items:[],rels:{},"rel-urls":{}}},findFilterNodes:function(a,c){b.utils.isString(c)&&(c=[c]);var d=b.domUtils.createNode("div"),e=this.findRootNodes(a,!0),f=0,g=0,h=0;for(h=c.length;h--;)if(this.getMapping(c[h])){var i=this.getMapping(c[h]).root;c.push(i)}if(e)for(f=e.length;f>g;){for(h=c.length;h--;)if(b.domUtils.hasAttributeValue(e[g],"class",c[h])){var j=b.domUtils.clone(e[g]);b.domUtils.appendChild(d,j);break}g++}return d},appendCount:function(a,b,c){c[a]?c[a]=c[a]+b:c[a]=b},shouldInclude:function(a,c){var d;if(b.utils.isArray(c)&&c.length>0){for(d=c.length;d--;)if(a.type[0]===c[d])return!0;return!1}return!0},findRootNodes:function(a,c){var d,e,f,g,h,i=null,j=[],k=[];for(h in b.maps)b.maps.hasOwnProperty(h)&&k.push(b.maps[h].root);for(c=c?c:!1,i=c&&a.parentNode?b.domUtils.getNodesByAttribute(a.parentNode,"class"):b.domUtils.getNodesByAttribute(a,"class"),e=0,f=i.length;f>e;){for(d=b.domUtils.getAttributeList(i[e],"class"),g=d.length;g--;){if(k.indexOf(d[g])>-1){j.push(i[e]);break}if(b.utils.startWith(d[g],"h-")){j.push(i[e]);break}}e++}return j},walkRoot:function(a){var c,d,e=this,f=[],g=[],h=[];if(d=this.getUfClassNames(a),d&&d.root.length>0)g=this.walkTree(a),g.length>0&&(h=h.concat(g));else if(f=b.domUtils.getChildren(a),f&&f.length>0&&this.findRootNodes(a,!0).length>-1)for(var i=0;i<f.length;i++)c=f[i],g=e.walkRoot(c),g.length>0&&(h=h.concat(g));return h},walkTree:function(a){var c,d,e,f=[];if(c=this.getUfClassNames(a),c&&c.root.length&&c.root.length>0){if(this.rootID++,e=this.rootID,d=this.createUfObject(c.root,c.typeVersion),this.walkChildren(a,d,c.root,e,c),this.impliedRules&&this.impliedRules(a,d,c),this.options.lang===!0){var g=b.domUtils.getFirstAncestorAttribute(a,"lang");g&&(d.lang=g)}f.push(this.cleanUfObject(d))}return f},walkChildren:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q=this,r=[];for(r=b.domUtils.getChildren(a),n=0,o=r.length;o>n;){p=r[n];var s=q.getUfClassNames(p,d);if(s.root.length>0&&s.properties.length>0&&!p.addedAsRoot){for(g=q.createUfObject(s.root,s.typeVersion,b.text.parse(this.document,p,q.options.textFormat)),j=q.removePropPrefix(s.properties[0][0]),f&&1===f.root.length&&1===f.properties.length&&q.impliedValueRule&&(c=q.impliedValueRule(c,f.properties[0][0],s.properties[0][0],i)),c.properties[j]?c.properties[j].push(g):c.properties[j]=[g],q.rootID++,p.addedAsRoot=!0,m=0,l=g.type.length,h=q.rootID;l>m;)q.walkChildren(p,g,g.type,h,s),m++;this.impliedRules&&q.impliedRules(p,g,s),this.cleanUfObject(g)}if(0===s.root.length&&s.properties.length>0){for(m=0,l=s.properties.length;l>m;)i=q.getValue(p,s.properties[m][0],c),j=q.removePropPrefix(s.properties[m][0]),k=s.properties[m][1],f&&1===f.root.length&&1===f.properties.length&&q.impliedValueRule&&(c=q.impliedValueRule(c,f.properties[0][0],s.properties[m][0],i)),q.hasRootID(p,e,j)||q.isAllowedPropertyVersion(c.typeVersion,k)&&(c.properties[j]?c.properties[j].push(i):c.properties[j]=[i],q.appendRootID(p,e,j)),m++;q.walkChildren(p,c,d,e,s)}if(0===s.root.length&&0===s.properties.length&&q.walkChildren(p,c,d,e,s),s.root.length>0&&0===s.properties.length){for(g=q.createUfObject(s.root,s.typeVersion,b.text.parse(this.document,p,q.options.textFormat)),c.children||(c.children=[]),q.hasRootID(p,e,"child-root")||(c.children.push(g),q.appendRootID(p,e,"child-root"),q.rootID++),m=0,l=g.type.length,h=q.rootID;l>m;)q.walkChildren(p,g,g.type,h,s),m++;this.impliedRules&&q.impliedRules(p,g,s),q.cleanUfObject(g)}n++}},getValue:function(a,c,d){var e="";return b.utils.startWith(c,"p-")&&(e=this.getPValue(a,!0)),b.utils.startWith(c,"e-")&&(e=this.getEValue(a)),b.utils.startWith(c,"u-")&&(e=this.getUValue(a,!0)),b.utils.startWith(c,"dt-")&&(e=this.getDTValue(a,c,d,!0)),e},getPValue:function(a,c){var d="";return c&&(d=this.getValueClass(a,"p")),!d&&c&&(d=this.getValueTitle(a)),d||(d=b.domUtils.getAttrValFromTagList(a,["abbr"],"title")),d||(d=b.domUtils.getAttrValFromTagList(a,["data","input"],"value")),"br"!==a.name&&"hr"!==a.name||(d=""),d||(d=b.domUtils.getAttrValFromTagList(a,["img","area"],"alt")),d||(d=b.text.parse(this.document,a,this.options.textFormat)),d?d:""},getEValue:function(a){var c={value:"",html:""};if(this.expandURLs(a,"src",this.options.baseUrl),this.expandURLs(a,"href",this.options.baseUrl),c.value=b.text.parse(this.document,a,this.options.textFormat),c.html=b.html.parse(a),this.options.lang===!0){var d=b.domUtils.getFirstAncestorAttribute(a,"lang");d&&(c.lang=d)}return c},getUValue:function(a,c){var d="";return c&&(d=this.getValueClass(a,"u")),!d&&c&&(d=this.getValueTitle(a)),d||(d=b.domUtils.getAttrValFromTagList(a,["a","area"],"href")),d||(d=b.domUtils.getAttrValFromTagList(a,["img","audio","video","source"],"src")),d||(d=b.domUtils.getAttrValFromTagList(a,["video"],"poster")),d||(d=b.domUtils.getAttrValFromTagList(a,["object"],"data")),d&&""!==d&&-1===d.indexOf("://")&&(d=b.url.resolve(d,this.options.baseUrl)),d||(d=b.domUtils.getAttrValFromTagList(a,["abbr"],"title")),d||(d=b.domUtils.getAttrValFromTagList(a,["data","input"],"value")),d||(d=b.text.parse(this.document,a,this.options.textFormat)),d?d:""},getDTValue:function(a,c,d,e){var f="",g=!1;if(e&&(f=this.getValueClass(a,"dt"),f&&(g=!0)),!f&&e&&(f=this.getValueTitle(a)),f||(f=b.domUtils.getAttrValFromTagList(a,["time","ins","del"],"datetime")),f||(f=b.domUtils.getAttrValFromTagList(a,["abbr"],"title")),f||(f=b.domUtils.getAttrValFromTagList(a,["data","input"],"value")),f||(f=b.text.parse(this.document,a,this.options.textFormat)),f){var h=g?"microformat2":this.options.dateFormat;return b.dates.isDuration(f)?f:b.dates.isTime(f)?(d&&d.times.push([c,b.dates.parseAmPmTime(f,h)]),b.dates.parseAmPmTime(f,h)):(d&&d.dates.push([c,new b.ISODate(f).toString(h)]),new b.ISODate(f).toString(h))}return""},appendRootID:function(a,c,d){if(this.hasRootID(a,c,d)===!1){var e=[];b.domUtils.hasAttribute(a,"rootids")&&(e=b.domUtils.getAttributeList(a,"rootids")),e.push("id"+c+"-"+d),b.domUtils.setAttribute(a,"rootids",e.join(" "))}},hasRootID:function(a,c,d){var e=[];return b.domUtils.hasAttribute(a,"rootids")?(e=b.domUtils.getAttributeList(a,"rootids"),e.indexOf("id"+c+"-"+d)>-1):!1},getValueClass:function(a,c){var d,e,f,g=this,h=[],i=[];for(h=b.domUtils.getChildren(a),e=0,f=h.length;f>e;){d=h[e];var j=null;if(b.domUtils.hasAttributeValue(d,"class","value")){switch(c){case"p":j=g.getPValue(d,!1);break;case"u":j=g.getUValue(d,!1);break;case"dt":j=g.getDTValue(d,"",null,!1)}j&&i.push(b.utils.trim(j))}e++}if(!(i.length>0))return null;if("p"===c)return b.text.parseText(this.document,i.join(""),this.options.textFormat);if("u"===c)return i.join("");if("dt"===c){var k="microformat2";return b.dates.concatFragments(i,k).toString(k)}},getValueTitle:function(a){var c,d,e,f=[];for(c=b.domUtils.getNodesByAttributeValue(a,"class","value-title"),e=0,d=c.length;d>e;)b.domUtils.hasAttribute(c[e],"title")&&f.push(b.domUtils.getAttribute(c[e],"title")),e++;return f.join("")},hasHClass:function(a){var b=this.getUfClassNames(a);return!!(b.root&&b.root.length>0)},getUfClassNames:function(a,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=this,s={root:[],properties:[]};if(b.domUtils.hasTagName(a,this.excludeTags)===!1&&(d=b.domUtils.getAttribute(a,"class")))for(f=d.split(" "),i=0,h=f.length;h>i;){for(g=b.utils.trim(f[i]),b.utils.startWith(g,r.rootPrefix)&&b.utils.isLowerCase(g)&&(-1===s.root.indexOf(g)&&s.root.push(g),s.typeVersion="v2"),j=r.propertyPrefixes.length;j--;)b.utils.startWith(g,r.propertyPrefixes[j])&&b.utils.isLowerCase(g)&&s.properties.push([g,"v2"]);for(e in b.maps)b.maps.hasOwnProperty(e)&&b.maps[e].root===g&&-1===s.root.indexOf(e)&&(b.maps[e].subTree?s.properties.push(["p-"+b.maps[e].root,"v1"]):(s.root.push(e),s.typeVersion||(s.typeVersion="v1")));if(c)for(var t=0;t<c.length;t++)if(q=c[t],l=r.getMapping(q))for(e in l.properties)if(l.properties.hasOwnProperty(e)&&(m=l.properties[e],n=m.map?m.map:"p-"+e,e===g))if(m.uf){for(k=0;h>k;)o=r.getV2RootName(f[k]),m.uf.indexOf(o)>-1&&-1===s.root.indexOf(o)&&(s.root.push(o),s.typeVersion="v1"),k++;-1===s.properties.indexOf(n)&&s.properties.push([n,"v1"])}else-1===s.properties.indexOf(n)&&s.properties.push([n,"v1"]);i++}if(c&&this.findRelImpied)for(var u=0;u<c.length;u++)q=c[u],p=this.findRelImpied(a,q),p&&-1===s.properties.indexOf(p)&&s.properties.push([p,"v1"]);return s},getMapping:function(a){var c;for(c in b.maps)if(b.maps[c].root===a||c===a)return b.maps[c];return null},getV2RootName:function(a){var c;for(c in b.maps)if(b.maps[c].root===a)return c;return null},isAllowedPropertyVersion:function(a,b){return this.options.overlappingVersions===!0?!0:a===b},createUfObject:function(a,c,d){var e={};return d&&b.utils.isOnlyWhiteSpace(d)===!1&&(e.value=d),b.utils.isArray(a)?e.type=a:e.type=[a],e.properties={},e.typeVersion=c,e.times=[],e.dates=[],e.altValue=null,e},cleanUfObject:function(a){return delete a.times,delete a.dates,delete a.typeVersion,delete a.altValue,a},removePropPrefix:function(a){var c;for(c=this.propertyPrefixes.length;c--;){var d=this.propertyPrefixes[c];b.utils.startWith(a,d)&&b.utils.isLowerCase(a)&&(a=a.substr(d.length))}return a},expandURLs:function(a,c,d){var e,f,g;for(f=b.domUtils.getNodesByAttribute(a,c),e=f.length;e--;)try{g=b.domUtils.getAttribute(f[e],c),g&&""!==g&&""!==d&&-1===g.indexOf("://")&&(g=b.url.resolve(g,d),b.domUtils.setAttribute(f[e],c,g))}catch(h){}},mergeOptions:function(a){var b;for(b in a)a.hasOwnProperty(b)&&(this.options[b]=a[b])},removeRootIds:function(a){var c,d;for(c=b.domUtils.getNodesByAttribute(a,"rootids"),d=c.length;d--;)b.domUtils.removeAttribute(c[d],"rootids")},clearUpDom:function(a){this.removeIncludes&&this.removeIncludes(a),this.removeRootIds(a)}},b.Parser.prototype.constructor=b.Parser,b.Parser&&(b.Parser.prototype.impliedRules=function(a,b,c){var d=b.typeVersion?b.typeVersion:"v2";return this.options.impliedPropertiesByVersion===!1&&(d="v2"),a&&b&&b.properties&&(b=this.impliedBackwardComp(a,b,c),"v2"===d&&(b=this.impliedhFeedTitle(b),b=this.impliedName(a,b),b=this.impliedPhoto(a,b),b=this.impliedUrl(a,b)),b=this.impliedValue(a,b,c),b=this.impliedDate(b),this.options.parseLatLonGeo===!0&&(b=this.impliedGeo(b))),b},b.Parser.prototype.impliedName=function(a,c){var d,e;if(!c.properties.name){e=this.getImpliedProperty(a,["img","area","abbr"],this.getNameAttr);var f=this.options.textFormat;d=e?[b.text.parseText(this.document,e,f)]:[b.text.parse(this.document,a,f)],d&&""!==d[0]&&(c.properties.name=d)}return c},b.Parser.prototype.impliedPhoto=function(a,c){var d;return c.properties.photo||(d=this.getImpliedProperty(a,["img","object"],this.getPhotoAttr),d&&(d&&""!==d&&""!==this.options.baseUrl&&-1===d.indexOf("://")&&(d=b.url.resolve(d,this.options.baseUrl)),c.properties.photo=[b.utils.trim(d)])),c},b.Parser.prototype.impliedUrl=function(a,c){var d;return c.properties.url||(d=this.getImpliedProperty(a,["a","area"],this.getURLAttr),d&&(d&&""!==d&&""!==this.options.baseUrl&&-1===d.indexOf("://")&&(d=b.url.resolve(d,this.options.baseUrl)),c.properties.url=[b.utils.trim(d)])),c},b.Parser.prototype.impliedDate=function(a){var c;if(a.times.length>0&&a.dates.length>0){c=b.dates.dateTimeUnion(a.dates[0][1],a.times[0][1],"microformat2");var d=this.removePropPrefix(a.times[0][0]);d.length&&Array.isArray(a.properties[d])&&(a.properties[d][0]=c.toString("microformat2"))}return delete a.times,delete a.dates,a},b.Parser.prototype.getImpliedProperty=function(a,c,d){var e,f,g=d(a);return g||(e=b.domUtils.getSingleDescendantOfType(a,c),e&&this.hasHClass(e)===!1&&(g=d(e)),a.children.length>0&&(f=b.domUtils.getSingleDescendant(a),f&&this.hasHClass(f)===!1&&(e=b.domUtils.getSingleDescendantOfType(f,c),e&&this.hasHClass(e)===!1&&(g=d(e))))),g},b.Parser.prototype.getNameAttr=function(a){var c=b.domUtils.getAttrValFromTagList(a,["img","area"],"alt");return c||(c=b.domUtils.getAttrValFromTagList(a,["abbr"],"title")),c},b.Parser.prototype.getPhotoAttr=function(a){var c=b.domUtils.getAttrValFromTagList(a,["img"],"src");return c||b.domUtils.hasAttributeValue(a,"class","include")!==!1||(c=b.domUtils.getAttrValFromTagList(a,["object"],"data")),c},b.Parser.prototype.getURLAttr=function(a){var c=null;return b.domUtils.hasAttributeValue(a,"class","include")===!1&&(c=b.domUtils.getAttrValFromTagList(a,["a"],"href"),c||(c=b.domUtils.getAttrValFromTagList(a,["area"],"href"))),c},b.Parser.prototype.impliedValue=function(a,b,c){return b.properties.name&&b.value&&c.root.length>0&&1===c.properties.length&&(b=this.getAltValue(b,c.properties[0][0],"p-name",b.properties.name[0])),b.properties.url&&c&&1===c.root.length&&1===c.properties.length&&(b=this.getAltValue(b,c.properties[0][0],"u-url",b.properties.url[0])),null!==b.altValue&&(b.value=b.altValue.value),delete b.altValue,b},b.Parser.prototype.getAltValue=function(a,c,d,e){return a.value&&!a.altValue&&(b.utils.startWith(c,"p-")&&"p-name"===d&&(a.altValue={name:d,value:e}),b.utils.startWith(c,"e-")&&b.utils.startWith(d,"e-")&&(a.altValue={name:d,value:e}),b.utils.startWith(c,"u-")&&"u-url"===d&&(a.altValue={name:d,value:e})),a},b.Parser.prototype.impliedhFeedTitle=function(a){if(a.type&&a.type.indexOf("h-feed")>-1&&(void 0===a.properties.name||""===a.properties.name[0])){var c=b.domUtils.querySelector(this.document,"title");c&&(a.properties.name=[b.domUtils.textContent(c)])}return a},b.Parser.prototype.impliedGeo=function(a){var c,d,e,f,g=!0;return a.type&&a.type.indexOf("h-geo")>-1&&(void 0!==a.properties.latitude&&void 0!==a.properties.longitude||(c=a.properties.name?a.properties.name[0]:null,c=!c&&a.properties.value?a.properties.value:c,c&&(c=c.replace(";",","),c.indexOf(",")>-1&&(d=c.split(","),d.length>1&&(f=parseFloat(d[0]),(b.utils.isNumber(f)&&f>90||-90>f)&&(g=!1),e=parseFloat(d[1]),(b.utils.isNumber(e)&&e>180||-180>e)&&(g=!1),g&&(a.properties.latitude=[f],a.properties.longitude=[e])))))),a},b.Parser.prototype.impliedBackwardComp=function(a,c,d){return 1===d.root.length&&1===d.properties.length&&d.root[0].replace("h-","")===this.removePropPrefix(d.properties[0][0])&&b.utils.hasProperties(c.properties)===!1&&(c=this.impliedName(a,c)),c}),b.Parser&&(b.Parser.prototype.addIncludes=function(a){this.addAttributeIncludes(a,"itemref"),this.addAttributeIncludes(a,"headers"),this.addClassIncludes(a)},b.Parser.prototype.addAttributeIncludes=function(a,c){var d,e,f,g,h,i;for(d=b.domUtils.getNodesByAttribute(a,c),g=0,f=d.length;f>g;){if(e=b.domUtils.getAttributeList(d[g],c))for(h=0,i=e.length;i>h;)this.apppendInclude(d[g],e[h]),h++;g++}},b.Parser.prototype.addClassIncludes=function(a){var c,d,e,f=0;for(d=b.domUtils.getNodesByAttributeValue(a,"class","include"),e=d.length;e>f;)c=b.domUtils.getAttrValFromTagList(d[f],["a"],"href"),c||(c=b.domUtils.getAttrValFromTagList(d[f],["object"],"data")),this.apppendInclude(d[f],c),f++},b.Parser.prototype.apppendInclude=function(a,c){var d,e;c&&(c=b.utils.trim(c.replace("#","")),d=b.domUtils.getElementById(this.document,c),d&&(e=b.domUtils.clone(d),this.markIncludeChildren(e),b.domUtils.appendChild(a,e)))},b.Parser.prototype.markIncludeChildren=function(a){var c,d,e;for(c=this.findRootNodes(a),d=0,e=c.length,b.domUtils.setAttribute(a,"data-include","true"),b.domUtils.setAttribute(a,"style","display:none");e>d;)b.domUtils.setAttribute(c[d],"data-include","true"),d++},b.Parser.prototype.removeIncludes=function(a){var c,d;for(c=b.domUtils.getNodesByAttribute(a,"data-include"),d=c.length;d--;)b.domUtils.removeChild(a,c[d])}),b.Parser&&(b.Parser.prototype.findRels=function(a){var c,d,e,f,g,h,i,j,k,l={items:[],rels:{},"rel-urls":{}};for(k=b.domUtils.getNodesByAttribute(a,"rel"),c=0,d=k.length;d>c;){if(g=b.domUtils.getAttribute(k[c],"rel")){for(h=g.split(" "),f=0,e=h.length;e>f;){if(i=b.utils.trim(h[f]),j=b.domUtils.getAttrValFromTagList(k[c],["a","area"],"href"),j||(j=b.domUtils.getAttrValFromTagList(k[c],["link"],"href")),l.rels[i]||(l.rels[i]=[]),"string"==typeof this.options.baseUrl&&"string"==typeof j){var m=b.url.resolve(j,this.options.baseUrl);-1===l.rels[i].indexOf(m)&&l.rels[i].push(m)}f++}var n=null;b.domUtils.hasAttribute(k[c],"href")&&(n=b.domUtils.getAttribute(k[c],"href"),n&&(n=b.url.resolve(n,this.options.baseUrl)));var o=this.getRelProperties(k[c]);o.rels=h,n&&void 0===l["rel-urls"][n]&&(l["rel-urls"][n]=o)}c++}return l},b.Parser.prototype.getRelProperties=function(a){var c={};return b.domUtils.hasAttribute(a,"media")&&(c.media=b.domUtils.getAttribute(a,"media")),b.domUtils.hasAttribute(a,"type")&&(c.type=b.domUtils.getAttribute(a,"type")),b.domUtils.hasAttribute(a,"hreflang")&&(c.hreflang=b.domUtils.getAttribute(a,"hreflang")),b.domUtils.hasAttribute(a,"title")&&(c.title=b.domUtils.getAttribute(a,"title")),""!==b.utils.trim(this.getPValue(a,!1))&&(c.text=this.getPValue(a,!1)),c},b.Parser.prototype.findRelImpied=function(a,c){var d,e,f;if(e=this.getMapping(c))for(var g in e.properties)if(e.properties.hasOwnProperty(g)){var h=e.properties[g],i=h.map?h.map:"p-"+g,j=0;if(h.relAlt&&b.domUtils.hasAttribute(a,"rel")){for(f=h.relAlt.length;f--;)b.domUtils.hasAttributeValue(a,"rel",h.relAlt[f])&&j++;j===h.relAlt.length&&(d=i)}}return d},b.Parser.prototype.hasRel=function(a){return this.countRels(a)>0},b.Parser.prototype.countRels=function(a){return a?b.domUtils.getNodesByAttribute(a,"rel").length:0}),b.utils={isString:function(a){return"string"==typeof a},isNumber:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},isArray:function(a){return a&&!a.propertyIsEnumerable("length")&&"object"==typeof a&&"number"==typeof a.length},isFunction:function(a){return!!(a&&a.constructor&&a.call&&a.apply)},startWith:function(a,b){return 0===a.indexOf(b)},isLowerCase:function(a){return a===a.toLowerCase()},trim:function(a){return a&&this.isString(a)?a.trim()?a.trim():a.replace(/^\s+|\s+$/g,""):""},replaceCharAt:function(a,b,c){return a&&a.length>b?a.substr(0,b)+c+a.substr(b+c.length):a},trimWhitespace:function(a){if(a&&a.length){for(var b=a.length,c=0;b--&&this.isOnlyWhiteSpace(a[b]);)a=this.replaceCharAt(a,b," ");for(b=a.length;b>c&&this.isOnlyWhiteSpace(a[c]);)a=this.replaceCharAt(a,b," "),c++}return this.trim(a)},isOnlyWhiteSpace:function(a){return!/[^\t\n\r ]/.test(a)},collapseWhiteSpace:function(a){return a.replace(/[\t\n\r ]+/g," ")},hasProperties:function(a){var b;for(b in a)if(a.hasOwnProperty(b))return!0;return!1},sortObjects:function(a,b){return b=b?-1:1,function(c,d){return c=c[a],d=d[a],d>c?-1*b:c>d?1*b:0}}},b.domUtils={document:null,rootNode:null,getDOMParser:function(){if(void 0!==typeof DOMParser)return new DOMParser;try{return Components.classes["@mozilla.org/xmlextras/domparser;1"].createInstance(Components.interfaces.nsIDOMParser)}catch(a){return}},getDOMContext:function(a){if(a.node&&(this.rootNode=a.node),a.html){var c=this.getDOMParser();this.rootNode=c.parseFromString(a.html,"text/html")}return null!==this.rootNode&&(9===this.rootNode.nodeType?(this.document=this.rootNode,this.rootNode=b.domUtils.querySelector(this.rootNode,"html")):this.document=b.domUtils.ownerDocument(this.rootNode)),!this.rootNode&&document&&(this.rootNode=b.domUtils.querySelector(document,"html"),this.document=document),this.rootNode&&this.document?{document:this.document,rootNode:this.rootNode}:{document:null,rootNode:null}},getTopMostNode:function(a){return a},ownerDocument:function(a){return a.ownerDocument},textContent:function(a){return a.textContent?a.textContent:a.innerText?a.innerText:""},innerHTML:function(a){return a.innerHTML},hasAttribute:function(a,b){return a.hasAttribute?a.hasAttribute(b):!1},hasAttributeValue:function(a,b,c){return this.getAttributeList(a,b).indexOf(c)>-1},getAttribute:function(a,b){return a.getAttribute(b)},setAttribute:function(a,b,c){a.setAttribute(b,c)},removeAttribute:function(a,b){a.removeAttribute(b)},getElementById:function(a,b){return a.querySelector("#"+b)},querySelector:function(a,b){return a.querySelector(b)},getAttributeList:function(a,b){var c,d=[];return c=a.getAttribute(b),c&&""!==c&&(c.indexOf(" ")>-1?d=c.split(" "):d.push(c)),d},getNodesByAttribute:function(a,b){var c="["+b+"]";return a.querySelectorAll(c)},getNodesByAttributeValue:function(a,b,c){var d,e=[],f=0,g=[];if(e=this.getNodesByAttribute(a,b))for(d=e.length;d>f;)this.hasAttributeValue(e[f],b,c)&&g.push(e[f]),f++;return g},getAttrValFromTagList:function(a,b,c){for(var d=b.length;d--;)if(a.tagName.toLowerCase()===b[d]){var e=this.getAttribute(a,c);if(e&&""!==e)return e}return null},getSingleDescendant:function(a){return this.getDescendant(a,null,!1)},getSingleDescendantOfType:function(a,b){return this.getDescendant(a,b,!0)},getDescendant:function(a,b,c){for(var d,e=a.children.length,f=0,g=0,h=null;e--;)d=a.children[e],1===d.nodeType&&(b?this.hasTagName(d,b)&&(h=d,g++):(h=d,f++));return c===!0?1===g?h:null:1===f?h:null},hasTagName:function(a,b){for(var c=b.length;c--;)if(a.tagName.toLowerCase()===b[c])return!0;return!1},appendChild:function(a,b){return a.appendChild(b)},removeChild:function(a){return a.parentNode?a.parentNode.removeChild(a):null},clone:function(a){var b=a.cloneNode(!0);return this.hasAttribute(a,"id")&&this.removeAttribute(a,"id"),b},removeDescendantsByTagName:function(a,b){for(var c=0;c<b.length;c++)if(a.getElementsByTagName)for(var d=a.getElementsByTagName(b[c]);d[0];)d[0].parentNode.removeChild(d[0]);return a},getElementText:function(a){return a&&a.data?a.data:""},getOrderedAttributes:function(a){for(var c=a.outerHTML,d=[],e=0;e<a.attributes.length;e++){var f=a.attributes[e];f.indexNum=c.indexOf(f.name),d.push(f)}return d.sort(b.utils.sortObjects("indexNum"))},decodeEntities:function(a,b){return a.createTextNode(b).nodeValue},cloneDocument:function(a){var b,c=null;return this.canCloneDocument(a)&&(c=a.implementation.createHTMLDocument(""),b=c.importNode(a.documentElement,!0),c.replaceChild(b,c.querySelector("html"))),b&&b.nodeType&&1===b.nodeType?c:a},canCloneDocument:function(a){return a&&a.importNode&&a.implementation&&a.implementation.createHTMLDocument},getChildIndex:function(a){for(var b,c=a.parentNode,d=-1;c&&(b=c.childNodes[++d]);)if(b===a)return d;return-1},getNodePath:function(a){var b=a.parentNode,c=[],d=this.getChildIndex(a);return b&&(c=this.getNodePath(b))&&d>-1&&c.push(d),c},getFirstAncestorAttribute:function(a,b){if(!a)return null;if(this.hasAttribute(a,b))return this.getAttribute(a,b);var c=a.parentNode;return c?this.getFirstAncestorAttribute(c,b):null},getNodeByPath:function(a,b){for(var c,d=a.documentElement,e=0;(c=b[++e])>-1;)d=d.childNodes[c];return d},getChildren:function(a){return a.children},createNode:function(a){return this.document.createElement(a)},createNodeWithText:function(a,b){var c=this.document.createElement(a);return c.innerHTML=b,c}},b.url={init:function(){this._domParser=b.domUtils.getDOMParser(),this._html='<base id="base" href=""></base><a id="link" href=""></a>',this._nodes=this._domParser.parseFromString(this._html,"text/html"),this._baseNode=b.domUtils.getElementById(this._nodes,"base"),this._linkNode=b.domUtils.getElementById(this._nodes,"link")},resolve:function(a,c){if(!b.utils.isString(a)||!b.utils.isString(c)||-1!==a.indexOf("://"))return b.utils.isString(a)?a:"";try{var d=new URL(a,c).toString();return"[object URL]"===d&&(d=URI.resolve(c,a)),d}catch(e){return void 0===this._domParser&&this.init(),this._baseNode.href=c,this._linkNode.href=a,this._linkNode.href}}},b.ISODate=function(a,b){this.clear(),this.format=b?b:"auto",this.setFormatSep(),arguments[0]&&this.parse(a,this.format)},b.ISODate.prototype={clear:function(){this.clearDate(),this.clearTime(),this.clearTimeZone(),this.setAutoProfileState()},clearDate:function(){this.dY=-1,this.dM=-1,this.dD=-1,this.dDDD=-1},clearTime:function(){this.tH=-1,this.tM=-1,this.tS=-1,this.tD=-1},clearTimeZone:function(){this.tzH=-1,this.tzM=-1,this.tzPN="+",this.z=!1},setAutoProfileState:function(){this.autoProfile={sep:"T",dsep:"-",tsep:":",tzsep:":",tzZulu:"Z"}},parse:function(a,b){this.clear(),this.setFormat(b);var c=[],d=[],e=0,f="",g="",h="";return a.indexOf("t")>-1&&(this.autoProfile.sep="t"),a.indexOf("z")>-1&&(this.autoProfile.tzZulu="z"),a.indexOf("Z")>-1&&(this.autoProfile.tzZulu="Z"),-1===a.toUpperCase().indexOf("T")&&(this.autoProfile.sep=" "),a=a.toUpperCase().replace(" ","T"),a.indexOf("T")>-1?(c=a.split("T"),f=c[0],g=c[1],g.indexOf("Z")>-1&&(this.z=!0),(g.indexOf("+")>-1||g.indexOf("-")>-1)&&(d=g.split("Z"),g=d[0],h=d[1],(g.indexOf("+")>-1||g.indexOf("-")>-1)&&(e=0,e=g.indexOf("+")>-1?g.indexOf("+"):g.indexOf("-"),h=g.substring(e,g.length),g=g.substring(0,e)))):f=a,""!==f&&(this.parseDate(f),""!==g&&(this.parseTime(g),""!==h&&this.parseTimeZone(h))),this.toString(this.format)},parseDate:function(a,b){this.setFormat(b),this.clearDate();var c=[];return-1===a.indexOf("-")&&(this.autoProfile.tsep=""),c=a.match(/(\d\d\d\d)-(\d\d\d)/),c&&(c[1]&&(this.dY=c[1]),c[2]&&(this.dDDD=c[2])),-1===this.dDDD&&(c=a.match(/(\d\d\d\d)?-?(\d\d)?-?(\d\d)?/),c[1]&&(this.dY=c[1]),c[2]&&(this.dM=c[2]),c[3]&&(this.dD=c[3])),this.toString(this.format)},parseTime:function(a,b){this.setFormat(b),this.clearTime();var c=[];return-1===a.indexOf(":")&&(this.autoProfile.tsep=""),c=a.match(/(\d\d)?:?(\d\d)?:?(\d\d)?.?([0-9]+)?/),c[1]&&(this.tH=c[1]),c[2]&&(this.tM=c[2]),c[3]&&(this.tS=c[3]),c[4]&&(this.tD=c[4]),this.toTimeString(this.format)},parseTimeZone:function(a,b){this.setFormat(b),this.clearTimeZone();var c=[];return"z"===a.toLowerCase()?(this.z=!0,this.autoProfile.tzZulu="z"===a?"z":"Z"):(-1===a.indexOf(":")&&(this.autoProfile.tzsep=""),c=a.match(/([\-\+]{1})?(\d\d)?:?(\d\d)?/),c[1]&&(this.tzPN=c[1]),c[2]&&(this.tzH=c[2]),c[3]&&(this.tzM=c[3])),this.tzZulu="z",this.toTimeString(this.format)},toString:function(a){this.setFormat(a);var b="";return this.dY>-1?(b=this.dY,this.dM>0&&this.dM<13&&(b+=this.dsep+this.dM,this.dD>0&&this.dD<32&&(b+=this.dsep+this.dD,this.tH>-1&&this.tH<25&&(b+=this.sep+this.toTimeString(this.format)))),this.dDDD>-1&&(b+=this.dsep+this.dDDD)):this.tH>-1&&(b+=this.toTimeString(this.format)),b},toTimeString:function(a){this.setFormat(a);var b="";return this.tH&&this.tH>-1&&this.tH<25&&(b+=this.tH,this.tM>-1&&this.tM<61&&(b+=this.tsep+this.tM,this.tS>-1&&this.tS<61&&(b+=this.tsep+this.tS,this.tD>-1&&(b+="."+this.tD))),this.z?b+=this.tzZulu:this.tzH&&this.tzH>-1&&this.tzH<25&&(b+=this.tzPN+this.tzH,this.tzM>-1&&this.tzM<61&&(b+=this.tzsep+this.tzM))),b},setFormat:function(a){a&&(this.format=a),this.setFormatSep()},setFormatSep:function(){switch(this.format.toLowerCase()){case"microformat2":this.sep=" ",this.dsep="-",this.tsep=":",this.tzsep="",this.tzZulu="Z";break;case"rfc3339":this.sep="T",this.dsep="",this.tsep="",this.tzsep="",this.tzZulu="Z";break;case"w3c":this.sep="T",this.dsep="-",this.tsep=":",this.tzsep=":",this.tzZulu="Z";break;case"html5":this.sep=" ",this.dsep="-",this.tsep=":",this.tzsep=":",this.tzZulu="Z";break;default:this.sep=this.autoProfile.sep,this.dsep=this.autoProfile.dsep,this.tsep=this.autoProfile.tsep,this.tzsep=this.autoProfile.tzsep,this.tzZulu=this.autoProfile.tzZulu}},hasFullDate:function(){return-1!==this.dY&&-1!==this.dM&&-1!==this.dD},hasDate:function(){return-1!==this.dY},hasTime:function(){return-1!==this.tH},hasTimeZone:function(){return-1!==this.tzH}},b.ISODate.prototype.constructor=b.ISODate,b.dates={hasAM:function(a){return a=a.toLowerCase(),a.indexOf("am")>-1||a.indexOf("a.m.")>-1},hasPM:function(a){return a=a.toLowerCase(),a.indexOf("pm")>-1||a.indexOf("p.m.")>-1},removeAMPM:function(a){return a.replace("pm","").replace("p.m.","").replace("am","").replace("a.m.","")},isDuration:function(a){return!(!b.utils.isString(a)||(a=a.toLowerCase(),!b.utils.startWith(a,"p")))},isTime:function(a){if(b.utils.isString(a)){if(a=a.toLowerCase(),a=b.utils.trim(a),a.match(":")&&(b.utils.startWith(a,"z")||b.utils.startWith(a,"-")||b.utils.startWith(a,"+")))return!0;if(a.match(/^[0-9]/)&&(this.hasAM(a)||this.hasPM(a)))return!0;if(a.match(":")&&!a.match(/t|\s/))return!0;if(b.utils.isNumber(a)&&(2===a.length||4===a.length||6===a.length))return!0}return!1},parseAmPmTime:function(a){var c=a,d=[];return b.utils.isString(c)&&(a=a.replace(/[ ]+/g,""),(a.match(":")||this.hasAM(a)||this.hasPM(a))&&(a.match(":")?d=a.split(":"):(d[0]=a,d[0]=this.removeAMPM(d[0])),this.hasPM(a)&&d[0]<12&&(d[0]=parseInt(d[0],10)+12),d[0]&&1===d[0].length&&(d[0]="0"+d[0]),d[0]&&(a=d.join(":")))),this.removeAMPM(a)},dateTimeUnion:function(a,c,d){var e=new b.ISODate(a,d),f=new b.ISODate;return f.parseTime(this.parseAmPmTime(c),d),
e.hasFullDate()&&f.hasTime()?(e.tH=f.tH,e.tM=f.tM,e.tS=f.tS,e.tD=f.tD,e):e.hasFullDate()?e:new b.ISODate},concatFragments:function(a,c){var d=new b.ISODate,e=0,f="";if(a[0].toUpperCase().match("T"))return new b.ISODate(a[0],c);for(e=0;e<a.length;e++){if(f=a[e],"-"===f.charAt(4)&&d.hasFullDate()===!1&&d.parseDate(f),(f.indexOf(":")>-1||b.utils.isNumber(this.parseAmPmTime(f)))&&d.hasTime()===!1){var g=this.splitTimeAndZone(f);f=g[0],f=this.parseAmPmTime(f),d.parseTime(f),g.length>1&&d.parseTimeZone(g[1],c)}"-"!==f.charAt(0)&&"+"!==f.charAt(0)&&"Z"!==f.toUpperCase()||d.hasTimeZone()===!1&&d.parseTimeZone(f)}return-1===d.tM&&(d.tM="00"),d},splitTimeAndZone:function(a){for(var b=[a],c=["-","+","z","Z"],d=c.length;d--;)if(a.indexOf(c[d])>-1){b[0]=a.slice(0,a.indexOf(c[d])),b.push(a.slice(a.indexOf(c[d])));break}return b}},b.text={textFormat:"whitespacetrimmed",blockLevelTags:["h1","h2","h3","h4","h5","h6","p","hr","pre","table","address","article","aside","blockquote","caption","col","colgroup","dd","div","dt","dir","fieldset","figcaption","figure","footer","form","header","hgroup","hr","li","map","menu","nav","optgroup","option","section","tbody","testarea","tfoot","th","thead","tr","td","ul","ol","dl","details"],excludeTags:["noframe","noscript","template","script","style","frames","frameset"],parse:function(a,c,d){var e;if(this.textFormat=d?d:this.textFormat,"normalised"===this.textFormat)return e=this.walkTreeForText(c),void 0!==e?this.normalise(a,e):"";var f=b.domUtils.clone(c),g=b.domUtils.removeDescendantsByTagName(f,this.excludeTags);return this.formatText(a,b.domUtils.textContent(g),this.textFormat)},parseText:function(a,c,d){var e=b.domUtils.createNodeWithText("div",c);return this.parse(a,e,d)},formatText:function(a,c,d){if(this.textFormat=d?d:this.textFormat,c){var e=c;return"whitespacetrimmed"===this.textFormat&&(e=b.utils.trimWhitespace(e)),e}return""},normalise:function(a,c){return c=c.replace(/ /g," "),c=b.utils.collapseWhiteSpace(c),c=b.domUtils.decodeEntities(a,c),c=c.replace("–","-"),b.utils.trim(c)},walkTreeForText:function(a){var c="",d=0;if(a.tagName&&this.excludeTags.indexOf(a.tagName.toLowerCase())>-1)return c;if(a.nodeType&&3===a.nodeType&&(c+=b.domUtils.getElementText(a)),a.childNodes&&a.childNodes.length>0)for(d=0;d<a.childNodes.length;d++){var e=this.walkTreeForText(a.childNodes[d]);void 0!==e&&(c+=e)}return a.tagName&&-1!==this.blockLevelTags.indexOf(a.tagName.toLowerCase())&&(c+=" "),""===c?void 0:c}},b.html={selfClosingElt:["area","base","br","col","hr","img","input","link","meta","param","command","keygen","source"],parse:function(a){var b="",c=0;if(a.childNodes&&a.childNodes.length>0)for(c=0;c<a.childNodes.length;c++){var d=this.walkTreeForHtml(a.childNodes[c]);void 0!==d&&(b+=d)}return b},walkTreeForHtml:function(a){var c="",d=0;if(a.nodeType&&3===a.nodeType){var e=b.domUtils.createNode("div");b.domUtils.appendChild(e,b.domUtils.clone(a)),c+=b.domUtils.innerHTML(e)}if(a.nodeType&&1===a.nodeType&&b.domUtils.hasAttribute(a,"data-include")===!1){c+="<"+a.tagName.toLowerCase();var f=b.domUtils.getOrderedAttributes(a);for(d=0;d<f.length;d++)c+=" "+f[d].name+'="'+f[d].value+'"';if(-1===this.selfClosingElt.indexOf(a.tagName.toLowerCase())&&(c+=">"),a.childNodes&&a.childNodes.length>0)for(d=0;d<a.childNodes.length;d++){var g=this.walkTreeForHtml(a.childNodes[d]);void 0!==g&&(c+=g)}c+=this.selfClosingElt.indexOf(a.tagName.toLowerCase())>-1?" />":"</"+a.tagName.toLowerCase()+">"}return""===c?void 0:c}},b.maps["h-adr"]={root:"adr",name:"h-adr",properties:{"post-office-box":{},"street-address":{},"extended-address":{},locality:{},region:{},"postal-code":{},"country-name":{}}},b.maps["h-card"]={root:"vcard",name:"h-card",properties:{fn:{map:"p-name"},adr:{map:"p-adr",uf:["h-adr"]},agent:{uf:["h-card"]},bday:{map:"dt-bday"},"class":{},category:{map:"p-category",relAlt:["tag"]},email:{map:"u-email"},geo:{map:"p-geo",uf:["h-geo"]},key:{map:"u-key"},label:{},logo:{map:"u-logo"},mailer:{},"honorific-prefix":{},"given-name":{},"additional-name":{},"family-name":{},"honorific-suffix":{},nickname:{},note:{},org:{},"p-organization-name":{},"p-organization-unit":{},photo:{map:"u-photo"},rev:{map:"dt-rev"},role:{},sequence:{},"sort-string":{},sound:{map:"u-sound"},title:{map:"p-job-title"},tel:{},tz:{},uid:{map:"u-uid"},url:{map:"u-url"}}},b.maps["h-entry"]={root:"hentry",name:"h-entry",properties:{"entry-title":{map:"p-name"},"entry-summary":{map:"p-summary"},"entry-content":{map:"e-content"},published:{map:"dt-published"},updated:{map:"dt-updated"},author:{uf:["h-card"]},category:{map:"p-category",relAlt:["tag"]},geo:{map:"p-geo",uf:["h-geo"]},latitude:{},longitude:{},url:{map:"u-url",relAlt:["bookmark"]}}},b.maps["h-event"]={root:"vevent",name:"h-event",properties:{summary:{map:"p-name"},dtstart:{map:"dt-start"},dtend:{map:"dt-end"},description:{},url:{map:"u-url"},category:{map:"p-category",relAlt:["tag"]},location:{uf:["h-card"]},geo:{uf:["h-geo"]},latitude:{},longitude:{},duration:{map:"dt-duration"},contact:{uf:["h-card"]},organizer:{uf:["h-card"]},attendee:{uf:["h-card"]},uid:{map:"u-uid"},attach:{map:"u-attach"},status:{},rdate:{},rrule:{}}},b.maps["h-feed"]={root:"hfeed",name:"h-feed",properties:{category:{map:"p-category",relAlt:["tag"]},summary:{map:"p-summary"},author:{uf:["h-card"]},url:{map:"u-url"},photo:{map:"u-photo"}}},b.maps["h-geo"]={root:"geo",name:"h-geo",properties:{latitude:{},longitude:{}}},b.maps["h-item"]={root:"item",name:"h-item",subTree:!1,properties:{fn:{map:"p-name"},url:{map:"u-url"},photo:{map:"u-photo"}}},b.maps["h-listing"]={root:"hlisting",name:"h-listing",properties:{version:{},lister:{uf:["h-card"]},dtlisted:{map:"dt-listed"},dtexpired:{map:"dt-expired"},location:{},price:{},item:{uf:["h-card","a-adr","h-geo"]},summary:{map:"p-name"},description:{map:"e-description"},listing:{}}},b.maps["h-news"]={root:"hnews",name:"h-news",properties:{entry:{uf:["h-entry"]},geo:{uf:["h-geo"]},latitude:{},longitude:{},"source-org":{uf:["h-card"]},dateline:{uf:["h-card"]},"item-license":{map:"u-item-license"},principles:{map:"u-principles",relAlt:["principles"]}}},b.maps["h-org"]={root:"h-x-org",name:"h-org",childStructure:!0,properties:{"organization-name":{},"organization-unit":{}}},b.maps["h-product"]={root:"hproduct",name:"h-product",properties:{brand:{uf:["h-card"]},category:{map:"p-category",relAlt:["tag"]},price:{},description:{map:"e-description"},fn:{map:"p-name"},photo:{map:"u-photo"},url:{map:"u-url"},review:{uf:["h-review","h-review-aggregate"]},listing:{uf:["h-listing"]},identifier:{map:"u-identifier"}}},b.maps["h-recipe"]={root:"hrecipe",name:"h-recipe",properties:{fn:{map:"p-name"},ingredient:{map:"e-ingredient"},"yield":{},instructions:{map:"e-instructions"},duration:{map:"dt-duration"},photo:{map:"u-photo"},summary:{},author:{uf:["h-card"]},published:{map:"dt-published"},nutrition:{},category:{map:"p-category",relAlt:["tag"]}}},b.maps["h-resume"]={root:"hresume",name:"h-resume",properties:{summary:{},contact:{uf:["h-card"]},education:{uf:["h-card","h-event"]},experience:{uf:["h-card","h-event"]},skill:{},affiliation:{uf:["h-card"]}}},b.maps["h-review-aggregate"]={root:"hreview-aggregate",name:"h-review-aggregate",properties:{summary:{map:"p-name"},item:{map:"p-item",uf:["h-item","h-geo","h-adr","h-card","h-event","h-product"]},rating:{},average:{},best:{},worst:{},count:{},votes:{},category:{map:"p-category",relAlt:["tag"]},url:{map:"u-url",relAlt:["self","bookmark"]}}},b.maps["h-review"]={root:"hreview",name:"h-review",properties:{summary:{map:"p-name"},description:{map:"e-description"},item:{map:"p-item",uf:["h-item","h-geo","h-adr","h-card","h-event","h-product"]},reviewer:{uf:["h-card"]},dtreviewer:{map:"dt-reviewer"},rating:{},best:{},worst:{},category:{map:"p-category",relAlt:["tag"]},url:{map:"u-url",relAlt:["self","bookmark"]}}},b.rels={friend:["yes","external"],acquaintance:["yes","external"],contact:["yes","external"],met:["yes","external"],"co-worker":["yes","external"],colleague:["yes","external"],"co-resident":["yes","external"],neighbor:["yes","external"],child:["yes","external"],parent:["yes","external"],sibling:["yes","external"],spouse:["yes","external"],kin:["yes","external"],muse:["yes","external"],crush:["yes","external"],date:["yes","external"],sweetheart:["yes","external"],me:["yes","external"],license:["yes","yes"],nofollow:["no","external"],tag:["no","yes"],self:["no","external"],bookmark:["no","external"],author:["no","external"],home:["no","external"],directory:["no","external"],enclosure:["no","external"],pronunciation:["no","external"],payment:["no","external"],principles:["no","external"]};var c={version:b.version,livingStandard:b.livingStandard};return c.get=function(c){var d=new b.Parser;return a(d,c),d.get(c)},c.getParent=function(c,d){var e=new b.Parser;return a(e,d),e.getParent(c,d)},c.count=function(c){var d=new b.Parser;return a(d,c),d.count(c)},c.isMicroformat=function(c,d){var e=new b.Parser;return a(e,d),e.isMicroformat(c,d)},c.hasMicroformats=function(c,d){var e=new b.Parser;return a(e,d),e.hasMicroformats(c,d)},c}),function(a){var b,c,d,e,f;if(a){try{d=!!(new a).parseFromString("","text/html")}catch(g){d=!1}if(!d){try{var h=document.implementation.createHTMLDocument("");h.documentElement.innerHTML="<title></title><div></div>",f=!0}catch(g){f=!1}if(!f)try{e=!!(new a).parseFromString("","text/xml")}catch(g){d=!1}a.prototype&&(f||e)&&(b=a.prototype,c=b.parseFromString,b.parseFromString=function(b,d){if(/^\s*text\/html\s*(?:;|$)/i.test(d)){var g,h,i;return f?(g=document.implementation.createHTMLDocument(""),h=g.documentElement,h.innerHTML=b,i=h.firstElementChild):e&&(/^<html.*html>$/i.test(b)||(b="<html>"+b+"</html>"),g=(new a).parseFromString(b,"text/xml"),h=g.documentElement,i=h.firstElementChild),1===h.childElementCount&&"html"===i.localName.toLowerCase()&&g.replaceChild(i,h),g}return c.apply(this,arguments)})}}}(DOMParser);
//# sourceMappingURL=microformat-shiv.min.js.map