(function webpackUniversalModuleDefinition(root, factory) { if (typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if (typeof define === 'function' && define.amd) define([], factory); else if (typeof exports === 'object') exports['loaders'] = factory(); else root['loaders'] = factory();})(globalThis, function () { "use strict";var __exports__=(()=>{var Gt=Object.create;var C=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var qt=Object.getOwnPropertyNames;var Wt=Object.getPrototypeOf,kt=Object.prototype.hasOwnProperty;var Yt=(e,t,i)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var m=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xt=(e,t)=>{for(var i in t)C(e,i,{get:t[i],enumerable:!0})},B=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of qt(t))!kt.call(e,r)&&r!==i&&C(e,r,{get:()=>t[r],enumerable:!(s=$t(t,r))||s.enumerable});return e},M=(e,t,i)=>(B(e,t,"default"),i&&B(i,t,"default")),Z=(e,t,i)=>(i=e!=null?Gt(Wt(e)):{},B(t||!e||!e.__esModule?C(i,"default",{value:e,enumerable:!0}):i,e)),Qt=e=>B(C({},"__esModule",{value:!0}),e);var J=(e,t,i)=>(Yt(e,typeof t!="symbol"?t+"":t,i),i);var D=m((ds,j)=>{j.exports=globalThis.loaders});var R=m(E=>{"use strict";var et=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",jt=et+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",st="["+et+"]["+jt+"]*",Dt=new RegExp("^"+st+"$"),te=function(e,t){let i=[],s=t.exec(e);for(;s;){let r=[];r.startIndex=t.lastIndex-s[0].length;let n=s.length;for(let a=0;a"u")};E.isExist=function(e){return typeof e<"u"};E.isEmptyObject=function(e){return Object.keys(e).length===0};E.merge=function(e,t,i){if(t){let s=Object.keys(t),r=s.length;for(let n=0;n{"use strict";var U=R(),se={allowBooleanAttributes:!1,unpairedTags:[]};at.validate=function(e,t){t=Object.assign({},se,t);let i=[],s=!1,r=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let n=0;n"&&e[n]!==" "&&e[n]!==" "&&e[n]!==` `&&e[n]!=="\r";n++)o+=e[n];if(o=o.trim(),o[o.length-1]==="/"&&(o=o.substring(0,o.length-1),n--),!ue(o)){let l;return o.trim().length===0?l="Invalid space after '<'.":l="Tag '"+o+"' is an invalid name.",g("InvalidTag",l,T(e,n))}let c=ne(e,n);if(c===!1)return g("InvalidAttr","Attributes for '"+o+"' have open quote.",T(e,n));let u=c.value;if(n=c.index,u[u.length-1]==="/"){let l=n-u.length;u=u.substring(0,u.length-1);let p=ot(u,t);if(p===!0)s=!0;else return g(p.err.code,p.err.msg,T(e,l+p.err.line))}else if(h)if(c.tagClosed){if(u.trim().length>0)return g("InvalidTag","Closing tag '"+o+"' can't have attributes or invalid starting.",T(e,a));if(i.length===0)return g("InvalidTag","Closing tag '"+o+"' has not been opened.",T(e,a));{let l=i.pop();if(o!==l.tagName){let p=T(e,l.tagStartPos);return g("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+o+"'.",T(e,a))}i.length==0&&(r=!0)}}else return g("InvalidTag","Closing tag '"+o+"' doesn't have proper closing.",T(e,n));else{let l=ot(u,t);if(l!==!0)return g(l.err.code,l.err.msg,T(e,n-u.length+l.err.line));if(r===!0)return g("InvalidXml","Multiple possible root nodes found.",T(e,n));t.unpairedTags.indexOf(o)!==-1||i.push({tagName:o,tagStartPos:a}),s=!0}for(n++;n0)return g("InvalidXml","Invalid '"+JSON.stringify(i.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return g("InvalidXml","Start tag expected.",1);return!0};function it(e){return e===" "||e===" "||e===` `||e==="\r"}function rt(e,t){let i=t;for(;t5&&s==="xml")return g("InvalidXml","XML declaration allowed only at the start of the document.",T(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}else continue}return t}function nt(e,t){if(e.length>t+5&&e[t+1]==="-"&&e[t+2]==="-"){for(t+=3;t"){t+=2;break}}else if(e.length>t+8&&e[t+1]==="D"&&e[t+2]==="O"&&e[t+3]==="C"&&e[t+4]==="T"&&e[t+5]==="Y"&&e[t+6]==="P"&&e[t+7]==="E"){let i=1;for(t+=8;t"&&(i--,i===0))break}else if(e.length>t+9&&e[t+1]==="["&&e[t+2]==="C"&&e[t+3]==="D"&&e[t+4]==="A"&&e[t+5]==="T"&&e[t+6]==="A"&&e[t+7]==="["){for(t+=8;t"){t+=2;break}}return t}var ie='"',re="'";function ne(e,t){let i="",s="",r=!1;for(;t"&&s===""){r=!0;break}i+=e[t]}return s!==""?!1:{value:i,index:t,tagClosed:r}}var oe=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function ot(e,t){let i=U.getAllMatches(e,oe),s={};for(let r=0;r{var ht={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,i){return e}},le=function(e){return Object.assign({},ht,e)};$.buildOptions=le;$.defaultOptions=ht});var lt=m((Ss,ut)=>{"use strict";var q=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,i){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:i})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,[":@"]:t[":@"]}):this.child.push({[t.tagname]:t.child})}};ut.exports=q});var pt=m((As,ft)=>{var fe=R();function pe(e,t){let i={};if(e[t+3]==="O"&&e[t+4]==="C"&&e[t+5]==="T"&&e[t+6]==="Y"&&e[t+7]==="P"&&e[t+8]==="E"){t=t+9;let s=1,r=!1,n=!1,a="";for(;t"){if(n?e[t-1]==="-"&&e[t-2]==="-"&&(n=!1,s--):s--,s===0)break}else e[t]==="["?r=!0:a+=e[t];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:i,i:t}}function de(e,t){let i="";for(;t{var Se=/^[-+]?0x[a-fA-F0-9]+$/,Ae=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt);!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);var Ie={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function ye(e,t={}){if(t=Object.assign({},Ie,t),!e||typeof e!="string")return e;let i=e.trim();if(t.skipLike!==void 0&&t.skipLike.test(i))return e;if(t.hex&&Se.test(i))return Number.parseInt(i,16);{let s=Ae.exec(i);if(s){let r=s[1],n=s[2],a=xe(s[3]),h=s[4]||s[6];if(!t.leadingZeros&&n.length>0&&r&&i[2]!==".")return e;if(!t.leadingZeros&&n.length>0&&!r&&i[1]!==".")return e;{let o=Number(i),c=""+o;return c.search(/[eE]/)!==-1||h?t.eNotation?o:e:i.indexOf(".")!==-1?c==="0"&&a===""||c===a||r&&c==="-"+a?o:e:n?a===c||r+a===c?o:e:i===c||i===r+c?o:e}}else return e}}function xe(e){return e&&e.indexOf(".")!==-1&&(e=e.replace(/0+$/,""),e==="."?e="0":e[0]==="."?e="0"+e:e[e.length-1]==="."&&(e=e.substr(0,e.length-1))),e}dt.exports=ye});var W=m((ys,Nt)=>{function Fe(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(let i of e)if(typeof i=="string"&&t===i||i instanceof RegExp&&i.test(t))return!0}:()=>!1}Nt.exports=Fe});var Et=m((xs,mt)=>{"use strict";var Tt=R(),w=lt(),Ce=pt(),Oe=gt(),_e=W(),k=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(i,s)=>String.fromCharCode(Number.parseInt(s,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(i,s)=>String.fromCharCode(Number.parseInt(s,16))}},this.addExternalEntities=Pe,this.parseXml=Re,this.parseTextData=we,this.resolveNameSpace=Le,this.buildAttributesMap=Me,this.isItStopNode=Ge,this.replaceEntitiesValue=ve,this.readStopNodeData=qe,this.saveTextToParentTag=Ue,this.addChild=Ve,this.ignoreAttributesFn=_e(this.options.ignoreAttributes)}};function Pe(e){let t=Object.keys(e);for(let i=0;i0)){a||(e=this.replaceEntitiesValue(e));let h=this.options.tagValueProcessor(t,e,i,r,n);return h==null?e:typeof h!=typeof e||h!==e?h:this.options.trimValues?X(e,this.options.parseTagValue,this.options.numberParseOptions):e.trim()===e?X(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Le(e){if(this.options.removeNSPrefix){let t=e.split(":"),i=e.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(e=i+t[1])}return e}var Be=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Me(e,t,i){if(this.options.ignoreAttributes!==!0&&typeof e=="string"){let s=Tt.getAllMatches(e,Be),r=s.length,n={};for(let a=0;a",n,"Closing Tag is not closed."),o=e.substring(n+2,h).trim();if(this.options.removeNSPrefix){let l=o.indexOf(":");l!==-1&&(o=o.substr(l+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),i&&(s=this.saveTextToParentTag(s,i,r));let c=r.substring(r.lastIndexOf(".")+1);if(o&&this.options.unpairedTags.indexOf(o)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let u=0;c&&this.options.unpairedTags.indexOf(c)!==-1?(u=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=r.lastIndexOf("."),r=r.substring(0,u),i=this.tagsNodeStack.pop(),s="",n=h}else if(e[n+1]==="?"){let h=Y(e,n,!1,"?>");if(!h)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,i,r),!(this.options.ignoreDeclaration&&h.tagName==="?xml"||this.options.ignorePiTags)){let o=new w(h.tagName);o.add(this.options.textNodeName,""),h.tagName!==h.tagExp&&h.attrExpPresent&&(o[":@"]=this.buildAttributesMap(h.tagExp,r,h.tagName)),this.addChild(i,o,r)}n=h.closeIndex+1}else if(e.substr(n+1,3)==="!--"){let h=I(e,"-->",n+4,"Comment is not closed.");if(this.options.commentPropName){let o=e.substring(n+4,h-2);s=this.saveTextToParentTag(s,i,r),i.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}n=h}else if(e.substr(n+1,2)==="!D"){let h=Ce(e,n);this.docTypeEntities=h.entities,n=h.i}else if(e.substr(n+1,2)==="!["){let h=I(e,"]]>",n,"CDATA is not closed.")-2,o=e.substring(n+9,h);s=this.saveTextToParentTag(s,i,r);let c=this.parseTextData(o,i.tagname,r,!0,!1,!0,!0);c==null&&(c=""),this.options.cdataPropName?i.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):i.add(this.options.textNodeName,c),n=h+2}else{let h=Y(e,n,this.options.removeNSPrefix),o=h.tagName,c=h.rawTagName,u=h.tagExp,l=h.attrExpPresent,p=h.closeIndex;this.options.transformTagName&&(o=this.options.transformTagName(o)),i&&s&&i.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,i,r,!1));let N=i;if(N&&this.options.unpairedTags.indexOf(N.tagname)!==-1&&(i=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),o!==t.tagname&&(r+=r?"."+o:o),this.isItStopNode(this.options.stopNodes,r,o)){let d="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)o[o.length-1]==="/"?(o=o.substr(0,o.length-1),r=r.substr(0,r.length-1),u=o):u=u.substr(0,u.length-1),n=h.closeIndex;else if(this.options.unpairedTags.indexOf(o)!==-1)n=h.closeIndex;else{let b=this.readStopNodeData(e,c,p+1);if(!b)throw new Error(`Unexpected end of ${c}`);n=b.i,d=b.tagContent}let F=new w(o);o!==u&&l&&(F[":@"]=this.buildAttributesMap(u,r,o)),d&&(d=this.parseTextData(d,o,r,!0,l,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),F.add(this.options.textNodeName,d),this.addChild(i,F,r)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){o[o.length-1]==="/"?(o=o.substr(0,o.length-1),r=r.substr(0,r.length-1),u=o):u=u.substr(0,u.length-1),this.options.transformTagName&&(o=this.options.transformTagName(o));let d=new w(o);o!==u&&l&&(d[":@"]=this.buildAttributesMap(u,r,o)),this.addChild(i,d,r),r=r.substr(0,r.lastIndexOf("."))}else{let d=new w(o);this.tagsNodeStack.push(i),o!==u&&l&&(d[":@"]=this.buildAttributesMap(u,r,o)),this.addChild(i,d,r),i=d}s="",n=p}}else s+=e[n];return t.child};function Ve(e,t,i){let s=this.options.updateTag(t.tagname,i,t[":@"]);s===!1||(typeof s=="string"&&(t.tagname=s),e.addChild(t))}var ve=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){let i=this.docTypeEntities[t];e=e.replace(i.regx,i.val)}for(let t in this.lastEntities){let i=this.lastEntities[t];e=e.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){let i=this.htmlEntities[t];e=e.replace(i.regex,i.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function Ue(e,t,i,s){return e&&(s===void 0&&(s=Object.keys(t.child).length===0),e=this.parseTextData(e,t.tagname,i,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,s),e!==void 0&&e!==""&&t.add(this.options.textNodeName,e),e=""),e}function Ge(e,t,i){let s="*."+i;for(let r in e){let n=e[r];if(s===n||t===n)return!0}return!1}function $e(e,t,i=">"){let s,r="";for(let n=t;n",i,`${t} is not closed`);if(e.substring(i+2,n).trim()===t&&(r--,r===0))return{tagContent:e.substring(s,i),i:n};i=n}else if(e[i+1]==="?")i=I(e,"?>",i+1,"StopNode is not closed.");else if(e.substr(i+1,3)==="!--")i=I(e,"-->",i+3,"StopNode is not closed.");else if(e.substr(i+1,2)==="![")i=I(e,"]]>",i,"StopNode is not closed.")-2;else{let n=Y(e,i,">");n&&((n&&n.tagName)===t&&n.tagExp[n.tagExp.length-1]!=="/"&&r++,i=n.closeIndex)}}function X(e,t,i){if(t&&typeof e=="string"){let s=e.trim();return s==="true"?!0:s==="false"?!1:Oe(e,i)}else return Tt.isExist(e)?e:""}mt.exports=k});var At=m(St=>{"use strict";function We(e,t){return bt(e,t)}function bt(e,t,i){let s,r={};for(let n=0;n0&&(r[t.textNodeName]=s):s!==void 0&&(r[t.textNodeName]=s),r}function ke(e){let t=Object.keys(e);for(let i=0;i{var{buildOptions:Qe}=ct(),He=Et(),{prettify:ze}=At(),Ke=G(),Q=class{constructor(t){this.externalEntities={},this.options=Qe(t)}parse(t,i){if(typeof t!="string")if(t.toString)t=t.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(i){i===!0&&(i={});let n=Ke.validate(t,i);if(n!==!0)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}let s=new He(this.options);s.addExternalEntities(this.externalEntities);let r=s.parseXml(t);return this.options.preserveOrder||r===void 0?r:ze(r,this.options)}addEntity(t,i){if(i.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if(i==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=i}};It.exports=Q});var _t=m((Os,Ot)=>{var Ze=` `;function Je(e,t){let i="";return t.format&&t.indentBy.length>0&&(i=Ze),Ft(e,t,"",i)}function Ft(e,t,i,s){let r="",n=!1;for(let a=0;a`,n=!1;continue}else if(o===t.commentPropName){r+=s+``,n=!0;continue}else if(o[0]==="?"){let d=xt(h[":@"],t),F=o==="?xml"?"":s,b=h[o][0][t.textNodeName];b=b.length!==0?" "+b:"",r+=F+`<${o}${b}${d}?>`,n=!0;continue}let u=s;u!==""&&(u+=t.indentBy);let l=xt(h[":@"],t),p=s+`<${o}${l}`,N=Ft(h[o],t,c,u);t.unpairedTags.indexOf(o)!==-1?t.suppressUnpairedNode?r+=p+">":r+=p+"/>":(!N||N.length===0)&&t.suppressEmptyNode?r+=p+"/>":N&&N.endsWith(">")?r+=p+`>${N}${s}`:(r+=p+">",N&&s!==""&&(N.includes("/>")||N.includes("`),n=!0}return r}function je(e){let t=Object.keys(e);for(let i=0;i0&&t.processEntities)for(let i=0;i{"use strict";var ts=_t(),es=W(),ss={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function S(e){this.options=Object.assign({},ss,e),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=es(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ns),this.processTextOrObjNode=is,this.options.format?(this.indentate=rs,this.tagEndChar=`> `,this.newLine=` `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}S.prototype.build=function(e){return this.options.preserveOrder?ts(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)};S.prototype.j2x=function(e,t,i){let s="",r="",n=i.join(".");for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a))if(typeof e[a]>"u")this.isAttribute(a)&&(r+="");else if(e[a]===null)this.isAttribute(a)?r+="":a[0]==="?"?r+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(e[a]instanceof Date)r+=this.buildTextValNode(e[a],a,"",t);else if(typeof e[a]!="object"){let h=this.isAttribute(a);if(h&&!this.ignoreAttributesFn(h,n))s+=this.buildAttrPairStr(h,""+e[a]);else if(!h)if(a===this.options.textNodeName){let o=this.options.tagValueProcessor(a,""+e[a]);r+=this.replaceEntitiesValue(o)}else r+=this.buildTextValNode(e[a],a,"",t)}else if(Array.isArray(e[a])){let h=e[a].length,o="",c="";for(let u=0;u"u"))if(l===null)a[0]==="?"?r+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(typeof l=="object")if(this.options.oneListGroup){let p=this.j2x(l,t+1,i.concat(a));o+=p.val,this.options.attributesGroupName&&l.hasOwnProperty(this.options.attributesGroupName)&&(c+=p.attrStr)}else o+=this.processTextOrObjNode(l,a,t,i);else if(this.options.oneListGroup){let p=this.options.tagValueProcessor(a,l);p=this.replaceEntitiesValue(p),o+=p}else o+=this.buildTextValNode(l,a,"",t)}this.options.oneListGroup&&(o=this.buildObjectNode(o,a,c,t)),r+=o}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){let h=Object.keys(e[a]),o=h.length;for(let c=0;c"+e+r:this.options.commentPropName!==!1&&t===this.options.commentPropName&&n.length===0?this.indentate(s)+``+this.newLine:this.indentate(s)+"<"+t+i+n+this.tagEndChar+e+this.indentate(s)+r}};S.prototype.closeTag=function(e){let t="";return this.options.unpairedTags.indexOf(e)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(s)+``+this.newLine;if(t[0]==="?")return this.indentate(s)+"<"+t+i+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(t,e);return r=this.replaceEntitiesValue(r),r===""?this.indentate(s)+"<"+t+i+this.closeTag(t)+this.tagEndChar:this.indentate(s)+"<"+t+i+">"+r+"0&&this.options.processEntities)for(let t=0;t{"use strict";var os=G(),as=yt(),hs=wt();Lt.exports={XMLParser:as,XMLValidator:os,XMLBuilder:hs}});var L={};Xt(L,{HTMLLoader:()=>vt,SAXParser:()=>A,XMLLoader:()=>y,_uncapitalize:()=>v,_uncapitalizeKeys:()=>x,convertXMLFieldToArrayInPlace:()=>Ut,convertXMLValueToArray:()=>K});M(L,Z(D(),1));var tt={ontext:()=>{},onprocessinginstruction:()=>{},onsgmldeclaration:()=>{},ondoctype:()=>{},oncomment:()=>{},onopentagstart:()=>{},onattribute:()=>{},onopentag:()=>{},onclosetag:()=>{},onopencdata:()=>{},oncdata:()=>{},onclosecdata:()=>{},onerror:()=>{},onend:()=>{},onready:()=>{},onscript:()=>{},onopennamespace:()=>{},onclosenamespace:()=>{}},Ht={...tt,strict:!1,MAX_BUFFER_LENGTH:64*1024,lowercase:!1,lowercasetags:!1,noscript:!1,strictEntities:!1,xmlns:void 0,position:void 0,trim:void 0,normalize:void 0},zt=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Kt=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"],O=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,V=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Zt=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Jt=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,_={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(_).forEach(e=>{let t=_[e];_[e]=typeof t=="number"?String.fromCharCode(t):t});var f=class{EVENTS=zt;ENTITIES={..._};XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};S=0;opt;trackPosition=!1;column=0;line=0;c="";error;q="";bufferCheckPosition;closed=!1;tags=[];looseCase="";closedRoot=!1;sawRoot=!1;strict=!1;tag;strictEntities;state;noscript=!1;attribList=[];ns;position=0;STATE={BEGIN:this.S++,BEGIN_WHITESPACE:this.S++,TEXT:this.S++,TEXT_ENTITY:this.S++,OPEN_WAKA:this.S++,SGML_DECL:this.S++,SGML_DECL_QUOTED:this.S++,DOCTYPE:this.S++,DOCTYPE_QUOTED:this.S++,DOCTYPE_DTD:this.S++,DOCTYPE_DTD_QUOTED:this.S++,COMMENT_STARTING:this.S++,COMMENT:this.S++,COMMENT_ENDING:this.S++,COMMENT_ENDED:this.S++,CDATA:this.S++,CDATA_ENDING:this.S++,CDATA_ENDING_2:this.S++,PROC_INST:this.S++,PROC_INST_BODY:this.S++,PROC_INST_ENDING:this.S++,OPEN_TAG:this.S++,OPEN_TAG_SLASH:this.S++,ATTRIB:this.S++,ATTRIB_NAME:this.S++,ATTRIB_NAME_SAW_WHITE:this.S++,ATTRIB_VALUE:this.S++,ATTRIB_VALUE_QUOTED:this.S++,ATTRIB_VALUE_CLOSED:this.S++,ATTRIB_VALUE_UNQUOTED:this.S++,ATTRIB_VALUE_ENTITY_Q:this.S++,ATTRIB_VALUE_ENTITY_U:this.S++,CLOSE_TAG:this.S++,CLOSE_TAG_SAW_WHITE:this.S++,SCRIPT:this.S++,SCRIPT_ENDING:this.S++};BUFFERS=Kt;CDATA="[CDATA[";DOCTYPE="DOCTYPE";XML_NAMESPACE="http://www.w3.org/XML/1998/namespace";XMLNS_NAMESPACE="http://www.w3.org/2000/xmlns/";rootNS={xml:this.XML_NAMESPACE,xmlns:this.XMLNS_NAMESPACE};comment;sgmlDecl;textNode="";tagName;doctype;procInstName;procInstBody;entity="";attribName;attribValue;cdata="";script="";startTagPosition=0;constructor(){this.S=0;for(let t in this.STATE)this.STATE.hasOwnProperty(t)&&(this.STATE[this.STATE[t]]=t);this.S=this.STATE}static charAt(t,i){let s="";return i"||f.isWhitespace(t)}static isMatch(t,i){return t.test(i)}static notMatch(t,i){return!f.isMatch(t,i)}static qname(t,i){let r=t.indexOf(":")<0?["",t]:t.split(":"),n=r[0],a=r[1];return i&&t==="xmlns"&&(n="xmlns",a=""),{prefix:n,local:a}}write(t){if(this.error)throw this.error;if(this.closed)return this.errorFunction("Cannot write after close. Assign an onready handler.");if(t===null)return this.end();typeof t=="object"&&(t=t.toString());let i=0,s;for(;s=f.charAt(t,i++),this.c=s,!!s;)switch(this.trackPosition&&(this.position++,s===` `?(this.line++,this.column=0):this.column++),this.state){case this.S.BEGIN:if(this.state=this.S.BEGIN_WHITESPACE,s==="\uFEFF")continue;this.beginWhiteSpace(s);continue;case this.S.BEGIN_WHITESPACE:this.beginWhiteSpace(s);continue;case this.S.TEXT:if(this.sawRoot&&!this.closedRoot){let a=i-1;for(;s&&s!=="<"&&s!=="&";)s=f.charAt(t,i++),s&&this.trackPosition&&(this.position++,s===` `?(this.line++,this.column=0):this.column++);this.textNode+=t.substring(a,i-1)}s==="<"&&!(this.sawRoot&&this.closedRoot&&!this.strict)?(this.state=this.S.OPEN_WAKA,this.startTagPosition=this.position):(!f.isWhitespace(s)&&(!this.sawRoot||this.closedRoot)&&this.strictFail("Text data outside of root node."),s==="&"?this.state=this.S.TEXT_ENTITY:this.textNode+=s);continue;case this.S.SCRIPT:s==="<"?this.state=this.S.SCRIPT_ENDING:this.script+=s;continue;case this.S.SCRIPT_ENDING:s==="/"?this.state=this.S.CLOSE_TAG:(this.script+=`<${s}`,this.state=this.S.SCRIPT);continue;case this.S.OPEN_WAKA:if(s==="!")this.state=this.S.SGML_DECL,this.sgmlDecl="";else if(!f.isWhitespace(s))if(f.isMatch(O,s))this.state=this.S.OPEN_TAG,this.tagName=s;else if(s==="/")this.state=this.S.CLOSE_TAG,this.tagName="";else if(s==="?")this.state=this.S.PROC_INST,this.procInstName=this.procInstBody="";else{if(this.strictFail("Unencoded <"),this.startTagPosition+1"?(this.emitNode("onsgmldeclaration",this.sgmlDecl),this.sgmlDecl="",this.state=this.S.TEXT):f.isQuote(s)?(this.state=this.S.SGML_DECL_QUOTED,this.sgmlDecl+=s):this.sgmlDecl+=s;continue;case this.S.SGML_DECL_QUOTED:s===this.q&&(this.state=this.S.SGML_DECL,this.q=""),this.sgmlDecl+=s;continue;case this.S.DOCTYPE:s===">"?(this.state=this.S.TEXT,this.emitNode("ondoctype",this.doctype),this.doctype=!0):(this.doctype+=s,s==="["?this.state=this.S.DOCTYPE_DTD:f.isQuote(s)&&(this.state=this.S.DOCTYPE_QUOTED,this.q=s));continue;case this.S.DOCTYPE_QUOTED:this.doctype+=s,s===this.q&&(this.q="",this.state=this.S.DOCTYPE);continue;case this.S.DOCTYPE_DTD:this.doctype+=s,s==="]"?this.state=this.S.DOCTYPE:f.isQuote(s)&&(this.state=this.S.DOCTYPE_DTD_QUOTED,this.q=s);continue;case this.S.DOCTYPE_DTD_QUOTED:this.doctype+=s,s===this.q&&(this.state=this.S.DOCTYPE_DTD,this.q="");continue;case this.S.COMMENT:s==="-"?this.state=this.S.COMMENT_ENDING:this.comment+=s;continue;case this.S.COMMENT_ENDING:s==="-"?(this.state=this.S.COMMENT_ENDED,this.comment=this.textApplyOptions(this.comment),this.comment&&this.emitNode("oncomment",this.comment),this.comment=""):(this.comment+=`-${s}`,this.state=this.S.COMMENT);continue;case this.S.COMMENT_ENDED:s!==">"?(this.strictFail("Malformed comment"),this.comment+=`--${s}`,this.state=this.S.COMMENT):this.state=this.S.TEXT;continue;case this.S.CDATA:s==="]"?this.state=this.S.CDATA_ENDING:this.cdata+=s;continue;case this.S.CDATA_ENDING:s==="]"?this.state=this.S.CDATA_ENDING_2:(this.cdata+=`]${s}`,this.state=this.S.CDATA);continue;case this.S.CDATA_ENDING_2:s===">"?(this.cdata&&this.emitNode("oncdata",this.cdata),this.emitNode("onclosecdata"),this.cdata="",this.state=this.S.TEXT):s==="]"?this.cdata+="]":(this.cdata+=`]]${s}`,this.state=this.S.CDATA);continue;case this.S.PROC_INST:s==="?"?this.state=this.S.PROC_INST_ENDING:f.isWhitespace(s)?this.state=this.S.PROC_INST_BODY:this.procInstName+=s;continue;case this.S.PROC_INST_BODY:if(!this.procInstBody&&f.isWhitespace(s))continue;s==="?"?this.state=this.S.PROC_INST_ENDING:this.procInstBody+=s;continue;case this.S.PROC_INST_ENDING:s===">"?(this.emitNode("onprocessinginstruction",{name:this.procInstName,body:this.procInstBody}),this.procInstName=this.procInstBody="",this.state=this.S.TEXT):(this.procInstBody+=`?${s}`,this.state=this.S.PROC_INST_BODY);continue;case this.S.OPEN_TAG:f.isMatch(V,s)?this.tagName+=s:(this.newTag(),s===">"?this.openTag():s==="/"?this.state=this.S.OPEN_TAG_SLASH:(f.isWhitespace(s)||this.strictFail("Invalid character in tag name"),this.state=this.S.ATTRIB));continue;case this.S.OPEN_TAG_SLASH:s===">"?(this.openTag(!0),this.closeTag()):(this.strictFail("Forward-slash in opening tag not followed by >"),this.state=this.S.ATTRIB);continue;case this.S.ATTRIB:if(f.isWhitespace(s))continue;s===">"?this.openTag():s==="/"?this.state=this.S.OPEN_TAG_SLASH:f.isMatch(O,s)?(this.attribName=s,this.attribValue="",this.state=this.S.ATTRIB_NAME):this.strictFail("Invalid attribute name");continue;case this.S.ATTRIB_NAME:s==="="?this.state=this.S.ATTRIB_VALUE:s===">"?(this.strictFail("Attribute without value"),this.attribValue=this.attribName,this.attrib(),this.openTag()):f.isWhitespace(s)?this.state=this.S.ATTRIB_NAME_SAW_WHITE:f.isMatch(V,s)?this.attribName+=s:this.strictFail("Invalid attribute name");continue;case this.S.ATTRIB_NAME_SAW_WHITE:if(s==="=")this.state=this.S.ATTRIB_VALUE;else{if(f.isWhitespace(s))continue;this.strictFail("Attribute without value"),this.tag.attributes[this.attribName]="",this.attribValue="",this.emitNode("onattribute",{name:this.attribName,value:""}),this.attribName="",s===">"?this.openTag():f.isMatch(O,s)?(this.attribName=s,this.state=this.S.ATTRIB_NAME):(this.strictFail("Invalid attribute name"),this.state=this.S.ATTRIB)}continue;case this.S.ATTRIB_VALUE:if(f.isWhitespace(s))continue;f.isQuote(s)?(this.q=s,this.state=this.S.ATTRIB_VALUE_QUOTED):(this.strictFail("Unquoted attribute value"),this.state=this.S.ATTRIB_VALUE_UNQUOTED,this.attribValue=s);continue;case this.S.ATTRIB_VALUE_QUOTED:if(s!==this.q){s==="&"?this.state=this.S.ATTRIB_VALUE_ENTITY_Q:this.attribValue+=s;continue}this.attrib(),this.q="",this.state=this.S.ATTRIB_VALUE_CLOSED;continue;case this.S.ATTRIB_VALUE_CLOSED:f.isWhitespace(s)?this.state=this.S.ATTRIB:s===">"?this.openTag():s==="/"?this.state=this.S.OPEN_TAG_SLASH:f.isMatch(O,s)?(this.strictFail("No whitespace between attributes"),this.attribName=s,this.attribValue="",this.state=this.S.ATTRIB_NAME):this.strictFail("Invalid attribute name");continue;case this.S.ATTRIB_VALUE_UNQUOTED:if(!f.isAttribEnd(s)){s==="&"?this.state=this.S.ATTRIB_VALUE_ENTITY_U:this.attribValue+=s;continue}this.attrib(),s===">"?this.openTag():this.state=this.S.ATTRIB;continue;case this.S.CLOSE_TAG:if(this.tagName)s===">"?this.closeTag():f.isMatch(V,s)?this.tagName+=s:this.script?(this.script+=`"?this.closeTag():this.strictFail("Invalid characters in closing tag");continue;case this.S.TEXT_ENTITY:case this.S.ATTRIB_VALUE_ENTITY_Q:case this.S.ATTRIB_VALUE_ENTITY_U:let r,n;switch(this.state){case this.S.TEXT_ENTITY:r=this.S.TEXT,n="textNode";break;case this.S.ATTRIB_VALUE_ENTITY_Q:r=this.S.ATTRIB_VALUE_QUOTED,n="attribValue";break;case this.S.ATTRIB_VALUE_ENTITY_U:r=this.S.ATTRIB_VALUE_UNQUOTED,n="attribValue";break;default:throw new Error(`Unknown state: ${this.state}`)}s===";"?(this[n]+=this.parseEntity(),this.entity="",this.state=r):f.isMatch(this.entity.length?Jt:Zt,s)?this.entity+=s:(this.strictFail("Invalid character in entity name"),this[n]+=`&${this.entity}${s}`,this.entity="",this.state=r);continue;default:throw new Error(`Unknown state: ${this.state}`)}return this.position>=this.bufferCheckPosition&&this.checkBufferLength(),this}emit(t,i){if(this.events.hasOwnProperty(t)){let s=t.replace(/^on/,"");this.events[t](i,s,this)}}clearBuffers(){for(let t=0,i=this.BUFFERS.length;tt)switch(this.BUFFERS[r]){case"textNode":this.closeText();break;case"cdata":this.emitNode("oncdata",this.cdata),this.cdata="";break;case"script":this.emitNode("onscript",this.script),this.script="";break;default:this.errorFunction(`Max buffer length exceeded: ${this.BUFFERS[r]}`)}i=Math.max(i,a)}let s=this.opt.MAX_BUFFER_LENGTH-i;this.bufferCheckPosition=s+this.position}openTag(t){if(this.opt.xmlns){let i=this.tag,s=f.qname(this.tagName);i.prefix=s.prefix,i.local=s.local,i.uri=i.ns[s.prefix]||"",i.prefix&&!i.uri&&(this.strictFail(`Unbound namespace prefix: ${JSON.stringify(this.tagName)}`),i.uri=s.prefix);let r=this.tags[this.tags.length-1]||this;if(i.ns&&r.ns!==i.ns){let n=this;Object.keys(i.ns).forEach(a=>{n.emitNode("onopennamespace",{prefix:a,uri:i.ns[a]})})}for(let n=0,a=this.attribList.length;n`,this.tagName="",this.state=this.S.SCRIPT;return}this.emitNode("onscript",this.script),this.script=""}let t=this.tags.length,i=this.tagName;for(this.strict||(i=i[this.looseCase]());t--&&this.tags[t].name!==i;)this.strictFail("Unexpected close tag");if(t<0){this.strictFail(`Unmatched closing tag: ${this.tagName}`),this.textNode+=``,this.state=this.S.TEXT;return}this.tagName=i;let s=this.tags.length;for(;s-- >t;){let r=this.tag=this.tags.pop();this.tagName=this.tag.name,this.emitNode("onclosetag",this.tagName);let n={};for(let h in r.ns)r.ns.hasOwnProperty(h)&&(n[h]=r.ns[h]);let a=this.tags[this.tags.length-1]||this;if(this.opt.xmlns&&r.ns!==a.ns){let h=this;Object.keys(r.ns).forEach(o=>{let c=r.ns[o];h.emitNode("onclosenamespace",{prefix:o,uri:c})})}}t===0&&(this.closedRoot=!0),this.tagName=this.attribValue=this.attribName="",this.attribList.length=0,this.state=this.S.TEXT}},A=class extends f{opt=Ht;events=tt;constructor(t){super(),this.clearBuffers(),this.opt=t={...this.opt,...t},this.events={...this.events,...t},this.q=this.c="",this.opt.lowercase=this.opt.lowercase||this.opt.lowercasetags,this.bufferCheckPosition=this.opt.MAX_BUFFER_LENGTH,this.looseCase=this.opt.lowercase?"toLowerCase":"toUpperCase",this.tags=[],this.closed=this.closedRoot=this.sawRoot=!1,this.tag=this.error=null,this.strict=Boolean(this.opt.strict),this.noscript=Boolean(this.opt.strict||this.opt.noscript),this.state=this.S.BEGIN,this.strictEntities=this.opt.strictEntities,this.ENTITIES=this.strictEntities?Object.create(this.XML_ENTITIES):Object.create(this.ENTITIES),this.attribList=[],this.opt.xmlns&&(this.ns=Object.create(this.rootNS)),this.trackPosition=this.opt.position!==!1,this.trackPosition&&(this.position=this.line=this.column=0),this.emit("onready")}resume(){return this.error=null,this}close(){return this.write(null)}flush(){this.flushBuffers()}};J(A,"ENTITIES",_);function v(e){return typeof e=="string"?e.charAt(0).toLowerCase()+e.slice(1):e}function x(e){if(Array.isArray(e))return e.map(t=>x(t));if(e&&typeof e=="object"){let t={};for(let[i,s]of Object.entries(e))t[v(i)]=x(s);return t}return e}var Mt=Z(Bt(),1);function H(e,t){if(t?._parser&&t._parser!=="fast-xml-parser")throw new Error(t?._parser);let i={allowBooleanAttributes:!0,ignoreDeclaration:!0,removeNSPrefix:t?.removeNSPrefix,textNodeName:t?.textNodeName,isArray:(r,n,a,h)=>Boolean(t?.arrayPaths?.some(c=>n===c)),...t?._fastXML},s=cs(e,i);return t?.uncapitalizeKeys?x(s):s}function cs(e,t){return new Mt.XMLParser({ignoreAttributes:!1,attributeNamePrefix:"",...t}).parse(e)}var us="4.3.1",y={dataType:null,batchType:null,name:"XML",id:"xml",module:"xml",version:us,worker:!1,extensions:["xml"],mimeTypes:["application/xml","text/xml"],testText:ls,options:{xml:{_parser:"fast-xml-parser",uncapitalizeKeys:!1,removeNSPrefix:!1,textNodeName:"value",arrayPaths:[]}},parse:async(e,t)=>H(new TextDecoder().decode(e),{...y.options.xml,...t?.xml}),parseTextSync:(e,t)=>H(e,{...y.options.xml,...t?.xml})};function ls(e){return e.startsWith("3)return t;let s={...e};for(let[r,n]of Object.entries(t))n&&typeof n=="object"&&!Array.isArray(n)?s[r]=Rt(s[r]||{},t[r],i+1):s[r]=t[r];return s}var vt={...y,name:"HTML",id:"html",extensions:["html","htm"],mimeTypes:["text/html"],testText:fs,parse:async(e,t)=>Vt(new TextDecoder().decode(e),t),parseTextSync:(e,t)=>Vt(e,t)};function fs(e){return e.startsWith("