import{aC as A,aD as p,aE as y,aF as d,aG as j,aH as C}from"./index.Drusyo5m.js";const m=/[#.]/g;function x(r,e){const n=r||"",t={};let i=0,o,f;for(;i<n.length;){m.lastIndex=i;const a=m.exec(n),s=n.slice(i,a?a.index:n.length);s&&(o?o==="#"?t.id=s:Array.isArray(t.className)?t.className.push(s):t.className=[s]:f=s,i+=s.length),a&&(o=a[0],i++)}return{type:"element",tagName:f||e||"div",properties:t,children:[]}}function u(r,e,n){const t=n?G(n):void 0;function i(o,f,...a){let s;if(o==null){s={type:"root",children:[]};const c=f;a.unshift(c)}else{s=x(o,e);const c=s.tagName.toLowerCase(),g=t?t.get(c):void 0;if(s.tagName=g||c,S(f))a.unshift(f);else for(const[N,b]of Object.entries(f))M(r,s.properties,N,b)}for(const c of a)l(s.children,c);return s.type==="element"&&s.tagName==="template"&&(s.content={type:"root",children:s.children},s.children=[]),s}return i}function S(r){if(r===null||typeof r!="object"||Array.isArray(r))return!0;if(typeof r.type!="string")return!1;const e=r,n=Object.keys(r);for(const t of n){const i=e[t];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const o=i;for(const f of o)if(typeof f!="number"&&typeof f!="string")return!0}}return!!("children"in r&&Array.isArray(r.children))}function M(r,e,n,t){const i=A(r,n);let o;if(t!=null){if(typeof t=="number"){if(Number.isNaN(t))return;o=t}else typeof t=="boolean"?o=t:typeof t=="string"?i.spaceSeparated?o=p(t):i.commaSeparated?o=y(t):i.commaOrSpaceSeparated?o=p(y(t).join(" ")):o=h(i,i.property,t):Array.isArray(t)?o=[...t]:o=i.property==="style"?w(t):String(t);if(Array.isArray(o)){const f=[];for(const a of o)f.push(h(i,i.property,a));o=f}i.property==="className"&&Array.isArray(e.className)&&(o=e.className.concat(o)),e[i.property]=o}}function l(r,e){if(e!=null)if(typeof e=="number"||typeof e=="string")r.push({type:"text",value:String(e)});else if(Array.isArray(e))for(const n of e)l(r,n);else if(typeof e=="object"&&"type"in e)e.type==="root"?l(r,e.children):r.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function h(r,e,n){if(typeof n=="string"){if(r.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((r.boolean||r.overloadedBoolean)&&(n===""||d(n)===d(e)))return!0}return n}function w(r){const e=[];for(const[n,t]of Object.entries(r))e.push([n,t].join(": "));return e.join("; ")}function G(r){const e=new Map;for(const n of r)e.set(n.toLowerCase(),n);return e}const L=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],F=u(j,"div"),O=u(C,"g",L);export{F as h,O as s};
