@acrool/icon-symbols
Version:
Merge svg into svg symbols, and unpack svg symbols into individual svg
5 lines (4 loc) • 35.4 kB
JavaScript
(function(w,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(w=typeof globalThis<"u"?globalThis:w||self,A(w.AcroolIconSymbols={}))})(this,function(w){"use strict";var A=1e6,D=1e6,$="[big.js] ",_=$+"Invalid ",R=_+"decimal places",be=_+"rounding mode",ee=$+"Division by zero",E={},I=void 0;function C(e,t,r,s){var n=e.c;if(r===I&&(r=e.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(be);if(t<1)s=r===3&&(s||!!n[0])||t===0&&(r===1&&n[0]>=5||r===2&&(n[0]>5||n[0]===5&&(s||n[1]!==I))),n.length=1,s?(e.e=e.e-t+1,n[0]=1):n[0]=e.e=0;else if(t<n.length){if(s=r===1&&n[t]>=5||r===2&&(n[t]>5||n[t]===5&&(s||n[t+1]!==I||n[t-1]&1))||r===3&&(s||!!n[0]),n.length=t,s){for(;++n[--t]>9;)if(n[t]=0,t===0){++e.e,n.unshift(1);break}}for(t=n.length;!n[--t];)n.pop()}return e}function O(e,t,r){var s=e.e,n=e.c.join(""),i=n.length;if(t)n=n.charAt(0)+(i>1?"."+n.slice(1):"")+(s<0?"e":"e+")+s;else if(s<0){for(;++s;)n="0"+n;n="0."+n}else if(s>0)if(++s>i)for(s-=i;s--;)n+="0";else s<i&&(n=n.slice(0,s)+"."+n.slice(s));else i>1&&(n=n.charAt(0)+"."+n.slice(1));return e.s<0&&r?"-"+n:n}E.abs=function(){var e=new this.constructor(this);return e.s=1,e},E.cmp=function(e){var t,r=this,s=r.c,n=(e=new r.constructor(e)).c,i=r.s,c=e.s,f=r.e,o=e.e;if(!s[0]||!n[0])return s[0]?i:n[0]?-c:0;if(i!=c)return i;if(t=i<0,f!=o)return f>o^t?1:-1;for(c=(f=s.length)<(o=n.length)?f:o,i=-1;++i<c;)if(s[i]!=n[i])return s[i]>n[i]^t?1:-1;return f==o?0:f>o^t?1:-1},E.div=function(e){var t=this,r=t.constructor,s=t.c,n=(e=new r(e)).c,i=t.s==e.s?1:-1,c=r.DP;if(c!==~~c||c<0||c>A)throw Error(R);if(!n[0])throw Error(ee);if(!s[0])return e.s=i,e.c=[e.e=0],e;var f,o,u,l,a,g=n.slice(),b=f=n.length,p=s.length,d=s.slice(0,f),h=d.length,y=e,k=y.c=[],P=0,m=c+(y.e=t.e-e.e)+1;for(y.s=i,i=m<0?0:m,g.unshift(0);h++<f;)d.push(0);do{for(u=0;u<10;u++){if(f!=(h=d.length))l=f>h?1:-1;else for(a=-1,l=0;++a<f;)if(n[a]!=d[a]){l=n[a]>d[a]?1:-1;break}if(l<0){for(o=h==f?n:g;h;){if(d[--h]<o[h]){for(a=h;a&&!d[--a];)d[a]=9;--d[a],d[h]+=10}d[h]-=o[h]}for(;!d[0];)d.shift()}else break}k[P++]=l?u:++u,d[0]&&l?d[h]=s[b]||0:d=[s[b]]}while((b++<p||d[0]!==I)&&i--);return!k[0]&&P!=1&&(k.shift(),y.e--,m--),P>m&&C(y,m,r.RM,d[0]!==I),y},E.eq=function(e){return this.cmp(e)===0},E.gt=function(e){return this.cmp(e)>0},E.gte=function(e){return this.cmp(e)>-1},E.lt=function(e){return this.cmp(e)<0},E.lte=function(e){return this.cmp(e)<1},E.minus=E.sub=function(e){var t,r,s,n,i=this,c=i.constructor,f=i.s,o=(e=new c(e)).s;if(f!=o)return e.s=-o,i.plus(e);var u=i.c.slice(),l=i.e,a=e.c,g=e.e;if(!u[0]||!a[0])return a[0]?e.s=-o:u[0]?e=new c(i):e.s=1,e;if(f=l-g){for((n=f<0)?(f=-f,s=u):(g=l,s=a),s.reverse(),o=f;o--;)s.push(0);s.reverse()}else for(r=((n=u.length<a.length)?u:a).length,f=o=0;o<r;o++)if(u[o]!=a[o]){n=u[o]<a[o];break}if(n&&(s=u,u=a,a=s,e.s=-e.s),(o=(r=a.length)-(t=u.length))>0)for(;o--;)u[t++]=0;for(o=t;r>f;){if(u[--r]<a[r]){for(t=r;t&&!u[--t];)u[t]=9;--u[t],u[r]+=10}u[r]-=a[r]}for(;u[--o]===0;)u.pop();for(;u[0]===0;)u.shift(),--g;return u[0]||(e.s=1,u=[g=0]),e.c=u,e.e=g,e},E.mod=function(e){var t,r=this,s=r.constructor,n=r.s,i=(e=new s(e)).s;if(!e.c[0])throw Error(ee);return r.s=e.s=1,t=e.cmp(r)==1,r.s=n,e.s=i,t?new s(r):(n=s.DP,i=s.RM,s.DP=s.RM=0,r=r.div(e),s.DP=n,s.RM=i,this.minus(r.times(e)))},E.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e},E.plus=E.add=function(e){var t,r,s,n=this,i=n.constructor;if(e=new i(e),n.s!=e.s)return e.s=-e.s,n.minus(e);var c=n.e,f=n.c,o=e.e,u=e.c;if(!f[0]||!u[0])return u[0]||(f[0]?e=new i(n):e.s=n.s),e;if(f=f.slice(),t=c-o){for(t>0?(o=c,s=u):(t=-t,s=f),s.reverse();t--;)s.push(0);s.reverse()}for(f.length-u.length<0&&(s=u,u=f,f=s),t=u.length,r=0;t;f[t]%=10)r=(f[--t]=f[t]+u[t]+r)/10|0;for(r&&(f.unshift(r),++o),t=f.length;f[--t]===0;)f.pop();return e.c=f,e.e=o,e},E.pow=function(e){var t=this,r=new t.constructor("1"),s=r,n=e<0;if(e!==~~e||e<-D||e>D)throw Error(_+"exponent");for(n&&(e=-e);e&1&&(s=s.times(t)),e>>=1,!!e;)t=t.times(t);return n?r.div(s):s},E.prec=function(e,t){if(e!==~~e||e<1||e>A)throw Error(_+"precision");return C(new this.constructor(this),e,t)},E.round=function(e,t){if(e===I)e=0;else if(e!==~~e||e<-A||e>A)throw Error(R);return C(new this.constructor(this),e+this.e+1,t)},E.sqrt=function(){var e,t,r,s=this,n=s.constructor,i=s.s,c=s.e,f=new n("0.5");if(!s.c[0])return new n(s);if(i<0)throw Error($+"No square root");i=Math.sqrt(+O(s,!0,!0)),i===0||i===1/0?(t=s.c.join(""),t.length+c&1||(t+="0"),i=Math.sqrt(t),c=((c+1)/2|0)-(c<0||c&1),e=new n((i==1/0?"5e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+c)):e=new n(i+""),c=e.e+(n.DP+=4);do r=e,e=f.times(r.plus(s.div(r)));while(r.c.slice(0,c).join("")!==e.c.slice(0,c).join(""));return C(e,(n.DP-=4)+e.e+1,n.RM)},E.times=E.mul=function(e){var t,r=this,s=r.constructor,n=r.c,i=(e=new s(e)).c,c=n.length,f=i.length,o=r.e,u=e.e;if(e.s=r.s==e.s?1:-1,!n[0]||!i[0])return e.c=[e.e=0],e;for(e.e=o+u,c<f&&(t=n,n=i,i=t,u=c,c=f,f=u),t=new Array(u=c+f);u--;)t[u]=0;for(o=f;o--;){for(f=0,u=c+o;u>o;)f=t[u]+i[o]*n[u-o-1]+f,t[u--]=f%10,f=f/10|0;t[u]=f}for(f?++e.e:t.shift(),o=t.length;!t[--o];)t.pop();return e.c=t,e},E.toExponential=function(e,t){var r=this,s=r.c[0];if(e!==I){if(e!==~~e||e<0||e>A)throw Error(R);for(r=C(new r.constructor(r),++e,t);r.c.length<e;)r.c.push(0)}return O(r,!0,!!s)},E.toFixed=function(e,t){var r=this,s=r.c[0];if(e!==I){if(e!==~~e||e<0||e>A)throw Error(R);for(r=C(new r.constructor(r),e+r.e+1,t),e=e+r.e+1;r.c.length<e;)r.c.push(0)}return O(r,!1,!!s)},E.toJSON=E.toString=function(){var e=this,t=e.constructor;return O(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])},typeof Symbol<"u"&&(E[Symbol.for("nodejs.util.inspect.custom")]=E.toJSON),E.toNumber=function(){var e=+O(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(e.toString()))throw Error($+"Imprecise conversion");return e},E.toPrecision=function(e,t){var r=this,s=r.constructor,n=r.c[0];if(e!==I){if(e!==~~e||e<1||e>A)throw Error(_+"precision");for(r=C(new s(r),e,t);r.c.length<e;)r.c.push(0)}return O(r,e<=r.e||r.e<=s.NE||r.e>=s.PE,!!n)},E.valueOf=function(){var e=this,t=e.constructor;if(t.strict===!0)throw Error($+"valueOf disallowed");return O(e,e.e<=t.NE||e.e>=t.PE,!0)};function te(e){return/^0\.\d+$/.test(e)?e.replace(/^0/,""):/^\d*\.?\d+$/.test(e)?e.replace(/^0+(?=\d)/,""):e}const Ne=(e,t,r)=>r.indexOf(e)===t,re=e=>e.reduce((t,r)=>{var s,n,i;if(typeof r!="string"&&r.type==="element"){if(r.tagName==="path"){const c=[];return(s=r.properties)!=null&&s.fill&&c.push(r.properties.fill.toLocaleString()),(n=r.properties)!=null&&n["fill-opacity"]&&c.push(te((i=r.properties)==null?void 0:i["fill-opacity"].toString())),t.push(c.join("_")),t}else if(r.children&&r.children.length>0)return re(r.children)}return t},[]),we=e=>re(e).filter(Ne).length>1,Y=(e,t)=>{var s;const r=[];if(t||e.fill==="none"||(s=e.fill)!=null&&s.startsWith("url(#")?(e.fill&&r.push(`fill="${e.fill.toLocaleString()}"`),e.stroke&&r.push(`stroke="${e.stroke}"`)):e.stroke&&r.push('stroke="currentColor"'),e["fill-opacity"]){const n=te(e["fill-opacity"].toString());r.push(`fill-opacity="${n}"`)}return r},ne=(e,t=!0)=>e.reduce((r,s)=>{var n;if(s&&(s["#name"]==="path"||s.tagName==="path")){const i=Y(s.properties||{},t);if((n=s.properties)!=null&&n.d){const c=s.properties.d.toString().replace(/\n/g,"").replace(/\t/g,"");i.push(`d="${c}"`)}return r.push(`<path ${i.join(" ")}/>`),r}else if(s.children&&s.children.length>0)return ne(s.children,t);return r},[]),se=":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",ve=se+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ae="["+se+"]["+ve+"]*",me=new RegExp("^"+Ae+"$");function ie(e,t){const r=[];let s=t.exec(e);for(;s;){const n=[];n.startIndex=t.lastIndex-s[0].length;const i=s.length;for(let c=0;c<i;c++)n.push(s[c]);r.push(n),s=t.exec(e)}return r}const G=function(e){const t=me.exec(e);return!(t===null||typeof t>"u")};function Ie(e){return typeof e<"u"}const Te={allowBooleanAttributes:!1,unpairedTags:[]};function Pe(e,t){t=Object.assign({},Te,t);const r=[];let s=!1,n=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let i=0;i<e.length;i++)if(e[i]==="<"&&e[i+1]==="?"){if(i+=2,i=fe(e,i),i.err)return i}else if(e[i]==="<"){let c=i;if(i++,e[i]==="!"){i=ce(e,i);continue}else{let f=!1;e[i]==="/"&&(f=!0,i++);let o="";for(;i<e.length&&e[i]!==">"&&e[i]!==" "&&e[i]!==" "&&e[i]!==`
`&&e[i]!=="\r";i++)o+=e[i];if(o=o.trim(),o[o.length-1]==="/"&&(o=o.substring(0,o.length-1),i--),!Fe(o)){let a;return o.trim().length===0?a="Invalid space after '<'.":a="Tag '"+o+"' is an invalid name.",N("InvalidTag",a,v(e,i))}const u=Se(e,i);if(u===!1)return N("InvalidAttr","Attributes for '"+o+"' have open quote.",v(e,i));let l=u.value;if(i=u.index,l[l.length-1]==="/"){const a=i-l.length;l=l.substring(0,l.length-1);const g=ue(l,t);if(g===!0)s=!0;else return N(g.err.code,g.err.msg,v(e,a+g.err.line))}else if(f)if(u.tagClosed){if(l.trim().length>0)return N("InvalidTag","Closing tag '"+o+"' can't have attributes or invalid starting.",v(e,c));if(r.length===0)return N("InvalidTag","Closing tag '"+o+"' has not been opened.",v(e,c));{const a=r.pop();if(o!==a.tagName){let g=v(e,a.tagStartPos);return N("InvalidTag","Expected closing tag '"+a.tagName+"' (opened in line "+g.line+", col "+g.col+") instead of closing tag '"+o+"'.",v(e,c))}r.length==0&&(n=!0)}}else return N("InvalidTag","Closing tag '"+o+"' doesn't have proper closing.",v(e,i));else{const a=ue(l,t);if(a!==!0)return N(a.err.code,a.err.msg,v(e,i-l.length+a.err.line));if(n===!0)return N("InvalidXml","Multiple possible root nodes found.",v(e,i));t.unpairedTags.indexOf(o)!==-1||r.push({tagName:o,tagStartPos:c}),s=!0}for(i++;i<e.length;i++)if(e[i]==="<")if(e[i+1]==="!"){i++,i=ce(e,i);continue}else if(e[i+1]==="?"){if(i=fe(e,++i),i.err)return i}else break;else if(e[i]==="&"){const a=$e(e,i);if(a==-1)return N("InvalidChar","char '&' is not expected.",v(e,i));i=a}else if(n===!0&&!oe(e[i]))return N("InvalidXml","Extra text at the end",v(e,i));e[i]==="<"&&i--}}else{if(oe(e[i]))continue;return N("InvalidChar","char '"+e[i]+"' is not expected.",v(e,i))}if(s){if(r.length==1)return N("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",v(e,r[0].tagStartPos));if(r.length>0)return N("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return N("InvalidXml","Start tag expected.",1);return!0}function oe(e){return e===" "||e===" "||e===`
`||e==="\r"}function fe(e,t){const r=t;for(;t<e.length;t++)if(e[t]=="?"||e[t]==" "){const s=e.substr(r,t-r);if(t>5&&s==="xml")return N("InvalidXml","XML declaration allowed only at the start of the document.",v(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}else continue}return t}function ce(e,t){if(e.length>t+5&&e[t+1]==="-"&&e[t+2]==="-"){for(t+=3;t<e.length;t++)if(e[t]==="-"&&e[t+1]==="-"&&e[t+2]===">"){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 r=1;for(t+=8;t<e.length;t++)if(e[t]==="<")r++;else if(e[t]===">"&&(r--,r===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<e.length;t++)if(e[t]==="]"&&e[t+1]==="]"&&e[t+2]===">"){t+=2;break}}return t}const Ce='"',Oe="'";function Se(e,t){let r="",s="",n=!1;for(;t<e.length;t++){if(e[t]===Ce||e[t]===Oe)s===""?s=e[t]:s!==e[t]||(s="");else if(e[t]===">"&&s===""){n=!0;break}r+=e[t]}return s!==""?!1:{value:r,index:t,tagClosed:n}}const Me=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function ue(e,t){const r=ie(e,Me),s={};for(let n=0;n<r.length;n++){if(r[n][1].length===0)return N("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",F(r[n]));if(r[n][3]!==void 0&&r[n][4]===void 0)return N("InvalidAttr","Attribute '"+r[n][2]+"' is without value.",F(r[n]));if(r[n][3]===void 0&&!t.allowBooleanAttributes)return N("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",F(r[n]));const i=r[n][2];if(!_e(i))return N("InvalidAttr","Attribute '"+i+"' is an invalid name.",F(r[n]));if(!s.hasOwnProperty(i))s[i]=1;else return N("InvalidAttr","Attribute '"+i+"' is repeated.",F(r[n]))}return!0}function ke(e,t){let r=/\d/;for(e[t]==="x"&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(e[t]===";")return t;if(!e[t].match(r))break}return-1}function $e(e,t){if(t++,e[t]===";")return-1;if(e[t]==="#")return t++,ke(e,t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(e[t]===";")break;return-1}return t}function N(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function _e(e){return G(e)}function Fe(e){return G(e)}function v(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function F(e){return e.startIndex+e[1].length}const Ve={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,r){return e},captureMetaData:!1},je=function(e){return Object.assign({},Ve,e)};let L;typeof Symbol!="function"?L="@@xmlMetadata":L=Symbol("XML Node Metadata");class S{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t,r){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}),r!==void 0&&(this.child[this.child.length-1][L]={startIndex:r})}static getMetaDataSymbol(){return L}}function Be(e,t){const r={};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,n=!1,i=!1,c="";for(;t<e.length;t++)if(e[t]==="<"&&!i){if(n&&qe(e,t)){t+=7;let f,o;[f,o,t]=Re(e,t+1),o.indexOf("&")===-1&&(r[f]={regx:RegExp(`&${f};`,"g"),val:o})}else if(n&&Xe(e,t)){t+=8;const{index:f}=Ue(e,t+1);t=f}else if(n&&Ye(e,t))t+=8;else if(n&&Ge(e,t)){t+=9;const{index:f}=Le(e,t+1);t=f}else if(Ze)i=!0;else throw new Error("Invalid DOCTYPE");s++,c=""}else if(e[t]===">"){if(i?e[t-1]==="-"&&e[t-2]==="-"&&(i=!1,s--):s--,s===0)break}else e[t]==="["?n=!0:c+=e[t];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:r,i:t}}const T=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function Re(e,t){t=T(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t])&&e[t]!=='"'&&e[t]!=="'";)r+=e[t],t++;if(W(r),t=T(e,t),e.substring(t,t+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[t]==="%")throw new Error("Parameter entities are not supported");let s="";return[t,s]=U(e,t,"entity"),t--,[r,s,t]}function Le(e,t){t=T(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;W(r),t=T(e,t);const s=e.substring(t,t+6).toUpperCase();if(s!=="SYSTEM"&&s!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${s}"`);t+=s.length,t=T(e,t);let n=null,i=null;if(s==="PUBLIC")[t,n]=U(e,t,"publicIdentifier"),t=T(e,t),(e[t]==='"'||e[t]==="'")&&([t,i]=U(e,t,"systemIdentifier"));else if(s==="SYSTEM"&&([t,i]=U(e,t,"systemIdentifier"),!i))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:r,publicIdentifier:n,systemIdentifier:i,index:--t}}function U(e,t,r){let s="";const n=e[t];if(n!=='"'&&n!=="'")throw new Error(`Expected quoted string, found "${n}"`);for(t++;t<e.length&&e[t]!==n;)s+=e[t],t++;if(e[t]!==n)throw new Error(`Unterminated ${r} value`);return t++,[t,s]}function Ue(e,t){t=T(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;if(!W(r))throw new Error(`Invalid element name: "${r}"`);if(t=T(e,t),e[t]!=="(")throw new Error(`Expected '(', found "${e[t]}"`);t++;let s="";for(;t<e.length&&e[t]!==")";)s+=e[t],t++;if(e[t]!==")")throw new Error("Unterminated content model");return{elementName:r,contentModel:s.trim(),index:t}}function Ze(e,t){return e[t+1]==="!"&&e[t+2]==="-"&&e[t+3]==="-"}function qe(e,t){return e[t+1]==="!"&&e[t+2]==="E"&&e[t+3]==="N"&&e[t+4]==="T"&&e[t+5]==="I"&&e[t+6]==="T"&&e[t+7]==="Y"}function Xe(e,t){return e[t+1]==="!"&&e[t+2]==="E"&&e[t+3]==="L"&&e[t+4]==="E"&&e[t+5]==="M"&&e[t+6]==="E"&&e[t+7]==="N"&&e[t+8]==="T"}function Ye(e,t){return e[t+1]==="!"&&e[t+2]==="A"&&e[t+3]==="T"&&e[t+4]==="T"&&e[t+5]==="L"&&e[t+6]==="I"&&e[t+7]==="S"&&e[t+8]==="T"}function Ge(e,t){return e[t+1]==="!"&&e[t+2]==="N"&&e[t+3]==="O"&&e[t+4]==="T"&&e[t+5]==="A"&&e[t+6]==="T"&&e[t+7]==="I"&&e[t+8]==="O"&&e[t+9]==="N"}function W(e){if(G(e))return e;throw new Error(`Invalid entity name ${e}`)}const We=/^[-+]?0x[a-fA-F0-9]+$/,Je=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Qe={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function ze(e,t={}){if(t=Object.assign({},Qe,t),!e||typeof e!="string")return e;let r=e.trim();if(t.skipLike!==void 0&&t.skipLike.test(r))return e;if(e==="0")return 0;if(t.hex&&We.test(r))return Ke(r,16);if(r.search(/[eE]/)!==-1){const s=r.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(s){if(t.leadingZeros)r=(s[1]||"")+s[3];else if(!(s[2]==="0"&&s[3][0]==="."))return e;return t.eNotation?Number(r):e}else return e}else{const s=Je.exec(r);if(s){const n=s[1],i=s[2];let c=He(s[3]);if(!t.leadingZeros&&i.length>0&&n&&r[2]!==".")return e;if(!t.leadingZeros&&i.length>0&&!n&&r[1]!==".")return e;if(t.leadingZeros&&i===e)return 0;{const f=Number(r),o=""+f;return o.search(/[eE]/)!==-1?t.eNotation?f:e:r.indexOf(".")!==-1?o==="0"&&c===""||o===c||n&&o==="-"+c?f:e:i?c===o||n+c===o?f:e:r===o||r===n+o?f:e}}else return e}}function He(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}function Ke(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function xe(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const r of e)if(typeof r=="string"&&t===r||r instanceof RegExp&&r.test(t))return!0}:()=>!1}class De{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:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,s)=>String.fromCodePoint(Number.parseInt(s,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,s)=>String.fromCodePoint(Number.parseInt(s,16))}},this.addExternalEntities=et,this.parseXml=it,this.parseTextData=tt,this.resolveNameSpace=rt,this.buildAttributesMap=st,this.isItStopNode=ut,this.replaceEntitiesValue=ft,this.readStopNodeData=at,this.saveTextToParentTag=ct,this.addChild=ot,this.ignoreAttributesFn=xe(this.options.ignoreAttributes)}}function et(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const s=t[r];this.lastEntities[s]={regex:new RegExp("&"+s+";","g"),val:e[s]}}}function tt(e,t,r,s,n,i,c){if(e!==void 0&&(this.options.trimValues&&!s&&(e=e.trim()),e.length>0)){c||(e=this.replaceEntitiesValue(e));const f=this.options.tagValueProcessor(t,e,r,n,i);return f==null?e:typeof f!=typeof e||f!==e?f:this.options.trimValues?Q(e,this.options.parseTagValue,this.options.numberParseOptions):e.trim()===e?Q(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function rt(e){if(this.options.removeNSPrefix){const t=e.split(":"),r=e.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(e=r+t[1])}return e}const nt=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function st(e,t,r){if(this.options.ignoreAttributes!==!0&&typeof e=="string"){const s=ie(e,nt),n=s.length,i={};for(let c=0;c<n;c++){const f=this.resolveNameSpace(s[c][1]);if(this.ignoreAttributesFn(f,t))continue;let o=s[c][4],u=this.options.attributeNamePrefix+f;if(f.length)if(this.options.transformAttributeName&&(u=this.options.transformAttributeName(u)),u==="__proto__"&&(u="#__proto__"),o!==void 0){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o);const l=this.options.attributeValueProcessor(f,o,t);l==null?i[u]=o:typeof l!=typeof o||l!==o?i[u]=l:i[u]=Q(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[u]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const c={};return c[this.options.attributesGroupName]=i,c}return i}}const it=function(e){e=e.replace(/\r\n?/g,`
`);const t=new S("!xml");let r=t,s="",n="";for(let i=0;i<e.length;i++)if(e[i]==="<")if(e[i+1]==="/"){const f=M(e,">",i,"Closing Tag is not closed.");let o=e.substring(i+2,f).trim();if(this.options.removeNSPrefix){const a=o.indexOf(":");a!==-1&&(o=o.substr(a+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),r&&(s=this.saveTextToParentTag(s,r,n));const u=n.substring(n.lastIndexOf(".")+1);if(o&&this.options.unpairedTags.indexOf(o)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let l=0;u&&this.options.unpairedTags.indexOf(u)!==-1?(l=n.lastIndexOf(".",n.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=n.lastIndexOf("."),n=n.substring(0,l),r=this.tagsNodeStack.pop(),s="",i=f}else if(e[i+1]==="?"){let f=J(e,i,!1,"?>");if(!f)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,r,n),!(this.options.ignoreDeclaration&&f.tagName==="?xml"||this.options.ignorePiTags)){const o=new S(f.tagName);o.add(this.options.textNodeName,""),f.tagName!==f.tagExp&&f.attrExpPresent&&(o[":@"]=this.buildAttributesMap(f.tagExp,n,f.tagName)),this.addChild(r,o,n,i)}i=f.closeIndex+1}else if(e.substr(i+1,3)==="!--"){const f=M(e,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){const o=e.substring(i+4,f-2);s=this.saveTextToParentTag(s,r,n),r.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}i=f}else if(e.substr(i+1,2)==="!D"){const f=Be(e,i);this.docTypeEntities=f.entities,i=f.i}else if(e.substr(i+1,2)==="!["){const f=M(e,"]]>",i,"CDATA is not closed.")-2,o=e.substring(i+9,f);s=this.saveTextToParentTag(s,r,n);let u=this.parseTextData(o,r.tagname,n,!0,!1,!0,!0);u==null&&(u=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):r.add(this.options.textNodeName,u),i=f+2}else{let f=J(e,i,this.options.removeNSPrefix),o=f.tagName;const u=f.rawTagName;let l=f.tagExp,a=f.attrExpPresent,g=f.closeIndex;this.options.transformTagName&&(o=this.options.transformTagName(o)),r&&s&&r.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,r,n,!1));const b=r;b&&this.options.unpairedTags.indexOf(b.tagname)!==-1&&(r=this.tagsNodeStack.pop(),n=n.substring(0,n.lastIndexOf("."))),o!==t.tagname&&(n+=n?"."+o:o);const p=i;if(this.isItStopNode(this.options.stopNodes,n,o)){let d="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)o[o.length-1]==="/"?(o=o.substr(0,o.length-1),n=n.substr(0,n.length-1),l=o):l=l.substr(0,l.length-1),i=f.closeIndex;else if(this.options.unpairedTags.indexOf(o)!==-1)i=f.closeIndex;else{const y=this.readStopNodeData(e,u,g+1);if(!y)throw new Error(`Unexpected end of ${u}`);i=y.i,d=y.tagContent}const h=new S(o);o!==l&&a&&(h[":@"]=this.buildAttributesMap(l,n,o)),d&&(d=this.parseTextData(d,o,n,!0,a,!0,!0)),n=n.substr(0,n.lastIndexOf(".")),h.add(this.options.textNodeName,d),this.addChild(r,h,n,p)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){o[o.length-1]==="/"?(o=o.substr(0,o.length-1),n=n.substr(0,n.length-1),l=o):l=l.substr(0,l.length-1),this.options.transformTagName&&(o=this.options.transformTagName(o));const d=new S(o);o!==l&&a&&(d[":@"]=this.buildAttributesMap(l,n,o)),this.addChild(r,d,n,p),n=n.substr(0,n.lastIndexOf("."))}else{const d=new S(o);this.tagsNodeStack.push(r),o!==l&&a&&(d[":@"]=this.buildAttributesMap(l,n,o)),this.addChild(r,d,n,p),r=d}s="",i=g}}else s+=e[i];return t.child};function ot(e,t,r,s){this.options.captureMetaData||(s=void 0);const n=this.options.updateTag(t.tagname,r,t[":@"]);n===!1||(typeof n=="string"&&(t.tagname=n),e.addChild(t,s))}const ft=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function ct(e,t,r,s){return e&&(s===void 0&&(s=t.child.length===0),e=this.parseTextData(e,t.tagname,r,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,s),e!==void 0&&e!==""&&t.add(this.options.textNodeName,e),e=""),e}function ut(e,t,r){const s="*."+r;for(const n in e){const i=e[n];if(s===i||t===i)return!0}return!1}function lt(e,t,r=">"){let s,n="";for(let i=t;i<e.length;i++){let c=e[i];if(s)c===s&&(s="");else if(c==='"'||c==="'")s=c;else if(c===r[0])if(r[1]){if(e[i+1]===r[1])return{data:n,index:i}}else return{data:n,index:i};else c===" "&&(c=" ");n+=c}}function M(e,t,r,s){const n=e.indexOf(t,r);if(n===-1)throw new Error(s);return n+t.length-1}function J(e,t,r,s=">"){const n=lt(e,t+1,s);if(!n)return;let i=n.data;const c=n.index,f=i.search(/\s/);let o=i,u=!0;f!==-1&&(o=i.substring(0,f),i=i.substring(f+1).trimStart());const l=o;if(r){const a=o.indexOf(":");a!==-1&&(o=o.substr(a+1),u=o!==n.data.substr(a+1))}return{tagName:o,tagExp:i,closeIndex:c,attrExpPresent:u,rawTagName:l}}function at(e,t,r){const s=r;let n=1;for(;r<e.length;r++)if(e[r]==="<")if(e[r+1]==="/"){const i=M(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(n--,n===0))return{tagContent:e.substring(s,r),i};r=i}else if(e[r+1]==="?")r=M(e,"?>",r+1,"StopNode is not closed.");else if(e.substr(r+1,3)==="!--")r=M(e,"-->",r+3,"StopNode is not closed.");else if(e.substr(r+1,2)==="![")r=M(e,"]]>",r,"StopNode is not closed.")-2;else{const i=J(e,r,">");i&&((i&&i.tagName)===t&&i.tagExp[i.tagExp.length-1]!=="/"&&n++,r=i.closeIndex)}}function Q(e,t,r){if(t&&typeof e=="string"){const s=e.trim();return s==="true"?!0:s==="false"?!1:ze(e,r)}else return Ie(e)?e:""}const z=S.getMetaDataSymbol();function dt(e,t){return le(e,t)}function le(e,t,r){let s;const n={};for(let i=0;i<e.length;i++){const c=e[i],f=ht(c);let o="";if(r===void 0?o=f:o=r+"."+f,f===t.textNodeName)s===void 0?s=c[f]:s+=""+c[f];else{if(f===void 0)continue;if(c[f]){let u=le(c[f],t,o);const l=pt(u,t);c[z]!==void 0&&(u[z]=c[z]),c[":@"]?gt(u,c[":@"],o,t):Object.keys(u).length===1&&u[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?u=u[t.textNodeName]:Object.keys(u).length===0&&(t.alwaysCreateTextNode?u[t.textNodeName]="":u=""),n[f]!==void 0&&n.hasOwnProperty(f)?(Array.isArray(n[f])||(n[f]=[n[f]]),n[f].push(u)):t.isArray(f,o,l)?n[f]=[u]:n[f]=u}}}return typeof s=="string"?s.length>0&&(n[t.textNodeName]=s):s!==void 0&&(n[t.textNodeName]=s),n}function ht(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const s=t[r];if(s!==":@")return s}}function gt(e,t,r,s){if(t){const n=Object.keys(t),i=n.length;for(let c=0;c<i;c++){const f=n[c];s.isArray(f,r+"."+f,!0,!0)?e[f]=[t[f]]:e[f]=t[f]}}}function pt(e,t){const{textNodeName:r}=t,s=Object.keys(e).length;return!!(s===0||s===1&&(e[r]||typeof e[r]=="boolean"||e[r]===0))}class ae{constructor(t){this.externalEntities={},this.options=je(t)}parse(t,r){if(typeof t!="string")if(t.toString)t=t.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});const i=Pe(t,r);if(i!==!0)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}const s=new De(this.options);s.addExternalEntities(this.externalEntities);const n=s.parseXml(t);return this.options.preserveOrder||n===void 0?n:dt(n,this.options)}addEntity(t,r){if(r.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(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=r}static getMetaDataSymbol(){return S.getMetaDataSymbol()}}const Et=new ae({ignoreAttributes:!1,attributeNamePrefix:"",allowBooleanAttributes:!0,parseTagValue:!1,parseAttributeValue:!1}),yt=e=>{var c;const t=[],s=(c=Et.parse(`<root>${e}</root>`).root)==null?void 0:c.symbol,n=Array.isArray(s)?s:s?[s]:[],i="icon_";return n.forEach(f=>{const o=f.id;if(o){const u=f.viewBox||"0 0 1024";let l=e;const a=new RegExp(`<symbol[^>]*id=["']${o}["'][^>]*>([\\s\\S]*?)<\\/symbol>`,"i"),g=e.match(a);g&&g[1]?l=g[1].trim().replace(" ",""):l="",t.push({code:o.replace(i,""),viewBox:u,content:l})}}),t};function Z(e){var t=new Error(e);return t.source="ulid",t}var H="0123456789ABCDEFGHJKMNPQRSTVWXYZ",V=H.length,de=Math.pow(2,48)-1,bt=10,Nt=16;function wt(e){var t=Math.floor(e()*V);return t===V&&(t=V-1),H.charAt(t)}function vt(e,t){if(isNaN(e))throw new Error(e+" must be a number");if(e>de)throw Z("cannot encode time greater than "+de);if(e<0)throw Z("time must be positive");if(Number.isInteger(e)===!1)throw Z("time must be an integer");for(var r=void 0,s="";t>0;t--)r=e%V,s=H.charAt(r)+s,e=(e-r)/V;return s}function At(e,t){for(var r="";e>0;e--)r=wt(t)+r;return r}function mt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=arguments[1];t||(t=typeof window<"u"?window:null);var r=t&&(t.crypto||t.msCrypto);if(r)return function(){var n=new Uint8Array(1);return r.getRandomValues(n),n[0]/255};try{var s=require("crypto");return function(){return s.randomBytes(1).readUInt8()/255}}catch{}if(e){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch{}return function(){return Math.random()}}throw Z("secure crypto unusable, insecure Math.random not allowed")}function It(e){return e||(e=mt()),function(r){return isNaN(r)&&(r=Date.now()),vt(r,bt)+At(Nt,e)}}var he=It();function Tt(e,t){const r={isZero:(t==null?void 0:t.isZero)??!0,isFalse:(t==null?void 0:t.isFalse)??!0};return e==null||r.isFalse&&(e===!1||e==="false")||r.isZero&&(e===0||e==="0")||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0||typeof e=="string"&&e.trim().length===0}function Pt(e,t){const r={isZero:(t==null?void 0:t.isZero)??!0,isFalse:(t==null?void 0:t.isFalse)??!0};return!Tt(e,r)}function Ct(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}const j=e=>{const t=/url\(#([^)]+)\)/,r=e.match(t);return r?r[1]:void 0},Ot=e=>{const t=/id="([^"]+)"/,r=e.match(t);return r?r[1]:void 0},q=(e,t)=>e==="gradientUnits"?`${e}="${t}"`:`${Ct(e)}="${t}"`,B=(e,t,r)=>r&&r.length>0?[`<${e} ${t.join(" ")}>`,...r,`</${e}>`]:[`<${e} ${t.join(" ")}/>`],St=new ae({ignoreAttributes:!1,attributeNamePrefix:"",allowBooleanAttributes:!0,parseTagValue:!1,parseAttributeValue:!1}),ge=e=>{const r=St.parse(e).svg,s=r==null?void 0:r.viewBox,n=(r==null?void 0:r.fill)==="none",i=[],c=["ellipse","path","circle","g","stop","rect"],f=["clipPath","linearGradient"],o=new Map,u=[];r!=null&&r.defs&&(Array.isArray(r.defs)?r.defs:[r.defs]).forEach(b=>{b&&f.forEach(p=>{const d=b[p];if(!d)return;(Array.isArray(d)?d:[d]).forEach(y=>{if(!y)return;const k=y.id,P=k?`svg_def_${he().toLowerCase()}`:void 0;o.set(k,P);const m={tag:p,attr:{...y,id:P},children:[]};c.forEach(ye=>{const X=y[ye];X&&(Array.isArray(X)?X:[X]).forEach($t=>{m.children||(m.children=[]),m.children.push({tag:ye,attr:{...$t}})})}),u.push(m)})})});const l=g=>{const b=g?g["#name"]||g.tagName||Object.keys(g).find(h=>c.includes(h)):void 0;if(!b)return{tag:"",attr:{}};const p={...g};if(delete p["#name"],delete p.tagName,c.forEach(h=>{p.hasOwnProperty(h)&&delete p[h]}),p.fill)if(p.fill.startsWith("url(#")){const h=j(p.fill),y=o.get(h)??h;p.fill=`url(#${y})`}else i.includes(p.fill)||i.push(p.fill);if(p["clip-path"]&&p["clip-path"].startsWith("url(#")){const h=j(p["clip-path"]),y=o.get(h)??h;p["clip-path"]=`url(#${y})`}const d=[];return c.forEach(h=>{const y=g[h];y&&(Array.isArray(y)?y:[y]).forEach(P=>{d.push(l({...P,"#name":h}))})}),{tag:b,attr:p,...d.length>0&&{children:d}}},a=[];return r&&c.forEach(g=>{const b=r[g];b&&(Array.isArray(b)?b:[b]).forEach(d=>{const h=l({...d,"#name":g});h.tag==="g"&&!Pt(h.attr)?a.push(...h.children||[]):a.push(h)})}),{fillDiffColor:i,viewBox:s,content:a,defs:u,fillNone:n}};function K(e){return Object.keys(e)}const x=(e,t)=>e.flatMap(r=>{const{fillOpacity:s,stroke:n,...i}=r.attr,c=K(i).map(o=>q(o,i[o])),f=[];return t?(s&&f.push(`fill-opacity="${s}"`),n&&f.push(`stroke="${n}"`)):n&&f.push('stroke="currentColor"'),B(r.tag,[...c,...f])}),pe=(e,t)=>e.flatMap(r=>{const{stop:s,rect:n,...i}=r.attr,c=K(i).filter(o=>i[o]!==void 0&&i[o]!==null).map(o=>q(String(o),i[o])),f=r.children?x(r.children,t):void 0;return B(r.tag,c,f)}),Mt=e=>{const{fillDiffColor:t,content:r,defs:s,fillNone:n,viewBox:i}=ge(e),f=t.filter((u,l,a)=>u&&a.indexOf(u)===l).length>=2,o=r.flatMap(u=>{const{fill:l,fillOpacity:a,stroke:g,...b}=u.attr,p=K(b).map(y=>q(y,b[y])),d=Y(u.attr,f),h=u.children?x(u.children,f):void 0;return u.tag==="path"&&g&&n?B(u.tag,[...p,...d,'fill="none"'],h):B(u.tag,[...p,...d],h)});return{viewBox:i,defs:pe(s,f),content:o}},kt=(e,t)=>{const r=["clipPath","linearGradient"],s=new Map,n=[];return e&&(Array.isArray(e)?e:[e]).forEach(c=>{c&&r.forEach(f=>{const o=c[f];if(!o)return;(Array.isArray(o)?o:[o]).forEach(l=>{if(!l)return;const a=l.id,g=a?`svg_def_${he().toLowerCase()}`:void 0;s.set(a,g);const b={tag:f,attr:{...l,id:g},children:[]};t.forEach(p=>{const d=l[p];d&&(Array.isArray(d)?d:[d]).forEach(y=>{b.children||(b.children=[]),b.children.push({tag:p,attr:{...y}})})}),n.push(b)})})}),{defIdMap:s,defsContent:n}},Ee=(e,t,r)=>{const s=e?e["#name"]||e.tagName||Object.keys(e).find(c=>t.includes(c)):void 0;if(!s)return{tag:"",attr:{}};const n={...e};if(delete n["#name"],delete n.tagName,t.forEach(c=>{n.hasOwnProperty(c)&&delete n[c]}),n.fill&&typeof n.fill=="string"&&n.fill.startsWith("url(#")){const c=j(n.fill),f=r.get(c)??c;n.fill=`url(#${f})`}if(n["clip-path"]&&typeof n["clip-path"]=="string"&&n["clip-path"].startsWith("url(#")){const c=j(n["clip-path"]),f=r.get(c)??c;n["clip-path"]=`url(#${f})`}const i=[];return t.forEach(c=>{const f=e[c];f&&(Array.isArray(f)?f:[f]).forEach(u=>{i.push(Ee({...u,"#name":c},t,r))})}),{tag:s,attr:n,...i.length>0&&{children:i}}};w.checkIsSVGMultiColor=we,w.createTag=B,w.decodeSvgContent=ge,w.decodeSymbols=yt,w.extractId=Ot,w.extractIdFromUrl=j,w.formatAttrKeyValue=q,w.formatChildren=x,w.formatDefs=pe,w.formatSvgContent=Mt,w.formatSvgProperties=Y,w.parseDefs=kt,w.processElement=Ee,w.remarkDeepSVGPaths=ne,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});