@symbo.ls/element 3.14.752 → 3.14.755

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @symbo.ls/element
2
2
 
3
+ ## 3.14.755
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-generated cross-repo patch release.
8
+
9
+ ## 3.14.753
10
+
11
+ ### Patch Changes
12
+
13
+ - Auto-generated cross-repo patch release.
14
+ - Updated dependencies
15
+ - css-in-props@3.14.753
16
+
3
17
  ## 3.14.752
4
18
 
5
19
  ### Patch Changes
@@ -3,4 +3,4 @@
3
3
  `).slice(0,6).join(`
4
4
  `):"")}}if(xt(o,!0),Ft(o,s,i),typeof o.html=="function"&&o.node&&!o.node.innerHTML){const l=o.context?.designSystem;l&&(0,A.pushConfig)(l);try{const h=o.html(o,o.state,o.context);h!=null&&typeof h!="function"&&(o.node.innerHTML=h)}catch{}finally{l&&(0,A.popConfig)()}}if(I("Create",o,c),I("Complete",o,c),I("Render",o,c),I("RenderRouter",o,c),St(o,c),typeof o.onFrame=="function"){const l=o.onFrame,h=o.context?.designSystem,g=()=>{if(o.node){if(o.node.isConnected){h&&(0,A.pushConfig)(h);try{l(o,o.state,o.context)}catch(k){console.error("[DOMQL] onFrame error:",k)}finally{h&&(0,A.popConfig)()}}requestAnimationFrame(g)}};requestAnimationFrame(g)}return o}function Xt(t,s,n){const c=!s,i=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,o=c&&i&&t.context?.state,f=n.state!==void 0&&!o?n.state:t.state&&!(0,P.isStore)(t.state)?t.state:void 0;if(f==null){if(s?.state)t.state=s.state,(0,q.applyStateMethods)(t,t.state);else if(t.context?.state){const r=t.context.state,e={...r},a=t.context?.polyglot;if(a?.translations){const u=r.lang||a.defaultLang||"en",d=a.translations[u];if(d&&typeof d=="object")for(const y in d)e[y]===void 0&&(e[y]=d[y]);const p=new Set(a.languages||[]);for(const y in a.translations)!p.has(y)&&e[y]===void 0&&(e[y]=a.translations[y])}t.state=(0,P.isStore)(e)?e:(0,P.createStore)(e),t.state.__element=t,t.state.root=t.state,(0,q.applyStateMethods)(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),(0,q.applyStateMethods)(t,t.state);return}if(typeof f=="string"){if(t.state=wt(f,s),t.state&&typeof t.state=="object"&&!(0,P.isStore)(t.state)){const r=s?.state?.root||s?.state||t.state;Object.defineProperty(t.state,"root",{value:r,enumerable:!1,configurable:!0,writable:!0})}(0,q.applyStateMethods)(t,t.state);return}if(typeof f=="function"){const r=f(t,s?.state);t.state=(0,P.isStore)(r)?r:(0,P.createStore)(r||{})}else(0,P.isStore)(f)?t.state=f:t.state=(0,P.createStore)({...f});t.state.__element=t,s?.state?(t.state.parent=s.state,t.state.root=s.state.root||s.state):t.state.root=t.state,(0,q.applyStateMethods)(t,t.state)}function dt(t,s){if(!s)return t;const n=s.split("/");let c=t;for(const i of n){if(c==null)return{};c=c[i]}return c??{}}function wt(t,s){if(!s)return{};if(t===".")return s.state||{};if(t.startsWith("../")){const i=t.slice(3);return i?dt(s.state,i):s.state??{}}if(t.startsWith("~/")){const i=s.state?.root||s.state,o=t.slice(2);return o?dt(i,o):i??{}}if(s.state?.[t]!==void 0)return s.state[t];const n=dt(s.state,t);if(n!=null&&Object.keys(n).length>0)return n;const c=s.context?.polyglot;if(c?.translations){const i=s.state?.root?.lang||c.defaultLang||"en",o=c.translations[i];if(o?.[t]!==void 0)return o[t];if(c.translations[t]!==void 0)return c.translations[t]}return{}}const Jt=new Set(["s","state","ctx","context"]);function mt(t){try{const n=Function.prototype.toString.call(t).match(/^[^(]*\(([^)]*)\)/);return n?n[1].split(",").map(c=>c.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function to(t){if(typeof t!="function"||t.length!==2)return!1;const s=mt(t);if(s.length<2)return!1;const n=s[1].replace(/[{}[\]]/g,"").trim();return n.length>0&&!Jt.has(n)}function oo(t){const s=t.__ref,n=t.tag||"div",c=t.context?.designSystem,i=[],o=Object.keys(t);for(let f=0;f<o.length;f++){const r=o[f];if(typeof t[r]!="function"||T.REGISTRY.has(r))continue;const e=r.charCodeAt(0);e>=65&&e<=90||Y(r)||b.CSS_PROPS_REGISTRY[r]||b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(r)||(0,$.checkAttributeByTagName)(n,r)||((0,nt.isLoudDevRuntime)()&&to(t[r])&&console.warn(`[smbls] custom prop "${r}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${r}', \u2026) instead of reading el.${r}(\u2026) directly (see RULES.md Rule 8).`),i.push({prop:r,fn:t[r]}))}for(let f=0;f<i.length;f++){const{prop:r,fn:e}=i[f];s.__exec[r]=e,Object.defineProperty(t,r,{get(){c&&(0,A.pushConfig)(c);try{return e(t,t.state,t.context)}catch{return}finally{c&&(0,A.popConfig)()}},set(a){delete s.__exec[r],Object.defineProperty(t,r,{value:a,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function so(t,s){if(!(!Array.isArray(s)||s.length===0))for(let n=0;n<s.length;n++){const c=s[n];try{typeof c=="function"?c(t,t.state,t.context):typeof c=="string"&&t.state?.[c]}catch{}}}function L(t,s,n){return!Array.isArray(s)||s.length===0?n:function(...c){return so(t,s),n.apply(this,c)}}function m(t,s){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[s]}function jt(t,s){const n=t.__ref,c=!!(s&&s.skipIfEffect);if(oo(t),typeof t.text=="function"){const o=t.text,f=L(t,t.textDeps,o),r=(0,v.createEffect)(()=>{if(!n.contentManaged)try{let e=f(t,t.state,t.context);t.node&&e!=null&&typeof e!="function"&&typeof e!="object"&&(typeof e=="string"&&e.includes("{{")&&(e=ct.replaceLiteralsWithObjectFields.call(t,e,t.state)),t.tag==="string"?t.node.nodeValue=e:t.node.textContent=e)}catch{}},{depth:n.path.length});n.__effects.push(r),n.__exec.text=o}else if(typeof t.text=="string"&&t.text.includes("{{")){const o=t.text,f=(0,v.createEffect)(()=>{if(n.contentManaged)return;const r=ct.replaceLiteralsWithObjectFields.call(t,o,t.state);r!=null&&(t.text=r),t.node&&(t.tag==="string"?t.node.nodeValue=r??"":t.node.textContent=r??"")},{depth:n.path.length});n.__effects.push(f),n.__exec.text=o}for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&typeof t[o]=="function"&&!T.REGISTRY.has(o)&&!Y(o)&&!n.__exec[o]){if(b.CSS_PROPS_REGISTRY[o]){const f=t[o],r=L(t,t[o+"Deps"],f),e=o;let a;const u=(0,v.createEffect)(()=>{const d=t.context?.designSystem;d&&(0,A.pushConfig)(d);try{const p=r(t,t.state,t.context),y=b.CSS_PROPS_REGISTRY[e](p,t,t.state,t.context);if(y&&t.node){const _=pt(y);(_===null||_!==a)&&(a=_,G(t.node,y))}else t.node&&(e==="show"||e==="hide")&&(a=void 0,t.node.style.display="")}finally{d&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(u),n.__exec[o]=f}else if(b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(o)){const f=t[o],r=L(t,t[o+"Deps"],f),e=o;let a;const u=(0,v.createEffect)(()=>{const d=t.context?.designSystem;d&&(0,A.pushConfig)(d);try{const p=r(t,t.state,t.context);if(t.node)if(p!=null){const y=e+":"+String(p);y!==a&&(a=y,G(t.node,{[e]:p}))}else a=void 0,t.node.style[e]=""}finally{d&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(u),n.__exec[o]=f}}if(typeof t.html=="function"){const o=t.html,f=L(t,t.htmlDeps,o),r=(0,v.createEffect)(()=>{const e=t.context?.designSystem;e&&(0,A.pushConfig)(e);try{const a=f(t,t.state,t.context);t.node&&a!=null&&typeof a!="function"&&(t.node.innerHTML=a)}finally{e&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(r),n.__exec.html=o}if(typeof t.value=="function"){const o=t.value,f=L(t,t.valueDeps,o),r=(0,v.createEffect)(()=>{try{const e=f(t,t.state,t.context);if(!t.node||!("value"in t.node))return;const a=e==null?"":String(e);if(t.node.value===a)return;const u=typeof document<"u"&&document.activeElement===t.node,d=u&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,p=u&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=a,u&&d!=null&&p!=null)try{t.node.setSelectionRange(d,p)}catch{}}catch{}},{depth:n.path.length});n.__effects.push(r),n.__exec.value=o}if(typeof t.style=="function"){const o=t.style,f=L(t,t.styleDeps,o);let r;const e=(0,v.createEffect)(()=>{const a=f(t,t.state,t.context),u=pt(a);(u===null||u!==r)&&(r=u,G(t.node,a))},{depth:n.path.length});n.__effects.push(e),n.__exec.style=o}else if(t.style&&typeof t.style=="object")for(const o in t.style){const f=t.style[o];if(typeof f!="function")continue;const r=L(t,m(t.styleDeps,o),f);let e;const a=(0,v.createEffect)(()=>{try{const u=r(t,t.state,t.context);if(t.node){const d=o+":"+String(u);d!==e&&(e=d,G(t.node,{[o]:u}))}}catch{}},{depth:n.path.length});n.__effects.push(a)}if(t.attr&&typeof t.attr=="object"){for(const o in t.attr)if(typeof t.attr[o]=="function"){const f=L(t,m(t.attrDeps,o),t.attr[o]),r=o,e=(0,v.createEffect)(()=>{try{const a=f(t,t.state,t.context);t.node?.setAttribute&&(a==null||a===!1?t.node.removeAttribute(r):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(r,a===!0?"":a))}catch{}},{depth:n.path.length});n.__effects.push(e)}}if(t.aria&&typeof t.aria=="object")for(const o in t.aria){if(typeof t.aria[o]!="function")continue;const f=L(t,m(t.ariaDeps,o),t.aria[o]),r="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),e=(0,v.createEffect)(()=>{try{const a=f(t,t.state,t.context);if(!t.node?.setAttribute)return;a==null||a===!1?t.node.removeAttribute(r):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(r,a===!0?"":a)}catch{}},{depth:n.path.length});n.__effects.push(e)}if(t.data&&typeof t.data=="object")for(const o in t.data){if(typeof t.data[o]!="function")continue;const f=L(t,m(t.dataDeps,o),t.data[o]),e="data-"+o.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),a=(0,v.createEffect)(()=>{try{const u=f(t,t.state,t.context);if(!t.node?.setAttribute)return;u==null||u===!1?t.node.removeAttribute(e):typeof u!="function"&&typeof u!="object"&&t.node.setAttribute(e,u===!0?"":u)}catch{}},{depth:n.path.length});n.__effects.push(a)}const i=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(i)for(const o in i){if(typeof i[o]!="function")continue;const f=L(t,m(t.classDeps,o),i[o]),r=(0,v.createEffect)(()=>{try{const e=f(t,t.state,t.context);if(!t.node?.classList)return;typeof e=="string"?t.node.classList.add(e):e?t.node.classList.add(o):t.node.classList.remove(o)}catch{}},{depth:n.path.length});n.__effects.push(r)}!c&&typeof t.if=="function"&&Pt(t,n,t.if);for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||T.REGISTRY.has(o)||typeof t[o]!="function")continue;const f=o.charCodeAt(0);if(f>=65&&f<=90||Y(o))continue;const r=t[o];n.__exec[o]=r;const e=t.tag||"div";if((0,$.checkAttributeByTagName)(e,o)&&!b.CSS_PROPS_REGISTRY[o]&&!(b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(o))){const a=(0,$.camelToAttr)(o)||o,u=L(t,t[o+"Deps"],r),d=(0,v.createEffect)(()=>{try{const p=u(t,t.state,t.context);t.node?.setAttribute&&(p==null||p===!1?t.node.removeAttribute(a):typeof p!="function"&&typeof p!="object"&&(a==="src"&&"src"in t.node?t.node.src=p:t.node.setAttribute(a,p===!0?"":p)))}catch{}},{depth:n.path.length});n.__effects.push(d)}}if(ro(t),fo(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){const o=t.onStateUpdate,f=t.stateDeps;let r=!1,e=[];const a=(0,v.createEffect)(()=>{const u=[];for(let _=0;_<f.length;_++){const l=f[_];try{u[_]=typeof l=="function"?l(t,t.state,t.context):t.state?.[l]}catch{u[_]=void 0}}if(!r){r=!0,e=u;return}let d=u.length!==e.length;for(let _=0;!d&&_<u.length;_++)u[_]!==e[_]&&(d=!0);const p=e;if(e=u,!d)return;const y=t.context?.designSystem;y&&(0,A.pushConfig)(y);try{o(t,t.state,t.context,{prev:p,next:u})}catch(_){if(t.context?.plugins?.length&&(0,K.runPluginHook)("error",t,{hook:"onStateUpdate",error:_})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',_),t.context?.strictMode)throw _}finally{y&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(a)}eo(t)}function Et(t){const s=t.parent,n=s?.node;if(!n||!t.node){Ft(t,t.parent);return}let c=null;const i=Object.keys(s),o=i.indexOf(t.key);for(let f=o+1;f<i.length;f++){const r=s[i[f]];if(r?.node?.parentNode===n){c=r.node;break}}c?n.insertBefore(t.node,c):n.appendChild(t.node)}function Pt(t,s,n){const c=L(t,t.ifDeps,n),i=(0,v.createEffect)(()=>{let o;try{o=c(t,t.state,t.context)}catch(r){if(o=!1,s.__ifError=r,typeof console<"u"&&console.warn){const e=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${e} \u2014 treating as false:`,r?.message||r)}return}const f=s.__if;if(s.__if=!!o,f&&!s.__if&&t.node)t.node.remove();else if(!f&&s.__if)if(s.__ifInitialized)t.node||(t.node=(0,W.cacheNode)(t)),t.node&&(t.node.ref=t),Et(t),lt(t);else{if(s.__ifInitialized=!0,t.tag||(t.tag=(0,W.detectTag)(t)),I("Init",t,{}),t.node||(t.node=(0,W.cacheNode)(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!s.__fragmentAnchor){const e=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(e),s.__fragmentAnchor=e}I("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Tt(t,{}),jt(t,{skipIfEffect:!0}),lt(t),Dt(t),Nt(t,{}),Et(t),St(t,{})}},{depth:s.path.length});s.__effects.push(i)}function lt(t){const{node:s}=t;if(s){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?s.nodeValue=t.text:s.textContent=t.text:typeof t.text=="number"&&(s.textContent=t.text),uo(t),typeof t.html=="string"&&(s.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in s){const n=String(t.value);s.value!==n&&(s.value=n)}if(t.style&&typeof t.style=="object"&&G(s,t.style),t.attr&&typeof t.attr=="object")for(const n in t.attr){const c=t.attr[n];typeof c=="function"||typeof c=="object"||c==null||c===!1||s.setAttribute&&s.setAttribute(n,c===!0?"":c)}if(t.data&&typeof t.data=="object")for(const n in t.data){const c=t.data[n];typeof c=="function"||typeof c=="object"||c==null||c===!1||s.dataset&&(s.dataset[n]=c===!0?"":c)}if(t.classlist||t.class){const n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(c=>c&&s.classList.add(c));else if(typeof n=="object")for(const c in n){const i=typeof n[c]=="function"?n[c](t,t.state,t.context):n[c];i&&s.classList.add(typeof i=="string"?i:c)}}}}function pt(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function G(t,s){if(!t||!s||!t.style)return;let n=null;for(const c in s){const i=s[c];if(i!=null){if(c.charAt(0)==="&"&&typeof i=="object"){n||(n={}),n[c]=i;continue}try{const o=String(i),f=c.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),r=o.trim(),e=/\s*!important\s*$/.test(r),a=r.replace(/\s*!important\s*$/,"");t.style.setProperty(f,a,e?"important":"")}catch{}}}n&&co(t,n)}let no=0;function co(t,s){const n=`_ds${no++}`;t.classList.add(n);const c=t.ownerDocument;let i=c.querySelector("style[data-smbls-scoped]");i||(i=c.createElement("style"),i.setAttribute("data-smbls-scoped",""),c.head.appendChild(i));let o="";for(const f in s){const r="."+n,e=f.replace(/&/g,r).split(",").map(u=>{const d=u.trim();return d.includes(r)?d:r+d}).join(", "),a=s[f];if(typeof a=="object"){let u="",d="";for(const p in a){const y=a[p];if(typeof y=="object"){const _=p.includes("&")?e.split(", ").map(h=>p.replace(/&/g,h)).join(", "):e.split(", ").map(h=>`${h} ${p}`).join(", ");let l="";for(const h in y)l+=`${h.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${y[h]};`;d+=(0,U.wrapHoverRule)(`${_} { ${l} }`,_)+`
5
5
  `}else u+=`${p.replace(/[A-Z]/g,_=>"-"+_.toLowerCase())}: ${y};`}u&&(o+=(0,U.wrapHoverRule)(`${e} { ${u} }`,e)+`
6
- `),d&&(o+=d)}}o&&(i.textContent+=o)}function ro(t){let s=t.subscribeTo;if(typeof s=="function")try{s=s(t,t.state,t.context)}catch{s=null}if(!Array.isArray(s)||s.length===0)return;const n=t.__ref;for(let c=0;c<s.length;c++){const i=s[c];if(typeof i!="string"||i.length===0)continue;const o=i.split("."),f=o[0],r=o.slice(1),e={value:!1},a=(0,v.createEffect)(()=>{const u=t.state&&((0,P.isStore)(t.state)?t.state.root:null);if(!u||!(0,P.isStore)(u))return;let d=u;d=d[f];for(let y=0;y<r.length&&!(d==null||typeof d!="object");y++)if((0,P.isStore)(d))d=d[r[y]];else break;if(!e.value)return;let p=!1;if(typeof t.onBeforeUpdate=="function"){const y=t.context?.designSystem;y&&(0,A.pushConfig)(y);try{t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0})===!1&&(p=!0)}catch(_){t.context?.plugins?.length&&(0,K.runPluginHook)("error",t,{hook:"onBeforeUpdate",error:_})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",_)}finally{y&&(0,A.popConfig)()}}if(!p&&t.node&&n.__effects)for(let y=0;y<n.__effects.length;y++){const _=n.__effects[y];_&&_!==a&&!_._disposed&&!_._isSubscribeToEffect&&typeof _._execute=="function"&&_._execute()}if(!p&&typeof t.onUpdate=="function"){const y=t.context?.designSystem;y&&(0,A.pushConfig)(y);try{t.onUpdate(t,t.state,t.context)}catch(_){t.context?.plugins?.length&&(0,K.runPluginHook)("error",t,{hook:"onUpdate",error:_})||console.error("[DOMQL] subscribeTo onUpdate error:",_)}finally{y&&(0,A.popConfig)()}}},{depth:n.path.length});e.value=!0,a._isSubscribeToEffect=!0,n.__effects.push(a)}}function yt(t,s){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!s.context?.designSystem?.media?.[t.slice(1)])}const Ot=new Set;function io(t,s){const n=s?.__ref?.path?s.__ref.path.join("."):s?.key||"?",c=n+"::"+t;Ot.has(c)||(Ot.add(c),console.warn(`[smbls/css] "${t}" at ${n} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function Z(t,s,n){const c={},i=new Set,o=(f,r,e)=>{const a=e?new Set(Object.keys(c)):null;if(b.CSS_PROPS_REGISTRY[f]){const u=b.CSS_PROPS_REGISTRY[f](r,s,s.state,s.context);if(u){const d=Array.isArray(u)?u:[u];for(const p of d)p&&Object.assign(c,p)}}else c[f]=r;if(e)for(const u in c)a.has(u)||i.add(u)};for(const f in t){if(!Object.prototype.hasOwnProperty.call(t,f))continue;let r=t[f];if(typeof r=="function"&&(r=r(s,s.state,s.context)),r==null||typeof r=="function")continue;if(typeof r=="object"&&!Array.isArray(r)){if(f==="style"){for(const d in r){let p=r[d];if(typeof p=="function"&&(p=p(s,s.state,s.context)),p==null||typeof p=="function")continue;const y=typeof s[d]=="function"&&(b.CSS_PROPS_REGISTRY[d]||b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(d));o(d,p,y)}continue}if(yt(f,s)){const d=Z(r,s,!0);Object.keys(d).length&&(c[`[data-theme="${f.slice(1)}"] &`]=d);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(f)){(0,nt.isLoudDevRuntime)()&&io(f,s);continue}let a=f;if(f.charCodeAt(0)===64&&!f.startsWith("@media")&&!f.startsWith("@keyframes")){const d=s.context?.designSystem?.media?.[f.slice(1)];d&&(a=`@media ${d}`)}const u=Z(r,s,!1);Object.keys(u).length&&(c[a]=u);continue}const e=typeof s[f]=="function"&&(b.CSS_PROPS_REGISTRY[f]||b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(f));o(f,r,e)}if(n)for(const f in c)i.add(f);for(const f of i){const r=c[f];typeof r=="string"&&!r.includes("!important")&&(c[f]=r+" !important")}return c}function ht(t,s){if(s===void 0&&(s=0),s>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&ht(t[n],s+1))return!0}return!1}function Lt(t,s,n){if(!s||typeof s!="object"||Array.isArray(s))return null;if(yt(t,n)){const o=Z(s,n,!0);return Object.keys(o).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:o}:null}let c=t;if(t.charAt(0)==="@"&&!t.startsWith("@media")&&!t.startsWith("@keyframes")){const o=n.context?.designSystem?.media?.[t.slice(1)];o&&(c=`@media ${o}`)}const i=Z(s,n,!1);return Object.keys(i).length?{cssProp:c,block:i}:null}function eo(t){const s=t.__ref;for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!ut(n))continue;const c=t[n];if(!c||typeof c!="object"||Array.isArray(c)||!ht(c))continue;let i=null,o;const f=(0,v.createEffect)(()=>{if(!t.node)return;const r=t.context?.designSystem;r&&(0,A.pushConfig)(r);let e,a=!1;try{const u=Lt(n,c,t),d=u?pt(u.block)+"::"+u.cssProp:null;if(d!==null&&d===o)a=!0;else if(o=d,u){const p=(0,U.css)({[u.cssProp]:u.block},null,t.context?.cssPrefix);e=p?p.split(" ").filter(Boolean):null}else e=null}finally{r&&(0,A.popConfig)()}if(!(a||!t.node.classList)){if(i)for(const u of i)t.node.classList.remove(u);if(e&&e.length)for(const u of e)t.node.classList.add(u);i=e}},{depth:s.path.length});s.__effects.push(f)}}function fo(t){const s=t.__ref;s.__conditionalRunners=[];const n=new Map;for(const c in t){if(!Object.prototype.hasOwnProperty.call(t,c))continue;const i=c.charAt(0);if(i!=="."&&i!=="!")continue;const o=c.slice(1);if(!o)continue;if(/[:@\s>~+[\]]/.test(o)){if(typeof console<"u"&&console.warn){const d=o.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${c}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${i}\` is read as one prop name. Nest the selector inside instead: \`${i}${d}: { '${o.slice(d.length)}': {...} }\`.`)}continue}const f=t[c];if(!f||typeof f!="object")continue;const r=i==="!",e={lastMatch:!1,appliedKeys:null,appliedClasses:null},a=()=>{let d;const p=t[o];if(p===void 0){const l=!!t.state&&o in t.state,h=t.state?t.state[o]:void 0;if(l||h!==void 0)d=h;else{const g=t.context?.cases?.[o];if(g===void 0)return;try{d=typeof g=="function"?g.call(t,t):g}catch(k){d=!1,s.__conditionalError=k,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${c}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,k?.message||k)}}}else if(typeof p=="function")try{d=p(t,t.state,t.context)}catch(l){d=!1,s.__conditionalError=l,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${c}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,l?.message||l)}else d=p;const y=r?!d:!!d;if(!t.node||y===e.lastMatch)return;e.lastMatch=y;const _=t.context?.designSystem;_&&(0,A.pushConfig)(_);try{if(y){const l={},h={};let g=!1;for(const x in f){if(!Object.prototype.hasOwnProperty.call(f,x))continue;const E=f[x],w=x.charAt(0);if((w===":"||w==="@"||w==="&")&&E&&typeof E=="object"&&!Array.isArray(E)){if(yt(x,t)){const D=Z(E,t,!0);Object.keys(D).length&&(h[`[data-theme="${x.slice(1)}"] &`]=D,g=!0)}else{let D=x;if(w==="@"&&!x.startsWith("@media")&&!x.startsWith("@keyframes")){const V=t.context?.designSystem?.media?.[x.slice(1)];V&&(D=`@media ${V}`)}const H=Z(E,t,!1);Object.keys(H).length&&(h[D]=H,g=!0)}continue}const j=typeof E=="function"?E(t,t.state,t.context):E;if(j!=null)if(b.CSS_PROPS_REGISTRY[x]){const D=b.CSS_PROPS_REGISTRY[x](j,t,t.state,t.context);if(D){const H=Array.isArray(D)?D:[D];for(const V of H)V&&Object.assign(l,V)}}else b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(x)&&(l[x]=j)}const k=Object.keys(l);if(k.length){G(t.node,l);for(const x of k)n.set(x,c);e.appliedKeys=k}else e.appliedKeys=null;if(g){const x=(0,U.css)(h,null,t.context?.cssPrefix),E=x?x.split(" ").filter(Boolean):[];if(E.length&&t.node.classList){for(const w of E)t.node.classList.add(w);e.appliedClasses=E}else e.appliedClasses=null}else if(e.appliedClasses){for(const x of e.appliedClasses)t.node.classList.remove(x);e.appliedClasses=null}}else{if(e.appliedKeys){for(const l of e.appliedKeys)n.get(l)===c&&(t.node.style[l]="",n.delete(l));e.appliedKeys=null}if(e.appliedClasses){for(const l of e.appliedClasses)t.node.classList.remove(l);e.appliedClasses=null}}}finally{_&&(0,A.popConfig)()}};s.__conditionalRunners.push(a);const u=(0,v.createEffect)(a,{depth:s.path.length});s.__effects.push(u)}}const _t=new WeakSet;function ao(t){const s=t.ownerDocument;!s||_t.has(s)||(_t.add(s),queueMicrotask(()=>{_t.delete(s);const n=s.body||s.documentElement;n&&n.offsetWidth}))}const gt=new WeakSet;let $t=!1;function uo(t){const{node:s}=t;if(!s)return;if($t||($t=!0,(0,U.css)({display:"none"})),gt.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}gt.add(t);const n=t.context?.designSystem;n&&(0,A.pushConfig)(n);try{const c={};let i=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&b.CSS_PROPS_REGISTRY.theme){const o=b.CSS_PROPS_REGISTRY.theme(t.theme,t,t.state,t.context);if(o){if(Array.isArray(o))for(const f of o)f&&Object.assign(c,f);else Object.assign(c,o);i=!0}}for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||T.REGISTRY.has(o)||o==="theme")continue;const f=o.charCodeAt(0);if(!(f>=65&&f<=90)&&!Y(o)){if(b.CSS_PROPS_REGISTRY[o]){const r=t[o],e=b.CSS_PROPS_REGISTRY[o](r,t,t.state,t.context);if(e){if(Array.isArray(e))for(const a of e)a&&Object.assign(c,a);else Object.assign(c,e);i=!0}}else if(b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(o)){const r=t[o];r!=null&&typeof r!="object"&&(c[o]=r,i=!0)}else if(o.charCodeAt(0)===45){const r=t[o];r!=null&&typeof r!="object"&&(c[o]=r,i=!0)}else if(o.charAt(0)==="&"||o.charAt(0)==="@"||o.charAt(0)===":"){const r=t[o];if(r&&typeof r=="object"&&!Array.isArray(r)){if(ht(r))continue;const e=Lt(o,r,t);e&&(c[e.cssProp]=e.block,i=!0)}}}}if(i){c.display&&String(c.display).includes("!important")&&(s.style.setProperty("display",String(c.display).replace(/\s*!important\s*$/,""),"important"),delete c.display);const o=(0,U.css)(c,null,t.context?.cssPrefix);if(o&&s.classList){const r=o.split(" ").filter(Boolean);let e=!1;for(const a of r)s.classList.add(a),e||(a.charCodeAt(0)===95&&a.charCodeAt(1)===99||a.charCodeAt(0)===95&&a.indexOf("_c",1)!==-1)&&(e=!0);e&&ao(s)}const f=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(f!=null){const r=c.display;if(r&&r!==f)if(f==="none"){const e=[];for(const a of s.classList)a.startsWith("_d-")&&a!=="_d-none"&&e.push(a);for(const a of e)s.classList.remove(a);s.classList.add("_d-none")}else s.style.display=t.display}}}finally{n&&(0,A.popConfig)(),gt.delete(t)}}function Dt(t){const{node:s}=t;if(!s||!s.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const i in t.aria){const o=t.aria[i];if(typeof o=="function"||typeof o=="object"||o==null||o===!1)continue;const f="aria-"+i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase());s.setAttribute(f,o===!0?"":o)}const n=(0,$.applyAttrTransforms)(t);for(const i in n){const o=n[i];o!=null&&o!==!1&&typeof o!="function"&&typeof o!="object"&&s.setAttribute(i,o===!0?"":o)}const c=t.tag||"div";for(const i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||typeof t[i]=="function"||T.REGISTRY.has(i)||i==="on"||n[i]!==void 0)continue;const o=i.charCodeAt(0);if(!(o>=65&&o<=90)&&!Y(i)&&!(b.CSS_PROPS_REGISTRY[i]||b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(i))&&(0,$.checkAttributeByTagName)(c,i)){let f=t[i];if(f==null||(typeof f=="string"&&f.includes("{{")&&(f=(0,ct.replaceLiteralsWithObjectFields)(f,t,t.state,t.context),t[i]=f),f==null||typeof f=="function"||typeof f=="object")||f===!1&&!(0,$.isEnumeratedTrueFalseAttr)((0,$.camelToAttr)(i)||i))continue;const r=(0,$.camelToAttr)(i)||i;s.setAttribute(r,(0,$.serializeAttrValue)(r,f))}}}function lo(t){if(!t.autoGrow)return;const s=t.node;if(!s||s.tagName!=="TEXTAREA")return;const n=t.autoGrow,c=n&&typeof n=="object"&&n.max?String(n.max):null;c&&(s.style.maxHeight=c);const i=()=>{s.style.height="auto",s.style.height=s.scrollHeight+"px"};i(),s.addEventListener("input",i),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{s.removeEventListener("input",i)}catch{}})}const Rt=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Tt(t,s){for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!Y(n)||Rt.has(n))continue;let c=t[n];if(typeof c=="string"&&/^[A-Za-z_$][\w$]*$/.test(c)){const o=c;c=function(r){return t.call(o,r)}}if(typeof c!="function")continue;const i=qt(n);T.LIFECYCLE_EVENTS.has(i)||(0,Mt.registerEvent)(Qt(i),t,c)}po(t)}function po(t){const s=t.node;if(!s||!s.addEventListener)return;const n={};let c=!1;for(const p of Rt){const y=t[p];typeof y=="function"&&(n[p]=y,c=!0)}if(!c)return;const i=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,o=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let f=0,r=0,e=0,a=!1;const u=p=>{const y=p.touches&&p.touches[0]||p.changedTouches&&p.changedTouches[0];y&&(f=y.clientX,r=y.clientY,e=Date.now(),a=!0)},d=p=>{if(!a)return;a=!1;const y=p.changedTouches&&p.changedTouches[0]||p.touches&&p.touches[0];if(!y)return;const _=y.clientX-f,l=y.clientY-r,h=Date.now()-e;if(h>o)return;const g=Math.abs(_),k=Math.abs(l);if(Math.max(g,k)<i)return;let x;if(g>k*1.2)x=_<0?"left":"right";else if(k>g*1.2)x=l<0?"up":"down";else return;const E="onSwipe"+x.charAt(0).toUpperCase()+x.slice(1),w=n[E],j=n.onSwipe;w&&w.call(t,p,t,t.state,t.context),j&&j.call(t,{direction:x,dx:_,dy:l,dt:h,event:p},t,t.state,t.context)};s.addEventListener("touchstart",u,{passive:!0}),s.addEventListener("touchend",d,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{s.removeEventListener("touchstart",u)}catch{}try{s.removeEventListener("touchend",d)}catch{}})}function st(t,s){const n={...t};for(const c in s){const i=n[c],o=s[c];i&&o&&typeof i=="object"&&typeof o=="object"&&!Array.isArray(i)&&!Array.isArray(o)&&typeof i!="function"&&typeof o!="function"?n[c]=st(i,o):n[c]=o}return n}function bt(t,s,n){if(!s||!t.node)return;const c=t.childExtends;if(Array.isArray(s)){const i=t.tag==="fragment",o=t.context?.document||globalThis.document,f=i?null:o?.createDocumentFragment();if(!i&&!f)return;const r=t.childProps,e=t.childrenAs;for(let a=0;a<s.length;a++){let u=s[a];const d=u;(typeof u=="string"||typeof u=="number")&&(u={text:u});let p=r;if(typeof r=="function")try{p=r(t,u)}catch{p=null}if(e==="state"){let l=d;(typeof d=="string"||typeof d=="number")&&(l={value:d,text:d}),u=p?{...p,state:l}:{state:l}}else p&&(u=st(p,u));if(c&&!u.ignoreChildExtends)if(u.extends){const l=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(c)?c:[c];u={...u,extends:[...h,...l]}}else u={...u,extends:c};const y=u?.key||d&&typeof d=="object"&&d.key||`${a}`;let _;try{_=B(u,t,y,n)}catch(l){if(typeof console<"u"&&console.error){const h=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${y}" failed to construct at ${h} (initial render, skipping this row):`,l?.message||l)}continue}!i&&_?.node&&f.appendChild(_.node)}return i||t.node.appendChild(f),!0}if(typeof s=="string"){const i=wt(s,t);if(Array.isArray(i))return bt(t,i,n)}if(typeof s=="object")for(const i in s){if(T.REGISTRY.has(i))continue;let o=s[i];if(!(o==null||o===!1)){if((typeof o=="string"||typeof o=="number")&&(o={text:o}),t.childProps&&(o=st(t.childProps,o)),c&&!o.ignoreChildExtends)if(o.extends){const f=Array.isArray(o.extends)?o.extends:[o.extends],r=Array.isArray(c)?c:[c];o={...o,extends:[...r,...f]}}else o={...o,extends:c};B(o,t,i,n)}}}function xt(t,s){const n=t.node;if(!n||n.tagName!=="SELECT")return;const c=n.options;if(!c||!c.length)return;const i=t.__ref,o=i&&i.__exec&&i.__exec.value,f=typeof o=="function",r=t.value!=null&&typeof t.value!="function";if(f||r){let u;if(f)try{u=o(t,t.state,t.context)}catch{return}else u=t.value;const d=u==null?"":String(u);n.value!==d&&(n.value=d);return}const e=s||!(i&&i.__selectSynced);if(i&&(i.__selectSynced=!0),!e)return;let a=-1;for(let u=0;u<c.length;u++)c[u].defaultSelected&&(a=u);a>=0&&n.selectedIndex!==a&&(n.selectedIndex=a)}function Nt(t,s){let{children:n,content:c}=t;const i=t.childExtends;if(typeof n=="function"){const r=n;try{n=r(t,t.state,t.context)}catch(p){if(n=void 0,typeof console<"u"&&console.error){const y=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${y} (initial run, treating as empty):`,p?.message||p)}}t.children=n;const e=t.__ref;let a=!1;const u=L(t,t.childrenDeps,r),d=(0,v.createEffect)(()=>{const p=a;a=!0;let y;try{y=u(t,t.state,t.context)}catch(w){if(typeof console<"u"&&console.error){const j=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${j}${p?"":" (initial tracking run)"}:`,w?.message||w)}return}if(!p||y===t.children)return;t.children=y;const _=typeof t.onContentUpdate=="function",l=_?[]:null,h=_?[]:null,g=_?[]:null;if(Array.isArray(y)&&t.childrenAs==="state"){const w=t.childProps,j=[],D=new Map;for(let C=0;C<y.length;C++){const R=y[C];let S=w;if(typeof w=="function")try{S=w(t,R)}catch{S=null}const F=S&&S.key||R&&R.key||`${C}`;j.push(F),D.set(F,{rawChild:R,childProps:S})}const H=new Set(j),V=e.__children.slice();for(const C of V)if(!H.has(C)){const R=t[C];R?.remove&&R.remove(),delete t[C],h&&h.push(C)}const Q=t.childExtends,tt=t.tag==="fragment",Ut=t.context?.document||globalThis.document,X=tt?null:Ut?.createDocumentFragment(),rt=new Set;for(const C of j){const R=D.get(C),S=R.rawChild,F=t[C];if(F&&F.state){if(S&&typeof S=="object"){const O=F.state,z=O.$replace||O.replace,Ct=O.$update||O.update;if(typeof z=="function")z.call(O,S);else if(typeof Ct=="function"){for(const M in O)if(!(M==="__element"||M==="root"||M==="parent"||M==="update")&&!Object.prototype.hasOwnProperty.call(S,M))try{O[M]=void 0}catch{}Ct.call(O,S)}else for(const M in S)O[M]=S[M]}g&&g.push(C);continue}let it=S;(typeof S=="string"||typeof S=="number")&&(it={value:S,text:S});const kt=R.childProps;let N=kt?{...kt,state:it}:{state:it};if(Q&&!N.ignoreChildExtends)if(N.extends){const O=Array.isArray(N.extends)?N.extends:[N.extends],z=Array.isArray(Q)?Q:[Q];N={...N,extends:[...z,...O]}}else N={...N,extends:Q};let et;try{et=B(N,t,C,s)}catch(O){if(typeof console<"u"&&console.error){const z=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${C}" failed to construct at ${z} (reconcile, skipping this row):`,O?.message||O)}rt.add(C);continue}!tt&&et?.node&&X&&X.appendChild(et.node),l&&l.push(C)}if(!tt&&X&&X.childNodes.length&&t.node&&t.node.appendChild(X),!tt&&t.node){let C=null;for(const R of j){const S=t[R]?.node;if(!S)continue;const F=C?C.nextSibling:t.node.firstChild;S!==F&&t.node.insertBefore(S,F),C=S}}e.__children=rt.size?j.filter(C=>!rt.has(C)):j,_&&(l.length||h.length)&&vt(t,{added:l,removed:h,kept:g}),xt(t,!1);return}const E=_?[...e.__children]:null;for(const w of[...e.__children]){const j=t[w];j?.remove&&j.remove(),delete t[w]}e.__children=[],bt(t,y,s),xt(t,!1),_&&vt(t,{added:[...e.__children],removed:E,kept:[]})},{depth:e.path.length});e.__effects.push(d)}const o=bt(t,n||c,s);if((n||c)&&!o)return;const f=t.context?.components||{};{const r=Object.keys(t);for(let e=0;e<r.length;e++){const a=r[e];if(!a.endsWith("Extends")||typeof t[a]!="string")continue;const u=a.slice(0,-7);if(!u||u.charCodeAt(0)<65||u.charCodeAt(0)>90)continue;const d={extends:t[a]};delete t[a];for(let p=e+1;p<r.length;p++){const y=r[p],_=y.charCodeAt(0);if(_>=65&&_<=90||T.REGISTRY.has(y)||typeof t[y]=="function"&&(y.startsWith("on")||y.startsWith(".")))break;const l=t[y];l!==void 0&&(d[y]=l,delete t[y])}t[u]&&typeof t[u]=="object"?t[u]={...d,...t[u]}:t[u]=d}}for(const r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||T.REGISTRY.has(r)||typeof t[r]!="object"||t[r]===null)continue;const e=r.charCodeAt(0);if(e<65||e>90)continue;let a=t[r];if(!a.__ref){if(!a.extends&&!a.extend){const u=f[r]||f[`smbls.${r}`];u&&(a={...a,extends:u})}if(t.childProps&&(a=st(t.childProps,a)),i&&!a.ignoreChildExtends)if(a.extends){const u=Array.isArray(a.extends)?a.extends:[a.extends],d=Array.isArray(i)?i:[i];a={...a,extends:[...d,...u]}}else a={...a,extends:i};B(a,t,r,s)}}}function Ft(t,s,n){const{node:c}=t;if(!c)return;c.ref=t;const i=s?.tag==="fragment"?s.__ref?.__fragmentAnchor:null;if(i){const f=i.parentNode;if(f){if(n?.position==="before"&&n.node)f.insertBefore(c,n.node);else if(n?.position==="after"&&n.node){const r=n.node.nextSibling;f.insertBefore(c,r||i)}else f.insertBefore(c,i);return}}const o=s?.node||(s?.nodeType?s:null);if(o)if(n?.position==="before"&&n.node)o.insertBefore(c,n.node);else if(n?.position==="after"&&n.node){const f=n.node.nextSibling;f?o.insertBefore(c,f):o.appendChild(c)}else o.appendChild(c)}function I(t,s,n){const c=t.charAt(0).toLowerCase()+t.slice(1);s.context?.plugins?.length&&(0,K.runPluginHook)(c,s,n);const i="on"+t,o=s[i];if(typeof o=="function"){const f=t==="Render"||t==="RenderRouter";if(f){if(s.__ref.__inRender)return!0;s.__ref.__inRender=!0}const r=s.context?.designSystem;r&&(0,A.pushConfig)(r);try{if(o(s,s.state,s.context,n)===!1)return!1}catch(e){if(s.context?.plugins?.length&&(0,K.runPluginHook)("error",s,{hook:i,error:e})||console.error(`[DOMQL] Lifecycle "${i}" error:`,e),s.context?.strictMode)throw e}finally{r&&(0,A.popConfig)(),f&&(s.__ref.__inRender=!1)}}return!0}var yo=B;
6
+ `),d&&(o+=d)}}o&&(i.textContent+=o)}function ro(t){let s=t.subscribeTo;if(typeof s=="function")try{s=s(t,t.state,t.context)}catch{s=null}if(!Array.isArray(s)||s.length===0)return;const n=t.__ref;for(let c=0;c<s.length;c++){const i=s[c];if(typeof i!="string"||i.length===0)continue;const o=i.split("."),f=o[0],r=o.slice(1),e={value:!1},a=(0,v.createEffect)(()=>{const u=t.state&&((0,P.isStore)(t.state)?t.state.root:null);if(!u||!(0,P.isStore)(u))return;let d=u;d=d[f];for(let y=0;y<r.length&&!(d==null||typeof d!="object");y++)if((0,P.isStore)(d))d=d[r[y]];else break;if(!e.value)return;let p=!1;if(typeof t.onBeforeUpdate=="function"){const y=t.context?.designSystem;y&&(0,A.pushConfig)(y);try{t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0})===!1&&(p=!0)}catch(_){t.context?.plugins?.length&&(0,K.runPluginHook)("error",t,{hook:"onBeforeUpdate",error:_})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",_)}finally{y&&(0,A.popConfig)()}}if(!p&&t.node&&n.__effects)for(let y=0;y<n.__effects.length;y++){const _=n.__effects[y];_&&_!==a&&!_._disposed&&!_._isSubscribeToEffect&&typeof _._execute=="function"&&_._execute()}if(!p&&typeof t.onUpdate=="function"){const y=t.context?.designSystem;y&&(0,A.pushConfig)(y);try{t.onUpdate(t,t.state,t.context)}catch(_){t.context?.plugins?.length&&(0,K.runPluginHook)("error",t,{hook:"onUpdate",error:_})||console.error("[DOMQL] subscribeTo onUpdate error:",_)}finally{y&&(0,A.popConfig)()}}},{depth:n.path.length});e.value=!0,a._isSubscribeToEffect=!0,n.__effects.push(a)}}function yt(t,s){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!s.context?.designSystem?.media?.[t.slice(1)])}const Ot=new Set;function io(t,s){const n=s?.__ref?.path?s.__ref.path.join("."):s?.key||"?",c=n+"::"+t;Ot.has(c)||(Ot.add(c),console.warn(`[smbls/css] "${t}" at ${n} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function Z(t,s,n){const c={},i=new Set,o=(f,r,e)=>{const a=e?new Set(Object.keys(c)):null;if(b.CSS_PROPS_REGISTRY[f]){const u=b.CSS_PROPS_REGISTRY[f](r,s,s.state,s.context);if(u){const d=Array.isArray(u)?u:[u];for(const p of d)p&&Object.assign(c,p)}}else c[f]=r;if(e)for(const u in c)a.has(u)||i.add(u)};for(const f in t){if(!Object.prototype.hasOwnProperty.call(t,f))continue;let r=t[f];if(typeof r=="function"&&(r=r(s,s.state,s.context)),r==null||typeof r=="function")continue;if(typeof r=="object"&&!Array.isArray(r)){if(f==="style"){for(const d in r){let p=r[d];if(typeof p=="function"&&(p=p(s,s.state,s.context)),p==null||typeof p=="function")continue;const y=typeof s[d]=="function"&&(b.CSS_PROPS_REGISTRY[d]||b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(d));o(d,p,y)}continue}if(yt(f,s)){const d=Z(r,s,!1);Object.keys(d).length&&(c[`[data-theme="${f.slice(1)}"] &`]=d);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(f)){(0,nt.isLoudDevRuntime)()&&io(f,s);continue}let a=f;if(f.charCodeAt(0)===64&&!f.startsWith("@media")&&!f.startsWith("@keyframes")){const d=s.context?.designSystem?.media?.[f.slice(1)];d&&(a=`@media ${d}`)}const u=Z(r,s,!1);Object.keys(u).length&&(c[a]=u);continue}const e=typeof s[f]=="function"&&(b.CSS_PROPS_REGISTRY[f]||b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(f));o(f,r,e)}if(n)for(const f in c)i.add(f);for(const f of i){const r=c[f];typeof r=="string"&&!r.includes("!important")&&(c[f]=r+" !important")}return c}function ht(t,s){if(s===void 0&&(s=0),s>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&ht(t[n],s+1))return!0}return!1}function Lt(t,s,n){if(!s||typeof s!="object"||Array.isArray(s))return null;if(yt(t,n)){const o=Z(s,n,!1);return Object.keys(o).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:o}:null}let c=t;if(t.charAt(0)==="@"&&!t.startsWith("@media")&&!t.startsWith("@keyframes")){const o=n.context?.designSystem?.media?.[t.slice(1)];o&&(c=`@media ${o}`)}const i=Z(s,n,!1);return Object.keys(i).length?{cssProp:c,block:i}:null}function eo(t){const s=t.__ref;for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!ut(n))continue;const c=t[n];if(!c||typeof c!="object"||Array.isArray(c)||!ht(c))continue;let i=null,o;const f=(0,v.createEffect)(()=>{if(!t.node)return;const r=t.context?.designSystem;r&&(0,A.pushConfig)(r);let e,a=!1;try{const u=Lt(n,c,t),d=u?pt(u.block)+"::"+u.cssProp:null;if(d!==null&&d===o)a=!0;else if(o=d,u){const p=(0,U.css)({[u.cssProp]:u.block},null,t.context?.cssPrefix);e=p?p.split(" ").filter(Boolean):null}else e=null}finally{r&&(0,A.popConfig)()}if(!(a||!t.node.classList)){if(i)for(const u of i)t.node.classList.remove(u);if(e&&e.length)for(const u of e)t.node.classList.add(u);i=e}},{depth:s.path.length});s.__effects.push(f)}}function fo(t){const s=t.__ref;s.__conditionalRunners=[];const n=new Map;for(const c in t){if(!Object.prototype.hasOwnProperty.call(t,c))continue;const i=c.charAt(0);if(i!=="."&&i!=="!")continue;const o=c.slice(1);if(!o)continue;if(/[:@\s>~+[\]]/.test(o)){if(typeof console<"u"&&console.warn){const d=o.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${c}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${i}\` is read as one prop name. Nest the selector inside instead: \`${i}${d}: { '${o.slice(d.length)}': {...} }\`.`)}continue}const f=t[c];if(!f||typeof f!="object")continue;const r=i==="!",e={lastMatch:!1,appliedKeys:null,appliedClasses:null},a=()=>{let d;const p=t[o];if(p===void 0){const l=!!t.state&&o in t.state,h=t.state?t.state[o]:void 0;if(l||h!==void 0)d=h;else{const g=t.context?.cases?.[o];if(g===void 0)return;try{d=typeof g=="function"?g.call(t,t):g}catch(k){d=!1,s.__conditionalError=k,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${c}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,k?.message||k)}}}else if(typeof p=="function")try{d=p(t,t.state,t.context)}catch(l){d=!1,s.__conditionalError=l,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${c}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,l?.message||l)}else d=p;const y=r?!d:!!d;if(!t.node||y===e.lastMatch)return;e.lastMatch=y;const _=t.context?.designSystem;_&&(0,A.pushConfig)(_);try{if(y){const l={},h={};let g=!1;for(const x in f){if(!Object.prototype.hasOwnProperty.call(f,x))continue;const E=f[x],w=x.charAt(0);if((w===":"||w==="@"||w==="&")&&E&&typeof E=="object"&&!Array.isArray(E)){if(yt(x,t)){const D=Z(E,t,!1);Object.keys(D).length&&(h[`[data-theme="${x.slice(1)}"] &`]=D,g=!0)}else{let D=x;if(w==="@"&&!x.startsWith("@media")&&!x.startsWith("@keyframes")){const V=t.context?.designSystem?.media?.[x.slice(1)];V&&(D=`@media ${V}`)}const H=Z(E,t,!1);Object.keys(H).length&&(h[D]=H,g=!0)}continue}const j=typeof E=="function"?E(t,t.state,t.context):E;if(j!=null)if(b.CSS_PROPS_REGISTRY[x]){const D=b.CSS_PROPS_REGISTRY[x](j,t,t.state,t.context);if(D){const H=Array.isArray(D)?D:[D];for(const V of H)V&&Object.assign(l,V)}}else b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(x)&&(l[x]=j)}const k=Object.keys(l);if(k.length){G(t.node,l);for(const x of k)n.set(x,c);e.appliedKeys=k}else e.appliedKeys=null;if(g){const x=(0,U.css)(h,null,t.context?.cssPrefix),E=x?x.split(" ").filter(Boolean):[];if(E.length&&t.node.classList){for(const w of E)t.node.classList.add(w);e.appliedClasses=E}else e.appliedClasses=null}else if(e.appliedClasses){for(const x of e.appliedClasses)t.node.classList.remove(x);e.appliedClasses=null}}else{if(e.appliedKeys){for(const l of e.appliedKeys)n.get(l)===c&&(t.node.style[l]="",n.delete(l));e.appliedKeys=null}if(e.appliedClasses){for(const l of e.appliedClasses)t.node.classList.remove(l);e.appliedClasses=null}}}finally{_&&(0,A.popConfig)()}};s.__conditionalRunners.push(a);const u=(0,v.createEffect)(a,{depth:s.path.length});s.__effects.push(u)}}const _t=new WeakSet;function ao(t){const s=t.ownerDocument;!s||_t.has(s)||(_t.add(s),queueMicrotask(()=>{_t.delete(s);const n=s.body||s.documentElement;n&&n.offsetWidth}))}const gt=new WeakSet;let $t=!1;function uo(t){const{node:s}=t;if(!s)return;if($t||($t=!0,(0,U.css)({display:"none"})),gt.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}gt.add(t);const n=t.context?.designSystem;n&&(0,A.pushConfig)(n);try{const c={};let i=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&b.CSS_PROPS_REGISTRY.theme){const o=b.CSS_PROPS_REGISTRY.theme(t.theme,t,t.state,t.context);if(o){if(Array.isArray(o))for(const f of o)f&&Object.assign(c,f);else Object.assign(c,o);i=!0}}for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||T.REGISTRY.has(o)||o==="theme")continue;const f=o.charCodeAt(0);if(!(f>=65&&f<=90)&&!Y(o)){if(b.CSS_PROPS_REGISTRY[o]){const r=t[o],e=b.CSS_PROPS_REGISTRY[o](r,t,t.state,t.context);if(e){if(Array.isArray(e))for(const a of e)a&&Object.assign(c,a);else Object.assign(c,e);i=!0}}else if(b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(o)){const r=t[o];r!=null&&typeof r!="object"&&(c[o]=r,i=!0)}else if(o.charCodeAt(0)===45){const r=t[o];r!=null&&typeof r!="object"&&(c[o]=r,i=!0)}else if(o.charAt(0)==="&"||o.charAt(0)==="@"||o.charAt(0)===":"){const r=t[o];if(r&&typeof r=="object"&&!Array.isArray(r)){if(ht(r))continue;const e=Lt(o,r,t);e&&(c[e.cssProp]=e.block,i=!0)}}}}if(i){c.display&&String(c.display).includes("!important")&&(s.style.setProperty("display",String(c.display).replace(/\s*!important\s*$/,""),"important"),delete c.display);const o=(0,U.css)(c,null,t.context?.cssPrefix);if(o&&s.classList){const r=o.split(" ").filter(Boolean);let e=!1;for(const a of r)s.classList.add(a),e||(a.charCodeAt(0)===95&&a.charCodeAt(1)===99||a.charCodeAt(0)===95&&a.indexOf("_c",1)!==-1)&&(e=!0);e&&ao(s)}const f=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(f!=null){const r=c.display;if(r&&r!==f)if(f==="none"){const e=[];for(const a of s.classList)a.startsWith("_d-")&&a!=="_d-none"&&e.push(a);for(const a of e)s.classList.remove(a);s.classList.add("_d-none")}else s.style.display=t.display}}}finally{n&&(0,A.popConfig)(),gt.delete(t)}}function Dt(t){const{node:s}=t;if(!s||!s.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const i in t.aria){const o=t.aria[i];if(typeof o=="function"||typeof o=="object"||o==null||o===!1)continue;const f="aria-"+i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase());s.setAttribute(f,o===!0?"":o)}const n=(0,$.applyAttrTransforms)(t);for(const i in n){const o=n[i];o!=null&&o!==!1&&typeof o!="function"&&typeof o!="object"&&s.setAttribute(i,o===!0?"":o)}const c=t.tag||"div";for(const i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||typeof t[i]=="function"||T.REGISTRY.has(i)||i==="on"||n[i]!==void 0)continue;const o=i.charCodeAt(0);if(!(o>=65&&o<=90)&&!Y(i)&&!(b.CSS_PROPS_REGISTRY[i]||b.DEFAULT_CSS_PROPERTIES_LIST&&b.DEFAULT_CSS_PROPERTIES_LIST.has(i))&&(0,$.checkAttributeByTagName)(c,i)){let f=t[i];if(f==null||(typeof f=="string"&&f.includes("{{")&&(f=(0,ct.replaceLiteralsWithObjectFields)(f,t,t.state,t.context),t[i]=f),f==null||typeof f=="function"||typeof f=="object")||f===!1&&!(0,$.isEnumeratedTrueFalseAttr)((0,$.camelToAttr)(i)||i))continue;const r=(0,$.camelToAttr)(i)||i;s.setAttribute(r,(0,$.serializeAttrValue)(r,f))}}}function lo(t){if(!t.autoGrow)return;const s=t.node;if(!s||s.tagName!=="TEXTAREA")return;const n=t.autoGrow,c=n&&typeof n=="object"&&n.max?String(n.max):null;c&&(s.style.maxHeight=c);const i=()=>{s.style.height="auto",s.style.height=s.scrollHeight+"px"};i(),s.addEventListener("input",i),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{s.removeEventListener("input",i)}catch{}})}const Rt=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Tt(t,s){for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!Y(n)||Rt.has(n))continue;let c=t[n];if(typeof c=="string"&&/^[A-Za-z_$][\w$]*$/.test(c)){const o=c;c=function(r){return t.call(o,r)}}if(typeof c!="function")continue;const i=qt(n);T.LIFECYCLE_EVENTS.has(i)||(0,Mt.registerEvent)(Qt(i),t,c)}po(t)}function po(t){const s=t.node;if(!s||!s.addEventListener)return;const n={};let c=!1;for(const p of Rt){const y=t[p];typeof y=="function"&&(n[p]=y,c=!0)}if(!c)return;const i=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,o=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let f=0,r=0,e=0,a=!1;const u=p=>{const y=p.touches&&p.touches[0]||p.changedTouches&&p.changedTouches[0];y&&(f=y.clientX,r=y.clientY,e=Date.now(),a=!0)},d=p=>{if(!a)return;a=!1;const y=p.changedTouches&&p.changedTouches[0]||p.touches&&p.touches[0];if(!y)return;const _=y.clientX-f,l=y.clientY-r,h=Date.now()-e;if(h>o)return;const g=Math.abs(_),k=Math.abs(l);if(Math.max(g,k)<i)return;let x;if(g>k*1.2)x=_<0?"left":"right";else if(k>g*1.2)x=l<0?"up":"down";else return;const E="onSwipe"+x.charAt(0).toUpperCase()+x.slice(1),w=n[E],j=n.onSwipe;w&&w.call(t,p,t,t.state,t.context),j&&j.call(t,{direction:x,dx:_,dy:l,dt:h,event:p},t,t.state,t.context)};s.addEventListener("touchstart",u,{passive:!0}),s.addEventListener("touchend",d,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{s.removeEventListener("touchstart",u)}catch{}try{s.removeEventListener("touchend",d)}catch{}})}function st(t,s){const n={...t};for(const c in s){const i=n[c],o=s[c];i&&o&&typeof i=="object"&&typeof o=="object"&&!Array.isArray(i)&&!Array.isArray(o)&&typeof i!="function"&&typeof o!="function"?n[c]=st(i,o):n[c]=o}return n}function bt(t,s,n){if(!s||!t.node)return;const c=t.childExtends;if(Array.isArray(s)){const i=t.tag==="fragment",o=t.context?.document||globalThis.document,f=i?null:o?.createDocumentFragment();if(!i&&!f)return;const r=t.childProps,e=t.childrenAs;for(let a=0;a<s.length;a++){let u=s[a];const d=u;(typeof u=="string"||typeof u=="number")&&(u={text:u});let p=r;if(typeof r=="function")try{p=r(t,u)}catch{p=null}if(e==="state"){let l=d;(typeof d=="string"||typeof d=="number")&&(l={value:d,text:d}),u=p?{...p,state:l}:{state:l}}else p&&(u=st(p,u));if(c&&!u.ignoreChildExtends)if(u.extends){const l=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(c)?c:[c];u={...u,extends:[...h,...l]}}else u={...u,extends:c};const y=u?.key||d&&typeof d=="object"&&d.key||`${a}`;let _;try{_=B(u,t,y,n)}catch(l){if(typeof console<"u"&&console.error){const h=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${y}" failed to construct at ${h} (initial render, skipping this row):`,l?.message||l)}continue}!i&&_?.node&&f.appendChild(_.node)}return i||t.node.appendChild(f),!0}if(typeof s=="string"){const i=wt(s,t);if(Array.isArray(i))return bt(t,i,n)}if(typeof s=="object")for(const i in s){if(T.REGISTRY.has(i))continue;let o=s[i];if(!(o==null||o===!1)){if((typeof o=="string"||typeof o=="number")&&(o={text:o}),t.childProps&&(o=st(t.childProps,o)),c&&!o.ignoreChildExtends)if(o.extends){const f=Array.isArray(o.extends)?o.extends:[o.extends],r=Array.isArray(c)?c:[c];o={...o,extends:[...r,...f]}}else o={...o,extends:c};B(o,t,i,n)}}}function xt(t,s){const n=t.node;if(!n||n.tagName!=="SELECT")return;const c=n.options;if(!c||!c.length)return;const i=t.__ref,o=i&&i.__exec&&i.__exec.value,f=typeof o=="function",r=t.value!=null&&typeof t.value!="function";if(f||r){let u;if(f)try{u=o(t,t.state,t.context)}catch{return}else u=t.value;const d=u==null?"":String(u);n.value!==d&&(n.value=d);return}const e=s||!(i&&i.__selectSynced);if(i&&(i.__selectSynced=!0),!e)return;let a=-1;for(let u=0;u<c.length;u++)c[u].defaultSelected&&(a=u);a>=0&&n.selectedIndex!==a&&(n.selectedIndex=a)}function Nt(t,s){let{children:n,content:c}=t;const i=t.childExtends;if(typeof n=="function"){const r=n;try{n=r(t,t.state,t.context)}catch(p){if(n=void 0,typeof console<"u"&&console.error){const y=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${y} (initial run, treating as empty):`,p?.message||p)}}t.children=n;const e=t.__ref;let a=!1;const u=L(t,t.childrenDeps,r),d=(0,v.createEffect)(()=>{const p=a;a=!0;let y;try{y=u(t,t.state,t.context)}catch(w){if(typeof console<"u"&&console.error){const j=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${j}${p?"":" (initial tracking run)"}:`,w?.message||w)}return}if(!p||y===t.children)return;t.children=y;const _=typeof t.onContentUpdate=="function",l=_?[]:null,h=_?[]:null,g=_?[]:null;if(Array.isArray(y)&&t.childrenAs==="state"){const w=t.childProps,j=[],D=new Map;for(let C=0;C<y.length;C++){const R=y[C];let S=w;if(typeof w=="function")try{S=w(t,R)}catch{S=null}const F=S&&S.key||R&&R.key||`${C}`;j.push(F),D.set(F,{rawChild:R,childProps:S})}const H=new Set(j),V=e.__children.slice();for(const C of V)if(!H.has(C)){const R=t[C];R?.remove&&R.remove(),delete t[C],h&&h.push(C)}const Q=t.childExtends,tt=t.tag==="fragment",Ut=t.context?.document||globalThis.document,X=tt?null:Ut?.createDocumentFragment(),rt=new Set;for(const C of j){const R=D.get(C),S=R.rawChild,F=t[C];if(F&&F.state){if(S&&typeof S=="object"){const O=F.state,z=O.$replace||O.replace,Ct=O.$update||O.update;if(typeof z=="function")z.call(O,S);else if(typeof Ct=="function"){for(const M in O)if(!(M==="__element"||M==="root"||M==="parent"||M==="update")&&!Object.prototype.hasOwnProperty.call(S,M))try{O[M]=void 0}catch{}Ct.call(O,S)}else for(const M in S)O[M]=S[M]}g&&g.push(C);continue}let it=S;(typeof S=="string"||typeof S=="number")&&(it={value:S,text:S});const kt=R.childProps;let N=kt?{...kt,state:it}:{state:it};if(Q&&!N.ignoreChildExtends)if(N.extends){const O=Array.isArray(N.extends)?N.extends:[N.extends],z=Array.isArray(Q)?Q:[Q];N={...N,extends:[...z,...O]}}else N={...N,extends:Q};let et;try{et=B(N,t,C,s)}catch(O){if(typeof console<"u"&&console.error){const z=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${C}" failed to construct at ${z} (reconcile, skipping this row):`,O?.message||O)}rt.add(C);continue}!tt&&et?.node&&X&&X.appendChild(et.node),l&&l.push(C)}if(!tt&&X&&X.childNodes.length&&t.node&&t.node.appendChild(X),!tt&&t.node){let C=null;for(const R of j){const S=t[R]?.node;if(!S)continue;const F=C?C.nextSibling:t.node.firstChild;S!==F&&t.node.insertBefore(S,F),C=S}}e.__children=rt.size?j.filter(C=>!rt.has(C)):j,_&&(l.length||h.length)&&vt(t,{added:l,removed:h,kept:g}),xt(t,!1);return}const E=_?[...e.__children]:null;for(const w of[...e.__children]){const j=t[w];j?.remove&&j.remove(),delete t[w]}e.__children=[],bt(t,y,s),xt(t,!1),_&&vt(t,{added:[...e.__children],removed:E,kept:[]})},{depth:e.path.length});e.__effects.push(d)}const o=bt(t,n||c,s);if((n||c)&&!o)return;const f=t.context?.components||{};{const r=Object.keys(t);for(let e=0;e<r.length;e++){const a=r[e];if(!a.endsWith("Extends")||typeof t[a]!="string")continue;const u=a.slice(0,-7);if(!u||u.charCodeAt(0)<65||u.charCodeAt(0)>90)continue;const d={extends:t[a]};delete t[a];for(let p=e+1;p<r.length;p++){const y=r[p],_=y.charCodeAt(0);if(_>=65&&_<=90||T.REGISTRY.has(y)||typeof t[y]=="function"&&(y.startsWith("on")||y.startsWith(".")))break;const l=t[y];l!==void 0&&(d[y]=l,delete t[y])}t[u]&&typeof t[u]=="object"?t[u]={...d,...t[u]}:t[u]=d}}for(const r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||T.REGISTRY.has(r)||typeof t[r]!="object"||t[r]===null)continue;const e=r.charCodeAt(0);if(e<65||e>90)continue;let a=t[r];if(!a.__ref){if(!a.extends&&!a.extend){const u=f[r]||f[`smbls.${r}`];u&&(a={...a,extends:u})}if(t.childProps&&(a=st(t.childProps,a)),i&&!a.ignoreChildExtends)if(a.extends){const u=Array.isArray(a.extends)?a.extends:[a.extends],d=Array.isArray(i)?i:[i];a={...a,extends:[...d,...u]}}else a={...a,extends:i};B(a,t,r,s)}}}function Ft(t,s,n){const{node:c}=t;if(!c)return;c.ref=t;const i=s?.tag==="fragment"?s.__ref?.__fragmentAnchor:null;if(i){const f=i.parentNode;if(f){if(n?.position==="before"&&n.node)f.insertBefore(c,n.node);else if(n?.position==="after"&&n.node){const r=n.node.nextSibling;f.insertBefore(c,r||i)}else f.insertBefore(c,i);return}}const o=s?.node||(s?.nodeType?s:null);if(o)if(n?.position==="before"&&n.node)o.insertBefore(c,n.node);else if(n?.position==="after"&&n.node){const f=n.node.nextSibling;f?o.insertBefore(c,f):o.appendChild(c)}else o.appendChild(c)}function I(t,s,n){const c=t.charAt(0).toLowerCase()+t.slice(1);s.context?.plugins?.length&&(0,K.runPluginHook)(c,s,n);const i="on"+t,o=s[i];if(typeof o=="function"){const f=t==="Render"||t==="RenderRouter";if(f){if(s.__ref.__inRender)return!0;s.__ref.__inRender=!0}const r=s.context?.designSystem;r&&(0,A.pushConfig)(r);try{if(o(s,s.state,s.context,n)===!1)return!1}catch(e){if(s.context?.plugins?.length&&(0,K.runPluginHook)("error",s,{hook:i,error:e})||console.error(`[DOMQL] Lifecycle "${i}" error:`,e),s.context?.strictMode)throw e}finally{r&&(0,A.popConfig)(),f&&(s.__ref.__inRender=!1)}}return!0}var yo=B;
@@ -3,4 +3,4 @@ import{createStore as it,createScopeStore as Wt,isStore as I}from"@symbo.ls/sign
3
3
  `).slice(0,6).join(`
4
4
  `):"")}}if(Ct(o,!0),Vt(o,s,f),typeof o.html=="function"&&o.node&&!o.node.innerHTML){const l=o.context?.designSystem;l&&O(l);try{const h=o.html(o,o.state,o.context);h!=null&&typeof h!="function"&&(o.node.innerHTML=h)}catch{}finally{l&&L()}}if(M("Create",o,c),M("Complete",o,c),M("Render",o,c),M("RenderRouter",o,c),Pt(o,c),typeof o.onFrame=="function"){const l=o.onFrame,h=o.context?.designSystem,g=()=>{if(o.node){if(o.node.isConnected){h&&O(h);try{l(o,o.state,o.context)}catch(x){console.error("[DOMQL] onFrame error:",x)}finally{h&&L()}}requestAnimationFrame(g)}};requestAnimationFrame(g)}return o}function oo(t,s,n){const c=!s,f=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,o=c&&f&&t.context?.state,e=n.state!==void 0&&!o?n.state:t.state&&!I(t.state)?t.state:void 0;if(e==null){if(s?.state)t.state=s.state,Q(t,t.state);else if(t.context?.state){const r=t.context.state,i={...r},a=t.context?.polyglot;if(a?.translations){const u=r.lang||a.defaultLang||"en",d=a.translations[u];if(d&&typeof d=="object")for(const y in d)i[y]===void 0&&(i[y]=d[y]);const p=new Set(a.languages||[]);for(const y in a.translations)!p.has(y)&&i[y]===void 0&&(i[y]=a.translations[y])}t.state=I(i)?i:it(i),t.state.__element=t,t.state.root=t.state,Q(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Q(t,t.state);return}if(typeof e=="string"){if(t.state=Lt(e,s),t.state&&typeof t.state=="object"&&!I(t.state)){const r=s?.state?.root||s?.state||t.state;Object.defineProperty(t.state,"root",{value:r,enumerable:!1,configurable:!0,writable:!0})}Q(t,t.state);return}if(typeof e=="function"){const r=e(t,s?.state);t.state=I(r)?r:it(r||{})}else I(e)?t.state=e:t.state=it({...e});t.state.__element=t,s?.state?(t.state.parent=s.state,t.state.root=s.state.root||s.state):t.state.root=t.state,Q(t,t.state)}function yt(t,s){if(!s)return t;const n=s.split("/");let c=t;for(const f of n){if(c==null)return{};c=c[f]}return c??{}}function Lt(t,s){if(!s)return{};if(t===".")return s.state||{};if(t.startsWith("../")){const f=t.slice(3);return f?yt(s.state,f):s.state??{}}if(t.startsWith("~/")){const f=s.state?.root||s.state,o=t.slice(2);return o?yt(f,o):f??{}}if(s.state?.[t]!==void 0)return s.state[t];const n=yt(s.state,t);if(n!=null&&Object.keys(n).length>0)return n;const c=s.context?.polyglot;if(c?.translations){const f=s.state?.root?.lang||c.defaultLang||"en",o=c.translations[f];if(o?.[t]!==void 0)return o[t];if(c.translations[t]!==void 0)return c.translations[t]}return{}}const so=new Set(["s","state","ctx","context"]);function no(t){try{const n=Function.prototype.toString.call(t).match(/^[^(]*\(([^)]*)\)/);return n?n[1].split(",").map(c=>c.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function co(t){if(typeof t!="function"||t.length!==2)return!1;const s=no(t);if(s.length<2)return!1;const n=s[1].replace(/[{}[\]]/g,"").trim();return n.length>0&&!so.has(n)}function ro(t){const s=t.__ref,n=t.tag||"div",c=t.context?.designSystem,f=[],o=Object.keys(t);for(let e=0;e<o.length;e++){const r=o[e];if(typeof t[r]!="function"||K.has(r))continue;const i=r.charCodeAt(0);i>=65&&i<=90||H(r)||E[r]||j&&j.has(r)||ut(n,r)||(ft()&&co(t[r])&&console.warn(`[smbls] custom prop "${r}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${r}', \u2026) instead of reading el.${r}(\u2026) directly (see RULES.md Rule 8).`),f.push({prop:r,fn:t[r]}))}for(let e=0;e<f.length;e++){const{prop:r,fn:i}=f[e];s.__exec[r]=i,Object.defineProperty(t,r,{get(){c&&O(c);try{return i(t,t.state,t.context)}catch{return}finally{c&&L()}},set(a){delete s.__exec[r],Object.defineProperty(t,r,{value:a,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function io(t,s){if(!(!Array.isArray(s)||s.length===0))for(let n=0;n<s.length;n++){const c=s[n];try{typeof c=="function"?c(t,t.state,t.context):typeof c=="string"&&t.state?.[c]}catch{}}}function $(t,s,n){return!Array.isArray(s)||s.length===0?n:function(...c){return io(t,s),n.apply(this,c)}}function J(t,s){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[s]}function $t(t,s){const n=t.__ref,c=!!(s&&s.skipIfEffect);if(ro(t),typeof t.text=="function"){const o=t.text,e=$(t,t.textDeps,o),r=S(()=>{if(!n.contentManaged)try{let i=e(t,t.state,t.context);t.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=at.call(t,i,t.state)),t.tag==="string"?t.node.nodeValue=i:t.node.textContent=i)}catch{}},{depth:n.path.length});n.__effects.push(r),n.__exec.text=o}else if(typeof t.text=="string"&&t.text.includes("{{")){const o=t.text,e=S(()=>{if(n.contentManaged)return;const r=at.call(t,o,t.state);r!=null&&(t.text=r),t.node&&(t.tag==="string"?t.node.nodeValue=r??"":t.node.textContent=r??"")},{depth:n.path.length});n.__effects.push(e),n.__exec.text=o}for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&typeof t[o]=="function"&&!K.has(o)&&!H(o)&&!n.__exec[o]){if(E[o]){const e=t[o],r=$(t,t[o+"Deps"],e),i=o;let a;const u=S(()=>{const d=t.context?.designSystem;d&&O(d);try{const p=r(t,t.state,t.context),y=E[i](p,t,t.state,t.context);if(y&&t.node){const _=_t(y);(_===null||_!==a)&&(a=_,Y(t.node,y))}else t.node&&(i==="show"||i==="hide")&&(a=void 0,t.node.style.display="")}finally{d&&L()}},{depth:n.path.length});n.__effects.push(u),n.__exec[o]=e}else if(j&&j.has(o)){const e=t[o],r=$(t,t[o+"Deps"],e),i=o;let a;const u=S(()=>{const d=t.context?.designSystem;d&&O(d);try{const p=r(t,t.state,t.context);if(t.node)if(p!=null){const y=i+":"+String(p);y!==a&&(a=y,Y(t.node,{[i]:p}))}else a=void 0,t.node.style[i]=""}finally{d&&L()}},{depth:n.path.length});n.__effects.push(u),n.__exec[o]=e}}if(typeof t.html=="function"){const o=t.html,e=$(t,t.htmlDeps,o),r=S(()=>{const i=t.context?.designSystem;i&&O(i);try{const a=e(t,t.state,t.context);t.node&&a!=null&&typeof a!="function"&&(t.node.innerHTML=a)}finally{i&&L()}},{depth:n.path.length});n.__effects.push(r),n.__exec.html=o}if(typeof t.value=="function"){const o=t.value,e=$(t,t.valueDeps,o),r=S(()=>{try{const i=e(t,t.state,t.context);if(!t.node||!("value"in t.node))return;const a=i==null?"":String(i);if(t.node.value===a)return;const u=typeof document<"u"&&document.activeElement===t.node,d=u&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,p=u&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=a,u&&d!=null&&p!=null)try{t.node.setSelectionRange(d,p)}catch{}}catch{}},{depth:n.path.length});n.__effects.push(r),n.__exec.value=o}if(typeof t.style=="function"){const o=t.style,e=$(t,t.styleDeps,o);let r;const i=S(()=>{const a=e(t,t.state,t.context),u=_t(a);(u===null||u!==r)&&(r=u,Y(t.node,a))},{depth:n.path.length});n.__effects.push(i),n.__exec.style=o}else if(t.style&&typeof t.style=="object")for(const o in t.style){const e=t.style[o];if(typeof e!="function")continue;const r=$(t,J(t.styleDeps,o),e);let i;const a=S(()=>{try{const u=r(t,t.state,t.context);if(t.node){const d=o+":"+String(u);d!==i&&(i=d,Y(t.node,{[o]:u}))}}catch{}},{depth:n.path.length});n.__effects.push(a)}if(t.attr&&typeof t.attr=="object"){for(const o in t.attr)if(typeof t.attr[o]=="function"){const e=$(t,J(t.attrDeps,o),t.attr[o]),r=o,i=S(()=>{try{const a=e(t,t.state,t.context);t.node?.setAttribute&&(a==null||a===!1?t.node.removeAttribute(r):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(r,a===!0?"":a))}catch{}},{depth:n.path.length});n.__effects.push(i)}}if(t.aria&&typeof t.aria=="object")for(const o in t.aria){if(typeof t.aria[o]!="function")continue;const e=$(t,J(t.ariaDeps,o),t.aria[o]),r="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=S(()=>{try{const a=e(t,t.state,t.context);if(!t.node?.setAttribute)return;a==null||a===!1?t.node.removeAttribute(r):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(r,a===!0?"":a)}catch{}},{depth:n.path.length});n.__effects.push(i)}if(t.data&&typeof t.data=="object")for(const o in t.data){if(typeof t.data[o]!="function")continue;const e=$(t,J(t.dataDeps,o),t.data[o]),i="data-"+o.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),a=S(()=>{try{const u=e(t,t.state,t.context);if(!t.node?.setAttribute)return;u==null||u===!1?t.node.removeAttribute(i):typeof u!="function"&&typeof u!="object"&&t.node.setAttribute(i,u===!0?"":u)}catch{}},{depth:n.path.length});n.__effects.push(a)}const f=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(f)for(const o in f){if(typeof f[o]!="function")continue;const e=$(t,J(t.classDeps,o),f[o]),r=S(()=>{try{const i=e(t,t.state,t.context);if(!t.node?.classList)return;typeof i=="string"?t.node.classList.add(i):i?t.node.classList.add(o):t.node.classList.remove(o)}catch{}},{depth:n.path.length});n.__effects.push(r)}!c&&typeof t.if=="function"&&Rt(t,n,t.if);for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||K.has(o)||typeof t[o]!="function")continue;const e=o.charCodeAt(0);if(e>=65&&e<=90||H(o))continue;const r=t[o];n.__exec[o]=r;const i=t.tag||"div";if(ut(i,o)&&!E[o]&&!(j&&j.has(o))){const a=dt(o)||o,u=$(t,t[o+"Deps"],r),d=S(()=>{try{const p=u(t,t.state,t.context);t.node?.setAttribute&&(p==null||p===!1?t.node.removeAttribute(a):typeof p!="function"&&typeof p!="object"&&(a==="src"&&"src"in t.node?t.node.src=p:t.node.setAttribute(a,p===!0?"":p)))}catch{}},{depth:n.path.length});n.__effects.push(d)}}if(ao(t),po(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){const o=t.onStateUpdate,e=t.stateDeps;let r=!1,i=[];const a=S(()=>{const u=[];for(let _=0;_<e.length;_++){const l=e[_];try{u[_]=typeof l=="function"?l(t,t.state,t.context):t.state?.[l]}catch{u[_]=void 0}}if(!r){r=!0,i=u;return}let d=u.length!==i.length;for(let _=0;!d&&_<u.length;_++)u[_]!==i[_]&&(d=!0);const p=i;if(i=u,!d)return;const y=t.context?.designSystem;y&&O(y);try{o(t,t.state,t.context,{prev:p,next:u})}catch(_){if(t.context?.plugins?.length&&V("error",t,{hook:"onStateUpdate",error:_})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',_),t.context?.strictMode)throw _}finally{y&&L()}},{depth:n.path.length});n.__effects.push(a)}lo(t)}function Dt(t){const s=t.parent,n=s?.node;if(!n||!t.node){Vt(t,t.parent);return}let c=null;const f=Object.keys(s),o=f.indexOf(t.key);for(let e=o+1;e<f.length;e++){const r=s[f[e]];if(r?.node?.parentNode===n){c=r.node;break}}c?n.insertBefore(t.node,c):n.appendChild(t.node)}function Rt(t,s,n){const c=$(t,t.ifDeps,n),f=S(()=>{let o;try{o=c(t,t.state,t.context)}catch(r){if(o=!1,s.__ifError=r,typeof console<"u"&&console.warn){const i=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${i} \u2014 treating as false:`,r?.message||r)}return}const e=s.__if;if(s.__if=!!o,e&&!s.__if&&t.node)t.node.remove();else if(!e&&s.__if)if(s.__ifInitialized)t.node||(t.node=et(t)),t.node&&(t.node.ref=t),Dt(t),ht(t);else{if(s.__ifInitialized=!0,t.tag||(t.tag=wt(t)),M("Init",t,{}),t.node||(t.node=et(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!s.__fragmentAnchor){const i=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(i),s.__fragmentAnchor=i}M("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Kt(t,{}),$t(t,{skipIfEffect:!0}),ht(t),Mt(t),Ut(t,{}),Dt(t),Pt(t,{})}},{depth:s.path.length});s.__effects.push(f)}function ht(t){const{node:s}=t;if(s){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?s.nodeValue=t.text:s.textContent=t.text:typeof t.text=="number"&&(s.textContent=t.text),ho(t),typeof t.html=="string"&&(s.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in s){const n=String(t.value);s.value!==n&&(s.value=n)}if(t.style&&typeof t.style=="object"&&Y(s,t.style),t.attr&&typeof t.attr=="object")for(const n in t.attr){const c=t.attr[n];typeof c=="function"||typeof c=="object"||c==null||c===!1||s.setAttribute&&s.setAttribute(n,c===!0?"":c)}if(t.data&&typeof t.data=="object")for(const n in t.data){const c=t.data[n];typeof c=="function"||typeof c=="object"||c==null||c===!1||s.dataset&&(s.dataset[n]=c===!0?"":c)}if(t.classlist||t.class){const n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(c=>c&&s.classList.add(c));else if(typeof n=="object")for(const c in n){const f=typeof n[c]=="function"?n[c](t,t.state,t.context):n[c];f&&s.classList.add(typeof f=="string"?f:c)}}}}function _t(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Y(t,s){if(!t||!s||!t.style)return;let n=null;for(const c in s){const f=s[c];if(f!=null){if(c.charAt(0)==="&"&&typeof f=="object"){n||(n={}),n[c]=f;continue}try{const o=String(f),e=c.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),r=o.trim(),i=/\s*!important\s*$/.test(r),a=r.replace(/\s*!important\s*$/,"");t.style.setProperty(e,a,i?"important":"")}catch{}}}n&&fo(t,n)}let eo=0;function fo(t,s){const n=`_ds${eo++}`;t.classList.add(n);const c=t.ownerDocument;let f=c.querySelector("style[data-smbls-scoped]");f||(f=c.createElement("style"),f.setAttribute("data-smbls-scoped",""),c.head.appendChild(f));let o="";for(const e in s){const r="."+n,i=e.replace(/&/g,r).split(",").map(u=>{const d=u.trim();return d.includes(r)?d:r+d}).join(", "),a=s[e];if(typeof a=="object"){let u="",d="";for(const p in a){const y=a[p];if(typeof y=="object"){const _=p.includes("&")?i.split(", ").map(h=>p.replace(/&/g,h)).join(", "):i.split(", ").map(h=>`${h} ${p}`).join(", ");let l="";for(const h in y)l+=`${h.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${y[h]};`;d+=jt(`${_} { ${l} }`,_)+`
5
5
  `}else u+=`${p.replace(/[A-Z]/g,_=>"-"+_.toLowerCase())}: ${y};`}u&&(o+=jt(`${i} { ${u} }`,i)+`
6
- `),d&&(o+=d)}}o&&(f.textContent+=o)}function ao(t){let s=t.subscribeTo;if(typeof s=="function")try{s=s(t,t.state,t.context)}catch{s=null}if(!Array.isArray(s)||s.length===0)return;const n=t.__ref;for(let c=0;c<s.length;c++){const f=s[c];if(typeof f!="string"||f.length===0)continue;const o=f.split("."),e=o[0],r=o.slice(1),i={value:!1},a=S(()=>{const u=t.state&&(I(t.state)?t.state.root:null);if(!u||!I(u))return;let d=u;d=d[e];for(let y=0;y<r.length&&!(d==null||typeof d!="object");y++)if(I(d))d=d[r[y]];else break;if(!i.value)return;let p=!1;if(typeof t.onBeforeUpdate=="function"){const y=t.context?.designSystem;y&&O(y);try{t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0})===!1&&(p=!0)}catch(_){t.context?.plugins?.length&&V("error",t,{hook:"onBeforeUpdate",error:_})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",_)}finally{y&&L()}}if(!p&&t.node&&n.__effects)for(let y=0;y<n.__effects.length;y++){const _=n.__effects[y];_&&_!==a&&!_._disposed&&!_._isSubscribeToEffect&&typeof _._execute=="function"&&_._execute()}if(!p&&typeof t.onUpdate=="function"){const y=t.context?.designSystem;y&&O(y);try{t.onUpdate(t,t.state,t.context)}catch(_){t.context?.plugins?.length&&V("error",t,{hook:"onUpdate",error:_})||console.error("[DOMQL] subscribeTo onUpdate error:",_)}finally{y&&L()}}},{depth:n.path.length});i.value=!0,a._isSubscribeToEffect=!0,n.__effects.push(a)}}function gt(t,s){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!s.context?.designSystem?.media?.[t.slice(1)])}const Tt=new Set;function uo(t,s){const n=s?.__ref?.path?s.__ref.path.join("."):s?.key||"?",c=n+"::"+t;Tt.has(c)||(Tt.add(c),console.warn(`[smbls/css] "${t}" at ${n} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function G(t,s,n){const c={},f=new Set,o=(e,r,i)=>{const a=i?new Set(Object.keys(c)):null;if(E[e]){const u=E[e](r,s,s.state,s.context);if(u){const d=Array.isArray(u)?u:[u];for(const p of d)p&&Object.assign(c,p)}}else c[e]=r;if(i)for(const u in c)a.has(u)||f.add(u)};for(const e in t){if(!Object.prototype.hasOwnProperty.call(t,e))continue;let r=t[e];if(typeof r=="function"&&(r=r(s,s.state,s.context)),r==null||typeof r=="function")continue;if(typeof r=="object"&&!Array.isArray(r)){if(e==="style"){for(const d in r){let p=r[d];if(typeof p=="function"&&(p=p(s,s.state,s.context)),p==null||typeof p=="function")continue;const y=typeof s[d]=="function"&&(E[d]||j&&j.has(d));o(d,p,y)}continue}if(gt(e,s)){const d=G(r,s,!0);Object.keys(d).length&&(c[`[data-theme="${e.slice(1)}"] &`]=d);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(e)){ft()&&uo(e,s);continue}let a=e;if(e.charCodeAt(0)===64&&!e.startsWith("@media")&&!e.startsWith("@keyframes")){const d=s.context?.designSystem?.media?.[e.slice(1)];d&&(a=`@media ${d}`)}const u=G(r,s,!1);Object.keys(u).length&&(c[a]=u);continue}const i=typeof s[e]=="function"&&(E[e]||j&&j.has(e));o(e,r,i)}if(n)for(const e in c)f.add(e);for(const e of f){const r=c[e];typeof r=="string"&&!r.includes("!important")&&(c[e]=r+" !important")}return c}function bt(t,s){if(s===void 0&&(s=0),s>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&bt(t[n],s+1))return!0}return!1}function Nt(t,s,n){if(!s||typeof s!="object"||Array.isArray(s))return null;if(gt(t,n)){const o=G(s,n,!0);return Object.keys(o).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:o}:null}let c=t;if(t.charAt(0)==="@"&&!t.startsWith("@media")&&!t.startsWith("@keyframes")){const o=n.context?.designSystem?.media?.[t.slice(1)];o&&(c=`@media ${o}`)}const f=G(s,n,!1);return Object.keys(f).length?{cssProp:c,block:f}:null}function lo(t){const s=t.__ref;for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!pt(n))continue;const c=t[n];if(!c||typeof c!="object"||Array.isArray(c)||!bt(c))continue;let f=null,o;const e=S(()=>{if(!t.node)return;const r=t.context?.designSystem;r&&O(r);let i,a=!1;try{const u=Nt(n,c,t),d=u?_t(u.block)+"::"+u.cssProp:null;if(d!==null&&d===o)a=!0;else if(o=d,u){const p=tt({[u.cssProp]:u.block},null,t.context?.cssPrefix);i=p?p.split(" ").filter(Boolean):null}else i=null}finally{r&&L()}if(!(a||!t.node.classList)){if(f)for(const u of f)t.node.classList.remove(u);if(i&&i.length)for(const u of i)t.node.classList.add(u);f=i}},{depth:s.path.length});s.__effects.push(e)}}function po(t){const s=t.__ref;s.__conditionalRunners=[];const n=new Map;for(const c in t){if(!Object.prototype.hasOwnProperty.call(t,c))continue;const f=c.charAt(0);if(f!=="."&&f!=="!")continue;const o=c.slice(1);if(!o)continue;if(/[:@\s>~+[\]]/.test(o)){if(typeof console<"u"&&console.warn){const d=o.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${c}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${f}\` is read as one prop name. Nest the selector inside instead: \`${f}${d}: { '${o.slice(d.length)}': {...} }\`.`)}continue}const e=t[c];if(!e||typeof e!="object")continue;const r=f==="!",i={lastMatch:!1,appliedKeys:null,appliedClasses:null},a=()=>{let d;const p=t[o];if(p===void 0){const l=!!t.state&&o in t.state,h=t.state?t.state[o]:void 0;if(l||h!==void 0)d=h;else{const g=t.context?.cases?.[o];if(g===void 0)return;try{d=typeof g=="function"?g.call(t,t):g}catch(x){d=!1,s.__conditionalError=x,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${c}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,x?.message||x)}}}else if(typeof p=="function")try{d=p(t,t.state,t.context)}catch(l){d=!1,s.__conditionalError=l,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${c}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,l?.message||l)}else d=p;const y=r?!d:!!d;if(!t.node||y===i.lastMatch)return;i.lastMatch=y;const _=t.context?.designSystem;_&&O(_);try{if(y){const l={},h={};let g=!1;for(const b in e){if(!Object.prototype.hasOwnProperty.call(e,b))continue;const w=e[b],C=b.charAt(0);if((C===":"||C==="@"||C==="&")&&w&&typeof w=="object"&&!Array.isArray(w)){if(gt(b,t)){const D=G(w,t,!0);Object.keys(D).length&&(h[`[data-theme="${b.slice(1)}"] &`]=D,g=!0)}else{let D=b;if(C==="@"&&!b.startsWith("@media")&&!b.startsWith("@keyframes")){const U=t.context?.designSystem?.media?.[b.slice(1)];U&&(D=`@media ${U}`)}const B=G(w,t,!1);Object.keys(B).length&&(h[D]=B,g=!0)}continue}const v=typeof w=="function"?w(t,t.state,t.context):w;if(v!=null)if(E[b]){const D=E[b](v,t,t.state,t.context);if(D){const B=Array.isArray(D)?D:[D];for(const U of B)U&&Object.assign(l,U)}}else j&&j.has(b)&&(l[b]=v)}const x=Object.keys(l);if(x.length){Y(t.node,l);for(const b of x)n.set(b,c);i.appliedKeys=x}else i.appliedKeys=null;if(g){const b=tt(h,null,t.context?.cssPrefix),w=b?b.split(" ").filter(Boolean):[];if(w.length&&t.node.classList){for(const C of w)t.node.classList.add(C);i.appliedClasses=w}else i.appliedClasses=null}else if(i.appliedClasses){for(const b of i.appliedClasses)t.node.classList.remove(b);i.appliedClasses=null}}else{if(i.appliedKeys){for(const l of i.appliedKeys)n.get(l)===c&&(t.node.style[l]="",n.delete(l));i.appliedKeys=null}if(i.appliedClasses){for(const l of i.appliedClasses)t.node.classList.remove(l);i.appliedClasses=null}}}finally{_&&L()}};s.__conditionalRunners.push(a);const u=S(a,{depth:s.path.length});s.__effects.push(u)}}const xt=new WeakSet;function yo(t){const s=t.ownerDocument;!s||xt.has(s)||(xt.add(s),queueMicrotask(()=>{xt.delete(s);const n=s.body||s.documentElement;n&&n.offsetWidth}))}const At=new WeakSet;let Ft=!1;function ho(t){const{node:s}=t;if(!s)return;if(Ft||(Ft=!0,tt({display:"none"})),At.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}At.add(t);const n=t.context?.designSystem;n&&O(n);try{const c={};let f=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&E.theme){const o=E.theme(t.theme,t,t.state,t.context);if(o){if(Array.isArray(o))for(const e of o)e&&Object.assign(c,e);else Object.assign(c,o);f=!0}}for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||K.has(o)||o==="theme")continue;const e=o.charCodeAt(0);if(!(e>=65&&e<=90)&&!H(o)){if(E[o]){const r=t[o],i=E[o](r,t,t.state,t.context);if(i){if(Array.isArray(i))for(const a of i)a&&Object.assign(c,a);else Object.assign(c,i);f=!0}}else if(j&&j.has(o)){const r=t[o];r!=null&&typeof r!="object"&&(c[o]=r,f=!0)}else if(o.charCodeAt(0)===45){const r=t[o];r!=null&&typeof r!="object"&&(c[o]=r,f=!0)}else if(o.charAt(0)==="&"||o.charAt(0)==="@"||o.charAt(0)===":"){const r=t[o];if(r&&typeof r=="object"&&!Array.isArray(r)){if(bt(r))continue;const i=Nt(o,r,t);i&&(c[i.cssProp]=i.block,f=!0)}}}}if(f){c.display&&String(c.display).includes("!important")&&(s.style.setProperty("display",String(c.display).replace(/\s*!important\s*$/,""),"important"),delete c.display);const o=tt(c,null,t.context?.cssPrefix);if(o&&s.classList){const r=o.split(" ").filter(Boolean);let i=!1;for(const a of r)s.classList.add(a),i||(a.charCodeAt(0)===95&&a.charCodeAt(1)===99||a.charCodeAt(0)===95&&a.indexOf("_c",1)!==-1)&&(i=!0);i&&yo(s)}const e=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(e!=null){const r=c.display;if(r&&r!==e)if(e==="none"){const i=[];for(const a of s.classList)a.startsWith("_d-")&&a!=="_d-none"&&i.push(a);for(const a of i)s.classList.remove(a);s.classList.add("_d-none")}else s.style.display=t.display}}}finally{n&&L(),At.delete(t)}}function Mt(t){const{node:s}=t;if(!s||!s.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const f in t.aria){const o=t.aria[f];if(typeof o=="function"||typeof o=="object"||o==null||o===!1)continue;const e="aria-"+f.replace(/[A-Z]/g,r=>"-"+r.toLowerCase());s.setAttribute(e,o===!0?"":o)}const n=Zt(t);for(const f in n){const o=n[f];o!=null&&o!==!1&&typeof o!="function"&&typeof o!="object"&&s.setAttribute(f,o===!0?"":o)}const c=t.tag||"div";for(const f in t){if(!Object.prototype.hasOwnProperty.call(t,f)||typeof t[f]=="function"||K.has(f)||f==="on"||n[f]!==void 0)continue;const o=f.charCodeAt(0);if(!(o>=65&&o<=90)&&!H(f)&&!(E[f]||j&&j.has(f))&&ut(c,f)){let e=t[f];if(e==null||(typeof e=="string"&&e.includes("{{")&&(e=at(e,t,t.state,t.context),t[f]=e),e==null||typeof e=="function"||typeof e=="object")||e===!1&&!Qt(dt(f)||f))continue;const r=dt(f)||f;s.setAttribute(r,qt(r,e))}}}function _o(t){if(!t.autoGrow)return;const s=t.node;if(!s||s.tagName!=="TEXTAREA")return;const n=t.autoGrow,c=n&&typeof n=="object"&&n.max?String(n.max):null;c&&(s.style.maxHeight=c);const f=()=>{s.style.height="auto",s.style.height=s.scrollHeight+"px"};f(),s.addEventListener("input",f),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{s.removeEventListener("input",f)}catch{}})}const It=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Kt(t,s){for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!H(n)||It.has(n))continue;let c=t[n];if(typeof c=="string"&&/^[A-Za-z_$][\w$]*$/.test(c)){const o=c;c=function(r){return t.call(o,r)}}if(typeof c!="function")continue;const f=mt(n);Ht.has(f)||zt(to(f),t,c)}go(t)}function go(t){const s=t.node;if(!s||!s.addEventListener)return;const n={};let c=!1;for(const p of It){const y=t[p];typeof y=="function"&&(n[p]=y,c=!0)}if(!c)return;const f=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,o=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let e=0,r=0,i=0,a=!1;const u=p=>{const y=p.touches&&p.touches[0]||p.changedTouches&&p.changedTouches[0];y&&(e=y.clientX,r=y.clientY,i=Date.now(),a=!0)},d=p=>{if(!a)return;a=!1;const y=p.changedTouches&&p.changedTouches[0]||p.touches&&p.touches[0];if(!y)return;const _=y.clientX-e,l=y.clientY-r,h=Date.now()-i;if(h>o)return;const g=Math.abs(_),x=Math.abs(l);if(Math.max(g,x)<f)return;let b;if(g>x*1.2)b=_<0?"left":"right";else if(x>g*1.2)b=l<0?"up":"down";else return;const w="onSwipe"+b.charAt(0).toUpperCase()+b.slice(1),C=n[w],v=n.onSwipe;C&&C.call(t,p,t,t.state,t.context),v&&v.call(t,{direction:b,dx:_,dy:l,dt:h,event:p},t,t.state,t.context)};s.addEventListener("touchstart",u,{passive:!0}),s.addEventListener("touchend",d,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{s.removeEventListener("touchstart",u)}catch{}try{s.removeEventListener("touchend",d)}catch{}})}function st(t,s){const n={...t};for(const c in s){const f=n[c],o=s[c];f&&o&&typeof f=="object"&&typeof o=="object"&&!Array.isArray(f)&&!Array.isArray(o)&&typeof f!="function"&&typeof o!="function"?n[c]=st(f,o):n[c]=o}return n}function kt(t,s,n){if(!s||!t.node)return;const c=t.childExtends;if(Array.isArray(s)){const f=t.tag==="fragment",o=t.context?.document||globalThis.document,e=f?null:o?.createDocumentFragment();if(!f&&!e)return;const r=t.childProps,i=t.childrenAs;for(let a=0;a<s.length;a++){let u=s[a];const d=u;(typeof u=="string"||typeof u=="number")&&(u={text:u});let p=r;if(typeof r=="function")try{p=r(t,u)}catch{p=null}if(i==="state"){let l=d;(typeof d=="string"||typeof d=="number")&&(l={value:d,text:d}),u=p?{...p,state:l}:{state:l}}else p&&(u=st(p,u));if(c&&!u.ignoreChildExtends)if(u.extends){const l=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(c)?c:[c];u={...u,extends:[...h,...l]}}else u={...u,extends:c};const y=u?.key||d&&typeof d=="object"&&d.key||`${a}`;let _;try{_=z(u,t,y,n)}catch(l){if(typeof console<"u"&&console.error){const h=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${y}" failed to construct at ${h} (initial render, skipping this row):`,l?.message||l)}continue}!f&&_?.node&&e.appendChild(_.node)}return f||t.node.appendChild(e),!0}if(typeof s=="string"){const f=Lt(s,t);if(Array.isArray(f))return kt(t,f,n)}if(typeof s=="object")for(const f in s){if(K.has(f))continue;let o=s[f];if(!(o==null||o===!1)){if((typeof o=="string"||typeof o=="number")&&(o={text:o}),t.childProps&&(o=st(t.childProps,o)),c&&!o.ignoreChildExtends)if(o.extends){const e=Array.isArray(o.extends)?o.extends:[o.extends],r=Array.isArray(c)?c:[c];o={...o,extends:[...r,...e]}}else o={...o,extends:c};z(o,t,f,n)}}}function Ct(t,s){const n=t.node;if(!n||n.tagName!=="SELECT")return;const c=n.options;if(!c||!c.length)return;const f=t.__ref,o=f&&f.__exec&&f.__exec.value,e=typeof o=="function",r=t.value!=null&&typeof t.value!="function";if(e||r){let u;if(e)try{u=o(t,t.state,t.context)}catch{return}else u=t.value;const d=u==null?"":String(u);n.value!==d&&(n.value=d);return}const i=s||!(f&&f.__selectSynced);if(f&&(f.__selectSynced=!0),!i)return;let a=-1;for(let u=0;u<c.length;u++)c[u].defaultSelected&&(a=u);a>=0&&n.selectedIndex!==a&&(n.selectedIndex=a)}function Ut(t,s){let{children:n,content:c}=t;const f=t.childExtends;if(typeof n=="function"){const r=n;try{n=r(t,t.state,t.context)}catch(p){if(n=void 0,typeof console<"u"&&console.error){const y=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${y} (initial run, treating as empty):`,p?.message||p)}}t.children=n;const i=t.__ref;let a=!1;const u=$(t,t.childrenDeps,r),d=S(()=>{const p=a;a=!0;let y;try{y=u(t,t.state,t.context)}catch(C){if(typeof console<"u"&&console.error){const v=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${v}${p?"":" (initial tracking run)"}:`,C?.message||C)}return}if(!p||y===t.children)return;t.children=y;const _=typeof t.onContentUpdate=="function",l=_?[]:null,h=_?[]:null,g=_?[]:null;if(Array.isArray(y)&&t.childrenAs==="state"){const C=t.childProps,v=[],D=new Map;for(let A=0;A<y.length;A++){const R=y[A];let k=C;if(typeof C=="function")try{k=C(t,R)}catch{k=null}const N=k&&k.key||R&&R.key||`${A}`;v.push(N),D.set(N,{rawChild:R,childProps:k})}const B=new Set(v),U=i.__children.slice();for(const A of U)if(!B.has(A)){const R=t[A];R?.remove&&R.remove(),delete t[A],h&&h.push(A)}const Z=t.childExtends,m=t.tag==="fragment",Bt=t.context?.document||globalThis.document,q=m?null:Bt?.createDocumentFragment(),nt=new Set;for(const A of v){const R=D.get(A),k=R.rawChild,N=t[A];if(N&&N.state){if(k&&typeof k=="object"){const P=N.state,W=P.$replace||P.replace,vt=P.$update||P.update;if(typeof W=="function")W.call(P,k);else if(typeof vt=="function"){for(const F in P)if(!(F==="__element"||F==="root"||F==="parent"||F==="update")&&!Object.prototype.hasOwnProperty.call(k,F))try{P[F]=void 0}catch{}vt.call(P,k)}else for(const F in k)P[F]=k[F]}g&&g.push(A);continue}let ct=k;(typeof k=="string"||typeof k=="number")&&(ct={value:k,text:k});const St=R.childProps;let T=St?{...St,state:ct}:{state:ct};if(Z&&!T.ignoreChildExtends)if(T.extends){const P=Array.isArray(T.extends)?T.extends:[T.extends],W=Array.isArray(Z)?Z:[Z];T={...T,extends:[...W,...P]}}else T={...T,extends:Z};let rt;try{rt=z(T,t,A,s)}catch(P){if(typeof console<"u"&&console.error){const W=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${A}" failed to construct at ${W} (reconcile, skipping this row):`,P?.message||P)}nt.add(A);continue}!m&&rt?.node&&q&&q.appendChild(rt.node),l&&l.push(A)}if(!m&&q&&q.childNodes.length&&t.node&&t.node.appendChild(q),!m&&t.node){let A=null;for(const R of v){const k=t[R]?.node;if(!k)continue;const N=A?A.nextSibling:t.node.firstChild;k!==N&&t.node.insertBefore(k,N),A=k}}i.__children=nt.size?v.filter(A=>!nt.has(A)):v,_&&(l.length||h.length)&&Ot(t,{added:l,removed:h,kept:g}),Ct(t,!1);return}const w=_?[...i.__children]:null;for(const C of[...i.__children]){const v=t[C];v?.remove&&v.remove(),delete t[C]}i.__children=[],kt(t,y,s),Ct(t,!1),_&&Ot(t,{added:[...i.__children],removed:w,kept:[]})},{depth:i.path.length});i.__effects.push(d)}const o=kt(t,n||c,s);if((n||c)&&!o)return;const e=t.context?.components||{};{const r=Object.keys(t);for(let i=0;i<r.length;i++){const a=r[i];if(!a.endsWith("Extends")||typeof t[a]!="string")continue;const u=a.slice(0,-7);if(!u||u.charCodeAt(0)<65||u.charCodeAt(0)>90)continue;const d={extends:t[a]};delete t[a];for(let p=i+1;p<r.length;p++){const y=r[p],_=y.charCodeAt(0);if(_>=65&&_<=90||K.has(y)||typeof t[y]=="function"&&(y.startsWith("on")||y.startsWith(".")))break;const l=t[y];l!==void 0&&(d[y]=l,delete t[y])}t[u]&&typeof t[u]=="object"?t[u]={...d,...t[u]}:t[u]=d}}for(const r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||K.has(r)||typeof t[r]!="object"||t[r]===null)continue;const i=r.charCodeAt(0);if(i<65||i>90)continue;let a=t[r];if(!a.__ref){if(!a.extends&&!a.extend){const u=e[r]||e[`smbls.${r}`];u&&(a={...a,extends:u})}if(t.childProps&&(a=st(t.childProps,a)),f&&!a.ignoreChildExtends)if(a.extends){const u=Array.isArray(a.extends)?a.extends:[a.extends],d=Array.isArray(f)?f:[f];a={...a,extends:[...d,...u]}}else a={...a,extends:f};z(a,t,r,s)}}}function Vt(t,s,n){const{node:c}=t;if(!c)return;c.ref=t;const f=s?.tag==="fragment"?s.__ref?.__fragmentAnchor:null;if(f){const e=f.parentNode;if(e){if(n?.position==="before"&&n.node)e.insertBefore(c,n.node);else if(n?.position==="after"&&n.node){const r=n.node.nextSibling;e.insertBefore(c,r||f)}else e.insertBefore(c,f);return}}const o=s?.node||(s?.nodeType?s:null);if(o)if(n?.position==="before"&&n.node)o.insertBefore(c,n.node);else if(n?.position==="after"&&n.node){const e=n.node.nextSibling;e?o.insertBefore(c,e):o.appendChild(c)}else o.appendChild(c)}function M(t,s,n){const c=t.charAt(0).toLowerCase()+t.slice(1);s.context?.plugins?.length&&V(c,s,n);const f="on"+t,o=s[f];if(typeof o=="function"){const e=t==="Render"||t==="RenderRouter";if(e){if(s.__ref.__inRender)return!0;s.__ref.__inRender=!0}const r=s.context?.designSystem;r&&O(r);try{if(o(s,s.state,s.context,n)===!1)return!1}catch(i){if(s.context?.plugins?.length&&V("error",s,{hook:f,error:i})||console.error(`[DOMQL] Lifecycle "${f}" error:`,i),s.context?.strictMode)throw i}finally{r&&L(),e&&(s.__ref.__inRender=!1)}}return!0}var Io=z;export{z as create,Io as default,Et as flushMounts};
6
+ `),d&&(o+=d)}}o&&(f.textContent+=o)}function ao(t){let s=t.subscribeTo;if(typeof s=="function")try{s=s(t,t.state,t.context)}catch{s=null}if(!Array.isArray(s)||s.length===0)return;const n=t.__ref;for(let c=0;c<s.length;c++){const f=s[c];if(typeof f!="string"||f.length===0)continue;const o=f.split("."),e=o[0],r=o.slice(1),i={value:!1},a=S(()=>{const u=t.state&&(I(t.state)?t.state.root:null);if(!u||!I(u))return;let d=u;d=d[e];for(let y=0;y<r.length&&!(d==null||typeof d!="object");y++)if(I(d))d=d[r[y]];else break;if(!i.value)return;let p=!1;if(typeof t.onBeforeUpdate=="function"){const y=t.context?.designSystem;y&&O(y);try{t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0})===!1&&(p=!0)}catch(_){t.context?.plugins?.length&&V("error",t,{hook:"onBeforeUpdate",error:_})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",_)}finally{y&&L()}}if(!p&&t.node&&n.__effects)for(let y=0;y<n.__effects.length;y++){const _=n.__effects[y];_&&_!==a&&!_._disposed&&!_._isSubscribeToEffect&&typeof _._execute=="function"&&_._execute()}if(!p&&typeof t.onUpdate=="function"){const y=t.context?.designSystem;y&&O(y);try{t.onUpdate(t,t.state,t.context)}catch(_){t.context?.plugins?.length&&V("error",t,{hook:"onUpdate",error:_})||console.error("[DOMQL] subscribeTo onUpdate error:",_)}finally{y&&L()}}},{depth:n.path.length});i.value=!0,a._isSubscribeToEffect=!0,n.__effects.push(a)}}function gt(t,s){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!s.context?.designSystem?.media?.[t.slice(1)])}const Tt=new Set;function uo(t,s){const n=s?.__ref?.path?s.__ref.path.join("."):s?.key||"?",c=n+"::"+t;Tt.has(c)||(Tt.add(c),console.warn(`[smbls/css] "${t}" at ${n} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function G(t,s,n){const c={},f=new Set,o=(e,r,i)=>{const a=i?new Set(Object.keys(c)):null;if(E[e]){const u=E[e](r,s,s.state,s.context);if(u){const d=Array.isArray(u)?u:[u];for(const p of d)p&&Object.assign(c,p)}}else c[e]=r;if(i)for(const u in c)a.has(u)||f.add(u)};for(const e in t){if(!Object.prototype.hasOwnProperty.call(t,e))continue;let r=t[e];if(typeof r=="function"&&(r=r(s,s.state,s.context)),r==null||typeof r=="function")continue;if(typeof r=="object"&&!Array.isArray(r)){if(e==="style"){for(const d in r){let p=r[d];if(typeof p=="function"&&(p=p(s,s.state,s.context)),p==null||typeof p=="function")continue;const y=typeof s[d]=="function"&&(E[d]||j&&j.has(d));o(d,p,y)}continue}if(gt(e,s)){const d=G(r,s,!1);Object.keys(d).length&&(c[`[data-theme="${e.slice(1)}"] &`]=d);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(e)){ft()&&uo(e,s);continue}let a=e;if(e.charCodeAt(0)===64&&!e.startsWith("@media")&&!e.startsWith("@keyframes")){const d=s.context?.designSystem?.media?.[e.slice(1)];d&&(a=`@media ${d}`)}const u=G(r,s,!1);Object.keys(u).length&&(c[a]=u);continue}const i=typeof s[e]=="function"&&(E[e]||j&&j.has(e));o(e,r,i)}if(n)for(const e in c)f.add(e);for(const e of f){const r=c[e];typeof r=="string"&&!r.includes("!important")&&(c[e]=r+" !important")}return c}function bt(t,s){if(s===void 0&&(s=0),s>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&bt(t[n],s+1))return!0}return!1}function Nt(t,s,n){if(!s||typeof s!="object"||Array.isArray(s))return null;if(gt(t,n)){const o=G(s,n,!1);return Object.keys(o).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:o}:null}let c=t;if(t.charAt(0)==="@"&&!t.startsWith("@media")&&!t.startsWith("@keyframes")){const o=n.context?.designSystem?.media?.[t.slice(1)];o&&(c=`@media ${o}`)}const f=G(s,n,!1);return Object.keys(f).length?{cssProp:c,block:f}:null}function lo(t){const s=t.__ref;for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!pt(n))continue;const c=t[n];if(!c||typeof c!="object"||Array.isArray(c)||!bt(c))continue;let f=null,o;const e=S(()=>{if(!t.node)return;const r=t.context?.designSystem;r&&O(r);let i,a=!1;try{const u=Nt(n,c,t),d=u?_t(u.block)+"::"+u.cssProp:null;if(d!==null&&d===o)a=!0;else if(o=d,u){const p=tt({[u.cssProp]:u.block},null,t.context?.cssPrefix);i=p?p.split(" ").filter(Boolean):null}else i=null}finally{r&&L()}if(!(a||!t.node.classList)){if(f)for(const u of f)t.node.classList.remove(u);if(i&&i.length)for(const u of i)t.node.classList.add(u);f=i}},{depth:s.path.length});s.__effects.push(e)}}function po(t){const s=t.__ref;s.__conditionalRunners=[];const n=new Map;for(const c in t){if(!Object.prototype.hasOwnProperty.call(t,c))continue;const f=c.charAt(0);if(f!=="."&&f!=="!")continue;const o=c.slice(1);if(!o)continue;if(/[:@\s>~+[\]]/.test(o)){if(typeof console<"u"&&console.warn){const d=o.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${c}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${f}\` is read as one prop name. Nest the selector inside instead: \`${f}${d}: { '${o.slice(d.length)}': {...} }\`.`)}continue}const e=t[c];if(!e||typeof e!="object")continue;const r=f==="!",i={lastMatch:!1,appliedKeys:null,appliedClasses:null},a=()=>{let d;const p=t[o];if(p===void 0){const l=!!t.state&&o in t.state,h=t.state?t.state[o]:void 0;if(l||h!==void 0)d=h;else{const g=t.context?.cases?.[o];if(g===void 0)return;try{d=typeof g=="function"?g.call(t,t):g}catch(x){d=!1,s.__conditionalError=x,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${c}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,x?.message||x)}}}else if(typeof p=="function")try{d=p(t,t.state,t.context)}catch(l){d=!1,s.__conditionalError=l,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${c}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,l?.message||l)}else d=p;const y=r?!d:!!d;if(!t.node||y===i.lastMatch)return;i.lastMatch=y;const _=t.context?.designSystem;_&&O(_);try{if(y){const l={},h={};let g=!1;for(const b in e){if(!Object.prototype.hasOwnProperty.call(e,b))continue;const w=e[b],C=b.charAt(0);if((C===":"||C==="@"||C==="&")&&w&&typeof w=="object"&&!Array.isArray(w)){if(gt(b,t)){const D=G(w,t,!1);Object.keys(D).length&&(h[`[data-theme="${b.slice(1)}"] &`]=D,g=!0)}else{let D=b;if(C==="@"&&!b.startsWith("@media")&&!b.startsWith("@keyframes")){const U=t.context?.designSystem?.media?.[b.slice(1)];U&&(D=`@media ${U}`)}const B=G(w,t,!1);Object.keys(B).length&&(h[D]=B,g=!0)}continue}const v=typeof w=="function"?w(t,t.state,t.context):w;if(v!=null)if(E[b]){const D=E[b](v,t,t.state,t.context);if(D){const B=Array.isArray(D)?D:[D];for(const U of B)U&&Object.assign(l,U)}}else j&&j.has(b)&&(l[b]=v)}const x=Object.keys(l);if(x.length){Y(t.node,l);for(const b of x)n.set(b,c);i.appliedKeys=x}else i.appliedKeys=null;if(g){const b=tt(h,null,t.context?.cssPrefix),w=b?b.split(" ").filter(Boolean):[];if(w.length&&t.node.classList){for(const C of w)t.node.classList.add(C);i.appliedClasses=w}else i.appliedClasses=null}else if(i.appliedClasses){for(const b of i.appliedClasses)t.node.classList.remove(b);i.appliedClasses=null}}else{if(i.appliedKeys){for(const l of i.appliedKeys)n.get(l)===c&&(t.node.style[l]="",n.delete(l));i.appliedKeys=null}if(i.appliedClasses){for(const l of i.appliedClasses)t.node.classList.remove(l);i.appliedClasses=null}}}finally{_&&L()}};s.__conditionalRunners.push(a);const u=S(a,{depth:s.path.length});s.__effects.push(u)}}const xt=new WeakSet;function yo(t){const s=t.ownerDocument;!s||xt.has(s)||(xt.add(s),queueMicrotask(()=>{xt.delete(s);const n=s.body||s.documentElement;n&&n.offsetWidth}))}const At=new WeakSet;let Ft=!1;function ho(t){const{node:s}=t;if(!s)return;if(Ft||(Ft=!0,tt({display:"none"})),At.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}At.add(t);const n=t.context?.designSystem;n&&O(n);try{const c={};let f=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&E.theme){const o=E.theme(t.theme,t,t.state,t.context);if(o){if(Array.isArray(o))for(const e of o)e&&Object.assign(c,e);else Object.assign(c,o);f=!0}}for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||K.has(o)||o==="theme")continue;const e=o.charCodeAt(0);if(!(e>=65&&e<=90)&&!H(o)){if(E[o]){const r=t[o],i=E[o](r,t,t.state,t.context);if(i){if(Array.isArray(i))for(const a of i)a&&Object.assign(c,a);else Object.assign(c,i);f=!0}}else if(j&&j.has(o)){const r=t[o];r!=null&&typeof r!="object"&&(c[o]=r,f=!0)}else if(o.charCodeAt(0)===45){const r=t[o];r!=null&&typeof r!="object"&&(c[o]=r,f=!0)}else if(o.charAt(0)==="&"||o.charAt(0)==="@"||o.charAt(0)===":"){const r=t[o];if(r&&typeof r=="object"&&!Array.isArray(r)){if(bt(r))continue;const i=Nt(o,r,t);i&&(c[i.cssProp]=i.block,f=!0)}}}}if(f){c.display&&String(c.display).includes("!important")&&(s.style.setProperty("display",String(c.display).replace(/\s*!important\s*$/,""),"important"),delete c.display);const o=tt(c,null,t.context?.cssPrefix);if(o&&s.classList){const r=o.split(" ").filter(Boolean);let i=!1;for(const a of r)s.classList.add(a),i||(a.charCodeAt(0)===95&&a.charCodeAt(1)===99||a.charCodeAt(0)===95&&a.indexOf("_c",1)!==-1)&&(i=!0);i&&yo(s)}const e=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(e!=null){const r=c.display;if(r&&r!==e)if(e==="none"){const i=[];for(const a of s.classList)a.startsWith("_d-")&&a!=="_d-none"&&i.push(a);for(const a of i)s.classList.remove(a);s.classList.add("_d-none")}else s.style.display=t.display}}}finally{n&&L(),At.delete(t)}}function Mt(t){const{node:s}=t;if(!s||!s.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const f in t.aria){const o=t.aria[f];if(typeof o=="function"||typeof o=="object"||o==null||o===!1)continue;const e="aria-"+f.replace(/[A-Z]/g,r=>"-"+r.toLowerCase());s.setAttribute(e,o===!0?"":o)}const n=Zt(t);for(const f in n){const o=n[f];o!=null&&o!==!1&&typeof o!="function"&&typeof o!="object"&&s.setAttribute(f,o===!0?"":o)}const c=t.tag||"div";for(const f in t){if(!Object.prototype.hasOwnProperty.call(t,f)||typeof t[f]=="function"||K.has(f)||f==="on"||n[f]!==void 0)continue;const o=f.charCodeAt(0);if(!(o>=65&&o<=90)&&!H(f)&&!(E[f]||j&&j.has(f))&&ut(c,f)){let e=t[f];if(e==null||(typeof e=="string"&&e.includes("{{")&&(e=at(e,t,t.state,t.context),t[f]=e),e==null||typeof e=="function"||typeof e=="object")||e===!1&&!Qt(dt(f)||f))continue;const r=dt(f)||f;s.setAttribute(r,qt(r,e))}}}function _o(t){if(!t.autoGrow)return;const s=t.node;if(!s||s.tagName!=="TEXTAREA")return;const n=t.autoGrow,c=n&&typeof n=="object"&&n.max?String(n.max):null;c&&(s.style.maxHeight=c);const f=()=>{s.style.height="auto",s.style.height=s.scrollHeight+"px"};f(),s.addEventListener("input",f),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{s.removeEventListener("input",f)}catch{}})}const It=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Kt(t,s){for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!H(n)||It.has(n))continue;let c=t[n];if(typeof c=="string"&&/^[A-Za-z_$][\w$]*$/.test(c)){const o=c;c=function(r){return t.call(o,r)}}if(typeof c!="function")continue;const f=mt(n);Ht.has(f)||zt(to(f),t,c)}go(t)}function go(t){const s=t.node;if(!s||!s.addEventListener)return;const n={};let c=!1;for(const p of It){const y=t[p];typeof y=="function"&&(n[p]=y,c=!0)}if(!c)return;const f=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,o=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let e=0,r=0,i=0,a=!1;const u=p=>{const y=p.touches&&p.touches[0]||p.changedTouches&&p.changedTouches[0];y&&(e=y.clientX,r=y.clientY,i=Date.now(),a=!0)},d=p=>{if(!a)return;a=!1;const y=p.changedTouches&&p.changedTouches[0]||p.touches&&p.touches[0];if(!y)return;const _=y.clientX-e,l=y.clientY-r,h=Date.now()-i;if(h>o)return;const g=Math.abs(_),x=Math.abs(l);if(Math.max(g,x)<f)return;let b;if(g>x*1.2)b=_<0?"left":"right";else if(x>g*1.2)b=l<0?"up":"down";else return;const w="onSwipe"+b.charAt(0).toUpperCase()+b.slice(1),C=n[w],v=n.onSwipe;C&&C.call(t,p,t,t.state,t.context),v&&v.call(t,{direction:b,dx:_,dy:l,dt:h,event:p},t,t.state,t.context)};s.addEventListener("touchstart",u,{passive:!0}),s.addEventListener("touchend",d,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{s.removeEventListener("touchstart",u)}catch{}try{s.removeEventListener("touchend",d)}catch{}})}function st(t,s){const n={...t};for(const c in s){const f=n[c],o=s[c];f&&o&&typeof f=="object"&&typeof o=="object"&&!Array.isArray(f)&&!Array.isArray(o)&&typeof f!="function"&&typeof o!="function"?n[c]=st(f,o):n[c]=o}return n}function kt(t,s,n){if(!s||!t.node)return;const c=t.childExtends;if(Array.isArray(s)){const f=t.tag==="fragment",o=t.context?.document||globalThis.document,e=f?null:o?.createDocumentFragment();if(!f&&!e)return;const r=t.childProps,i=t.childrenAs;for(let a=0;a<s.length;a++){let u=s[a];const d=u;(typeof u=="string"||typeof u=="number")&&(u={text:u});let p=r;if(typeof r=="function")try{p=r(t,u)}catch{p=null}if(i==="state"){let l=d;(typeof d=="string"||typeof d=="number")&&(l={value:d,text:d}),u=p?{...p,state:l}:{state:l}}else p&&(u=st(p,u));if(c&&!u.ignoreChildExtends)if(u.extends){const l=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(c)?c:[c];u={...u,extends:[...h,...l]}}else u={...u,extends:c};const y=u?.key||d&&typeof d=="object"&&d.key||`${a}`;let _;try{_=z(u,t,y,n)}catch(l){if(typeof console<"u"&&console.error){const h=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${y}" failed to construct at ${h} (initial render, skipping this row):`,l?.message||l)}continue}!f&&_?.node&&e.appendChild(_.node)}return f||t.node.appendChild(e),!0}if(typeof s=="string"){const f=Lt(s,t);if(Array.isArray(f))return kt(t,f,n)}if(typeof s=="object")for(const f in s){if(K.has(f))continue;let o=s[f];if(!(o==null||o===!1)){if((typeof o=="string"||typeof o=="number")&&(o={text:o}),t.childProps&&(o=st(t.childProps,o)),c&&!o.ignoreChildExtends)if(o.extends){const e=Array.isArray(o.extends)?o.extends:[o.extends],r=Array.isArray(c)?c:[c];o={...o,extends:[...r,...e]}}else o={...o,extends:c};z(o,t,f,n)}}}function Ct(t,s){const n=t.node;if(!n||n.tagName!=="SELECT")return;const c=n.options;if(!c||!c.length)return;const f=t.__ref,o=f&&f.__exec&&f.__exec.value,e=typeof o=="function",r=t.value!=null&&typeof t.value!="function";if(e||r){let u;if(e)try{u=o(t,t.state,t.context)}catch{return}else u=t.value;const d=u==null?"":String(u);n.value!==d&&(n.value=d);return}const i=s||!(f&&f.__selectSynced);if(f&&(f.__selectSynced=!0),!i)return;let a=-1;for(let u=0;u<c.length;u++)c[u].defaultSelected&&(a=u);a>=0&&n.selectedIndex!==a&&(n.selectedIndex=a)}function Ut(t,s){let{children:n,content:c}=t;const f=t.childExtends;if(typeof n=="function"){const r=n;try{n=r(t,t.state,t.context)}catch(p){if(n=void 0,typeof console<"u"&&console.error){const y=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${y} (initial run, treating as empty):`,p?.message||p)}}t.children=n;const i=t.__ref;let a=!1;const u=$(t,t.childrenDeps,r),d=S(()=>{const p=a;a=!0;let y;try{y=u(t,t.state,t.context)}catch(C){if(typeof console<"u"&&console.error){const v=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${v}${p?"":" (initial tracking run)"}:`,C?.message||C)}return}if(!p||y===t.children)return;t.children=y;const _=typeof t.onContentUpdate=="function",l=_?[]:null,h=_?[]:null,g=_?[]:null;if(Array.isArray(y)&&t.childrenAs==="state"){const C=t.childProps,v=[],D=new Map;for(let A=0;A<y.length;A++){const R=y[A];let k=C;if(typeof C=="function")try{k=C(t,R)}catch{k=null}const N=k&&k.key||R&&R.key||`${A}`;v.push(N),D.set(N,{rawChild:R,childProps:k})}const B=new Set(v),U=i.__children.slice();for(const A of U)if(!B.has(A)){const R=t[A];R?.remove&&R.remove(),delete t[A],h&&h.push(A)}const Z=t.childExtends,m=t.tag==="fragment",Bt=t.context?.document||globalThis.document,q=m?null:Bt?.createDocumentFragment(),nt=new Set;for(const A of v){const R=D.get(A),k=R.rawChild,N=t[A];if(N&&N.state){if(k&&typeof k=="object"){const P=N.state,W=P.$replace||P.replace,vt=P.$update||P.update;if(typeof W=="function")W.call(P,k);else if(typeof vt=="function"){for(const F in P)if(!(F==="__element"||F==="root"||F==="parent"||F==="update")&&!Object.prototype.hasOwnProperty.call(k,F))try{P[F]=void 0}catch{}vt.call(P,k)}else for(const F in k)P[F]=k[F]}g&&g.push(A);continue}let ct=k;(typeof k=="string"||typeof k=="number")&&(ct={value:k,text:k});const St=R.childProps;let T=St?{...St,state:ct}:{state:ct};if(Z&&!T.ignoreChildExtends)if(T.extends){const P=Array.isArray(T.extends)?T.extends:[T.extends],W=Array.isArray(Z)?Z:[Z];T={...T,extends:[...W,...P]}}else T={...T,extends:Z};let rt;try{rt=z(T,t,A,s)}catch(P){if(typeof console<"u"&&console.error){const W=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${A}" failed to construct at ${W} (reconcile, skipping this row):`,P?.message||P)}nt.add(A);continue}!m&&rt?.node&&q&&q.appendChild(rt.node),l&&l.push(A)}if(!m&&q&&q.childNodes.length&&t.node&&t.node.appendChild(q),!m&&t.node){let A=null;for(const R of v){const k=t[R]?.node;if(!k)continue;const N=A?A.nextSibling:t.node.firstChild;k!==N&&t.node.insertBefore(k,N),A=k}}i.__children=nt.size?v.filter(A=>!nt.has(A)):v,_&&(l.length||h.length)&&Ot(t,{added:l,removed:h,kept:g}),Ct(t,!1);return}const w=_?[...i.__children]:null;for(const C of[...i.__children]){const v=t[C];v?.remove&&v.remove(),delete t[C]}i.__children=[],kt(t,y,s),Ct(t,!1),_&&Ot(t,{added:[...i.__children],removed:w,kept:[]})},{depth:i.path.length});i.__effects.push(d)}const o=kt(t,n||c,s);if((n||c)&&!o)return;const e=t.context?.components||{};{const r=Object.keys(t);for(let i=0;i<r.length;i++){const a=r[i];if(!a.endsWith("Extends")||typeof t[a]!="string")continue;const u=a.slice(0,-7);if(!u||u.charCodeAt(0)<65||u.charCodeAt(0)>90)continue;const d={extends:t[a]};delete t[a];for(let p=i+1;p<r.length;p++){const y=r[p],_=y.charCodeAt(0);if(_>=65&&_<=90||K.has(y)||typeof t[y]=="function"&&(y.startsWith("on")||y.startsWith(".")))break;const l=t[y];l!==void 0&&(d[y]=l,delete t[y])}t[u]&&typeof t[u]=="object"?t[u]={...d,...t[u]}:t[u]=d}}for(const r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||K.has(r)||typeof t[r]!="object"||t[r]===null)continue;const i=r.charCodeAt(0);if(i<65||i>90)continue;let a=t[r];if(!a.__ref){if(!a.extends&&!a.extend){const u=e[r]||e[`smbls.${r}`];u&&(a={...a,extends:u})}if(t.childProps&&(a=st(t.childProps,a)),f&&!a.ignoreChildExtends)if(a.extends){const u=Array.isArray(a.extends)?a.extends:[a.extends],d=Array.isArray(f)?f:[f];a={...a,extends:[...d,...u]}}else a={...a,extends:f};z(a,t,r,s)}}}function Vt(t,s,n){const{node:c}=t;if(!c)return;c.ref=t;const f=s?.tag==="fragment"?s.__ref?.__fragmentAnchor:null;if(f){const e=f.parentNode;if(e){if(n?.position==="before"&&n.node)e.insertBefore(c,n.node);else if(n?.position==="after"&&n.node){const r=n.node.nextSibling;e.insertBefore(c,r||f)}else e.insertBefore(c,f);return}}const o=s?.node||(s?.nodeType?s:null);if(o)if(n?.position==="before"&&n.node)o.insertBefore(c,n.node);else if(n?.position==="after"&&n.node){const e=n.node.nextSibling;e?o.insertBefore(c,e):o.appendChild(c)}else o.appendChild(c)}function M(t,s,n){const c=t.charAt(0).toLowerCase()+t.slice(1);s.context?.plugins?.length&&V(c,s,n);const f="on"+t,o=s[f];if(typeof o=="function"){const e=t==="Render"||t==="RenderRouter";if(e){if(s.__ref.__inRender)return!0;s.__ref.__inRender=!0}const r=s.context?.designSystem;r&&O(r);try{if(o(s,s.state,s.context,n)===!1)return!1}catch(i){if(s.context?.plugins?.length&&V("error",s,{hook:f,error:i})||console.error(`[DOMQL] Lifecycle "${f}" error:`,i),s.context?.strictMode)throw i}finally{r&&L(),e&&(s.__ref.__inRender=!1)}}return!0}var Io=z;export{z as create,Io as default,Et as flushMounts};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/element",
3
- "version": "3.14.752",
3
+ "version": "3.14.755",
4
4
  "description": "Core element creation, update, and disposal engine for smbls v3.14",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",
@@ -24,7 +24,7 @@
24
24
  "@symbo.ls/signal": "^3.14.628",
25
25
  "@symbo.ls/state": "^3.14.678",
26
26
  "@symbo.ls/utils": "^3.14.743",
27
- "css-in-props": "^3.14.747",
27
+ "css-in-props": "^3.14.753",
28
28
  "attrs-in-props": "^3.14.692"
29
29
  },
30
30
  "files": [