@@ -5670,15 +5670,15 @@ var require_parser = __commonJS({
56705670 this . saxParser . onopentag = function ( _this ) {
56715671 return function ( node ) {
56725672 var key , newValue , obj , processedKey , ref ;
5673- obj = { } ;
5673+ obj = /* @__PURE__ */ Object . create ( null ) ;
56745674 obj [ charkey ] = "" ;
56755675 if ( ! _this . options . ignoreAttrs ) {
56765676 ref = node . attributes ;
56775677 for ( key in ref ) {
56785678 if ( ! hasProp . call ( ref , key ) )
56795679 continue ;
56805680 if ( ! ( attrkey in obj ) && ! _this . options . mergeAttrs ) {
5681- obj [ attrkey ] = { } ;
5681+ obj [ attrkey ] = /* @__PURE__ */ Object . create ( null ) ;
56825682 }
56835683 newValue = _this . options . attrValueProcessors ? processItem ( _this . options . attrValueProcessors , node . attributes [ key ] , key ) : node . attributes [ key ] ;
56845684 processedKey = _this . options . attrNameProcessors ? processItem ( _this . options . attrNameProcessors , key ) : key ;
@@ -5728,7 +5728,11 @@ var require_parser = __commonJS({
57285728 }
57295729 }
57305730 if ( isEmpty ( obj ) ) {
5731- obj = _this . options . emptyTag !== "" ? _this . options . emptyTag : emptyStr ;
5731+ if ( typeof _this . options . emptyTag === "function" ) {
5732+ obj = _this . options . emptyTag ( ) ;
5733+ } else {
5734+ obj = _this . options . emptyTag !== "" ? _this . options . emptyTag : emptyStr ;
5735+ }
57325736 }
57335737 if ( _this . options . validator != null ) {
57345738 xpath = "/" + function ( ) {
@@ -5752,7 +5756,7 @@ var require_parser = __commonJS({
57525756 }
57535757 if ( _this . options . explicitChildren && ! _this . options . mergeAttrs && typeof obj === "object" ) {
57545758 if ( ! _this . options . preserveChildrenOrder ) {
5755- node = { } ;
5759+ node = /* @__PURE__ */ Object . create ( null ) ;
57565760 if ( _this . options . attrkey in obj ) {
57575761 node [ _this . options . attrkey ] = obj [ _this . options . attrkey ] ;
57585762 delete obj [ _this . options . attrkey ] ;
@@ -5767,7 +5771,7 @@ var require_parser = __commonJS({
57675771 obj = node ;
57685772 } else if ( s ) {
57695773 s [ _this . options . childkey ] = s [ _this . options . childkey ] || [ ] ;
5770- objClone = { } ;
5774+ objClone = /* @__PURE__ */ Object . create ( null ) ;
57715775 for ( key in obj ) {
57725776 if ( ! hasProp . call ( obj , key ) )
57735777 continue ;
@@ -5785,7 +5789,7 @@ var require_parser = __commonJS({
57855789 } else {
57865790 if ( _this . options . explicitRoot ) {
57875791 old = obj ;
5788- obj = { } ;
5792+ obj = /* @__PURE__ */ Object . create ( null ) ;
57895793 obj [ nodeName ] = old ;
57905794 }
57915795 _this . resultObject = obj ;
@@ -6012,7 +6016,8 @@ var require_fields = __commonJS({
60126016 "episode" ,
60136017 "image" ,
60146018 "season" ,
6015- "keywords"
6019+ "keywords" ,
6020+ "episodeType"
60166021 ] . map ( mapItunesField ) ;
60176022 }
60186023} ) ;
@@ -6615,6 +6620,9 @@ var require_parser2 = __commonJS({
66156620 if ( item2 . guid . _ )
66166621 item2 . guid = item2 . guid . _ ;
66176622 }
6623+ if ( xmlItem . $ && xmlItem . $ [ "rdf:about" ] ) {
6624+ item2 [ "rdf:about" ] = xmlItem . $ [ "rdf:about" ] ;
6625+ }
66186626 if ( xmlItem . category )
66196627 item2 . categories = xmlItem . category ;
66206628 this . setISODate ( item2 ) ;
@@ -6652,8 +6660,10 @@ var require_parser2 = __commonJS({
66526660 if ( channel [ "itunes:category" ] ) {
66536661 const categoriesWithSubs = channel [ "itunes:category" ] . map ( ( category ) => {
66546662 return {
6655- name : category . $ . text ,
6656- subs : category [ "itunes:category" ] ? category [ "itunes:category" ] . map ( ( subcategory ) => ( { name : subcategory . $ . text } ) ) : null
6663+ name : category && category . $ && category . $ . text ,
6664+ subs : category [ "itunes:category" ] ? category [ "itunes:category" ] . map ( ( subcategory ) => ( {
6665+ name : subcategory && subcategory . $ && subcategory . $ . text
6666+ } ) ) : null
66576667 } ;
66586668 } ) ;
66596669 feed . itunes . categories = categoriesWithSubs . map ( ( category ) => category . name ) ;
@@ -6662,7 +6672,7 @@ var require_parser2 = __commonJS({
66626672 if ( channel [ "itunes:keywords" ] ) {
66636673 if ( channel [ "itunes:keywords" ] . length > 1 ) {
66646674 feed . itunes . keywords = channel [ "itunes:keywords" ] . map (
6665- ( keyword ) => keyword . $ . text
6675+ ( keyword ) => keyword && keyword . $ && keyword . $ . text
66666676 ) ;
66676677 } else {
66686678 let keywords = channel [ "itunes:keywords" ] [ 0 ] ;
0 commit comments